David Brownell [Sun, 3 Sep 2006 20:16:45 +0000 (13:16 -0700)]
PM: platform_bus and late_suspend/early_resume
Teach platform_bus about the new suspend_late/resume_early PM calls,
issued with IRQs off. Do we really need sysdev and friends any more,
or can janitors start switching its users over to platform_device so
we can do a minor code-ectomy?
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
PM: add /sys/power documentation to Documentation/ABI
The file sysfs-power that documents the interface in the /sys/power/ directory
is added to Documentation/ABI/testing.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Wed, 30 Aug 2006 21:09:47 +0000 (14:09 -0700)]
PM: no suspend_prepare() phase
Remove the new suspend_prepare() phase. It doesn't seem very usable,
has never been tested, doesn't address fault cleanup, and would need
a sibling resume_complete(); plus there are no real use cases. It
could be restored later if those issues get resolved.
David Brownell [Wed, 30 Aug 2006 20:54:36 +0000 (13:54 -0700)]
PM: add kconfig option for deprecated .../power/state files
Add a new PM_SYSFS_DEPRECATED config option to control whether or
not the /sys/devices/.../power/state files are provided. This will
make it easier to get rid of that mechanism when the time comes,
and to verify that userspace tools work right without it.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Wed, 30 Aug 2006 21:12:48 +0000 (14:12 -0700)]
PM: update docs for writing .../power/state
Updates to match current code:
- Make writes to the /sys/devices/.../power/state files fail cleanly
if the device requires the irqs-off call variants.
- Fix comments describing the /sys/devices/.../power/state file writes
to match the code; the last several releases have invalidated the
previous text.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 10 Aug 2006 23:38:28 +0000 (16:38 -0700)]
updated Documentation/power/devices.txt
This turned into a rewrite of Documentation/power/devices.txt:
- Provide more of the "big picture"
- Fixup some of the horribly ancient/obsolete description of device suspend()
semantics; lots of text just got deleted.
- Add a decent description of PM_EVENT_* codes, including the new PRETHAW code
needed in some swsusp scenarios.
- Describe the new PM factorization from Linus:
* class suspend, current suspend, then suspend_late
* NOT suspend_prepare, it wasn't really usable
* resume_early, current resume, class resume.
- Updates power/state docs to be correct, and deprecate its usage except for
driver testing.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 15 Aug 2006 06:11:08 +0000 (23:11 -0700)]
PM: issue PM_EVENT_PRETHAW
This patch is the first of this series that should actually change any
behavior ... by issuing the new event, now tha the rest of the kernel is
prepared to receive it.
This converts the PM core to issue the new PRETHAW message, which the rest of
the kernel is now ready to receive.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 15 Aug 2006 06:11:06 +0000 (23:11 -0700)]
PM: USB HCDs use PM_EVENT_PRETHAW
This teaches several USB host controller drivers to treat PRETHAW as a chip
reset since the controller, and all devices connected to it, are no longer in
states compatible with how the snapshotted suspend() left them.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 15 Aug 2006 06:11:05 +0000 (23:11 -0700)]
PM: PCI and IDE handle PM_EVENT_PRETHAW
Convert some framework code to handle the new PRETHAW message.
- IDE just treats it like a FREEZE.
- The pci_choose_state() thingie still doesn't use PCI_D0 when it gets a
FREEZE (and now PRETHAW) event, which seems rather buglike but wasn't
something to change with this patch.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 15 Aug 2006 06:11:04 +0000 (23:11 -0700)]
PM: define PM_EVENT_PRETHAW
This adds a new pm_message_t event type to use when preparing to restore a
swsusp snapshot. Devices that have been initialized by Linux after resume
(rather than left in power-up-reset state) may need to be reset; this new
event type give drivers the chance to do that.
The drivers that will care about this are those which understand more hardware
states than just "on" and "reset", relying on hardware state during resume()
methods to be either the state left by the preceding suspend(), or a
power-lost reset. The best current example of this class of drivers are USB
host controller drivers, which currently do not work through swsusp when
they're statically linked.
When the swsusp freeze/thaw mechanism kicks in, a troublesome third state
could exist: one state set up by a different kernel instance, before a
snapshot image is resumed. This mechanism lets drivers prevent that state.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 15 Aug 2006 06:11:03 +0000 (23:11 -0700)]
fix broken/dubious driver suspend() methods
Small driver suspend() fixes in preparation for the PRETHAW events:
- Only compare message events for equality against PM_EVENT_* codes;
not against integers, or using greater/less-than comparisons.
(PM_EVENT_* should really become a __bitwise thing.)
- Explicitly test for SUSPEND events (rather than not-something-else)
before suspending devices.
- Removes more of the confusion between a pm_message_t (wraps event code)
and a "state" ... suspend() originally took a target system state.
These updates are correct and appropriate even without new PM_EVENT codes.
benh: "I think in the Mesh case, we should handle the freeze case as well or
we might get wild DMA."
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Greg KH <greg@kroah.com> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Sat, 24 Jun 2006 21:50:29 +0000 (14:50 -0700)]
Suspend infrastructure cleanup and extension
Allow devices to participate in the suspend process more intimately,
in particular, allow the final phase (with interrupts disabled) to
also be open to normal devices, not just system devices.
Also, allow classes to participate in device suspend.
Juha Yrjölä [Thu, 3 Aug 2006 16:06:25 +0000 (19:06 +0300)]
sysfs: Make poll behaviour consistent
When no events have been reported by sysfs_notify(), sd->s_events
was previously set to zero. The initial value for new readers is
also zero, so poll was blocking, regardless of whether the attribute
was read by the process or not.
Make poll behave consistently by setting the initial value of
sd->s_events to non-zero.
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kay Sievers [Sun, 13 Aug 2006 04:17:09 +0000 (06:17 +0200)]
deprecate PHYSDEV* keys
deprecate PHYSDEV* values in the uevent environment
These values are no longer needed and inconsistent with the
stacking of class devices. The event environment should not
carry properties of a parent device. The key PHYSDEVDRIVER is
available as DRIVER, PHYDEVBUS is indentical SUBSYSTEM. Class
devices should not carry any of these values.
Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NetLabel]: update docs with website information
[NetLabel]: rework the Netlink attribute handling (part 2)
[NetLabel]: rework the Netlink attribute handling (part 1)
[Netlink]: add nla_validate_nested()
[NETLINK]: add nla_for_each_nested() to the interface list
[NetLabel]: change the SELinux permissions
[NetLabel]: make the CIPSOv4 cache spinlocks bottom half safe
[NetLabel]: correct improper handling of non-NetLabel peer contexts
[TCP]: make cubic the default
[TCP]: default congestion control menu
[ATM] he: Fix __init/__devinit conflict
[NETFILTER]: Add dscp,DSCP headers to header-y
[DCCP]: Introduce dccp_probe
[DCCP]: Use constants for CCIDs
[DCCP]: Introduce constants for CCID numbers
[DCCP]: Allow default/fallback service code.
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SOUND] sparc/amd7930: Use __devinit and __devinitdata as needed.
[SUNLANCE]: Mark sparc_lance_probe_one as __devinit.
[SPARC64]: Fix section-mismatch errors in solaris emul module.
Jonathan Corbet [Mon, 25 Sep 2006 23:25:37 +0000 (16:25 -0700)]
[PATCH] VIDIOC_ENUMSTD bug
The v4l2 API documentation for VIDIOC_ENUMSTD says:
To enumerate all standards applications shall begin at index
zero, incrementing by one until the driver returns EINVAL.
The actual code, however, tests the index this way:
if (index<=0 || index >= vfd->tvnormsize) {
ret=-EINVAL;
So any application which passes in index=0 gets EINVAL right off the bat
- and, in fact, this is what happens to mplayer. So I think the
following patch is called for, and maybe even appropriate for a 2.6.18.x
stable release.
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ed Swierk [Mon, 25 Sep 2006 23:25:36 +0000 (16:25 -0700)]
[PATCH] load_module: no BUG if module_subsys uninitialized
Invoking load_module() before param_sysfs_init() is called crashes in
mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.
In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
create a UNIX socket. Calls to hotplug begin after the topology_init
initcall.
Another patch for the same symptom (module_subsys-initialize-earlier.patch)
moves param_sysfs_init() to the subsys initcalls, but this is still not
early enough in the boot process in some cases. In particular,
topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
UNIX socket protocol) which can be compiled as a module. Moving
param_sysfs_init() to the postcore initcalls fixes this particular race,
but there might well be other cases where a usermodehelper causes a module
to load earlier still.
The patch makes load_module() return an error rather than crashing the
kernel if invoked before module_subsys is initialized.
Cc: Mark Huang <mlhuang@cs.princeton.edu> Cc: Greg KH <greg@kroah.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] cpu to node relationship fixup: acpi_map_cpu2node
Problem description:
We have additional_cpus= option for allocating possible_cpus. But nid
for possible cpus are not fixed at boot time. cpus which is offlined at
boot or cpus which is not on SRAT is not tied to its node. This will
cause panic at cpu onlining.
Usually, pxm_to_nid() mapping is fixed at boot time by SRAT.
But, unfortunately, some system (my system!) do not include
full SRAT table for possible cpus. (Then, I use
additiona_cpus= option.)
For such possible cpus, pxm<->nid should be fixed at
hot-add. We now have acpi_map_pxm_to_node() which is also
used at boot. It's suitable here.
[PATCH] backlight: fix oops in __mutex_lock_slowpath during head /sys/class/graphics/fb0/*
Seems like not all drivers use the framebuffer_alloc() function and won't
have an initialized mutex. But those don't have a backlight, anyway.
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Olaf Hering <olaf@aepfle.de> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Daniel R Thompson <daniel.thompson@st.com> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
keith mannthey [Mon, 25 Sep 2006 23:24:39 +0000 (16:24 -0700)]
[PATCH] i386 bootioremap / kexec fix
With CONFIG_PHYSICAL_START set to a non default values the i386
boot_ioremap code calculated its pte index wrong and users of boot_ioremap
have their areas incorrectly mapped (for me SRAT table not mapped during
early boot). This patch removes the addr < BOOT_PTE_PTRS constraint.
[ Keith says this is applicable to 2.6.16 and 2.6.17 as well ]
Signed-off-by: Keith Mannthey<kmannth@us.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: <stable@kernel.org> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ian Kent [Mon, 25 Sep 2006 23:24:16 +0000 (16:24 -0700)]
[PATCH] autofs4: zero timeout prevents shutdown
If the timeout of an autofs mount is set to zero then umounts are disabled.
This works fine, however the kernel module checks the expire timeout and
goes no further if it is zero. This is not the right thing to do at
shutdown as the module is passed an option to expire mounts regardless of
their timeout setting.
This patch allows autofs to honor the force expire option.
Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Moore [Mon, 25 Sep 2006 22:53:37 +0000 (15:53 -0700)]
[NETLINK]: add nla_for_each_nested() to the interface list
At the top of include/net/netlink.h is a list of Netlink interfaces, however,
the nla_for_each_nested() macro was not listed. This patch adds this interface
to the list at the top of the header file.
Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Moore [Mon, 25 Sep 2006 22:53:13 +0000 (15:53 -0700)]
[NetLabel]: change the SELinux permissions
Change NetLabel to use the 'recvfrom' socket permission and the
SECINITSID_NETMSG SELinux SID as the NetLabel base SID for incoming packets.
This patch effectively makes the old, and currently unused, SELinux NETMSG
permissions NetLabel permissions.
Signed-of-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Moore [Mon, 25 Sep 2006 22:52:37 +0000 (15:52 -0700)]
[NetLabel]: make the CIPSOv4 cache spinlocks bottom half safe
The CIPSOv4 cache traversal routines are triggered both the userspace events
(cache invalidation due to DOI removal or updated SELinux policy) and network
packet processing events. As a result there is a problem with the existing
CIPSOv4 cache spinlocks as they are not bottom-half/softirq safe. This patch
converts the CIPSOv4 cache spin_[un]lock() calls into spin_[un]lock_bh() calls
to address this problem.
Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Moore [Mon, 25 Sep 2006 22:52:01 +0000 (15:52 -0700)]
[NetLabel]: correct improper handling of non-NetLabel peer contexts
Fix a problem where NetLabel would always set the value of
sk_security_struct->peer_sid in selinux_netlbl_sock_graft() to the context of
the socket, causing problems when users would query the context of the
connection. This patch fixes this so that the value in
sk_security_struct->peer_sid is only set when the connection is NetLabel based,
otherwise the value is untouched.
Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Change how default TCP congestion control is chosen. Don't just use
last installed module, instead allow selection during configuration,
and make sure and use the default regardless of load order.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Roland Dreier [Mon, 25 Sep 2006 03:09:33 +0000 (20:09 -0700)]
[ATM] he: Fix __init/__devinit conflict
he_init_one() is declared __devinit, but calls lots of init functions
that are marked __init. However, if CONFIG_HOTPLUG is enabled,
__devinit functions go into normal .text, which leads to
WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2130) and 'he_service_tbrq'
Fix this by changing the __init functions to __devinit.
Signed-off-by: Roland Dreier <roland@digitalvampire.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Matthew Wilcox [Mon, 25 Sep 2006 02:22:52 +0000 (20:22 -0600)]
[PATCH] Revert ABI-breaking change in /proc
Some user tools parse /proc/scsi/scsi, so we can't yet change the names.
Change the existing ones back to their old names, and add an admonition
to not make the same mistake that I did.
Andrew Morton reports that this was breaking YDL 4.1 userspace.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch adds xt_dscp.h and xt_DSCP.h to the kernel headers which are
exported via 'make headers_install'. These are necessary for userspace
to add rules using dscp match and DSCP target.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (28 commits)
ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback
ocfs2: Remove ->unblock lockres operation
ocfs2: move downconvert worker to lockres ops
ocfs2: Remove unused dlmglue functions
ocfs2: Have the metadata lock use generic dlmglue functions
ocfs2: Add ->set_lvb callback in dlmglue
ocfs2: Add ->check_downconvert callback in dlmglue
ocfs2: Check for refreshing locks in generic unblock function
ocfs2: don't unconditionally pass LVB flags
ocfs2: combine inode and generic blocking AST functions
ocfs2: Add ->get_osb() dlmglue locking operation
ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops
ocfs2: combine inode and generic AST functions
ocfs2: Clean up lock resource refresh flags
ocfs2: Remove i_generation from inode lock names
ocfs2: Encode i_generation in the meta data lvb
ocfs2: Free up some space in the lvb
ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
ocfs2: manually d_move() during ocfs2_rename()
[PATCH] Allow file systems to manually d_move() inside of ->rename()
...
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (28 commits)
kbuild: add distclean info to 'make help' and more details for 'clean'
dontdiff: add utsrelease.h
kbuild: fix "mkdir -p" usage in scripts/package/mkspec
kbuild: correct and clarify versioning info in Makefile
kbuild: fixup Documentation/kbuild/modules.txt
kbuild: Extend kbuild/defconfig tags support to exuberant ctags
kbuild: fix for some typos in Documentation/makefiles.txt
kbuild: clarify "make C=" build option
Documentaion: update Documentation/Changes with minimum versions
kbuild: update help in top level Makefile
kbuild: fail kernel compilation in case of unresolved module symbols
kbuild: remove debug left-over from Makefile.host
kbuild: create output directory for hostprogs with O=.. build
kbuild: add missing return statement in modpost.c:secref_whitelist()
kbuild: preperly align SYSMAP output
kbuild: make -rR is now default
kbuild: make V=2 tell why a target is rebuild
kbuild: modpost on vmlinux regardless of CONFIG_MODULES
kbuild: ignore references from ".pci_fixup" to ".init.text"
kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt
...
kbuild: fix "mkdir -p" usage in scripts/package/mkspec
"mkdir -p" does not only mean not to complain if the directory already
exists, but also to create the parent directories if needed. This patch
removes "lib" from the list of directories to create as we will also create
"lib/modules".
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: Extend kbuild/defconfig tags support to exuberant ctags
The following patch extends kbuild/defconfig tags support to exuberant
ctags. The previous support is only for emacs ctags/etags programs.
This patch also corrects the kconfig regex for the emacs invocation.
Previously it would miss some instances because it assumed /^config
instead of /^[ \t]*config
Signed-off-by: Aron Griffis <aron@hp.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: fix for some typos in Documentation/makefiles.txt
I noticed a few typos while reading makefiles.txt to learn about the
kbuild system. Attached is a patch against 2.6.18 to fix them.
Remove trailing whitespace while we are there..
Signed-off-by: Bryce Harrington <bryce@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: fail kernel compilation in case of unresolved module symbols
At stage 2 modpost utility is used to check modules. In case of unresolved
symbols modpost only prints warning.
IMHO it is a good idea to fail compilation process in case of unresolved
symbols (at least in modules coming with kernel), since usually such errors
are left unnoticed, but kernel modules are broken.
- new option '-w' is added to modpost:
if option is specified, modpost only warns about unresolved symbols
- modpost is called with '-w' for external modules in Makefile.modpost
Signed-off-by: Andrey Mirkin <amirkin@sw.ru> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg [Mon, 7 Aug 2006 19:55:33 +0000 (21:55 +0200)]
kbuild: create output directory for hostprogs with O=.. build
hostprogs-y only supported creating output directory for the final
program. Extend this to also cover the situation where a .o
file (used when host program is made from compositie objects) is
locate in another directory.
First user of this is the built-in lxdialog that.
Sam Ravnborg [Tue, 8 Aug 2006 19:35:14 +0000 (21:35 +0200)]
kbuild: make V=2 tell why a target is rebuild
tell why a a target got build
enabled by make V=2
Output (listed in the order they are checked):
(1) - due to target is PHONY
(2) - due to target missing
(3) - due to: file1.h file2.h
(4) - due to command line change
(5) - due to missing .cmd file
(6) - due to target not in $(targets)
(1) We always build PHONY targets
(2) No target, so we better build it
(3) Prerequisite is newer than target
(4) The command line stored in the file named dir/.target.cmd
differed from actual command line. This happens when compiler
options changes
(5) No dir/.target.cmd file (used to store command line)
(6) No dir/.target.cmd file and target not listed in $(targets)
This is a good hint that there is a bug in the kbuild file
This patch is inspired by a patch from: Milton Miller <miltonm@bga.com>
Cc: Milton Miller <miltonm@bga.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg [Tue, 8 Aug 2006 18:43:39 +0000 (20:43 +0200)]
kbuild: modpost on vmlinux regardless of CONFIG_MODULES
Based on patch from: Magnus Damm <magnus@valinux.co.jp>
This has the advantage that all section mismatch checks are run regardless
of modules being enabled or not.
When running modpost on vmlinux output:
MODPOST vmlinux
When running modpost on modules output count of modules like this:
MODPOST 5 modules
Olaf Hering [Wed, 26 Jul 2006 01:42:26 +0000 (18:42 -0700)]
remove RPM_BUILD_ROOT from asm-offsets.h
No file in rpm binary package should have the RPM_BUILD_ROOT string in it.
To simplify building of external modules, our kernel-source package
contains some temp files from the Kbuild system. asm/asm-offsets.h is one
of the files that contains the absolute path if make O=$O is used.
* This file was generated by /var/tmp/kernel-source-2.6.14_rc4-build/usr/src/linux-2.6.14-rc4-2/Kbuild
Remove the $RPM_BUILD_ROOT string in the shipped tempfile.
Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg [Sun, 23 Jul 2006 18:39:59 +0000 (20:39 +0200)]
kbuild: add unifdef
This patch contains a raw copy of unifdef.c
Next patch will modify it and add infrastructure to use it
Adding unifdef to the kernel is acked by the author.
The reason to add unifdef as part of the kernel source is that it is not
yet a common utility on most distributions.