typechecking for get_unaligned/put_unaligned
Subsystems (80)
What kind of typechecking do we want for those?
AFAICS, current constraints are
* {put,get}_unaligned() should be passed a pointer to object; void *
is not acceptable
* sizeof(*ptr) should be one of 1, 2, 4, 8
* assignment of val to *ptr should be valid C.
Questions:
a) do we want all of the above to be enforced on all targets?
b) do we really want to allow use of that when sizeof(*ptr) is 1?
It's almost certainly a sloppy code (and I don't see any instances in the tree), but I might be missing some potentially valid use in macros.
c) how about gradually switching to linux/unaligned.h? In this
case we can do it nicely; start with mutual #include in asm/unaligned.h and linux/unaligned.h (in the beginning of each), then switch users and once they'd been all gone for a while, have asm/unaligned.h contain #ifndef __LINUX_UNALGINED_H__
#error include linux/unaligned.h instead
#endif
instead of
#include <linux/unaligned.h>
d) any objections to having asm/unaligned.h defining
__{get,put}_unaligned{2,4,8} and linux/unaligned.h doing __builtin_choose_expr() to pick the right one? AFAICS, that should not have any bad effects on the generated code and it would allow to put all typechecking in one place. Helpers in question would take pointers to u{16,32,64} and value of the same type. Even the targets doing a simple assignment in all cases would get the same code generated, AFAICS...
Quoted 8 lines · Al Viro
What kind of typechecking do we want for those?
AFAICS, current constraints are
* {put,get}_unaligned() should be passed a pointer to object; void *
is not acceptable
*sizeof(*ptr)should be one of 1, 2, 4, 8
* assignment of val to *ptr should be valid C.
Have we ever really had any problems with this?
I think that as far as typing, we should just make sure that [get|put]_unaligned() has the same behaviour as a dereference. Sure, checking the size might be worth it, but it doesn't sound like we'd actually find any real bugs (ie wrong sizes should just result in compile or link errors on architectures where you need special code for it).
Quoted 1 line
c) how about gradually switching to
linux/unaligned.h?
I'd prefer not to, if only because it's an unnecessary compile-time overhead for nice sane architectures like x86, which don't need any of the unaligned crap.
Since x86[-64] is clearly the main architecture, dis-optimizing for that one sounds like a bad idea.
Linus
Quoted 8 lines · Linus Torvalds
Quoted 1 line
c) how about gradually switching to
linux/unaligned.h?I'd prefer not to, if only because it's an unnecessary compile-time overhead for nice sane architectures like x86, which don't need any of the unaligned crap.
Since x86[-64] is clearly the main architecture, dis-optimizing for that one sounds like a bad idea.
Hrm... I'm not sure that I buy that argument - we have relatively few callers of these suckers and I doubt that it will affect compile time in a measurable way. FWIW, that reminds me - I ought to resurrect the patchset killing bogus dependencies; I modified sparse to collect stats on how many times each #include actually pulls a header during build, added those to data on dependencies (from .cmd.*) and got interesting results.
There are several #includes with very high impact; the worst happens to be module.h -> sched.h, followed by several includes of fs.h. These turned out to be easy to kill (i.e. few places actually needed compensatory #include added) and that had seriously cut down on total dependencies. The patches will need to be redone due to bitrot, but they are not hard to reproduce. The really interesting observation is that such high-impact includes exist and can be found by this technics...
As for get_unaligned() and friends... Dunno. The thing is, most of the targets have them with piss-poor type safety (e.g. asm-generic put_unaligned() starts with casting val to __u64; there goes any chance to get any useful warnings from cc(1) *and* we get fun warnings from sparse every bloody time we use it on __be32, etc.).
I can fix those one by one, but I still think that it would be better to keep the typechecking in one place...
PS: while a few hundreds of callers per allmodconfig build are minor noise in compile time, the noise from a few hundreds of bogus warnings is quite considerable ;-)
Bogus deps checking (was Re: [RFC] typechecking for get_unaligned/put_unaligned)
Quoted 5 lines · Al Viro
FWIW, that reminds me - I ought to resurrect the
patchset killing bogus dependencies; I modified sparse to collect stats on how many times each #include actually pulls a header during build, added those to data on dependencies (from .cmd.*) and got interesting results.
are these modifications publically available? i would be interested to see them. i've been grovelling over the header files with perl...
Quoted 7 lines
There are several #includes with very high impact; the worst happens to be
module.h->sched.h, followed by several includes offs.h. These turned out to be easy to kill (i.e. few places actually needed compensatory #include added) and that had seriously cut down on total dependencies. The patches will need to be redone due to bitrot, but they are not hard to reproduce. The really interesting observation is that such high-impact includes exist and can be found by this technics...
i noticed another potential source of unneccessary dependencies:
<linux/prefetch.h> includes <asm/processor.h> for a total of ~49 dependencies. it appears that the prefetch() concept could be moved into a separate <asm/prefetch.h> file with much smaller dependency footprint, for a pretty hefty reduction in total dependencies throughout the system.
another potential win: a good chunk of <linux/kernel.h> (which has ~24 dependencies) actually has nothing to do with the kernel per se. i'm thinking of basic C language idioms (container_of(), typecheck(), etc) and constants (INT_MAX). a fair number of files seem to include <linux/kernel.h> just for these items. moving that stuff into a separate file (<linux/c.h>?) could eliminate 20 or more bogus deps from many locations.
ray
Quoted 4 lines · Al Viro
Hrm... I'm not sure that I buy that argument - we have relatively few callers of these suckers and I doubt that it will affect compile time in a measurable way.
I was more worried that it's getting included from other include files, and that the overhead is just the compiler front-end, whether used or not.
But you're right, it seems like this is one of the well-behaved header files that isn't unnecessarily included everywhere ;)
So I have no real arguments in that case.
Quoted 4 lines
FWIW, that reminds me - I ought to resurrect the patchset killing bogus dependencies; I modified sparse to collect stats on how many times each #include actually pulls a header during build, added those to data on dependencies (from .cmd.*) and got interesting results.
Yeah, we tend to include a _ton_ of stuff that we probably don't need to.
Linus
dealing with excessive includes
Quoted 6 lines · Linus Torvalds
Quoted 4 lines
FWIW, that reminds me - I ought to resurrect the patchset killing bogus dependencies; I modified sparse to collect stats on how many times each #include actually pulls a header during build, added those to data on dependencies (from .cmd.*) and got interesting results.
Yeah, we tend to include a _ton_ of stuff that we probably don't need to.
See ftp://ftp.linux.org.uk/pub/people/viro/counts for some fun current stats; there I've put the number of files depending on given header (all stats for amd64 allmodconfig). It's too long to post, but here are some observations:
* look at the distribution of headers by the number of
depenendencies; it's very suggestive. We have
10 in range 4360--4369
4 in range 4350--4359
25 in range 4340--4349
31 in range 4330--4339
30 in range 4320--4329
5 in range 4310--4319
55 in range 4300--4309
2 in range 4280--4289
1 in range 3910--3919
2 in range 3900--3909
7 in range 3890--3899
2 in range 3790--3799
1 in range 3780--3789
5 in range 3740--3749
11 in range 3730--3739
2 in range 3300--3309
5 in range 3290--3299
1 in range 3180--3189
Note the huge gaps *and* very high local concentrations. It actually
gets even more impressive if we look in finer details: in range 4300--4309 the distribution is
4305: 37
4306: 2
4307: 6
4308: 13
Now, every widely included header is going to pull a tail in that
distribution; that is expected. However, the large number hitting exact same spot is not. That's where the things get really interesting; let's take a look at the pile at 4305:
4305 include/asm/signal.h 4305 include/asm/siginfo.h 4305 include/asm/sembuf.h 4305 include/asm/seccomp.h 4305 include/asm/resource.h 4305 include/asm/ipcbuf.h 4305 include/asm/cputime.h 4305 include/asm/auxvec.h 4305 include/linux/unistd.h 4305 include/linux/uio.h 4305 include/linux/signal.h 4305 include/linux/sem.h 4305 include/linux/securebits.h 4305 include/linux/seccomp.h 4305 include/linux/sched.h 4305 include/linux/rtmutex.h 4305 include/linux/resource.h 4305 include/linux/rbtree.h 4305 include/linux/pid.h 4305 include/linux/param.h 4305 include/linux/ktime.h 4305 include/linux/ipc.h 4305 include/linux/hrtimer.h 4305 include/linux/futex.h 4305 include/linux/fs_struct.h 4305 include/linux/completion.h 4305 include/linux/capability.h 4305 include/linux/auxvec.h 4305 include/linux/aio_abi.h 4305 include/linux/aio.h 4305 include/asm-generic/signal.h 4305 include/asm-generic/siginfo.h 4305 include/asm-generic/resource.h 4305 include/asm-generic/cputime.h
There is an obvious candidate in creators of that pile: linux/sched.h. It's
(a) very high in distribution and (b) pulls quite a few headers itself.
Now, the next question is how much of that pile is pulled by linux/sched.h. The answer is "all of them". It certainly means that something's badly wrong. In particular, there is not a single C file that would pull signal.h but not sched.h; *all* information about the real use of that signal.h is
drowned. And 4305 is very high; the top of list is 4369 include/asm/types.h 4368 include/linux/compiler.h 4366 include/linux/compiler-gcc4.h 4366 include/linux/compiler-gcc.h 4365 include/asm/linkage.h 4365 include/linux/linkage.h 4361 include/asm/posix_types.h 4361 include/linux/types.h 4361 include/linux/stddef.h 4361 include/linux/posix_types.h
and those are pulled practically by everything.
So which #include is responsible for that mess? Apriori we might just have it directly pulled all over the place. However, the situation turns out to be very different. Top pullers are:
4305 include/linux/futex.h
3918 include/asm/compat.h
3892 include/linux/module.h
3739 include/linux/radix-tree.h
3738 include/linux/fs.h
3295 include/linux/mm.h
3173 include/asm/uaccess.h
2644 include/linux/smp_lock.h
2300 include/linux/interrupt.h
Now, futex.h is simply mutual pull with sched.h. Odd idea, of course, but it doesn't affect the picture unless we have tons of independent pulls of futex.h. Unlikely.
asm/compat.h is curious one. Main puller of that bugger is asm/elf.h. AFAICS, it has no reason whatsoever to pull compat.h, let alone sched.h.
asm/elf.h is a member of a cluster similar to sched.h one. Here it is:
3918 include/asm/compat.h 3906 include/asm/user.h 3902 include/linux/elf-em.h 3895 include/asm/elf.h 3894 include/linux/elf.h 3893 include/linux/moduleparam.h 3892 include/asm/module.h 3892 include/asm/local.h 3892 include/linux/module.h 3892 include/linux/kmod.h
and module.h is the obvious leader (the next above is
4282 include/linux/stat.h
and below we have
3791 include/asm/ioctl.h
). BTW, radix-tree.h is also in a cluster - fs.h one...
So the natural plan of attack would be
* try to kill asm-x86_64/elf.h -> asm-x86_64/compat.h
* try to kill linux/module.h -> linux/sched.h
* see what falls out.
The first one is simply killable. No problems arise from its removal. That drives the count of asm/compat.h from 3918 to 266 (which is already something), but doesn't affect anything else.
module.h is trickier. First of all, we want extern for wake_up_process(). And unlike the first severed include, we *do* have files that need something from sched.h and rely on pulling it implicitly via module.h. Fortunately, there are few of those. For amd64 allmodconfig we only need to touch includes in
arch/i386/kernel/cpu/mcheck/therm_throt.c drivers/hwmon/abituguru.c
drivers/leds/ledtrig-ide-disk.c
drivers/leds/ledtrig-timer.c
drivers/scsi/scsi_transport_sas.c
drivers/w1/slaves/w1_therm.c
include/linux/phy.h
kernel/latency.c
and in almost all cases we are actually missing jiffies.h, not sched.h. However, at that point we really need to look at other targets; they do add several extra places, but again not much. Below is what I've got from my usual mix of cross-builds; for resulting dependeny counts (again, amd64 allmodconfig) see ftp://ftp.linux.org.uk/pub/people/viro/counts-after. Not too bad for a trivial patch, IMO.
The next obvious targets for sched.h are fs.h and mm.h, but that's going to be trickier.
arch/i386/kernel/alternative.c +1 -0
@@ -1,4 +1,5 @@#include <linux/module.h> +#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/list.h> #include <asm/alternative.h>
arch/i386/kernel/cpu/mcheck/therm_throt.c +1 -0
@@ -20,6 +20,7 @@ #include <linux/sysdev.h>#include <linux/cpu.h> #include <asm/cpu.h> #include <linux/notifier.h> +#include <linux/jiffies.h> #include <asm/therm_throt.h> /* How long to wait between reporting thermal events */
drivers/base/cpu.c +1 -0
@@ -5,6 +5,7 @@#include <linux/sysdev.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/cpu.h> #include <linux/topology.h> #include <linux/device.h>
drivers/hwmon/abituguru.c +1 -0
@@ -21,6 +21,7 @@etc voltage & frequency control is not supported! */ #include <linux/module.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/jiffies.h>
drivers/leds/ledtrig-ide-disk.c +1 -0
@@ -12,6 +12,7 @@*/ #include <linux/module.h> +#include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/timer.h>
drivers/leds/ledtrig-timer.c +1 -0
@@ -12,6 +12,7 @@*/ #include <linux/module.h> +#include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/list.h>
drivers/scsi/scsi_transport_sas.c +1 -0
@@ -25,6 +25,7 @@#include <linux/init.h> #include <linux/module.h> +#include <linux/jiffies.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/string.h>
drivers/w1/slaves/w1_therm.c +1 -0
@@ -24,6 +24,7 @@ #include <asm/types.h>#include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/sched.h> #include <linux/device.h> #include <linux/types.h> #include <linux/delay.h>
include/asm-x86_64/elf.h +0 -1
@@ -45,7 +45,6 @@ #define ELF_ARCH EM_X86_64#ifdef __KERNEL__#include <asm/processor.h> -#include <asm/compat.h> /* * This is used to ensure we don't load something for the wrong architecture.
include/linux/acct.h +1 -0
@@ -119,6 +119,7 @@ #ifdef __KERNEL__#ifdef CONFIG_BSD_PROCESS_ACCT struct vfsmount ;struct super_block ; +struct pacct_struct ;extern void acct_auto_close_mnt (struct vfsmount *m);extern void acct_auto_close (struct super_block *sb);extern void acct_init_pacct (struct pacct_struct *pacct);
include/linux/module.h +2 -1
@@ -6,7 +6,6 @@ #define _LINUX_MODULE_H* Rewritten by Richard Henderson <[email protected]> Dec 1996 * Rewritten again by Rusty Russell, 2002 */ -#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/list.h> #include <linux/stat.h>
@@ -410,6 +409,8 @@ static inline int try_module_get(structreturn ret; } +extern int FASTCALL (wake_up_process (struct task_struct * tsk)); +static inline void module_put (struct module *module) {if (module) {
include/linux/phy.h +2 -0
@@ -20,6 +20,8 @@ #define __PHY_H#include <linux/spinlock.h> #include <linux/device.h> +#include <linux/workqueue.h> +#include <linux/timer.h> #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ SUPPORTED_10baseT_Full | \
include/scsi/libiscsi.h +2 -0
@@ -25,6 +25,8 @@ #define LIBISCSI_H#include <linux/types.h> #include <linux/mutex.h> +#include <linux/timer.h> +#include <linux/workqueue.h> #include <scsi/iscsi_proto.h> #include <scsi/iscsi_if.h>
kernel/latency.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/spinlock.h>#include <linux/slab.h> #include <linux/module.h> #include <linux/notifier.h> +#include <linux/jiffies.h> #include <asm/atomic.h> struct latency_info {
kernel/module.c +1 -1
@@ -34,10 +34,10 @@ #include <linux/errno.h>#include <linux/err.h> #include <linux/vermagic.h> #include <linux/notifier.h> +#include <linux/sched.h> #include <linux/stop_machine.h> #include <linux/device.h> #include <linux/string.h> -#include <linux/sched.h> #include <linux/mutex.h> #include <linux/unwind.h> #include <asm/uaccess.h>
Re: dealing with excessive includes
Quoted 1 line
module.his trickier. First of all, we want extern forwake_up_process().
When I came up with this to l-k, Nick and Christoph told me that duplicate proto sucks. So module.h/sched.h is
a) uninline module_put()
b) remove #include <linux/sched.h>
Quoted 37 lines
And unlike the first severed include, we *do* have files that need something from
sched.hand rely on pulling it implicitly viamodule.h. Fortunately, there are few of those. For amd64 allmodconfig we only need to touch includes in
arch/i386/kernel/cpu/mcheck/therm_throt.cdrivers/hwmon/abituguru.c
drivers/leds/ledtrig-ide-disk.c
drivers/leds/ledtrig-timer.c
drivers/scsi/scsi_transport_sas.c
drivers/w1/slaves/w1_therm.c
include/linux/phy.h
kernel/latency.c
and in almost all cases we are actually missingjiffies.h, notsched.h. However, at that point we really need to look at other targets; they do add several extra places, but again not much. Below is what I've got from my usual mix of cross-builds; for resulting dependeny counts (again, amd64 allmodconfig) see ftp://ftp.linux.org.uk/pub/people/viro/counts-after.include/linux/module.h +2
-1@@ -6,7 +6,6 @@ #define _LINUX_MODULE_H* Rewritten by Richard Henderson <[email protected]> Dec 1996 * Rewritten again by Rusty Russell, 2002 */ -#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/list.h> #include <linux/stat.h> @@ -410,6 +409,8 @@ static inline int try_module_get(structreturn ret; } +extern int FASTCALL (wake_up_process (struct task_struct * tsk)); +static inline void module_put (struct module *module) {if (module) {
Re: dealing with excessive includes
Quoted 6 lines · Alexey Dobriyan
Quoted 1 line
module.his trickier. First of all, we want extern forwake_up_process().When I came up with this to l-k, Nick and Christoph told me that duplicate proto sucks. So
module.h/sched.his
a) uninlinemodule_put()
b) remove #include <linux/sched.h>
Works for me... OTOH, wake_up_process() is not likely to change
prototype, so I'm not sure how strong that argument actually is.
Anyway, that patch is obviously preliminary - at the very least
it needs be checked on more configs (and more targets - e.g. mips and parisc hadn't been checked at all). Probably worth putting in -mm for a while, too, or we'll get fun breakage on the next big merge from -mm.
I'm finishing testing of the next one, BTW - fs.h+radix-tree.h ->
sched.h. Again, very preliminary - on some targets in my setup it's still going through the build; current delta follows:
arch/i386/kernel/acpi/cstate.c +1 -0
@@ -11,6 +11,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/acpi.h> #include <linux/cpu.h> +#include <linux/sched.h> #include <acpi/processor.h> #include <asm/acpi.h>
drivers/acpi/dock.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/types.h> #include <linux/notifier.h> +#include <linux/jiffies.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h>
drivers/char/hw_random/core.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/hw_random.h>#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/miscdevice.h> #include <linux/delay.h>
drivers/char/tpm/tpm.h +1 -0
@@ -22,6 +22,7 @@ #include <linux/module.h>#include <linux/pci.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/miscdevice.h> #include <linux/platform_device.h> #include <linux/io.h>
drivers/hwmon/hdaps.c +1 -0
@@ -33,6 +33,7 @@ #include <linux/kernel.h>#include <linux/module.h> #include <linux/timer.h> #include <linux/dmi.h> +#include <linux/jiffies.h> #include <asm/io.h> #define HDAPS_LOW_PORT 0x1600/* first port used by hdaps */
drivers/spi/spi_butterfly.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/delay.h>#include <linux/platform_device.h> #include <linux/parport.h> +#include <linux/sched.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> #include <linux/spi/flash.h>
fs/9p/conv.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include <asm/uaccess.h> #include "debug.h"
fs/9p/fcall.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/fid.c +1 -0
@@ -23,6 +23,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/v9fs.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/parser.h> #include <linux/idr.h>
fs/9p/vfs_dir.c +1 -0
@@ -30,6 +30,7 @@ #include <linux/file.h>#include <linux/stat.h> #include <linux/string.h> #include <linux/smp_lock.h> +#include <linux/sched.h> #include <linux/inet.h> #include <linux/idr.h>
fs/9p/vfs_file.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/file.h> #include <linux/stat.h> #include <linux/string.h>
fs/inotify.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/spinlock.h>#include <linux/idr.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/list.h> #include <linux/writeback.h>
fs/jffs2/acl.c +1 -0
@@ -11,6 +11,7 @@#include <linux/kernel.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/time.h> #include <linux/crc32.h> #include <linux/jffs2.h>
fs/jffs2/wbuf.c +1 -0
@@ -19,6 +19,7 @@ #include <linux/mtd/mtd.h>#include <linux/crc32.h> #include <linux/mtd/nand.h> #include <linux/jiffies.h> +#include <linux/sched.h> #include "nodelist.h"
fs/jfs/ioctl.c +1 -0
@@ -9,6 +9,7 @@ #include <linux/fs.h>#include <linux/ctype.h> #include <linux/capability.h> #include <linux/time.h> +#include <linux/sched.h> #include <asm/current.h> #include <asm/uaccess.h>
fs/sync.c +1 -0
@@ -6,6 +6,7 @@ #include <linux/kernel.h>#include <linux/file.h> #include <linux/fs.h> #include <linux/module.h> +#include <linux/sched.h> #include <linux/writeback.h> #include <linux/syscalls.h> #include <linux/linkage.h>
fs/utimes.c +1 -0
@@ -2,6 +2,7 @@ #include <linux/compiler.h>#include <linux/fs.h> #include <linux/linkage.h> #include <linux/namei.h> +#include <linux/sched.h> #include <linux/utime.h> #include <asm/uaccess.h> #include <asm/unistd.h>
include/linux/fs.h +15 -27
58 lines not on this page · raw message
include/linux/radix-tree.h +0 -1
@@ -19,7 +19,6 @@#ifndef _LINUX_RADIX_TREE_H#define _LINUX_RADIX_TREE_H -#include <linux/sched.h> #include <linux/preempt.h> #include <linux/types.h>
Re: dealing with excessive includes
Quoted 10 lines · Al Viro
Quoted 6 lines · Alexey Dobriyan
Quoted 1 line
module.his trickier. First of all, we want extern forwake_up_process().When I came up with this to l-k, Nick and Christoph told me that duplicate proto sucks. So
module.h/sched.his
a) uninlinemodule_put()
b) remove #include <linux/sched.h>Works for me... OTOH,
wake_up_process()is not likely to change
prototype, so I'm not sure how strong that argument actually is.
Actually, it's pretty good argument. module_put() is not on hot paths and duplicate prototypes tend to diverge.
Quoted 3 lines
Anyway, that patch is obviously preliminary - at the very least
it needs be checked on more configs (and more targets - e.g. mips and parisc hadn't been checked at all).
configs. Is ftp://ftp.linux.org.uk/pub/people/viro/config/ still
relevant? Or can you just post ls $CONFIGDIR ?
Re: dealing with excessive includes
Quoted 6 lines · Alexey Dobriyan
Quoted 3 lines
Anyway, that patch is obviously preliminary - at the very least
it needs be checked on more configs (and more targets - e.g. mips and parisc hadn't been checked at all).configs. Is ftp://ftp.linux.org.uk/pub/people/viro/config/ still relevant?
Updated. Changes since the last time:
ARCH=ppc targets dropped
a couple of weird ones (sun3 and sun4 ;-) added drift in Kconfig required more explicit option disabling in some
cases
Re: dealing with excessive includes
Quoted 9 lines · Al Viro
Quoted 6 lines · Alexey Dobriyan
Quoted 3 lines
Anyway, that patch is obviously preliminary - at the very least
it needs be checked on more configs (and more targets - e.g. mips and parisc hadn't been checked at all).configs. Is ftp://ftp.linux.org.uk/pub/people/viro/config/ still relevant?
Updated.
Thank you!
This is needed on parisc when sched.h is going out of module.h
lib/random32.c:119: error: `jiffies' undeclared (first use in this function)
lib/random32.c +1 -0
@@ -37,6 +37,7 @@ #include <linux/types.h>#include <linux/percpu.h> #include <linux/module.h> #include <linux/random.h> +#include <linux/jiffies.h> struct rnd_state {u32 s1, s2, s3;
Re: dealing with excessive includes
In reply to Al Viroinclude/linux/fs.h enum { · line 984
Quoted 6 lines · Al Viro
include/linux/fs.h +5
-0+#define lock_super (x) do { \ + struct super_block *sb = x; \ + get_fs_excl(); \ + mutex_lock(&sb->s_lock); \ +} while(0)
Don't do this. The "x" passed in may be "sb", and then you end up with bogus code.
I think the solution to these kinds of things is either
- just bite the bullet, and make it out-of-line. A function call isn't that expensive, and is sometimes actually cheaper due to I$ issues.
- have a separate trivial header file, and only include it for people who actually need these things (very few files, actually - it's usually just one file per filesystem)
In this case, since it's _so_ simple, and since it's _so_ specialized, I think #2 is the right one. Normally, uninlining would be.
Linus
Re: dealing with excessive includes
Quoted 10 lines · Linus Torvalds
include/linux/fs.h enum { · line 984
Quoted 6 lines · Al Viro
include/linux/fs.h +5
-0+#define lock_super (x) do { \ + struct super_block *sb = x; \ + get_fs_excl(); \ + mutex_lock(&sb->s_lock); \ +} while(0)Don't do this. The "x" passed in may be "sb", and then you end up with bogus code.
For this one, I see a third way:
#define lock_super(sb) do { \
get_fs_excl(); \
mutex_lock(&(sb)->s_lock); \
} while (0)It does have the disadvantage that you can pass *anything* that has an s_lock field in ... but I don't think that's a very likely thing to happen.
Or you could use _sb as the local variable, since it's a reserved identifier.
Re: dealing with excessive includes
In reply to Linus TorvaldsQuoted 4 lines · Linus Torvalds
Quoted 1 line · Al Viro
Quoted 8 lines
include/linux/fs.h enum { · line 984
Quoted 5 lines
include/linux/fs.h +5
-0+#define lock_super (x) do { \ + struct super_block *sb = x; \ + get_fs_excl(); \ + mutex_lock(&sb->s_lock); \ +} while(0)Don't do this. The "x" passed in may be "sb", and then you end up with bogus code.
*duh*
Quoted 9 lines
I think the solution to these kinds of things is either
- just bite the bullet, and make it out-of-line. A function call isn't that expensive, and is sometimes actually cheaper due to I$ issues.
- have a separate trivial header file, and only include it for people who actually need these things (very few files, actually - it's usually just one file per filesystem)In this case, since it's _so_ simple, and since it's _so_ specialized, I think #2 is the right one. Normally, uninlining would be.
Actually, after reading that code I suspect that get_fs_excl() in there is the wrong thing to do. Why? Because the logics is all wrong.
Look what we do under lock_super(). There are two things: ->remount_fs() and ->write_super(). Plus whatever low-level filesystems are using lock_super() for.
I would argue that we want to move get_fs_excl() down to the places in ->write_super() that actually want to do something deserving it. And to be honest, I'm not at all sure that lock_super() should survive at upper layers, but that's a longer story...
Re: dealing with excessive includes
Quoted 7 lines · Al Viro
Actually, after reading that code I suspect that
get_fs_excl()in there is the wrong thing to do. Why? Because the logics is all wrong.Look what we do under
lock_super(). There are two things: ->remount_fs() and ->write_super(). Plus whatever low-level filesystems are usinglock_super()for.
I think this all boils down to the fact that "lock_super()" really is a very old and broken interface. It pretty much harks back to the original filesystem code, and yes, every "lock_super()" _should_ probably be replaced by a lower-level lock.
I think ext2 was already fixed to use its own spinlocks for bitmap accesses, although it looks like somebody re-introduced "lock_super()" there for xattr handling.
[ Which in turn is probably just a bug, since nothing else uses it, so
having a single lock_user() in all of ext2 is almost certainly totally pointless - there is nothing that it actually _protects_ against. I guess it protects against "sync()", but that's pretty much it. ]
That said, I'd rather do any lock_super() cleanup totally _independently_ of a include file cleanup.
So since it's clearly not performance-critical, how about just making it be out-of-line in fs/super.c, and turn the header file into just a declaration?
Linus
Re: dealing with excessive includes
Quoted 4 lines · Linus Torvalds
[ Which in turn is probably just a bug, since nothing else uses it, so
having a singlelock_user()in all of ext2 is almost certainly totally pointless - there is nothing that it actually _protects_ against. I guess it protects against "sync()", but that's pretty much it. ]
My guess would be "remount". Still bogus...
Quoted 2 lines
That said, I'd rather do any
lock_super()cleanup totally _independently_ of a include file cleanup.
Oh, definitely.
Quoted 3 lines
So since it's clearly not performance-critical, how about just making it be out-of-line in
fs/super.c, and turn the header file into just a declaration?
Yup. OK, here's the latest radix-tree.h+fs.h patch; still fairly small. Deps counts after it are on ftp.linux.org.uk/pub/people/viro/counts-after2
arch/i386/kernel/acpi/cstate.c +1 -0
@@ -11,6 +11,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/acpi.h> #include <linux/cpu.h> +#include <linux/sched.h> #include <acpi/processor.h> #include <asm/acpi.h>
drivers/acpi/dock.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/types.h> #include <linux/notifier.h> +#include <linux/jiffies.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h>
drivers/char/hw_random/core.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/hw_random.h>#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/miscdevice.h> #include <linux/delay.h>
drivers/char/tpm/tpm.h +1 -0
@@ -22,6 +22,7 @@ #include <linux/module.h>#include <linux/pci.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/miscdevice.h> #include <linux/platform_device.h> #include <linux/io.h>
drivers/hwmon/hdaps.c +1 -0
@@ -33,6 +33,7 @@ #include <linux/kernel.h>#include <linux/module.h> #include <linux/timer.h> #include <linux/dmi.h> +#include <linux/jiffies.h> #include <asm/io.h> #define HDAPS_LOW_PORT 0x1600/* first port used by hdaps */
drivers/spi/spi_butterfly.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/delay.h>#include <linux/platform_device.h> #include <linux/parport.h> +#include <linux/sched.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> #include <linux/spi/flash.h>
fs/9p/conv.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include <asm/uaccess.h> #include "debug.h"
fs/9p/fcall.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/fid.c +1 -0
@@ -23,6 +23,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/v9fs.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/parser.h> #include <linux/idr.h>
fs/9p/vfs_dir.c +1 -0
@@ -30,6 +30,7 @@ #include <linux/file.h>#include <linux/stat.h> #include <linux/string.h> #include <linux/smp_lock.h> +#include <linux/sched.h> #include <linux/inet.h> #include <linux/idr.h>
fs/9p/vfs_file.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/file.h> #include <linux/stat.h> #include <linux/string.h>
fs/inotify.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/spinlock.h>#include <linux/idr.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/list.h> #include <linux/writeback.h>
fs/jffs2/acl.c +1 -0
@@ -11,6 +11,7 @@#include <linux/kernel.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/time.h> #include <linux/crc32.h> #include <linux/jffs2.h>
fs/jffs2/wbuf.c +1 -0
@@ -19,6 +19,7 @@ #include <linux/mtd/mtd.h>#include <linux/crc32.h> #include <linux/mtd/nand.h> #include <linux/jiffies.h> +#include <linux/sched.h> #include "nodelist.h"
fs/jfs/ioctl.c +1 -0
@@ -9,6 +9,7 @@ #include <linux/fs.h>#include <linux/ctype.h> #include <linux/capability.h> #include <linux/time.h> +#include <linux/sched.h> #include <asm/current.h> #include <asm/uaccess.h>
fs/proc/root.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/time.h>#include <linux/proc_fs.h> #include <linux/stat.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/module.h> #include <linux/bitops.h> #include <linux/smp_lock.h>
fs/super.c +18 -0
@@ -221,6 +221,24 @@ static int grab_super(struct super_block }/* +* Superblock locking. We really ought to get rid of these two. +*/ +void lock_super (struct super_block * sb) +{ +get_fs_excl (); +mutex_lock (&sb->s_lock); +} + +void unlock_super (struct super_block * sb) +{ +put_fs_excl (); +mutex_unlock (&sb->s_lock); +} + +EXPORT_SYMBOL (lock_super); +EXPORT_SYMBOL (unlock_super); + +/* * Write out and wait upon all dirty data associated with this * superblock. Filesystem data as well as the underlying block * device. Takes the superblock lock. Requires a second blkdev
fs/sync.c +1 -0
@@ -6,6 +6,7 @@ #include <linux/kernel.h>#include <linux/file.h> #include <linux/fs.h> #include <linux/module.h> +#include <linux/sched.h> #include <linux/writeback.h> #include <linux/syscalls.h> #include <linux/linkage.h>
fs/utimes.c +1 -0
@@ -2,6 +2,7 @@ #include <linux/compiler.h>#include <linux/fs.h> #include <linux/linkage.h> #include <linux/namei.h> +#include <linux/sched.h> #include <linux/utime.h> #include <asm/uaccess.h> #include <asm/unistd.h>
include/linux/fs.h +7 -30
@@ -276,7 +276,7 @@ #include <linux/list.h>#include <linux/radix-tree.h> #include <linux/prio_tree.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/pid.h> #include <linux/mutex.h> #include <asm/atomic.h>
@@ -970,36 +970,13 @@ enum {#define vfs_check_frozen (sb, level) \ wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) -static inline void get_fs_excl (void ) -{ -atomic_inc (¤t->fs_excl); -} - -static inline void put_fs_excl (void ) -{ -atomic_dec (¤t->fs_excl); -} - -static inline int has_fs_excl (void ) -{ -return atomic_read (¤t->fs_excl); -} +#define get_fs_excl () atomic_inc(¤t->fs_excl) +#define put_fs_excl () atomic_dec(¤t->fs_excl) +#define has_fs_excl () atomic_read(¤t->fs_excl) - -/* -* Superblock locking. -*/ -static inline void lock_super (struct super_block * sb) -{ -get_fs_excl (); -mutex_lock (&sb->s_lock); -} - -static inline void unlock_super (struct super_block * sb) -{ -put_fs_excl (); -mutex_unlock (&sb->s_lock); -} +/* not quite ready to be deprecated, but... */ +extern void lock_super (struct super_block *); +extern void unlock_super (struct super_block *);/* * VFS helper functions..
include/linux/radix-tree.h +0 -1
@@ -19,7 +19,6 @@#ifndef _LINUX_RADIX_TREE_H#define _LINUX_RADIX_TREE_H -#include <linux/sched.h> #include <linux/preempt.h> #include <linux/types.h>
Re: dealing with excessive includes
In reply to Linus TorvaldsQuoted 6 lines · Linus Torvalds
That said, I'd rather do any
lock_super()cleanup totally _independently_ of a include file cleanup.So since it's clearly not performance-critical, how about just making it be out-of-line in
fs/super.c, and turn the header file into just a declaration?
Next fun question on strategy: we have a very good bunch of candidates on killable includes in skbuff.h - highmem.h, mm.h and poll.h. I've done preliminary variants on amd64 and they give nice reductions of deps counts with small patches. The tricky part is a couple of helpers - k{un,}map_skb_frag(). They require highmem.h; nothing else in skbuff.h does. Only two places are using them - net/core/skbuff.c and net/appletalk/ddp.c (the latter in one function - dealing with Apple's take on checksums[1]).
Possible variants:
* turn into macros. Works for a test run, not nice for final
variant.
* new header just for those two in include/net
* new header in net/core, with ddp.c including ../core/skb_kmap.h
* inline in net/core/skbuff.h, extern in ddp.c; then normal paths
get it inlined and appletalk can live with uninlined version.
Preferences?
[1] appletalk: the proof that Vogon neuroanatomy was not entirely fictional.
Re: dealing with excessive includes
In reply to Linus TorvaldsQuoted 3 lines · Linus Torvalds
I think ext2 was already fixed to use its own spinlocks for bitmap accesses, although it looks like somebody re-introduced "
lock_super()" there for xattr handling.
I'll send a cleanup patch for that.
Thanks,
Andreas
Re: dealing with excessive includes
In reply to Linus TorvaldsQuoted 8 lines · Linus Torvalds
guess it protects against "
sync()", but that's pretty much it. ]That said, I'd rather do any
lock_super()cleanup totally _independently_ of a include file cleanup.So since it's clearly not performance-critical, how about just making it be out-of-line in
fs/super.c, and turn the header file into just a declaration?
Done. Several more in followups.
--- arch/i386/kernel/acpi/cstate.c | 1 + drivers/acpi/dock.c | 1 + drivers/char/hw_random/core.c | 1 + drivers/char/tpm/tpm.h | 1 + drivers/hwmon/hdaps.c | 1 + drivers/spi/spi_butterfly.c | 1 + fs/9p/conv.c | 1 + fs/9p/fcall.c | 1 + fs/9p/fid.c | 1 + fs/9p/v9fs.c | 1 + fs/9p/vfs_dir.c | 1 + fs/9p/vfs_file.c | 1 + fs/inotify.c | 1 + fs/jffs2/acl.c | 1 + fs/jffs2/wbuf.c | 1 + fs/jfs/ioctl.c | 1 + fs/proc/root.c | 1 + fs/super.c | 18 ++++++++++++++++++ fs/sync.c | 1 + fs/utimes.c | 1 + include/linux/fs.h | 37 +++++++------------------------------ include/linux/radix-tree.h | 1 - 22 files changed, 44 insertions(+), 31 deletions(-)
arch/i386/kernel/acpi/cstate.c +1 -0
@@ -11,6 +11,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/acpi.h> #include <linux/cpu.h> +#include <linux/sched.h> #include <acpi/processor.h> #include <asm/acpi.h>
drivers/acpi/dock.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/types.h> #include <linux/notifier.h> +#include <linux/jiffies.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h>
drivers/char/hw_random/core.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/hw_random.h>#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/miscdevice.h> #include <linux/delay.h>
drivers/char/tpm/tpm.h +1 -0
@@ -22,6 +22,7 @@ #include <linux/module.h>#include <linux/pci.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/miscdevice.h> #include <linux/platform_device.h> #include <linux/io.h>
drivers/hwmon/hdaps.c +1 -0
@@ -33,6 +33,7 @@ #include <linux/kernel.h>#include <linux/module.h> #include <linux/timer.h> #include <linux/dmi.h> +#include <linux/jiffies.h> #include <asm/io.h> #define HDAPS_LOW_PORT 0x1600/* first port used by hdaps */
drivers/spi/spi_butterfly.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/delay.h>#include <linux/platform_device.h> #include <linux/parport.h> +#include <linux/sched.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> #include <linux/spi/flash.h>
fs/9p/conv.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include <asm/uaccess.h> #include "debug.h"
fs/9p/fcall.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/fid.c +1 -0
@@ -23,6 +23,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/idr.h> #include "debug.h"
fs/9p/v9fs.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/parser.h> #include <linux/idr.h>
fs/9p/vfs_dir.c +1 -0
@@ -30,6 +30,7 @@ #include <linux/file.h>#include <linux/stat.h> #include <linux/string.h> #include <linux/smp_lock.h> +#include <linux/sched.h> #include <linux/inet.h> #include <linux/idr.h>
fs/9p/vfs_file.c +1 -0
@@ -26,6 +26,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/file.h> #include <linux/stat.h> #include <linux/string.h>
fs/inotify.c +1 -0
@@ -27,6 +27,7 @@ #include <linux/spinlock.h>#include <linux/idr.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/init.h> #include <linux/list.h> #include <linux/writeback.h>
fs/jffs2/acl.c +1 -0
@@ -11,6 +11,7 @@#include <linux/kernel.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/sched.h> #include <linux/time.h> #include <linux/crc32.h> #include <linux/jffs2.h>
fs/jffs2/wbuf.c +1 -0
@@ -19,6 +19,7 @@ #include <linux/mtd/mtd.h>#include <linux/crc32.h> #include <linux/mtd/nand.h> #include <linux/jiffies.h> +#include <linux/sched.h> #include "nodelist.h"
fs/jfs/ioctl.c +1 -0
@@ -9,6 +9,7 @@ #include <linux/fs.h>#include <linux/ctype.h> #include <linux/capability.h> #include <linux/time.h> +#include <linux/sched.h> #include <asm/current.h> #include <asm/uaccess.h>
fs/proc/root.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/time.h>#include <linux/proc_fs.h> #include <linux/stat.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/module.h> #include <linux/bitops.h> #include <linux/smp_lock.h>
fs/super.c +18 -0
@@ -221,6 +221,24 @@ static int grab_super(struct super_block }/* +* Superblock locking. We really ought to get rid of these two. +*/ +void lock_super (struct super_block * sb) +{ +get_fs_excl (); +mutex_lock (&sb->s_lock); +} + +void unlock_super (struct super_block * sb) +{ +put_fs_excl (); +mutex_unlock (&sb->s_lock); +} + +EXPORT_SYMBOL (lock_super); +EXPORT_SYMBOL (unlock_super); + +/* * Write out and wait upon all dirty data associated with this * superblock. Filesystem data as well as the underlying block * device. Takes the superblock lock. Requires a second blkdev
fs/sync.c +1 -0
@@ -6,6 +6,7 @@ #include <linux/kernel.h>#include <linux/file.h> #include <linux/fs.h> #include <linux/module.h> +#include <linux/sched.h> #include <linux/writeback.h> #include <linux/syscalls.h> #include <linux/linkage.h>
fs/utimes.c +1 -0
@@ -2,6 +2,7 @@ #include <linux/compiler.h>#include <linux/fs.h> #include <linux/linkage.h> #include <linux/namei.h> +#include <linux/sched.h> #include <linux/utime.h> #include <asm/uaccess.h> #include <asm/unistd.h>
include/linux/fs.h +7 -30
@@ -276,7 +276,7 @@ #include <linux/list.h>#include <linux/radix-tree.h> #include <linux/prio_tree.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/pid.h> #include <linux/mutex.h> #include <asm/atomic.h>
@@ -970,36 +970,13 @@ enum {#define vfs_check_frozen (sb, level) \ wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) -static inline void get_fs_excl (void ) -{ -atomic_inc (¤t->fs_excl); -} - -static inline void put_fs_excl (void ) -{ -atomic_dec (¤t->fs_excl); -} - -static inline int has_fs_excl (void ) -{ -return atomic_read (¤t->fs_excl); -} +#define get_fs_excl () atomic_inc(¤t->fs_excl) +#define put_fs_excl () atomic_dec(¤t->fs_excl) +#define has_fs_excl () atomic_read(¤t->fs_excl) - -/* -* Superblock locking. -*/ -static inline void lock_super (struct super_block * sb) -{ -get_fs_excl (); -mutex_lock (&sb->s_lock); -} - -static inline void unlock_super (struct super_block * sb) -{ -put_fs_excl (); -mutex_unlock (&sb->s_lock); -} +/* not quite ready to be deprecated, but... */ +extern void lock_super (struct super_block *); +extern void unlock_super (struct super_block *);/* * VFS helper functions..
include/linux/radix-tree.h +0 -1
@@ -19,7 +19,6 @@#ifndef _LINUX_RADIX_TREE_H#define _LINUX_RADIX_TREE_H -#include <linux/sched.h> #include <linux/preempt.h> #include <linux/types.h>
Signature · 1 line
1.4.2.GIT
Re: dealing with excessive includes
That's just a dead weight these days
--- include/asm-x86_64/uaccess.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
include/asm-x86_64/uaccess.h +0 -1
@@ -6,7 +6,6 @@ #define __X86_64_UACCESS_H*/ #include <linux/compiler.h> #include <linux/errno.h> -#include <linux/sched.h> #include <linux/prefetch.h> #include <asm/page.h>
Signature · 1 line
1.4.2.GIT
Re: dealing with excessive includes
Quoted 1 line · Al Viro
That's just a dead weight these days
Agreed.
arch/parisc/kernel/unwind.c +1 -0
@@ -10,6 +10,7 @@#include <linux/kernel.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/slab.h> #include <linux/kallsyms.h>
include/asm-parisc/uaccess.h +0 -1
@@ -4,7 +4,6 @@ #define __PARISC_UACCESS_H/* * User space memory access functions */ -#include <linux/sched.h> #include <asm/page.h> #include <asm/system.h> #include <asm/cache.h>
Re: dealing with excessive includes
In reply to Al ViroMore interesting: skbuff -> highmem. That's a preliminary patch, needs testing on more targets.
--- drivers/infiniband/ulp/iser/iser_memory.c | 1 + drivers/net/sun3lance.c | 1 + fs/compat.c | 1 + include/linux/skbuff.h | 19 ------------------- kernel/auditsc.c | 1 + net/appletalk/ddp.c | 1 + net/core/kmap_skb.h | 19 +++++++++++++++++++ net/core/skbuff.c | 3 ++- net/core/sock.c | 1 + net/ipv4/ip_output.c | 1 + net/packet/af_packet.c | 1 + 11 files changed, 29 insertions(+), 20 deletions(-)
drivers/infiniband/ulp/iser/iser_memory.c +1 -0
@@ -35,6 +35,7 @@ #include <linux/module.h>#include <linux/kernel.h> #include <linux/slab.h> #include <linux/mm.h> +#include <linux/highmem.h> #include <asm/io.h> #include <asm/scatterlist.h> #include <linux/scatterlist.h>
drivers/net/sun3lance.c +1 -0
@@ -38,6 +38,7 @@ #include <linux/etherdevice.h>#include <linux/skbuff.h> #include <linux/bitops.h> +#include <asm/cacheflush.h> #include <asm/setup.h> #include <asm/irq.h> #include <asm/io.h>
fs/compat.c +1 -0
@@ -45,6 +45,7 @@ #include <linux/nfsd/syscall.h>#include <linux/personality.h> #include <linux/rwsem.h> #include <linux/tsacct_kern.h> +#include <linux/highmem.h> #include <linux/mm.h> #include <net/sock.h> /* siocdevprivate_ioctl */
include/linux/skbuff.h +0 -19
@@ -23,7 +23,6 @@ #include <asm/atomic.h>#include <asm/types.h> #include <linux/spinlock.h> #include <linux/mm.h> -#include <linux/highmem.h> #include <linux/poll.h> #include <linux/net.h> #include <linux/textsearch.h>
@@ -1293,24 +1292,6 @@ static inline int pskb_trim_rcsum(structreturn __pskb_trim (skb, len); } -static inline void *kmap_skb_frag (const skb_frag_t *frag) -{ -#ifdef CONFIG_HIGHMEM -BUG_ON (in_irq ()); - -local_bh_disable (); -#endif -return kmap_atomic (frag->page,KM_SKB_DATA_SOFTIRQ ); -} - -static inline void kunmap_skb_frag (void *vaddr) -{ -kunmap_atomic (vaddr,KM_SKB_DATA_SOFTIRQ ); -#ifdef CONFIG_HIGHMEM -local_bh_enable (); -#endif -} -#define skb_queue_walk (queue, skb) \ for (skb = (queue)->next; \ prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
kernel/auditsc.c +1 -0
@@ -64,6 +64,7 @@ #include <linux/list.h>#include <linux/tty.h> #include <linux/selinux.h> #include <linux/binfmts.h> +#include <linux/highmem.h> #include <linux/syscalls.h> #include "audit.h"
net/appletalk/ddp.c +1 -0
@@ -61,6 +61,7 @@ #include <net/sock.h>#include <net/tcp_states.h> #include <net/route.h> #include <linux/atalk.h> +#include "../core/kmap_skb.h" struct datalink_proto *ddp_dl, *aarp_dl;static const struct proto_ops atalk_dgram_ops;
net/core/kmap_skb.h new file +19 -0
@@ -0,0 +1,19 @@ +#include <linux/highmem.h> + +static inline void *kmap_skb_frag (const skb_frag_t *frag) +{ +#ifdef CONFIG_HIGHMEM +BUG_ON (in_irq ()); + +local_bh_disable (); +#endif +return kmap_atomic (frag->page,KM_SKB_DATA_SOFTIRQ ); +} + +static inline void kunmap_skb_frag (void *vaddr) +{ +kunmap_atomic (vaddr,KM_SKB_DATA_SOFTIRQ ); +#ifdef CONFIG_HIGHMEM +local_bh_enable (); +#endif +}
net/core/skbuff.c +2 -1
@@ -56,7 +56,6 @@ #include <linux/skbuff.h>#include <linux/cache.h> #include <linux/rtnetlink.h> #include <linux/init.h> -#include <linux/highmem.h> #include <net/protocol.h> #include <net/dst.h>
@@ -67,6 +66,8 @@ #include <net/xfrm.h>#include <asm/uaccess.h> #include <asm/system.h> +#include "kmap_skb.h" +static kmem_cache_t *skbuff_head_cache__read_mostly ;static kmem_cache_t *skbuff_fclone_cache__read_mostly ;
net/core/sock.c +1 -0
@@ -111,6 +111,7 @@ #include <linux/interrupt.h>#include <linux/poll.h> #include <linux/tcp.h> #include <linux/init.h> +#include <linux/highmem.h> #include <asm/uaccess.h> #include <asm/system.h>
net/ipv4/ip_output.c +1 -0
@@ -53,6 +53,7 @@ #include <linux/sched.h>#include <linux/mm.h> #include <linux/string.h> #include <linux/errno.h> +#include <linux/highmem.h> #include <linux/socket.h> #include <linux/sockios.h>
net/packet/af_packet.c +1 -0
@@ -71,6 +71,7 @@ #include <asm/system.h>#include <asm/uaccess.h> #include <asm/ioctls.h> #include <asm/page.h> +#include <asm/cacheflush.h> #include <asm/io.h> #include <linux/proc_fs.h> #include <linux/seq_file.h>
Signature · 1 line
1.4.2.GIT
Re: dealing with excessive includes
In reply to Al ViroAnother preliminary: skbuff -> poll
--- fs/compat.c | 1 + fs/gfs2/locking/dlm/plock.c | 1 + include/linux/skbuff.h | 1 - include/net/inet_connection_sock.h | 1 + include/net/udp.h | 1 + 5 files changed, 4 insertions(+), 1 deletions(-)
fs/compat.c +1 -0
@@ -46,6 +46,7 @@ #include <linux/personality.h>#include <linux/rwsem.h> #include <linux/tsacct_kern.h> #include <linux/highmem.h> +#include <linux/poll.h> #include <linux/mm.h> #include <net/sock.h> /* siocdevprivate_ioctl */
fs/gfs2/locking/dlm/plock.c +1 -0
@@ -8,6 +8,7 @@#include <linux/miscdevice.h> #include <linux/lock_dlm_plock.h> +#include <linux/poll.h> #include "lock_dlm.h"
include/linux/skbuff.h +0 -1
@@ -23,7 +23,6 @@ #include <asm/atomic.h>#include <asm/types.h> #include <linux/spinlock.h> #include <linux/mm.h> -#include <linux/poll.h> #include <linux/net.h> #include <linux/textsearch.h> #include <net/checksum.h>
include/net/inet_connection_sock.h +1 -0
@@ -18,6 +18,7 @@ #define _INET_CONNECTION_SOCK_H#include <linux/compiler.h> #include <linux/string.h> #include <linux/timer.h> +#include <linux/poll.h> #include <net/inet_sock.h> #include <net/request_sock.h>
include/net/udp.h +1 -0
@@ -27,6 +27,7 @@ #include <net/inet_sock.h>#include <net/sock.h> #include <net/snmp.h> #include <linux/seq_file.h> +#include <linux/poll.h> #define UDP_HTABLE_SIZE 128
Signature · 1 line
1.4.2.GIT
Re: dealing with excessive includes
In reply to Al ViroAnd one more preliminary: skbuff -> mm. New stats on ftp.linux.org.uk/pub/people/viro/counts-after3; note reductions for sched.h, fs.h and mm.h clusters.
--- drivers/isdn/divert/isdn_divert.c | 2 ++ drivers/net/ehea/ehea_qmr.c | 1 + drivers/net/lance.c | 1 + drivers/net/ne3210.c | 1 + drivers/net/sk98lin/skge.c | 2 ++ drivers/net/starfire.c | 1 + drivers/net/sungem.c | 1 + drivers/net/sunhme.c | 1 + drivers/net/typhoon.c | 1 + include/linux/igmp.h | 1 + include/linux/kernelcapi.h | 1 + include/linux/netdevice.h | 1 + include/linux/netfilter_ipv4/ip_conntrack.h | 1 + include/linux/skbuff.h | 1 - include/net/irda/timer.h | 1 + include/net/netlink.h | 1 + include/net/sock.h | 1 + net/ieee80211/ieee80211_crypt_tkip.c | 1 + net/ieee80211/ieee80211_crypt_wep.c | 1 + net/ipv4/ipvs/ip_vs_lblc.c | 1 + net/ipv4/ipvs/ip_vs_lblcr.c | 1 + net/ipv4/netfilter/ipt_hashlimit.c | 1 + net/irda/discovery.c | 1 + net/irda/iriap.c | 1 + net/irda/irttp.c | 1 + net/netfilter/x_tables.c | 1 + 26 files changed, 27 insertions(+), 1 deletions(-)
drivers/isdn/divert/isdn_divert.c +2 -0
@@ -10,6 +10,8 @@*/ #include <linux/proc_fs.h> +#include <linux/timer.h> +#include <linux/jiffies.h> #include "isdn_divert.h"
drivers/net/ehea/ehea_qmr.c +1 -0
@@ -26,6 +26,7 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/mm.h> #include "ehea.h" #include "ehea_phyp.h" #include "ehea_qmr.h"
drivers/net/lance.c +1 -0
@@ -57,6 +57,7 @@ #include <linux/init.h>#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> +#include <linux/mm.h> #include <linux/bitops.h> #include <asm/io.h>
drivers/net/ne3210.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/init.h>#include <linux/interrupt.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> +#include <linux/mm.h> #include <asm/io.h> #include <asm/system.h>
drivers/net/sk98lin/skge.c +2 -0
@@ -113,6 +113,8 @@ #include <linux/moduleparam.h>#include <linux/init.h> #include <linux/dma-mapping.h> #include <linux/ip.h> +#include <linux/mm_types.h> +#include <asm/page.h> #include "h/skdrv1st.h" #include "h/skdrv2nd.h"
drivers/net/starfire.c +1 -0
@@ -41,6 +41,7 @@ #include <linux/crc32.h>#include <linux/ethtool.h> #include <linux/mii.h> #include <linux/if_vlan.h> +#include <linux/mm.h> #include <asm/processor.h> /* Processor type for cache alignment. */ #include <asm/uaccess.h> #include <asm/io.h>
drivers/net/sungem.c +1 -0
@@ -56,6 +56,7 @@ #include <linux/workqueue.h>#include <linux/if_vlan.h> #include <linux/bitops.h> #include <linux/mutex.h> +#include <linux/mm.h> #include <asm/system.h> #include <asm/io.h>
drivers/net/sunhme.c +1 -0
@@ -32,6 +32,7 @@ #include <linux/errno.h>#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> +#include <linux/mm.h> #include <linux/bitops.h> #include <asm/system.h>
drivers/net/typhoon.c +1 -0
@@ -117,6 +117,7 @@ #include <linux/pci.h>#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> +#include <linux/mm.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/ethtool.h>
include/linux/igmp.h +1 -0
@@ -127,6 +127,7 @@ #define IGMP_LOCAL_GROUP_MASK htonl(0xFF#ifdef __KERNEL__#include <linux/skbuff.h> +#include <linux/timer.h> #include <linux/in.h> extern int sysctl_igmp_max_memberships;
include/linux/kernelcapi.h +1 -0
@@ -47,6 +47,7 @@ #ifdef __KERNEL__#include <linux/list.h> #include <linux/skbuff.h> +#include <linux/workqueue.h> #define KCI_CONTRUP 0/* arg: struct capi_profile */ #define KCI_CONTRDOWN 1/* arg: NULL */
include/linux/netdevice.h +1 -0
@@ -30,6 +30,7 @@ #include <linux/if_ether.h>#include <linux/if_packet.h> #ifdef __KERNEL__ +#include <linux/timer.h> #include <asm/atomic.h> #include <asm/cache.h> #include <asm/byteorder.h>
include/linux/netfilter_ipv4/ip_conntrack.h +1 -0
@@ -9,6 +9,7 @@ #include <linux/bitops.h>#include <linux/compiler.h> #include <asm/atomic.h> +#include <linux/timer.h> #include <linux/netfilter_ipv4/ip_conntrack_tcp.h> #include <linux/netfilter_ipv4/ip_conntrack_icmp.h> #include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h>
include/linux/skbuff.h +0 -1
@@ -22,7 +22,6 @@ #include <linux/cache.h>#include <asm/atomic.h> #include <asm/types.h> #include <linux/spinlock.h> -#include <linux/mm.h> #include <linux/net.h> #include <linux/textsearch.h> #include <net/checksum.h>
include/net/irda/timer.h +1 -0
@@ -28,6 +28,7 @@ #ifndef TIMER_H#define TIMER_H #include <linux/timer.h> +#include <linux/jiffies.h> #include <asm/param.h> /* for HZ */
include/net/netlink.h +1 -0
@@ -3,6 +3,7 @@ #define __NET_NETLINK_H#include <linux/types.h> #include <linux/netlink.h> +#include <linux/jiffies.h> /* ======================================================================== * Netlink Messages and Attributes Interface (As Seen On TV)
include/net/sock.h +1 -0
@@ -47,6 +47,7 @@ #include <linux/module.h>#include <linux/lockdep.h> #include <linux/netdevice.h> #include <linux/skbuff.h> /* struct sk_buff */ +#include <linux/mm.h> #include <linux/security.h> #include <linux/filter.h>
net/ieee80211/ieee80211_crypt_tkip.c +1 -0
@@ -16,6 +16,7 @@ #include <linux/slab.h>#include <linux/random.h> #include <linux/skbuff.h> #include <linux/netdevice.h> +#include <linux/mm.h> #include <linux/if_ether.h> #include <linux/if_arp.h> #include <asm/string.h>
net/ieee80211/ieee80211_crypt_wep.c +1 -0
@@ -15,6 +15,7 @@ #include <linux/init.h>#include <linux/slab.h> #include <linux/random.h> #include <linux/skbuff.h> +#include <linux/mm.h> #include <asm/string.h> #include <net/ieee80211.h>
net/ipv4/ipvs/ip_vs_lblc.c +1 -0
@@ -45,6 +45,7 @@ #include <linux/ip.h>#include <linux/module.h> #include <linux/kernel.h> #include <linux/skbuff.h> +#include <linux/jiffies.h> /* for sysctl */ #include <linux/fs.h>
net/ipv4/ipvs/ip_vs_lblcr.c +1 -0
@@ -43,6 +43,7 @@ #include <linux/ip.h>#include <linux/module.h> #include <linux/kernel.h> #include <linux/skbuff.h> +#include <linux/jiffies.h> /* for sysctl */ #include <linux/fs.h>
net/ipv4/netfilter/ipt_hashlimit.c +1 -0
@@ -31,6 +31,7 @@ #include <linux/vmalloc.h>#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/list.h> +#include <linux/mm.h> #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ipt_hashlimit.h>
net/irda/discovery.c +1 -0
@@ -32,6 +32,7 @@#include <linux/string.h> #include <linux/socket.h> +#include <linux/fs.h> #include <linux/seq_file.h> #include <net/irda/irda.h>
net/irda/iriap.c +1 -0
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/types.h> #include <linux/skbuff.h> +#include <linux/fs.h> #include <linux/string.h> #include <linux/init.h> #include <linux/seq_file.h>
net/irda/irttp.c +1 -0
@@ -26,6 +26,7 @@#include <linux/skbuff.h> #include <linux/init.h> +#include <linux/fs.h> #include <linux/seq_file.h> #include <asm/byteorder.h>
net/netfilter/x_tables.c +1 -0
@@ -21,6 +21,7 @@ #include <linux/seq_file.h>#include <linux/string.h> #include <linux/vmalloc.h> #include <linux/mutex.h> +#include <linux/mm.h> #include <linux/netfilter/x_tables.h> #include <linux/netfilter_arp.h>
Signature · 1 line
1.4.2.GIT
Re: dealing with excessive includes
In reply to Al ViroQuoted 1 line · On Fri, 20 Oct 2006 01:53:37 +0100 Al Viro wrote:
Done. Several more in followups.
Here's about half of checking includers of linux/smp_lock.h to see if they actually use any of its interfaces. (most don't)
Yet to do: fs/* and arch/*
Built only on x86_64.
---
From: Randy Dunlap <[email protected]>
Remove includes of <linux/smp_lock.h> where it is not used/needed.
--- drivers/acpi/osl.c | 1 - drivers/block/acsi_slm.c | 1 - drivers/block/umem.c | 1 - drivers/char/ds1620.c | 1 - drivers/char/dsp56k.c | 1 - drivers/char/dtlk.c | 1 - drivers/char/ec3104_keyb.c | 1 - drivers/char/ftape/zftape/zftape-init.c | 1 - drivers/char/hangcheck-timer.c | 1 - drivers/char/ip27-rtc.c | 1 - drivers/char/lp.c | 1 - drivers/char/mem.c | 1 - drivers/char/mxser.c | 1 - drivers/char/ppdev.c | 1 - drivers/char/sysrq.c | 1 - drivers/char/vc_screen.c | 1 - drivers/char/watchdog/omap_wdt.c | 1 - drivers/char/watchdog/pcwd_usb.c | 1 - drivers/i2c/busses/scx200_acb.c | 1 - drivers/i2c/i2c-dev.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/infiniband/ulp/iser/iser_verbs.c | 1 - drivers/input/evdev.c | 1 - drivers/input/input.c | 1 - drivers/input/joydev.c | 1 - drivers/input/misc/uinput.c | 1 - drivers/input/mousedev.c | 1 - drivers/input/tsdev.c | 1 - drivers/isdn/capi/capi.c | 1 - drivers/isdn/divert/divert_procfs.c | 1 - drivers/isdn/hardware/eicon/capimain.c | 1 - drivers/isdn/hardware/eicon/divamnt.c | 1 - drivers/isdn/hardware/eicon/divasi.c | 1 - drivers/isdn/hardware/eicon/divasmain.c | 1 - drivers/isdn/hardware/eicon/platform.h | 1 - drivers/isdn/hisax/hfc_usb.c | 1 - drivers/macintosh/therm_adt746x.c | 1 - drivers/macintosh/therm_pm72.c | 1 - drivers/macintosh/windfarm_core.c | 1 - drivers/media/dvb/bt8xx/dst_common.h | 1 - drivers/media/dvb/ttpci/av7110_av.c | 1 - drivers/media/dvb/ttpci/av7110_ca.c | 1 - drivers/media/dvb/ttpci/av7110_hw.c | 1 - drivers/media/dvb/ttpci/av7110_v4l.c | 1 - drivers/media/radio/dsbr100.c | 1 - drivers/media/video/cpia.h | 1 - drivers/media/video/cpia_pp.c | 1 - drivers/media/video/cx88/cx88-tvaudio.c | 1 - drivers/media/video/dabusb.c | 1 - drivers/media/video/ov511.h | 1 - drivers/media/video/pvrusb2/pvrusb2-main.c | 1 - drivers/media/video/saa7134/saa7134-tvaudio.c | 1 - drivers/media/video/se401.h | 1 - drivers/media/video/tvaudio.c | 1 - drivers/media/video/usbvideo/usbvideo.c | 1 - drivers/media/video/v4l1-compat.c | 1 - drivers/media/video/v4l2-common.c | 1 - drivers/media/video/videodev.c | 1 - drivers/mfd/ucb1x00-ts.c | 1 - drivers/net/irda/sir_dev.c | 1 - drivers/net/irda/sir_dongle.c | 1 - drivers/net/irda/vlsi_ir.c | 1 - drivers/net/ns83820.c | 1 - drivers/net/ppp_generic.c | 1 - drivers/net/wan/cosa.c | 1 - drivers/net/wireless/airo.c | 1 - drivers/net/wireless/hostap/hostap_ioctl.c | 1 - drivers/parisc/lba_pci.c | 1 - drivers/pci/hotplug/acpiphp_core.c | 1 - drivers/pci/hotplug/acpiphp_glue.c | 1 - drivers/pci/hotplug/ibmphp_core.c | 1 - drivers/pci/hotplug/ibmphp_hpc.c | 1 - drivers/pci/hotplug/pci_hotplug_core.c | 1 - drivers/pci/hotplug/rpaphp_core.c | 1 - drivers/pci/hotplug/shpchp_ctrl.c | 1 - drivers/pci/msi.c | 1 - drivers/pci/proc.c | 1 - drivers/sbus/char/bpp.c | 1 - drivers/sbus/char/rtc.c | 1 - drivers/sbus/char/vfc_dev.c | 1 - drivers/scsi/aic7xxx/aic79xx_osm.h | 1 - drivers/scsi/aic7xxx/aic7xxx_osm.h | 1 - drivers/scsi/dpt_i2o.c | 1 - drivers/scsi/scsi_debug.c | 1 - drivers/scsi/sg.c | 1 - drivers/serial/icom.c | 1 - drivers/usb/atm/usbatm.c | 1 - drivers/usb/class/cdc-acm.c | 1 - drivers/usb/class/usblp.c | 1 - drivers/usb/core/hub.c | 1 - drivers/usb/core/inode.c | 1 - drivers/usb/core/usb.c | 1 - drivers/usb/gadget/at91_udc.c | 1 - drivers/usb/gadget/dummy_hcd.c | 1 - drivers/usb/gadget/ether.c | 1 - drivers/usb/gadget/goku_udc.c | 1 - drivers/usb/gadget/net2280.c | 1 - drivers/usb/gadget/serial.c | 1 - drivers/usb/gadget/zero.c | 1 - drivers/usb/host/ehci-hcd.c | 1 - drivers/usb/host/ohci-hcd.c | 1 - drivers/usb/host/sl811-hcd.c | 1 - drivers/usb/host/u132-hcd.c | 1 - drivers/usb/image/mdc800.c | 1 - drivers/usb/image/microtek.c | 1 - drivers/usb/input/hid-core.c | 1 - drivers/usb/input/hiddev.c | 1 - drivers/usb/input/xpad.c | 1 - drivers/usb/misc/idmouse.c | 1 - drivers/usb/misc/legousbtower.c | 1 - drivers/usb/misc/rio500.c | 1 - drivers/usb/misc/sisusbvga/sisusb_con.c | 1 - drivers/usb/mon/mon_main.c | 1 - drivers/usb/serial/usb-serial.c | 1 - drivers/usb/storage/usb.h | 1 - drivers/video/sis/sis.h | 1 - drivers/video/sis/sis_main.c | 1 - ipc/sem.c | 1 - ipc/util.c | 1 - kernel/cpuset.c | 1 - kernel/exit.c | 1 - kernel/fork.c | 1 - kernel/itimer.c | 1 - kernel/kmod.c | 1 - kernel/posix-timers.c | 1 - kernel/power/process.c | 1 - kernel/power/snapshot.c | 1 - kernel/power/swap.c | 1 - kernel/printk.c | 1 - kernel/signal.c | 1 - kernel/time.c | 1 - kernel/uid16.c | 1 - net/appletalk/ddp.c | 1 - net/ax25/af_ax25.c | 1 - net/bluetooth/bnep/core.c | 1 - net/bridge/br_stp.c | 1 - net/bridge/br_stp_if.c | 1 - net/bridge/br_stp_timer.c | 1 - net/core/netpoll.c | 1 - net/core/pktgen.c | 1 - net/ipv4/af_inet.c | 1 - net/ipv4/tcp.c | 1 - net/ipv4/tcp_output.c | 1 - net/ipv6/af_inet6.c | 1 - net/ipx/af_ipx.c | 1 - net/irda/af_irda.c | 1 - net/netlink/af_netlink.c | 1 - net/unix/af_unix.c | 1 - net/x25/af_x25.c | 1 - security/capability.c | 1 - security/commoncap.c | 1 - security/selinux/hooks.c | 1 - sound/core/control.c | 1 - sound/core/hwdep.c | 1 - sound/core/oss/mixer_oss.c | 1 - sound/core/oss/pcm_oss.c | 1 - sound/core/pcm_native.c | 1 - sound/core/rawmidi.c | 1 - sound/core/seq/oss/seq_oss.c | 1 - sound/core/seq/seq_clientmgr.c | 1 - sound/core/timer.c | 1 - sound/oss/emu10k1/audio.c | 1 - sound/oss/emu10k1/passthrough.c | 1 - sound/oss/swarm_cs4297a.c | 1 - sound/oss/trident.c | 1 - sound/oss/via82cxxx_audio.c | 1 - 166 files changed, 166 deletions(-)
ipc/sem.c +0 -1
@@ -75,7 +75,6 @@#include <linux/init.h> #include <linux/proc_fs.h> #include <linux/time.h> -#include <linux/smp_lock.h> #include <linux/security.h> #include <linux/syscalls.h> #include <linux/audit.h>
ipc/util.c +0 -1
@@ -21,7 +21,6 @@#include <linux/shm.h> #include <linux/init.h> #include <linux/msg.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/slab.h> #include <linux/capability.h>
kernel/cpuset.c +0 -1
@@ -42,7 +42,6 @@#include <linux/seq_file.h> #include <linux/security.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/stat.h> #include <linux/string.h>
kernel/exit.c +0 -1
@@ -7,7 +7,6 @@#include <linux/mm.h> #include <linux/slab.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/module.h> #include <linux/capability.h> #include <linux/completion.h>
kernel/fork.c +0 -1
@@ -14,7 +14,6 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/unistd.h> -#include <linux/smp_lock.h> #include <linux/module.h> #include <linux/vmalloc.h> #include <linux/completion.h>
kernel/itimer.c +0 -1
@@ -7,7 +7,6 @@/* These are all the functions necessary to implement itimers */ #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/syscalls.h> #include <linux/time.h>
kernel/kmod.c +0 -1
@@ -23,7 +23,6 @@#include <linux/syscalls.h> #include <linux/unistd.h> #include <linux/kmod.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/namespace.h> #include <linux/completion.h>
kernel/posix-timers.c +0 -1
@@ -31,7 +31,6 @@* POSIX clocks & timers */ #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h>
kernel/power/process.c +0 -1
@@ -8,7 +8,6 @@#undef DEBUG -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/suspend.h> #include <linux/module.h>
kernel/power/snapshot.c +0 -1
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/mm.h> #include <linux/suspend.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/bitops.h> #include <linux/spinlock.h>
kernel/power/swap.c +0 -1
@@ -12,7 +12,6 @@*/ #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/file.h> #include <linux/utsname.h> #include <linux/version.h>
kernel/printk.c +0 -1
@@ -20,7 +20,6 @@#include <linux/mm.h> #include <linux/tty.h> #include <linux/tty_driver.h> -#include <linux/smp_lock.h> #include <linux/console.h> #include <linux/init.h> #include <linux/module.h>
kernel/signal.c +0 -1
@@ -12,7 +12,6 @@#include <linux/slab.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/sched.h> #include <linux/fs.h>
kernel/time.c +0 -1
@@ -31,7 +31,6 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/errno.h> -#include <linux/smp_lock.h> #include <linux/syscalls.h> #include <linux/security.h> #include <linux/fs.h>
kernel/uid16.c +0 -1
@@ -6,7 +6,6 @@#include <linux/mm.h> #include <linux/utsname.h> #include <linux/mman.h> -#include <linux/smp_lock.h> #include <linux/notifier.h> #include <linux/reboot.h> #include <linux/prctl.h>
security/capability.c +0 -1
@@ -17,7 +17,6 @@#include <linux/mman.h> #include <linux/pagemap.h> #include <linux/swap.h> -#include <linux/smp_lock.h> #include <linux/skbuff.h> #include <linux/netlink.h> #include <linux/ptrace.h>
security/commoncap.c +0 -1
@@ -17,7 +17,6 @@#include <linux/mman.h> #include <linux/pagemap.h> #include <linux/swap.h> -#include <linux/smp_lock.h> #include <linux/skbuff.h> #include <linux/netlink.h> #include <linux/ptrace.h>
security/selinux/hooks.c +0 -1
@@ -35,7 +35,6 @@#include <linux/slab.h> #include <linux/pagemap.h> #include <linux/swap.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/syscalls.h> #include <linux/file.h>
net/appletalk/ddp.c +0 -1
@@ -1839,7 +1839,6 @@ static const struct proto_ops SOCKOPS_WR .sendpage = sock_no_sendpage, }; -#include <linux/smp_lock.h> SOCKOPS_WRAP (atalk_dgram,PF_APPLETALK );static struct notifier_block ddp_notifier = {
net/ax25/af_ax25.c +0 -1
@@ -23,7 +23,6 @@#include <linux/sched.h> #include <linux/timer.h> #include <linux/string.h> -#include <linux/smp_lock.h> #include <linux/sockios.h> #include <linux/net.h> #include <net/ax25.h>
net/bluetooth/bnep/core.c +0 -1
@@ -37,7 +37,6 @@#include <linux/init.h> #include <linux/wait.h> #include <linux/errno.h> -#include <linux/smp_lock.h> #include <linux/net.h> #include <net/sock.h>
net/bridge/br_stp.c +0 -1
@@ -13,7 +13,6 @@* 2 of the License, or (at your option) any later version. */ #include <linux/kernel.h> -#include <linux/smp_lock.h> #include "br_private.h" #include "br_private_stp.h"
net/bridge/br_stp_if.c +0 -1
@@ -14,7 +14,6 @@*/ #include <linux/kernel.h> -#include <linux/smp_lock.h> #include <linux/etherdevice.h> #include <linux/rtnetlink.h>
net/bridge/br_stp_timer.c +0 -1
@@ -15,7 +15,6 @@#include <linux/kernel.h> #include <linux/times.h> -#include <linux/smp_lock.h> #include "br_private.h" #include "br_private_stp.h"
net/core/netpoll.c +0 -1
@@ -9,7 +9,6 @@* Copyright (C) 2002 Red Hat, Inc. */ -#include <linux/smp_lock.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/string.h>
net/core/pktgen.c +0 -1
@@ -117,7 +117,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/kernel.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include <linux/sched.h> #include <linux/slab.h>
net/ipv4/af_inet.c +0 -1
@@ -91,7 +91,6 @@#include <asm/uaccess.h> #include <asm/system.h> -#include <linux/smp_lock.h> #include <linux/inet.h> #include <linux/igmp.h> #include <linux/inetdevice.h>
net/ipv4/tcp.c +0 -1
@@ -252,7 +252,6 @@#include <linux/fcntl.h> #include <linux/poll.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/fs.h> #include <linux/random.h> #include <linux/bootmem.h>
net/ipv4/tcp_output.c +0 -1
@@ -40,7 +40,6 @@#include <linux/compiler.h> #include <linux/module.h> -#include <linux/smp_lock.h> /* People can turn this off for buggy TCP's found in printers etc. */ int sysctl_tcp_retrans_collapse__read_mostly =1 ;
net/ipv6/af_inet6.c +0 -1
@@ -43,7 +43,6 @@#include <linux/inet.h> #include <linux/netdevice.h> #include <linux/icmpv6.h> -#include <linux/smp_lock.h> #include <linux/netfilter_ipv6.h> #include <net/ip.h>
net/ipx/af_ipx.c +0 -1
@@ -1952,7 +1952,6 @@ static const struct proto_ops SOCKOPS_WR .sendpage = sock_no_sendpage, }; -#include <linux/smp_lock.h> SOCKOPS_WRAP (ipx_dgram,PF_IPX );static struct packet_type ipx_8023_packet_type = {
net/irda/af_irda.c +0 -1
@@ -2581,7 +2581,6 @@ static const struct proto_ops SOCKOPS_WR };#endif /* CONFIG_IRDA_ULTRA */ -#include <linux/smp_lock.h> SOCKOPS_WRAP (irda_stream,PF_IRDA );SOCKOPS_WRAP (irda_seqpacket,PF_IRDA );SOCKOPS_WRAP (irda_dgram,PF_IRDA );
net/netlink/af_netlink.c +0 -1
@@ -45,7 +45,6 @@#include <linux/rtnetlink.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/smp_lock.h> #include <linux/notifier.h> #include <linux/security.h> #include <linux/jhash.h>
net/unix/af_unix.c +0 -1
@@ -111,7 +111,6 @@#include <net/scm.h> #include <linux/init.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include <linux/rtnetlink.h> #include <linux/mount.h> #include <net/checksum.h>
net/x25/af_x25.c +0 -1
@@ -1576,7 +1576,6 @@ static const struct proto_ops SOCKOPS_WR .sendpage = sock_no_sendpage, }; -#include <linux/smp_lock.h> SOCKOPS_WRAP (x25_proto,AF_X25 );static struct packet_type x25_packet_type = {
sound/core/control.c +0 -1
@@ -22,7 +22,6 @@#include <sound/driver.h> #include <linux/threads.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/time.h>
sound/core/hwdep.c +0 -1
@@ -22,7 +22,6 @@#include <sound/driver.h> #include <linux/major.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/mutex.h>
sound/core/oss/mixer_oss.c +0 -1
@@ -21,7 +21,6 @@#include <sound/driver.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/string.h>
sound/core/oss/pcm_oss.c +0 -1
@@ -28,7 +28,6 @@#include <sound/driver.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/vmalloc.h>
sound/core/pcm_native.c +0 -1
@@ -21,7 +21,6 @@#include <sound/driver.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/file.h> #include <linux/slab.h> #include <linux/time.h>
sound/core/rawmidi.c +0 -1
@@ -23,7 +23,6 @@#include <sound/core.h> #include <linux/major.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/sched.h> #include <linux/slab.h> #include <linux/time.h>
sound/core/seq/oss/seq_oss.c +0 -1
@@ -22,7 +22,6 @@#include <sound/driver.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/moduleparam.h> #include <linux/mutex.h> #include <sound/core.h>
sound/core/seq/seq_clientmgr.c +0 -1
@@ -23,7 +23,6 @@#include <sound/driver.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/minors.h>
sound/core/timer.c +0 -1
@@ -22,7 +22,6 @@#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/mutex.h>
sound/oss/emu10k1/audio.c +0 -1
@@ -36,7 +36,6 @@#include <linux/bitops.h> #include <asm/io.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include "hwaccess.h" #include "cardwo.h"
sound/oss/emu10k1/passthrough.c +0 -1
@@ -35,7 +35,6 @@#include <linux/bitops.h> #include <asm/io.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include "hwaccess.h" #include "cardwo.h"
sound/oss/swarm_cs4297a.c +0 -1
@@ -75,7 +75,6 @@#include <linux/interrupt.h> #include <linux/init.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include <asm/byteorder.h>
sound/oss/trident.c +0 -1
@@ -207,7 +207,6 @@#include <linux/init.h> #include <linux/poll.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/ac97_codec.h> #include <linux/bitops.h> #include <linux/proc_fs.h>
sound/oss/via82cxxx_audio.c +0 -1
@@ -32,7 +32,6 @@#include <linux/poll.h> #include <linux/soundcard.h> #include <linux/ac97_codec.h> -#include <linux/smp_lock.h> #include <linux/ioport.h> #include <linux/delay.h> #include <linux/dma-mapping.h>
drivers/acpi/osl.c +0 -1
@@ -30,7 +30,6 @@#include <linux/slab.h> #include <linux/mm.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kmod.h> #include <linux/delay.h>
drivers/block/acsi_slm.c +0 -1
@@ -65,7 +65,6 @@ not be guaranteed. There are several way#include <linux/time.h> #include <linux/mm.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <asm/pgtable.h> #include <asm/system.h>
drivers/block/umem.c +0 -1
@@ -45,7 +45,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/timer.h> #include <linux/pci.h> #include <linux/slab.h>
drivers/char/ds1620.c +0 -1
@@ -5,7 +5,6 @@#include <linux/module.h> #include <linux/sched.h> #include <linux/miscdevice.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/proc_fs.h> #include <linux/capability.h>
drivers/char/dsp56k.c +0 -1
@@ -33,7 +33,6 @@#include <linux/fs.h> #include <linux/mm.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/device.h> #include <asm/atarihw.h>
drivers/char/dtlk.c +0 -1
@@ -62,7 +62,6 @@#include <linux/init.h> /* for __init, module_{init,exit} */ #include <linux/poll.h> /* for POLLIN, etc. */ #include <linux/dtlk.h> /* local header file for DoubleTalk values */ -#include <linux/smp_lock.h> #ifdef TRACING #define TRACE_TEXT (str) printk(str);
drivers/char/ec3104_keyb.c +0 -1
@@ -41,7 +41,6 @@#include <linux/miscdevice.h> #include <linux/slab.h> #include <linux/kbd_kern.h> -#include <linux/smp_lock.h> #include <linux/bitops.h> #include <asm/keyboard.h>
drivers/char/ftape/zftape/zftape-init.c +0 -1
@@ -31,7 +31,6 @@#include <linux/kmod.h> #endif #include <linux/fcntl.h> -#include <linux/smp_lock.h> #include <linux/zftape.h> #include <linux/init.h>
drivers/char/hangcheck-timer.c +0 -1
@@ -44,7 +44,6 @@#include <linux/fs.h> #include <linux/mm.h> #include <linux/reboot.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/delay.h> #include <asm/uaccess.h>
drivers/char/ip27-rtc.c +0 -1
@@ -35,7 +35,6 @@#include <linux/init.h> #include <linux/poll.h> #include <linux/proc_fs.h> -#include <linux/smp_lock.h> #include <asm/m48t35.h> #include <asm/sn/ioc3.h>
drivers/char/lp.c +0 -1
@@ -118,7 +118,6 @@#include <linux/kernel.h> #include <linux/major.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/fcntl.h> #include <linux/delay.h>
drivers/char/mem.c +0 -1
@@ -18,7 +18,6 @@#include <linux/raw.h> #include <linux/tty.h> #include <linux/capability.h> -#include <linux/smp_lock.h> #include <linux/ptrace.h> #include <linux/device.h> #include <linux/highmem.h>
drivers/char/mxser.c +0 -1
@@ -54,7 +54,6 @@#include <linux/gfp.h> #include <linux/ioport.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/pci.h>
drivers/char/ppdev.c +0 -1
@@ -66,7 +66,6 @@#include <linux/poll.h> #include <linux/major.h> #include <linux/ppdev.h> -#include <linux/smp_lock.h> #include <linux/device.h> #include <asm/uaccess.h>
drivers/char/sysrq.c +0 -1
@@ -24,7 +24,6 @@#include <linux/sysrq.h> #include <linux/kbd_kern.h> #include <linux/quotaops.h> -#include <linux/smp_lock.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/suspend.h>
drivers/char/vc_screen.c +0 -1
@@ -33,7 +33,6 @@#include <linux/selection.h> #include <linux/kbd_kern.h> #include <linux/console.h> -#include <linux/smp_lock.h> #include <linux/device.h> #include <asm/uaccess.h> #include <asm/byteorder.h>
drivers/char/watchdog/pcwd_usb.c +0 -1
@@ -37,7 +37,6 @@#include <linux/notifier.h> #include <linux/reboot.h> #include <linux/fs.h> -#include <linux/smp_lock.h> #include <linux/completion.h> #include <asm/uaccess.h> #include <linux/usb.h>
drivers/char/watchdog/omap_wdt.c +0 -1
@@ -34,7 +34,6 @@#include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/reboot.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/err.h> #include <linux/platform_device.h>
drivers/i2c/busses/scx200_acb.c +0 -1
@@ -28,7 +28,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/i2c.h> -#include <linux/smp_lock.h> #include <linux/pci.h> #include <linux/delay.h> #include <linux/mutex.h>
drivers/i2c/i2c-dev.c +0 -1
@@ -30,7 +30,6 @@#include <linux/module.h> #include <linux/fs.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/list.h> #include <linux/i2c.h>
drivers/ieee1394/raw1394.c +0 -1
@@ -35,7 +35,6 @@#include <linux/poll.h> #include <linux/module.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/vmalloc.h> #include <linux/cdev.h>
drivers/infiniband/ulp/iser/iser_verbs.c +0 -1
@@ -35,7 +35,6 @@#include <asm/io.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/version.h>
drivers/input/evdev.c +0 -1
@@ -18,7 +18,6 @@#include <linux/init.h> #include <linux/input.h> #include <linux/major.h> -#include <linux/smp_lock.h> #include <linux/device.h> #include <linux/compat.h>
drivers/input/input.c +0 -1
@@ -12,7 +12,6 @@#include <linux/init.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/input.h> #include <linux/module.h> #include <linux/random.h>
drivers/input/joydev.c +0 -1
@@ -24,7 +24,6 @@#include <linux/module.h> #include <linux/poll.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/device.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );
drivers/input/misc/uinput.c +0 -1
@@ -34,7 +34,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/input.h> -#include <linux/smp_lock.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <linux/uinput.h>
drivers/input/mousedev.c +0 -1
@@ -19,7 +19,6 @@#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/input.h> -#include <linux/smp_lock.h> #include <linux/random.h> #include <linux/major.h> #include <linux/device.h>
drivers/input/tsdev.c +0 -1
@@ -48,7 +48,6 @@#include <linux/init.h> #include <linux/input.h> #include <linux/major.h> -#include <linux/smp_lock.h> #include <linux/random.h> #include <linux/time.h> #include <linux/device.h>
drivers/isdn/capi/capi.c +0 -1
@@ -19,7 +19,6 @@#include <linux/fs.h> #include <linux/signal.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/timer.h> #include <linux/wait.h> #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
drivers/isdn/divert/divert_procfs.c +0 -1
@@ -11,7 +11,6 @@#include <linux/module.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #ifdef CONFIG_PROC_FS #include <linux/proc_fs.h> #else
drivers/isdn/hardware/eicon/capimain.c +0 -1
@@ -13,7 +13,6 @@#include <linux/module.h> #include <linux/init.h> #include <asm/uaccess.h> -#include <linux/smp_lock.h> #include <linux/skbuff.h> #include "os_capi.h"
drivers/isdn/hardware/eicon/divamnt.c +0 -1
@@ -14,7 +14,6 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/poll.h> #include <asm/uaccess.h>
drivers/isdn/hardware/eicon/divasi.c +0 -1
@@ -14,7 +14,6 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/poll.h> #include <linux/proc_fs.h> #include <linux/skbuff.h>
drivers/isdn/hardware/eicon/divasmain.c +0 -1
@@ -18,7 +18,6 @@#include <linux/ioport.h> #include <linux/workqueue.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/list.h> #include <linux/poll.h>
drivers/isdn/hardware/eicon/platform.h +0 -1
@@ -26,7 +26,6 @@#include <linux/vmalloc.h> #include <linux/proc_fs.h> #include <linux/interrupt.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/list.h> #include <asm/types.h>
drivers/isdn/hisax/hfc_usb.c +0 -1
@@ -37,7 +37,6 @@#include <linux/kernel_stat.h> #include <linux/usb.h> #include <linux/kernel.h> -#include <linux/smp_lock.h> #include <linux/sched.h> #include "hisax.h" #include "hisax_if.h"
drivers/macintosh/therm_adt746x.c +0 -1
@@ -19,7 +19,6 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/wait.h> #include <linux/suspend.h> #include <linux/kthread.h>
drivers/macintosh/therm_pm72.c +0 -1
@@ -117,7 +117,6 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/wait.h> #include <linux/reboot.h> #include <linux/kmod.h>
drivers/macintosh/windfarm_core.c +0 -1
@@ -27,7 +27,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/kthread.h> #include <linux/jiffies.h> #include <linux/reboot.h>
drivers/media/dvb/bt8xx/dst_common.h +0 -1
@@ -22,7 +22,6 @@#ifndef DST_COMMON_H #define DST_COMMON_H -#include <linux/smp_lock.h> #include <linux/dvb/frontend.h> #include <linux/device.h> #include <linux/mutex.h>
drivers/media/dvb/ttpci/av7110_av.c +0 -1
@@ -33,7 +33,6 @@#include <linux/string.h> #include <linux/sched.h> #include <linux/delay.h> -#include <linux/smp_lock.h> #include <linux/fs.h> #include "av7110.h"
drivers/media/dvb/ttpci/av7110_ca.c +0 -1
@@ -35,7 +35,6 @@#include <linux/fs.h> #include <linux/timer.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include "av7110.h" #include "av7110_hw.h"
drivers/media/dvb/ttpci/av7110_hw.c +0 -1
@@ -34,7 +34,6 @@#include <linux/string.h> #include <linux/sched.h> #include <linux/delay.h> -#include <linux/smp_lock.h> #include <linux/fs.h> #include "av7110.h"
drivers/media/dvb/ttpci/av7110_v4l.c +0 -1
@@ -32,7 +32,6 @@#include <linux/fs.h> #include <linux/timer.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include "av7110.h" #include "av7110_hw.h"
drivers/media/radio/dsbr100.c +0 -1
@@ -79,7 +79,6 @@#include <linux/videodev2.h> #include <media/v4l2-common.h> #include <linux/usb.h> -#include <linux/smp_lock.h> /* * Version Information
drivers/media/video/cpia.h +0 -1
@@ -47,7 +47,6 @@#include <linux/videodev.h> #include <media/v4l2-common.h> #include <linux/list.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> struct cpia_camera_ops
drivers/media/video/cpia_pp.c +0 -1
@@ -34,7 +34,6 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/workqueue.h> -#include <linux/smp_lock.h> #include <linux/sched.h> #include <linux/kmod.h>
drivers/media/video/cx88/cx88-tvaudio.c +0 -1
@@ -50,7 +50,6 @@#include <linux/interrupt.h> #include <linux/vmalloc.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/kthread.h>
drivers/media/video/dabusb.c +0 -1
@@ -37,7 +37,6 @@#include <asm/atomic.h> #include <linux/delay.h> #include <linux/usb.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include "dabusb.h"
drivers/media/video/ov511.h +0 -1
@@ -4,7 +4,6 @@#include <asm/uaccess.h> #include <linux/videodev.h> #include <media/v4l2-common.h> -#include <linux/smp_lock.h> #include <linux/usb.h> #include <linux/mutex.h>
drivers/media/video/pvrusb2/pvrusb2-main.c +0 -1
@@ -25,7 +25,6 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/smp_lock.h> #include <linux/usb.h> #include <linux/videodev2.h>
drivers/media/video/saa7134/saa7134-tvaudio.c +0 -1
@@ -27,7 +27,6 @@#include <linux/kernel.h> #include <linux/slab.h> #include <linux/delay.h> -#include <linux/smp_lock.h> #include <asm/div64.h> #include "saa7134-reg.h"
drivers/media/video/se401.h +0 -1
@@ -5,7 +5,6 @@#include <asm/uaccess.h> #include <linux/videodev.h> #include <media/v4l2-common.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #define se401_DEBUG/* Turn on debug messages */
drivers/media/video/tvaudio.c +0 -1
@@ -27,7 +27,6 @@#include <linux/i2c.h> #include <linux/i2c-algo-bit.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/kthread.h> #include <media/tvaudio.h>
drivers/media/video/usbvideo/usbvideo.c +0 -1
@@ -20,7 +20,6 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/init.h> #include <linux/spinlock.h>
drivers/media/video/v4l1-compat.c +0 -1
@@ -23,7 +23,6 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include <linux/fs.h> #include <linux/file.h>
drivers/media/video/v4l2-common.c +0 -1
@@ -48,7 +48,6 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/errno.h>
drivers/media/video/videodev.c +0 -1
@@ -31,7 +31,6 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/errno.h>
drivers/mfd/ucb1x00-ts.c +0 -1
@@ -21,7 +21,6 @@#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/sched.h> #include <linux/completion.h> #include <linux/delay.h>
drivers/net/irda/sir_dev.c +0 -1
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <net/irda/irda.h>
drivers/net/irda/sir_dongle.c +0 -1
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/kmod.h> #include <linux/mutex.h>
drivers/net/irda/vlsi_ir.c +0 -1
@@ -44,7 +44,6 @@ MODULE_LICENSE("GPL");#include <linux/time.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/byteorder.h>
drivers/net/ns83820.c +0 -1
@@ -104,7 +104,6 @@#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/delay.h> -#include <linux/smp_lock.h> #include <linux/workqueue.h> #include <linux/init.h> #include <linux/ip.h> /* for iph */
drivers/net/ppp_generic.c +0 -1
@@ -40,7 +40,6 @@#include <linux/ip.h> #include <linux/tcp.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/rwsem.h> #include <linux/stddef.h> #include <linux/device.h>
drivers/net/wan/cosa.c +0 -1
@@ -90,7 +90,6 @@#include <linux/ioport.h> #include <linux/netdevice.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/device.h> #undef COSA_SLOW_IO/* for testing purposes only */
drivers/net/wireless/airo.c +0 -1
@@ -25,7 +25,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/proc_fs.h> -#include <linux/smp_lock.h> #include <linux/sched.h> #include <linux/ptrace.h>
drivers/net/wireless/hostap/hostap_ioctl.c +0 -1
@@ -1,7 +1,6 @@/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/ethtool.h> #include <net/ieee80211_crypt.h>
drivers/parisc/lba_pci.c +0 -1
@@ -38,7 +38,6 @@#include <linux/pci.h> #include <linux/ioport.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <asm/byteorder.h> #include <asm/pdc.h>
drivers/pci/hotplug/acpiphp_core.c +0 -1
@@ -39,7 +39,6 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include "pci_hotplug.h" #include "acpiphp.h"
drivers/pci/hotplug/acpiphp_glue.c +0 -1
@@ -45,7 +45,6 @@#include <linux/kernel.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include "../pci.h"
drivers/pci/hotplug/ibmphp_core.c +0 -1
@@ -34,7 +34,6 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/wait.h> -#include <linux/smp_lock.h> #include "../pci.h" #include "../../../arch/i386/pci/pci.h" /* for struct irq_routing_table */ #include "ibmphp.h"
drivers/pci/hotplug/ibmphp_hpc.c +0 -1
@@ -32,7 +32,6 @@#include <linux/delay.h> #include <linux/module.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/mutex.h>
drivers/pci/hotplug/pci_hotplug_core.c +0 -1
@@ -34,7 +34,6 @@#include <linux/list.h> #include <linux/pagemap.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/mount.h> #include <linux/namei.h>
drivers/pci/hotplug/rpaphp_core.c +0 -1
@@ -28,7 +28,6 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <asm/eeh.h> /* for eeh_add_device() */ #include <asm/rtas.h> /* rtas_call */
drivers/pci/hotplug/shpchp_ctrl.c +0 -1
@@ -30,7 +30,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> -#include <linux/smp_lock.h> #include <linux/pci.h> #include <linux/workqueue.h> #include "../pci.h"
drivers/pci/msi.c +0 -1
@@ -12,7 +12,6 @@#include <linux/interrupt.h> #include <linux/init.h> #include <linux/ioport.h> -#include <linux/smp_lock.h> #include <linux/pci.h> #include <linux/proc_fs.h> #include <linux/msi.h>
drivers/pci/proc.c +0 -1
@@ -11,7 +11,6 @@#include <linux/module.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/byteorder.h>
drivers/sbus/char/bpp.c +0 -1
@@ -15,7 +15,6 @@#include <linux/fs.h> #include <linux/errno.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/timer.h> #include <linux/ioport.h>
drivers/sbus/char/rtc.c +0 -1
@@ -19,7 +19,6 @@#include <linux/fcntl.h> #include <linux/poll.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <asm/io.h> #include <asm/mostek.h> #include <asm/system.h>
drivers/sbus/char/vfc_dev.c +0 -1
@@ -21,7 +21,6 @@#include <linux/errno.h> #include <linux/sched.h> #include <linux/fs.h> -#include <linux/smp_lock.h> #include <linux/delay.h> #include <linux/spinlock.h> #include <linux/mm.h>
drivers/scsi/aic7xxx/aic79xx_osm.h +0 -1
@@ -47,7 +47,6 @@#include <linux/delay.h> #include <linux/ioport.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/slab.h>
drivers/scsi/aic7xxx/aic7xxx_osm.h +0 -1
@@ -64,7 +64,6 @@#include <linux/delay.h> #include <linux/ioport.h> #include <linux/pci.h> -#include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/slab.h>
drivers/scsi/dpt_i2o.c +0 -1
@@ -55,7 +55,6 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Dri#include <linux/sched.h> #include <linux/reboot.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/dma-mapping.h> #include <linux/timer.h>
drivers/scsi/scsi_debug.c +0 -1
@@ -37,7 +37,6 @@#include <linux/fs.h> #include <linux/init.h> #include <linux/proc_fs.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/moduleparam.h>
drivers/scsi/sg.c +0 -1
@@ -41,7 +41,6 @@ static int sg_version_num = 30534; /* 2#include <linux/fcntl.h> #include <linux/init.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include <linux/moduleparam.h> #include <linux/cdev.h> #include <linux/seq_file.h>
drivers/serial/icom.c +0 -1
@@ -48,7 +48,6 @@#include <linux/pci.h> #include <linux/vmalloc.h> #include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/kobject.h> #include <linux/firmware.h>
drivers/video/sis/sis.h +0 -1
@@ -51,7 +51,6 @@#include <linux/ioctl32.h> #define SIS_OLD_CONFIG_COMPAT #else -#include <linux/smp_lock.h> #define SIS_NEW_CONFIG_COMPAT #endif #endif /* CONFIG_COMPAT */
drivers/video/sis/sis_main.c +0 -1
@@ -37,7 +37,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/kernel.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <linux/errno.h> #include <linux/string.h>
drivers/usb/atm/usbatm.c +0 -1
@@ -77,7 +77,6 @@#include <linux/sched.h> #include <linux/signal.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/stat.h> #include <linux/timer.h> #include <linux/wait.h>
drivers/usb/class/cdc-acm.c +0 -1
@@ -59,7 +59,6 @@#include <linux/tty_driver.h> #include <linux/tty_flip.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include <asm/uaccess.h> #include <linux/usb.h>
drivers/usb/class/usblp.c +0 -1
@@ -49,7 +49,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/signal.h> #include <linux/poll.h> #include <linux/init.h>
drivers/usb/core/hub.c +0 -1
@@ -16,7 +16,6 @@#include <linux/sched.h> #include <linux/list.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/ioctl.h> #include <linux/usb.h> #include <linux/usbdevice_fs.h>
drivers/usb/core/inode.c +0 -1
@@ -36,7 +36,6 @@#include <linux/usb.h> #include <linux/namei.h> #include <linux/usbdevice_fs.h> -#include <linux/smp_lock.h> #include <linux/parser.h> #include <linux/notifier.h> #include <asm/byteorder.h>
drivers/usb/core/usb.c +0 -1
@@ -30,7 +30,6 @@#include <linux/init.h> #include <linux/spinlock.h> #include <linux/errno.h> -#include <linux/smp_lock.h> #include <linux/usb.h> #include <linux/mutex.h> #include <linux/workqueue.h>
drivers/usb/gadget/at91_udc.c +0 -1
@@ -32,7 +32,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/list.h>
drivers/usb/gadget/dummy_hcd.c +0 -1
@@ -42,7 +42,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/gadget/ether.c +0 -1
@@ -29,7 +29,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/gadget/goku_udc.c +0 -1
@@ -31,7 +31,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/gadget/net2280.c +0 -1
@@ -55,7 +55,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/gadget/serial.c +0 -1
@@ -23,7 +23,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/gadget/zero.c +0 -1
@@ -68,7 +68,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/host/ehci-hcd.c +0 -1
@@ -24,7 +24,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/host/ohci-hcd.c +0 -1
@@ -82,7 +82,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/host/sl811-hcd.c +0 -1
@@ -38,7 +38,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/host/u132-hcd.c +0 -1
@@ -42,7 +42,6 @@#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/timer.h>
drivers/usb/image/mdc800.c +0 -1
@@ -94,7 +94,6 @@#include <linux/init.h> #include <linux/slab.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/wait.h> #include <linux/mutex.h>
drivers/usb/image/microtek.c +0 -1
@@ -129,7 +129,6 @@#include <linux/init.h> #include <linux/slab.h> #include <linux/spinlock.h> -#include <linux/smp_lock.h> #include <linux/usb.h> #include <linux/proc_fs.h>
drivers/usb/input/hid-core.c +0 -1
@@ -20,7 +20,6 @@#include <linux/sched.h> #include <linux/list.h> #include <linux/mm.h> -#include <linux/smp_lock.h> #include <linux/spinlock.h> #include <asm/unaligned.h> #include <asm/byteorder.h>
drivers/usb/input/hiddev.c +0 -1
@@ -29,7 +29,6 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/init.h> -#include <linux/smp_lock.h> #include <linux/input.h> #include <linux/usb.h> #include "hid.h"
drivers/usb/input/xpad.c +0 -1
@@ -62,7 +62,6 @@#include <linux/stat.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/smp_lock.h> #include <linux/usb/input.h> #define DRIVER_VERSION "v0.0.6"
drivers/usb/misc/idmouse.c +0 -1
@@ -22,7 +22,6 @@#include <linux/init.h> #include <linux/slab.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/completion.h> #include <linux/mutex.h> #include <asm/uaccess.h>
drivers/usb/misc/legousbtower.c +0 -1
@@ -80,7 +80,6 @@#include <linux/init.h> #include <linux/slab.h> #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/completion.h> #include <linux/mutex.h> #include <asm/uaccess.h>
drivers/usb/misc/rio500.c +0 -1
@@ -39,7 +39,6 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/usb.h> -#include <linux/smp_lock.h> #include <linux/wait.h> #include "rio500_usb.h"
drivers/usb/misc/sisusbvga/sisusb_con.c +0 -1
@@ -63,7 +63,6 @@#include <linux/selection.h> #include <linux/spinlock.h> #include <linux/kref.h> -#include <linux/smp_lock.h> #include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/vmalloc.h>
drivers/usb/mon/mon_main.c +0 -1
@@ -10,7 +10,6 @@#include <linux/module.h> #include <linux/usb.h> #include <linux/debugfs.h> -#include <linux/smp_lock.h> #include <linux/notifier.h> #include <linux/mutex.h>
drivers/usb/serial/usb-serial.c +0 -1
@@ -28,7 +28,6 @@#include <linux/spinlock.h> #include <linux/mutex.h> #include <linux/list.h> -#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <linux/usb.h> #include <linux/usb/serial.h>
drivers/usb/storage/usb.h +0 -1
@@ -47,7 +47,6 @@#include <linux/usb.h> #include <linux/usb_usual.h> #include <linux/blkdev.h> -#include <linux/smp_lock.h> #include <linux/completion.h> #include <linux/mutex.h> #include <scsi/scsi_host.h>
Re: dealing with excessive includes
Quoted 5 lines · Randy Dunlap
Here's about half of checking includers of
linux/smp_lock.hto see if they actually use any of its interfaces. (most don't)Yet to do:
fs/*andarch/*
Built only onx86_64.
[...]
Quoted 16 lines
drivers/acpi/osl.c | 1 - drivers/block/acsi_slm.c | 1 - drivers/block/umem.c | 1 - drivers/char/ds1620.c | 1 - drivers/char/dsp56k.c | 1 - drivers/char/dtlk.c | 1 - drivers/char/ec3104_keyb.c | 1 - drivers/char/ftape/zftape/zftape-init.c | 1 - drivers/char/hangcheck-timer.c | 1 - drivers/char/ip27-rtc.c | 1 - drivers/char/lp.c | 1 - drivers/char/mem.c | 1 - drivers/char/mxser.c | 1 - drivers/char/ppdev.c | 1 - drivers/char/sysrq.c | 1 - drivers/char/vc_screen.c | 1 -
Quoted 8 lines
drivers/char/watchdog/omap_wdt.c | 1 - drivers/char/watchdog/pcwd_usb.c | 1 - drivers/i2c/busses/scx200_acb.c | 1 - drivers/i2c/i2c-dev.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/infiniband/ulp/iser/iser_verbs.c | 1 - drivers/input/evdev.c | 1 - drivers/input/input.c | 1 -
[... etc. pp. ...]
Quoted 4 lines
sound/oss/swarm_cs4297a.c | 1 - sound/oss/trident.c | 1 - sound/oss/via82cxxx_audio.c | 1 - 166 files changed, 166 deletions(-)
[...]
I am afraid in many of these cases a proper cleanup would _replace_ the include by the correct one, not just delete it. For example, drivers/ieee1394/raw1394.c should include linux/spinlock.h. AFAICS it does so at the moment only indirectly via another header.
Signature · 3 lines
Stefan Richter -=====-=-==- =-=- =-=-- http://arcgraph.de/sr/
Re: dealing with excessive includes
Quoted 36 lines · On Fri, 20 Oct 2006 11:26:58 +0200 Stefan Richter wrote:
Quoted 5 lines · Randy Dunlap
Here's about half of checking includers of
linux/smp_lock.hto see if they actually use any of its interfaces. (most don't)Yet to do:
fs/*andarch/*
Built only onx86_64.[...]
Quoted 16 lines
drivers/acpi/osl.c | 1 - drivers/block/acsi_slm.c | 1 - drivers/block/umem.c | 1 - drivers/char/ds1620.c | 1 - drivers/char/dsp56k.c | 1 - drivers/char/dtlk.c | 1 - drivers/char/ec3104_keyb.c | 1 - drivers/char/ftape/zftape/zftape-init.c | 1 - drivers/char/hangcheck-timer.c | 1 - drivers/char/ip27-rtc.c | 1 - drivers/char/lp.c | 1 - drivers/char/mem.c | 1 - drivers/char/mxser.c | 1 - drivers/char/ppdev.c | 1 - drivers/char/sysrq.c | 1 - drivers/char/vc_screen.c | 1 -Quoted 8 lines
drivers/char/watchdog/omap_wdt.c | 1 - drivers/char/watchdog/pcwd_usb.c | 1 - drivers/i2c/busses/scx200_acb.c | 1 - drivers/i2c/i2c-dev.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/infiniband/ulp/iser/iser_verbs.c | 1 - drivers/input/evdev.c | 1 - drivers/input/input.c | 1 -[... etc. pp. ...]
Quoted 4 lines
sound/oss/swarm_cs4297a.c | 1 - sound/oss/trident.c | 1 - sound/oss/via82cxxx_audio.c | 1 - 166 files changed, 166 deletions(-)
Quoted 6 lines
[...]
I am afraid in many of these cases a proper cleanup would _replace_ the include by the correct one, not just delete it. For example,
drivers/ieee1394/raw1394.cshould includelinux/spinlock.h. AFAICS it does so at the moment only indirectly via another header.
I don't think that we can fix it all at once. This is just one step. AFAICT for raw1394.c, it's not incorrect as is, but more is needed, sure.
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
What Al is doing is good stuff, but I'd still prefer to see an even better tool, like gcc-preprocessor or sparse based (I guess).
---
~Randy
Re: dealing with excessive includes
Quoted 9 lines · Randy Dunlap
Quoted 4 lines · On Fri, 20 Oct 2006 11:26:58 +0200 Stefan Richter wrote:
I am afraid in many of these cases a proper cleanup would _replace_ the include by the correct one, not just delete it. For example,
drivers/ieee1394/raw1394.cshould includelinux/spinlock.h. AFAICS it does so at the moment only indirectly via another header.I don't think that we can fix it all at once. This is just one step. AFAICT for
raw1394.c, it's not incorrect as is, but more is needed, sure.
Yes, it's probably still correct after your patch. I just referred to the sensible rule that necessary headers should be directly included where they are used, not indirectly via other headers.
Quoted 2 lines
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
Me neither. I manually cleansed the ieee1394 core's and sbp2's includes recently; this is a mind-numbing janitorial job.
Quoted 2 lines
What Al is doing is good stuff, but I'd still prefer to see an even better tool, like gcc-preprocessor or sparse based (I guess).
On the surface, tools like LXR and cscope "know" where function are declared or macros and types are defined. But oftentimes, other headers than these tools turn up are to be included by API users. Cf. the definition of atomic_t. (IOW the "necessary" header is not always the one which has the actual definition.)
Signature · 3 lines
Stefan Richter -=====-=-==- =-=- =-=-- http://arcgraph.de/sr/
Re: dealing with excessive includes
In reply to Randy DunlapQuoted 2 lines · Randy Dunlap
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
BTW, what about making sure all header files are self-contained (i.e. all header files include all stuff they need)? This would make it easier for the users to know which files to include.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: dealing with excessive includes
Quoted 7 lines · Geert Uytterhoeven
Quoted 2 lines · Randy Dunlap
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
BTW, what about making sure all header files are self-contained (i.e. all header files include all stuff they need)? This would make it easier for the users to know which files to include.
Would be a worthy goal imho. Can it be done with scripts?
-Andi
Re: dealing with excessive includes
Quoted 10 lines · Andi Kleen
Quoted 7 lines · Geert Uytterhoeven
Quoted 2 lines · Randy Dunlap
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
BTW, what about making sure all header files are self-contained (i.e. all header files include all stuff they need)? This would make it easier for the users to know which files to include.
Would be a worthy goal imho. Can it be done with scripts?
Making them self-contained or checking whether they are? :-)
The latter is simple, just compile each of them into dummy object files, which should give no compile errors.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: dealing with excessive includes
Quoted 7 lines · Geert Uytterhoeven
Quoted 2 lines
Would be a worthy goal imho. Can it be done with scripts?
Making them self-contained or checking whether they are? :-)
The latter is simple, just compile each of them into dummy object files, which should give no compile errors.
It's _not_ simple. Not at all.
We have tons of issues that depend on config variables and architecture details.
It's hard.
Linus
Re: dealing with excessive includes
Quoted 5 lines · Linus Torvalds
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line
Would be a worthy goal imho. Can it be done with scripts?
Making them self-contained or checking whether they are? :-)
Quoted 7 lines
Quoted 2 lines
The latter is simple, just compile each of them into dummy object files, which should give no compile errors.
It's _not_ simple. Not at all.
We have tons of issues that depend on config variables and architecture details.
Indeed, so the config variables and architecture details should be handled in the include files, not in the (multiple) users of those include files.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: dealing with excessive includes
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines
We have tons of issues that depend on config variables and architecture details.
Indeed, so the config variables and architecture details should be handled in the include files, not in the (multiple) users of those include files.
The point is - _verifying_ that is actually hard.
If some inline function depends on a particular header, you'll have a hard time checking for that if there's an #ifdef around it. Which is not uncommon, we have things like:
#ifdef CONFIG_PROCFS
.. number of inline functions ..
#else
#define function1(a,b,c) do { } while (0)
...
#endifso I'm just saying that "just compile it" is _not_ a way of verifying that the header file is complete - because it may well be complete for the particular config you're testing, but not for some other.
So this is a hard problem. If it was easy, we'd not _have_ the problem in the first place.
Linus
Re: dealing with excessive includes
Quoted 20 lines · Linus Torvalds
Quoted 5 lines · Geert Uytterhoeven
Quoted 2 lines
We have tons of issues that depend on config variables and architecture details.
Indeed, so the config variables and architecture details should be handled in the include files, not in the (multiple) users of those include files.
The point is - _verifying_ that is actually hard.
If some inline function depends on a particular header, you'll have a hard time checking for that if there's an #ifdef around it. Which is not uncommon, we have things like:
#ifdef CONFIG_PROCFS .. number of inline functions .. #else #define function1(a,b,c) do { } while (0) ... #endif
Quoted 6 lines
so I'm just saying that "just compile it" is _not_ a way of verifying that the header file is complete - because it may well be complete for the particular config you're testing, but not for some other.
So this is a hard problem. If it was easy, we'd not _have_ the problem in the first place.
I agree _verifying_ this for all config and arch combinations is hard. But my point is that right now we're `solving' this at the user (of the include) level, which is an order of magnitude more work.
If the includes were (sufficiently) self-contained, the driver writers would have to care less about config/arch dependencies.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: dealing with excessive includes
Quoted 6 lines · Geert Uytterhoeven
I agree _verifying_ this for all config and arch combinations is hard. But my point is that right now we're `solving' this at the user (of the include) level, which is an order of magnitude more work.
If the includes were (sufficiently) self-contained, the driver writers would have to care less about config/arch dependencies.
But header files already basically are self-contained. They didn't always use to be that way, but over the years, we've generally made them that way in almost all cases.
The problem is generally not that they aren't self-contained, it's that they bring in other things depending on architecture, and then some driver depends on a header file including other header files, even when that isn't always the case at all: exactly because which header file it includes depends on config options (to a small degree) and on architecture (to a much larger degree).
Linus
Re: dealing with excessive includes
In reply to Geert UytterhoevenQuoted 7 lines · Geert Uytterhoeven
Quoted 2 lines · Randy Dunlap
Yes, we have lots of header include indirection going on. I don't know of a good tool to detect/fix it.
BTW, what about making sure all header files are self-contained (i.e. all header files include all stuff they need)? This would make it easier for the users to know which files to include.
I was wondering about putting in some tags in comments in the headers and using scripts to parse them out. Something like:
/*+
* Provides: struct sched
* Provides: total_forks, nr_threads, process_counts, nr_processes()
* Provides: nr_running(), nr_uninterruptible(), nr_active(), nr_iowait(), weighted_cpuload() */
(you should be able to have multiple /*+ blocks in the file, multiple
Provides: lines and multiple things provided on a line. Functions are tagged with a trailing (), structs with the leading 'struct' and everything else is a variable.)
Not only does that tell a script unambiguously which header needs to be included for what function, struct definition and variable, it also tells the programmer what header to include for what function.
This would have the benefit over automated analysis that you can put
Provides: irq_canonicalize() in <linux/interrupt.h> despite it being actually defined in <asm/irq.h> (there's probably better examples than this).
The script could warn for both unnecessary headers included and warn for headers which weren't included but should be. The warnings would start out fairly useful and improve as we added more Provides: lines.
Anyone want to code this, or just pick holes in it?
Re: dealing with excessive includes
Quoted 6 lines
/*+
* Provides: struct sched
* Provides:total_forks,nr_threads,process_counts,nr_processes()
* Provides:nr_running(),nr_uninterruptible(),nr_active(),nr_iowait(),weighted_cpuload()*/
That's ugly. If it needs that i don't think it's a good idea. We really want standard C, not some Linux dialect.
In theory it is even to do it automated without comments
just based on the referenced symbols, except if stuff is hidden in macros (but then the include defining the macro should have the right includes anyways). Another issue would be different name spaces - if there is both typedef foo and struct foo and nested local foo a script might have a little trouble distingushing them, but i suspect that won't be a big issue.
-Andi
Re: dealing with excessive includes
Quoted 9 lines · Andi Kleen
Quoted 6 lines
/*+
* Provides: struct sched
* Provides:total_forks,nr_threads,process_counts,nr_processes()
* Provides:nr_running(),nr_uninterruptible(),nr_active(),nr_iowait(),weighted_cpuload()*/That's ugly. If it needs that i don't think it's a good idea. We really want standard C, not some Linux dialect.
Um, that's a comment. It's standard C.
Quoted 6 lines
In theory it is even to do it automated without comments
just based on the referenced symbols, except if stuff is hidden in macros (but then the include defining the macro should have the right includes anyways). Another issue would be different name spaces - if there is both typedef foo and struct foo and nested local foo a script might have a little trouble distingushing them, but i suspect that won't be a big issue.
Sorry, I assumed you'd've spent some time thinking about the problem.
Here's the problem. If a file needs canonicalize_irq(), it should include <linux/interrupt.h> (which eventually ends up including asm/irq,h), and not <asm/irq.h> (where it's defined). If a file needs add_wait_queue(), it should include <linux/wait.h> (where it's defined) and not <linux/fs.h> (which directly includes linux/wait.h>.
Please define an algorithm which distinguishes the two cases.
Re: dealing with excessive includes
Quoted 8 lines · Matthew Wilcox
Quoted 7 lines · Andi Kleen
Quoted 6 lines
/*+
* Provides: struct sched
* Provides:total_forks,nr_threads,process_counts,nr_processes()
* Provides:nr_running(),nr_uninterruptible(),nr_active(),nr_iowait(),weighted_cpuload()*/
Quoted 4 lines
Quoted 2 lines
That's ugly. If it needs that i don't think it's a good idea. We really want standard C, not some Linux dialect.
Um, that's a comment. It's standard C.
If you require it to do something it isn't a comment anymore -- it would become a language extension.
Quoted 9 lines
Here's the problem. If a file needs
canonicalize_irq(), it should include <linux/interrupt.h> (which eventually ends up including asm/irq,h), and not <asm/irq.h> (where it's defined). If a file needsadd_wait_queue(), it should include <linux/wait.h> (where it's defined) and not <linux/fs.h> (which directly includeslinux/wait.h>.Please define an algorithm which distinguishes the two cases.
Needs are inside {} or in a macro definition
So if the identifier happens after #define or inside {} assume the symbol is needed from somewhere else, otherwise it is declared here.
That is likely not 100% foolproof, but should be good enough and the mismatches can be resolved by hand.
-Andi
Re: dealing with excessive includes
Quoted 9 lines · Andi Kleen
Quoted 8 lines · Matthew Wilcox
Quoted 7 lines · Andi Kleen
Quoted 6 lines
/*+
* Provides: struct sched
* Provides:total_forks,nr_threads,process_counts,nr_processes()
* Provides:nr_running(),nr_uninterruptible(),nr_active(),nr_iowait(),weighted_cpuload()*/
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
That's ugly. If it needs that i don't think it's a good idea. We really want standard C, not some Linux dialect.
Um, that's a comment. It's standard C.
If you require it to do something it isn't a comment anymore -- it would become a language extension.
How is this any different from __iomem annotations?
Quoted 7 lines
Quoted 7 lines
Here's the problem. If a file needs
canonicalize_irq(), it should include <linux/interrupt.h> (which eventually ends up including asm/irq,h), and not <asm/irq.h> (where it's defined). If a file needsadd_wait_queue(), it should include <linux/wait.h> (where it's defined) and not <linux/fs.h> (which directly includeslinux/wait.h>.
Quoted 8 lines
Quoted 1 line
Please define an algorithm which distinguishes the two cases.
Needs are inside {} or in a macro definition
So if the identifier happens after #define or inside {} assume the symbol is needed from somewhere else, otherwise it is declared here.That is likely not 100% foolproof, but should be good enough and the mismatches can be resolved by hand.
Let me try to explain the problem again, because what you wrote has nothing to do with the problem.
canonicalize_irq() is defined in <asm/irq.h>. No .c file should be including <asm/irq.h> in order to get it. It should be including <linux/interrupt.h>, which will indirectly pull in <asm/irq.h>
add_wait_queue() is defined in <linux/wait.h>. .c files wishing to use add_wait_queue() should be including <linux/wait.h> rather than relying on it being pulled in through some other path.
This needs annotations to fix, or a big bag of unreliable heuristics.
Re: dealing with excessive includes
Quoted 2 lines
This needs annotations to fix, or a big bag of unreliable heuristics.
Ok you're right that case would need annotations.
I retreat my earlier statement that self sufficient include files are a good idea. If it needs such hacks to do it it's probably not worth it. After all it won't fix a single bug.
-Andi
Re: dealing with excessive includes
Quoted 3 lines · Andi Kleen
Quoted 1 line
This needs annotations to fix, or a big bag of unreliable heuristics.
Ok you're right that case would need annotations.
Annotations are a different thing. Personally, I don't like adding them.
Quoted 3 lines
I retreat my earlier statement that self sufficient include files are a good idea. If it needs such hacks to do it it's probably not worth it. After all it won't fix a single bug.
- It will fix bugs of the type: add #include <x.h> to y.c because on some architectures x.h isn't automatically pulled in by z.h.
- It would help in cleaning up the zillions of includes in the .c files, decreasing compile time.
- It would make it easier for developers, since if you need something, you just have to explicitly include the header file that defines it, and not have to find out the hard way what other stuff to include.
I agree, that's not that many `real bugs'.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: dealing with excessive includes
In reply to Matthew WilcoxQuoted 36 lines · On Sun, 22 Oct 2006 19:36:04 -0600 Matthew Wilcox wrote:
Quoted 9 lines · Andi Kleen
Quoted 8 lines · Matthew Wilcox
Quoted 7 lines · Andi Kleen
Quoted 6 lines
/*+
* Provides: struct sched
* Provides:total_forks,nr_threads,process_counts,nr_processes()
* Provides:nr_running(),nr_uninterruptible(),nr_active(),nr_iowait(),weighted_cpuload()*/Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
That's ugly. If it needs that i don't think it's a good idea. We really want standard C, not some Linux dialect.
Um, that's a comment. It's standard C.
If you require it to do something it isn't a comment anymore -- it would become a language extension.
How is this any different from
__iomemannotations?Quoted 7 lines
Quoted 7 lines
Here's the problem. If a file needs
canonicalize_irq(), it should include <linux/interrupt.h> (which eventually ends up including asm/irq,h), and not <asm/irq.h> (where it's defined). If a file needsadd_wait_queue(), it should include <linux/wait.h> (where it's defined) and not <linux/fs.h> (which directly includeslinux/wait.h>.Quoted 8 lines
Quoted 1 line
Please define an algorithm which distinguishes the two cases.
Needs are inside {} or in a macro definition
So if the identifier happens after #define or inside {} assume the symbol is needed from somewhere else, otherwise it is declared here.That is likely not 100% foolproof, but should be good enough and the mismatches can be resolved by hand.
Quoted 6 lines
Let me try to explain the problem again, because what you wrote has nothing to do with the problem.
canonicalize_irq()is defined in <asm/irq.h>. No .c file should be including <asm/irq.h> in order to get it. It should be including <linux/interrupt.h>, which will indirectly pull in <asm/irq.h>
We can add #error or #warning to asm/irq.h when that is done & detected hence caught and will be fixed.
Don't we already have a few like that? ("don't include this file directly") I looked quickly but didn't see them...
Quoted 5 lines
add_wait_queue()is defined in <linux/wait.h>. .c files wishing to useadd_wait_queue()should be including <linux/wait.h> rather than relying on it being pulled in through some other path.This needs annotations to fix, or a big bag of unreliable heuristics.
---
~Randy
Re: dealing with excessive includes
In reply to Matthew WilcoxQuoted 7 lines · Matthew Wilcox
Let me try to explain the problem again, because what you wrote has nothing to do with the problem.
canonicalize_irq()is defined in <asm/irq.h>. No .c file should be including <asm/irq.h> in order to get it. It should be including <linux/interrupt.h>, which will indirectly pull in <asm/irq.h>
Quoted 5 lines
add_wait_queue()is defined in <linux/wait.h>. .c files wishing to useadd_wait_queue()should be including <linux/wait.h> rather than relying on it being pulled in through some other path.This needs annotations to fix, or a big bag of unreliable heuristics.
Does fixing it really fix anything? I agree that cleaning it all up would be great. But the aim should be to make less work for developers, rather than more.
If you have an
#ifndef _LINUX_INTERRUPT_H
#error ...
That almost explicitly tells you which is the correct file to include to get all definitions from this file. Wouldn't that help?
Signature · 2 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
Re: dealing with excessive includes
Nick Piggin wrote:
...
Quoted 7 lines
If you have an
#ifndef
_LINUX_INTERRUPT_H
#error ...That almost explicitly tells you which is the correct file to include to get all definitions from this file. Wouldn't that help?
This can even be evaluated by a script that searches for required header files, except if more than one of such clauses appear in a file.
Signature · 3 lines
Stefan Richter -=====-=-==- =-=- =-=== http://arcgraph.de/sr/
Re: dealing with excessive includes
In reply to Linus TorvaldsQuoted 9 lines
include/linux/fs.h enum { · line 984
Quoted 6 lines
include/linux/fs.h +5
-0+#define lock_super (x) do { \ + struct super_block *sb = x; \ + get_fs_excl(); \ + mutex_lock(&sb->s_lock); \ +} while(0)Don't do this. The "x" passed in may be "sb", and then you end up with bogus code.
So how about:
static inline void lock_super(struct super_block *sb)
{
get_fs_excl();
mutex_lock(&sb->s_lock);
return;
}which avoids any naming issue.
-`J'
Re: dealing with excessive includes
Quoted 3 lines · Jan Engelhardt
So how about:
static inline void
lock_super(struct super_block *sb)
Please start again at the top of the thread. Thanks.
Quoted 2 lines · Al Viro
There are several #includes with very high impact; the worst happens to be
module.h->sched.h
I gave up fighting to get that fixed a year and a half ago..
http://lkml.org/lkml/2005/1/26/11
rediffing trees with lots of include file juggling gets boring real fast.
At one point, this was actually a noticable compile time win.
The other problem with things like this is they have a tendancy to creep back in when no-one is specifically looking for them.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 9 lines · Dave Jones
Quoted 2 lines · Al Viro
There are several #includes with very high impact; the worst happens to be
module.h->sched.hI gave up fighting to get that fixed a year and a half ago..
http://lkml.org/lkml/2005/1/26/11rediffing trees with lots of include file juggling gets boring real fast.
I don't see a lot of files touched by that one...
arch/i386/kernel/alternative.c | 1 + arch/i386/kernel/cpu/mcheck/therm_throt.c | 1 + drivers/base/cpu.c | 1 + drivers/hwmon/abituguru.c | 1 + drivers/leds/ledtrig-ide-disk.c | 1 + drivers/leds/ledtrig-timer.c | 1 + drivers/scsi/scsi_transport_sas.c | 1 + drivers/w1/slaves/w1_therm.c | 1 + include/asm-x86_64/elf.h | 1 - include/linux/acct.h | 1 + include/linux/module.h | 3 ++- include/linux/phy.h | 2 ++ include/scsi/libiscsi.h | 2 ++ kernel/latency.c | 1 + kernel/module.c | 2 +-
is hardly a lot.
That's the point, actually - apparently we have several high-impact includes that are easy to sever and that are really worth being severed. The part that was not aproiri obvious:
* there are clusters of headers around certain dependency
counts.
* such clusters tend to have leaders - header that pulls the
rest and even though other headers are apparently independently included, all such includes end up being hidden by includes of the leader.
* gaps between the clusters are pretty large.
* dependency graph *on* *clusters* is worth being studied; includes
of cluster leader from cluster around slightly smaller dependency count are prime targets for severing.
That is the new part here. Not just "dependency graph is a mess and ought to be cleaned up" - _that_ is neither new nor particulary useful...
Quoted 13 lines · Al Viro
That's the point, actually - apparently we have several high-impact includes that are easy to sever and that are really worth being severed. The part that was not aproiri obvious:
* there are clusters of headers around certain dependency
counts.
* such clusters tend to have leaders - header that pulls the
rest and even though other headers are apparently independently included, all such includes end up being hidden by includes of the leader.
* gaps between the clusters are pretty large.
* dependency graph *on* *clusters* is worth being studied; includes
of cluster leader from cluster around slightly smaller dependency count are prime targets for severing.
Quoted 2 lines
That is the new part here. Not just "dependency graph is a mess and ought to be cleaned up" - _that_ is neither new nor particulary useful...
Well, logically for any given .config a set of all kernel header files define a set of typedefs, structs, functions and so on.
If only we can read and parse them just once, and then reuse already parsed information when we compile each .c file - that will give you the biggest time savings.
gcc has some facility for that ("precompiled headers")
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html
I don't know how hard it will be to adapt build system to using that and there is a danger that using this thing will increase recompile times when you change just a few CONFIG_XXXs. --
vda
Quoted 6 lines · Denis Vlasenko
Well, logically for any given .config a set of all kernel header files define a set of typedefs, structs, functions and so on.
If only we can read and parse them just once, and then reuse already parsed information when we compile each .c file - that will give you the biggest time savings.
Quoted 6 lines
gcc has some facility for that ("precompiled headers")
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.htmlI don't know how hard it will be to adapt build system to using that and there is a danger that using this thing will increase recompile times when you change just a few
CONFIG_XXXs.
Or when you touch a single header. A brialliant idea, that.
Quoted 1 line · Al Viro
*
sizeof(*ptr)should be one of 1, 2, 4, 8
Should we give an error if someone tries passing a 1-byte-sized memory location to get/put_unaligned()? I suspect it might be best to reduce to a trivial direct assignment in that case.
David
Quoted 7 lines · David Howells
Quoted 1 line · Al Viro
*
sizeof(*ptr)should be one of 1, 2, 4, 8Should we give an error if someone tries passing a 1-byte-sized memory location to get/put_unaligned()? I suspect it might be best to reduce to a trivial direct assignment in that case.
Note that in some cases, you have different architectures having different sizes, and it could potentially be the case that one architecture has a 1-byte thing, and another has a 2-byte thing.
It's unlikely to be an issue for single-byte cases, but it definitely happens for other equivalent things (ie "get_user()" often has 2 vs 4-byte accesses, and obviously the 4- vs 8-byte thing through 32/64-bit values depending on the size of the machine).
So at least in _theory_ it's quite possible that a single-byte access can make sense, simply because the size might depend on a config option.
Linus