All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree
@ 2011-05-20  6:12 Stephen Rothwell
  2011-05-20 15:24 ` Linus Torvalds
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2011-05-20  6:12 UTC (permalink / raw)
  To: David Miller, Linus; +Cc: linux-next, linux-kernel

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

In file included from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/sparc/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function 'spin_unlock_wait':
include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'

Probably the victim of some include changing ... I think it was due to
commit e66eed651fd1 ("list: remove prefetching from regular list
iterators").

I added the following patch for today (this may not be the best solution):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 May 2011 15:48:17 +1000
Subject: [PATCH] spinlock_up.h: include asm/processor.h in for cpu_relax

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h and this was
a path to including asm/processor.h.  We need to include it excplicitly
now.

Fixes this build error on sparc32 (at least):

In file included from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/sparc/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function 'spin_unlock_wait':
include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/spinlock_up.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h
index b14f6a9..a26e2fb 100644
--- a/include/linux/spinlock_up.h
+++ b/include/linux/spinlock_up.h
@@ -5,6 +5,8 @@
 # error "please don't include this file directly"
 #endif
 
+#include <asm/processor.h>	/* for cpu_relax() */
+
 /*
  * include/linux/spinlock_up.h - UP-debug version of spinlocks.
  *
-- 
1.7.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: linux-next: build failure after merge of the final tree
  2011-05-20  6:12 linux-next: build failure after merge of the final tree Stephen Rothwell
@ 2011-05-20 15:24 ` Linus Torvalds
  2011-05-20 16:16   ` Thomas Gleixner
  2011-05-23  9:09     ` Ingo Molnar
  0 siblings, 2 replies; 15+ messages in thread
From: Linus Torvalds @ 2011-05-20 15:24 UTC (permalink / raw)
  To: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Ingo Molnar
  Cc: David Miller, linux-next, linux-kernel, x86

On Thu, May 19, 2011 at 11:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:

Hmm. So I had actually done a "allyesconfig" build on x86, which
annoys me. Because it means that the extra "let's compile everything
to make sure I didn't break anything" was just almost totally
worthless.

What seems to be happening is that the x86 <asm/uaccess.h> include
ends up getting the <linux/prefetch.h>.

I have *no* idea why x86 does that, but x86 wants prefetch.h *so* much
that it actually includes it first in <asm/uaccess.h> and then *again*
in each of the 32/64-bit specific <asm/uaccess_[32,64].h> header
files.

That seems a bit excessive. I don't think x86 should include
<linux/prefetch.h> at all, since (a) it doesn't actually use any of
it, and (b) it ended up hiding this problem from me.

Thomas, Ingo, Peter: would you be willing to just remove that stupid
header file inclusion and fix up the fallout? Instead of having these
one-by-one patches that come from Stephen testing out breakage on
other architectures that x86 simply hid due to its odd include files?

                                         Linus

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: linux-next: build failure after merge of the final tree
  2011-05-20 15:24 ` Linus Torvalds
@ 2011-05-20 16:16   ` Thomas Gleixner
  2011-05-20 16:29     ` Linus Torvalds
  2011-05-23  9:09     ` Ingo Molnar
  1 sibling, 1 reply; 15+ messages in thread
From: Thomas Gleixner @ 2011-05-20 16:16 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, H. Peter Anvin, Ingo Molnar, David Miller,
	linux-next, linux-kernel, x86

On Fri, 20 May 2011, Linus Torvalds wrote:
> On Thu, May 19, 2011 at 11:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (sparc32 defconfig)
> > failed like this:
> 
> Hmm. So I had actually done a "allyesconfig" build on x86, which
> annoys me. Because it means that the extra "let's compile everything
> to make sure I didn't break anything" was just almost totally
> worthless.
> 
> What seems to be happening is that the x86 <asm/uaccess.h> include
> ends up getting the <linux/prefetch.h>.
> 
> I have *no* idea why x86 does that, but x86 wants prefetch.h *so* much
> that it actually includes it first in <asm/uaccess.h> and then *again*
> in each of the 32/64-bit specific <asm/uaccess_[32,64].h> header
> files.
> 
> That seems a bit excessive. I don't think x86 should include
> <linux/prefetch.h> at all, since (a) it doesn't actually use any of
> it, and (b) it ended up hiding this problem from me.
> 
> Thomas, Ingo, Peter: would you be willing to just remove that stupid
> header file inclusion and fix up the fallout? Instead of having these
> one-by-one patches that come from Stephen testing out breakage on
> other architectures that x86 simply hid due to its odd include files?

Removed it, but it does not break anything on x86 because
linux/thread_info.h includes asm/thread_info.h which includes
asm/processor.h on x86 for non obvious reasons.

Thanks,

	tglx




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: linux-next: build failure after merge of the final tree
  2011-05-20 16:16   ` Thomas Gleixner
@ 2011-05-20 16:29     ` Linus Torvalds
  0 siblings, 0 replies; 15+ messages in thread
From: Linus Torvalds @ 2011-05-20 16:29 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Stephen Rothwell, H. Peter Anvin, Ingo Molnar, David Miller,
	linux-next, linux-kernel, x86

On Fri, May 20, 2011 at 9:16 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Removed it, but it does not break anything on x86 because
> linux/thread_info.h includes asm/thread_info.h which includes
> asm/processor.h on x86 for non obvious reasons.

Ahh. "mm_segment_t".

Some other architectures do it in their <asm/segment.h>

And looking at it, we could just do it in thread_info.h itself. I dunno.

At *some* point it would be really nice to try to minimize the header
files, I suspect we spend a lot of time compiling just parsing the
crud most people never need.

(In fact, from my sparse days, I pretty much guarantee that is the case)

                Linus

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-20 15:24 ` Linus Torvalds
@ 2011-05-23  9:09     ` Ingo Molnar
  2011-05-23  9:09     ` Ingo Molnar
  1 sibling, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2011-05-23  9:09 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, David Miller,
	linux-next, linux-kernel, x86, Peter Zijlstra, Andrew Morton


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, May 19, 2011 at 11:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (sparc32 defconfig)
> > failed like this:
> 
> Hmm. So I had actually done a "allyesconfig" build on x86, which
> annoys me. Because it means that the extra "let's compile everything
> to make sure I didn't break anything" was just almost totally
> worthless.
> 
> What seems to be happening is that the x86 <asm/uaccess.h> include
> ends up getting the <linux/prefetch.h>.
> 
> I have *no* idea why x86 does that, but x86 wants prefetch.h *so* much
> that it actually includes it first in <asm/uaccess.h> and then *again*
> in each of the 32/64-bit specific <asm/uaccess_[32,64].h> header
> files.
>
> That seems a bit excessive. I don't think x86 should include 
> <linux/prefetch.h> at all, since (a) it doesn't actually use any of it, and 
> (b) it ended up hiding this problem from me.

Most definitely.

> Thomas, Ingo, Peter: would you be willing to just remove that stupid header 
> file inclusion and fix up the fallout? Instead of having these one-by-one 
> patches that come from Stephen testing out breakage on other architectures 
> that x86 simply hid due to its odd include files?

Agreed - i see you've done this with commit 268bb0ce.

I've done some kernel change archeology, and the prefetch.h inclusion was done 
for hysterical reasons:

 - In Feb 2002 we added prefetch() to uaccess*.h, see this commit in 
   linux-2.6-historic.git, introducing prefetch() in 
   include/asm-i386/uaccess.h::__constant_copy_to_user():

    1d66e22e0f6b: v2.4.9.8 -> v2.4.9.9

   ( I *think* paulus did it as part of preparing more PowerPC changes - but 
     it's not explicitly mentioned in the changelog.)

 - the x86_64 fork copied the asm-i386 prefetch() so now 64-bit had it too

 - In Sep 2002 this commit from Andrew removed the prefetch() from the i386 
   uaccess.h header:

     0a7bf9c89604: [PATCH] uninline the ia32 copy_*_user functions

   But did not declare this in the changelog - nor did it remove the 
   (now dangling) prefetch.h.

 - In Sep 2003 this x86_64 commit removed the prefetch() usage from the 64-bit 
   uaccess.h as well:

      24594a2bfcaa: [PATCH] x86-64 merge

     - Remove some unneeded prefetches.  Just two are enough to kickstart
       the hardware prefetcher.

   But despite touching prefetches explicitly, this too sloppily left the (now
   dangling) prefetch.h include file around.

 - 8 years later it was still around.

Such thing happen due to:

 - header files only get added, almost never removed

The key thing was that the build did not break when prefetch.h was kept 
dangling. Not sure what to do about that - for humans a dangling header is 
absolutely non-obvious to find - we'd need tooling help.

Especially since a tight (or bloated) header file hierarchy directly impacts 
our build performance. For example kernel/fork.c has 1700 lines of code in it, 
but after preprocessing it has 30x times as much code (!):

 earth4:~/tip> wc -l kernel/fork.c kernel/fork.i
    1691 kernel/fork.c
   49385 kernel/fork.i

While fork.c is definitely a central file which has to know about almost all 
other subsystem's structure definitions, the #include situation is still 
somewhat obscene.

For smaller subsystems it's in fact *worse*:

 earth4:~/tip> wc -l kernel/pid.[ci]
     570 kernel/pid.c
   38724 kernel/pid.i.vanilla

That's a 60x size bloat! The compiler will run *significantly* slower with 
increasing source code size - it has to parse through those duplications and 
has to process those many inlines as well.

Here's a quick hack and a perf stat measurement showing the effect in action. 

I've attached a totally hacky patch that removes all the big #include's from 
kernel/pid.c and includes all structure and API definitions explicitly.

( Note: near the end it was getting really tedious so i took some shortcuts
  and hacks just to make it build - it's a broken kernel otherwise.  Object 
  file size is still similar so i have not taken too many shortcuts, at least 
  as far as compilation speed goes. )

Firstly, the effective file size results are:

 aldebaran:~/linux/linux> wc -l kernel/pid.c kernel/pid.i.*
     570 kernel/pid.c.vanilla
   38724 kernel/pid.i.vanilla

    3006 kernel/pid.c.slim
    2542 kernel/pid.i.slim

So the 38 KLOC bloat was cut down to 2.5 KLOC - a more than 10x improvement.

Even considering the invalid shortcuts i took to make this build, halving the 
bloat would be quite realistic.

What effect does include file bloat have on kernel build speed?

I've measured the build time of kernel/pid.o - with no Make overhead, just the 
cc command itself:

 gcc -Wp,-MD,kernel/.pid.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.6.0/include -I/home/mingo/tip/arch/x86/include -Iinclude  -include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pid)"  -D"KBUILD_MODNAME=KBUILD_STR(pid)" -c -o kernel/pid.o kernel/pid.c

The results are pretty interesting:

 | Vanilla pid.c :
 -----------------

 $ perf stat -e task-clock --repeat 10 ./build-pid 

 Performance counter stats for './build-pid' (10 runs):

        223.500413 task-clock                #    1.010 CPUs utilized            ( +-  0.10% )

       0.221370168 seconds time elapsed                                          ( +-  0.20% )

 | Debloated pid.c :
 -------------------

 $ perf stat -e task-clock --repeat 10 ./build-pid 

 Performance counter stats for './build-pid' (10 runs):

         97.488258 task-clock                #    1.019 CPUs utilized            ( +-  0.06% )

       0.095649333 seconds time elapsed                                          ( +-  0.15% )

So we got a 56.4% kernel build speedup from the debloating! Note, i used the 
latest available version of GCC, 4.6.0.

Put differently, our bloat is causing a 2.3x slowdown in kernel build speed 
right now (!).

Where does the bloat come from? Here's the rough distribution (by line numbers):

29:/*-- basic kernel types: ---------------------------------------------------*/
32:/*-- RCU header - should move into types.h? ---------------------------------------------------*/
39:/*-- pid.h types: ---------------------------------------------------*/
49:/*-- sched.h, rbnode.h dependency: ---------------------------------------------------*/
67:/*-- sched.h, scheduler state: ---------------------------------------------------*/
164:/*-- sched.h, cpumask.h types: ---------------------------------------------------*/
174:/*-- sched.h, plist.h types: ---------------------------------------------------*/
190:/*-- sched.h, pid types: ---------------------------------------------------*/
198:/*-- sched.h, time types - needlessly arch dependent should move into types.h? -----------*/
216:/*-- sched.h, spinlock.h dependencies:  -----------*/
284:/*-- sched.h, ipc.h dependencies:  -----------*/
296:/*-- sched.h, signal state dependencies:  -----------*/
375:/*-- sched.h, arch thread state dependencies:  -----------*/
545:/*-- sched.h, seccomp state dependencies:  -----------*/
549:/*-- sched.h, IO accounting state dependencies:  -----------*/
587:/*-- sched.h, nodemask.h types:  -----------*/
599:/*-- sched.h, mutex type:  -----------*/
618:/*-- sched.h, perf event state:  -----------*/
681:/*-- sched.h, mm dirty state:  -----------*/
698:/*-- sched.h, task state:  -----------*/
1052:/*--  pid.c, PID type definitions:  -----------*/
1133:/*-- module.h arch dependency: ---------------------------------------------------*/
1149:/*-- module.h ELF dependencies: ---------------------------------------------------*/
1233:/*-- module.h sysfs dependencies: ---------------------------------------------------*/
1259:/*-- module.h's init.h dependency: -------------------------------*/
1263:/*-- module.h: ---------------------------------------------------*/
1730:/*-- pid.c API usage: ---------------------------------------------------*/
1731:/*-- preempt.h thread_info dependencies: --------------------------------*/
1732:/*-- preempt.h thread_info processor.h dependencies: --------------------*/
1738:/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
1778:/*-- preempt.h asm/thread_info.h page_types.h dependencies: --------------------*/
1783:/*-- preempt.h asm/thread_info.h dependencies: --------------------*/
1820:/*-- preempt.h linux/thread_info.h bitops.h dependencies (simplfied): --------------------*/
1838:/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
1866:/*-- rcu API preempt.h dependencies: ---------------------------------------------------*/
1925:/*-- pid.c sched.h API usage: ---------------------------------------------------*/
1932:/*-- pid.c cache.h API usage: ---------------------------------------------------*/
1950:/*-- pid.c spinlock.h API usage: ---------------------------------------------------*/
1962:/*-- pid.c atomic.h API usage: ---------------------------------------------------*/
2080:/*-- pid.c hash.h API usage: ---------------------------------------------------*/
2134:/*-- pid.c API (some of them nasty hacks/shortcuts): ----------------------------------------------*/
2474:/*-- pid.c C code: ---------------------------------------------------*/

Out of ~2400 lines of header files, half of it is task state. Most of the 
task_struct details that get defined are not used by pid.c! Much of this could 
be fixed by moving scheduler, signal, arch thread state details behind an 
opaque pointer. This would have runtime performance impact - but most likely a 
pretty minimal one.

A surprisingly large chunk are all the module.h details which brings in details 
like large elf.h definitions - despite pid.c only relying on the module code 
for the spurious use of EXPORT_SYMBOL primitives. Fixing this would cause no 
runtime overhead AFAICS.

Another big chunk are the RCU definitions and APIs. These too are inlined for 
performance reasons - and that seems justified.

Anway, what i tried to demonstrate with this mail how much *real* slowdown in 
the kernel build our current header file bloat is causing. We could literally 
halve our kernel build times if we fixed this!

Thanks,

	Ingo

-------------------->
Subject: pid.c: Ugly hacks to measure include file bloat
From: Ingo Molnar <mingo@elte.hu>
Date: Mon May 23 09:09:27 CEST 2011

Absolutely-NOT-Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/pid.c | 2458 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 2447 insertions(+), 11 deletions(-)

Index: linux/kernel/pid.c
===================================================================
--- linux.orig/kernel/pid.c
+++ linux/kernel/pid.c
@@ -26,16 +26,2452 @@
  *
  */
 
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/rculist.h>
-#include <linux/bootmem.h>
-#include <linux/hash.h>
-#include <linux/pid_namespace.h>
-#include <linux/init_task.h>
-#include <linux/syscalls.h>
+/*-- basic kernel types: ---------------------------------------------------*/
+#include <linux/types.h>
+
+/*-- RCU header - should move into types.h? ---------------------------------------------------*/
+
+struct rcu_head {
+	struct rcu_head *next;
+	void (*func)(struct rcu_head *head);
+};
+
+/*-- pid.h types: ---------------------------------------------------*/
+
+enum pid_type
+{
+	PIDTYPE_PID,
+	PIDTYPE_PGID,
+	PIDTYPE_SID,
+	PIDTYPE_MAX
+};
+
+/*-- sched.h, rbnode.h dependency: ---------------------------------------------------*/
+
+struct rb_node
+{
+	unsigned long  rb_parent_color;
+#define	RB_RED		0
+#define	RB_BLACK	1
+	struct rb_node *rb_right;
+	struct rb_node *rb_left;
+} __attribute__((aligned(sizeof(long))));
+    /* The alignment might seem pointless, but allegedly CRIS needs it */
+
+struct rb_root
+{
+	struct rb_node *rb_node;
+};
+
+
+/*-- sched.h, scheduler state: ---------------------------------------------------*/
+
+struct load_weight {
+	unsigned long weight, inv_weight;
+};
+
+
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
+struct sched_info {
+	/* cumulative counters */
+	unsigned long pcount;	      /* # of times run on this cpu */
+	unsigned long long run_delay; /* time spent waiting on a runqueue */
+
+	/* timestamps */
+	unsigned long long last_arrival,/* when we last ran on a cpu */
+			   last_queued;	/* when we were last queued to run */
+};
+#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
+
+#ifdef CONFIG_SCHEDSTATS
+struct sched_statistics {
+	u64			wait_start;
+	u64			wait_max;
+	u64			wait_count;
+	u64			wait_sum;
+	u64			iowait_count;
+	u64			iowait_sum;
+
+	u64			sleep_start;
+	u64			sleep_max;
+	s64			sum_sleep_runtime;
+
+	u64			block_start;
+	u64			block_max;
+	u64			exec_max;
+	u64			slice_max;
+
+	u64			nr_migrations_cold;
+	u64			nr_failed_migrations_affine;
+	u64			nr_failed_migrations_running;
+	u64			nr_failed_migrations_hot;
+	u64			nr_forced_migrations;
+
+	u64			nr_wakeups;
+	u64			nr_wakeups_sync;
+	u64			nr_wakeups_migrate;
+	u64			nr_wakeups_local;
+	u64			nr_wakeups_remote;
+	u64			nr_wakeups_affine;
+	u64			nr_wakeups_affine_attempts;
+	u64			nr_wakeups_passive;
+	u64			nr_wakeups_idle;
+};
+#endif
+
+struct sched_entity {
+	struct load_weight	load;		/* for load-balancing */
+	struct rb_node		run_node;
+	struct list_head	group_node;
+	unsigned int		on_rq;
+
+	u64			exec_start;
+	u64			sum_exec_runtime;
+	u64			vruntime;
+	u64			prev_sum_exec_runtime;
+
+	u64			nr_migrations;
+
+#ifdef CONFIG_SCHEDSTATS
+	struct sched_statistics statistics;
+#endif
+
+#ifdef CONFIG_FAIR_GROUP_SCHED
+	struct sched_entity	*parent;
+	/* rq on which this entity is (to be) queued: */
+	struct cfs_rq		*cfs_rq;
+	/* rq "owned" by this entity/group: */
+	struct cfs_rq		*my_q;
+#endif
+};
+
+struct sched_rt_entity {
+	struct list_head run_list;
+	unsigned long timeout;
+	unsigned int time_slice;
+	int nr_cpus_allowed;
+
+	struct sched_rt_entity *back;
+#ifdef CONFIG_RT_GROUP_SCHED
+	struct sched_rt_entity	*parent;
+	/* rq on which this entity is (to be) queued: */
+	struct rt_rq		*rt_rq;
+	/* rq "owned" by this entity/group: */
+	struct rt_rq		*my_q;
+#endif
+};
+
+/*-- sched.h, cpumask.h types: ---------------------------------------------------*/
+
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+
+#define BITS_TO_LONGS(nr)       DIV_ROUND_UP(nr, 8 * sizeof(long))
+
+#define NR_CPUS		CONFIG_NR_CPUS
+
+typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
+/*-- sched.h, plist.h types: ---------------------------------------------------*/
+
+struct plist_node {
+	int			prio;
+	struct list_head	prio_list;
+	struct list_head	node_list;
+};
+
+struct plist_head {
+	struct list_head node_list;
+#ifdef CONFIG_DEBUG_PI_LIST
+	raw_spinlock_t *rawlock;
+	spinlock_t *spinlock;
+#endif
+};
+
+/*-- sched.h, pid types: ---------------------------------------------------*/
+
+struct pid_link
+{
+	struct hlist_node node;
+	struct pid *pid;
+};
+
+/*-- sched.h, time types - needlessly arch dependent should move into types.h? -----------*/
+
+typedef unsigned long cputime_t;
+
+struct task_cputime {
+	cputime_t utime;
+	cputime_t stime;
+	unsigned long long sum_exec_runtime;
+};
+
+/* Alternate field names when used to cache expirations. */
+struct timespec {
+	__kernel_time_t	tv_sec;			/* seconds */
+	long		tv_nsec;		/* nanoseconds */
+};
+
+#define TASK_COMM_LEN 16
+
+/*-- sched.h, spinlock.h dependencies:  -----------*/
+
+typedef struct arch_spinlock {
+	unsigned int slock;
+} arch_spinlock_t;
+
+typedef struct {
+	unsigned int lock;
+} arch_rwlock_t;
+
+typedef struct raw_spinlock {
+	arch_spinlock_t raw_lock;
+#ifdef CONFIG_GENERIC_LOCKBREAK
+	unsigned int break_lock;
+#endif
+#ifdef CONFIG_DEBUG_SPINLOCK
+	unsigned int magic, owner_cpu;
+	void *owner;
+#endif
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map dep_map;
+#endif
+} raw_spinlock_t;
+
+#define SPINLOCK_MAGIC		0xdead4ead
+
+#define SPINLOCK_OWNER_INIT	((void *)-1L)
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define SPIN_DEP_MAP_INIT(lockname)	.dep_map = { .name = #lockname }
+#else
+# define SPIN_DEP_MAP_INIT(lockname)
+#endif
+
+#ifdef CONFIG_DEBUG_SPINLOCK
+# define SPIN_DEBUG_INIT(lockname)		\
+	.magic = SPINLOCK_MAGIC,		\
+	.owner_cpu = -1,			\
+	.owner = SPINLOCK_OWNER_INIT,
+#else
+# define SPIN_DEBUG_INIT(lockname)
+#endif
+
+#define __RAW_SPIN_LOCK_INITIALIZER(lockname)	\
+	{					\
+	.raw_lock = __ARCH_SPIN_LOCK_UNLOCKED,	\
+	SPIN_DEBUG_INIT(lockname)		\
+	SPIN_DEP_MAP_INIT(lockname) }
+
+#define __RAW_SPIN_LOCK_UNLOCKED(lockname)	\
+	(raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
+
+#define DEFINE_RAW_SPINLOCK(x)	raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
+
+typedef struct spinlock {
+	union {
+		struct raw_spinlock rlock;
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map))
+		struct {
+			u8 __padding[LOCK_PADSIZE];
+			struct lockdep_map dep_map;
+		};
+#endif
+	};
+} spinlock_t;
+
+/*-- sched.h, ipc.h dependencies:  -----------*/
+
+struct sem_undo_list {
+	atomic_t		refcnt;
+	spinlock_t		lock;
+	struct list_head	list_proc;
+};
+
+struct sysv_sem {
+	struct sem_undo_list *undo_list;
+};
+
+/*-- sched.h, signal state dependencies:  -----------*/
+
+typedef unsigned long sigset_t;
+
+struct sigpending {
+	struct list_head list;
+	sigset_t signal;
+};
+
+typedef union sigval {
+	int sival_int;
+	void __user *sival_ptr;
+} sigval_t;
+
+#define __ARCH_SI_PREAMBLE_SIZE	(3 * sizeof(int))
+
+#define SI_MAX_SIZE	128
+#define SI_PAD_SIZE	((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+
+#define __ARCH_SI_UID_T	__kernel_uid32_t
+
+#define __ARCH_SI_BAND_T long
+
+typedef struct siginfo {
+	int si_signo;
+	int si_errno;
+	int si_code;
+
+	union {
+		int _pad[SI_PAD_SIZE];
+
+		/* kill() */
+		struct {
+			__kernel_pid_t _pid;	/* sender's pid */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+		} _kill;
+
+		/* POSIX.1b timers */
+		struct {
+			__kernel_timer_t _tid;	/* timer id */
+			int _overrun;		/* overrun count */
+			char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+			sigval_t _sigval;	/* same as below */
+			int _sys_private;       /* not to be passed to user */
+		} _timer;
+
+		/* POSIX.1b signals */
+		struct {
+			__kernel_pid_t _pid;	/* sender's pid */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+			sigval_t _sigval;
+		} _rt;
+
+		/* SIGCHLD */
+		struct {
+			__kernel_pid_t _pid;	/* which child */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+			int _status;		/* exit code */
+			__kernel_clock_t _utime;
+			__kernel_clock_t _stime;
+		} _sigchld;
+
+		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+		struct {
+			void __user *_addr; /* faulting insn/memory ref. */
+#ifdef __ARCH_SI_TRAPNO
+			int _trapno;	/* TRAP # which caused the signal */
+#endif
+			short _addr_lsb; /* LSB of the reported address */
+		} _sigfault;
+
+		/* SIGPOLL */
+		struct {
+			__ARCH_SI_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
+			int _fd;
+		} _sigpoll;
+	} _sifields;
+} siginfo_t;
+
+/*-- sched.h, arch thread state dependencies:  -----------*/
+
+#define GDT_ENTRY_TLS_ENTRIES 3
+#define HBP_NUM 4
+
+struct desc_struct {
+	union {
+		struct {
+			unsigned int a;
+			unsigned int b;
+		};
+		struct {
+			u16 limit0;
+			u16 base0;
+			unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
+			unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
+		};
+	};
+} __attribute__((packed));
+
+struct i387_fsave_struct {
+	u32			cwd;	/* FPU Control Word		*/
+	u32			swd;	/* FPU Status Word		*/
+	u32			twd;	/* FPU Tag Word			*/
+	u32			fip;	/* FPU IP Offset		*/
+	u32			fcs;	/* FPU IP Selector		*/
+	u32			foo;	/* FPU Operand Pointer Offset	*/
+	u32			fos;	/* FPU Operand Pointer Selector	*/
+
+	/* 8*10 bytes for each FP-reg = 80 bytes:			*/
+	u32			st_space[20];
+
+	/* Software status information [not touched by FSAVE ]:		*/
+	u32			status;
+};
+
+struct i387_fxsave_struct {
+	u16			cwd; /* Control Word			*/
+	u16			swd; /* Status Word			*/
+	u16			twd; /* Tag Word			*/
+	u16			fop; /* Last Instruction Opcode		*/
+	union {
+		struct {
+			u64	rip; /* Instruction Pointer		*/
+			u64	rdp; /* Data Pointer			*/
+		};
+		struct {
+			u32	fip; /* FPU IP Offset			*/
+			u32	fcs; /* FPU IP Selector			*/
+			u32	foo; /* FPU Operand Offset		*/
+			u32	fos; /* FPU Operand Selector		*/
+		};
+	};
+	u32			mxcsr;		/* MXCSR Register State */
+	u32			mxcsr_mask;	/* MXCSR Mask		*/
+
+	/* 8*16 bytes for each FP-reg = 128 bytes:			*/
+	u32			st_space[32];
+
+	/* 16*16 bytes for each XMM-reg = 256 bytes:			*/
+	u32			xmm_space[64];
+
+	u32			padding[12];
+
+	union {
+		u32		padding1[12];
+		u32		sw_reserved[12];
+	};
+
+} __attribute__((aligned(16)));
+
+struct i387_soft_struct {
+	u32			cwd;
+	u32			swd;
+	u32			twd;
+	u32			fip;
+	u32			fcs;
+	u32			foo;
+	u32			fos;
+	/* 8*10 bytes for each FP-reg = 80 bytes: */
+	u32			st_space[20];
+	u8			ftop;
+	u8			changed;
+	u8			lookahead;
+	u8			no_update;
+	u8			rm;
+	u8			alimit;
+	struct math_emu_info	*info;
+	u32			entry_eip;
+};
+
+struct ymmh_struct {
+	/* 16 * 16 bytes for each YMMH-reg = 256 bytes */
+	u32 ymmh_space[64];
+};
+
+struct xsave_hdr_struct {
+	u64 xstate_bv;
+	u64 reserved1[2];
+	u64 reserved2[5];
+} __attribute__((packed));
+
+struct xsave_struct {
+	struct i387_fxsave_struct i387;
+	struct xsave_hdr_struct xsave_hdr;
+	struct ymmh_struct ymmh;
+	/* new processor state extensions will go here */
+} __attribute__ ((packed, aligned (64)));
+
+union thread_xstate {
+	struct i387_fsave_struct	fsave;
+	struct i387_fxsave_struct	fxsave;
+	struct i387_soft_struct		soft;
+	struct xsave_struct		xsave;
+};
+
+struct fpu {
+	union thread_xstate *state;
+};
+
+struct thread_struct {
+	/* Cached TLS descriptors: */
+	struct desc_struct	tls_array[GDT_ENTRY_TLS_ENTRIES];
+	unsigned long		sp0;
+	unsigned long		sp;
+#ifdef CONFIG_X86_32
+	unsigned long		sysenter_cs;
+#else
+	unsigned long		usersp;	/* Copy from PDA */
+	unsigned short		es;
+	unsigned short		ds;
+	unsigned short		fsindex;
+	unsigned short		gsindex;
+#endif
+#ifdef CONFIG_X86_32
+	unsigned long		ip;
+#endif
+#ifdef CONFIG_X86_64
+	unsigned long		fs;
+#endif
+	unsigned long		gs;
+	/* Save middle states of ptrace breakpoints */
+	struct perf_event	*ptrace_bps[HBP_NUM];
+	/* Debug status used for traps, single steps, etc... */
+	unsigned long           debugreg6;
+	/* Keep track of the exact dr7 value set by the user */
+	unsigned long           ptrace_dr7;
+	/* Fault info: */
+	unsigned long		cr2;
+	unsigned long		trap_no;
+	unsigned long		error_code;
+	/* floating point and extended processor state */
+	struct fpu		fpu;
+#ifdef CONFIG_X86_32
+	/* Virtual 86 mode info */
+	struct vm86_struct __user *vm86_info;
+	unsigned long		screen_bitmap;
+	unsigned long		v86flags;
+	unsigned long		v86mask;
+	unsigned long		saved_sp0;
+	unsigned int		saved_fs;
+	unsigned int		saved_gs;
+#endif
+	/* IO permissions: */
+	unsigned long		*io_bitmap_ptr;
+	unsigned long		iopl;
+	/* Max allowed port in the bitmap, in bytes: */
+	unsigned		io_bitmap_max;
+};
+
+/*-- sched.h, seccomp state dependencies:  -----------*/
+
+typedef struct { int mode; } seccomp_t;
+
+/*-- sched.h, IO accounting state dependencies:  -----------*/
+
+struct task_io_accounting {
+#ifdef CONFIG_TASK_XACCT
+	/* bytes read */
+	u64 rchar;
+	/*  bytes written */
+	u64 wchar;
+	/* # of read syscalls */
+	u64 syscr;
+	/* # of write syscalls */
+	u64 syscw;
+#endif /* CONFIG_TASK_XACCT */
+
+#ifdef CONFIG_TASK_IO_ACCOUNTING
+	/*
+	 * The number of bytes which this task has caused to be read from
+	 * storage.
+	 */
+	u64 read_bytes;
+
+	/*
+	 * The number of bytes which this task has caused, or shall cause to be
+	 * written to disk.
+	 */
+	u64 write_bytes;
+
+	/*
+	 * A task can cause "negative" IO too.  If this task truncates some
+	 * dirty pagecache, some IO which another task has been accounted for
+	 * (in its write_bytes) will not be happening.  We _could_ just
+	 * subtract that from the truncating task's write_bytes, but there is
+	 * information loss in doing that.
+	 */
+	u64 cancelled_write_bytes;
+#endif /* CONFIG_TASK_IO_ACCOUNTING */
+};
+
+/*-- sched.h, nodemask.h types:  -----------*/
+
+#ifdef CONFIG_NODES_SHIFT
+#define NODES_SHIFT     CONFIG_NODES_SHIFT
+#else
+#define NODES_SHIFT     0
+#endif
+
+#define MAX_NUMNODES    (1 << NODES_SHIFT)
+
+typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
+
+/*-- sched.h, mutex type:  -----------*/
+
+struct mutex {
+	/* 1: unlocked, 0: locked, negative: locked, possible waiters */
+	atomic_t		count;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP)
+	struct task_struct	*owner;
+#endif
+#ifdef CONFIG_DEBUG_MUTEXES
+	const char 		*name;
+	void			*magic;
+#endif
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map	dep_map;
+#endif
+};
+
+/*-- sched.h, perf event state:  -----------*/
+
+enum perf_event_context_type {
+	task_context,
+	cpu_context,
+};
+
+/**
+ * struct perf_event_context - event context structure
+ *
+ * Used as a container for task events and CPU events as well:
+ */
+struct perf_event_context {
+	struct pmu			*pmu;
+	enum perf_event_context_type	type;
+	/*
+	 * Protect the states of the events in the list,
+	 * nr_active, and the list:
+	 */
+	raw_spinlock_t			lock;
+	/*
+	 * Protect the list of events.  Locking either mutex or lock
+	 * is sufficient to ensure the list doesn't change; to change
+	 * the list you need to lock both the mutex and the spinlock.
+	 */
+	struct mutex			mutex;
+
+	struct list_head		pinned_groups;
+	struct list_head		flexible_groups;
+	struct list_head		event_list;
+	int				nr_events;
+	int				nr_active;
+	int				is_active;
+	int				nr_stat;
+	int				rotate_disable;
+	atomic_t			refcount;
+	struct task_struct		*task;
+
+	/*
+	 * Context clock, runs when context enabled.
+	 */
+	u64				time;
+	u64				timestamp;
+
+	/*
+	 * These fields let us detect when two contexts have both
+	 * been cloned (inherited) from a common ancestor.
+	 */
+	struct perf_event_context	*parent_ctx;
+	u64				parent_gen;
+	u64				generation;
+	int				pin_count;
+	struct rcu_head			rcu_head;
+	int				nr_cgroups; /* cgroup events present */
+};
+
+enum perf_event_task_context {
+	perf_invalid_context = -1,
+	perf_hw_context = 0,
+	perf_sw_context,
+	perf_nr_task_contexts,
+};
+
+/*-- sched.h, mm dirty state:  -----------*/
+
+struct prop_local_single {
+	/*
+	 * the local events counter
+	 */
+	unsigned long events;
+
+	/*
+	 * snapshot of the last seen global state
+	 * and a lock protecting this state
+	 */
+	unsigned long period;
+	int shift;
+	spinlock_t lock;		/* protect the snapshot state */
+};
+
+/*-- sched.h, task state:  -----------*/
+
+struct task_struct {
+	volatile long state;	/* -1 unrunnable, 0 runnable, >0 stopped */
+	void *stack;
+	atomic_t usage;
+	unsigned int flags;	/* per process flags, defined below */
+	unsigned int ptrace;
+
+#ifdef CONFIG_SMP
+	struct task_struct *wake_entry;
+	int on_cpu;
+#endif
+	int on_rq;
+
+	int prio, static_prio, normal_prio;
+	unsigned int rt_priority;
+	const struct sched_class *sched_class;
+	struct sched_entity se;
+	struct sched_rt_entity rt;
+
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+	/* list of struct preempt_notifier: */
+	struct hlist_head preempt_notifiers;
+#endif
+
+	/*
+	 * fpu_counter contains the number of consecutive context switches
+	 * that the FPU is used. If this is over a threshold, the lazy fpu
+	 * saving becomes unlazy to save the trap. This is an unsigned char
+	 * so that after 256 times the counter wraps and the behavior turns
+	 * lazy again; this to deal with bursty apps that only use FPU for
+	 * a short time
+	 */
+	unsigned char fpu_counter;
+#ifdef CONFIG_BLK_DEV_IO_TRACE
+	unsigned int btrace_seq;
+#endif
+
+	unsigned int policy;
+	cpumask_t cpus_allowed;
+
+#ifdef CONFIG_PREEMPT_RCU
+	int rcu_read_lock_nesting;
+	char rcu_read_unlock_special;
+	struct list_head rcu_node_entry;
+#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#ifdef CONFIG_TREE_PREEMPT_RCU
+	struct rcu_node *rcu_blocked_node;
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
+#ifdef CONFIG_RCU_BOOST
+	struct rt_mutex *rcu_boost_mutex;
+#endif /* #ifdef CONFIG_RCU_BOOST */
+
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
+	struct sched_info sched_info;
+#endif
+
+	struct list_head tasks;
+#ifdef CONFIG_SMP
+	struct plist_node pushable_tasks;
+#endif
+
+	struct mm_struct *mm, *active_mm;
+#ifdef CONFIG_COMPAT_BRK
+	unsigned brk_randomized:1;
+#endif
+#if defined(SPLIT_RSS_COUNTING)
+	struct task_rss_stat	rss_stat;
+#endif
+/* task state */
+	int exit_state;
+	int exit_code, exit_signal;
+	int pdeath_signal;  /*  The signal sent when the parent dies  */
+	unsigned int group_stop;	/* GROUP_STOP_*, siglock protected */
+	/* ??? */
+	unsigned int personality;
+	unsigned did_exec:1;
+	unsigned in_execve:1;	/* Tell the LSMs that the process is doing an
+				 * execve */
+	unsigned in_iowait:1;
+
+
+	/* Revert to default priority/policy when forking */
+	unsigned sched_reset_on_fork:1;
+	unsigned sched_contributes_to_load:1;
+
+	pid_t pid;
+	pid_t tgid;
+
+#ifdef CONFIG_CC_STACKPROTECTOR
+	/* Canary value for the -fstack-protector gcc feature */
+	unsigned long stack_canary;
+#endif
+
+	/* 
+	 * pointers to (original) parent process, youngest child, younger sibling,
+	 * older sibling, respectively.  (p->father can be replaced with 
+	 * p->real_parent->pid)
+	 */
+	struct task_struct *real_parent; /* real parent process */
+	struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
+	/*
+	 * children/sibling forms the list of my natural children
+	 */
+	struct list_head children;	/* list of my children */
+	struct list_head sibling;	/* linkage in my parent's children list */
+	struct task_struct *group_leader;	/* threadgroup leader */
+
+	/*
+	 * ptraced is the list of tasks this task is using ptrace on.
+	 * This includes both natural children and PTRACE_ATTACH targets.
+	 * p->ptrace_entry is p's link on the p->parent->ptraced list.
+	 */
+	struct list_head ptraced;
+	struct list_head ptrace_entry;
+
+	/* PID/PID hash table linkage. */
+	struct pid_link pids[PIDTYPE_MAX];
+	struct list_head thread_group;
+
+	struct completion *vfork_done;		/* for vfork() */
+	int __user *set_child_tid;		/* CLONE_CHILD_SETTID */
+	int __user *clear_child_tid;		/* CLONE_CHILD_CLEARTID */
+
+	cputime_t utime, stime, utimescaled, stimescaled;
+	cputime_t gtime;
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+	cputime_t prev_utime, prev_stime;
+#endif
+	unsigned long nvcsw, nivcsw; /* context switch counts */
+	struct timespec start_time; 		/* monotonic time */
+	struct timespec real_start_time;	/* boot based time */
+/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
+	unsigned long min_flt, maj_flt;
+
+	struct task_cputime cputime_expires;
+	struct list_head cpu_timers[3];
+
+/* process credentials */
+	const struct cred __rcu *real_cred; /* objective and real subjective task
+					 * credentials (COW) */
+	const struct cred __rcu *cred;	/* effective (overridable) subjective task
+					 * credentials (COW) */
+	struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */
+
+	char comm[TASK_COMM_LEN]; /* executable name excluding path
+				     - access with [gs]et_task_comm (which lock
+				       it with task_lock())
+				     - initialized normally by setup_new_exec */
+/* file system info */
+	int link_count, total_link_count;
+#ifdef CONFIG_SYSVIPC
+/* ipc stuff */
+	struct sysv_sem sysvsem;
+#endif
+#ifdef CONFIG_DETECT_HUNG_TASK
+/* hung task detection */
+	unsigned long last_switch_count;
+#endif
+/* CPU-specific state of this task */
+	struct thread_struct thread;
+/* filesystem information */
+	struct fs_struct *fs;
+/* open file information */
+	struct files_struct *files;
+/* namespaces */
+	struct nsproxy *nsproxy;
+/* signal handlers */
+	struct signal_struct *signal;
+	struct sighand_struct *sighand;
+
+	sigset_t blocked, real_blocked;
+	sigset_t saved_sigmask;	/* restored if set_restore_sigmask() was used */
+	struct sigpending pending;
+
+	unsigned long sas_ss_sp;
+	size_t sas_ss_size;
+	int (*notifier)(void *priv);
+	void *notifier_data;
+	sigset_t *notifier_mask;
+	struct audit_context *audit_context;
+#ifdef CONFIG_AUDITSYSCALL
+	uid_t loginuid;
+	unsigned int sessionid;
+#endif
+	seccomp_t seccomp;
+
+/* Thread group tracking */
+   	u32 parent_exec_id;
+   	u32 self_exec_id;
+/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,
+ * mempolicy */
+	spinlock_t alloc_lock;
+
+#ifdef CONFIG_GENERIC_HARDIRQS
+	/* IRQ handler threads */
+	struct irqaction *irqaction;
+#endif
+
+	/* Protection of the PI data structures: */
+	raw_spinlock_t pi_lock;
+
+#ifdef CONFIG_RT_MUTEXES
+	/* PI waiters blocked on a rt_mutex held by this task */
+	struct plist_head pi_waiters;
+	/* Deadlock detection and priority inheritance handling */
+	struct rt_mutex_waiter *pi_blocked_on;
+#endif
+
+#ifdef CONFIG_DEBUG_MUTEXES
+	/* mutex deadlock detection */
+	struct mutex_waiter *blocked_on;
+#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+	unsigned int irq_events;
+	unsigned long hardirq_enable_ip;
+	unsigned long hardirq_disable_ip;
+	unsigned int hardirq_enable_event;
+	unsigned int hardirq_disable_event;
+	int hardirqs_enabled;
+	int hardirq_context;
+	unsigned long softirq_disable_ip;
+	unsigned long softirq_enable_ip;
+	unsigned int softirq_disable_event;
+	unsigned int softirq_enable_event;
+	int softirqs_enabled;
+	int softirq_context;
+#endif
+#ifdef CONFIG_LOCKDEP
+# define MAX_LOCK_DEPTH 48UL
+	u64 curr_chain_key;
+	int lockdep_depth;
+	unsigned int lockdep_recursion;
+	struct held_lock held_locks[MAX_LOCK_DEPTH];
+	gfp_t lockdep_reclaim_gfp;
+#endif
+
+/* journalling filesystem info */
+	void *journal_info;
+
+/* stacked block device info */
+	struct bio_list *bio_list;
+
+#ifdef CONFIG_BLOCK
+/* stack plugging */
+	struct blk_plug *plug;
+#endif
+
+/* VM state */
+	struct reclaim_state *reclaim_state;
+
+	struct backing_dev_info *backing_dev_info;
+
+	struct io_context *io_context;
+
+	unsigned long ptrace_message;
+	siginfo_t *last_siginfo; /* For ptrace use.  */
+	struct task_io_accounting ioac;
+#if defined(CONFIG_TASK_XACCT)
+	u64 acct_rss_mem1;	/* accumulated rss usage */
+	u64 acct_vm_mem1;	/* accumulated virtual memory usage */
+	cputime_t acct_timexpd;	/* stime + utime since last update */
+#endif
+#ifdef CONFIG_CPUSETS
+	nodemask_t mems_allowed;	/* Protected by alloc_lock */
+	int mems_allowed_change_disable;
+	int cpuset_mem_spread_rotor;
+	int cpuset_slab_spread_rotor;
+#endif
+#ifdef CONFIG_CGROUPS
+	/* Control Group info protected by css_set_lock */
+	struct css_set __rcu *cgroups;
+	/* cg_list protected by css_set_lock and tsk->alloc_lock */
+	struct list_head cg_list;
+#endif
+#ifdef CONFIG_FUTEX
+	struct robust_list_head __user *robust_list;
+#ifdef CONFIG_COMPAT
+	struct compat_robust_list_head __user *compat_robust_list;
+#endif
+	struct list_head pi_state_list;
+	struct futex_pi_state *pi_state_cache;
+#endif
+#ifdef CONFIG_PERF_EVENTS
+	struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts];
+	struct mutex perf_event_mutex;
+	struct list_head perf_event_list;
+#endif
+#ifdef CONFIG_NUMA
+	struct mempolicy *mempolicy;	/* Protected by alloc_lock */
+	short il_next;
+	short pref_node_fork;
+#endif
+	atomic_t fs_excl;	/* holding fs exclusive resources */
+	struct rcu_head rcu;
+
+	/*
+	 * cache last used pipe for splice
+	 */
+	struct pipe_inode_info *splice_pipe;
+#ifdef	CONFIG_TASK_DELAY_ACCT
+	struct task_delay_info *delays;
+#endif
+#ifdef CONFIG_FAULT_INJECTION
+	int make_it_fail;
+#endif
+	struct prop_local_single dirties;
+#ifdef CONFIG_LATENCYTOP
+	int latency_record_count;
+	struct latency_record latency_record[LT_SAVECOUNT];
+#endif
+	/*
+	 * time slack values; these are used to round up poll() and
+	 * select() etc timeout values. These are in nanoseconds.
+	 */
+	unsigned long timer_slack_ns;
+	unsigned long default_timer_slack_ns;
+
+	struct list_head	*scm_work_list;
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+	/* Index of current stored address in ret_stack */
+	int curr_ret_stack;
+	/* Stack of return addresses for return function tracing */
+	struct ftrace_ret_stack	*ret_stack;
+	/* time stamp for last schedule */
+	unsigned long long ftrace_timestamp;
+	/*
+	 * Number of functions that haven't been traced
+	 * because of depth overrun.
+	 */
+	atomic_t trace_overrun;
+	/* Pause for the tracing */
+	atomic_t tracing_graph_pause;
+#endif
+#ifdef CONFIG_TRACING
+	/* state flags for use by tracers */
+	unsigned long trace;
+	/* bitmask of trace recursion */
+	unsigned long trace_recursion;
+#endif /* CONFIG_TRACING */
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */
+	struct memcg_batch_info {
+		int do_batch;	/* incremented when batch uncharge started */
+		struct mem_cgroup *memcg; /* target memcg of uncharge */
+		unsigned long nr_pages;	/* uncharged usage */
+		unsigned long memsw_nr_pages; /* uncharged mem+swap usage */
+	} memcg_batch;
+#endif
+#ifdef CONFIG_HAVE_HW_BREAKPOINT
+	atomic_t ptrace_bp_refcnt;
+#endif
+};
+
+/*--  pid.c, PID type definitions:  -----------*/
+
+struct kref {
+	atomic_t refcount;
+};
+
+#define PAGE_SIZE 4096
+
+/*
+ * This controls the default maximum pid allocated to a process
+ */
+#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
+
+/*
+ * A maximum of 4 million PIDs should be enough for a while.
+ * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
+ */
+#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
+	(sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
+
+#define PIDMAP_ENTRIES         ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)
+
+struct pidmap {
+       atomic_t nr_free;
+       void *page;
+};
+
+#define INIT_STRUCT_PID {						\
+	.count 		= ATOMIC_INIT(1),				\
+	.tasks		= {						\
+		{ .first = NULL },					\
+		{ .first = NULL },					\
+		{ .first = NULL },					\
+	},								\
+	.level		= 0,						\
+	.numbers	= { {						\
+		.nr		= 0,					\
+		.ns		= &init_pid_ns,				\
+		.pid_chain	= { .next = NULL, .pprev = NULL },	\
+	}, }								\
+}
+
+struct pid_namespace {
+	struct kref kref;
+	struct pidmap pidmap[PIDMAP_ENTRIES];
+	int last_pid;
+	struct task_struct *child_reaper;
+	struct kmem_cache *pid_cachep;
+	unsigned int level;
+	struct pid_namespace *parent;
+#ifdef CONFIG_PROC_FS
+	struct vfsmount *proc_mnt;
+#endif
+#ifdef CONFIG_BSD_PROCESS_ACCT
+	struct bsd_acct_struct *bacct;
+#endif
+};
+
+struct upid {
+	/* Try to keep pid_chain in the same cacheline as nr for find_vpid */
+	int nr;
+	struct pid_namespace *ns;
+	struct hlist_node pid_chain;
+};
+
+struct pid
+{
+	atomic_t count;
+	unsigned int level;
+	/* lists of tasks that use this pid */
+	struct hlist_head tasks[PIDTYPE_MAX];
+	struct rcu_head rcu;
+	struct upid numbers[1];
+};
+
+#define ATOMIC_INIT(i)	{ (i) }
+
+extern struct pid_namespace init_pid_ns;
+
+extern struct task_struct init_task;
+
+/*-- module.h arch dependency: ---------------------------------------------------*/
+
+struct mod_arch_specific
+{
+};
+
+#ifdef CONFIG_64BIT
+#define Elf_Shdr Elf64_Shdr
+#define Elf_Sym Elf64_Sym
+#define Elf_Ehdr Elf64_Ehdr
+#else
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+#endif
+
+/*-- module.h ELF dependencies: ---------------------------------------------------*/
+
+
+/* 32-bit ELF base types. */
+typedef __u32	Elf32_Addr;
+typedef __u16	Elf32_Half;
+typedef __u32	Elf32_Off;
+typedef __s32	Elf32_Sword;
+typedef __u32	Elf32_Word;
+
+/* 64-bit ELF base types. */
+typedef __u64	Elf64_Addr;
+typedef __u16	Elf64_Half;
+typedef __s16	Elf64_SHalf;
+typedef __u64	Elf64_Off;
+typedef __s32	Elf64_Sword;
+typedef __u32	Elf64_Word;
+typedef __u64	Elf64_Xword;
+typedef __s64	Elf64_Sxword;
+
+typedef struct dynamic{
+  Elf32_Sword d_tag;
+  union{
+    Elf32_Sword	d_val;
+    Elf32_Addr	d_ptr;
+  } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+  Elf64_Sxword d_tag;		/* entry tag value */
+  union {
+    Elf64_Xword d_val;
+    Elf64_Addr d_ptr;
+  } d_un;
+} Elf64_Dyn;
+
+/* The following are used with relocations */
+#define ELF32_R_SYM(x) ((x) >> 8)
+#define ELF32_R_TYPE(x) ((x) & 0xff)
+
+#define ELF64_R_SYM(i)			((i) >> 32)
+#define ELF64_R_TYPE(i)			((i) & 0xffffffff)
+
+typedef struct elf32_rel {
+  Elf32_Addr	r_offset;
+  Elf32_Word	r_info;
+} Elf32_Rel;
+
+typedef struct elf64_rel {
+  Elf64_Addr r_offset;	/* Location at which to apply the action */
+  Elf64_Xword r_info;	/* index and type of relocation */
+} Elf64_Rel;
+
+typedef struct elf32_rela{
+  Elf32_Addr	r_offset;
+  Elf32_Word	r_info;
+  Elf32_Sword	r_addend;
+} Elf32_Rela;
+
+typedef struct elf64_rela {
+  Elf64_Addr r_offset;	/* Location at which to apply the action */
+  Elf64_Xword r_info;	/* index and type of relocation */
+  Elf64_Sxword r_addend;	/* Constant addend used to compute value */
+} Elf64_Rela;
+
+typedef struct elf32_sym{
+  Elf32_Word	st_name;
+  Elf32_Addr	st_value;
+  Elf32_Word	st_size;
+  unsigned char	st_info;
+  unsigned char	st_other;
+  Elf32_Half	st_shndx;
+} Elf32_Sym;
+
+typedef struct elf64_sym {
+  Elf64_Word st_name;		/* Symbol name, index in string tbl */
+  unsigned char	st_info;	/* Type and binding attributes */
+  unsigned char	st_other;	/* No defined meaning, 0 */
+  Elf64_Half st_shndx;		/* Associated section index */
+  Elf64_Addr st_value;		/* Value of the symbol */
+  Elf64_Xword st_size;		/* Associated symbol size */
+} Elf64_Sym;
+
+
+/*-- module.h sysfs dependencies: ---------------------------------------------------*/
+
+struct attribute {
+	const char		*name;
+	mode_t			mode;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lock_class_key	*key;
+	struct lock_class_key	skey;
+#endif
+};
+
+struct kobject {
+	const char		*name;
+	struct list_head	entry;
+	struct kobject		*parent;
+	struct kset		*kset;
+	struct kobj_type	*ktype;
+	struct sysfs_dirent	*sd;
+	struct kref		kref;
+	unsigned int state_initialized:1;
+	unsigned int state_in_sysfs:1;
+	unsigned int state_add_uevent_sent:1;
+	unsigned int state_remove_uevent_sent:1;
+	unsigned int uevent_suppress:1;
+};
+
+/*-- module.h's init.h dependency: -------------------------------*/
+
+typedef void (*ctor_fn_t)(void);
+
+/*-- module.h: ---------------------------------------------------*/
+
+/* You can override this manually, but generally this should match the
+   module name. */
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX /* empty */
+#else
+#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
+#endif
+
+/* Chosen so that structs with an unsigned long line up. */
+#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
+
+#define ___module_cat(a,b) __mod_ ## a ## b
+#define __module_cat(a,b) ___module_cat(a,b)
+#ifdef MODULE
+#define __MODULE_INFO(tag, name, info)					  \
+static const char __module_cat(name,__LINE__)[]				  \
+  __used __attribute__((section(".modinfo"), unused, aligned(1)))	  \
+  = __stringify(tag) "=" info
+#else  /* !MODULE */
+/* This struct is here for syntactic coherency, it is not used */
+#define __MODULE_INFO(tag, name, info)					  \
+  struct __module_cat(name,__LINE__) {}
+#endif
+#define __MODULE_PARM_TYPE(name, _type)					  \
+  __MODULE_INFO(parmtype, name##type, #name ":" _type)
+
+struct kernel_param;
+
+struct kernel_param_ops {
+	/* Returns 0, or -errno.  arg is in kp->arg. */
+	int (*set)(const char *val, const struct kernel_param *kp);
+	/* Returns length written or -errno.  Buffer is 4k (ie. be short!) */
+	int (*get)(char *buffer, const struct kernel_param *kp);
+	/* Optional function to free kp->arg when module unloaded. */
+	void (*free)(void *arg);
+};
+
+/* Flag bits for kernel_param.flags */
+#define KPARAM_ISBOOL		2
+
+struct kernel_param {
+	const char *name;
+	const struct kernel_param_ops *ops;
+	u16 perm;
+	u16 flags;
+	union {
+		void *arg;
+		const struct kparam_string *str;
+		const struct kparam_array *arr;
+	};
+};
+
+/* Special one for strings we want to copy into */
+struct kparam_string {
+	unsigned int maxlen;
+	char *string;
+};
+
+/* Special one for arrays */
+struct kparam_array
+{
+	unsigned int max;
+	unsigned int elemsize;
+	unsigned int *num;
+	const struct kernel_param_ops *ops;
+	void *elem;
+};
+
+/* Some toolchains use a `_' prefix for all user symbols. */
+#ifdef CONFIG_SYMBOL_PREFIX
+#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
+#else
+#define MODULE_SYMBOL_PREFIX ""
+#endif
+
+#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
+
+struct kernel_symbol
+{
+	unsigned long value;
+	const char *name;
+};
+
+struct modversion_info
+{
+	unsigned long crc;
+	char name[MODULE_NAME_LEN];
+};
+
+struct module;
+
+struct module_attribute {
+        struct attribute attr;
+        ssize_t (*show)(struct module_attribute *, struct module *, char *);
+        ssize_t (*store)(struct module_attribute *, struct module *,
+			 const char *, size_t count);
+	void (*setup)(struct module *, const char *);
+	int (*test)(struct module *);
+	void (*free)(struct module *);
+};
+
+struct module_version_attribute {
+	struct module_attribute mattr;
+	const char *module_name;
+	const char *version;
+} __attribute__ ((__aligned__(sizeof(void *))));
+
+extern ssize_t __modver_version_show(struct module_attribute *,
+				     struct module *, char *);
+
+struct module_kobject
+{
+	struct kobject kobj;
+	struct module *mod;
+	struct kobject *drivers_dir;
+	struct module_param_attrs *mp;
+};
+
+/* These are either module local, or the kernel's dummy ones. */
+extern int init_module(void);
+extern void cleanup_module(void);
+
+/* Archs provide a method of finding the correct exception table. */
+struct exception_table_entry;
+
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value);
+void sort_extable(struct exception_table_entry *start,
+		  struct exception_table_entry *finish);
+void sort_main_extable(void);
+void trim_init_extable(struct module *m);
+
+#ifdef MODULE
+#define MODULE_GENERIC_TABLE(gtype,name)			\
+extern const struct gtype##_id __mod_##gtype##_table		\
+  __attribute__ ((unused, alias(__stringify(name))))
+
+extern struct module __this_module;
+#define THIS_MODULE (&__this_module)
+#else  /* !MODULE */
+#define MODULE_GENERIC_TABLE(gtype,name)
+#define THIS_MODULE ((struct module *)0)
+#endif
+
+/* Generic info of form tag = "info" */
+#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+
+/* For userspace: you can also call me... */
+#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
+
+/*
+ * The following license idents are currently accepted as indicating free
+ * software modules
+ *
+ *	"GPL"				[GNU Public License v2 or later]
+ *	"GPL v2"			[GNU Public License v2]
+ *	"GPL and additional rights"	[GNU Public License v2 rights and more]
+ *	"Dual BSD/GPL"			[GNU Public License v2
+ *					 or BSD license choice]
+ *	"Dual MIT/GPL"			[GNU Public License v2
+ *					 or MIT license choice]
+ *	"Dual MPL/GPL"			[GNU Public License v2
+ *					 or Mozilla license choice]
+ *
+ * The following other idents are available
+ *
+ *	"Proprietary"			[Non free products]
+ *
+ * There are dual licensed components, but when running with Linux it is the
+ * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
+ * is a GPL combined work.
+ *
+ * This exists for several reasons
+ * 1.	So modinfo can show license info for users wanting to vet their setup 
+ *	is free
+ * 2.	So the community can ignore bug reports including proprietary modules
+ * 3.	So vendors can do likewise based on their own policies
+ */
+#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
+
+/*
+ * Author(s), use "Name <email>" or just "Name", for multiple
+ * authors use multiple MODULE_AUTHOR() statements/lines.
+ */
+#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
+  
+/* What your module does. */
+#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
+
+/* One for each parameter, describing how to use it.  Some files do
+   multiple of these per line, so can't just use MODULE_INFO. */
+#define MODULE_PARM_DESC(_parm, desc) \
+	__MODULE_INFO(parm, _parm, #_parm ":" desc)
+
+#define MODULE_DEVICE_TABLE(type,name)		\
+  MODULE_GENERIC_TABLE(type##_device,name)
+
+/* Version of form [<epoch>:]<version>[-<extra-version>].
+   Or for CVS/RCS ID version, everything but the number is stripped.
+  <epoch>: A (small) unsigned integer which allows you to start versions
+           anew. If not mentioned, it's zero.  eg. "2:1.0" is after
+	   "1:2.0".
+  <version>: The <version> may contain only alphanumerics and the
+           character `.'.  Ordered by numeric sort for numeric parts,
+	   ascii sort for ascii parts (as per RPM or DEB algorithm).
+  <extraversion>: Like <version>, but inserted for local
+           customizations, eg "rh3" or "rusty1".
+
+  Using this automatically adds a checksum of the .c files and the
+  local headers in "srcversion".
+*/
+
+#if defined(MODULE) || !defined(CONFIG_SYSFS)
+#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
+#else
+#define MODULE_VERSION(_version)					\
+	static struct module_version_attribute ___modver_attr = {	\
+		.mattr	= {						\
+			.attr	= {					\
+				.name	= "version",			\
+				.mode	= S_IRUGO,			\
+			},						\
+			.show	= __modver_version_show,		\
+		},							\
+		.module_name	= KBUILD_MODNAME,			\
+		.version	= _version,				\
+	};								\
+	static const struct module_version_attribute			\
+	__used __attribute__ ((__section__ ("__modver")))		\
+	* __moduleparam_const __modver_attr = &___modver_attr
+#endif
+
+/* Optional firmware file (or files) needed by the module
+ * format is simply firmware file name.  Multiple firmware
+ * files require multiple MODULE_FIRMWARE() specifiers */
+#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
+
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
+struct notifier_block;
+
+extern int modules_disabled; /* for sysctl */
+/* Get/put a kernel symbol (calls must be symmetric) */
+void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);
+#define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x)))
+
+/* modules using other modules: kdb wants to see this. */
+struct module_use {
+	struct list_head source_list;
+	struct list_head target_list;
+	struct module *source, *target;
+};
+
+#ifndef __GENKSYMS__
+#ifdef CONFIG_MODVERSIONS
+/* Mark the CRC weak since genksyms apparently decides not to
+ * generate a checksums for some symbols */
+#define __CRC_SYMBOL(sym, sec)					\
+	extern void *__crc_##sym __attribute__((weak));		\
+	static const unsigned long __kcrctab_##sym		\
+	__used							\
+	__attribute__((section("___kcrctab" sec "+" #sym), unused))	\
+	= (unsigned long) &__crc_##sym;
+#else
+#define __CRC_SYMBOL(sym, sec)
+#endif
+
+/* For every exported symbol, place a struct in the __ksymtab section */
+#define __EXPORT_SYMBOL(sym, sec)				\
+	extern typeof(sym) sym;					\
+	__CRC_SYMBOL(sym, sec)					\
+	static const char __kstrtab_##sym[]			\
+	__attribute__((section("__ksymtab_strings"), aligned(1))) \
+	= MODULE_SYMBOL_PREFIX #sym;                    	\
+	static const struct kernel_symbol __ksymtab_##sym	\
+	__used							\
+	__attribute__((section("___ksymtab" sec "+" #sym), unused))	\
+	= { (unsigned long)&sym, __kstrtab_##sym }
+
+#define EXPORT_SYMBOL(sym)					\
+	__EXPORT_SYMBOL(sym, "")
+
+#define EXPORT_SYMBOL_GPL(sym)					\
+	__EXPORT_SYMBOL(sym, "_gpl")
+
+#define EXPORT_SYMBOL_GPL_FUTURE(sym)				\
+	__EXPORT_SYMBOL(sym, "_gpl_future")
+
+
+#ifdef CONFIG_UNUSED_SYMBOLS
+#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
+#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
+#else
+#define EXPORT_UNUSED_SYMBOL(sym)
+#define EXPORT_UNUSED_SYMBOL_GPL(sym)
+#endif
+
+#endif
+
+enum module_state
+{
+	MODULE_STATE_LIVE,
+	MODULE_STATE_COMING,
+	MODULE_STATE_GOING,
+};
+
+struct module
+{
+	enum module_state state;
+
+	/* Member of list of modules */
+	struct list_head list;
+
+	/* Unique handle for this module */
+	char name[MODULE_NAME_LEN];
+
+	/* Sysfs stuff. */
+	struct module_kobject mkobj;
+	struct module_attribute *modinfo_attrs;
+	const char *version;
+	const char *srcversion;
+	struct kobject *holders_dir;
+
+	/* Exported symbols */
+	const struct kernel_symbol *syms;
+	const unsigned long *crcs;
+	unsigned int num_syms;
+
+	/* Kernel parameters. */
+	struct kernel_param *kp;
+	unsigned int num_kp;
+
+	/* GPL-only exported symbols. */
+	unsigned int num_gpl_syms;
+	const struct kernel_symbol *gpl_syms;
+	const unsigned long *gpl_crcs;
+
+#ifdef CONFIG_UNUSED_SYMBOLS
+	/* unused exported symbols. */
+	const struct kernel_symbol *unused_syms;
+	const unsigned long *unused_crcs;
+	unsigned int num_unused_syms;
+
+	/* GPL-only, unused exported symbols. */
+	unsigned int num_unused_gpl_syms;
+	const struct kernel_symbol *unused_gpl_syms;
+	const unsigned long *unused_gpl_crcs;
+#endif
+
+	/* symbols that will be GPL-only in the near future. */
+	const struct kernel_symbol *gpl_future_syms;
+	const unsigned long *gpl_future_crcs;
+	unsigned int num_gpl_future_syms;
+
+	/* Exception table */
+	unsigned int num_exentries;
+	struct exception_table_entry *extable;
+
+	/* Startup function. */
+	int (*init)(void);
+
+	/* If this is non-NULL, vfree after init() returns */
+	void *module_init;
+
+	/* Here is the actual code + data, vfree'd on unload. */
+	void *module_core;
+
+	/* Here are the sizes of the init and core sections */
+	unsigned int init_size, core_size;
+
+	/* The size of the executable code in each section.  */
+	unsigned int init_text_size, core_text_size;
+
+	/* Size of RO sections of the module (text+rodata) */
+	unsigned int init_ro_size, core_ro_size;
+
+	/* Arch-specific module values */
+	struct mod_arch_specific arch;
+
+	unsigned int taints;	/* same bits as kernel:tainted */
+
+#ifdef CONFIG_GENERIC_BUG
+	/* Support for BUG */
+	unsigned num_bugs;
+	struct list_head bug_list;
+	struct bug_entry *bug_table;
+#endif
+
+#ifdef CONFIG_KALLSYMS
+	/*
+	 * We keep the symbol and string tables for kallsyms.
+	 * The core_* fields below are temporary, loader-only (they
+	 * could really be discarded after module init).
+	 */
+	Elf_Sym *symtab, *core_symtab;
+	unsigned int num_symtab, core_num_syms;
+	char *strtab, *core_strtab;
+
+	/* Section attributes */
+	struct module_sect_attrs *sect_attrs;
+
+	/* Notes attributes */
+	struct module_notes_attrs *notes_attrs;
+#endif
+
+	/* The command line arguments (may be mangled).  People like
+	   keeping pointers to this stuff */
+	char *args;
+
+#ifdef CONFIG_SMP
+	/* Per-cpu data. */
+	void __percpu *percpu;
+	unsigned int percpu_size;
+#endif
+
+#ifdef CONFIG_TRACEPOINTS
+	unsigned int num_tracepoints;
+	struct tracepoint * const *tracepoints_ptrs;
+#endif
+#ifdef HAVE_JUMP_LABEL
+	struct jump_entry *jump_entries;
+	unsigned int num_jump_entries;
+#endif
+#ifdef CONFIG_TRACING
+	unsigned int num_trace_bprintk_fmt;
+	const char **trace_bprintk_fmt_start;
+#endif
+#ifdef CONFIG_EVENT_TRACING
+	struct ftrace_event_call **trace_events;
+	unsigned int num_trace_events;
+#endif
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+	unsigned int num_ftrace_callsites;
+	unsigned long *ftrace_callsites;
+#endif
+
+#ifdef CONFIG_MODULE_UNLOAD
+	/* What modules depend on me? */
+	struct list_head source_list;
+	/* What modules do I depend on? */
+	struct list_head target_list;
+
+	/* Who is waiting for us to be unloaded */
+	struct task_struct *waiter;
+
+	/* Destruction function. */
+	void (*exit)(void);
+
+	struct module_ref {
+		unsigned int incs;
+		unsigned int decs;
+	} __percpu *refptr;
+#endif
+
+#ifdef CONFIG_CONSTRUCTORS
+	/* Constructor functions. */
+	ctor_fn_t *ctors;
+	unsigned int num_ctors;
+#endif
+};
+
+/*-- pid.c API usage: ---------------------------------------------------*/
+/*-- preempt.h thread_info dependencies: --------------------------------*/
+/*-- preempt.h thread_info processor.h dependencies: --------------------*/
+
+typedef struct {
+	unsigned long		seg;
+} mm_segment_t;
+
+/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
+
+struct timespec;
+struct compat_timespec;
+
+/*
+ * System call restart block.
+ */
+struct restart_block {
+	long (*fn)(struct restart_block *);
+	union {
+		/* For futex_wait and futex_wait_requeue_pi */
+		struct {
+			u32 __user *uaddr;
+			u32 val;
+			u32 flags;
+			u32 bitset;
+			u64 time;
+			u32 __user *uaddr2;
+		} futex;
+		/* For nanosleep */
+		struct {
+			clockid_t index;
+			struct timespec __user *rmtp;
+#ifdef CONFIG_COMPAT
+			struct compat_timespec __user *compat_rmtp;
+#endif
+			u64 expires;
+		} nanosleep;
+		/* For poll */
+		struct {
+			struct pollfd __user *ufds;
+			int nfds;
+			int has_timeout;
+			unsigned long tv_sec;
+			unsigned long tv_nsec;
+		} poll;
+	};
+};
+
+/*-- preempt.h asm/thread_info.h page_types.h dependencies: --------------------*/
+
+#define THREAD_ORDER    1
+#define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
+
+/*-- preempt.h asm/thread_info.h dependencies: --------------------*/
+
+struct task_struct;
+struct exec_domain;
+
+struct thread_info {
+	struct task_struct	*task;		/* main task structure */
+	struct exec_domain	*exec_domain;	/* execution domain */
+	__u32			flags;		/* low level flags */
+	__u32			status;		/* thread synchronous flags */
+	__u32			cpu;		/* current CPU */
+	int			preempt_count;	/* 0 => preemptable,
+						   <0 => BUG */
+	mm_segment_t		addr_limit;
+	struct restart_block    restart_block;
+	void __user		*sysenter_return;
+#ifdef CONFIG_X86_32
+	unsigned long           previous_esp;   /* ESP of the previous stack in
+						   case of nested (IRQ) stacks
+						*/
+	__u8			supervisor_stack[0];
+#endif
+	int			uaccess_err;
+};
+
+/* how to get the current stack pointer from C */
+register unsigned long current_stack_pointer asm("esp") __used;
+
+/* how to get the thread information struct from C */
+static inline struct thread_info *current_thread_info(void)
+{
+	return (struct thread_info *)
+		(current_stack_pointer & ~(THREAD_SIZE - 1));
+}
+
+#define TIF_NEED_RESCHED        3       /* rescheduling necessary */
+
+/*-- preempt.h linux/thread_info.h bitops.h dependencies (simplfied): --------------------*/
+
+static inline void set_bit(int nr, unsigned long *addr)
+{
+	addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG);
+}
+
+static inline void clear_bit(int nr, unsigned long *addr)
+{
+	addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG));
+}
+
+static __always_inline int test_bit(unsigned int nr, const unsigned long *addr)
+{
+	return ((1UL << (nr % BITS_PER_LONG)) &
+		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+}
+
+/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
+
+static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	set_bit(flag, (unsigned long *)&ti->flags);
+}
+
+static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	clear_bit(flag, (unsigned long *)&ti->flags);
+}
+
+static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	return test_bit(flag, (unsigned long *)&ti->flags);
+}
+
+#define set_thread_flag(flag) \
+	set_ti_thread_flag(current_thread_info(), flag)
+#define clear_thread_flag(flag) \
+	clear_ti_thread_flag(current_thread_info(), flag)
+#define test_and_set_thread_flag(flag) \
+	test_and_set_ti_thread_flag(current_thread_info(), flag)
+#define test_and_clear_thread_flag(flag) \
+	test_and_clear_ti_thread_flag(current_thread_info(), flag)
+#define test_thread_flag(flag) \
+	test_ti_thread_flag(current_thread_info(), flag)
+
+/*-- rcu API preempt.h dependencies: ---------------------------------------------------*/
+
+void preempt_schedule(void);
+
+#define preempt_disable() \
+do { \
+	inc_preempt_count(); \
+	barrier(); \
+} while (0)
+
+#define preempt_enable_no_resched() \
+do { \
+	barrier(); \
+	dec_preempt_count(); \
+} while (0)
+
+#define preempt_check_resched() \
+do { \
+	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
+		preempt_schedule(); \
+} while (0)
+
+#define preempt_enable() \
+do { \
+	preempt_enable_no_resched(); \
+	barrier(); \
+	preempt_check_resched(); \
+} while (0)
+
+# define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
+# define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
+
+#define inc_preempt_count() add_preempt_count(1)
+#define dec_preempt_count() sub_preempt_count(1)
+
+#define preempt_count()	(current_thread_info()->preempt_count)
+
+static inline void __rcu_read_lock(void)
+{
+	preempt_disable();
+}
+
+static inline void __rcu_read_unlock(void)
+{
+	preempt_enable();
+}
+
+static inline void rcu_read_lock(void)
+{
+	__rcu_read_lock();
+	__acquire(RCU);
+}
+
+static inline void rcu_read_unlock(void)
+{
+	__release(RCU);
+	__rcu_read_unlock();
+}
+
+/*-- pid.c sched.h API usage: ---------------------------------------------------*/
+
+static inline struct pid *task_pid(struct task_struct *task)
+{
+	return task->pids[PIDTYPE_PID].pid;
+}
+
+/*-- pid.c cache.h API usage: ---------------------------------------------------*/
+
+#define SMP_CACHE_BYTES 32
+
+#ifndef __cacheline_aligned
+#define __cacheline_aligned					\
+  __attribute__((__aligned__(SMP_CACHE_BYTES),			\
+		 __section__(".data..cacheline_aligned")))
+#endif /* __cacheline_aligned */
+
+#ifndef __cacheline_aligned_in_smp
+#ifdef CONFIG_SMP
+#define __cacheline_aligned_in_smp __cacheline_aligned
+#else
+#define __cacheline_aligned_in_smp
+#endif /* CONFIG_SMP */
+#endif
+
+/*-- pid.c spinlock.h API usage: ---------------------------------------------------*/
+
+#define __ARCH_SPIN_LOCK_UNLOCKED	{ 0 }
+
+#define __SPIN_LOCK_INITIALIZER(lockname) \
+	{ { .rlock = __RAW_SPIN_LOCK_INITIALIZER(lockname) } }
+
+#define __SPIN_LOCK_UNLOCKED(lockname) \
+	(spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
+
+#define DEFINE_SPINLOCK(x)	spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
+
+/*-- pid.c atomic.h API usage: ---------------------------------------------------*/
+
+#define LOCK_PREFIX "lock;"
+
+#define ATOMIC_INIT(i)	{ (i) }
+
+/**
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v.
+ */
+static inline int atomic_read(const atomic_t *v)
+{
+	return (*(volatile int *)&(v)->counter);
+}
+
+/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i.
+ */
+static inline void atomic_set(atomic_t *v, int i)
+{
+	v->counter = i;
+}
+
+/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v.
+ */
+static inline void atomic_add(int i, atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "addl %1,%0"
+		     : "+m" (v->counter)
+		     : "ir" (i));
+}
+
+/**
+ * atomic_sub - subtract integer from atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v.
+ */
+static inline void atomic_sub(int i, atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "subl %1,%0"
+		     : "+m" (v->counter)
+		     : "ir" (i));
+}
+
+/**
+ * atomic_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases.
+ */
+static inline int atomic_sub_and_test(int i, atomic_t *v)
+{
+	unsigned char c;
+
+	asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
+		     : "+m" (v->counter), "=qm" (c)
+		     : "ir" (i) : "memory");
+	return c;
+}
+
+/**
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1.
+ */
+static inline void atomic_inc(atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "incl %0"
+		     : "+m" (v->counter));
+}
+
+/**
+ * atomic_dec - decrement atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1.
+ */
+static inline void atomic_dec(atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "decl %0"
+		     : "+m" (v->counter));
+}
+
+/**
+ * atomic_dec_and_test - decrement and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases.
+ */
+static inline int atomic_dec_and_test(atomic_t *v)
+{
+	unsigned char c;
+
+	asm volatile(LOCK_PREFIX "decl %0; sete %1"
+		     : "+m" (v->counter), "=qm" (c)
+		     : : "memory");
+	return c != 0;
+}
+
+/*-- pid.c hash.h API usage: ---------------------------------------------------*/
+
+/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */
+#define GOLDEN_RATIO_PRIME_32 0x9e370001UL
+/*  2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */
+#define GOLDEN_RATIO_PRIME_64 0x9e37fffffffc0001UL
+
+#if BITS_PER_LONG == 32
+#define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_32
+#define hash_long(val, bits) hash_32(val, bits)
+#elif BITS_PER_LONG == 64
+#define hash_long(val, bits) hash_64(val, bits)
+#define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_64
+#else
+#error Wordsize not 32 or 64
+#endif
+
+static inline u64 hash_64(u64 val, unsigned int bits)
+{
+	u64 hash = val;
+
+	/*  Sigh, gcc can't optimise this alone like it does for 32 bits. */
+	u64 n = hash;
+	n <<= 18;
+	hash -= n;
+	n <<= 33;
+	hash -= n;
+	n <<= 3;
+	hash += n;
+	n <<= 3;
+	hash -= n;
+	n <<= 4;
+	hash += n;
+	n <<= 2;
+	hash += n;
+
+	/* High bits are more random, so use them. */
+	return hash >> (64 - bits);
+}
+
+static inline u32 hash_32(u32 val, unsigned int bits)
+{
+	/* On some cpus multiply is faster, on others gcc will do shifts */
+	u32 hash = val * GOLDEN_RATIO_PRIME_32;
+
+	/* High bits are more random, so use them. */
+	return hash >> (32 - bits);
+}
+
+static inline unsigned long hash_ptr(void *ptr, unsigned int bits)
+{
+	return hash_long((unsigned long)ptr, bits);
+}
+
+/*-- pid.c API (some of them nasty hacks/shortcuts): ----------------------------------------------*/
+
+
+#define container_of(ptr, type, member) ({			\
+	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+	(type *)( (char *)__mptr - offsetof(type,member) );})
+
+extern void call_rcu(struct rcu_head *head,
+                              void (*func)(struct rcu_head *head));
+#define cmpxchg(ptr, old, new) ({ new; })
+
+extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
+		size, unsigned long offset);
+
+extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
+		long size, unsigned long offset);
+
+extern unsigned long find_first_bit(const unsigned long *addr,
+				    unsigned long size);
+
+extern unsigned long find_first_zero_bit(const unsigned long *addr,
+					 unsigned long size);
+
+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
+#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
+
+static inline struct pid *get_pid(struct pid *pid)
+{
+	if (pid)
+		atomic_inc(&pid->count);
+	return pid;
+}
+
+extern void kref_get(struct kref *kref);
+
+static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
+{
+	if (ns != &init_pid_ns)
+		kref_get(&ns->kref);
+	return ns;
+}
+
+#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
+
+extern void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h);
+extern void hlist_del_rcu(struct hlist_node *n);
+extern void *kzalloc(size_t size, gfp_t flags);
+extern void *kfree(void *ptr);
+
+#define GFP_KERNEL 1
+
+void kmem_cache_free(struct kmem_cache *, void *);
+void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
+
+#define lockdep_tasklist_lock_is_held() do { } while (0)
+
+static inline void put_pid_ns(struct pid_namespace *ns) { }
+
+#define rcu_dereference_raw(x) x
+#define rcu_dereference_check(x, y) x
+#define hlist_first_rcu(head)	(*((struct hlist_node __rcu **)(&(head)->first)))
+
+
+#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
+
+static inline void INIT_HLIST_NODE(struct hlist_node *h)
+{
+	h->next = NULL;
+	h->pprev = NULL;
+}
+
+static inline int hlist_unhashed(const struct hlist_node *h)
+{
+	return !h->pprev;
+}
+
+static inline int hlist_empty(const struct hlist_head *h)
+{
+	return !h->first;
+}
+
+static inline void __hlist_del(struct hlist_node *n)
+{
+	struct hlist_node *next = n->next;
+	struct hlist_node **pprev = n->pprev;
+	*pprev = next;
+	if (next)
+		next->pprev = pprev;
+}
+
+static inline void hlist_del(struct hlist_node *n)
+{
+	__hlist_del(n);
+}
+
+static inline void hlist_del_init(struct hlist_node *n)
+{
+	if (!hlist_unhashed(n)) {
+		__hlist_del(n);
+		INIT_HLIST_NODE(n);
+	}
+}
+
+#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
+#define hlist_next_rcu(node)	(*((struct hlist_node __rcu **)(&(node)->next)))
+
+#define hlist_for_each_entry_rcu(tpos, pos, head, member)		\
+	for (pos = rcu_dereference_raw(hlist_first_rcu(head));		\
+		pos &&							 \
+		({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \
+		pos = rcu_dereference_raw(hlist_next_rcu(pos)))
+
+extern struct task_struct *current;
+
+static __always_inline int test_and_set_bit(unsigned int nr, const unsigned long *addr)
+{
+	return ((1UL << (nr % BITS_PER_LONG)) &
+		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+}
+
+
+extern void spin_lock_irq(spinlock_t *lock);
+extern void spin_lock_irqsave(spinlock_t *lock, unsigned long flags);
+extern void spin_unlock_irq(spinlock_t *lock);
+extern void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags);
+
+struct mnt_namespace;
+struct uts_namespace;
+struct ipc_namespace;
+struct pid_namespace;
+struct fs_struct;
+
+/*
+ * A structure to contain pointers to all per-process
+ * namespaces - fs (mount), uts, network, sysvipc, etc.
+ *
+ * 'count' is the number of tasks holding a reference.
+ * The count for each namespace, then, will be the number
+ * of nsproxies pointing to it, not the number of tasks.
+ *
+ * The nsproxy is shared by tasks which share all namespaces.
+ * As soon as a single namespace is cloned or unshared, the
+ * nsproxy is copied.
+ */
+struct nsproxy {
+	atomic_t count;
+	struct uts_namespace *uts_ns;
+	struct ipc_namespace *ipc_ns;
+	struct mnt_namespace *mnt_ns;
+	struct pid_namespace *pid_ns;
+	struct net 	     *net_ns;
+};
+
+static inline struct pid_namespace *ns_of_pid(struct pid *pid)
+{
+	struct pid_namespace *ns = NULL;
+	if (pid)
+		ns = pid->numbers[pid->level].ns;
+	return ns;
+}
+
+#define rcu_lockdep_assert(x)
+#define rcu_read_lock_held() 0
+
+#define pid_alive(x) 1
+
+extern void hlist_replace_rcu(struct hlist_node *old, struct hlist_node *new);
+
+static inline struct pid *task_tgid(struct task_struct *task)
+{
+	return task->group_leader->pids[PIDTYPE_PID].pid;
+}
+
+#define __init
+
+extern void *alloc_large_system_hash(const char *tablename,
+				     unsigned long bucketsize,
+				     unsigned long numentries,
+				     int scale,
+				     int flags,
+				     unsigned int *_hash_shift,
+				     unsigned int *_hash_mask,
+				     unsigned long limit);
+
+#define HASH_EARLY	0x00000001	/* Allocating during early boot? */
+#define HASH_SMALL	0x00000002	/* sub-page allocation allowed, min */
+
+
+/*
+ * min()/max()/clamp() macros that also do
+ * strict type-checking.. See the
+ * "unnecessary" pointer comparison.
+ */
+#define min(x, y) ({				\
+	typeof(x) _min1 = (x);			\
+	typeof(y) _min2 = (y);			\
+	(void) (&_min1 == &_min2);		\
+	_min1 < _min2 ? _min1 : _min2; })
+
+#define max(x, y) ({				\
+	typeof(x) _max1 = (x);			\
+	typeof(y) _max2 = (y);			\
+	(void) (&_max1 == &_max2);		\
+	_max1 > _max2 ? _max1 : _max2; })
+
+#define min3(x, y, z) ({			\
+	typeof(x) _min1 = (x);			\
+	typeof(y) _min2 = (y);			\
+	typeof(z) _min3 = (z);			\
+	(void) (&_min1 == &_min2);		\
+	(void) (&_min1 == &_min3);		\
+	_min1 < _min2 ? (_min1 < _min3 ? _min1 : _min3) : \
+		(_min2 < _min3 ? _min2 : _min3); })
+
+#define max3(x, y, z) ({			\
+	typeof(x) _max1 = (x);			\
+	typeof(y) _max2 = (y);			\
+	typeof(z) _max3 = (z);			\
+	(void) (&_max1 == &_max2);		\
+	(void) (&_max1 == &_max3);		\
+	_max1 > _max2 ? (_max1 > _max3 ? _max1 : _max3) : \
+		(_max2 > _max3 ? _max2 : _max3); })
+
+/**
+ * min_not_zero - return the minimum that is _not_ zero, unless both are zero
+ * @x: value1
+ * @y: value2
+ */
+#define min_not_zero(x, y) ({			\
+	typeof(x) __x = (x);			\
+	typeof(y) __y = (y);			\
+	__x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
+
+/**
+ * clamp - return a value clamped to a given range with strict typechecking
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does strict typechecking of min/max to make sure they are of the
+ * same type as val.  See the unnecessary pointer comparisons.
+ */
+#define clamp(val, min, max) ({			\
+	typeof(val) __val = (val);		\
+	typeof(min) __min = (min);		\
+	typeof(max) __max = (max);		\
+	(void) (&__val == &__min);		\
+	(void) (&__val == &__max);		\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+/*
+ * ..and if you can't take the strict
+ * types, you can specify one yourself.
+ *
+ * Or not use min/max/clamp at all, of course.
+ */
+#define min_t(type, x, y) ({			\
+	type __min1 = (x);			\
+	type __min2 = (y);			\
+	__min1 < __min2 ? __min1: __min2; })
+
+#define max_t(type, x, y) ({			\
+	type __max1 = (x);			\
+	type __max2 = (y);			\
+	__max1 > __max2 ? __max1: __max2; })
+
+/**
+ * clamp_t - return a value clamped to a given range using a given type
+ * @type: the type of variable to use
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does no typechecking and uses temporary variables of type
+ * 'type' to make all the comparisons.
+ */
+#define clamp_t(type, val, min, max) ({		\
+	type __val = (val);			\
+	type __min = (min);			\
+	type __max = (max);			\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+/**
+ * clamp_val - return a value clamped to a given range using val's type
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does no typechecking and uses temporary variables of whatever
+ * type the input argument 'val' is.  This is useful when val is an unsigned
+ * type and min and max are literals that will otherwise be assigned a signed
+ * integer type.
+ */
+#define clamp_val(val, min, max) ({		\
+	typeof(val) __val = (val);		\
+	typeof(val) __min = (min);		\
+	typeof(val) __max = (max);		\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+#define PIDS_PER_CPU_DEFAULT	1024
+#define PIDS_PER_CPU_MIN	8
+
+extern const struct cpumask *const cpu_possible_mask;
+
+#define num_possible_cpus()	cpumask_weight(cpu_possible_mask)
+#define cpumask_bits(maskp) ((maskp)->bits)
+
+extern int bitmap_weight(const unsigned long *bitmap, int bits);
+
+#define nr_cpumask_bits	NR_CPUS
+
+static inline unsigned int cpumask_weight(const struct cpumask *srcp)
+{
+	return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits);
+}
+
+int eprintf(int level,
+	    const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+
+#define pr_fmt(fmt) fmt
+
+#define pr_info(fmt, ...) \
+	eprintf(0, pr_fmt(fmt), ##__VA_ARGS__)
+
+#define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
+		sizeof(struct __struct), __alignof__(struct __struct),\
+		(__flags), NULL)
+
+struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
+			unsigned long,
+			void (*)(void *));
+void kmem_cache_destroy(struct kmem_cache *);
+
+#define SLAB_HWCACHE_ALIGN 32
+
+#define SLAB_PANIC 1
+
+/*-- pid.c C code: ---------------------------------------------------*/
 
 #define pid_hashfn(nr, ns)	\
 	hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift)
@@ -264,7 +2700,7 @@ void free_pid(struct pid *pid)
 {
 	/* We can be called with write_lock_irq(&tasklist_lock) held */
 	int i;
-	unsigned long flags;
+	unsigned long flags = 0;
 
 	spin_lock_irqsave(&pidmap_lock, flags);
 	for (i = 0; i <= pid->level; i++)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
@ 2011-05-23  9:09     ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2011-05-23  9:09 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, David Miller,
	linux-next, linux-kernel, x86, Peter Zijlstra, Andrew Morton


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, May 19, 2011 at 11:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (sparc32 defconfig)
> > failed like this:
> 
> Hmm. So I had actually done a "allyesconfig" build on x86, which
> annoys me. Because it means that the extra "let's compile everything
> to make sure I didn't break anything" was just almost totally
> worthless.
> 
> What seems to be happening is that the x86 <asm/uaccess.h> include
> ends up getting the <linux/prefetch.h>.
> 
> I have *no* idea why x86 does that, but x86 wants prefetch.h *so* much
> that it actually includes it first in <asm/uaccess.h> and then *again*
> in each of the 32/64-bit specific <asm/uaccess_[32,64].h> header
> files.
>
> That seems a bit excessive. I don't think x86 should include 
> <linux/prefetch.h> at all, since (a) it doesn't actually use any of it, and 
> (b) it ended up hiding this problem from me.

Most definitely.

> Thomas, Ingo, Peter: would you be willing to just remove that stupid header 
> file inclusion and fix up the fallout? Instead of having these one-by-one 
> patches that come from Stephen testing out breakage on other architectures 
> that x86 simply hid due to its odd include files?

Agreed - i see you've done this with commit 268bb0ce.

I've done some kernel change archeology, and the prefetch.h inclusion was done 
for hysterical reasons:

 - In Feb 2002 we added prefetch() to uaccess*.h, see this commit in 
   linux-2.6-historic.git, introducing prefetch() in 
   include/asm-i386/uaccess.h::__constant_copy_to_user():

    1d66e22e0f6b: v2.4.9.8 -> v2.4.9.9

   ( I *think* paulus did it as part of preparing more PowerPC changes - but 
     it's not explicitly mentioned in the changelog.)

 - the x86_64 fork copied the asm-i386 prefetch() so now 64-bit had it too

 - In Sep 2002 this commit from Andrew removed the prefetch() from the i386 
   uaccess.h header:

     0a7bf9c89604: [PATCH] uninline the ia32 copy_*_user functions

   But did not declare this in the changelog - nor did it remove the 
   (now dangling) prefetch.h.

 - In Sep 2003 this x86_64 commit removed the prefetch() usage from the 64-bit 
   uaccess.h as well:

      24594a2bfcaa: [PATCH] x86-64 merge

     - Remove some unneeded prefetches.  Just two are enough to kickstart
       the hardware prefetcher.

   But despite touching prefetches explicitly, this too sloppily left the (now
   dangling) prefetch.h include file around.

 - 8 years later it was still around.

Such thing happen due to:

 - header files only get added, almost never removed

The key thing was that the build did not break when prefetch.h was kept 
dangling. Not sure what to do about that - for humans a dangling header is 
absolutely non-obvious to find - we'd need tooling help.

Especially since a tight (or bloated) header file hierarchy directly impacts 
our build performance. For example kernel/fork.c has 1700 lines of code in it, 
but after preprocessing it has 30x times as much code (!):

 earth4:~/tip> wc -l kernel/fork.c kernel/fork.i
    1691 kernel/fork.c
   49385 kernel/fork.i

While fork.c is definitely a central file which has to know about almost all 
other subsystem's structure definitions, the #include situation is still 
somewhat obscene.

For smaller subsystems it's in fact *worse*:

 earth4:~/tip> wc -l kernel/pid.[ci]
     570 kernel/pid.c
   38724 kernel/pid.i.vanilla

That's a 60x size bloat! The compiler will run *significantly* slower with 
increasing source code size - it has to parse through those duplications and 
has to process those many inlines as well.

Here's a quick hack and a perf stat measurement showing the effect in action. 

I've attached a totally hacky patch that removes all the big #include's from 
kernel/pid.c and includes all structure and API definitions explicitly.

( Note: near the end it was getting really tedious so i took some shortcuts
  and hacks just to make it build - it's a broken kernel otherwise.  Object 
  file size is still similar so i have not taken too many shortcuts, at least 
  as far as compilation speed goes. )

Firstly, the effective file size results are:

 aldebaran:~/linux/linux> wc -l kernel/pid.c kernel/pid.i.*
     570 kernel/pid.c.vanilla
   38724 kernel/pid.i.vanilla

    3006 kernel/pid.c.slim
    2542 kernel/pid.i.slim

So the 38 KLOC bloat was cut down to 2.5 KLOC - a more than 10x improvement.

Even considering the invalid shortcuts i took to make this build, halving the 
bloat would be quite realistic.

What effect does include file bloat have on kernel build speed?

I've measured the build time of kernel/pid.o - with no Make overhead, just the 
cc command itself:

 gcc -Wp,-MD,kernel/.pid.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.6.0/include -I/home/mingo/tip/arch/x86/include -Iinclude  -include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-si
 gn -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pid)"  -D"KBUILD_MODNAME=KBUILD_STR(pid)" -c -o kernel/pid.o kernel/pid.c

The results are pretty interesting:

 | Vanilla pid.c :
 -----------------

 $ perf stat -e task-clock --repeat 10 ./build-pid 

 Performance counter stats for './build-pid' (10 runs):

        223.500413 task-clock                #    1.010 CPUs utilized            ( +-  0.10% )

       0.221370168 seconds time elapsed                                          ( +-  0.20% )

 | Debloated pid.c :
 -------------------

 $ perf stat -e task-clock --repeat 10 ./build-pid 

 Performance counter stats for './build-pid' (10 runs):

         97.488258 task-clock                #    1.019 CPUs utilized            ( +-  0.06% )

       0.095649333 seconds time elapsed                                          ( +-  0.15% )

So we got a 56.4% kernel build speedup from the debloating! Note, i used the 
latest available version of GCC, 4.6.0.

Put differently, our bloat is causing a 2.3x slowdown in kernel build speed 
right now (!).

Where does the bloat come from? Here's the rough distribution (by line numbers):

29:/*-- basic kernel types: ---------------------------------------------------*/
32:/*-- RCU header - should move into types.h? ---------------------------------------------------*/
39:/*-- pid.h types: ---------------------------------------------------*/
49:/*-- sched.h, rbnode.h dependency: ---------------------------------------------------*/
67:/*-- sched.h, scheduler state: ---------------------------------------------------*/
164:/*-- sched.h, cpumask.h types: ---------------------------------------------------*/
174:/*-- sched.h, plist.h types: ---------------------------------------------------*/
190:/*-- sched.h, pid types: ---------------------------------------------------*/
198:/*-- sched.h, time types - needlessly arch dependent should move into types.h? -----------*/
216:/*-- sched.h, spinlock.h dependencies:  -----------*/
284:/*-- sched.h, ipc.h dependencies:  -----------*/
296:/*-- sched.h, signal state dependencies:  -----------*/
375:/*-- sched.h, arch thread state dependencies:  -----------*/
545:/*-- sched.h, seccomp state dependencies:  -----------*/
549:/*-- sched.h, IO accounting state dependencies:  -----------*/
587:/*-- sched.h, nodemask.h types:  -----------*/
599:/*-- sched.h, mutex type:  -----------*/
618:/*-- sched.h, perf event state:  -----------*/
681:/*-- sched.h, mm dirty state:  -----------*/
698:/*-- sched.h, task state:  -----------*/
1052:/*--  pid.c, PID type definitions:  -----------*/
1133:/*-- module.h arch dependency: ---------------------------------------------------*/
1149:/*-- module.h ELF dependencies: ---------------------------------------------------*/
1233:/*-- module.h sysfs dependencies: ---------------------------------------------------*/
1259:/*-- module.h's init.h dependency: -------------------------------*/
1263:/*-- module.h: ---------------------------------------------------*/
1730:/*-- pid.c API usage: ---------------------------------------------------*/
1731:/*-- preempt.h thread_info dependencies: --------------------------------*/
1732:/*-- preempt.h thread_info processor.h dependencies: --------------------*/
1738:/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
1778:/*-- preempt.h asm/thread_info.h page_types.h dependencies: --------------------*/
1783:/*-- preempt.h asm/thread_info.h dependencies: --------------------*/
1820:/*-- preempt.h linux/thread_info.h bitops.h dependencies (simplfied): --------------------*/
1838:/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
1866:/*-- rcu API preempt.h dependencies: ---------------------------------------------------*/
1925:/*-- pid.c sched.h API usage: ---------------------------------------------------*/
1932:/*-- pid.c cache.h API usage: ---------------------------------------------------*/
1950:/*-- pid.c spinlock.h API usage: ---------------------------------------------------*/
1962:/*-- pid.c atomic.h API usage: ---------------------------------------------------*/
2080:/*-- pid.c hash.h API usage: ---------------------------------------------------*/
2134:/*-- pid.c API (some of them nasty hacks/shortcuts): ----------------------------------------------*/
2474:/*-- pid.c C code: ---------------------------------------------------*/

Out of ~2400 lines of header files, half of it is task state. Most of the 
task_struct details that get defined are not used by pid.c! Much of this could 
be fixed by moving scheduler, signal, arch thread state details behind an 
opaque pointer. This would have runtime performance impact - but most likely a 
pretty minimal one.

A surprisingly large chunk are all the module.h details which brings in details 
like large elf.h definitions - despite pid.c only relying on the module code 
for the spurious use of EXPORT_SYMBOL primitives. Fixing this would cause no 
runtime overhead AFAICS.

Another big chunk are the RCU definitions and APIs. These too are inlined for 
performance reasons - and that seems justified.

Anway, what i tried to demonstrate with this mail how much *real* slowdown in 
the kernel build our current header file bloat is causing. We could literally 
halve our kernel build times if we fixed this!

Thanks,

	Ingo

-------------------->
Subject: pid.c: Ugly hacks to measure include file bloat
From: Ingo Molnar <mingo@elte.hu>
Date: Mon May 23 09:09:27 CEST 2011

Absolutely-NOT-Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/pid.c | 2458 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 2447 insertions(+), 11 deletions(-)

Index: linux/kernel/pid.c
===================================================================
--- linux.orig/kernel/pid.c
+++ linux/kernel/pid.c
@@ -26,16 +26,2452 @@
  *
  */
 
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/rculist.h>
-#include <linux/bootmem.h>
-#include <linux/hash.h>
-#include <linux/pid_namespace.h>
-#include <linux/init_task.h>
-#include <linux/syscalls.h>
+/*-- basic kernel types: ---------------------------------------------------*/
+#include <linux/types.h>
+
+/*-- RCU header - should move into types.h? ---------------------------------------------------*/
+
+struct rcu_head {
+	struct rcu_head *next;
+	void (*func)(struct rcu_head *head);
+};
+
+/*-- pid.h types: ---------------------------------------------------*/
+
+enum pid_type
+{
+	PIDTYPE_PID,
+	PIDTYPE_PGID,
+	PIDTYPE_SID,
+	PIDTYPE_MAX
+};
+
+/*-- sched.h, rbnode.h dependency: ---------------------------------------------------*/
+
+struct rb_node
+{
+	unsigned long  rb_parent_color;
+#define	RB_RED		0
+#define	RB_BLACK	1
+	struct rb_node *rb_right;
+	struct rb_node *rb_left;
+} __attribute__((aligned(sizeof(long))));
+    /* The alignment might seem pointless, but allegedly CRIS needs it */
+
+struct rb_root
+{
+	struct rb_node *rb_node;
+};
+
+
+/*-- sched.h, scheduler state: ---------------------------------------------------*/
+
+struct load_weight {
+	unsigned long weight, inv_weight;
+};
+
+
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
+struct sched_info {
+	/* cumulative counters */
+	unsigned long pcount;	      /* # of times run on this cpu */
+	unsigned long long run_delay; /* time spent waiting on a runqueue */
+
+	/* timestamps */
+	unsigned long long last_arrival,/* when we last ran on a cpu */
+			   last_queued;	/* when we were last queued to run */
+};
+#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
+
+#ifdef CONFIG_SCHEDSTATS
+struct sched_statistics {
+	u64			wait_start;
+	u64			wait_max;
+	u64			wait_count;
+	u64			wait_sum;
+	u64			iowait_count;
+	u64			iowait_sum;
+
+	u64			sleep_start;
+	u64			sleep_max;
+	s64			sum_sleep_runtime;
+
+	u64			block_start;
+	u64			block_max;
+	u64			exec_max;
+	u64			slice_max;
+
+	u64			nr_migrations_cold;
+	u64			nr_failed_migrations_affine;
+	u64			nr_failed_migrations_running;
+	u64			nr_failed_migrations_hot;
+	u64			nr_forced_migrations;
+
+	u64			nr_wakeups;
+	u64			nr_wakeups_sync;
+	u64			nr_wakeups_migrate;
+	u64			nr_wakeups_local;
+	u64			nr_wakeups_remote;
+	u64			nr_wakeups_affine;
+	u64			nr_wakeups_affine_attempts;
+	u64			nr_wakeups_passive;
+	u64			nr_wakeups_idle;
+};
+#endif
+
+struct sched_entity {
+	struct load_weight	load;		/* for load-balancing */
+	struct rb_node		run_node;
+	struct list_head	group_node;
+	unsigned int		on_rq;
+
+	u64			exec_start;
+	u64			sum_exec_runtime;
+	u64			vruntime;
+	u64			prev_sum_exec_runtime;
+
+	u64			nr_migrations;
+
+#ifdef CONFIG_SCHEDSTATS
+	struct sched_statistics statistics;
+#endif
+
+#ifdef CONFIG_FAIR_GROUP_SCHED
+	struct sched_entity	*parent;
+	/* rq on which this entity is (to be) queued: */
+	struct cfs_rq		*cfs_rq;
+	/* rq "owned" by this entity/group: */
+	struct cfs_rq		*my_q;
+#endif
+};
+
+struct sched_rt_entity {
+	struct list_head run_list;
+	unsigned long timeout;
+	unsigned int time_slice;
+	int nr_cpus_allowed;
+
+	struct sched_rt_entity *back;
+#ifdef CONFIG_RT_GROUP_SCHED
+	struct sched_rt_entity	*parent;
+	/* rq on which this entity is (to be) queued: */
+	struct rt_rq		*rt_rq;
+	/* rq "owned" by this entity/group: */
+	struct rt_rq		*my_q;
+#endif
+};
+
+/*-- sched.h, cpumask.h types: ---------------------------------------------------*/
+
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+
+#define BITS_TO_LONGS(nr)       DIV_ROUND_UP(nr, 8 * sizeof(long))
+
+#define NR_CPUS		CONFIG_NR_CPUS
+
+typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
+/*-- sched.h, plist.h types: ---------------------------------------------------*/
+
+struct plist_node {
+	int			prio;
+	struct list_head	prio_list;
+	struct list_head	node_list;
+};
+
+struct plist_head {
+	struct list_head node_list;
+#ifdef CONFIG_DEBUG_PI_LIST
+	raw_spinlock_t *rawlock;
+	spinlock_t *spinlock;
+#endif
+};
+
+/*-- sched.h, pid types: ---------------------------------------------------*/
+
+struct pid_link
+{
+	struct hlist_node node;
+	struct pid *pid;
+};
+
+/*-- sched.h, time types - needlessly arch dependent should move into types.h? -----------*/
+
+typedef unsigned long cputime_t;
+
+struct task_cputime {
+	cputime_t utime;
+	cputime_t stime;
+	unsigned long long sum_exec_runtime;
+};
+
+/* Alternate field names when used to cache expirations. */
+struct timespec {
+	__kernel_time_t	tv_sec;			/* seconds */
+	long		tv_nsec;		/* nanoseconds */
+};
+
+#define TASK_COMM_LEN 16
+
+/*-- sched.h, spinlock.h dependencies:  -----------*/
+
+typedef struct arch_spinlock {
+	unsigned int slock;
+} arch_spinlock_t;
+
+typedef struct {
+	unsigned int lock;
+} arch_rwlock_t;
+
+typedef struct raw_spinlock {
+	arch_spinlock_t raw_lock;
+#ifdef CONFIG_GENERIC_LOCKBREAK
+	unsigned int break_lock;
+#endif
+#ifdef CONFIG_DEBUG_SPINLOCK
+	unsigned int magic, owner_cpu;
+	void *owner;
+#endif
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map dep_map;
+#endif
+} raw_spinlock_t;
+
+#define SPINLOCK_MAGIC		0xdead4ead
+
+#define SPINLOCK_OWNER_INIT	((void *)-1L)
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define SPIN_DEP_MAP_INIT(lockname)	.dep_map = { .name = #lockname }
+#else
+# define SPIN_DEP_MAP_INIT(lockname)
+#endif
+
+#ifdef CONFIG_DEBUG_SPINLOCK
+# define SPIN_DEBUG_INIT(lockname)		\
+	.magic = SPINLOCK_MAGIC,		\
+	.owner_cpu = -1,			\
+	.owner = SPINLOCK_OWNER_INIT,
+#else
+# define SPIN_DEBUG_INIT(lockname)
+#endif
+
+#define __RAW_SPIN_LOCK_INITIALIZER(lockname)	\
+	{					\
+	.raw_lock = __ARCH_SPIN_LOCK_UNLOCKED,	\
+	SPIN_DEBUG_INIT(lockname)		\
+	SPIN_DEP_MAP_INIT(lockname) }
+
+#define __RAW_SPIN_LOCK_UNLOCKED(lockname)	\
+	(raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
+
+#define DEFINE_RAW_SPINLOCK(x)	raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
+
+typedef struct spinlock {
+	union {
+		struct raw_spinlock rlock;
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map))
+		struct {
+			u8 __padding[LOCK_PADSIZE];
+			struct lockdep_map dep_map;
+		};
+#endif
+	};
+} spinlock_t;
+
+/*-- sched.h, ipc.h dependencies:  -----------*/
+
+struct sem_undo_list {
+	atomic_t		refcnt;
+	spinlock_t		lock;
+	struct list_head	list_proc;
+};
+
+struct sysv_sem {
+	struct sem_undo_list *undo_list;
+};
+
+/*-- sched.h, signal state dependencies:  -----------*/
+
+typedef unsigned long sigset_t;
+
+struct sigpending {
+	struct list_head list;
+	sigset_t signal;
+};
+
+typedef union sigval {
+	int sival_int;
+	void __user *sival_ptr;
+} sigval_t;
+
+#define __ARCH_SI_PREAMBLE_SIZE	(3 * sizeof(int))
+
+#define SI_MAX_SIZE	128
+#define SI_PAD_SIZE	((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+
+#define __ARCH_SI_UID_T	__kernel_uid32_t
+
+#define __ARCH_SI_BAND_T long
+
+typedef struct siginfo {
+	int si_signo;
+	int si_errno;
+	int si_code;
+
+	union {
+		int _pad[SI_PAD_SIZE];
+
+		/* kill() */
+		struct {
+			__kernel_pid_t _pid;	/* sender's pid */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+		} _kill;
+
+		/* POSIX.1b timers */
+		struct {
+			__kernel_timer_t _tid;	/* timer id */
+			int _overrun;		/* overrun count */
+			char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+			sigval_t _sigval;	/* same as below */
+			int _sys_private;       /* not to be passed to user */
+		} _timer;
+
+		/* POSIX.1b signals */
+		struct {
+			__kernel_pid_t _pid;	/* sender's pid */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+			sigval_t _sigval;
+		} _rt;
+
+		/* SIGCHLD */
+		struct {
+			__kernel_pid_t _pid;	/* which child */
+			__ARCH_SI_UID_T _uid;	/* sender's uid */
+			int _status;		/* exit code */
+			__kernel_clock_t _utime;
+			__kernel_clock_t _stime;
+		} _sigchld;
+
+		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+		struct {
+			void __user *_addr; /* faulting insn/memory ref. */
+#ifdef __ARCH_SI_TRAPNO
+			int _trapno;	/* TRAP # which caused the signal */
+#endif
+			short _addr_lsb; /* LSB of the reported address */
+		} _sigfault;
+
+		/* SIGPOLL */
+		struct {
+			__ARCH_SI_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
+			int _fd;
+		} _sigpoll;
+	} _sifields;
+} siginfo_t;
+
+/*-- sched.h, arch thread state dependencies:  -----------*/
+
+#define GDT_ENTRY_TLS_ENTRIES 3
+#define HBP_NUM 4
+
+struct desc_struct {
+	union {
+		struct {
+			unsigned int a;
+			unsigned int b;
+		};
+		struct {
+			u16 limit0;
+			u16 base0;
+			unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
+			unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
+		};
+	};
+} __attribute__((packed));
+
+struct i387_fsave_struct {
+	u32			cwd;	/* FPU Control Word		*/
+	u32			swd;	/* FPU Status Word		*/
+	u32			twd;	/* FPU Tag Word			*/
+	u32			fip;	/* FPU IP Offset		*/
+	u32			fcs;	/* FPU IP Selector		*/
+	u32			foo;	/* FPU Operand Pointer Offset	*/
+	u32			fos;	/* FPU Operand Pointer Selector	*/
+
+	/* 8*10 bytes for each FP-reg = 80 bytes:			*/
+	u32			st_space[20];
+
+	/* Software status information [not touched by FSAVE ]:		*/
+	u32			status;
+};
+
+struct i387_fxsave_struct {
+	u16			cwd; /* Control Word			*/
+	u16			swd; /* Status Word			*/
+	u16			twd; /* Tag Word			*/
+	u16			fop; /* Last Instruction Opcode		*/
+	union {
+		struct {
+			u64	rip; /* Instruction Pointer		*/
+			u64	rdp; /* Data Pointer			*/
+		};
+		struct {
+			u32	fip; /* FPU IP Offset			*/
+			u32	fcs; /* FPU IP Selector			*/
+			u32	foo; /* FPU Operand Offset		*/
+			u32	fos; /* FPU Operand Selector		*/
+		};
+	};
+	u32			mxcsr;		/* MXCSR Register State */
+	u32			mxcsr_mask;	/* MXCSR Mask		*/
+
+	/* 8*16 bytes for each FP-reg = 128 bytes:			*/
+	u32			st_space[32];
+
+	/* 16*16 bytes for each XMM-reg = 256 bytes:			*/
+	u32			xmm_space[64];
+
+	u32			padding[12];
+
+	union {
+		u32		padding1[12];
+		u32		sw_reserved[12];
+	};
+
+} __attribute__((aligned(16)));
+
+struct i387_soft_struct {
+	u32			cwd;
+	u32			swd;
+	u32			twd;
+	u32			fip;
+	u32			fcs;
+	u32			foo;
+	u32			fos;
+	/* 8*10 bytes for each FP-reg = 80 bytes: */
+	u32			st_space[20];
+	u8			ftop;
+	u8			changed;
+	u8			lookahead;
+	u8			no_update;
+	u8			rm;
+	u8			alimit;
+	struct math_emu_info	*info;
+	u32			entry_eip;
+};
+
+struct ymmh_struct {
+	/* 16 * 16 bytes for each YMMH-reg = 256 bytes */
+	u32 ymmh_space[64];
+};
+
+struct xsave_hdr_struct {
+	u64 xstate_bv;
+	u64 reserved1[2];
+	u64 reserved2[5];
+} __attribute__((packed));
+
+struct xsave_struct {
+	struct i387_fxsave_struct i387;
+	struct xsave_hdr_struct xsave_hdr;
+	struct ymmh_struct ymmh;
+	/* new processor state extensions will go here */
+} __attribute__ ((packed, aligned (64)));
+
+union thread_xstate {
+	struct i387_fsave_struct	fsave;
+	struct i387_fxsave_struct	fxsave;
+	struct i387_soft_struct		soft;
+	struct xsave_struct		xsave;
+};
+
+struct fpu {
+	union thread_xstate *state;
+};
+
+struct thread_struct {
+	/* Cached TLS descriptors: */
+	struct desc_struct	tls_array[GDT_ENTRY_TLS_ENTRIES];
+	unsigned long		sp0;
+	unsigned long		sp;
+#ifdef CONFIG_X86_32
+	unsigned long		sysenter_cs;
+#else
+	unsigned long		usersp;	/* Copy from PDA */
+	unsigned short		es;
+	unsigned short		ds;
+	unsigned short		fsindex;
+	unsigned short		gsindex;
+#endif
+#ifdef CONFIG_X86_32
+	unsigned long		ip;
+#endif
+#ifdef CONFIG_X86_64
+	unsigned long		fs;
+#endif
+	unsigned long		gs;
+	/* Save middle states of ptrace breakpoints */
+	struct perf_event	*ptrace_bps[HBP_NUM];
+	/* Debug status used for traps, single steps, etc... */
+	unsigned long           debugreg6;
+	/* Keep track of the exact dr7 value set by the user */
+	unsigned long           ptrace_dr7;
+	/* Fault info: */
+	unsigned long		cr2;
+	unsigned long		trap_no;
+	unsigned long		error_code;
+	/* floating point and extended processor state */
+	struct fpu		fpu;
+#ifdef CONFIG_X86_32
+	/* Virtual 86 mode info */
+	struct vm86_struct __user *vm86_info;
+	unsigned long		screen_bitmap;
+	unsigned long		v86flags;
+	unsigned long		v86mask;
+	unsigned long		saved_sp0;
+	unsigned int		saved_fs;
+	unsigned int		saved_gs;
+#endif
+	/* IO permissions: */
+	unsigned long		*io_bitmap_ptr;
+	unsigned long		iopl;
+	/* Max allowed port in the bitmap, in bytes: */
+	unsigned		io_bitmap_max;
+};
+
+/*-- sched.h, seccomp state dependencies:  -----------*/
+
+typedef struct { int mode; } seccomp_t;
+
+/*-- sched.h, IO accounting state dependencies:  -----------*/
+
+struct task_io_accounting {
+#ifdef CONFIG_TASK_XACCT
+	/* bytes read */
+	u64 rchar;
+	/*  bytes written */
+	u64 wchar;
+	/* # of read syscalls */
+	u64 syscr;
+	/* # of write syscalls */
+	u64 syscw;
+#endif /* CONFIG_TASK_XACCT */
+
+#ifdef CONFIG_TASK_IO_ACCOUNTING
+	/*
+	 * The number of bytes which this task has caused to be read from
+	 * storage.
+	 */
+	u64 read_bytes;
+
+	/*
+	 * The number of bytes which this task has caused, or shall cause to be
+	 * written to disk.
+	 */
+	u64 write_bytes;
+
+	/*
+	 * A task can cause "negative" IO too.  If this task truncates some
+	 * dirty pagecache, some IO which another task has been accounted for
+	 * (in its write_bytes) will not be happening.  We _could_ just
+	 * subtract that from the truncating task's write_bytes, but there is
+	 * information loss in doing that.
+	 */
+	u64 cancelled_write_bytes;
+#endif /* CONFIG_TASK_IO_ACCOUNTING */
+};
+
+/*-- sched.h, nodemask.h types:  -----------*/
+
+#ifdef CONFIG_NODES_SHIFT
+#define NODES_SHIFT     CONFIG_NODES_SHIFT
+#else
+#define NODES_SHIFT     0
+#endif
+
+#define MAX_NUMNODES    (1 << NODES_SHIFT)
+
+typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
+
+/*-- sched.h, mutex type:  -----------*/
+
+struct mutex {
+	/* 1: unlocked, 0: locked, negative: locked, possible waiters */
+	atomic_t		count;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP)
+	struct task_struct	*owner;
+#endif
+#ifdef CONFIG_DEBUG_MUTEXES
+	const char 		*name;
+	void			*magic;
+#endif
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map	dep_map;
+#endif
+};
+
+/*-- sched.h, perf event state:  -----------*/
+
+enum perf_event_context_type {
+	task_context,
+	cpu_context,
+};
+
+/**
+ * struct perf_event_context - event context structure
+ *
+ * Used as a container for task events and CPU events as well:
+ */
+struct perf_event_context {
+	struct pmu			*pmu;
+	enum perf_event_context_type	type;
+	/*
+	 * Protect the states of the events in the list,
+	 * nr_active, and the list:
+	 */
+	raw_spinlock_t			lock;
+	/*
+	 * Protect the list of events.  Locking either mutex or lock
+	 * is sufficient to ensure the list doesn't change; to change
+	 * the list you need to lock both the mutex and the spinlock.
+	 */
+	struct mutex			mutex;
+
+	struct list_head		pinned_groups;
+	struct list_head		flexible_groups;
+	struct list_head		event_list;
+	int				nr_events;
+	int				nr_active;
+	int				is_active;
+	int				nr_stat;
+	int				rotate_disable;
+	atomic_t			refcount;
+	struct task_struct		*task;
+
+	/*
+	 * Context clock, runs when context enabled.
+	 */
+	u64				time;
+	u64				timestamp;
+
+	/*
+	 * These fields let us detect when two contexts have both
+	 * been cloned (inherited) from a common ancestor.
+	 */
+	struct perf_event_context	*parent_ctx;
+	u64				parent_gen;
+	u64				generation;
+	int				pin_count;
+	struct rcu_head			rcu_head;
+	int				nr_cgroups; /* cgroup events present */
+};
+
+enum perf_event_task_context {
+	perf_invalid_context = -1,
+	perf_hw_context = 0,
+	perf_sw_context,
+	perf_nr_task_contexts,
+};
+
+/*-- sched.h, mm dirty state:  -----------*/
+
+struct prop_local_single {
+	/*
+	 * the local events counter
+	 */
+	unsigned long events;
+
+	/*
+	 * snapshot of the last seen global state
+	 * and a lock protecting this state
+	 */
+	unsigned long period;
+	int shift;
+	spinlock_t lock;		/* protect the snapshot state */
+};
+
+/*-- sched.h, task state:  -----------*/
+
+struct task_struct {
+	volatile long state;	/* -1 unrunnable, 0 runnable, >0 stopped */
+	void *stack;
+	atomic_t usage;
+	unsigned int flags;	/* per process flags, defined below */
+	unsigned int ptrace;
+
+#ifdef CONFIG_SMP
+	struct task_struct *wake_entry;
+	int on_cpu;
+#endif
+	int on_rq;
+
+	int prio, static_prio, normal_prio;
+	unsigned int rt_priority;
+	const struct sched_class *sched_class;
+	struct sched_entity se;
+	struct sched_rt_entity rt;
+
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+	/* list of struct preempt_notifier: */
+	struct hlist_head preempt_notifiers;
+#endif
+
+	/*
+	 * fpu_counter contains the number of consecutive context switches
+	 * that the FPU is used. If this is over a threshold, the lazy fpu
+	 * saving becomes unlazy to save the trap. This is an unsigned char
+	 * so that after 256 times the counter wraps and the behavior turns
+	 * lazy again; this to deal with bursty apps that only use FPU for
+	 * a short time
+	 */
+	unsigned char fpu_counter;
+#ifdef CONFIG_BLK_DEV_IO_TRACE
+	unsigned int btrace_seq;
+#endif
+
+	unsigned int policy;
+	cpumask_t cpus_allowed;
+
+#ifdef CONFIG_PREEMPT_RCU
+	int rcu_read_lock_nesting;
+	char rcu_read_unlock_special;
+	struct list_head rcu_node_entry;
+#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#ifdef CONFIG_TREE_PREEMPT_RCU
+	struct rcu_node *rcu_blocked_node;
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
+#ifdef CONFIG_RCU_BOOST
+	struct rt_mutex *rcu_boost_mutex;
+#endif /* #ifdef CONFIG_RCU_BOOST */
+
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
+	struct sched_info sched_info;
+#endif
+
+	struct list_head tasks;
+#ifdef CONFIG_SMP
+	struct plist_node pushable_tasks;
+#endif
+
+	struct mm_struct *mm, *active_mm;
+#ifdef CONFIG_COMPAT_BRK
+	unsigned brk_randomized:1;
+#endif
+#if defined(SPLIT_RSS_COUNTING)
+	struct task_rss_stat	rss_stat;
+#endif
+/* task state */
+	int exit_state;
+	int exit_code, exit_signal;
+	int pdeath_signal;  /*  The signal sent when the parent dies  */
+	unsigned int group_stop;	/* GROUP_STOP_*, siglock protected */
+	/* ??? */
+	unsigned int personality;
+	unsigned did_exec:1;
+	unsigned in_execve:1;	/* Tell the LSMs that the process is doing an
+				 * execve */
+	unsigned in_iowait:1;
+
+
+	/* Revert to default priority/policy when forking */
+	unsigned sched_reset_on_fork:1;
+	unsigned sched_contributes_to_load:1;
+
+	pid_t pid;
+	pid_t tgid;
+
+#ifdef CONFIG_CC_STACKPROTECTOR
+	/* Canary value for the -fstack-protector gcc feature */
+	unsigned long stack_canary;
+#endif
+
+	/* 
+	 * pointers to (original) parent process, youngest child, younger sibling,
+	 * older sibling, respectively.  (p->father can be replaced with 
+	 * p->real_parent->pid)
+	 */
+	struct task_struct *real_parent; /* real parent process */
+	struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
+	/*
+	 * children/sibling forms the list of my natural children
+	 */
+	struct list_head children;	/* list of my children */
+	struct list_head sibling;	/* linkage in my parent's children list */
+	struct task_struct *group_leader;	/* threadgroup leader */
+
+	/*
+	 * ptraced is the list of tasks this task is using ptrace on.
+	 * This includes both natural children and PTRACE_ATTACH targets.
+	 * p->ptrace_entry is p's link on the p->parent->ptraced list.
+	 */
+	struct list_head ptraced;
+	struct list_head ptrace_entry;
+
+	/* PID/PID hash table linkage. */
+	struct pid_link pids[PIDTYPE_MAX];
+	struct list_head thread_group;
+
+	struct completion *vfork_done;		/* for vfork() */
+	int __user *set_child_tid;		/* CLONE_CHILD_SETTID */
+	int __user *clear_child_tid;		/* CLONE_CHILD_CLEARTID */
+
+	cputime_t utime, stime, utimescaled, stimescaled;
+	cputime_t gtime;
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+	cputime_t prev_utime, prev_stime;
+#endif
+	unsigned long nvcsw, nivcsw; /* context switch counts */
+	struct timespec start_time; 		/* monotonic time */
+	struct timespec real_start_time;	/* boot based time */
+/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
+	unsigned long min_flt, maj_flt;
+
+	struct task_cputime cputime_expires;
+	struct list_head cpu_timers[3];
+
+/* process credentials */
+	const struct cred __rcu *real_cred; /* objective and real subjective task
+					 * credentials (COW) */
+	const struct cred __rcu *cred;	/* effective (overridable) subjective task
+					 * credentials (COW) */
+	struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */
+
+	char comm[TASK_COMM_LEN]; /* executable name excluding path
+				     - access with [gs]et_task_comm (which lock
+				       it with task_lock())
+				     - initialized normally by setup_new_exec */
+/* file system info */
+	int link_count, total_link_count;
+#ifdef CONFIG_SYSVIPC
+/* ipc stuff */
+	struct sysv_sem sysvsem;
+#endif
+#ifdef CONFIG_DETECT_HUNG_TASK
+/* hung task detection */
+	unsigned long last_switch_count;
+#endif
+/* CPU-specific state of this task */
+	struct thread_struct thread;
+/* filesystem information */
+	struct fs_struct *fs;
+/* open file information */
+	struct files_struct *files;
+/* namespaces */
+	struct nsproxy *nsproxy;
+/* signal handlers */
+	struct signal_struct *signal;
+	struct sighand_struct *sighand;
+
+	sigset_t blocked, real_blocked;
+	sigset_t saved_sigmask;	/* restored if set_restore_sigmask() was used */
+	struct sigpending pending;
+
+	unsigned long sas_ss_sp;
+	size_t sas_ss_size;
+	int (*notifier)(void *priv);
+	void *notifier_data;
+	sigset_t *notifier_mask;
+	struct audit_context *audit_context;
+#ifdef CONFIG_AUDITSYSCALL
+	uid_t loginuid;
+	unsigned int sessionid;
+#endif
+	seccomp_t seccomp;
+
+/* Thread group tracking */
+   	u32 parent_exec_id;
+   	u32 self_exec_id;
+/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,
+ * mempolicy */
+	spinlock_t alloc_lock;
+
+#ifdef CONFIG_GENERIC_HARDIRQS
+	/* IRQ handler threads */
+	struct irqaction *irqaction;
+#endif
+
+	/* Protection of the PI data structures: */
+	raw_spinlock_t pi_lock;
+
+#ifdef CONFIG_RT_MUTEXES
+	/* PI waiters blocked on a rt_mutex held by this task */
+	struct plist_head pi_waiters;
+	/* Deadlock detection and priority inheritance handling */
+	struct rt_mutex_waiter *pi_blocked_on;
+#endif
+
+#ifdef CONFIG_DEBUG_MUTEXES
+	/* mutex deadlock detection */
+	struct mutex_waiter *blocked_on;
+#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+	unsigned int irq_events;
+	unsigned long hardirq_enable_ip;
+	unsigned long hardirq_disable_ip;
+	unsigned int hardirq_enable_event;
+	unsigned int hardirq_disable_event;
+	int hardirqs_enabled;
+	int hardirq_context;
+	unsigned long softirq_disable_ip;
+	unsigned long softirq_enable_ip;
+	unsigned int softirq_disable_event;
+	unsigned int softirq_enable_event;
+	int softirqs_enabled;
+	int softirq_context;
+#endif
+#ifdef CONFIG_LOCKDEP
+# define MAX_LOCK_DEPTH 48UL
+	u64 curr_chain_key;
+	int lockdep_depth;
+	unsigned int lockdep_recursion;
+	struct held_lock held_locks[MAX_LOCK_DEPTH];
+	gfp_t lockdep_reclaim_gfp;
+#endif
+
+/* journalling filesystem info */
+	void *journal_info;
+
+/* stacked block device info */
+	struct bio_list *bio_list;
+
+#ifdef CONFIG_BLOCK
+/* stack plugging */
+	struct blk_plug *plug;
+#endif
+
+/* VM state */
+	struct reclaim_state *reclaim_state;
+
+	struct backing_dev_info *backing_dev_info;
+
+	struct io_context *io_context;
+
+	unsigned long ptrace_message;
+	siginfo_t *last_siginfo; /* For ptrace use.  */
+	struct task_io_accounting ioac;
+#if defined(CONFIG_TASK_XACCT)
+	u64 acct_rss_mem1;	/* accumulated rss usage */
+	u64 acct_vm_mem1;	/* accumulated virtual memory usage */
+	cputime_t acct_timexpd;	/* stime + utime since last update */
+#endif
+#ifdef CONFIG_CPUSETS
+	nodemask_t mems_allowed;	/* Protected by alloc_lock */
+	int mems_allowed_change_disable;
+	int cpuset_mem_spread_rotor;
+	int cpuset_slab_spread_rotor;
+#endif
+#ifdef CONFIG_CGROUPS
+	/* Control Group info protected by css_set_lock */
+	struct css_set __rcu *cgroups;
+	/* cg_list protected by css_set_lock and tsk->alloc_lock */
+	struct list_head cg_list;
+#endif
+#ifdef CONFIG_FUTEX
+	struct robust_list_head __user *robust_list;
+#ifdef CONFIG_COMPAT
+	struct compat_robust_list_head __user *compat_robust_list;
+#endif
+	struct list_head pi_state_list;
+	struct futex_pi_state *pi_state_cache;
+#endif
+#ifdef CONFIG_PERF_EVENTS
+	struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts];
+	struct mutex perf_event_mutex;
+	struct list_head perf_event_list;
+#endif
+#ifdef CONFIG_NUMA
+	struct mempolicy *mempolicy;	/* Protected by alloc_lock */
+	short il_next;
+	short pref_node_fork;
+#endif
+	atomic_t fs_excl;	/* holding fs exclusive resources */
+	struct rcu_head rcu;
+
+	/*
+	 * cache last used pipe for splice
+	 */
+	struct pipe_inode_info *splice_pipe;
+#ifdef	CONFIG_TASK_DELAY_ACCT
+	struct task_delay_info *delays;
+#endif
+#ifdef CONFIG_FAULT_INJECTION
+	int make_it_fail;
+#endif
+	struct prop_local_single dirties;
+#ifdef CONFIG_LATENCYTOP
+	int latency_record_count;
+	struct latency_record latency_record[LT_SAVECOUNT];
+#endif
+	/*
+	 * time slack values; these are used to round up poll() and
+	 * select() etc timeout values. These are in nanoseconds.
+	 */
+	unsigned long timer_slack_ns;
+	unsigned long default_timer_slack_ns;
+
+	struct list_head	*scm_work_list;
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+	/* Index of current stored address in ret_stack */
+	int curr_ret_stack;
+	/* Stack of return addresses for return function tracing */
+	struct ftrace_ret_stack	*ret_stack;
+	/* time stamp for last schedule */
+	unsigned long long ftrace_timestamp;
+	/*
+	 * Number of functions that haven't been traced
+	 * because of depth overrun.
+	 */
+	atomic_t trace_overrun;
+	/* Pause for the tracing */
+	atomic_t tracing_graph_pause;
+#endif
+#ifdef CONFIG_TRACING
+	/* state flags for use by tracers */
+	unsigned long trace;
+	/* bitmask of trace recursion */
+	unsigned long trace_recursion;
+#endif /* CONFIG_TRACING */
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */
+	struct memcg_batch_info {
+		int do_batch;	/* incremented when batch uncharge started */
+		struct mem_cgroup *memcg; /* target memcg of uncharge */
+		unsigned long nr_pages;	/* uncharged usage */
+		unsigned long memsw_nr_pages; /* uncharged mem+swap usage */
+	} memcg_batch;
+#endif
+#ifdef CONFIG_HAVE_HW_BREAKPOINT
+	atomic_t ptrace_bp_refcnt;
+#endif
+};
+
+/*--  pid.c, PID type definitions:  -----------*/
+
+struct kref {
+	atomic_t refcount;
+};
+
+#define PAGE_SIZE 4096
+
+/*
+ * This controls the default maximum pid allocated to a process
+ */
+#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
+
+/*
+ * A maximum of 4 million PIDs should be enough for a while.
+ * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
+ */
+#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
+	(sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
+
+#define PIDMAP_ENTRIES         ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)
+
+struct pidmap {
+       atomic_t nr_free;
+       void *page;
+};
+
+#define INIT_STRUCT_PID {						\
+	.count 		= ATOMIC_INIT(1),				\
+	.tasks		= {						\
+		{ .first = NULL },					\
+		{ .first = NULL },					\
+		{ .first = NULL },					\
+	},								\
+	.level		= 0,						\
+	.numbers	= { {						\
+		.nr		= 0,					\
+		.ns		= &init_pid_ns,				\
+		.pid_chain	= { .next = NULL, .pprev = NULL },	\
+	}, }								\
+}
+
+struct pid_namespace {
+	struct kref kref;
+	struct pidmap pidmap[PIDMAP_ENTRIES];
+	int last_pid;
+	struct task_struct *child_reaper;
+	struct kmem_cache *pid_cachep;
+	unsigned int level;
+	struct pid_namespace *parent;
+#ifdef CONFIG_PROC_FS
+	struct vfsmount *proc_mnt;
+#endif
+#ifdef CONFIG_BSD_PROCESS_ACCT
+	struct bsd_acct_struct *bacct;
+#endif
+};
+
+struct upid {
+	/* Try to keep pid_chain in the same cacheline as nr for find_vpid */
+	int nr;
+	struct pid_namespace *ns;
+	struct hlist_node pid_chain;
+};
+
+struct pid
+{
+	atomic_t count;
+	unsigned int level;
+	/* lists of tasks that use this pid */
+	struct hlist_head tasks[PIDTYPE_MAX];
+	struct rcu_head rcu;
+	struct upid numbers[1];
+};
+
+#define ATOMIC_INIT(i)	{ (i) }
+
+extern struct pid_namespace init_pid_ns;
+
+extern struct task_struct init_task;
+
+/*-- module.h arch dependency: ---------------------------------------------------*/
+
+struct mod_arch_specific
+{
+};
+
+#ifdef CONFIG_64BIT
+#define Elf_Shdr Elf64_Shdr
+#define Elf_Sym Elf64_Sym
+#define Elf_Ehdr Elf64_Ehdr
+#else
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+#endif
+
+/*-- module.h ELF dependencies: ---------------------------------------------------*/
+
+
+/* 32-bit ELF base types. */
+typedef __u32	Elf32_Addr;
+typedef __u16	Elf32_Half;
+typedef __u32	Elf32_Off;
+typedef __s32	Elf32_Sword;
+typedef __u32	Elf32_Word;
+
+/* 64-bit ELF base types. */
+typedef __u64	Elf64_Addr;
+typedef __u16	Elf64_Half;
+typedef __s16	Elf64_SHalf;
+typedef __u64	Elf64_Off;
+typedef __s32	Elf64_Sword;
+typedef __u32	Elf64_Word;
+typedef __u64	Elf64_Xword;
+typedef __s64	Elf64_Sxword;
+
+typedef struct dynamic{
+  Elf32_Sword d_tag;
+  union{
+    Elf32_Sword	d_val;
+    Elf32_Addr	d_ptr;
+  } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+  Elf64_Sxword d_tag;		/* entry tag value */
+  union {
+    Elf64_Xword d_val;
+    Elf64_Addr d_ptr;
+  } d_un;
+} Elf64_Dyn;
+
+/* The following are used with relocations */
+#define ELF32_R_SYM(x) ((x) >> 8)
+#define ELF32_R_TYPE(x) ((x) & 0xff)
+
+#define ELF64_R_SYM(i)			((i) >> 32)
+#define ELF64_R_TYPE(i)			((i) & 0xffffffff)
+
+typedef struct elf32_rel {
+  Elf32_Addr	r_offset;
+  Elf32_Word	r_info;
+} Elf32_Rel;
+
+typedef struct elf64_rel {
+  Elf64_Addr r_offset;	/* Location at which to apply the action */
+  Elf64_Xword r_info;	/* index and type of relocation */
+} Elf64_Rel;
+
+typedef struct elf32_rela{
+  Elf32_Addr	r_offset;
+  Elf32_Word	r_info;
+  Elf32_Sword	r_addend;
+} Elf32_Rela;
+
+typedef struct elf64_rela {
+  Elf64_Addr r_offset;	/* Location at which to apply the action */
+  Elf64_Xword r_info;	/* index and type of relocation */
+  Elf64_Sxword r_addend;	/* Constant addend used to compute value */
+} Elf64_Rela;
+
+typedef struct elf32_sym{
+  Elf32_Word	st_name;
+  Elf32_Addr	st_value;
+  Elf32_Word	st_size;
+  unsigned char	st_info;
+  unsigned char	st_other;
+  Elf32_Half	st_shndx;
+} Elf32_Sym;
+
+typedef struct elf64_sym {
+  Elf64_Word st_name;		/* Symbol name, index in string tbl */
+  unsigned char	st_info;	/* Type and binding attributes */
+  unsigned char	st_other;	/* No defined meaning, 0 */
+  Elf64_Half st_shndx;		/* Associated section index */
+  Elf64_Addr st_value;		/* Value of the symbol */
+  Elf64_Xword st_size;		/* Associated symbol size */
+} Elf64_Sym;
+
+
+/*-- module.h sysfs dependencies: ---------------------------------------------------*/
+
+struct attribute {
+	const char		*name;
+	mode_t			mode;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lock_class_key	*key;
+	struct lock_class_key	skey;
+#endif
+};
+
+struct kobject {
+	const char		*name;
+	struct list_head	entry;
+	struct kobject		*parent;
+	struct kset		*kset;
+	struct kobj_type	*ktype;
+	struct sysfs_dirent	*sd;
+	struct kref		kref;
+	unsigned int state_initialized:1;
+	unsigned int state_in_sysfs:1;
+	unsigned int state_add_uevent_sent:1;
+	unsigned int state_remove_uevent_sent:1;
+	unsigned int uevent_suppress:1;
+};
+
+/*-- module.h's init.h dependency: -------------------------------*/
+
+typedef void (*ctor_fn_t)(void);
+
+/*-- module.h: ---------------------------------------------------*/
+
+/* You can override this manually, but generally this should match the
+   module name. */
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX /* empty */
+#else
+#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
+#endif
+
+/* Chosen so that structs with an unsigned long line up. */
+#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
+
+#define ___module_cat(a,b) __mod_ ## a ## b
+#define __module_cat(a,b) ___module_cat(a,b)
+#ifdef MODULE
+#define __MODULE_INFO(tag, name, info)					  \
+static const char __module_cat(name,__LINE__)[]				  \
+  __used __attribute__((section(".modinfo"), unused, aligned(1)))	  \
+  = __stringify(tag) "=" info
+#else  /* !MODULE */
+/* This struct is here for syntactic coherency, it is not used */
+#define __MODULE_INFO(tag, name, info)					  \
+  struct __module_cat(name,__LINE__) {}
+#endif
+#define __MODULE_PARM_TYPE(name, _type)					  \
+  __MODULE_INFO(parmtype, name##type, #name ":" _type)
+
+struct kernel_param;
+
+struct kernel_param_ops {
+	/* Returns 0, or -errno.  arg is in kp->arg. */
+	int (*set)(const char *val, const struct kernel_param *kp);
+	/* Returns length written or -errno.  Buffer is 4k (ie. be short!) */
+	int (*get)(char *buffer, const struct kernel_param *kp);
+	/* Optional function to free kp->arg when module unloaded. */
+	void (*free)(void *arg);
+};
+
+/* Flag bits for kernel_param.flags */
+#define KPARAM_ISBOOL		2
+
+struct kernel_param {
+	const char *name;
+	const struct kernel_param_ops *ops;
+	u16 perm;
+	u16 flags;
+	union {
+		void *arg;
+		const struct kparam_string *str;
+		const struct kparam_array *arr;
+	};
+};
+
+/* Special one for strings we want to copy into */
+struct kparam_string {
+	unsigned int maxlen;
+	char *string;
+};
+
+/* Special one for arrays */
+struct kparam_array
+{
+	unsigned int max;
+	unsigned int elemsize;
+	unsigned int *num;
+	const struct kernel_param_ops *ops;
+	void *elem;
+};
+
+/* Some toolchains use a `_' prefix for all user symbols. */
+#ifdef CONFIG_SYMBOL_PREFIX
+#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
+#else
+#define MODULE_SYMBOL_PREFIX ""
+#endif
+
+#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
+
+struct kernel_symbol
+{
+	unsigned long value;
+	const char *name;
+};
+
+struct modversion_info
+{
+	unsigned long crc;
+	char name[MODULE_NAME_LEN];
+};
+
+struct module;
+
+struct module_attribute {
+        struct attribute attr;
+        ssize_t (*show)(struct module_attribute *, struct module *, char *);
+        ssize_t (*store)(struct module_attribute *, struct module *,
+			 const char *, size_t count);
+	void (*setup)(struct module *, const char *);
+	int (*test)(struct module *);
+	void (*free)(struct module *);
+};
+
+struct module_version_attribute {
+	struct module_attribute mattr;
+	const char *module_name;
+	const char *version;
+} __attribute__ ((__aligned__(sizeof(void *))));
+
+extern ssize_t __modver_version_show(struct module_attribute *,
+				     struct module *, char *);
+
+struct module_kobject
+{
+	struct kobject kobj;
+	struct module *mod;
+	struct kobject *drivers_dir;
+	struct module_param_attrs *mp;
+};
+
+/* These are either module local, or the kernel's dummy ones. */
+extern int init_module(void);
+extern void cleanup_module(void);
+
+/* Archs provide a method of finding the correct exception table. */
+struct exception_table_entry;
+
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value);
+void sort_extable(struct exception_table_entry *start,
+		  struct exception_table_entry *finish);
+void sort_main_extable(void);
+void trim_init_extable(struct module *m);
+
+#ifdef MODULE
+#define MODULE_GENERIC_TABLE(gtype,name)			\
+extern const struct gtype##_id __mod_##gtype##_table		\
+  __attribute__ ((unused, alias(__stringify(name))))
+
+extern struct module __this_module;
+#define THIS_MODULE (&__this_module)
+#else  /* !MODULE */
+#define MODULE_GENERIC_TABLE(gtype,name)
+#define THIS_MODULE ((struct module *)0)
+#endif
+
+/* Generic info of form tag = "info" */
+#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+
+/* For userspace: you can also call me... */
+#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
+
+/*
+ * The following license idents are currently accepted as indicating free
+ * software modules
+ *
+ *	"GPL"				[GNU Public License v2 or later]
+ *	"GPL v2"			[GNU Public License v2]
+ *	"GPL and additional rights"	[GNU Public License v2 rights and more]
+ *	"Dual BSD/GPL"			[GNU Public License v2
+ *					 or BSD license choice]
+ *	"Dual MIT/GPL"			[GNU Public License v2
+ *					 or MIT license choice]
+ *	"Dual MPL/GPL"			[GNU Public License v2
+ *					 or Mozilla license choice]
+ *
+ * The following other idents are available
+ *
+ *	"Proprietary"			[Non free products]
+ *
+ * There are dual licensed components, but when running with Linux it is the
+ * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
+ * is a GPL combined work.
+ *
+ * This exists for several reasons
+ * 1.	So modinfo can show license info for users wanting to vet their setup 
+ *	is free
+ * 2.	So the community can ignore bug reports including proprietary modules
+ * 3.	So vendors can do likewise based on their own policies
+ */
+#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
+
+/*
+ * Author(s), use "Name <email>" or just "Name", for multiple
+ * authors use multiple MODULE_AUTHOR() statements/lines.
+ */
+#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
+  
+/* What your module does. */
+#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
+
+/* One for each parameter, describing how to use it.  Some files do
+   multiple of these per line, so can't just use MODULE_INFO. */
+#define MODULE_PARM_DESC(_parm, desc) \
+	__MODULE_INFO(parm, _parm, #_parm ":" desc)
+
+#define MODULE_DEVICE_TABLE(type,name)		\
+  MODULE_GENERIC_TABLE(type##_device,name)
+
+/* Version of form [<epoch>:]<version>[-<extra-version>].
+   Or for CVS/RCS ID version, everything but the number is stripped.
+  <epoch>: A (small) unsigned integer which allows you to start versions
+           anew. If not mentioned, it's zero.  eg. "2:1.0" is after
+	   "1:2.0".
+  <version>: The <version> may contain only alphanumerics and the
+           character `.'.  Ordered by numeric sort for numeric parts,
+	   ascii sort for ascii parts (as per RPM or DEB algorithm).
+  <extraversion>: Like <version>, but inserted for local
+           customizations, eg "rh3" or "rusty1".
+
+  Using this automatically adds a checksum of the .c files and the
+  local headers in "srcversion".
+*/
+
+#if defined(MODULE) || !defined(CONFIG_SYSFS)
+#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
+#else
+#define MODULE_VERSION(_version)					\
+	static struct module_version_attribute ___modver_attr = {	\
+		.mattr	= {						\
+			.attr	= {					\
+				.name	= "version",			\
+				.mode	= S_IRUGO,			\
+			},						\
+			.show	= __modver_version_show,		\
+		},							\
+		.module_name	= KBUILD_MODNAME,			\
+		.version	= _version,				\
+	};								\
+	static const struct module_version_attribute			\
+	__used __attribute__ ((__section__ ("__modver")))		\
+	* __moduleparam_const __modver_attr = &___modver_attr
+#endif
+
+/* Optional firmware file (or files) needed by the module
+ * format is simply firmware file name.  Multiple firmware
+ * files require multiple MODULE_FIRMWARE() specifiers */
+#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
+
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
+struct notifier_block;
+
+extern int modules_disabled; /* for sysctl */
+/* Get/put a kernel symbol (calls must be symmetric) */
+void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);
+#define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x)))
+
+/* modules using other modules: kdb wants to see this. */
+struct module_use {
+	struct list_head source_list;
+	struct list_head target_list;
+	struct module *source, *target;
+};
+
+#ifndef __GENKSYMS__
+#ifdef CONFIG_MODVERSIONS
+/* Mark the CRC weak since genksyms apparently decides not to
+ * generate a checksums for some symbols */
+#define __CRC_SYMBOL(sym, sec)					\
+	extern void *__crc_##sym __attribute__((weak));		\
+	static const unsigned long __kcrctab_##sym		\
+	__used							\
+	__attribute__((section("___kcrctab" sec "+" #sym), unused))	\
+	= (unsigned long) &__crc_##sym;
+#else
+#define __CRC_SYMBOL(sym, sec)
+#endif
+
+/* For every exported symbol, place a struct in the __ksymtab section */
+#define __EXPORT_SYMBOL(sym, sec)				\
+	extern typeof(sym) sym;					\
+	__CRC_SYMBOL(sym, sec)					\
+	static const char __kstrtab_##sym[]			\
+	__attribute__((section("__ksymtab_strings"), aligned(1))) \
+	= MODULE_SYMBOL_PREFIX #sym;                    	\
+	static const struct kernel_symbol __ksymtab_##sym	\
+	__used							\
+	__attribute__((section("___ksymtab" sec "+" #sym), unused))	\
+	= { (unsigned long)&sym, __kstrtab_##sym }
+
+#define EXPORT_SYMBOL(sym)					\
+	__EXPORT_SYMBOL(sym, "")
+
+#define EXPORT_SYMBOL_GPL(sym)					\
+	__EXPORT_SYMBOL(sym, "_gpl")
+
+#define EXPORT_SYMBOL_GPL_FUTURE(sym)				\
+	__EXPORT_SYMBOL(sym, "_gpl_future")
+
+
+#ifdef CONFIG_UNUSED_SYMBOLS
+#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
+#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
+#else
+#define EXPORT_UNUSED_SYMBOL(sym)
+#define EXPORT_UNUSED_SYMBOL_GPL(sym)
+#endif
+
+#endif
+
+enum module_state
+{
+	MODULE_STATE_LIVE,
+	MODULE_STATE_COMING,
+	MODULE_STATE_GOING,
+};
+
+struct module
+{
+	enum module_state state;
+
+	/* Member of list of modules */
+	struct list_head list;
+
+	/* Unique handle for this module */
+	char name[MODULE_NAME_LEN];
+
+	/* Sysfs stuff. */
+	struct module_kobject mkobj;
+	struct module_attribute *modinfo_attrs;
+	const char *version;
+	const char *srcversion;
+	struct kobject *holders_dir;
+
+	/* Exported symbols */
+	const struct kernel_symbol *syms;
+	const unsigned long *crcs;
+	unsigned int num_syms;
+
+	/* Kernel parameters. */
+	struct kernel_param *kp;
+	unsigned int num_kp;
+
+	/* GPL-only exported symbols. */
+	unsigned int num_gpl_syms;
+	const struct kernel_symbol *gpl_syms;
+	const unsigned long *gpl_crcs;
+
+#ifdef CONFIG_UNUSED_SYMBOLS
+	/* unused exported symbols. */
+	const struct kernel_symbol *unused_syms;
+	const unsigned long *unused_crcs;
+	unsigned int num_unused_syms;
+
+	/* GPL-only, unused exported symbols. */
+	unsigned int num_unused_gpl_syms;
+	const struct kernel_symbol *unused_gpl_syms;
+	const unsigned long *unused_gpl_crcs;
+#endif
+
+	/* symbols that will be GPL-only in the near future. */
+	const struct kernel_symbol *gpl_future_syms;
+	const unsigned long *gpl_future_crcs;
+	unsigned int num_gpl_future_syms;
+
+	/* Exception table */
+	unsigned int num_exentries;
+	struct exception_table_entry *extable;
+
+	/* Startup function. */
+	int (*init)(void);
+
+	/* If this is non-NULL, vfree after init() returns */
+	void *module_init;
+
+	/* Here is the actual code + data, vfree'd on unload. */
+	void *module_core;
+
+	/* Here are the sizes of the init and core sections */
+	unsigned int init_size, core_size;
+
+	/* The size of the executable code in each section.  */
+	unsigned int init_text_size, core_text_size;
+
+	/* Size of RO sections of the module (text+rodata) */
+	unsigned int init_ro_size, core_ro_size;
+
+	/* Arch-specific module values */
+	struct mod_arch_specific arch;
+
+	unsigned int taints;	/* same bits as kernel:tainted */
+
+#ifdef CONFIG_GENERIC_BUG
+	/* Support for BUG */
+	unsigned num_bugs;
+	struct list_head bug_list;
+	struct bug_entry *bug_table;
+#endif
+
+#ifdef CONFIG_KALLSYMS
+	/*
+	 * We keep the symbol and string tables for kallsyms.
+	 * The core_* fields below are temporary, loader-only (they
+	 * could really be discarded after module init).
+	 */
+	Elf_Sym *symtab, *core_symtab;
+	unsigned int num_symtab, core_num_syms;
+	char *strtab, *core_strtab;
+
+	/* Section attributes */
+	struct module_sect_attrs *sect_attrs;
+
+	/* Notes attributes */
+	struct module_notes_attrs *notes_attrs;
+#endif
+
+	/* The command line arguments (may be mangled).  People like
+	   keeping pointers to this stuff */
+	char *args;
+
+#ifdef CONFIG_SMP
+	/* Per-cpu data. */
+	void __percpu *percpu;
+	unsigned int percpu_size;
+#endif
+
+#ifdef CONFIG_TRACEPOINTS
+	unsigned int num_tracepoints;
+	struct tracepoint * const *tracepoints_ptrs;
+#endif
+#ifdef HAVE_JUMP_LABEL
+	struct jump_entry *jump_entries;
+	unsigned int num_jump_entries;
+#endif
+#ifdef CONFIG_TRACING
+	unsigned int num_trace_bprintk_fmt;
+	const char **trace_bprintk_fmt_start;
+#endif
+#ifdef CONFIG_EVENT_TRACING
+	struct ftrace_event_call **trace_events;
+	unsigned int num_trace_events;
+#endif
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+	unsigned int num_ftrace_callsites;
+	unsigned long *ftrace_callsites;
+#endif
+
+#ifdef CONFIG_MODULE_UNLOAD
+	/* What modules depend on me? */
+	struct list_head source_list;
+	/* What modules do I depend on? */
+	struct list_head target_list;
+
+	/* Who is waiting for us to be unloaded */
+	struct task_struct *waiter;
+
+	/* Destruction function. */
+	void (*exit)(void);
+
+	struct module_ref {
+		unsigned int incs;
+		unsigned int decs;
+	} __percpu *refptr;
+#endif
+
+#ifdef CONFIG_CONSTRUCTORS
+	/* Constructor functions. */
+	ctor_fn_t *ctors;
+	unsigned int num_ctors;
+#endif
+};
+
+/*-- pid.c API usage: ---------------------------------------------------*/
+/*-- preempt.h thread_info dependencies: --------------------------------*/
+/*-- preempt.h thread_info processor.h dependencies: --------------------*/
+
+typedef struct {
+	unsigned long		seg;
+} mm_segment_t;
+
+/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
+
+struct timespec;
+struct compat_timespec;
+
+/*
+ * System call restart block.
+ */
+struct restart_block {
+	long (*fn)(struct restart_block *);
+	union {
+		/* For futex_wait and futex_wait_requeue_pi */
+		struct {
+			u32 __user *uaddr;
+			u32 val;
+			u32 flags;
+			u32 bitset;
+			u64 time;
+			u32 __user *uaddr2;
+		} futex;
+		/* For nanosleep */
+		struct {
+			clockid_t index;
+			struct timespec __user *rmtp;
+#ifdef CONFIG_COMPAT
+			struct compat_timespec __user *compat_rmtp;
+#endif
+			u64 expires;
+		} nanosleep;
+		/* For poll */
+		struct {
+			struct pollfd __user *ufds;
+			int nfds;
+			int has_timeout;
+			unsigned long tv_sec;
+			unsigned long tv_nsec;
+		} poll;
+	};
+};
+
+/*-- preempt.h asm/thread_info.h page_types.h dependencies: --------------------*/
+
+#define THREAD_ORDER    1
+#define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
+
+/*-- preempt.h asm/thread_info.h dependencies: --------------------*/
+
+struct task_struct;
+struct exec_domain;
+
+struct thread_info {
+	struct task_struct	*task;		/* main task structure */
+	struct exec_domain	*exec_domain;	/* execution domain */
+	__u32			flags;		/* low level flags */
+	__u32			status;		/* thread synchronous flags */
+	__u32			cpu;		/* current CPU */
+	int			preempt_count;	/* 0 => preemptable,
+						   <0 => BUG */
+	mm_segment_t		addr_limit;
+	struct restart_block    restart_block;
+	void __user		*sysenter_return;
+#ifdef CONFIG_X86_32
+	unsigned long           previous_esp;   /* ESP of the previous stack in
+						   case of nested (IRQ) stacks
+						*/
+	__u8			supervisor_stack[0];
+#endif
+	int			uaccess_err;
+};
+
+/* how to get the current stack pointer from C */
+register unsigned long current_stack_pointer asm("esp") __used;
+
+/* how to get the thread information struct from C */
+static inline struct thread_info *current_thread_info(void)
+{
+	return (struct thread_info *)
+		(current_stack_pointer & ~(THREAD_SIZE - 1));
+}
+
+#define TIF_NEED_RESCHED        3       /* rescheduling necessary */
+
+/*-- preempt.h linux/thread_info.h bitops.h dependencies (simplfied): --------------------*/
+
+static inline void set_bit(int nr, unsigned long *addr)
+{
+	addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG);
+}
+
+static inline void clear_bit(int nr, unsigned long *addr)
+{
+	addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG));
+}
+
+static __always_inline int test_bit(unsigned int nr, const unsigned long *addr)
+{
+	return ((1UL << (nr % BITS_PER_LONG)) &
+		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+}
+
+/*-- preempt.h linux/thread_info.h dependencies: --------------------*/
+
+static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	set_bit(flag, (unsigned long *)&ti->flags);
+}
+
+static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	clear_bit(flag, (unsigned long *)&ti->flags);
+}
+
+static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
+{
+	return test_bit(flag, (unsigned long *)&ti->flags);
+}
+
+#define set_thread_flag(flag) \
+	set_ti_thread_flag(current_thread_info(), flag)
+#define clear_thread_flag(flag) \
+	clear_ti_thread_flag(current_thread_info(), flag)
+#define test_and_set_thread_flag(flag) \
+	test_and_set_ti_thread_flag(current_thread_info(), flag)
+#define test_and_clear_thread_flag(flag) \
+	test_and_clear_ti_thread_flag(current_thread_info(), flag)
+#define test_thread_flag(flag) \
+	test_ti_thread_flag(current_thread_info(), flag)
+
+/*-- rcu API preempt.h dependencies: ---------------------------------------------------*/
+
+void preempt_schedule(void);
+
+#define preempt_disable() \
+do { \
+	inc_preempt_count(); \
+	barrier(); \
+} while (0)
+
+#define preempt_enable_no_resched() \
+do { \
+	barrier(); \
+	dec_preempt_count(); \
+} while (0)
+
+#define preempt_check_resched() \
+do { \
+	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
+		preempt_schedule(); \
+} while (0)
+
+#define preempt_enable() \
+do { \
+	preempt_enable_no_resched(); \
+	barrier(); \
+	preempt_check_resched(); \
+} while (0)
+
+# define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
+# define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
+
+#define inc_preempt_count() add_preempt_count(1)
+#define dec_preempt_count() sub_preempt_count(1)
+
+#define preempt_count()	(current_thread_info()->preempt_count)
+
+static inline void __rcu_read_lock(void)
+{
+	preempt_disable();
+}
+
+static inline void __rcu_read_unlock(void)
+{
+	preempt_enable();
+}
+
+static inline void rcu_read_lock(void)
+{
+	__rcu_read_lock();
+	__acquire(RCU);
+}
+
+static inline void rcu_read_unlock(void)
+{
+	__release(RCU);
+	__rcu_read_unlock();
+}
+
+/*-- pid.c sched.h API usage: ---------------------------------------------------*/
+
+static inline struct pid *task_pid(struct task_struct *task)
+{
+	return task->pids[PIDTYPE_PID].pid;
+}
+
+/*-- pid.c cache.h API usage: ---------------------------------------------------*/
+
+#define SMP_CACHE_BYTES 32
+
+#ifndef __cacheline_aligned
+#define __cacheline_aligned					\
+  __attribute__((__aligned__(SMP_CACHE_BYTES),			\
+		 __section__(".data..cacheline_aligned")))
+#endif /* __cacheline_aligned */
+
+#ifndef __cacheline_aligned_in_smp
+#ifdef CONFIG_SMP
+#define __cacheline_aligned_in_smp __cacheline_aligned
+#else
+#define __cacheline_aligned_in_smp
+#endif /* CONFIG_SMP */
+#endif
+
+/*-- pid.c spinlock.h API usage: ---------------------------------------------------*/
+
+#define __ARCH_SPIN_LOCK_UNLOCKED	{ 0 }
+
+#define __SPIN_LOCK_INITIALIZER(lockname) \
+	{ { .rlock = __RAW_SPIN_LOCK_INITIALIZER(lockname) } }
+
+#define __SPIN_LOCK_UNLOCKED(lockname) \
+	(spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
+
+#define DEFINE_SPINLOCK(x)	spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
+
+/*-- pid.c atomic.h API usage: ---------------------------------------------------*/
+
+#define LOCK_PREFIX "lock;"
+
+#define ATOMIC_INIT(i)	{ (i) }
+
+/**
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v.
+ */
+static inline int atomic_read(const atomic_t *v)
+{
+	return (*(volatile int *)&(v)->counter);
+}
+
+/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i.
+ */
+static inline void atomic_set(atomic_t *v, int i)
+{
+	v->counter = i;
+}
+
+/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v.
+ */
+static inline void atomic_add(int i, atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "addl %1,%0"
+		     : "+m" (v->counter)
+		     : "ir" (i));
+}
+
+/**
+ * atomic_sub - subtract integer from atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v.
+ */
+static inline void atomic_sub(int i, atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "subl %1,%0"
+		     : "+m" (v->counter)
+		     : "ir" (i));
+}
+
+/**
+ * atomic_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases.
+ */
+static inline int atomic_sub_and_test(int i, atomic_t *v)
+{
+	unsigned char c;
+
+	asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
+		     : "+m" (v->counter), "=qm" (c)
+		     : "ir" (i) : "memory");
+	return c;
+}
+
+/**
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1.
+ */
+static inline void atomic_inc(atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "incl %0"
+		     : "+m" (v->counter));
+}
+
+/**
+ * atomic_dec - decrement atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1.
+ */
+static inline void atomic_dec(atomic_t *v)
+{
+	asm volatile(LOCK_PREFIX "decl %0"
+		     : "+m" (v->counter));
+}
+
+/**
+ * atomic_dec_and_test - decrement and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases.
+ */
+static inline int atomic_dec_and_test(atomic_t *v)
+{
+	unsigned char c;
+
+	asm volatile(LOCK_PREFIX "decl %0; sete %1"
+		     : "+m" (v->counter), "=qm" (c)
+		     : : "memory");
+	return c != 0;
+}
+
+/*-- pid.c hash.h API usage: ---------------------------------------------------*/
+
+/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */
+#define GOLDEN_RATIO_PRIME_32 0x9e370001UL
+/*  2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */
+#define GOLDEN_RATIO_PRIME_64 0x9e37fffffffc0001UL
+
+#if BITS_PER_LONG == 32
+#define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_32
+#define hash_long(val, bits) hash_32(val, bits)
+#elif BITS_PER_LONG == 64
+#define hash_long(val, bits) hash_64(val, bits)
+#define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_64
+#else
+#error Wordsize not 32 or 64
+#endif
+
+static inline u64 hash_64(u64 val, unsigned int bits)
+{
+	u64 hash = val;
+
+	/*  Sigh, gcc can't optimise this alone like it does for 32 bits. */
+	u64 n = hash;
+	n <<= 18;
+	hash -= n;
+	n <<= 33;
+	hash -= n;
+	n <<= 3;
+	hash += n;
+	n <<= 3;
+	hash -= n;
+	n <<= 4;
+	hash += n;
+	n <<= 2;
+	hash += n;
+
+	/* High bits are more random, so use them. */
+	return hash >> (64 - bits);
+}
+
+static inline u32 hash_32(u32 val, unsigned int bits)
+{
+	/* On some cpus multiply is faster, on others gcc will do shifts */
+	u32 hash = val * GOLDEN_RATIO_PRIME_32;
+
+	/* High bits are more random, so use them. */
+	return hash >> (32 - bits);
+}
+
+static inline unsigned long hash_ptr(void *ptr, unsigned int bits)
+{
+	return hash_long((unsigned long)ptr, bits);
+}
+
+/*-- pid.c API (some of them nasty hacks/shortcuts): ----------------------------------------------*/
+
+
+#define container_of(ptr, type, member) ({			\
+	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+	(type *)( (char *)__mptr - offsetof(type,member) );})
+
+extern void call_rcu(struct rcu_head *head,
+                              void (*func)(struct rcu_head *head));
+#define cmpxchg(ptr, old, new) ({ new; })
+
+extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
+		size, unsigned long offset);
+
+extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
+		long size, unsigned long offset);
+
+extern unsigned long find_first_bit(const unsigned long *addr,
+				    unsigned long size);
+
+extern unsigned long find_first_zero_bit(const unsigned long *addr,
+					 unsigned long size);
+
+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
+#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
+
+static inline struct pid *get_pid(struct pid *pid)
+{
+	if (pid)
+		atomic_inc(&pid->count);
+	return pid;
+}
+
+extern void kref_get(struct kref *kref);
+
+static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
+{
+	if (ns != &init_pid_ns)
+		kref_get(&ns->kref);
+	return ns;
+}
+
+#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
+
+extern void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h);
+extern void hlist_del_rcu(struct hlist_node *n);
+extern void *kzalloc(size_t size, gfp_t flags);
+extern void *kfree(void *ptr);
+
+#define GFP_KERNEL 1
+
+void kmem_cache_free(struct kmem_cache *, void *);
+void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
+
+#define lockdep_tasklist_lock_is_held() do { } while (0)
+
+static inline void put_pid_ns(struct pid_namespace *ns) { }
+
+#define rcu_dereference_raw(x) x
+#define rcu_dereference_check(x, y) x
+#define hlist_first_rcu(head)	(*((struct hlist_node __rcu **)(&(head)->first)))
+
+
+#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
+
+static inline void INIT_HLIST_NODE(struct hlist_node *h)
+{
+	h->next = NULL;
+	h->pprev = NULL;
+}
+
+static inline int hlist_unhashed(const struct hlist_node *h)
+{
+	return !h->pprev;
+}
+
+static inline int hlist_empty(const struct hlist_head *h)
+{
+	return !h->first;
+}
+
+static inline void __hlist_del(struct hlist_node *n)
+{
+	struct hlist_node *next = n->next;
+	struct hlist_node **pprev = n->pprev;
+	*pprev = next;
+	if (next)
+		next->pprev = pprev;
+}
+
+static inline void hlist_del(struct hlist_node *n)
+{
+	__hlist_del(n);
+}
+
+static inline void hlist_del_init(struct hlist_node *n)
+{
+	if (!hlist_unhashed(n)) {
+		__hlist_del(n);
+		INIT_HLIST_NODE(n);
+	}
+}
+
+#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
+#define hlist_next_rcu(node)	(*((struct hlist_node __rcu **)(&(node)->next)))
+
+#define hlist_for_each_entry_rcu(tpos, pos, head, member)		\
+	for (pos = rcu_dereference_raw(hlist_first_rcu(head));		\
+		pos &&							 \
+		({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \
+		pos = rcu_dereference_raw(hlist_next_rcu(pos)))
+
+extern struct task_struct *current;
+
+static __always_inline int test_and_set_bit(unsigned int nr, const unsigned long *addr)
+{
+	return ((1UL << (nr % BITS_PER_LONG)) &
+		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+}
+
+
+extern void spin_lock_irq(spinlock_t *lock);
+extern void spin_lock_irqsave(spinlock_t *lock, unsigned long flags);
+extern void spin_unlock_irq(spinlock_t *lock);
+extern void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags);
+
+struct mnt_namespace;
+struct uts_namespace;
+struct ipc_namespace;
+struct pid_namespace;
+struct fs_struct;
+
+/*
+ * A structure to contain pointers to all per-process
+ * namespaces - fs (mount), uts, network, sysvipc, etc.
+ *
+ * 'count' is the number of tasks holding a reference.
+ * The count for each namespace, then, will be the number
+ * of nsproxies pointing to it, not the number of tasks.
+ *
+ * The nsproxy is shared by tasks which share all namespaces.
+ * As soon as a single namespace is cloned or unshared, the
+ * nsproxy is copied.
+ */
+struct nsproxy {
+	atomic_t count;
+	struct uts_namespace *uts_ns;
+	struct ipc_namespace *ipc_ns;
+	struct mnt_namespace *mnt_ns;
+	struct pid_namespace *pid_ns;
+	struct net 	     *net_ns;
+};
+
+static inline struct pid_namespace *ns_of_pid(struct pid *pid)
+{
+	struct pid_namespace *ns = NULL;
+	if (pid)
+		ns = pid->numbers[pid->level].ns;
+	return ns;
+}
+
+#define rcu_lockdep_assert(x)
+#define rcu_read_lock_held() 0
+
+#define pid_alive(x) 1
+
+extern void hlist_replace_rcu(struct hlist_node *old, struct hlist_node *new);
+
+static inline struct pid *task_tgid(struct task_struct *task)
+{
+	return task->group_leader->pids[PIDTYPE_PID].pid;
+}
+
+#define __init
+
+extern void *alloc_large_system_hash(const char *tablename,
+				     unsigned long bucketsize,
+				     unsigned long numentries,
+				     int scale,
+				     int flags,
+				     unsigned int *_hash_shift,
+				     unsigned int *_hash_mask,
+				     unsigned long limit);
+
+#define HASH_EARLY	0x00000001	/* Allocating during early boot? */
+#define HASH_SMALL	0x00000002	/* sub-page allocation allowed, min */
+
+
+/*
+ * min()/max()/clamp() macros that also do
+ * strict type-checking.. See the
+ * "unnecessary" pointer comparison.
+ */
+#define min(x, y) ({				\
+	typeof(x) _min1 = (x);			\
+	typeof(y) _min2 = (y);			\
+	(void) (&_min1 == &_min2);		\
+	_min1 < _min2 ? _min1 : _min2; })
+
+#define max(x, y) ({				\
+	typeof(x) _max1 = (x);			\
+	typeof(y) _max2 = (y);			\
+	(void) (&_max1 == &_max2);		\
+	_max1 > _max2 ? _max1 : _max2; })
+
+#define min3(x, y, z) ({			\
+	typeof(x) _min1 = (x);			\
+	typeof(y) _min2 = (y);			\
+	typeof(z) _min3 = (z);			\
+	(void) (&_min1 == &_min2);		\
+	(void) (&_min1 == &_min3);		\
+	_min1 < _min2 ? (_min1 < _min3 ? _min1 : _min3) : \
+		(_min2 < _min3 ? _min2 : _min3); })
+
+#define max3(x, y, z) ({			\
+	typeof(x) _max1 = (x);			\
+	typeof(y) _max2 = (y);			\
+	typeof(z) _max3 = (z);			\
+	(void) (&_max1 == &_max2);		\
+	(void) (&_max1 == &_max3);		\
+	_max1 > _max2 ? (_max1 > _max3 ? _max1 : _max3) : \
+		(_max2 > _max3 ? _max2 : _max3); })
+
+/**
+ * min_not_zero - return the minimum that is _not_ zero, unless both are zero
+ * @x: value1
+ * @y: value2
+ */
+#define min_not_zero(x, y) ({			\
+	typeof(x) __x = (x);			\
+	typeof(y) __y = (y);			\
+	__x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
+
+/**
+ * clamp - return a value clamped to a given range with strict typechecking
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does strict typechecking of min/max to make sure they are of the
+ * same type as val.  See the unnecessary pointer comparisons.
+ */
+#define clamp(val, min, max) ({			\
+	typeof(val) __val = (val);		\
+	typeof(min) __min = (min);		\
+	typeof(max) __max = (max);		\
+	(void) (&__val == &__min);		\
+	(void) (&__val == &__max);		\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+/*
+ * ..and if you can't take the strict
+ * types, you can specify one yourself.
+ *
+ * Or not use min/max/clamp at all, of course.
+ */
+#define min_t(type, x, y) ({			\
+	type __min1 = (x);			\
+	type __min2 = (y);			\
+	__min1 < __min2 ? __min1: __min2; })
+
+#define max_t(type, x, y) ({			\
+	type __max1 = (x);			\
+	type __max2 = (y);			\
+	__max1 > __max2 ? __max1: __max2; })
+
+/**
+ * clamp_t - return a value clamped to a given range using a given type
+ * @type: the type of variable to use
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does no typechecking and uses temporary variables of type
+ * 'type' to make all the comparisons.
+ */
+#define clamp_t(type, val, min, max) ({		\
+	type __val = (val);			\
+	type __min = (min);			\
+	type __max = (max);			\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+/**
+ * clamp_val - return a value clamped to a given range using val's type
+ * @val: current value
+ * @min: minimum allowable value
+ * @max: maximum allowable value
+ *
+ * This macro does no typechecking and uses temporary variables of whatever
+ * type the input argument 'val' is.  This is useful when val is an unsigned
+ * type and min and max are literals that will otherwise be assigned a signed
+ * integer type.
+ */
+#define clamp_val(val, min, max) ({		\
+	typeof(val) __val = (val);		\
+	typeof(val) __min = (min);		\
+	typeof(val) __max = (max);		\
+	__val = __val < __min ? __min: __val;	\
+	__val > __max ? __max: __val; })
+
+#define PIDS_PER_CPU_DEFAULT	1024
+#define PIDS_PER_CPU_MIN	8
+
+extern const struct cpumask *const cpu_possible_mask;
+
+#define num_possible_cpus()	cpumask_weight(cpu_possible_mask)
+#define cpumask_bits(maskp) ((maskp)->bits)
+
+extern int bitmap_weight(const unsigned long *bitmap, int bits);
+
+#define nr_cpumask_bits	NR_CPUS
+
+static inline unsigned int cpumask_weight(const struct cpumask *srcp)
+{
+	return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits);
+}
+
+int eprintf(int level,
+	    const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+
+#define pr_fmt(fmt) fmt
+
+#define pr_info(fmt, ...) \
+	eprintf(0, pr_fmt(fmt), ##__VA_ARGS__)
+
+#define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
+		sizeof(struct __struct), __alignof__(struct __struct),\
+		(__flags), NULL)
+
+struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
+			unsigned long,
+			void (*)(void *));
+void kmem_cache_destroy(struct kmem_cache *);
+
+#define SLAB_HWCACHE_ALIGN 32
+
+#define SLAB_PANIC 1
+
+/*-- pid.c C code: ---------------------------------------------------*/
 
 #define pid_hashfn(nr, ns)	\
 	hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift)
@@ -264,7 +2700,7 @@ void free_pid(struct pid *pid)
 {
 	/* We can be called with write_lock_irq(&tasklist_lock) held */
 	int i;
-	unsigned long flags;
+	unsigned long flags = 0;
 
 	spin_lock_irqsave(&pidmap_lock, flags);
 	for (i = 0; i <= pid->level; i++)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23  9:09     ` Ingo Molnar
  (?)
@ 2011-05-23 10:21     ` Alexey Dobriyan
  2011-05-23 10:55       ` Ingo Molnar
  -1 siblings, 1 reply; 15+ messages in thread
From: Alexey Dobriyan @ 2011-05-23 10:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton

On Mon, May 23, 2011 at 12:09 PM, Ingo Molnar <mingo@elte.hu> wrote:
>      24594a2bfcaa: [PATCH] x86-64 merge
>
>     - Remove some unneeded prefetches.  Just two are enough to kickstart
>       the hardware prefetcher.
>
>   But despite touching prefetches explicitly, this too sloppily left the (now
>   dangling) prefetch.h include file around.

Well, developer removes include, developer risks compile breakage.

> Anway, what i tried to demonstrate with this mail how much *real* slowdown in
> the kernel build our current header file bloat is causing. We could literally
> halve our kernel build times if we fixed this!

News at 11!

Ingo, you're running x86 compile tests nonstop, you can very well make asm-x86
headers the strictest ones to make problem less problematic.

You (x86 merge people), removed header guards from quite a lot of asm-x86/*.h
files breaking gcc "do not open(2) second time" heuristics. It became better
since last I've noticed it, but maybe start with that?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23 10:21     ` Alexey Dobriyan
@ 2011-05-23 10:55       ` Ingo Molnar
  2011-05-23 11:13         ` Alexey Dobriyan
  0 siblings, 1 reply; 15+ messages in thread
From: Ingo Molnar @ 2011-05-23 10:55 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton


* Alexey Dobriyan <adobriyan@gmail.com> wrote:

> On Mon, May 23, 2011 at 12:09 PM, Ingo Molnar <mingo@elte.hu> wrote:
> >      24594a2bfcaa: [PATCH] x86-64 merge
> >
> >     - Remove some unneeded prefetches.  Just two are enough to kickstart
> >       the hardware prefetcher.
> >
> >   But despite touching prefetches explicitly, this too sloppily left the (now
> >   dangling) prefetch.h include file around.
> 
> Well, developer removes include, developer risks compile breakage.

If developer removes the final prefetch() from an unrelated header he might as 
well think of removing the prefetch.h header. If there's compile breakage we 
want to fix the breakage.

But yes, this is easily forgotten and the basic psychology is for header file 
dependencies to grow, almost never to shrink.

To counteract that in a really good way we need tooling help - we are fighting 
entropy here ...

> > Anway, what i tried to demonstrate with this mail how much *real* slowdown 
> > in the kernel build our current header file bloat is causing. We could 
> > literally halve our kernel build times if we fixed this!
> 
> News at 11!

I have not seen *actual hard numbers* measured before, so how exactly is this 
news at 11? So i think your condescending reply is neither fair nor justified.

Yes, we all knew that there's build time costs of header bloat - but it was 
never AFAIK measured and posted to lkml in such a clear way.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23 10:55       ` Ingo Molnar
@ 2011-05-23 11:13         ` Alexey Dobriyan
  2011-05-23 11:51           ` Ingo Molnar
  0 siblings, 1 reply; 15+ messages in thread
From: Alexey Dobriyan @ 2011-05-23 11:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton

On Mon, May 23, 2011 at 1:55 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
>> On Mon, May 23, 2011 at 12:09 PM, Ingo Molnar <mingo@elte.hu> wrote:

>> > Anway, what i tried to demonstrate with this mail how much *real* slowdown
>> > in the kernel build our current header file bloat is causing. We could
>> > literally halve our kernel build times if we fixed this!
>>
>> News at 11!
>
> I have not seen *actual hard numbers* measured before, so how exactly is this
> news at 11? So i think your condescending reply is neither fair nor justified.

That's because the final number itself neither important nor interesting.
It's enough to know it's big enough.

Even removing "extern" from prototypes has small but noticeable effect,
you're talking about real headers.

Linus dropped few header cleanups of mine, I don't even know when is
the right time
to send them now.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23 11:13         ` Alexey Dobriyan
@ 2011-05-23 11:51           ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2011-05-23 11:51 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton


* Alexey Dobriyan <adobriyan@gmail.com> wrote:

> On Mon, May 23, 2011 at 1:55 PM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> > * Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >
> >> On Mon, May 23, 2011 at 12:09 PM, Ingo Molnar <mingo@elte.hu> wrote:
> 
> >> > Anway, what i tried to demonstrate with this mail how much *real* slowdown
> >> > in the kernel build our current header file bloat is causing. We could
> >> > literally halve our kernel build times if we fixed this!
> >>
> >> News at 11!
> >
> > I have not seen *actual hard numbers* measured before, so how exactly is this
> > news at 11? So i think your condescending reply is neither fair nor justified.
> 
> That's because the final number itself neither important nor interesting.

I disagree rather violently: it's obviously important to know whether it's a 
marginal 3% or the massive 50%+ i measured ...

It's also important to know whether latest GCC got faster at parsing away 
~30-40 KLOC of irrelevant crap. (it didn't)

> It's enough to know it's big enough.
> 
> Even removing "extern" from prototypes has small but noticeable effect, 
> you're talking about real headers.
> 
> Linus dropped few header cleanups of mine, I don't even know when is the 
> right time to send them now.

I do not think your header cleanups are discouraged by Linus, at all (i think 
they were always pretty nice and valuable) - i think you misinterpreted the 
did-not-get-applied events:

Firstly, i've seen a fair amount of avoidable breakage from your header 
cleanups, which are really testable with relatively simple means (key configs 
and randconfig) - so you could either try to improve your testing, or you could 
try to team up with someone better at testing to produce less buggy patches, or 
you could push it into linux-next.

But my main guess is that it's mostly just bad timing: if you don't work 
through maintainer trees (which you don't and sometimes you can't) you don't 
want to push when there's lots of pending trees (for example right now in the 
merge window), nor when possibly-broken cleanups are frowned upon (-rc3 or 
later).

-rc1 to -rc2 would be a pretty safe and large window to send such bits IMO.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23  9:09     ` Ingo Molnar
  (?)
  (?)
@ 2011-05-23 16:01     ` Linus Torvalds
  2011-05-23 17:01       ` Ingo Molnar
  -1 siblings, 1 reply; 15+ messages in thread
From: Linus Torvalds @ 2011-05-23 16:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, David Miller,
	linux-next, linux-kernel, x86, Peter Zijlstra, Andrew Morton

On Mon, May 23, 2011 at 2:09 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
> I've attached a totally hacky patch that removes all the big #include's from
> kernel/pid.c and includes all structure and API definitions explicitly.

Hmm.

A less hacky patch might be to split up "sched.h" into multiple
smaller things and at least get *part* of the way.

A lot of things want "struct task_struct" (and in some cases
thread_info, but that's already split).

Much fewer care about the signal stuff.

And many things probably don't even need the task_struct definition,
and might be perfectly happy with just function calls rather than
having intimate knowledge of the structure layout and an inline
function.

                       Linus

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23  9:09     ` Ingo Molnar
                       ` (2 preceding siblings ...)
  (?)
@ 2011-05-23 16:19     ` Sam Ravnborg
  -1 siblings, 0 replies; 15+ messages in thread
From: Sam Ravnborg @ 2011-05-23 16:19 UTC (permalink / raw)
  To: Ingo Molnar, Christopher Li
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton

> 
> Such thing happen due to:
> 
>  - header files only get added, almost never removed
> 
> The key thing was that the build did not break when prefetch.h was kept 
> dangling. Not sure what to do about that - for humans a dangling header is 
> absolutely non-obvious to find - we'd need tooling help.

Long time ago I discussed this briefly with Christopher Li,
and he hacked support for this in sparse.

The branch is still around:

http://git.kernel.org/?p=devel/sparse/chrisl/sparse.git;a=shortlog;h=unused-include-files

I never got around to play with it for various reasons.
IIRC it will list include files not used in _current_ configuration,
so use if CONFIG_ etc. may give different results.

	Sam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23 16:01     ` Linus Torvalds
@ 2011-05-23 17:01       ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2011-05-23 17:01 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, David Miller,
	linux-next, linux-kernel, x86, Peter Zijlstra, Andrew Morton


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, May 23, 2011 at 2:09 AM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> > I've attached a totally hacky patch that removes all the big #include's from
> > kernel/pid.c and includes all structure and API definitions explicitly.
> 
> Hmm.
> 
> A less hacky patch might be to split up "sched.h" into multiple
> smaller things and at least get *part* of the way.
> 

Yeah, absolutely - Peter already raised that a couple of days ago in a sched.h 
discussion so it's on the radar.

The hacky patch was really just a throw-away attempt to see where we stand - we 
only had vague impressions about the level of problems we have, now we know 
some numbers.

> A lot of things want "struct task_struct" (and in some cases thread_info, but 
> that's already split).
> 
> Much fewer care about the signal stuff.
> 
> And many things probably don't even need the task_struct definition, and 
> might be perfectly happy with just function calls rather than having intimate 
> knowledge of the structure layout and an inline function.

Yeah.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23  9:09     ` Ingo Molnar
                       ` (3 preceding siblings ...)
  (?)
@ 2011-05-28  0:36     ` Paul Gortmaker
  2011-05-28 14:40       ` [PATCH] Fixes to the module.h splitup tree Ingo Molnar
  -1 siblings, 1 reply; 15+ messages in thread
From: Paul Gortmaker @ 2011-05-28  0:36 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton

On Mon, May 23, 2011 at 5:09 AM, Ingo Molnar <mingo@elte.hu> wrote:
>

[...]

>
> A surprisingly large chunk are all the module.h details which brings in details
> like large elf.h definitions - despite pid.c only relying on the module code
> for the spurious use of EXPORT_SYMBOL primitives. Fixing this would cause no
> runtime overhead AFAICS.

I started working on the above since it seemed like it would be an interesting
puzzle to untangle - that is before I realized how involved it would be.  :)

It is do-able, but not as simple as it 1st might seem.  At the moment, if you
touch linux/module.h and rebuild, the time is within one or two seconds of
a fresh build - some 1670 compiles (for a typical x86-64 defconfig).  So
module.h is pretty much 99% pervasive.  With my tree so far, the same
touch builds close to 500 less files, is done in ~20% less time, and I've
still many changes yet to make....

Things that become evident upon attacking this:

1) Separating out the EXPORT_SYMBOL stuff just alone by itself largely
does nothing, because there are ~35 files in include/* which will directly
include linux/module.h regardless of whether your file wanted it or not.

2) The biggest culprit is linux/device.h, since it finds its way into almost
everything it seems.  One has to clean everything else up, and then
rebase this type of change to last, so the tree remains bisectable.

3) Dealing with #2 reveals that *lots* of drivers/files never even had a line
for #include <linux/module.h> -- they were happy to have it implicitly
appear via some unknown include chain and simply ride the wave.

4) It isn't just the presence of module.h that people were implicitly taking
advantage of -- since module.h itself includes 95% of the known world, I
found files that were getting stat.h, sched.h, even asm/*.h etc. via the
implicit presence of module.h

5) The combination of #3 and #4 makes for a lot of commits, as  I'm trying
to keep them separated along subsystem/maintainer boundaries.

Anyways, I just wanted to mention this was underway, but I don't see it
being 100% done in the small amount of time left in this merge window.

The current tree is here if anyone wants to poke at it and comment on it
while I continue to plug away at the task.  x86, x86-64 and powerpc-64
defconfigs have been tested to build OK.

git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-2.6.git
module.h-split-May27

http://git.kernel.org/?p=linux/kernel/git/paulg/linux-2.6.git;a=shortlog;h=refs/heads/module.h-split-May27

Paul.

>
> Another big chunk are the RCU definitions and APIs. These too are inlined for
> performance reasons - and that seems justified.
>
> Anway, what i tried to demonstrate with this mail how much *real* slowdown in
> the kernel build our current header file bloat is causing. We could literally
> halve our kernel build times if we fixed this!
>
> Thanks,
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] Fixes to the module.h splitup tree
  2011-05-28  0:36     ` Paul Gortmaker
@ 2011-05-28 14:40       ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2011-05-28 14:40 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linus Torvalds, Stephen Rothwell, Thomas Gleixner,
	H. Peter Anvin, David Miller, linux-next, linux-kernel, x86,
	Peter Zijlstra, Andrew Morton


* Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> On Mon, May 23, 2011 at 5:09 AM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> 
> [...]
> 
> >
> > A surprisingly large chunk are all the module.h details which brings in details
> > like large elf.h definitions - despite pid.c only relying on the module code
> > for the spurious use of EXPORT_SYMBOL primitives. Fixing this would cause no
> > runtime overhead AFAICS.
> 
> I started working on the above since it seemed like it would be an interesting
> puzzle to untangle - that is before I realized how involved it would be.  :)
> 
> It is do-able, but not as simple as it 1st might seem.  At the moment, if you
> touch linux/module.h and rebuild, the time is within one or two seconds of
> a fresh build - some 1670 compiles (for a typical x86-64 defconfig).  So
> module.h is pretty much 99% pervasive.  With my tree so far, the same
> touch builds close to 500 less files, is done in ~20% less time, and I've
> still many changes yet to make....
> 
> Things that become evident upon attacking this:
> 
> 1) Separating out the EXPORT_SYMBOL stuff just alone by itself largely
> does nothing, because there are ~35 files in include/* which will directly
> include linux/module.h regardless of whether your file wanted it or not.
> 
> 2) The biggest culprit is linux/device.h, since it finds its way into almost
> everything it seems.  One has to clean everything else up, and then
> rebase this type of change to last, so the tree remains bisectable.
> 
> 3) Dealing with #2 reveals that *lots* of drivers/files never even had a line
> for #include <linux/module.h> -- they were happy to have it implicitly
> appear via some unknown include chain and simply ride the wave.

Yeah, i'd suggest you start with a smart grep like Linus used in the 
prefetch discussion:

find files that use module APIs but do not include module.h. You can 
add module.h to them and then remove all spurious module.h inclusions 
from include/linux/ and build allyesconfig - this will show you the 
remaining places that manage to rely on module.h in some roundabout 
way your grep did not detect.

> 4) It isn't just the presence of module.h that people were 
> implicitly taking advantage of -- since module.h itself includes 
> 95% of the known world, I found files that were getting stat.h, 
> sched.h, even asm/*.h etc. via the implicit presence of module.h

Indeed :-/ It's 15 years of almost uncontrolled mess!

> 5) The combination of #3 and #4 makes for a lot of commits, as I'm 
> trying to keep them separated along subsystem/maintainer 
> boundaries.

Oh, i'd *definitely* suggest to not bother splitting this up along 
100+ maintainer trees! The point is that even if you conflict with 
them, header file conflicts are *trivial* to resolve.

So please, after an RFC posting, just find the time window where this 
should be done best, do it quickly, send it to Linus so he can pull 
it quickly - before anyone notices it's upstream and we can fix the 
fallout quickly as well ...

You have my acked-by to touch arch/x86/, scheduler, perf and locking 
bits as you wish to.

> Anyways, I just wanted to mention this was underway, but I don't 
> see it being 100% done in the small amount of time left in this 
> merge window.

I think the ideal place wouldnt even be the merge window, but the two 
weeks between -rc1 and -rc3. That is when there is the least number 
of commits 'in flight' in maintainer trees.

> The current tree is here if anyone wants to poke at it and comment 
> on it while I continue to plug away at the task.  x86, x86-64 and 
> powerpc-64 defconfigs have been tested to build OK.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-2.6.git
> module.h-split-May27
> 
> http://git.kernel.org/?p=linux/kernel/git/paulg/linux-2.6.git;a=shortlog;h=refs/heads/module.h-split-May27

Okay, so i test-pulled your module.h-split-May27 branch and it looks 
absolutely lovely!

Have you tried to measure how much practical effect this has on .i 
size of a file that currently needlessly includes modules.h (and half 
the world)?

[ a few minutes later ]

Ok, so you've used Linus's 98b98d316349 commit as a base tree. I have 
tested your base tree plus your module.h-split-May27 full tree, on 
x86 defconfig.

I have done two tests: a .i size test and a kernel build performance 
test.

The .i size test was a very simple extraction of all .i files from 
arch/x86/kernel/, which i used as a reference target build directory 
that has a good mix of module.h relevant and module.h irrelevant 
files: it has 178 .c files there, 71 of which now have module.h and 
107 do not have it.

I extracted all .i files on a fully built tree via a simple:

 ( for N in $(find arch/x86/kernel/ -name '*.o' | sed 's/.o$/.i/g'); do make $N; cat $N; done; ) > kernel.i

           base -git tree:  2841325 lines of preprocessed .c code
      module.h-split tree:  2783051 lines of preprocessed .c code

So there's a very significant 2.1% reduction of work for the compiler 
to do, very nice!

Then i tested what impact this has on kernel build speed, which i 
tested via this small script:

            make -j64 arch/x86/kernel/ >/dev/null 2>/dev/null
            find arch/x86/kernel/ -name '*.o' | xargs rm -f

[ Sidenote: this method of removing the .o's immediately after they 
  got built has the measurement advantage of making perf stat --sync 
  produce very stable and largely IO invariant numbers. ]

       $ perf stat --repeat 10 --sync -e task-clock ./build-x86 

       # Performance counter stats for './build-x86' (10 runs):


 | base -git tree:
 -------------------------
      35284.361328 task-clock                #   11.452 CPUs utilized            ( +-  0.11% )
      35240.124984 task-clock                #   11.431 CPUs utilized            ( +-  0.11% )

       3.081192522 seconds time elapsed                                          ( +-  0.42% )
       3.082811752 seconds time elapsed                                          ( +-  0.42% )

 | module.h-split tree:
 ----------------------
      34807.362189 task-clock                #   11.511 CPUs utilized            ( +-  0.06% )
      34792.156504 task-clock                #   11.511 CPUs utilized            ( +-  0.06% )

       3.023727829 seconds time elapsed                                          ( +-  0.68% )
       3.022577206 seconds time elapsed                                          ( +-  0.47% )

That's a 1.9% kernel build performance improvement (!) in terms of 
elapsed time and a 1.3% performance improvement in terms of CPU time 
used, the measured speedup is well above the noise of the 
measurements.

I also tested your tree with all[yes|no|mod]config[32|64], and a 
handful of randconfigs, and with the few fixes below [*] they all 
build just fine:

 Acked-by: Ingo Molnar <mingo@elte.hu>
 Tested-by: Ingo Molnar <mingo@elte.hu>

All in one, these results make me want your tree upstream like 
yesterday! :-)

Linus: if you'd like to be tempted with this module.h header 
dependency splitup then i could send you a pull request with Paul's 
stuff + fixes today, tested on x86 and cross-built to most other 
architectures. It is absolutely doable and low-risk.

Thanks,

	Ingo

[*] they were created in a brute-force fashion, to keep things simple

Subject: module.h splitup: Build fixes on x86 allno/allyes 32-bit/64-bit kernels
From: Ingo Molnar <mingo@elte.hu>
Date: Sat May 28 15:19:32 CEST 2011

Only module.h or stat.h additions.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/crypto/aesni-intel_glue.c                    |    1 +
 arch/x86/kernel/e820.c                                |    1 +
 arch/x86/kernel/pci-dma.c                             |    1 +
 arch/x86/kernel/rtc.c                                 |    1 +
 arch/x86/platform/mrst/vrtc.c                         |    1 +
 arch/x86/platform/uv/bios_uv.c                        |    4 +++-
 block/blk-integrity.c                                 |    1 +
 crypto/async_tx/raid6test.c                           |    1 +
 drivers/acpi/ec_sys.c                                 |    1 +
 drivers/acpi/sbshc.c                                  |    1 +
 drivers/base/dma-coherent.c                           |    1 +
 drivers/base/hypervisor.c                             |    2 ++
 drivers/base/power/runtime.c                          |    1 +
 drivers/bcma/main.c                                   |    1 +
 drivers/block/aoe/aoechr.c                            |    1 +
 drivers/block/virtio_blk.c                            |    1 +
 drivers/char/hw_random/virtio-rng.c                   |    1 +
 drivers/char/ttyprintk.c                              |    1 +
 drivers/char/virtio_console.c                         |    1 +
 drivers/dca/dca-core.c                                |    1 +
 drivers/dca/dca-sysfs.c                               |    1 +
 drivers/dma/intel_mid_dma.c                           |    1 +
 drivers/edac/mce_amd_inj.c                            |    1 +
 drivers/firewire/core-iso.c                           |    1 +
 drivers/firmware/google/gsmi.c                        |    1 +
 drivers/firmware/sigma.c                              |    1 +
 drivers/gpio/74x164.c                                 |    1 +
 drivers/gpio/mc33880.c                                |    1 +
 drivers/gpio/mcp23s08.c                               |    1 +
 drivers/gpio/ml_ioh_gpio.c                            |    1 +
 drivers/gpio/pcf857x.c                                |    1 +
 drivers/gpio/pch_gpio.c                               |    1 +
 drivers/gpu/drm/ttm/ttm_tt.c                          |    1 +
 drivers/hid/hid-axff.c                                |    1 +
 drivers/hid/hid-dr.c                                  |    1 +
 drivers/hid/hid-emsff.c                               |    1 +
 drivers/hid/hid-gaff.c                                |    1 +
 drivers/hid/hid-picolcd.c                             |    1 +
 drivers/hid/hid-roccat-common.c                       |    1 +
 drivers/hid/hid-roccat.c                              |    1 +
 drivers/hid/hid-sjoy.c                                |    1 +
 drivers/hid/hid-tmff.c                                |    1 +
 drivers/hid/hid-zpff.c                                |    1 +
 drivers/ide/cmd640.c                                  |    1 +
 drivers/ide/ide-acpi.c                                |    1 +
 drivers/ide/ide-pnp.c                                 |    1 +
 drivers/ide/tc86c001.c                                |    1 +
 drivers/idle/intel_idle.c                             |    1 +
 drivers/infiniband/hw/ipath/ipath_diag.c              |    1 +
 drivers/infiniband/hw/ipath/ipath_file_ops.c          |    2 ++
 drivers/infiniband/hw/ipath/ipath_sysfs.c             |    1 +
 drivers/infiniband/hw/ipath/ipath_verbs.c             |    1 +
 drivers/infiniband/hw/qib/qib_diag.c                  |    1 +
 drivers/infiniband/hw/qib/qib_file_ops.c              |    1 +
 drivers/infiniband/hw/qib/qib_iba7220.c               |    1 +
 drivers/infiniband/hw/qib/qib_iba7322.c               |    1 +
 drivers/infiniband/hw/qib/qib_pcie.c                  |    1 +
 drivers/infiniband/hw/qib/qib_sd7220.c                |    1 +
 drivers/infiniband/hw/qib/qib_verbs.c                 |    1 +
 drivers/input/joystick/as5011.c                       |    1 +
 drivers/input/misc/ad714x.c                           |    1 +
 drivers/input/misc/adxl34x.c                          |    1 +
 drivers/input/misc/ati_remote2.c                      |    1 +
 drivers/input/misc/cma3000_d0x.c                      |    1 +
 drivers/input/touchscreen/ad7877.c                    |    1 +
 drivers/input/touchscreen/ad7879-spi.c                |    1 +
 drivers/input/touchscreen/ad7879.c                    |    1 +
 drivers/input/touchscreen/ads7846.c                   |    1 +
 drivers/input/touchscreen/bu21013_ts.c                |    1 +
 drivers/isdn/capi/kcapi_proc.c                        |    1 +
 drivers/leds/dell-led.c                               |    1 +
 drivers/leds/leds-88pm860x.c                          |    1 +
 drivers/leds/leds-gpio.c                              |    1 +
 drivers/leds/leds-lm3530.c                            |    1 +
 drivers/leds/leds-lt3593.c                            |    1 +
 drivers/leds/leds-net48xx.c                           |    1 +
 drivers/leds/leds-net5501.c                           |    1 +
 drivers/leds/leds-wm831x-status.c                     |    1 +
 drivers/leds/leds-wm8350.c                            |    1 +
 drivers/leds/leds-wrap.c                              |    1 +
 drivers/lguest/lguest_device.c                        |    1 +
 drivers/md/dm-log-userspace-base.c                    |    1 +
 drivers/md/dm-raid.c                                  |    1 +
 drivers/md/dm-service-time.c                          |    1 +
 drivers/md/dm-uevent.c                                |    1 +
 drivers/media/common/saa7146_core.c                   |    1 +
 drivers/media/common/saa7146_fops.c                   |    1 +
 drivers/media/common/saa7146_hlp.c                    |    1 +
 drivers/media/common/saa7146_video.c                  |    1 +
 drivers/media/common/tuners/tuner-types.c             |    1 +
 drivers/media/dvb/frontends/dibx000_common.c          |    1 +
 drivers/media/dvb/siano/sms-cards.c                   |    1 +
 drivers/media/dvb/siano/smsendian.c                   |    1 +
 drivers/media/dvb/siano/smssdio.c                     |    1 +
 drivers/media/dvb/siano/smsusb.c                      |    1 +
 drivers/media/media-device.c                          |    1 +
 drivers/media/radio/radio-timb.c                      |    1 +
 drivers/media/radio/radio-wl1273.c                    |    1 +
 drivers/media/radio/si4713-i2c.c                      |    1 +
 drivers/media/radio/wl128x/fmdrv_v4l2.c               |    1 +
 drivers/media/rc/ir-jvc-decoder.c                     |    1 +
 drivers/media/rc/ir-lirc-codec.c                      |    1 +
 drivers/media/rc/ir-nec-decoder.c                     |    1 +
 drivers/media/rc/ir-raw.c                             |    1 +
 drivers/media/rc/ir-rc5-decoder.c                     |    1 +
 drivers/media/rc/ir-rc5-sz-decoder.c                  |    1 +
 drivers/media/rc/ir-rc6-decoder.c                     |    1 +
 drivers/media/rc/ir-sony-decoder.c                    |    1 +
 drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c       |    1 +
 drivers/media/rc/keymaps/rc-alink-dtu-m.c             |    1 +
 drivers/media/rc/keymaps/rc-anysee.c                  |    1 +
 drivers/media/rc/keymaps/rc-apac-viewcomp.c           |    1 +
 drivers/media/rc/keymaps/rc-asus-pc39.c               |    1 +
 drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.c    |    1 +
 drivers/media/rc/keymaps/rc-avermedia-a16d.c          |    1 +
 drivers/media/rc/keymaps/rc-avermedia-cardbus.c       |    1 +
 drivers/media/rc/keymaps/rc-avermedia-dvbt.c          |    1 +
 drivers/media/rc/keymaps/rc-avermedia-m135a.c         |    1 +
 drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c   |    1 +
 drivers/media/rc/keymaps/rc-avermedia-rm-ks.c         |    1 +
 drivers/media/rc/keymaps/rc-avermedia.c               |    1 +
 drivers/media/rc/keymaps/rc-avertv-303.c              |    1 +
 drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c      |    1 +
 drivers/media/rc/keymaps/rc-behold-columbus.c         |    1 +
 drivers/media/rc/keymaps/rc-behold.c                  |    1 +
 drivers/media/rc/keymaps/rc-budget-ci-old.c           |    1 +
 drivers/media/rc/keymaps/rc-cinergy-1400.c            |    1 +
 drivers/media/rc/keymaps/rc-cinergy.c                 |    1 +
 drivers/media/rc/keymaps/rc-dib0700-nec.c             |    1 +
 drivers/media/rc/keymaps/rc-em-terratec.c             |    1 +
 drivers/media/rc/keymaps/rc-encore-enltv-fm53.c       |    1 +
 drivers/media/rc/keymaps/rc-encore-enltv.c            |    1 +
 drivers/media/rc/keymaps/rc-encore-enltv2.c           |    1 +
 drivers/media/rc/keymaps/rc-evga-indtube.c            |    1 +
 drivers/media/rc/keymaps/rc-eztv.c                    |    1 +
 drivers/media/rc/keymaps/rc-flydvb.c                  |    1 +
 drivers/media/rc/keymaps/rc-flyvideo.c                |    1 +
 drivers/media/rc/keymaps/rc-fusionhdtv-mce.c          |    1 +
 drivers/media/rc/keymaps/rc-gadmei-rm008z.c           |    1 +
 drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c      |    1 +
 drivers/media/rc/keymaps/rc-gotview7135.c             |    1 +
 drivers/media/rc/keymaps/rc-hauppauge.c               |    1 +
 drivers/media/rc/keymaps/rc-imon-mce.c                |    1 +
 drivers/media/rc/keymaps/rc-imon-pad.c                |    1 +
 drivers/media/rc/keymaps/rc-iodata-bctv7e.c           |    1 +
 drivers/media/rc/keymaps/rc-kaiomy.c                  |    1 +
 drivers/media/rc/keymaps/rc-kworld-315u.c             |    1 +
 drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c   |    1 +
 drivers/media/rc/keymaps/rc-leadtek-y04g0051.c        |    1 +
 drivers/media/rc/keymaps/rc-lirc.c                    |    1 +
 drivers/media/rc/keymaps/rc-lme2510.c                 |    1 +
 drivers/media/rc/keymaps/rc-manli.c                   |    1 +
 drivers/media/rc/keymaps/rc-msi-digivox-ii.c          |    1 +
 drivers/media/rc/keymaps/rc-msi-digivox-iii.c         |    1 +
 drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c     |    1 +
 drivers/media/rc/keymaps/rc-msi-tvanywhere.c          |    1 +
 drivers/media/rc/keymaps/rc-nebula.c                  |    1 +
 drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.c |    1 +
 drivers/media/rc/keymaps/rc-norwood.c                 |    1 +
 drivers/media/rc/keymaps/rc-npgtech.c                 |    1 +
 drivers/media/rc/keymaps/rc-pctv-sedna.c              |    1 +
 drivers/media/rc/keymaps/rc-pinnacle-color.c          |    1 +
 drivers/media/rc/keymaps/rc-pinnacle-grey.c           |    1 +
 drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c        |    1 +
 drivers/media/rc/keymaps/rc-pixelview-002t.c          |    1 +
 drivers/media/rc/keymaps/rc-pixelview-mk12.c          |    1 +
 drivers/media/rc/keymaps/rc-pixelview-new.c           |    1 +
 drivers/media/rc/keymaps/rc-pixelview.c               |    1 +
 drivers/media/rc/keymaps/rc-powercolor-real-angel.c   |    1 +
 drivers/media/rc/keymaps/rc-proteus-2309.c            |    1 +
 drivers/media/rc/keymaps/rc-purpletv.c                |    1 +
 drivers/media/rc/keymaps/rc-pv951.c                   |    1 +
 drivers/media/rc/keymaps/rc-rc6-mce.c                 |    1 +
 drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c  |    1 +
 drivers/media/rc/keymaps/rc-streamzap.c               |    1 +
 drivers/media/rc/keymaps/rc-tbs-nec.c                 |    1 +
 drivers/media/rc/keymaps/rc-technisat-usb2.c          |    1 +
 drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c     |    1 +
 drivers/media/rc/keymaps/rc-terratec-slim-2.c         |    1 +
 drivers/media/rc/keymaps/rc-terratec-slim.c           |    1 +
 drivers/media/rc/keymaps/rc-tevii-nec.c               |    1 +
 drivers/media/rc/keymaps/rc-tivo.c                    |    1 +
 drivers/media/rc/keymaps/rc-total-media-in-hand.c     |    1 +
 drivers/media/rc/keymaps/rc-trekstor.c                |    1 +
 drivers/media/rc/keymaps/rc-tt-1500.c                 |    1 +
 drivers/media/rc/keymaps/rc-twinhan1027.c             |    1 +
 drivers/media/rc/keymaps/rc-videomate-m1f.c           |    1 +
 drivers/media/rc/keymaps/rc-videomate-s350.c          |    1 +
 drivers/media/rc/keymaps/rc-videomate-tv-pvr.c        |    1 +
 drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c    |    1 +
 drivers/media/rc/keymaps/rc-winfast.c                 |    1 +
 drivers/media/rc/rc-main.c                            |    1 +
 drivers/media/video/cpia2/cpia2_usb.c                 |    1 +
 drivers/media/video/cx25840/cx25840-ir.c              |    1 +
 drivers/media/video/hdpvr/hdpvr-i2c.c                 |    1 +
 drivers/media/video/hexium_gemini.c                   |    1 +
 drivers/media/video/hexium_orion.c                    |    1 +
 drivers/media/video/imx074.c                          |    1 +
 drivers/media/video/mt9m001.c                         |    1 +
 drivers/media/video/mt9m111.c                         |    1 +
 drivers/media/video/mt9t031.c                         |    1 +
 drivers/media/video/mt9v011.c                         |    1 +
 drivers/media/video/mt9v022.c                         |    1 +
 drivers/media/video/mxb.c                             |    1 +
 drivers/media/video/noon010pc30.c                     |    1 +
 drivers/media/video/ov6650.c                          |    1 +
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c            |    1 +
 drivers/media/video/rj54n1cb0c.c                      |    1 +
 drivers/media/video/sr030pc30.c                       |    1 +
 drivers/media/video/timblogiw.c                       |    1 +
 drivers/media/video/tvp5150.c                         |    1 +
 drivers/media/video/usbvision/usbvision-cards.c       |    1 +
 drivers/media/video/v4l2-ctrls.c                      |    1 +
 drivers/media/video/v4l2-device.c                     |    1 +
 drivers/media/video/v4l2-event.c                      |    1 +
 drivers/media/video/v4l2-fh.c                         |    1 +
 drivers/media/video/v4l2-int-device.c                 |    1 +
 drivers/media/video/v4l2-subdev.c                     |    1 +
 drivers/memstick/core/memstick.c                      |    1 +
 drivers/memstick/core/mspro_block.c                   |    1 +
 drivers/memstick/host/jmb38x_ms.c                     |    1 +
 drivers/memstick/host/tifm_ms.c                       |    1 +
 drivers/message/i2o/pci.c                             |    1 +
 drivers/mfd/ab3100-core.c                             |    1 +
 drivers/mfd/ab3550-core.c                             |    1 +
 drivers/mfd/ab8500-debugfs.c                          |    1 +
 drivers/mfd/ab8500-sysctrl.c                          |    1 +
 drivers/mfd/abx500-core.c                             |    1 +
 drivers/mfd/max8997.c                                 |    1 +
 drivers/mfd/mfd-core.c                                |    1 +
 drivers/mfd/pcf50633-irq.c                            |    1 +
 drivers/mfd/twl-core.c                                |    1 +
 drivers/mfd/twl6030-irq.c                             |    1 +
 drivers/mfd/wl1273-core.c                             |    1 +
 drivers/mfd/wm8400-core.c                             |    1 +
 drivers/misc/bh1780gli.c                              |    2 ++
 drivers/misc/kgdbts.c                                 |    1 +
 drivers/misc/ti-st/st_kim.c                           |    1 +
 drivers/misc/tifm_7xx1.c                              |    1 +
 drivers/misc/tifm_core.c                              |    1 +
 drivers/mmc/card/mmc_test.c                           |    1 +
 drivers/mmc/core/bus.c                                |    1 +
 drivers/mmc/core/debugfs.c                            |    1 +
 drivers/mmc/core/host.c                               |    1 +
 drivers/mmc/core/mmc.c                                |    1 +
 drivers/mmc/core/quirks.c                             |    1 +
 drivers/mmc/core/sd.c                                 |    1 +
 drivers/mmc/core/sd_ops.c                             |    1 +
 drivers/mmc/core/sdio_bus.c                           |    1 +
 drivers/mmc/core/sdio_io.c                            |    1 +
 drivers/mmc/core/sdio_irq.c                           |    1 +
 drivers/mmc/host/mmc_spi.c                            |    1 +
 drivers/mmc/host/sdhci-pci.c                          |    1 +
 drivers/mmc/host/sdhci-pltfm.c                        |    1 +
 drivers/mmc/host/sdhci.c                              |    1 +
 drivers/mmc/host/sdricoh_cs.c                         |    1 +
 drivers/mmc/host/tifm_sd.c                            |    1 +
 drivers/mmc/host/via-sdmmc.c                          |    1 +
 drivers/mtd/ar7part.c                                 |    1 +
 drivers/mtd/cmdlinepart.c                             |    1 +
 drivers/mtd/lpddr/lpddr_cmds.c                        |    1 +
 drivers/mtd/nand/cafe_nand.c                          |    1 +
 drivers/mtd/nand/diskonchip.c                         |    1 +
 drivers/mtd/nand/nand_bbt.c                           |    1 +
 drivers/mtd/nand/sm_common.c                          |    1 +
 drivers/mtd/onenand/onenand_bbt.c                     |    1 +
 drivers/mtd/redboot.c                                 |    1 +
 drivers/mtd/rfd_ftl.c                                 |    1 +
 drivers/mtd/ubi/vmt.c                                 |    1 +
 drivers/net/phy/realtek.c                             |    1 +
 drivers/pci/hotplug/pciehp_acpi.c                     |    1 +
 drivers/platform/x86/intel_scu_ipc.c                  |    1 +
 drivers/platform/x86/msi-wmi.c                        |    1 +
 drivers/platform/x86/wmi.c                            |    1 +
 drivers/power/max17042_battery.c                      |    1 +
 drivers/rapidio/switches/idt_gen2.c                   |    2 ++
 drivers/regulator/ab8500.c                            |    1 +
 drivers/regulator/bq24022.c                           |    1 +
 drivers/regulator/da903x.c                            |    1 +
 drivers/regulator/dummy.c                             |    1 +
 drivers/regulator/fixed.c                             |    1 +
 drivers/regulator/lp3971.c                            |    1 +
 drivers/regulator/lp3972.c                            |    1 +
 drivers/regulator/max8925-regulator.c                 |    1 +
 drivers/regulator/max8997.c                           |    1 +
 drivers/regulator/mc13783-regulator.c                 |    1 +
 drivers/regulator/mc13892-regulator.c                 |    1 +
 drivers/regulator/mc13xxx-regulator-core.c            |    1 +
 drivers/regulator/tps6586x-regulator.c                |    1 +
 drivers/regulator/userspace-consumer.c                |    1 +
 drivers/regulator/virtual.c                           |    1 +
 drivers/regulator/wm8400-regulator.c                  |    1 +
 drivers/rtc/rtc-ds1305.c                              |    1 +
 drivers/rtc/rtc-ds1511.c                              |    1 +
 drivers/rtc/rtc-ds1553.c                              |    1 +
 drivers/rtc/rtc-ds1672.c                              |    1 +
 drivers/rtc/rtc-ds1742.c                              |    1 +
 drivers/rtc/rtc-isl12022.c                            |    1 +
 drivers/rtc/rtc-pcf2123.c                             |    1 +
 drivers/rtc/rtc-pcf8563.c                             |    1 +
 drivers/rtc/rtc-rs5c348.c                             |    1 +
 drivers/rtc/rtc-rs5c372.c                             |    1 +
 drivers/rtc/rtc-x1205.c                               |    1 +
 drivers/scsi/aacraid/aachba.c                         |    1 +
 drivers/scsi/bfa/bfad_debugfs.c                       |    1 +
 drivers/scsi/bfa/bfad_im.c                            |    1 +
 drivers/scsi/device_handler/scsi_dh.c                 |    1 +
 drivers/scsi/device_handler/scsi_dh_alua.c            |    1 +
 drivers/scsi/device_handler/scsi_dh_emc.c             |    1 +
 drivers/scsi/device_handler/scsi_dh_hp_sw.c           |    1 +
 drivers/scsi/device_handler/scsi_dh_rdac.c            |    1 +
 drivers/scsi/libfc/fc_disc.c                          |    1 +
 drivers/scsi/libfc/fc_elsct.c                         |    1 +
 drivers/scsi/libfc/fc_exch.c                          |    1 +
 drivers/scsi/libfc/fc_libfc.c                         |    1 +
 drivers/scsi/libfc/fc_lport.c                         |    1 +
 drivers/scsi/libsrp.c                                 |    1 +
 drivers/scsi/lpfc/lpfc_debugfs.c                      |    1 +
 drivers/scsi/megaraid/megaraid_mbox.c                 |    1 +
 drivers/scsi/osd/osd_initiator.c                      |    1 +
 drivers/scsi/scsi_pm.c                                |    1 +
 drivers/spi/dw_spi.c                                  |    1 +
 drivers/spi/dw_spi_pci.c                              |    1 +
 drivers/spi/pxa2xx_spi_pci.c                          |    1 +
 drivers/spi/spi.c                                     |    1 +
 drivers/spi/spi_altera.c                              |    1 +
 drivers/spi/spi_bitbang.c                             |    1 +
 drivers/spi/spi_butterfly.c                           |    1 +
 drivers/spi/spi_oc_tiny.c                             |    1 +
 drivers/spi/tle62x0.c                                 |    1 +
 drivers/tty/serial/max3100.c                          |    1 +
 drivers/tty/serial/max3107-aava.c                     |    1 +
 drivers/tty/serial/max3107.c                          |    1 +
 drivers/tty/serial/timbuart.c                         |    1 +
 drivers/tty/serial/xilinx_uartps.c                    |    1 +
 drivers/uio/uio_pdrv.c                                |    1 +
 drivers/uio/uio_pdrv_genirq.c                         |    1 +
 drivers/usb/wusbcore/devconnect.c                     |    1 +
 drivers/usb/wusbcore/mmc.c                            |    1 +
 drivers/usb/wusbcore/rh.c                             |    1 +
 drivers/usb/wusbcore/security.c                       |    1 +
 drivers/usb/wusbcore/wa-rpipe.c                       |    1 +
 drivers/usb/wusbcore/wa-xfer.c                        |    1 +
 drivers/uwb/est.c                                     |    1 +
 drivers/uwb/i1480/dfu/dfu.c                           |    1 +
 drivers/uwb/ie.c                                      |    1 +
 drivers/uwb/lc-dev.c                                  |    1 +
 drivers/uwb/neh.c                                     |    1 +
 drivers/uwb/pal.c                                     |    1 +
 drivers/uwb/radio.c                                   |    1 +
 drivers/uwb/reset.c                                   |    1 +
 drivers/uwb/rsv.c                                     |    1 +
 drivers/uwb/scan.c                                    |    1 +
 drivers/video/backlight/88pm860x_bl.c                 |    1 +
 drivers/video/backlight/adp5520_bl.c                  |    1 +
 drivers/video/backlight/da903x_bl.c                   |    1 +
 drivers/video/backlight/l4f00242t03.c                 |    1 +
 drivers/video/backlight/ld9040.c                      |    1 +
 drivers/video/backlight/lms283gf05.c                  |    1 +
 drivers/video/backlight/max8925_bl.c                  |    1 +
 drivers/video/backlight/s6e63m0.c                     |    1 +
 drivers/video/backlight/wm831x_bl.c                   |    1 +
 drivers/video/carminefb.c                             |    1 +
 drivers/video/mb862xx/mb862xxfb.c                     |    1 +
 drivers/video/savage/savagefb_accel.c                 |    1 +
 drivers/video/via/via-gpio.c                          |    1 +
 drivers/virtio/virtio.c                               |    1 +
 drivers/virtio/virtio_balloon.c                       |    1 +
 drivers/virtio/virtio_ring.c                          |    1 +
 drivers/w1/w1_family.c                                |    1 +
 drivers/xen/balloon.c                                 |    1 +
 drivers/xen/manage.c                                  |    1 +
 drivers/xen/swiotlb-xen.c                             |    1 +
 fs/bio-integrity.c                                    |    1 +
 fs/exofs/super.c                                      |    1 +
 fs/gfs2/ops_fstype.c                                  |    1 +
 fs/jfs/jfs_logmgr.c                                   |    1 +
 fs/logfs/super.c                                      |    1 +
 include/linux/bcma/bcma.h                             |    1 +
 include/linux/gameport.h                              |    1 +
 include/linux/ssb/ssb.h                               |    1 +
 include/linux/uio_driver.h                            |    1 +
 include/xen/xenbus.h                                  |    1 +
 kernel/debug/kdb/kdb_debugger.c                       |    1 +
 kernel/jump_label.c                                   |    1 +
 kernel/ksysfs.c                                       |    1 +
 kernel/rcutorture.c                                   |    1 +
 kernel/rcutree_trace.c                                |    1 +
 kernel/trace/ftrace.c                                 |    1 +
 kernel/trace/trace_syscalls.c                         |    2 ++
 kernel/watchdog.c                                     |    1 +
 lib/dma-debug.c                                       |    1 +
 mm/memory-failure.c                                   |    1 +
 net/caif/cfpkt_skbuff.c                               |    2 ++
 net/netfilter/ipset/pfxlen.c                          |    1 +
 sound/core/jack.c                                     |    1 +
 sound/core/rawmidi.c                                  |    1 +
 sound/core/seq/seq_midi.c                             |    1 +
 sound/core/seq/seq_midi_emul.c                        |    1 +
 sound/core/seq/seq_virmidi.c                          |    1 +
 sound/drivers/mpu401/mpu401.c                         |    1 +
 sound/drivers/mpu401/mpu401_uart.c                    |    1 +
 sound/drivers/mtpav.c                                 |    1 +
 sound/drivers/mts64.c                                 |    1 +
 sound/drivers/opl3/opl3_lib.c                         |    1 +
 sound/drivers/opl3/opl3_oss.c                         |    2 ++
 sound/drivers/opl3/opl3_seq.c                         |    1 +
 sound/drivers/opl3/opl3_synth.c                       |    1 +
 sound/drivers/opl4/opl4_lib.c                         |    1 +
 sound/drivers/opl4/opl4_proc.c                        |    1 +
 sound/drivers/opl4/opl4_seq.c                         |    1 +
 sound/drivers/portman2x4.c                            |    1 +
 sound/drivers/serial-u16550.c                         |    1 +
 sound/drivers/virmidi.c                               |    1 +
 sound/firewire/iso-resources.c                        |    1 +
 sound/firewire/packets-buffer.c                       |    1 +
 sound/i2c/i2c.c                                       |    1 +
 sound/i2c/other/ak4xxx-adda.c                         |    1 +
 sound/i2c/other/pt2258.c                              |    2 ++
 sound/i2c/other/tea575x-tuner.c                       |    1 +
 sound/i2c/tea6330t.c                                  |    1 +
 sound/isa/sb/emu8000.c                                |    1 +
 sound/isa/sb/emu8000_callback.c                       |    1 +
 sound/isa/sb/emu8000_patch.c                          |    1 +
 sound/isa/sb/emu8000_synth.c                          |    1 +
 sound/isa/wavefront/wavefront_fx.c                    |    1 +
 sound/isa/wavefront/wavefront_synth.c                 |    1 +
 sound/pci/asihpi/hpioctl.c                            |    1 +
 sound/pci/ctxfi/xfi.c                                 |    1 +
 sound/pci/oxygen/oxygen_io.c                          |    1 +
 sound/synth/emux/emux.c                               |    1 +
 sound/synth/emux/emux_oss.c                           |    1 +
 sound/synth/emux/emux_seq.c                           |    1 +
 sound/synth/emux/emux_synth.c                         |    1 +
 sound/synth/emux/soundfont.c                          |    1 +
 sound/synth/util_mem.c                                |    1 +
 sound/usb/6fire/firmware.c                            |    1 +
 sound/usb/midi.c                                      |    1 +
 438 files changed, 448 insertions(+), 1 deletion(-)

Index: linux/arch/x86/crypto/aesni-intel_glue.c
===================================================================
--- linux.orig/arch/x86/crypto/aesni-intel_glue.c
+++ linux/arch/x86/crypto/aesni-intel_glue.c
@@ -33,6 +33,7 @@
 #include <crypto/internal/aead.h>
 #include <linux/workqueue.h>
 #include <linux/spinlock.h>
+#include <linux/module.h>
 
 #if defined(CONFIG_CRYPTO_CTR) || defined(CONFIG_CRYPTO_CTR_MODULE)
 #define HAS_CTR
Index: linux/arch/x86/kernel/e820.c
===================================================================
--- linux.orig/arch/x86/kernel/e820.c
+++ linux/arch/x86/kernel/e820.c
@@ -18,6 +18,7 @@
 #include <linux/acpi.h>
 #include <linux/firmware-map.h>
 #include <linux/memblock.h>
+#include <linux/module.h>
 
 #include <asm/e820.h>
 #include <asm/proto.h>
Index: linux/arch/x86/kernel/pci-dma.c
===================================================================
--- linux.orig/arch/x86/kernel/pci-dma.c
+++ linux/arch/x86/kernel/pci-dma.c
@@ -5,6 +5,7 @@
 #include <linux/gfp.h>
 #include <linux/pci.h>
 #include <linux/kmemleak.h>
+#include <linux/module.h>
 
 #include <asm/proto.h>
 #include <asm/dma.h>
Index: linux/arch/x86/kernel/rtc.c
===================================================================
--- linux.orig/arch/x86/kernel/rtc.c
+++ linux/arch/x86/kernel/rtc.c
@@ -7,6 +7,7 @@
 #include <linux/bcd.h>
 #include <linux/pnp.h>
 #include <linux/of.h>
+#include <linux/module.h>
 
 #include <asm/vsyscall.h>
 #include <asm/x86_init.h>
Index: linux/arch/x86/platform/mrst/vrtc.c
===================================================================
--- linux.orig/arch/x86/platform/mrst/vrtc.c
+++ linux/arch/x86/platform/mrst/vrtc.c
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/sfi.h>
 #include <linux/platform_device.h>
 
Index: linux/arch/x86/platform/uv/bios_uv.c
===================================================================
--- linux.orig/arch/x86/platform/uv/bios_uv.c
+++ linux/arch/x86/platform/uv/bios_uv.c
@@ -19,9 +19,11 @@
  *  Copyright (c) Russ Anderson <rja@sgi.com>
  */
 
+#include <linux/io.h>
 #include <linux/efi.h>
+#include <linux/module.h>
+
 #include <asm/efi.h>
-#include <linux/io.h>
 #include <asm/uv/bios.h>
 #include <asm/uv/uv_hub.h>
 
Index: linux/block/blk-integrity.c
===================================================================
--- linux.orig/block/blk-integrity.c
+++ linux/block/blk-integrity.c
@@ -25,6 +25,7 @@
 #include <linux/bio.h>
 #include <linux/scatterlist.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include "blk.h"
 
Index: linux/crypto/async_tx/raid6test.c
===================================================================
--- linux.orig/crypto/async_tx/raid6test.c
+++ linux/crypto/async_tx/raid6test.c
@@ -20,6 +20,7 @@
  *
  */
 #include <linux/async_tx.h>
+#include <linux/module.h>
 #include <linux/gfp.h>
 #include <linux/random.h>
 
Index: linux/drivers/acpi/ec_sys.c
===================================================================
--- linux.orig/drivers/acpi/ec_sys.c
+++ linux/drivers/acpi/ec_sys.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/acpi.h>
 #include <linux/debugfs.h>
 #include "internal.h"
Index: linux/drivers/acpi/sbshc.c
===================================================================
--- linux.orig/drivers/acpi/sbshc.c
+++ linux/drivers/acpi/sbshc.c
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include "sbshc.h"
 
 #define PREFIX "ACPI: "
Index: linux/drivers/base/dma-coherent.c
===================================================================
--- linux.orig/drivers/base/dma-coherent.c
+++ linux/drivers/base/dma-coherent.c
@@ -5,6 +5,7 @@
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 
 struct dma_coherent_mem {
 	void		*virt_base;
Index: linux/drivers/base/hypervisor.c
===================================================================
--- linux.orig/drivers/base/hypervisor.c
+++ linux/drivers/base/hypervisor.c
@@ -10,6 +10,8 @@
 
 #include <linux/kobject.h>
 #include <linux/device.h>
+#include <linux/module.h>
+
 #include "base.h"
 
 struct kobject *hypervisor_kobj;
Index: linux/drivers/base/power/runtime.c
===================================================================
--- linux.orig/drivers/base/power/runtime.c
+++ linux/drivers/base/power/runtime.c
@@ -9,6 +9,7 @@
 
 #include <linux/sched.h>
 #include <linux/pm_runtime.h>
+#include <linux/module.h>
 #include "power.h"
 
 static int rpm_resume(struct device *dev, int rpmflags);
Index: linux/drivers/bcma/main.c
===================================================================
--- linux.orig/drivers/bcma/main.c
+++ linux/drivers/bcma/main.c
@@ -7,6 +7,7 @@
 
 #include "bcma_private.h"
 #include <linux/bcma/bcma.h>
+#include <linux/module.h>
 
 MODULE_DESCRIPTION("Broadcom's specific AMBA driver");
 MODULE_LICENSE("GPL");
Index: linux/drivers/block/aoe/aoechr.c
===================================================================
--- linux.orig/drivers/block/aoe/aoechr.c
+++ linux/drivers/block/aoe/aoechr.c
@@ -11,6 +11,7 @@
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/skbuff.h>
+#include <linux/module.h>
 #include "aoe.h"
 
 enum {
Index: linux/drivers/block/virtio_blk.c
===================================================================
--- linux.orig/drivers/block/virtio_blk.c
+++ linux/drivers/block/virtio_blk.c
@@ -6,6 +6,7 @@
 #include <linux/virtio.h>
 #include <linux/virtio_blk.h>
 #include <linux/scatterlist.h>
+#include <linux/module.h>
 
 #define PART_BITS 4
 
Index: linux/drivers/char/hw_random/virtio-rng.c
===================================================================
--- linux.orig/drivers/char/hw_random/virtio-rng.c
+++ linux/drivers/char/hw_random/virtio-rng.c
@@ -23,6 +23,7 @@
 #include <linux/spinlock.h>
 #include <linux/virtio.h>
 #include <linux/virtio_rng.h>
+#include <linux/module.h>
 
 static struct virtqueue *vq;
 static unsigned int data_avail;
Index: linux/drivers/char/ttyprintk.c
===================================================================
--- linux.orig/drivers/char/ttyprintk.c
+++ linux/drivers/char/ttyprintk.c
@@ -17,6 +17,7 @@
 #include <linux/device.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
+#include <linux/module.h>
 
 struct ttyprintk_port {
 	struct tty_port port;
Index: linux/drivers/char/virtio_console.c
===================================================================
--- linux.orig/drivers/char/virtio_console.c
+++ linux/drivers/char/virtio_console.c
@@ -32,6 +32,7 @@
 #include <linux/virtio_console.h>
 #include <linux/wait.h>
 #include <linux/workqueue.h>
+#include <linux/module.h>
 #include "../tty/hvc/hvc_console.h"
 
 /*
Index: linux/drivers/dca/dca-core.c
===================================================================
--- linux.orig/drivers/dca/dca-core.c
+++ linux/drivers/dca/dca-core.c
@@ -28,6 +28,7 @@
 #include <linux/device.h>
 #include <linux/dca.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DCA_VERSION "1.12.1"
 
Index: linux/drivers/dca/dca-sysfs.c
===================================================================
--- linux.orig/drivers/dca/dca-sysfs.c
+++ linux/drivers/dca/dca-sysfs.c
@@ -27,6 +27,7 @@
 #include <linux/err.h>
 #include <linux/dca.h>
 #include <linux/gfp.h>
+#include <linux/module.h>
 
 static struct class *dca_class;
 static struct idr dca_idr;
Index: linux/drivers/dma/intel_mid_dma.c
===================================================================
--- linux.orig/drivers/dma/intel_mid_dma.c
+++ linux/drivers/dma/intel_mid_dma.c
@@ -24,6 +24,7 @@
  *
  */
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/pm_runtime.h>
 #include <linux/intel_mid_dma.h>
Index: linux/drivers/edac/mce_amd_inj.c
===================================================================
--- linux.orig/drivers/edac/mce_amd_inj.c
+++ linux/drivers/edac/mce_amd_inj.c
@@ -11,6 +11,7 @@
  */
 
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <linux/sysdev.h>
 #include <linux/edac.h>
 #include <asm/mce.h>
Index: linux/drivers/firewire/core-iso.c
===================================================================
--- linux.orig/drivers/firewire/core-iso.c
+++ linux/drivers/firewire/core-iso.c
@@ -29,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/vmalloc.h>
+#include <linux/module.h>
 
 #include <asm/byteorder.h>
 
Index: linux/drivers/firmware/google/gsmi.c
===================================================================
--- linux.orig/drivers/firmware/google/gsmi.c
+++ linux/drivers/firmware/google/gsmi.c
@@ -27,6 +27,7 @@
 #include <linux/kdebug.h>
 #include <linux/reboot.h>
 #include <linux/efi.h>
+#include <linux/module.h>
 
 #define GSMI_SHUTDOWN_CLEAN	0	/* Clean Shutdown */
 /* TODO(mikew@google.com): Tie in HARDLOCKUP_DETECTOR with NMIWDT */
Index: linux/drivers/firmware/sigma.c
===================================================================
--- linux.orig/drivers/firmware/sigma.c
+++ linux/drivers/firmware/sigma.c
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/i2c.h>
 #include <linux/sigma.h>
+#include <linux/module.h>
 
 /* Return: 0==OK, <0==error, =1 ==no more actions */
 static int
Index: linux/drivers/gpio/74x164.c
===================================================================
--- linux.orig/drivers/gpio/74x164.c
+++ linux/drivers/gpio/74x164.c
@@ -15,6 +15,7 @@
 #include <linux/spi/74x164.h>
 #include <linux/gpio.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define GEN_74X164_GPIO_COUNT	8
 
Index: linux/drivers/gpio/mc33880.c
===================================================================
--- linux.orig/drivers/gpio/mc33880.c
+++ linux/drivers/gpio/mc33880.c
@@ -26,6 +26,7 @@
 #include <linux/spi/mc33880.h>
 #include <linux/gpio.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "mc33880"
 
Index: linux/drivers/gpio/mcp23s08.c
===================================================================
--- linux.orig/drivers/gpio/mcp23s08.c
+++ linux/drivers/gpio/mcp23s08.c
@@ -10,6 +10,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/mcp23s08.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <asm/byteorder.h>
 
 /**
Index: linux/drivers/gpio/ml_ioh_gpio.c
===================================================================
--- linux.orig/drivers/gpio/ml_ioh_gpio.c
+++ linux/drivers/gpio/ml_ioh_gpio.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/gpio.h>
+#include <linux/module.h>
 
 #define PCI_VENDOR_ID_ROHM             0x10DB
 
Index: linux/drivers/gpio/pcf857x.c
===================================================================
--- linux.orig/drivers/gpio/pcf857x.c
+++ linux/drivers/gpio/pcf857x.c
@@ -23,6 +23,7 @@
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/i2c/pcf857x.h>
+#include <linux/module.h>
 
 
 static const struct i2c_device_id pcf857x_id[] = {
Index: linux/drivers/gpio/pch_gpio.c
===================================================================
--- linux.orig/drivers/gpio/pch_gpio.c
+++ linux/drivers/gpio/pch_gpio.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/gpio.h>
+#include <linux/module.h>
 
 #define PCH_GPIO_ALL_PINS	0xfff /* Mask for GPIO pins 0 to 11 */
 #define GPIO_NUM_PINS	12	/* Specifies number of GPIO PINS GPIO0-GPIO11 */
Index: linux/drivers/gpu/drm/ttm/ttm_tt.c
===================================================================
--- linux.orig/drivers/gpu/drm/ttm/ttm_tt.c
+++ linux/drivers/gpu/drm/ttm/ttm_tt.c
@@ -30,6 +30,7 @@
 
 #include <linux/sched.h>
 #include <linux/highmem.h>
+#include <linux/module.h>
 #include <linux/pagemap.h>
 #include <linux/file.h>
 #include <linux/swap.h>
Index: linux/drivers/hid/hid-axff.c
===================================================================
--- linux.orig/drivers/hid/hid-axff.c
+++ linux/drivers/hid/hid-axff.c
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/hid.h>
+#include <linux/module.h>
 
 #include "hid-ids.h"
 
Index: linux/drivers/hid/hid-dr.c
===================================================================
--- linux.orig/drivers/hid/hid-dr.c
+++ linux/drivers/hid/hid-dr.c
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/hid.h>
+#include <linux/module.h>
 
 #include "hid-ids.h"
 
Index: linux/drivers/hid/hid-emsff.c
===================================================================
--- linux.orig/drivers/hid/hid-emsff.c
+++ linux/drivers/hid/hid-emsff.c
@@ -24,6 +24,7 @@
 #include <linux/hid.h>
 #include <linux/input.h>
 #include <linux/usb.h>
+#include <linux/module.h>
 
 #include "hid-ids.h"
 #include "usbhid/usbhid.h"
Index: linux/drivers/hid/hid-gaff.c
===================================================================
--- linux.orig/drivers/hid/hid-gaff.c
+++ linux/drivers/hid/hid-gaff.c
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/hid.h>
+#include <linux/module.h>
 #include "hid-ids.h"
 
 #ifdef CONFIG_GREENASIA_FF
Index: linux/drivers/hid/hid-picolcd.c
===================================================================
--- linux.orig/drivers/hid/hid-picolcd.c
+++ linux/drivers/hid/hid-picolcd.c
@@ -33,6 +33,7 @@
 
 #include <linux/seq_file.h>
 #include <linux/debugfs.h>
+#include <linux/module.h>
 
 #include <linux/completion.h>
 #include <linux/uaccess.h>
Index: linux/drivers/hid/hid-roccat-common.c
===================================================================
--- linux.orig/drivers/hid/hid-roccat-common.c
+++ linux/drivers/hid/hid-roccat-common.c
@@ -12,6 +12,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "hid-roccat-common.h"
 
 int roccat_common_receive(struct usb_device *usb_dev, uint usb_command,
Index: linux/drivers/hid/hid-roccat.c
===================================================================
--- linux.orig/drivers/hid/hid-roccat.c
+++ linux/drivers/hid/hid-roccat.c
@@ -27,6 +27,7 @@
 #include <linux/poll.h>
 #include <linux/sched.h>
 #include <linux/hid-roccat.h>
+#include <linux/module.h>
 
 #define ROCCAT_FIRST_MINOR 0
 #define ROCCAT_MAX_DEVICES 8
Index: linux/drivers/hid/hid-sjoy.c
===================================================================
--- linux.orig/drivers/hid/hid-sjoy.c
+++ linux/drivers/hid/hid-sjoy.c
@@ -30,6 +30,7 @@
 #include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/hid.h>
+#include <linux/module.h>
 #include "hid-ids.h"
 
 #ifdef CONFIG_SMARTJOYPLUS_FF
Index: linux/drivers/hid/hid-tmff.c
===================================================================
--- linux.orig/drivers/hid/hid-tmff.c
+++ linux/drivers/hid/hid-tmff.c
@@ -31,6 +31,7 @@
 #include <linux/input.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
+#include <linux/module.h>
 
 #include "hid-ids.h"
 
Index: linux/drivers/hid/hid-zpff.c
===================================================================
--- linux.orig/drivers/hid/hid-zpff.c
+++ linux/drivers/hid/hid-zpff.c
@@ -25,6 +25,7 @@
 #include <linux/input.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
+#include <linux/module.h>
 
 #include "hid-ids.h"
 
Index: linux/drivers/ide/cmd640.c
===================================================================
--- linux.orig/drivers/ide/cmd640.c
+++ linux/drivers/ide/cmd640.c
@@ -102,6 +102,7 @@
 
 #include <linux/types.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/ide.h>
 #include <linux/init.h>
Index: linux/drivers/ide/ide-acpi.c
===================================================================
--- linux.orig/drivers/ide/ide-acpi.c
+++ linux/drivers/ide/ide-acpi.c
@@ -9,6 +9,7 @@
 
 #include <linux/ata.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
Index: linux/drivers/ide/ide-pnp.c
===================================================================
--- linux.orig/drivers/ide/ide-pnp.c
+++ linux/drivers/ide/ide-pnp.c
@@ -16,6 +16,7 @@
 
 #include <linux/init.h>
 #include <linux/pnp.h>
+#include <linux/module.h>
 #include <linux/ide.h>
 
 #define DRV_NAME "ide-pnp"
Index: linux/drivers/ide/tc86c001.c
===================================================================
--- linux.orig/drivers/ide/tc86c001.c
+++ linux/drivers/ide/tc86c001.c
@@ -10,6 +10,7 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
+#include <linux/module.h>
 
 #define DRV_NAME "tc86c001"
 
Index: linux/drivers/idle/intel_idle.c
===================================================================
--- linux.orig/drivers/idle/intel_idle.c
+++ linux/drivers/idle/intel_idle.c
@@ -61,6 +61,7 @@
 #include <linux/sched.h>
 #include <linux/notifier.h>
 #include <linux/cpu.h>
+#include <linux/module.h>
 #include <asm/mwait.h>
 #include <asm/msr.h>
 
Index: linux/drivers/infiniband/hw/ipath/ipath_diag.c
===================================================================
--- linux.orig/drivers/infiniband/hw/ipath/ipath_diag.c
+++ linux/drivers/infiniband/hw/ipath/ipath_diag.c
@@ -45,6 +45,7 @@
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
+#include <linux/module.h>
 #include <asm/uaccess.h>
 
 #include "ipath_kernel.h"
Index: linux/drivers/infiniband/hw/ipath/ipath_file_ops.c
===================================================================
--- linux.orig/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ linux/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -40,6 +40,8 @@
 #include <linux/highmem.h>
 #include <linux/io.h>
 #include <linux/jiffies.h>
+#include <linux/module.h>
+
 #include <asm/pgtable.h>
 
 #include "ipath_kernel.h"
Index: linux/drivers/infiniband/hw/ipath/ipath_sysfs.c
===================================================================
--- linux.orig/drivers/infiniband/hw/ipath/ipath_sysfs.c
+++ linux/drivers/infiniband/hw/ipath/ipath_sysfs.c
@@ -32,6 +32,7 @@
  */
 
 #include <linux/ctype.h>
+#include <linux/stat.h>
 
 #include "ipath_kernel.h"
 #include "ipath_verbs.h"
Index: linux/drivers/infiniband/hw/ipath/ipath_verbs.c
===================================================================
--- linux.orig/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ linux/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -37,6 +37,7 @@
 #include <linux/slab.h>
 #include <linux/utsname.h>
 #include <linux/rculist.h>
+#include <linux/module.h>
 
 #include "ipath_kernel.h"
 #include "ipath_verbs.h"
Index: linux/drivers/infiniband/hw/qib/qib_diag.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_diag.c
+++ linux/drivers/infiniband/hw/qib/qib_diag.c
@@ -48,6 +48,7 @@
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
 #include <linux/uaccess.h>
+#include <linux/module.h>
 
 #include "qib.h"
 #include "qib_common.h"
Index: linux/drivers/infiniband/hw/qib/qib_file_ops.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_file_ops.c
+++ linux/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -43,6 +43,7 @@
 #include <linux/jiffies.h>
 #include <asm/pgtable.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 
 #include "qib.h"
 #include "qib_common.h"
Index: linux/drivers/infiniband/hw/qib/qib_iba7220.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_iba7220.c
+++ linux/drivers/infiniband/hw/qib/qib_iba7220.c
@@ -38,6 +38,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <rdma/ib_verbs.h>
Index: linux/drivers/infiniband/hw/qib/qib_iba7322.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_iba7322.c
+++ linux/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -37,6 +37,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/jiffies.h>
Index: linux/drivers/infiniband/hw/qib/qib_pcie.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_pcie.c
+++ linux/drivers/infiniband/hw/qib/qib_pcie.c
@@ -32,6 +32,7 @@
 
 #include <linux/pci.h>
 #include <linux/io.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/vmalloc.h>
 #include <linux/aer.h>
Index: linux/drivers/infiniband/hw/qib/qib_sd7220.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_sd7220.c
+++ linux/drivers/infiniband/hw/qib/qib_sd7220.c
@@ -38,6 +38,7 @@
 
 #include <linux/pci.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/firmware.h>
 
 #include "qib.h"
Index: linux/drivers/infiniband/hw/qib/qib_verbs.c
===================================================================
--- linux.orig/drivers/infiniband/hw/qib/qib_verbs.c
+++ linux/drivers/infiniband/hw/qib/qib_verbs.c
@@ -38,6 +38,7 @@
 #include <linux/utsname.h>
 #include <linux/rculist.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 
 #include "qib.h"
 #include "qib_common.h"
Index: linux/drivers/input/joystick/as5011.c
===================================================================
--- linux.orig/drivers/input/joystick/as5011.c
+++ linux/drivers/input/joystick/as5011.c
@@ -30,6 +30,7 @@
 #include <linux/delay.h>
 #include <linux/input/as5011.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_DESC "Driver for Austria Microsystems AS5011 joystick"
 #define MODULE_DEVICE_ALIAS "as5011"
Index: linux/drivers/input/misc/ad714x.c
===================================================================
--- linux.orig/drivers/input/misc/ad714x.c
+++ linux/drivers/input/misc/ad714x.c
@@ -12,6 +12,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/input/ad714x.h>
+#include <linux/module.h>
 #include "ad714x.h"
 
 #define AD714X_PWR_CTRL           0x0
Index: linux/drivers/input/misc/adxl34x.c
===================================================================
--- linux.orig/drivers/input/misc/adxl34x.c
+++ linux/drivers/input/misc/adxl34x.c
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <linux/input/adxl34x.h>
+#include <linux/module.h>
 
 #include "adxl34x.h"
 
Index: linux/drivers/input/misc/ati_remote2.c
===================================================================
--- linux.orig/drivers/input/misc/ati_remote2.c
+++ linux/drivers/input/misc/ati_remote2.c
@@ -11,6 +11,7 @@
 
 #include <linux/usb/input.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_DESC    "ATI/Philips USB RF remote driver"
 #define DRIVER_VERSION "0.3"
Index: linux/drivers/input/misc/cma3000_d0x.c
===================================================================
--- linux.orig/drivers/input/misc/cma3000_d0x.c
+++ linux/drivers/input/misc/cma3000_d0x.c
@@ -23,6 +23,7 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/input/cma3000.h>
+#include <linux/module.h>
 
 #include "cma3000_d0x.h"
 
Index: linux/drivers/input/touchscreen/ad7877.c
===================================================================
--- linux.orig/drivers/input/touchscreen/ad7877.c
+++ linux/drivers/input/touchscreen/ad7877.c
@@ -45,6 +45,7 @@
 #include <linux/slab.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ad7877.h>
+#include <linux/module.h>
 #include <asm/irq.h>
 
 #define	TS_PEN_UP_TIMEOUT	msecs_to_jiffies(100)
Index: linux/drivers/input/touchscreen/ad7879-spi.c
===================================================================
--- linux.orig/drivers/input/touchscreen/ad7879-spi.c
+++ linux/drivers/input/touchscreen/ad7879-spi.c
@@ -9,6 +9,7 @@
 #include <linux/input.h>	/* BUS_SPI */
 #include <linux/pm.h>
 #include <linux/spi/spi.h>
+#include <linux/module.h>
 
 #include "ad7879.h"
 
Index: linux/drivers/input/touchscreen/ad7879.c
===================================================================
--- linux.orig/drivers/input/touchscreen/ad7879.c
+++ linux/drivers/input/touchscreen/ad7879.c
@@ -31,6 +31,7 @@
 #include <linux/spi/spi.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
+#include <linux/module.h>
 
 #include <linux/spi/ad7879.h>
 #include "ad7879.h"
Index: linux/drivers/input/touchscreen/ads7846.c
===================================================================
--- linux.orig/drivers/input/touchscreen/ads7846.c
+++ linux/drivers/input/touchscreen/ads7846.c
@@ -31,6 +31,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/regulator/consumer.h>
+#include <linux/module.h>
 #include <asm/irq.h>
 
 /*
Index: linux/drivers/input/touchscreen/bu21013_ts.c
===================================================================
--- linux.orig/drivers/input/touchscreen/bu21013_ts.c
+++ linux/drivers/input/touchscreen/bu21013_ts.c
@@ -13,6 +13,7 @@
 #include <linux/input/bu21013.h>
 #include <linux/slab.h>
 #include <linux/regulator/consumer.h>
+#include <linux/module.h>
 
 #define PEN_DOWN_INTR	0
 #define MAX_FINGERS	2
Index: linux/drivers/isdn/capi/kcapi_proc.c
===================================================================
--- linux.orig/drivers/isdn/capi/kcapi_proc.c
+++ linux/drivers/isdn/capi/kcapi_proc.c
@@ -14,6 +14,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/module.h>
 
 static char *state2str(unsigned short state)
 {
Index: linux/drivers/leds/dell-led.c
===================================================================
--- linux.orig/drivers/leds/dell-led.c
+++ linux/drivers/leds/dell-led.c
@@ -13,6 +13,7 @@
 
 #include <linux/acpi.h>
 #include <linux/leds.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 
 MODULE_AUTHOR("Louis Davis/Jim Dailey");
Index: linux/drivers/leds/leds-88pm860x.c
===================================================================
--- linux.orig/drivers/leds/leds-88pm860x.c
+++ linux/drivers/leds/leds-88pm860x.c
@@ -19,6 +19,7 @@
 #include <linux/workqueue.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/88pm860x.h>
+#include <linux/module.h>
 
 #define LED_PWM_SHIFT		(3)
 #define LED_PWM_MASK		(0x1F)
Index: linux/drivers/leds/leds-gpio.c
===================================================================
--- linux.orig/drivers/leds/leds-gpio.c
+++ linux/drivers/leds/leds-gpio.c
@@ -18,6 +18,7 @@
 #include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
+#include <linux/module.h>
 
 #include <asm/gpio.h>
 
Index: linux/drivers/leds/leds-lm3530.c
===================================================================
--- linux.orig/drivers/leds/leds-lm3530.c
+++ linux/drivers/leds/leds-lm3530.c
@@ -17,6 +17,7 @@
 #include <linux/input.h>
 #include <linux/led-lm3530.h>
 #include <linux/types.h>
+#include <linux/module.h>
 
 #define LM3530_LED_DEV "lcd-backlight"
 #define LM3530_NAME "lm3530-led"
Index: linux/drivers/leds/leds-lt3593.c
===================================================================
--- linux.orig/drivers/leds/leds-lt3593.c
+++ linux/drivers/leds/leds-lt3593.c
@@ -18,6 +18,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/workqueue.h>
Index: linux/drivers/leds/leds-net48xx.c
===================================================================
--- linux.orig/drivers/leds/leds-net48xx.c
+++ linux/drivers/leds/leds-net48xx.c
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/err.h>
Index: linux/drivers/leds/leds-net5501.c
===================================================================
--- linux.orig/drivers/leds/leds-net5501.c
+++ linux/drivers/leds/leds-net5501.c
@@ -10,6 +10,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/string.h>
Index: linux/drivers/leds/leds-wm831x-status.c
===================================================================
--- linux.orig/drivers/leds/leds-wm831x-status.c
+++ linux/drivers/leds/leds-wm831x-status.c
@@ -11,6 +11,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/leds.h>
Index: linux/drivers/leds/leds-wm8350.c
===================================================================
--- linux.orig/drivers/leds/leds-wm8350.c
+++ linux/drivers/leds/leds-wm8350.c
@@ -11,6 +11,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/err.h>
Index: linux/drivers/leds/leds-wrap.c
===================================================================
--- linux.orig/drivers/leds/leds-wrap.c
+++ linux/drivers/leds/leds-wrap.c
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/err.h>
Index: linux/drivers/lguest/lguest_device.c
===================================================================
--- linux.orig/drivers/lguest/lguest_device.c
+++ linux/drivers/lguest/lguest_device.c
@@ -9,6 +9,7 @@
 :*/
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/module.h>
 #include <linux/lguest_launcher.h>
 #include <linux/virtio.h>
 #include <linux/virtio_config.h>
Index: linux/drivers/md/dm-log-userspace-base.c
===================================================================
--- linux.orig/drivers/md/dm-log-userspace-base.c
+++ linux/drivers/md/dm-log-userspace-base.c
@@ -9,6 +9,7 @@
 #include <linux/dm-dirty-log.h>
 #include <linux/device-mapper.h>
 #include <linux/dm-log-userspace.h>
+#include <linux/module.h>
 
 #include "dm-log-userspace-transfer.h"
 
Index: linux/drivers/md/dm-raid.c
===================================================================
--- linux.orig/drivers/md/dm-raid.c
+++ linux/drivers/md/dm-raid.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include "md.h"
 #include "raid5.h"
Index: linux/drivers/md/dm-service-time.c
===================================================================
--- linux.orig/drivers/md/dm-service-time.c
+++ linux/drivers/md/dm-service-time.c
@@ -12,6 +12,7 @@
 #include "dm-path-selector.h"
 
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DM_MSG_PREFIX	"multipath service-time"
 #define ST_MIN_IO	1
Index: linux/drivers/md/dm-uevent.c
===================================================================
--- linux.orig/drivers/md/dm-uevent.c
+++ linux/drivers/md/dm-uevent.c
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/kobject.h>
 #include <linux/dm-ioctl.h>
+#include <linux/module.h>
 
 #include "dm.h"
 #include "dm-uevent.h"
Index: linux/drivers/media/common/saa7146_core.c
===================================================================
--- linux.orig/drivers/media/common/saa7146_core.c
+++ linux/drivers/media/common/saa7146_core.c
@@ -19,6 +19,7 @@
 */
 
 #include <media/saa7146.h>
+#include <linux/module.h>
 
 LIST_HEAD(saa7146_devices);
 DEFINE_MUTEX(saa7146_devices_lock);
Index: linux/drivers/media/common/saa7146_fops.c
===================================================================
--- linux.orig/drivers/media/common/saa7146_fops.c
+++ linux/drivers/media/common/saa7146_fops.c
@@ -1,4 +1,5 @@
 #include <media/saa7146_vv.h>
+#include <linux/module.h>
 
 /****************************************************************************/
 /* resource management functions, shamelessly stolen from saa7134 driver */
Index: linux/drivers/media/common/saa7146_hlp.c
===================================================================
--- linux.orig/drivers/media/common/saa7146_hlp.c
+++ linux/drivers/media/common/saa7146_hlp.c
@@ -1,4 +1,5 @@
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <media/saa7146_vv.h>
 
 static void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* clip_format)
Index: linux/drivers/media/common/saa7146_video.c
===================================================================
--- linux.orig/drivers/media/common/saa7146_video.c
+++ linux/drivers/media/common/saa7146_video.c
@@ -1,4 +1,5 @@
 #include <media/saa7146_vv.h>
+#include <linux/module.h>
 #include <media/v4l2-chip-ident.h>
 
 static int max_memory = 32;
Index: linux/drivers/media/common/tuners/tuner-types.c
===================================================================
--- linux.orig/drivers/media/common/tuners/tuner-types.c
+++ linux/drivers/media/common/tuners/tuner-types.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <media/tuner.h>
 #include <media/tuner-types.h>
 
Index: linux/drivers/media/dvb/frontends/dibx000_common.c
===================================================================
--- linux.orig/drivers/media/dvb/frontends/dibx000_common.c
+++ linux/drivers/media/dvb/frontends/dibx000_common.c
@@ -1,4 +1,5 @@
 #include <linux/i2c.h>
+#include <linux/module.h>
 
 #include "dibx000_common.h"
 
Index: linux/drivers/media/dvb/siano/sms-cards.c
===================================================================
--- linux.orig/drivers/media/dvb/siano/sms-cards.c
+++ linux/drivers/media/dvb/siano/sms-cards.c
@@ -17,6 +17,7 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <linux/module.h>
 #include "sms-cards.h"
 #include "smsir.h"
 
Index: linux/drivers/media/dvb/siano/smsendian.c
===================================================================
--- linux.orig/drivers/media/dvb/siano/smsendian.c
+++ linux/drivers/media/dvb/siano/smsendian.c
@@ -19,6 +19,7 @@
 
  ****************************************************************/
 
+#include <linux/module.h>
 #include <asm/byteorder.h>
 
 #include "smsendian.h"
Index: linux/drivers/media/dvb/siano/smssdio.c
===================================================================
--- linux.orig/drivers/media/dvb/siano/smssdio.c
+++ linux/drivers/media/dvb/siano/smssdio.c
@@ -39,6 +39,7 @@
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/sdio_ids.h>
+#include <linux/module.h>
 
 #include "smscoreapi.h"
 #include "sms-cards.h"
Index: linux/drivers/media/dvb/siano/smsusb.c
===================================================================
--- linux.orig/drivers/media/dvb/siano/smsusb.c
+++ linux/drivers/media/dvb/siano/smsusb.c
@@ -24,6 +24,7 @@ along with this program.  If not, see <h
 #include <linux/usb.h>
 #include <linux/firmware.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include "smscoreapi.h"
 #include "sms-cards.h"
Index: linux/drivers/media/media-device.c
===================================================================
--- linux.orig/drivers/media/media-device.c
+++ linux/drivers/media/media-device.c
@@ -23,6 +23,7 @@
 #include <linux/types.h>
 #include <linux/ioctl.h>
 #include <linux/media.h>
+#include <linux/module.h>
 
 #include <media/media-device.h>
 #include <media/media-devnode.h>
Index: linux/drivers/media/radio/radio-timb.c
===================================================================
--- linux.orig/drivers/media/radio/radio-timb.c
+++ linux/drivers/media/radio/radio-timb.c
@@ -17,6 +17,7 @@
  */
 
 #include <linux/version.h>
+#include <linux/module.h>
 #include <linux/io.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-device.h>
Index: linux/drivers/media/radio/radio-wl1273.c
===================================================================
--- linux.orig/drivers/media/radio/radio-wl1273.c
+++ linux/drivers/media/radio/radio-wl1273.c
@@ -23,6 +23,7 @@
 #include <linux/interrupt.h>
 #include <linux/mfd/wl1273-core.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
Index: linux/drivers/media/radio/si4713-i2c.c
===================================================================
--- linux.orig/drivers/media/radio/si4713-i2c.c
+++ linux/drivers/media/radio/si4713-i2c.c
@@ -29,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
+#include <linux/module.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-common.h>
Index: linux/drivers/media/radio/wl128x/fmdrv_v4l2.c
===================================================================
--- linux.orig/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ linux/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -28,6 +28,7 @@
  *
  */
 
+#include <linux/module.h>
 #include "fmdrv.h"
 #include "fmdrv_v4l2.h"
 #include "fmdrv_common.h"
Index: linux/drivers/media/rc/ir-jvc-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-jvc-decoder.c
+++ linux/drivers/media/rc/ir-jvc-decoder.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/bitrev.h>
+#include <linux/module.h>
 #include "rc-core-priv.h"
 
 #define JVC_NBITS		16		/* dev(8) + func(8) */
Index: linux/drivers/media/rc/ir-lirc-codec.c
===================================================================
--- linux.orig/drivers/media/rc/ir-lirc-codec.c
+++ linux/drivers/media/rc/ir-lirc-codec.c
@@ -14,6 +14,7 @@
 
 #include <linux/sched.h>
 #include <linux/wait.h>
+#include <linux/module.h>
 #include <media/lirc.h>
 #include <media/lirc_dev.h>
 #include <media/rc-core.h>
Index: linux/drivers/media/rc/ir-nec-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-nec-decoder.c
+++ linux/drivers/media/rc/ir-nec-decoder.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/bitrev.h>
+#include <linux/module.h>
 #include "rc-core-priv.h"
 
 #define NEC_NBITS		32
Index: linux/drivers/media/rc/ir-raw.c
===================================================================
--- linux.orig/drivers/media/rc/ir-raw.c
+++ linux/drivers/media/rc/ir-raw.c
@@ -16,6 +16,7 @@
 #include <linux/mutex.h>
 #include <linux/sched.h>
 #include <linux/freezer.h>
+#include <linux/module.h>
 #include "rc-core-priv.h"
 
 /* Define the max number of pulse/space transitions to buffer */
Index: linux/drivers/media/rc/ir-rc5-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-rc5-decoder.c
+++ linux/drivers/media/rc/ir-rc5-decoder.c
@@ -21,6 +21,7 @@
  */
 
 #include "rc-core-priv.h"
+#include <linux/module.h>
 
 #define RC5_NBITS		14
 #define RC5X_NBITS		20
Index: linux/drivers/media/rc/ir-rc5-sz-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-rc5-sz-decoder.c
+++ linux/drivers/media/rc/ir-rc5-sz-decoder.c
@@ -21,6 +21,7 @@
  */
 
 #include "rc-core-priv.h"
+#include <linux/module.h>
 
 #define RC5_SZ_NBITS		15
 #define RC5_UNIT		888888 /* ns */
Index: linux/drivers/media/rc/ir-rc6-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-rc6-decoder.c
+++ linux/drivers/media/rc/ir-rc6-decoder.c
@@ -13,6 +13,7 @@
  */
 
 #include "rc-core-priv.h"
+#include <linux/module.h>
 
 /*
  * This decoder currently supports:
Index: linux/drivers/media/rc/ir-sony-decoder.c
===================================================================
--- linux.orig/drivers/media/rc/ir-sony-decoder.c
+++ linux/drivers/media/rc/ir-sony-decoder.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/bitrev.h>
+#include <linux/module.h>
 #include "rc-core-priv.h"
 
 #define SONY_UNIT		600000 /* ns */
Index: linux/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
+++ linux/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* ADS Tech Instant TV DVB-T PCI Remote */
 
Index: linux/drivers/media/rc/keymaps/rc-alink-dtu-m.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-alink-dtu-m.c
+++ linux/drivers/media/rc/keymaps/rc-alink-dtu-m.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* A-Link DTU(m) slim remote, 6 rows, 3 columns. */
 static struct rc_map_table alink_dtu_m[] = {
Index: linux/drivers/media/rc/keymaps/rc-anysee.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-anysee.c
+++ linux/drivers/media/rc/keymaps/rc-anysee.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table anysee[] = {
 	{ 0x0800, KEY_0 },
Index: linux/drivers/media/rc/keymaps/rc-apac-viewcomp.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-apac-viewcomp.c
+++ linux/drivers/media/rc/keymaps/rc-apac-viewcomp.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Attila Kondoros <attila.kondoros@chello.hu> */
 
Index: linux/drivers/media/rc/keymaps/rc-asus-pc39.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-asus-pc39.c
+++ linux/drivers/media/rc/keymaps/rc-asus-pc39.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Marc Fargas <telenieko@telenieko.com>
Index: linux/drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.c
+++ linux/drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* ATI TV Wonder HD 600 USB
    Devin Heitmueller <devin.heitmueller@gmail.com>
Index: linux/drivers/media/rc/keymaps/rc-avermedia-a16d.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-a16d.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-a16d.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table avermedia_a16d[] = {
 	{ 0x20, KEY_LIST},
Index: linux/drivers/media/rc/keymaps/rc-avermedia-cardbus.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-cardbus.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-cardbus.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Oldrich Jedlicka <oldium.pro@seznam.cz> */
 
Index: linux/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Matt Jesson <dvb@jesson.eclipse.co.uk */
 
Index: linux/drivers/media/rc/keymaps/rc-avermedia-m135a.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-m135a.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-m135a.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Avermedia M135A with RM-JX and RM-K6 remote controls
Index: linux/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
@@ -9,6 +9,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Avermedia M733A with IR model RM-K6
Index: linux/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Initial keytable is from Jose Alberto Reguero <jareguero@telefonica.net>
    and Felipe Morales Moreno <felipe.morales.moreno@gmail.com> */
Index: linux/drivers/media/rc/keymaps/rc-avermedia.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avermedia.c
+++ linux/drivers/media/rc/keymaps/rc-avermedia.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Alex Hermann <gaaf@gmx.net> */
 
Index: linux/drivers/media/rc/keymaps/rc-avertv-303.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-avertv-303.c
+++ linux/drivers/media/rc/keymaps/rc-avertv-303.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* AVERTV STUDIO 303 Remote */
 
Index: linux/drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c
+++ linux/drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table azurewave_ad_tu700[] = {
 	{ 0x0000, KEY_TAB },             /* Tab */
Index: linux/drivers/media/rc/keymaps/rc-behold-columbus.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-behold-columbus.c
+++ linux/drivers/media/rc/keymaps/rc-behold-columbus.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Beholder Intl. Ltd. 2008
  * Dmitry Belimov d.belimov@google.com
Index: linux/drivers/media/rc/keymaps/rc-behold.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-behold.c
+++ linux/drivers/media/rc/keymaps/rc-behold.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Igor Kuznetsov <igk72@ya.ru>
Index: linux/drivers/media/rc/keymaps/rc-budget-ci-old.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-budget-ci-old.c
+++ linux/drivers/media/rc/keymaps/rc-budget-ci-old.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * From reading the following remotes:
Index: linux/drivers/media/rc/keymaps/rc-cinergy-1400.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-cinergy-1400.c
+++ linux/drivers/media/rc/keymaps/rc-cinergy-1400.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Cinergy 1400 DVB-T */
 
Index: linux/drivers/media/rc/keymaps/rc-cinergy.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-cinergy.c
+++ linux/drivers/media/rc/keymaps/rc-cinergy.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table cinergy[] = {
 	{ 0x00, KEY_0 },
Index: linux/drivers/media/rc/keymaps/rc-dib0700-nec.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-dib0700-nec.c
+++ linux/drivers/media/rc/keymaps/rc-dib0700-nec.c
@@ -16,6 +16,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table dib0700_nec_table[] = {
 	/* Key codes for the Pixelview SBTVD remote */
Index: linux/drivers/media/rc/keymaps/rc-em-terratec.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-em-terratec.c
+++ linux/drivers/media/rc/keymaps/rc-em-terratec.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table em_terratec[] = {
 	{ 0x01, KEY_CHANNEL },
Index: linux/drivers/media/rc/keymaps/rc-encore-enltv-fm53.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-encore-enltv-fm53.c
+++ linux/drivers/media/rc/keymaps/rc-encore-enltv-fm53.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Encore ENLTV-FM v5.3
    Mauro Carvalho Chehab <mchehab@infradead.org>
Index: linux/drivers/media/rc/keymaps/rc-encore-enltv.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-encore-enltv.c
+++ linux/drivers/media/rc/keymaps/rc-encore-enltv.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Encore ENLTV-FM  - black plastic, white front cover with white glowing buttons
     Juan Pablo Sormani <sorman@gmail.com> */
Index: linux/drivers/media/rc/keymaps/rc-encore-enltv2.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-encore-enltv2.c
+++ linux/drivers/media/rc/keymaps/rc-encore-enltv2.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Encore ENLTV2-FM  - silver plastic - "Wand Media" written at the botton
     Mauro Carvalho Chehab <mchehab@infradead.org> */
Index: linux/drivers/media/rc/keymaps/rc-evga-indtube.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-evga-indtube.c
+++ linux/drivers/media/rc/keymaps/rc-evga-indtube.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* EVGA inDtube
    Devin Heitmueller <devin.heitmueller@gmail.com>
Index: linux/drivers/media/rc/keymaps/rc-eztv.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-eztv.c
+++ linux/drivers/media/rc/keymaps/rc-eztv.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Alfons Geser <a.geser@cox.net>
  * updates from Job D. R. Borges <jobdrb@ig.com.br> */
Index: linux/drivers/media/rc/keymaps/rc-flydvb.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-flydvb.c
+++ linux/drivers/media/rc/keymaps/rc-flydvb.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table flydvb[] = {
 	{ 0x01, KEY_ZOOM },		/* Full Screen */
Index: linux/drivers/media/rc/keymaps/rc-flyvideo.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-flyvideo.c
+++ linux/drivers/media/rc/keymaps/rc-flyvideo.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table flyvideo[] = {
 	{ 0x0f, KEY_0 },
Index: linux/drivers/media/rc/keymaps/rc-fusionhdtv-mce.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-fusionhdtv-mce.c
+++ linux/drivers/media/rc/keymaps/rc-fusionhdtv-mce.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* DViCO FUSION HDTV MCE remote */
 
Index: linux/drivers/media/rc/keymaps/rc-gadmei-rm008z.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-gadmei-rm008z.c
+++ linux/drivers/media/rc/keymaps/rc-gadmei-rm008z.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* GADMEI UTV330+ RM008Z remote
    Shine Liu <shinel@foxmail.com>
Index: linux/drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c
+++ linux/drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Remote control for the Genius TVGO A11MCE
Index: linux/drivers/media/rc/keymaps/rc-gotview7135.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-gotview7135.c
+++ linux/drivers/media/rc/keymaps/rc-gotview7135.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Mike Baikov <mike@baikov.com> */
 
Index: linux/drivers/media/rc/keymaps/rc-hauppauge.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-hauppauge.c
+++ linux/drivers/media/rc/keymaps/rc-hauppauge.c
@@ -17,6 +17,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Hauppauge:the newer, gray remotes (seems there are multiple
Index: linux/drivers/media/rc/keymaps/rc-imon-mce.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-imon-mce.c
+++ linux/drivers/media/rc/keymaps/rc-imon-mce.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* mce-mode imon mce remote key table */
 static struct rc_map_table imon_mce[] = {
Index: linux/drivers/media/rc/keymaps/rc-imon-pad.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-imon-pad.c
+++ linux/drivers/media/rc/keymaps/rc-imon-pad.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * standard imon remote key table, which isn't really entirely
Index: linux/drivers/media/rc/keymaps/rc-iodata-bctv7e.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-iodata-bctv7e.c
+++ linux/drivers/media/rc/keymaps/rc-iodata-bctv7e.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* IO-DATA BCTV7E Remote */
 
Index: linux/drivers/media/rc/keymaps/rc-kaiomy.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-kaiomy.c
+++ linux/drivers/media/rc/keymaps/rc-kaiomy.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Kaiomy TVnPC U2
    Mauro Carvalho Chehab <mchehab@infradead.org>
Index: linux/drivers/media/rc/keymaps/rc-kworld-315u.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-kworld-315u.c
+++ linux/drivers/media/rc/keymaps/rc-kworld-315u.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Kworld 315U
  */
Index: linux/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
+++ linux/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Kworld Plus TV Analog Lite PCI IR
    Mauro Carvalho Chehab <mchehab@infradead.org>
Index: linux/drivers/media/rc/keymaps/rc-leadtek-y04g0051.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-leadtek-y04g0051.c
+++ linux/drivers/media/rc/keymaps/rc-leadtek-y04g0051.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table leadtek_y04g0051[] = {
 	{ 0x0300, KEY_POWER2 },
Index: linux/drivers/media/rc/keymaps/rc-lirc.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-lirc.c
+++ linux/drivers/media/rc/keymaps/rc-lirc.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-core.h>
+#include <linux/module.h>
 
 static struct rc_map_table lirc[] = {
 	{ },
Index: linux/drivers/media/rc/keymaps/rc-lme2510.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-lme2510.c
+++ linux/drivers/media/rc/keymaps/rc-lme2510.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 
 static struct rc_map_table lme2510_rc[] = {
Index: linux/drivers/media/rc/keymaps/rc-manli.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-manli.c
+++ linux/drivers/media/rc/keymaps/rc-manli.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Michael Tokarev <mjt@tls.msk.ru>
    keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
Index: linux/drivers/media/rc/keymaps/rc-msi-digivox-ii.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-msi-digivox-ii.c
+++ linux/drivers/media/rc/keymaps/rc-msi-digivox-ii.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table msi_digivox_ii[] = {
 	{ 0x0002, KEY_2 },
Index: linux/drivers/media/rc/keymaps/rc-msi-digivox-iii.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-msi-digivox-iii.c
+++ linux/drivers/media/rc/keymaps/rc-msi-digivox-iii.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* MSI DIGIVOX mini III */
 /* Uses NEC extended 0x61d6. */
Index: linux/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
+++ linux/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
   Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
Index: linux/drivers/media/rc/keymaps/rc-msi-tvanywhere.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-msi-tvanywhere.c
+++ linux/drivers/media/rc/keymaps/rc-msi-tvanywhere.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* MSI TV@nywhere MASTER remote */
 
Index: linux/drivers/media/rc/keymaps/rc-nebula.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-nebula.c
+++ linux/drivers/media/rc/keymaps/rc-nebula.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table nebula[] = {
 	{ 0x00, KEY_0 },
Index: linux/drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.c
+++ linux/drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Terratec Cinergy Hybrid T USB XS FM
    Mauro Carvalho Chehab <mchehab@redhat.com>
Index: linux/drivers/media/rc/keymaps/rc-norwood.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-norwood.c
+++ linux/drivers/media/rc/keymaps/rc-norwood.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Norwood Micro (non-Pro) TV Tuner
    By Peter Naulls <peter@chocky.org>
Index: linux/drivers/media/rc/keymaps/rc-npgtech.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-npgtech.c
+++ linux/drivers/media/rc/keymaps/rc-npgtech.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table npgtech[] = {
 	{ 0x1d, KEY_SWITCHVIDEOMODE },	/* switch inputs */
Index: linux/drivers/media/rc/keymaps/rc-pctv-sedna.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pctv-sedna.c
+++ linux/drivers/media/rc/keymaps/rc-pctv-sedna.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Mapping for the 28 key remote control as seen at
    http://www.sednacomputer.com/photo/cardbus-tv.jpg
Index: linux/drivers/media/rc/keymaps/rc-pinnacle-color.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pinnacle-color.c
+++ linux/drivers/media/rc/keymaps/rc-pinnacle-color.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table pinnacle_color[] = {
 	{ 0x59, KEY_MUTE },
Index: linux/drivers/media/rc/keymaps/rc-pinnacle-grey.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pinnacle-grey.c
+++ linux/drivers/media/rc/keymaps/rc-pinnacle-grey.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table pinnacle_grey[] = {
 	{ 0x3a, KEY_0 },
Index: linux/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c
+++ linux/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Pinnacle PCTV HD 800i mini remote */
 
Index: linux/drivers/media/rc/keymaps/rc-pixelview-002t.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pixelview-002t.c
+++ linux/drivers/media/rc/keymaps/rc-pixelview-002t.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Keytable for 002-T IR remote provided together with Pixelview
Index: linux/drivers/media/rc/keymaps/rc-pixelview-mk12.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pixelview-mk12.c
+++ linux/drivers/media/rc/keymaps/rc-pixelview-mk12.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Keytable for MK-F12 IR remote provided together with Pixelview
Index: linux/drivers/media/rc/keymaps/rc-pixelview-new.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pixelview-new.c
+++ linux/drivers/media/rc/keymaps/rc-pixelview-new.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
    Mauro Carvalho Chehab <mchehab@infradead.org>
Index: linux/drivers/media/rc/keymaps/rc-pixelview.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pixelview.c
+++ linux/drivers/media/rc/keymaps/rc-pixelview.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table pixelview[] = {
 
Index: linux/drivers/media/rc/keymaps/rc-powercolor-real-angel.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-powercolor-real-angel.c
+++ linux/drivers/media/rc/keymaps/rc-powercolor-real-angel.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Remote control for Powercolor Real Angel 330
Index: linux/drivers/media/rc/keymaps/rc-proteus-2309.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-proteus-2309.c
+++ linux/drivers/media/rc/keymaps/rc-proteus-2309.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Michal Majchrowicz <mmajchrowicz@gmail.com> */
 
Index: linux/drivers/media/rc/keymaps/rc-purpletv.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-purpletv.c
+++ linux/drivers/media/rc/keymaps/rc-purpletv.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table purpletv[] = {
 	{ 0x03, KEY_POWER },
Index: linux/drivers/media/rc/keymaps/rc-pv951.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-pv951.c
+++ linux/drivers/media/rc/keymaps/rc-pv951.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Mark Phalan <phalanm@o2.ie> */
 
Index: linux/drivers/media/rc/keymaps/rc-rc6-mce.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-rc6-mce.c
+++ linux/drivers/media/rc/keymaps/rc-rc6-mce.c
@@ -13,6 +13,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table rc6_mce[] = {
 
Index: linux/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
+++ linux/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Zogis Real Audio 220 - 32 keys IR */
 
Index: linux/drivers/media/rc/keymaps/rc-streamzap.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-streamzap.c
+++ linux/drivers/media/rc/keymaps/rc-streamzap.c
@@ -10,6 +10,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table streamzap[] = {
 /*
Index: linux/drivers/media/rc/keymaps/rc-tbs-nec.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-tbs-nec.c
+++ linux/drivers/media/rc/keymaps/rc-tbs-nec.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table tbs_nec[] = {
 	{ 0x84, KEY_POWER2},		/* power */
Index: linux/drivers/media/rc/keymaps/rc-technisat-usb2.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-technisat-usb2.c
+++ linux/drivers/media/rc/keymaps/rc-technisat-usb2.c
@@ -30,6 +30,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table technisat_usb2[] = {
 	{0x0a0c, KEY_POWER},
Index: linux/drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c
+++ linux/drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Terratec Cinergy Hybrid T USB XS
    Devin Heitmueller <dheitmueller@linuxtv.org>
Index: linux/drivers/media/rc/keymaps/rc-terratec-slim-2.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-terratec-slim-2.c
+++ linux/drivers/media/rc/keymaps/rc-terratec-slim-2.c
@@ -20,6 +20,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * TerraTec slim remote, 6 rows, 3 columns.
Index: linux/drivers/media/rc/keymaps/rc-terratec-slim.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-terratec-slim.c
+++ linux/drivers/media/rc/keymaps/rc-terratec-slim.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* TerraTec slim remote, 7 rows, 4 columns. */
 /* Uses NEC extended 0x02bd. */
Index: linux/drivers/media/rc/keymaps/rc-tevii-nec.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-tevii-nec.c
+++ linux/drivers/media/rc/keymaps/rc-tevii-nec.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table tevii_nec[] = {
 	{ 0x0a, KEY_POWER2},
Index: linux/drivers/media/rc/keymaps/rc-tivo.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-tivo.c
+++ linux/drivers/media/rc/keymaps/rc-tivo.c
@@ -9,6 +9,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /*
  * Initial mapping is for the TiVo remote included in the Nero LiquidTV bundle,
Index: linux/drivers/media/rc/keymaps/rc-total-media-in-hand.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-total-media-in-hand.c
+++ linux/drivers/media/rc/keymaps/rc-total-media-in-hand.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Uses NEC extended 0x02bd */
 static struct rc_map_table total_media_in_hand[] = {
Index: linux/drivers/media/rc/keymaps/rc-trekstor.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-trekstor.c
+++ linux/drivers/media/rc/keymaps/rc-trekstor.c
@@ -19,6 +19,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* TrekStor DVB-T USB Stick remote controller. */
 /* Imported from af9015.h.
Index: linux/drivers/media/rc/keymaps/rc-tt-1500.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-tt-1500.c
+++ linux/drivers/media/rc/keymaps/rc-tt-1500.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* for the Technotrend 1500 bundled remotes (grey and black): */
 
Index: linux/drivers/media/rc/keymaps/rc-twinhan1027.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-twinhan1027.c
+++ linux/drivers/media/rc/keymaps/rc-twinhan1027.c
@@ -1,4 +1,5 @@
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table twinhan_vp1027[] = {
 	{ 0x16, KEY_POWER2 },
Index: linux/drivers/media/rc/keymaps/rc-videomate-m1f.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-videomate-m1f.c
+++ linux/drivers/media/rc/keymaps/rc-videomate-m1f.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table videomate_m1f[] = {
 	{ 0x01, KEY_POWER },
Index: linux/drivers/media/rc/keymaps/rc-videomate-s350.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-videomate-s350.c
+++ linux/drivers/media/rc/keymaps/rc-videomate-s350.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table videomate_s350[] = {
 	{ 0x00, KEY_TV},
Index: linux/drivers/media/rc/keymaps/rc-videomate-tv-pvr.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-videomate-tv-pvr.c
+++ linux/drivers/media/rc/keymaps/rc-videomate-tv-pvr.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 static struct rc_map_table videomate_tv_pvr[] = {
 	{ 0x14, KEY_MUTE },
Index: linux/drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c
+++ linux/drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Leadtek Winfast TV USB II Deluxe remote
    Magnus Alm <magnus.alm@gmail.com>
Index: linux/drivers/media/rc/keymaps/rc-winfast.c
===================================================================
--- linux.orig/drivers/media/rc/keymaps/rc-winfast.c
+++ linux/drivers/media/rc/keymaps/rc-winfast.c
@@ -11,6 +11,7 @@
  */
 
 #include <media/rc-map.h>
+#include <linux/module.h>
 
 /* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
 
Index: linux/drivers/media/rc/rc-main.c
===================================================================
--- linux.orig/drivers/media/rc/rc-main.c
+++ linux/drivers/media/rc/rc-main.c
@@ -18,6 +18,7 @@
 #include <linux/input.h>
 #include <linux/slab.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include "rc-core-priv.h"
 
 /* Sizes are in bytes, 256 bytes allows for 32 entries on x64 */
Index: linux/drivers/media/video/cpia2/cpia2_usb.c
===================================================================
--- linux.orig/drivers/media/video/cpia2/cpia2_usb.c
+++ linux/drivers/media/video/cpia2/cpia2_usb.c
@@ -31,6 +31,7 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
+#include <linux/module.h>
 
 #include "cpia2.h"
 
Index: linux/drivers/media/video/cx25840/cx25840-ir.c
===================================================================
--- linux.orig/drivers/media/video/cx25840/cx25840-ir.c
+++ linux/drivers/media/video/cx25840/cx25840-ir.c
@@ -23,6 +23,7 @@
 
 #include <linux/slab.h>
 #include <linux/kfifo.h>
+#include <linux/module.h>
 #include <media/cx25840.h>
 #include <media/rc-core.h>
 
Index: linux/drivers/media/video/hdpvr/hdpvr-i2c.c
===================================================================
--- linux.orig/drivers/media/video/hdpvr/hdpvr-i2c.c
+++ linux/drivers/media/video/hdpvr/hdpvr-i2c.c
@@ -16,6 +16,7 @@
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 
 #include "hdpvr.h"
Index: linux/drivers/media/video/hexium_gemini.c
===================================================================
--- linux.orig/drivers/media/video/hexium_gemini.c
+++ linux/drivers/media/video/hexium_gemini.c
@@ -24,6 +24,7 @@
 #define DEBUG_VARIABLE debug
 
 #include <media/saa7146_vv.h>
+#include <linux/module.h>
 
 static int debug;
 module_param(debug, int, 0);
Index: linux/drivers/media/video/hexium_orion.c
===================================================================
--- linux.orig/drivers/media/video/hexium_orion.c
+++ linux/drivers/media/video/hexium_orion.c
@@ -24,6 +24,7 @@
 #define DEBUG_VARIABLE debug
 
 #include <media/saa7146_vv.h>
+#include <linux/module.h>
 
 static int debug;
 module_param(debug, int, 0);
Index: linux/drivers/media/video/imx074.c
===================================================================
--- linux.orig/drivers/media/video/imx074.c
+++ linux/drivers/media/video/imx074.c
@@ -11,6 +11,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
 #include <linux/videodev2.h>
Index: linux/drivers/media/video/mt9m001.c
===================================================================
--- linux.orig/drivers/media/video/mt9m001.c
+++ linux/drivers/media/video/mt9m001.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/videodev2.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <linux/log2.h>
Index: linux/drivers/media/video/mt9m111.c
===================================================================
--- linux.orig/drivers/media/video/mt9m111.c
+++ linux/drivers/media/video/mt9m111.c
@@ -9,6 +9,7 @@
  */
 #include <linux/videodev2.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/log2.h>
 #include <linux/gpio.h>
Index: linux/drivers/media/video/mt9t031.c
===================================================================
--- linux.orig/drivers/media/video/mt9t031.c
+++ linux/drivers/media/video/mt9t031.c
@@ -10,6 +10,7 @@
 
 #include <linux/device.h>
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <linux/log2.h>
 #include <linux/pm.h>
 #include <linux/slab.h>
Index: linux/drivers/media/video/mt9v011.c
===================================================================
--- linux.orig/drivers/media/video/mt9v011.c
+++ linux/drivers/media/video/mt9v011.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 #include <linux/delay.h>
Index: linux/drivers/media/video/mt9v022.c
===================================================================
--- linux.orig/drivers/media/video/mt9v022.c
+++ linux/drivers/media/video/mt9v022.c
@@ -10,6 +10,7 @@
 
 #include <linux/videodev2.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/delay.h>
 #include <linux/log2.h>
Index: linux/drivers/media/video/mxb.c
===================================================================
--- linux.orig/drivers/media/video/mxb.c
+++ linux/drivers/media/video/mxb.c
@@ -24,6 +24,7 @@
 #define DEBUG_VARIABLE debug
 
 #include <media/saa7146_vv.h>
+#include <linux/module.h>
 #include <media/tuner.h>
 #include <media/v4l2-common.h>
 #include <media/saa7115.h>
Index: linux/drivers/media/video/noon010pc30.c
===================================================================
--- linux.orig/drivers/media/video/noon010pc30.c
+++ linux/drivers/media/video/noon010pc30.c
@@ -14,6 +14,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
Index: linux/drivers/media/video/ov6650.c
===================================================================
--- linux.orig/drivers/media/video/ov6650.c
+++ linux/drivers/media/video/ov6650.c
@@ -26,6 +26,7 @@
 
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
Index: linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
===================================================================
--- linux.orig/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -20,6 +20,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/version.h>
 #include "pvrusb2-context.h"
Index: linux/drivers/media/video/rj54n1cb0c.c
===================================================================
--- linux.orig/drivers/media/video/rj54n1cb0c.c
+++ linux/drivers/media/video/rj54n1cb0c.c
@@ -10,6 +10,7 @@
 
 #include <linux/delay.h>
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 
Index: linux/drivers/media/video/sr030pc30.c
===================================================================
--- linux.orig/drivers/media/video/sr030pc30.c
+++ linux/drivers/media/video/sr030pc30.c
@@ -17,6 +17,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
Index: linux/drivers/media/video/timblogiw.c
===================================================================
--- linux.orig/drivers/media/video/timblogiw.c
+++ linux/drivers/media/video/timblogiw.c
@@ -22,6 +22,7 @@
 
 #include <linux/version.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/dmaengine.h>
 #include <linux/mfd/core.h>
Index: linux/drivers/media/video/tvp5150.c
===================================================================
--- linux.orig/drivers/media/video/tvp5150.c
+++ linux/drivers/media/video/tvp5150.c
@@ -9,6 +9,7 @@
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <media/v4l2-device.h>
 #include <media/tvp5150.h>
 #include <media/v4l2-chip-ident.h>
Index: linux/drivers/media/video/usbvision/usbvision-cards.c
===================================================================
--- linux.orig/drivers/media/video/usbvision/usbvision-cards.c
+++ linux/drivers/media/video/usbvision/usbvision-cards.c
@@ -24,6 +24,7 @@
 
 
 #include <linux/list.h>
+#include <linux/module.h>
 #include <media/v4l2-dev.h>
 #include <media/tuner.h>
 #include "usbvision.h"
Index: linux/drivers/media/video/v4l2-ctrls.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-ctrls.c
+++ linux/drivers/media/video/v4l2-ctrls.c
@@ -20,6 +20,7 @@
 
 #include <linux/ctype.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
Index: linux/drivers/media/video/v4l2-device.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-device.c
+++ linux/drivers/media/video/v4l2-device.c
@@ -25,6 +25,7 @@
 #include <linux/spi/spi.h>
 #endif
 #include <linux/videodev2.h>
+#include <linux/module.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
 
Index: linux/drivers/media/video/v4l2-event.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-event.c
+++ linux/drivers/media/video/v4l2-event.c
@@ -28,6 +28,7 @@
 
 #include <linux/sched.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 int v4l2_event_init(struct v4l2_fh *fh)
 {
Index: linux/drivers/media/video/v4l2-fh.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-fh.c
+++ linux/drivers/media/video/v4l2-fh.c
@@ -24,6 +24,7 @@
 
 #include <linux/bitops.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <media/v4l2-dev.h>
 #include <media/v4l2-fh.h>
 #include <media/v4l2-event.h>
Index: linux/drivers/media/video/v4l2-int-device.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-int-device.c
+++ linux/drivers/media/video/v4l2-int-device.c
@@ -26,6 +26,7 @@
 #include <linux/list.h>
 #include <linux/sort.h>
 #include <linux/string.h>
+#include <linux/module.h>
 
 #include <media/v4l2-int-device.h>
 
Index: linux/drivers/media/video/v4l2-subdev.c
===================================================================
--- linux.orig/drivers/media/video/v4l2-subdev.c
+++ linux/drivers/media/video/v4l2-subdev.c
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/videodev2.h>
+#include <linux/module.h>
 
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
Index: linux/drivers/memstick/core/memstick.c
===================================================================
--- linux.orig/drivers/memstick/core/memstick.c
+++ linux/drivers/memstick/core/memstick.c
@@ -17,6 +17,7 @@
 #include <linux/fs.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "memstick"
 
Index: linux/drivers/memstick/core/mspro_block.c
===================================================================
--- linux.orig/drivers/memstick/core/mspro_block.c
+++ linux/drivers/memstick/core/mspro_block.c
@@ -20,6 +20,7 @@
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/memstick.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "mspro_block"
 
Index: linux/drivers/memstick/host/jmb38x_ms.c
===================================================================
--- linux.orig/drivers/memstick/host/jmb38x_ms.c
+++ linux/drivers/memstick/host/jmb38x_ms.c
@@ -17,6 +17,7 @@
 #include <linux/highmem.h>
 #include <linux/memstick.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "jmb38x_ms"
 
Index: linux/drivers/memstick/host/tifm_ms.c
===================================================================
--- linux.orig/drivers/memstick/host/tifm_ms.c
+++ linux/drivers/memstick/host/tifm_ms.c
@@ -17,6 +17,7 @@
 #include <linux/highmem.h>
 #include <linux/scatterlist.h>
 #include <linux/log2.h>
+#include <linux/module.h>
 #include <asm/io.h>
 
 #define DRIVER_NAME "tifm_ms"
Index: linux/drivers/message/i2o/pci.c
===================================================================
--- linux.orig/drivers/message/i2o/pci.c
+++ linux/drivers/message/i2o/pci.c
@@ -31,6 +31,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/i2o.h>
+#include <linux/module.h>
 #include "core.h"
 
 #define OSM_DESCRIPTION	"I2O-subsystem"
Index: linux/drivers/mfd/ab3100-core.c
===================================================================
--- linux.orig/drivers/mfd/ab3100-core.c
+++ linux/drivers/mfd/ab3100-core.c
@@ -8,6 +8,7 @@
 
 #include <linux/i2c.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <linux/list.h>
 #include <linux/notifier.h>
 #include <linux/slab.h>
Index: linux/drivers/mfd/ab3550-core.c
===================================================================
--- linux.orig/drivers/mfd/ab3550-core.c
+++ linux/drivers/mfd/ab3550-core.c
@@ -11,6 +11,7 @@
 
 #include <linux/i2c.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
Index: linux/drivers/mfd/ab8500-debugfs.c
===================================================================
--- linux.orig/drivers/mfd/ab8500-debugfs.c
+++ linux/drivers/mfd/ab8500-debugfs.c
@@ -7,6 +7,7 @@
 
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
+#include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/debugfs.h>
 #include <linux/platform_device.h>
Index: linux/drivers/mfd/ab8500-sysctrl.c
===================================================================
--- linux.orig/drivers/mfd/ab8500-sysctrl.c
+++ linux/drivers/mfd/ab8500-sysctrl.c
@@ -6,6 +6,7 @@
 
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 #include <linux/mfd/ab8500.h>
 #include <linux/mfd/abx500.h>
 #include <linux/mfd/ab8500/sysctrl.h>
Index: linux/drivers/mfd/abx500-core.c
===================================================================
--- linux.orig/drivers/mfd/abx500-core.c
+++ linux/drivers/mfd/abx500-core.c
@@ -7,6 +7,7 @@
 
 #include <linux/list.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/mfd/abx500.h>
 
Index: linux/drivers/mfd/max8997.c
===================================================================
--- linux.orig/drivers/mfd/max8997.c
+++ linux/drivers/mfd/max8997.c
@@ -22,6 +22,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/pm_runtime.h>
 #include <linux/mutex.h>
Index: linux/drivers/mfd/mfd-core.c
===================================================================
--- linux.orig/drivers/mfd/mfd-core.c
+++ linux/drivers/mfd/mfd-core.c
@@ -13,6 +13,7 @@
 
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 #include <linux/acpi.h>
 #include <linux/mfd/core.h>
 #include <linux/pm_runtime.h>
Index: linux/drivers/mfd/pcf50633-irq.c
===================================================================
--- linux.orig/drivers/mfd/pcf50633-irq.c
+++ linux/drivers/mfd/pcf50633-irq.c
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/mutex.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include <linux/mfd/pcf50633/core.h>
 
Index: linux/drivers/mfd/twl-core.c
===================================================================
--- linux.orig/drivers/mfd/twl-core.c
+++ linux/drivers/mfd/twl-core.c
@@ -33,6 +33,7 @@
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/err.h>
+#include <linux/module.h>
 
 #include <linux/regulator/machine.h>
 
Index: linux/drivers/mfd/twl6030-irq.c
===================================================================
--- linux.orig/drivers/mfd/twl6030-irq.c
+++ linux/drivers/mfd/twl6030-irq.c
@@ -37,6 +37,7 @@
 #include <linux/kthread.h>
 #include <linux/i2c/twl.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 
 #include "twl-core.h"
 
Index: linux/drivers/mfd/wl1273-core.c
===================================================================
--- linux.orig/drivers/mfd/wl1273-core.c
+++ linux/drivers/mfd/wl1273-core.c
@@ -22,6 +22,7 @@
 
 #include <linux/mfd/wl1273-core.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DRIVER_DESC "WL1273 FM Radio Core"
 
Index: linux/drivers/mfd/wm8400-core.c
===================================================================
--- linux.orig/drivers/mfd/wm8400-core.c
+++ linux/drivers/mfd/wm8400-core.c
@@ -19,6 +19,7 @@
 #include <linux/mfd/wm8400-private.h>
 #include <linux/mfd/wm8400-audio.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 static struct {
 	u16  readable;    /* Mask of readable bits */
Index: linux/drivers/misc/bh1780gli.c
===================================================================
--- linux.orig/drivers/misc/bh1780gli.c
+++ linux/drivers/misc/bh1780gli.c
@@ -22,6 +22,8 @@
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
+#include <linux/stat.h>
+#include <linux/module.h>
 
 #define BH1780_REG_CONTROL	0x80
 #define BH1780_REG_PARTID	0x8A
Index: linux/drivers/misc/kgdbts.c
===================================================================
--- linux.orig/drivers/misc/kgdbts.c
+++ linux/drivers/misc/kgdbts.c
@@ -95,6 +95,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/kgdb.h>
 #include <linux/ctype.h>
 #include <linux/uaccess.h>
Index: linux/drivers/misc/ti-st/st_kim.c
===================================================================
--- linux.orig/drivers/misc/ti-st/st_kim.c
+++ linux/drivers/misc/ti-st/st_kim.c
@@ -32,6 +32,7 @@
 #include <linux/sched.h>
 #include <linux/sysfs.h>
 #include <linux/tty.h>
+#include <linux/module.h>
 
 #include <linux/skbuff.h>
 #include <linux/ti_wilink_st.h>
Index: linux/drivers/misc/tifm_7xx1.c
===================================================================
--- linux.orig/drivers/misc/tifm_7xx1.c
+++ linux/drivers/misc/tifm_7xx1.c
@@ -11,6 +11,7 @@
 
 #include <linux/tifm.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "tifm_7xx1"
 #define DRIVER_VERSION "0.8"
Index: linux/drivers/misc/tifm_core.c
===================================================================
--- linux.orig/drivers/misc/tifm_core.c
+++ linux/drivers/misc/tifm_core.c
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/idr.h>
+#include <linux/module.h>
 
 #define DRIVER_NAME "tifm_core"
 #define DRIVER_VERSION "0.8"
Index: linux/drivers/mmc/card/mmc_test.c
===================================================================
--- linux.orig/drivers/mmc/card/mmc_test.c
+++ linux/drivers/mmc/card/mmc_test.c
@@ -11,6 +11,7 @@
 
 #include <linux/mmc/core.h>
 #include <linux/mmc/card.h>
+#include <linux/module.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/mmc.h>
 #include <linux/slab.h>
Index: linux/drivers/mmc/core/bus.c
===================================================================
--- linux.orig/drivers/mmc/core/bus.c
+++ linux/drivers/mmc/core/bus.c
@@ -15,6 +15,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/module.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
Index: linux/drivers/mmc/core/debugfs.c
===================================================================
--- linux.orig/drivers/mmc/core/debugfs.c
+++ linux/drivers/mmc/core/debugfs.c
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 #include <linux/debugfs.h>
+#include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
Index: linux/drivers/mmc/core/host.c
===================================================================
--- linux.orig/drivers/mmc/core/host.c
+++ linux/drivers/mmc/core/host.c
@@ -19,6 +19,7 @@
 #include <linux/leds.h>
 #include <linux/slab.h>
 #include <linux/suspend.h>
+#include <linux/module.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
Index: linux/drivers/mmc/core/mmc.c
===================================================================
--- linux.orig/drivers/mmc/core/mmc.c
+++ linux/drivers/mmc/core/mmc.c
@@ -12,6 +12,7 @@
 
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/stat.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
Index: linux/drivers/mmc/core/quirks.c
===================================================================
--- linux.orig/drivers/mmc/core/quirks.c
+++ linux/drivers/mmc/core/quirks.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mmc/card.h>
 #include <linux/mod_devicetable.h>
Index: linux/drivers/mmc/core/sd.c
===================================================================
--- linux.orig/drivers/mmc/core/sd.c
+++ linux/drivers/mmc/core/sd.c
@@ -12,6 +12,7 @@
 
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/stat.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
Index: linux/drivers/mmc/core/sd_ops.c
===================================================================
--- linux.orig/drivers/mmc/core/sd_ops.c
+++ linux/drivers/mmc/core/sd_ops.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/scatterlist.h>
+#include <linux/module.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
Index: linux/drivers/mmc/core/sdio_bus.c
===================================================================
--- linux.orig/drivers/mmc/core/sdio_bus.c
+++ linux/drivers/mmc/core/sdio_bus.c
@@ -12,6 +12,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
Index: linux/drivers/mmc/core/sdio_io.c
===================================================================
--- linux.orig/drivers/mmc/core/sdio_io.c
+++ linux/drivers/mmc/core/sdio_io.c
@@ -10,6 +10,7 @@
  */
 
 #include <linux/mmc/host.h>
+#include <linux/module.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/sdio_func.h>
Index: linux/drivers/mmc/core/sdio_irq.c
===================================================================
--- linux.orig/drivers/mmc/core/sdio_irq.c
+++ linux/drivers/mmc/core/sdio_irq.c
@@ -14,6 +14,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kthread.h>
 #include <linux/wait.h>
Index: linux/drivers/mmc/host/mmc_spi.c
===================================================================
--- linux.orig/drivers/mmc/host/mmc_spi.c
+++ linux/drivers/mmc/host/mmc_spi.c
@@ -32,6 +32,7 @@
 #include <linux/crc7.h>
 #include <linux/crc-itu-t.h>
 #include <linux/scatterlist.h>
+#include <linux/module.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/mmc.h>		/* for R1_SPI_* bit values */
Index: linux/drivers/mmc/host/sdhci-pci.c
===================================================================
--- linux.orig/drivers/mmc/host/sdhci-pci.c
+++ linux/drivers/mmc/host/sdhci-pci.c
@@ -18,6 +18,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/slab.h>
 #include <linux/device.h>
+#include <linux/module.h>
 
 #include <linux/mmc/host.h>
 
Index: linux/drivers/mmc/host/sdhci-pltfm.c
===================================================================
--- linux.orig/drivers/mmc/host/sdhci-pltfm.c
+++ linux/drivers/mmc/host/sdhci-pltfm.c
@@ -23,6 +23,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/highmem.h>
 #include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
Index: linux/drivers/mmc/host/sdhci.c
===================================================================
--- linux.orig/drivers/mmc/host/sdhci.c
+++ linux/drivers/mmc/host/sdhci.c
@@ -20,6 +20,7 @@
 #include <linux/slab.h>
 #include <linux/scatterlist.h>
 #include <linux/regulator/consumer.h>
+#include <linux/module.h>
 
 #include <linux/leds.h>
 
Index: linux/drivers/mmc/host/sdricoh_cs.c
===================================================================
--- linux.orig/drivers/mmc/host/sdricoh_cs.c
+++ linux/drivers/mmc/host/sdricoh_cs.c
@@ -29,6 +29,7 @@
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/scatterlist.h>
+#include <linux/module.h>
 
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
Index: linux/drivers/mmc/host/tifm_sd.c
===================================================================
--- linux.orig/drivers/mmc/host/tifm_sd.c
+++ linux/drivers/mmc/host/tifm_sd.c
@@ -16,6 +16,7 @@
 #include <linux/mmc/host.h>
 #include <linux/highmem.h>
 #include <linux/scatterlist.h>
+#include <linux/module.h>
 #include <asm/io.h>
 
 #define DRIVER_NAME "tifm_sd"
Index: linux/drivers/mmc/host/via-sdmmc.c
===================================================================
--- linux.orig/drivers/mmc/host/via-sdmmc.c
+++ linux/drivers/mmc/host/via-sdmmc.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/highmem.h>
 #include <linux/delay.h>
Index: linux/drivers/mtd/ar7part.c
===================================================================
--- linux.orig/drivers/mtd/ar7part.c
+++ linux/drivers/mtd/ar7part.c
@@ -22,6 +22,7 @@
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
Index: linux/drivers/mtd/cmdlinepart.c
===================================================================
--- linux.orig/drivers/mtd/cmdlinepart.c
+++ linux/drivers/mtd/cmdlinepart.c
@@ -39,6 +39,7 @@
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
Index: linux/drivers/mtd/lpddr/lpddr_cmds.c
===================================================================
--- linux.orig/drivers/mtd/lpddr/lpddr_cmds.c
+++ linux/drivers/mtd/lpddr/lpddr_cmds.c
@@ -25,6 +25,7 @@
  * Implement OTP support
  */
 #include <linux/mtd/pfow.h>
+#include <linux/module.h>
 #include <linux/mtd/qinfo.h>
 #include <linux/slab.h>
 
Index: linux/drivers/mtd/nand/cafe_nand.c
===================================================================
--- linux.orig/drivers/mtd/nand/cafe_nand.c
+++ linux/drivers/mtd/nand/cafe_nand.c
@@ -13,6 +13,7 @@
 #include <linux/device.h>
 #undef DEBUG
 #include <linux/mtd/mtd.h>
+#include <linux/module.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/rslib.h>
Index: linux/drivers/mtd/nand/diskonchip.c
===================================================================
--- linux.orig/drivers/mtd/nand/diskonchip.c
+++ linux/drivers/mtd/nand/diskonchip.c
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/rslib.h>
Index: linux/drivers/mtd/nand/nand_bbt.c
===================================================================
--- linux.orig/drivers/mtd/nand/nand_bbt.c
+++ linux/drivers/mtd/nand/nand_bbt.c
@@ -60,6 +60,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
Index: linux/drivers/mtd/nand/sm_common.c
===================================================================
--- linux.orig/drivers/mtd/nand/sm_common.c
+++ linux/drivers/mtd/nand/sm_common.c
@@ -7,6 +7,7 @@
  * published by the Free Software Foundation.
  */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/mtd/nand.h>
 #include "sm_common.h"
 
Index: linux/drivers/mtd/onenand/onenand_bbt.c
===================================================================
--- linux.orig/drivers/mtd/onenand/onenand_bbt.c
+++ linux/drivers/mtd/onenand/onenand_bbt.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
Index: linux/drivers/mtd/redboot.c
===================================================================
--- linux.orig/drivers/mtd/redboot.c
+++ linux/drivers/mtd/redboot.c
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/vmalloc.h>
+#include <linux/module.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
Index: linux/drivers/mtd/rfd_ftl.c
===================================================================
--- linux.orig/drivers/mtd/rfd_ftl.c
+++ linux/drivers/mtd/rfd_ftl.c
@@ -18,6 +18,7 @@
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
+#include <linux/module.h>
 
 #include <asm/types.h>
 
Index: linux/drivers/mtd/ubi/vmt.c
===================================================================
--- linux.orig/drivers/mtd/ubi/vmt.c
+++ linux/drivers/mtd/ubi/vmt.c
@@ -24,6 +24,7 @@
  */
 
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/math64.h>
 #include <linux/slab.h>
 #include "ubi.h"
Index: linux/drivers/net/phy/realtek.c
===================================================================
--- linux.orig/drivers/net/phy/realtek.c
+++ linux/drivers/net/phy/realtek.c
@@ -14,6 +14,7 @@
  *
  */
 #include <linux/phy.h>
+#include <linux/module.h>
 
 #define RTL821x_PHYSR		0x11
 #define RTL821x_PHYSR_DUPLEX	0x2000
Index: linux/drivers/pci/hotplug/pciehp_acpi.c
===================================================================
--- linux.orig/drivers/pci/hotplug/pciehp_acpi.c
+++ linux/drivers/pci/hotplug/pciehp_acpi.c
@@ -25,6 +25,7 @@
 
 #include <linux/acpi.h>
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/pci_hotplug.h>
 #include <linux/slab.h>
 #include "pciehp.h"
Index: linux/drivers/platform/x86/intel_scu_ipc.c
===================================================================
--- linux.orig/drivers/platform/x86/intel_scu_ipc.c
+++ linux/drivers/platform/x86/intel_scu_ipc.c
@@ -18,6 +18,7 @@
  */
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/pm.h>
Index: linux/drivers/platform/x86/msi-wmi.c
===================================================================
--- linux.orig/drivers/platform/x86/msi-wmi.c
+++ linux/drivers/platform/x86/msi-wmi.c
@@ -23,6 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/input.h>
+#include <linux/module.h>
 #include <linux/input/sparse-keymap.h>
 #include <linux/acpi.h>
 #include <linux/backlight.h>
Index: linux/drivers/platform/x86/wmi.c
===================================================================
--- linux.orig/drivers/platform/x86/wmi.c
+++ linux/drivers/platform/x86/wmi.c
@@ -31,6 +31,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/device.h>
 #include <linux/list.h>
Index: linux/drivers/power/max17042_battery.c
===================================================================
--- linux.orig/drivers/power/max17042_battery.c
+++ linux/drivers/power/max17042_battery.c
@@ -24,6 +24,7 @@
 
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/mod_devicetable.h>
 #include <linux/power_supply.h>
Index: linux/drivers/rapidio/switches/idt_gen2.c
===================================================================
--- linux.orig/drivers/rapidio/switches/idt_gen2.c
+++ linux/drivers/rapidio/switches/idt_gen2.c
@@ -14,6 +14,8 @@
 #include <linux/rio_drv.h>
 #include <linux/rio_ids.h>
 #include <linux/delay.h>
+#include <linux/stat.h>
+
 #include "../rio.h"
 
 #define LOCAL_RTE_CONF_DESTID_SEL	0x010070
Index: linux/drivers/regulator/ab8500.c
===================================================================
--- linux.orig/drivers/regulator/ab8500.c
+++ linux/drivers/regulator/ab8500.c
@@ -13,6 +13,7 @@
  */
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/ab8500.h>
Index: linux/drivers/regulator/bq24022.c
===================================================================
--- linux.orig/drivers/regulator/bq24022.c
+++ linux/drivers/regulator/bq24022.c
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/err.h>
 #include <linux/gpio.h>
Index: linux/drivers/regulator/da903x.c
===================================================================
--- linux.orig/drivers/regulator/da903x.c
+++ linux/drivers/regulator/da903x.c
@@ -11,6 +11,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/driver.h>
Index: linux/drivers/regulator/dummy.c
===================================================================
--- linux.orig/drivers/regulator/dummy.c
+++ linux/drivers/regulator/dummy.c
@@ -17,6 +17,7 @@
 
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
 
Index: linux/drivers/regulator/fixed.c
===================================================================
--- linux.orig/drivers/regulator/fixed.c
+++ linux/drivers/regulator/fixed.c
@@ -20,6 +20,7 @@
 
 #include <linux/err.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/fixed.h>
Index: linux/drivers/regulator/lp3971.c
===================================================================
--- linux.orig/drivers/regulator/lp3971.c
+++ linux/drivers/regulator/lp3971.c
@@ -14,6 +14,7 @@
 
 #include <linux/bug.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
 #include <linux/regulator/driver.h>
Index: linux/drivers/regulator/lp3972.c
===================================================================
--- linux.orig/drivers/regulator/lp3972.c
+++ linux/drivers/regulator/lp3972.c
@@ -11,6 +11,7 @@
 
 #include <linux/bug.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
 #include <linux/regulator/driver.h>
Index: linux/drivers/regulator/max8925-regulator.c
===================================================================
--- linux.orig/drivers/regulator/max8925-regulator.c
+++ linux/drivers/regulator/max8925-regulator.c
@@ -10,6 +10,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
Index: linux/drivers/regulator/max8997.c
===================================================================
--- linux.orig/drivers/regulator/max8997.c
+++ linux/drivers/regulator/max8997.c
@@ -23,6 +23,7 @@
 
 #include <linux/bug.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/gpio.h>
 #include <linux/slab.h>
Index: linux/drivers/regulator/mc13783-regulator.c
===================================================================
--- linux.orig/drivers/regulator/mc13783-regulator.c
+++ linux/drivers/regulator/mc13783-regulator.c
@@ -12,6 +12,7 @@
 
 #include <linux/mfd/mc13783.h>
 #include <linux/regulator/machine.h>
+#include <linux/module.h>
 #include <linux/regulator/driver.h>
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
Index: linux/drivers/regulator/mc13892-regulator.c
===================================================================
--- linux.orig/drivers/regulator/mc13892-regulator.c
+++ linux/drivers/regulator/mc13892-regulator.c
@@ -12,6 +12,7 @@
 
 #include <linux/mfd/mc13892.h>
 #include <linux/regulator/machine.h>
+#include <linux/module.h>
 #include <linux/regulator/driver.h>
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
Index: linux/drivers/regulator/mc13xxx-regulator-core.c
===================================================================
--- linux.orig/drivers/regulator/mc13xxx-regulator-core.c
+++ linux/drivers/regulator/mc13xxx-regulator-core.c
@@ -17,6 +17,7 @@
 
 #include <linux/mfd/mc13xxx.h>
 #include <linux/regulator/machine.h>
+#include <linux/module.h>
 #include <linux/regulator/driver.h>
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
Index: linux/drivers/regulator/tps6586x-regulator.c
===================================================================
--- linux.orig/drivers/regulator/tps6586x-regulator.c
+++ linux/drivers/regulator/tps6586x-regulator.c
@@ -15,6 +15,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
Index: linux/drivers/regulator/userspace-consumer.c
===================================================================
--- linux.orig/drivers/regulator/userspace-consumer.c
+++ linux/drivers/regulator/userspace-consumer.c
@@ -18,6 +18,7 @@
 
 #include <linux/err.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/regulator/userspace-consumer.h>
Index: linux/drivers/regulator/virtual.c
===================================================================
--- linux.orig/drivers/regulator/virtual.c
+++ linux/drivers/regulator/virtual.c
@@ -13,6 +13,7 @@
 
 #include <linux/err.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
Index: linux/drivers/regulator/wm8400-regulator.c
===================================================================
--- linux.orig/drivers/regulator/wm8400-regulator.c
+++ linux/drivers/regulator/wm8400-regulator.c
@@ -14,6 +14,7 @@
 
 #include <linux/bug.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/regulator/driver.h>
 #include <linux/mfd/wm8400-private.h>
Index: linux/drivers/rtc/rtc-ds1305.c
===================================================================
--- linux.orig/drivers/rtc/rtc-ds1305.c
+++ linux/drivers/rtc/rtc-ds1305.c
@@ -10,6 +10,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/bcd.h>
 #include <linux/slab.h>
 #include <linux/rtc.h>
Index: linux/drivers/rtc/rtc-ds1511.c
===================================================================
--- linux.orig/drivers/rtc/rtc-ds1511.c
+++ linux/drivers/rtc/rtc-ds1511.c
@@ -16,6 +16,7 @@
 
 #include <linux/bcd.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/gfp.h>
 #include <linux/delay.h>
Index: linux/drivers/rtc/rtc-ds1553.c
===================================================================
--- linux.orig/drivers/rtc/rtc-ds1553.c
+++ linux/drivers/rtc/rtc-ds1553.c
@@ -10,6 +10,7 @@
 
 #include <linux/bcd.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/gfp.h>
 #include <linux/delay.h>
Index: linux/drivers/rtc/rtc-ds1672.c
===================================================================
--- linux.orig/drivers/rtc/rtc-ds1672.c
+++ linux/drivers/rtc/rtc-ds1672.c
@@ -11,6 +11,7 @@
 
 #include <linux/i2c.h>
 #include <linux/rtc.h>
+#include <linux/module.h>
 
 #define DRV_VERSION "0.4"
 
Index: linux/drivers/rtc/rtc-ds1742.c
===================================================================
--- linux.orig/drivers/rtc/rtc-ds1742.c
+++ linux/drivers/rtc/rtc-ds1742.c
@@ -14,6 +14,7 @@
 
 #include <linux/bcd.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/gfp.h>
 #include <linux/delay.h>
Index: linux/drivers/rtc/rtc-isl12022.c
===================================================================
--- linux.orig/drivers/rtc/rtc-isl12022.c
+++ linux/drivers/rtc/rtc-isl12022.c
@@ -13,6 +13,7 @@
 
 #include <linux/i2c.h>
 #include <linux/bcd.h>
+#include <linux/module.h>
 #include <linux/rtc.h>
 #include <linux/slab.h>
 
Index: linux/drivers/rtc/rtc-pcf2123.c
===================================================================
--- linux.orig/drivers/rtc/rtc-pcf2123.c
+++ linux/drivers/rtc/rtc-pcf2123.c
@@ -34,6 +34,7 @@
 
 #include <linux/bcd.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/init.h>
Index: linux/drivers/rtc/rtc-pcf8563.c
===================================================================
--- linux.orig/drivers/rtc/rtc-pcf8563.c
+++ linux/drivers/rtc/rtc-pcf8563.c
@@ -16,6 +16,7 @@
 
 #include <linux/i2c.h>
 #include <linux/bcd.h>
+#include <linux/module.h>
 #include <linux/rtc.h>
 #include <linux/slab.h>
 
Index: linux/drivers/rtc/rtc-rs5c348.c
===================================================================
--- linux.orig/drivers/rtc/rtc-rs5c348.c
+++ linux/drivers/rtc/rtc-rs5c348.c
@@ -14,6 +14,7 @@
 
 #include <linux/bcd.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/init.h>
Index: linux/drivers/rtc/rtc-rs5c372.c
===================================================================
--- linux.orig/drivers/rtc/rtc-rs5c372.c
+++ linux/drivers/rtc/rtc-rs5c372.c
@@ -12,6 +12,7 @@
 
 #include <linux/i2c.h>
 #include <linux/rtc.h>
+#include <linux/module.h>
 #include <linux/bcd.h>
 #include <linux/slab.h>
 
Index: linux/drivers/rtc/rtc-x1205.c
===================================================================
--- linux.orig/drivers/rtc/rtc-x1205.c
+++ linux/drivers/rtc/rtc-x1205.c
@@ -19,6 +19,7 @@
 
 #include <linux/i2c.h>
 #include <linux/bcd.h>
+#include <linux/module.h>
 #include <linux/rtc.h>
 #include <linux/delay.h>
 
Index: linux/drivers/scsi/aacraid/aachba.c
===================================================================
--- linux.orig/drivers/scsi/aacraid/aachba.c
+++ linux/drivers/scsi/aacraid/aachba.c
@@ -26,6 +26,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
Index: linux/drivers/scsi/bfa/bfad_debugfs.c
===================================================================
--- linux.orig/drivers/scsi/bfa/bfad_debugfs.c
+++ linux/drivers/scsi/bfa/bfad_debugfs.c
@@ -16,6 +16,7 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/module.h>
 
 #include "bfad_drv.h"
 #include "bfad_im.h"
Index: linux/drivers/scsi/bfa/bfad_im.c
===================================================================
--- linux.orig/drivers/scsi/bfa/bfad_im.c
+++ linux/drivers/scsi/bfa/bfad_im.c
@@ -21,6 +21,7 @@
 
 #include "bfad_drv.h"
 #include "bfad_im.h"
+#include <linux/module.h>
 #include "bfa_fcs.h"
 
 BFA_TRC_FILE(LDRV, IM);
Index: linux/drivers/scsi/device_handler/scsi_dh.c
===================================================================
--- linux.orig/drivers/scsi/device_handler/scsi_dh.c
+++ linux/drivers/scsi/device_handler/scsi_dh.c
@@ -22,6 +22,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <scsi/scsi_dh.h>
 #include "../scsi_priv.h"
 
Index: linux/drivers/scsi/device_handler/scsi_dh_alua.c
===================================================================
--- linux.orig/drivers/scsi/device_handler/scsi_dh_alua.c
+++ linux/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -21,6 +21,7 @@
  */
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_dh.h>
Index: linux/drivers/scsi/device_handler/scsi_dh_emc.c
===================================================================
--- linux.orig/drivers/scsi/device_handler/scsi_dh_emc.c
+++ linux/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -21,6 +21,7 @@
  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_dh.h>
Index: linux/drivers/scsi/device_handler/scsi_dh_hp_sw.c
===================================================================
--- linux.orig/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ linux/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -22,6 +22,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_dbg.h>
 #include <scsi/scsi_eh.h>
Index: linux/drivers/scsi/device_handler/scsi_dh_rdac.c
===================================================================
--- linux.orig/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ linux/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -23,6 +23,7 @@
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_dh.h>
 #include <linux/workqueue.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 
 #define RDAC_NAME "rdac"
Index: linux/drivers/scsi/libfc/fc_disc.c
===================================================================
--- linux.orig/drivers/scsi/libfc/fc_disc.c
+++ linux/drivers/scsi/libfc/fc_disc.c
@@ -34,6 +34,7 @@
 
 #include <linux/timer.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/err.h>
 #include <asm/unaligned.h>
 
Index: linux/drivers/scsi/libfc/fc_elsct.c
===================================================================
--- linux.orig/drivers/scsi/libfc/fc_elsct.c
+++ linux/drivers/scsi/libfc/fc_elsct.c
@@ -22,6 +22,7 @@
  */
 
 #include <asm/unaligned.h>
+#include <linux/module.h>
 #include <scsi/fc/fc_gs.h>
 #include <scsi/fc/fc_ns.h>
 #include <scsi/fc/fc_els.h>
Index: linux/drivers/scsi/libfc/fc_exch.c
===================================================================
--- linux.orig/drivers/scsi/libfc/fc_exch.c
+++ linux/drivers/scsi/libfc/fc_exch.c
@@ -25,6 +25,7 @@
 
 #include <linux/timer.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/err.h>
 
 #include <scsi/fc/fc_fc2.h>
Index: linux/drivers/scsi/libfc/fc_libfc.c
===================================================================
--- linux.orig/drivers/scsi/libfc/fc_libfc.c
+++ linux/drivers/scsi/libfc/fc_libfc.c
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/scatterlist.h>
 #include <linux/crc32.h>
 
Index: linux/drivers/scsi/libfc/fc_lport.c
===================================================================
--- linux.orig/drivers/scsi/libfc/fc_lport.c
+++ linux/drivers/scsi/libfc/fc_lport.c
@@ -89,6 +89,7 @@
 
 #include <linux/timer.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <asm/unaligned.h>
 
 #include <scsi/fc/fc_gs.h>
Index: linux/drivers/scsi/libsrp.c
===================================================================
--- linux.orig/drivers/scsi/libsrp.c
+++ linux/drivers/scsi/libsrp.c
@@ -20,6 +20,7 @@
  */
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/kfifo.h>
 #include <linux/scatterlist.h>
 #include <linux/dma-mapping.h>
Index: linux/drivers/scsi/lpfc/lpfc_debugfs.c
===================================================================
--- linux.orig/drivers/scsi/lpfc/lpfc_debugfs.c
+++ linux/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -20,6 +20,7 @@
 
 #include <linux/blkdev.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/idr.h>
 #include <linux/interrupt.h>
Index: linux/drivers/scsi/megaraid/megaraid_mbox.c
===================================================================
--- linux.orig/drivers/scsi/megaraid/megaraid_mbox.c
+++ linux/drivers/scsi/megaraid/megaraid_mbox.c
@@ -71,6 +71,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "megaraid_mbox.h"
 
 static int megaraid_init(void);
Index: linux/drivers/scsi/osd/osd_initiator.c
===================================================================
--- linux.orig/drivers/scsi/osd/osd_initiator.c
+++ linux/drivers/scsi/osd/osd_initiator.c
@@ -40,6 +40,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include <scsi/osd_initiator.h>
 #include <scsi/osd_sec.h>
Index: linux/drivers/scsi/scsi_pm.c
===================================================================
--- linux.orig/drivers/scsi/scsi_pm.c
+++ linux/drivers/scsi/scsi_pm.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/pm_runtime.h>
+#include <linux/module.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_device.h>
Index: linux/drivers/spi/dw_spi.c
===================================================================
--- linux.orig/drivers/spi/dw_spi.c
+++ linux/drivers/spi/dw_spi.c
@@ -19,6 +19,7 @@
 
 #include <linux/dma-mapping.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/highmem.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
Index: linux/drivers/spi/dw_spi_pci.c
===================================================================
--- linux.orig/drivers/spi/dw_spi_pci.c
+++ linux/drivers/spi/dw_spi_pci.c
@@ -19,6 +19,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/spi/spi.h>
 
Index: linux/drivers/spi/pxa2xx_spi_pci.c
===================================================================
--- linux.orig/drivers/spi/pxa2xx_spi_pci.c
+++ linux/drivers/spi/pxa2xx_spi_pci.c
@@ -4,6 +4,7 @@
  */
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/spi/pxa2xx_spi.h>
 
Index: linux/drivers/spi/spi.c
===================================================================
--- linux.orig/drivers/spi/spi.c
+++ linux/drivers/spi/spi.c
@@ -20,6 +20,7 @@
 
 #include <linux/kernel.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/cache.h>
 #include <linux/mutex.h>
Index: linux/drivers/spi/spi_altera.c
===================================================================
--- linux.orig/drivers/spi/spi_altera.c
+++ linux/drivers/spi/spi_altera.c
@@ -15,6 +15,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
Index: linux/drivers/spi/spi_bitbang.c
===================================================================
--- linux.orig/drivers/spi/spi_bitbang.c
+++ linux/drivers/spi/spi_bitbang.c
@@ -18,6 +18,7 @@
 
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/module.h>
 #include <linux/workqueue.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
Index: linux/drivers/spi/spi_butterfly.c
===================================================================
--- linux.orig/drivers/spi/spi_butterfly.c
+++ linux/drivers/spi/spi_butterfly.c
@@ -19,6 +19,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/parport.h>
Index: linux/drivers/spi/spi_oc_tiny.c
===================================================================
--- linux.orig/drivers/spi/spi_oc_tiny.c
+++ linux/drivers/spi/spi_oc_tiny.c
@@ -17,6 +17,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
Index: linux/drivers/spi/tle62x0.c
===================================================================
--- linux.orig/drivers/spi/tle62x0.c
+++ linux/drivers/spi/tle62x0.c
@@ -10,6 +10,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
Index: linux/drivers/tty/serial/max3100.c
===================================================================
--- linux.orig/drivers/tty/serial/max3100.c
+++ linux/drivers/tty/serial/max3100.c
@@ -42,6 +42,7 @@
 
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
Index: linux/drivers/tty/serial/max3107-aava.c
===================================================================
--- linux.orig/drivers/tty/serial/max3107-aava.c
+++ linux/drivers/tty/serial/max3107-aava.c
@@ -28,6 +28,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
Index: linux/drivers/tty/serial/max3107.c
===================================================================
--- linux.orig/drivers/tty/serial/max3107.c
+++ linux/drivers/tty/serial/max3107.c
@@ -29,6 +29,7 @@
 
 #include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
 #include <linux/gpio.h>
Index: linux/drivers/tty/serial/timbuart.c
===================================================================
--- linux.orig/drivers/tty/serial/timbuart.c
+++ linux/drivers/tty/serial/timbuart.c
@@ -22,6 +22,7 @@
 
 #include <linux/pci.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/serial_core.h>
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
Index: linux/drivers/tty/serial/xilinx_uartps.c
===================================================================
--- linux.orig/drivers/tty/serial/xilinx_uartps.c
+++ linux/drivers/tty/serial/xilinx_uartps.c
@@ -13,6 +13,7 @@
 
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/module.h>
 #include <linux/console.h>
 #include <linux/serial.h>
 #include <linux/irq.h>
Index: linux/drivers/uio/uio_pdrv.c
===================================================================
--- linux.orig/drivers/uio/uio_pdrv.c
+++ linux/drivers/uio/uio_pdrv.c
@@ -10,6 +10,7 @@
  */
 #include <linux/platform_device.h>
 #include <linux/uio_driver.h>
+#include <linux/module.h>
 #include <linux/stringify.h>
 #include <linux/slab.h>
 
Index: linux/drivers/uio/uio_pdrv_genirq.c
===================================================================
--- linux.orig/drivers/uio/uio_pdrv_genirq.c
+++ linux/drivers/uio/uio_pdrv_genirq.c
@@ -16,6 +16,7 @@
 
 #include <linux/platform_device.h>
 #include <linux/uio_driver.h>
+#include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
 #include <linux/interrupt.h>
Index: linux/drivers/usb/wusbcore/devconnect.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/devconnect.c
+++ linux/drivers/usb/wusbcore/devconnect.c
@@ -88,6 +88,7 @@
 
 #include <linux/jiffies.h>
 #include <linux/ctype.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include "wusbhc.h"
Index: linux/drivers/usb/wusbcore/mmc.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/mmc.c
+++ linux/drivers/usb/wusbcore/mmc.c
@@ -38,6 +38,7 @@
  */
 #include <linux/usb/wusb.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "wusbhc.h"
 
 /* Initialize the MMCIEs handling mechanism */
Index: linux/drivers/usb/wusbcore/rh.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/rh.c
+++ linux/drivers/usb/wusbcore/rh.c
@@ -70,6 +70,7 @@
  * wusbhc_rh_start_port_reset() ??? unimplemented
  */
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "wusbhc.h"
 
 /*
Index: linux/drivers/usb/wusbcore/security.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/security.c
+++ linux/drivers/usb/wusbcore/security.c
@@ -24,6 +24,7 @@
  */
 #include <linux/types.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/usb/ch9.h>
 #include <linux/random.h>
 #include "wusbhc.h"
Index: linux/drivers/usb/wusbcore/wa-rpipe.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/wa-rpipe.c
+++ linux/drivers/usb/wusbcore/wa-rpipe.c
@@ -60,6 +60,7 @@
 #include <linux/init.h>
 #include <asm/atomic.h>
 #include <linux/bitmap.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 
 #include "wusbhc.h"
Index: linux/drivers/usb/wusbcore/wa-xfer.c
===================================================================
--- linux.orig/drivers/usb/wusbcore/wa-xfer.c
+++ linux/drivers/usb/wusbcore/wa-xfer.c
@@ -80,6 +80,7 @@
  *     rpipes, segment slots, etc), we go scheduling them. Painful.
  */
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/hash.h>
Index: linux/drivers/uwb/est.c
===================================================================
--- linux.orig/drivers/uwb/est.c
+++ linux/drivers/uwb/est.c
@@ -41,6 +41,7 @@
  */
 #include <linux/spinlock.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include "uwb-internal.h"
 
Index: linux/drivers/uwb/i1480/dfu/dfu.c
===================================================================
--- linux.orig/drivers/uwb/i1480/dfu/dfu.c
+++ linux/drivers/uwb/i1480/dfu/dfu.c
@@ -28,6 +28,7 @@
  */
 #include "i1480-dfu.h"
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/device.h>
Index: linux/drivers/uwb/ie.c
===================================================================
--- linux.orig/drivers/uwb/ie.c
+++ linux/drivers/uwb/ie.c
@@ -25,6 +25,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "uwb-internal.h"
 
 /**
Index: linux/drivers/uwb/lc-dev.c
===================================================================
--- linux.orig/drivers/uwb/lc-dev.c
+++ linux/drivers/uwb/lc-dev.c
@@ -24,6 +24,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/kdev_t.h>
Index: linux/drivers/uwb/neh.c
===================================================================
--- linux.orig/drivers/uwb/neh.c
+++ linux/drivers/uwb/neh.c
@@ -83,6 +83,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/timer.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/err.h>
 
Index: linux/drivers/uwb/pal.c
===================================================================
--- linux.orig/drivers/uwb/pal.c
+++ linux/drivers/uwb/pal.c
@@ -17,6 +17,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/debugfs.h>
+#include <linux/module.h>
 #include <linux/uwb.h>
 
 #include "uwb-internal.h"
Index: linux/drivers/uwb/radio.c
===================================================================
--- linux.orig/drivers/uwb/radio.c
+++ linux/drivers/uwb/radio.c
@@ -17,6 +17,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/uwb.h>
+#include <linux/module.h>
 
 #include "uwb-internal.h"
 
Index: linux/drivers/uwb/reset.c
===================================================================
--- linux.orig/drivers/uwb/reset.c
+++ linux/drivers/uwb/reset.c
@@ -30,6 +30,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 
Index: linux/drivers/uwb/rsv.c
===================================================================
--- linux.orig/drivers/uwb/rsv.c
+++ linux/drivers/uwb/rsv.c
@@ -17,6 +17,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/uwb.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/random.h>
 
Index: linux/drivers/uwb/scan.c
===================================================================
--- linux.orig/drivers/uwb/scan.c
+++ linux/drivers/uwb/scan.c
@@ -36,6 +36,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/stat.h>
 #include "uwb-internal.h"
 
 
Index: linux/drivers/video/backlight/88pm860x_bl.c
===================================================================
--- linux.orig/drivers/video/backlight/88pm860x_bl.c
+++ linux/drivers/video/backlight/88pm860x_bl.c
@@ -11,6 +11,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/fb.h>
Index: linux/drivers/video/backlight/adp5520_bl.c
===================================================================
--- linux.orig/drivers/video/backlight/adp5520_bl.c
+++ linux/drivers/video/backlight/adp5520_bl.c
@@ -8,6 +8,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/backlight.h>
Index: linux/drivers/video/backlight/da903x_bl.c
===================================================================
--- linux.orig/drivers/video/backlight/da903x_bl.c
+++ linux/drivers/video/backlight/da903x_bl.c
@@ -14,6 +14,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/backlight.h>
Index: linux/drivers/video/backlight/l4f00242t03.c
===================================================================
--- linux.orig/drivers/video/backlight/l4f00242t03.c
+++ linux/drivers/video/backlight/l4f00242t03.c
@@ -13,6 +13,7 @@
 
 #include <linux/device.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/lcd.h>
Index: linux/drivers/video/backlight/ld9040.c
===================================================================
--- linux.orig/drivers/video/backlight/ld9040.c
+++ linux/drivers/video/backlight/ld9040.c
@@ -22,6 +22,7 @@
 
 #include <linux/wait.h>
 #include <linux/fb.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/spi/spi.h>
Index: linux/drivers/video/backlight/lms283gf05.c
===================================================================
--- linux.orig/drivers/video/backlight/lms283gf05.c
+++ linux/drivers/video/backlight/lms283gf05.c
@@ -10,6 +10,7 @@
 
 #include <linux/device.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/gpio.h>
Index: linux/drivers/video/backlight/max8925_bl.c
===================================================================
--- linux.orig/drivers/video/backlight/max8925_bl.c
+++ linux/drivers/video/backlight/max8925_bl.c
@@ -11,6 +11,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/i2c.h>
Index: linux/drivers/video/backlight/s6e63m0.c
===================================================================
--- linux.orig/drivers/video/backlight/s6e63m0.c
+++ linux/drivers/video/backlight/s6e63m0.c
@@ -22,6 +22,7 @@
 
 #include <linux/wait.h>
 #include <linux/fb.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/spi/spi.h>
Index: linux/drivers/video/backlight/wm831x_bl.c
===================================================================
--- linux.orig/drivers/video/backlight/wm831x_bl.c
+++ linux/drivers/video/backlight/wm831x_bl.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
Index: linux/drivers/video/carminefb.c
===================================================================
--- linux.orig/drivers/video/carminefb.c
+++ linux/drivers/video/carminefb.c
@@ -8,6 +8,7 @@
  */
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <linux/fb.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
Index: linux/drivers/video/mb862xx/mb862xxfb.c
===================================================================
--- linux.orig/drivers/video/mb862xx/mb862xxfb.c
+++ linux/drivers/video/mb862xx/mb862xxfb.c
@@ -16,6 +16,7 @@
 
 #include <linux/fb.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
Index: linux/drivers/video/savage/savagefb_accel.c
===================================================================
--- linux.orig/drivers/video/savage/savagefb_accel.c
+++ linux/drivers/video/savage/savagefb_accel.c
@@ -10,6 +10,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/module.h>
 #include <linux/fb.h>
 
 #include "savagefb.h"
Index: linux/drivers/video/via/via-gpio.c
===================================================================
--- linux.orig/drivers/video/via/via-gpio.c
+++ linux/drivers/video/via/via-gpio.c
@@ -7,6 +7,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/gpio.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/via-core.h>
 #include <linux/via-gpio.h>
Index: linux/drivers/virtio/virtio.c
===================================================================
--- linux.orig/drivers/virtio/virtio.c
+++ linux/drivers/virtio/virtio.c
@@ -1,6 +1,7 @@
 #include <linux/virtio.h>
 #include <linux/spinlock.h>
 #include <linux/virtio_config.h>
+#include <linux/module.h>
 
 /* Unique numbering for virtio devices. */
 static unsigned int dev_index;
Index: linux/drivers/virtio/virtio_balloon.c
===================================================================
--- linux.orig/drivers/virtio/virtio_balloon.c
+++ linux/drivers/virtio/virtio_balloon.c
@@ -20,6 +20,7 @@
 //#define DEBUG
 #include <linux/virtio.h>
 #include <linux/virtio_balloon.h>
+#include <linux/module.h>
 #include <linux/swap.h>
 #include <linux/kthread.h>
 #include <linux/freezer.h>
Index: linux/drivers/virtio/virtio_ring.c
===================================================================
--- linux.orig/drivers/virtio/virtio_ring.c
+++ linux/drivers/virtio/virtio_ring.c
@@ -18,6 +18,7 @@
  */
 #include <linux/virtio.h>
 #include <linux/virtio_ring.h>
+#include <linux/module.h>
 #include <linux/virtio_config.h>
 #include <linux/device.h>
 #include <linux/slab.h>
Index: linux/drivers/w1/w1_family.c
===================================================================
--- linux.orig/drivers/w1/w1_family.c
+++ linux/drivers/w1/w1_family.c
@@ -21,6 +21,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/list.h>
+#include <linux/module.h>
 #include <linux/sched.h>	/* schedule_timeout() */
 #include <linux/delay.h>
 
Index: linux/drivers/xen/balloon.c
===================================================================
--- linux.orig/drivers/xen/balloon.c
+++ linux/drivers/xen/balloon.c
@@ -32,6 +32,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/bootmem.h>
Index: linux/drivers/xen/manage.c
===================================================================
--- linux.orig/drivers/xen/manage.c
+++ linux/drivers/xen/manage.c
@@ -3,6 +3,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/reboot.h>
 #include <linux/sysrq.h>
Index: linux/drivers/xen/swiotlb-xen.c
===================================================================
--- linux.orig/drivers/xen/swiotlb-xen.c
+++ linux/drivers/xen/swiotlb-xen.c
@@ -34,6 +34,7 @@
  */
 
 #include <linux/bootmem.h>
+#include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <xen/swiotlb-xen.h>
 #include <xen/page.h>
Index: linux/fs/bio-integrity.c
===================================================================
--- linux.orig/fs/bio-integrity.c
+++ linux/fs/bio-integrity.c
@@ -25,6 +25,7 @@
 #include <linux/bio.h>
 #include <linux/workqueue.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 struct integrity_slab {
 	struct kmem_cache *slab;
Index: linux/fs/exofs/super.c
===================================================================
--- linux.orig/fs/exofs/super.c
+++ linux/fs/exofs/super.c
@@ -37,6 +37,7 @@
 #include <linux/random.h>
 #include <linux/exportfs.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #include "exofs.h"
 
Index: linux/fs/gfs2/ops_fstype.c
===================================================================
--- linux.orig/fs/gfs2/ops_fstype.c
+++ linux/fs/gfs2/ops_fstype.c
@@ -18,6 +18,7 @@
 #include <linux/mount.h>
 #include <linux/gfs2_ondisk.h>
 #include <linux/quotaops.h>
+#include <linux/module.h>
 
 #include "gfs2.h"
 #include "incore.h"
Index: linux/fs/jfs/jfs_logmgr.c
===================================================================
--- linux.orig/fs/jfs/jfs_logmgr.c
+++ linux/fs/jfs/jfs_logmgr.c
@@ -71,6 +71,7 @@
 #include <linux/mutex.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "jfs_incore.h"
 #include "jfs_filsys.h"
 #include "jfs_metapage.h"
Index: linux/fs/logfs/super.c
===================================================================
--- linux.orig/fs/logfs/super.c
+++ linux/fs/logfs/super.c
@@ -16,6 +16,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/statfs.h>
 #include <linux/buffer_head.h>
+#include <linux/module.h>
 
 static DEFINE_MUTEX(emergency_mutex);
 static struct page *emergency_page;
Index: linux/include/linux/bcma/bcma.h
===================================================================
--- linux.orig/include/linux/bcma/bcma.h
+++ linux/include/linux/bcma/bcma.h
@@ -6,6 +6,7 @@
 
 #include <linux/bcma/bcma_driver_chipcommon.h>
 #include <linux/bcma/bcma_driver_pci.h>
+#include <linux/module.h>
 
 #include "bcma_regs.h"
 
Index: linux/include/linux/gameport.h
===================================================================
--- linux.orig/include/linux/gameport.h
+++ linux/include/linux/gameport.h
@@ -17,6 +17,7 @@
 #include <linux/device.h>
 #include <linux/timer.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 struct gameport {
 
Index: linux/include/linux/ssb/ssb.h
===================================================================
--- linux.orig/include/linux/ssb/ssb.h
+++ linux/include/linux/ssb/ssb.h
@@ -8,6 +8,7 @@
 #include <linux/pci.h>
 #include <linux/mod_devicetable.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 
 #include <linux/ssb/ssb_regs.h>
 
Index: linux/include/linux/uio_driver.h
===================================================================
--- linux.orig/include/linux/uio_driver.h
+++ linux/include/linux/uio_driver.h
@@ -16,6 +16,7 @@
 
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 
 struct module;
 struct uio_map;
Index: linux/include/xen/xenbus.h
===================================================================
--- linux.orig/include/xen/xenbus.h
+++ linux/include/xen/xenbus.h
@@ -35,6 +35,7 @@
 #define _XEN_XENBUS_H
 
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/notifier.h>
 #include <linux/mutex.h>
 #include <linux/completion.h>
Index: linux/kernel/debug/kdb/kdb_debugger.c
===================================================================
--- linux.orig/kernel/debug/kdb/kdb_debugger.c
+++ linux/kernel/debug/kdb/kdb_debugger.c
@@ -11,6 +11,7 @@
 #include <linux/kgdb.h>
 #include <linux/kdb.h>
 #include <linux/kdebug.h>
+#include <linux/module.h>
 #include "kdb_private.h"
 #include "../debug_core.h"
 
Index: linux/kernel/jump_label.c
===================================================================
--- linux.orig/kernel/jump_label.c
+++ linux/kernel/jump_label.c
@@ -13,6 +13,7 @@
 #include <linux/sort.h>
 #include <linux/err.h>
 #include <linux/jump_label.h>
+#include <linux/module.h>
 
 #ifdef HAVE_JUMP_LABEL
 
Index: linux/kernel/ksysfs.c
===================================================================
--- linux.orig/kernel/ksysfs.c
+++ linux/kernel/ksysfs.c
@@ -17,6 +17,7 @@
 #include <linux/profile.h>
 #include <linux/sched.h>
 #include <linux/capability.h>
+#include <linux/stat.h>
 
 #define KERNEL_ATTR_RO(_name) \
 static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
Index: linux/kernel/rcutorture.c
===================================================================
--- linux.orig/kernel/rcutorture.c
+++ linux/kernel/rcutorture.c
@@ -23,6 +23,7 @@
  * See also:  Documentation/RCU/torture.txt
  */
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/export.h>
Index: linux/kernel/rcutree_trace.c
===================================================================
--- linux.orig/kernel/rcutree_trace.c
+++ linux/kernel/rcutree_trace.c
@@ -24,6 +24,7 @@
  *
  */
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
Index: linux/kernel/trace/ftrace.c
===================================================================
--- linux.orig/kernel/trace/ftrace.c
+++ linux/kernel/trace/ftrace.c
@@ -23,6 +23,7 @@
 #include <linux/kthread.h>
 #include <linux/uaccess.h>
 #include <linux/ftrace.h>
+#include <linux/module.h>
 #include <linux/sysctl.h>
 #include <linux/slab.h>
 #include <linux/ctype.h>
Index: linux/kernel/trace/trace_syscalls.c
===================================================================
--- linux.orig/kernel/trace/trace_syscalls.c
+++ linux/kernel/trace/trace_syscalls.c
@@ -4,6 +4,8 @@
 #include <linux/kernel.h>
 #include <linux/ftrace.h>
 #include <linux/perf_event.h>
+#include <linux/module.h>
+
 #include <asm/syscall.h>
 
 #include "trace_output.h"
Index: linux/kernel/watchdog.c
===================================================================
--- linux.orig/kernel/watchdog.c
+++ linux/kernel/watchdog.c
@@ -23,6 +23,7 @@
 #include <linux/notifier.h>
 #include <linux/export.h>
 #include <linux/sysctl.h>
+#include <linux/module.h>
 
 #include <asm/irq_regs.h>
 #include <linux/perf_event.h>
Index: linux/lib/dma-debug.c
===================================================================
--- linux.orig/lib/dma-debug.c
+++ linux/lib/dma-debug.c
@@ -25,6 +25,7 @@
 #include <linux/debugfs.h>
 #include <linux/uaccess.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/ctype.h>
Index: linux/mm/memory-failure.c
===================================================================
--- linux.orig/mm/memory-failure.c
+++ linux/mm/memory-failure.c
@@ -52,6 +52,7 @@
 #include <linux/swapops.h>
 #include <linux/hugetlb.h>
 #include <linux/memory_hotplug.h>
+#include <linux/module.h>
 #include "internal.h"
 
 int sysctl_memory_failure_early_kill __read_mostly = 0;
Index: linux/net/caif/cfpkt_skbuff.c
===================================================================
--- linux.orig/net/caif/cfpkt_skbuff.c
+++ linux/net/caif/cfpkt_skbuff.c
@@ -9,6 +9,8 @@
 #include <linux/string.h>
 #include <linux/skbuff.h>
 #include <linux/hardirq.h>
+#include <linux/module.h>
+
 #include <net/caif/cfpkt.h>
 
 #define PKT_PREFIX  48
Index: linux/net/netfilter/ipset/pfxlen.c
===================================================================
--- linux.orig/net/netfilter/ipset/pfxlen.c
+++ linux/net/netfilter/ipset/pfxlen.c
@@ -1,4 +1,5 @@
 #include <linux/netfilter/ipset/pfxlen.h>
+#include <linux/module.h>
 
 /*
  * Prefixlen maps for fast conversions, by Jan Engelhardt.
Index: linux/sound/core/jack.c
===================================================================
--- linux.orig/sound/core/jack.c
+++ linux/sound/core/jack.c
@@ -21,6 +21,7 @@
 
 #include <linux/input.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/jack.h>
 #include <sound/core.h>
 
Index: linux/sound/core/rawmidi.c
===================================================================
--- linux.orig/sound/core/rawmidi.c
+++ linux/sound/core/rawmidi.c
@@ -28,6 +28,7 @@
 #include <linux/wait.h>
 #include <linux/mutex.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <sound/rawmidi.h>
 #include <sound/info.h>
Index: linux/sound/core/seq/seq_midi.c
===================================================================
--- linux.orig/sound/core/seq/seq_midi.c
+++ linux/sound/core/seq/seq_midi.c
@@ -32,6 +32,7 @@ Possible options for midisynth module:
 #include <linux/string.h>
 #include <linux/moduleparam.h>
 #include <linux/mutex.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/rawmidi.h>
 #include <sound/seq_kernel.h>
Index: linux/sound/core/seq/seq_midi_emul.c
===================================================================
--- linux.orig/sound/core/seq/seq_midi_emul.c
+++ linux/sound/core/seq/seq_midi_emul.c
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/seq_kernel.h>
 #include <sound/seq_midi_emul.h>
Index: linux/sound/core/seq/seq_virmidi.c
===================================================================
--- linux.orig/sound/core/seq/seq_virmidi.c
+++ linux/sound/core/seq/seq_virmidi.c
@@ -46,6 +46,7 @@
 #include <sound/seq_kernel.h>
 #include <sound/seq_midi_event.h>
 #include <sound/seq_virmidi.h>
+#include <linux/module.h>
 
 MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
 MODULE_DESCRIPTION("Virtual Raw MIDI client on Sequencer");
Index: linux/sound/drivers/mpu401/mpu401.c
===================================================================
--- linux.orig/sound/drivers/mpu401/mpu401.c
+++ linux/sound/drivers/mpu401/mpu401.c
@@ -25,6 +25,7 @@
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/mpu401.h>
 #include <sound/initval.h>
Index: linux/sound/drivers/mpu401/mpu401_uart.c
===================================================================
--- linux.orig/sound/drivers/mpu401/mpu401_uart.c
+++ linux/sound/drivers/mpu401/mpu401_uart.c
@@ -35,6 +35,7 @@
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/mpu401.h>
 
Index: linux/sound/drivers/mtpav.c
===================================================================
--- linux.orig/sound/drivers/mtpav.c
+++ linux/sound/drivers/mtpav.c
@@ -61,6 +61,7 @@
 #include <sound/initval.h>
 #include <sound/rawmidi.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 
 /*
  *      globals
Index: linux/sound/drivers/mts64.c
===================================================================
--- linux.orig/sound/drivers/mts64.c
+++ linux/sound/drivers/mts64.c
@@ -24,6 +24,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/initval.h>
 #include <sound/rawmidi.h>
Index: linux/sound/drivers/opl3/opl3_lib.c
===================================================================
--- linux.orig/sound/drivers/opl3/opl3_lib.c
+++ linux/sound/drivers/opl3/opl3_lib.c
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
+#include <linux/module.h>
 #include <sound/minors.h>
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>, Hannu Savolainen 1993-1996, Rob Hooft");
Index: linux/sound/drivers/opl3/opl3_oss.c
===================================================================
--- linux.orig/sound/drivers/opl3/opl3_oss.c
+++ linux/sound/drivers/opl3/opl3_oss.c
@@ -18,6 +18,8 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
+#include <linux/module.h>
+
 #include "opl3_voice.h"
 
 static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
Index: linux/sound/drivers/opl3/opl3_seq.c
===================================================================
--- linux.orig/sound/drivers/opl3/opl3_seq.c
+++ linux/sound/drivers/opl3/opl3_seq.c
@@ -25,6 +25,7 @@
 #include "opl3_voice.h"
 #include <linux/init.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <sound/initval.h>
 
 MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
Index: linux/sound/drivers/opl3/opl3_synth.c
===================================================================
--- linux.orig/sound/drivers/opl3/opl3_synth.c
+++ linux/sound/drivers/opl3/opl3_synth.c
@@ -20,6 +20,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/opl3.h>
 #include <sound/asound_fm.h>
 
Index: linux/sound/drivers/opl4/opl4_lib.c
===================================================================
--- linux.orig/sound/drivers/opl4/opl4_lib.c
+++ linux/sound/drivers/opl4/opl4_lib.c
@@ -20,6 +20,7 @@
 #include "opl4_local.h"
 #include <sound/initval.h>
 #include <linux/ioport.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <asm/io.h>
Index: linux/sound/drivers/opl4/opl4_proc.c
===================================================================
--- linux.orig/sound/drivers/opl4/opl4_proc.c
+++ linux/sound/drivers/opl4/opl4_proc.c
@@ -19,6 +19,7 @@
 
 #include "opl4_local.h"
 #include <linux/vmalloc.h>
+#include <linux/module.h>
 #include <sound/info.h>
 
 #ifdef CONFIG_PROC_FS
Index: linux/sound/drivers/opl4/opl4_seq.c
===================================================================
--- linux.orig/sound/drivers/opl4/opl4_seq.c
+++ linux/sound/drivers/opl4/opl4_seq.c
@@ -33,6 +33,7 @@
 
 #include "opl4_local.h"
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <sound/initval.h>
 
Index: linux/sound/drivers/portman2x4.c
===================================================================
--- linux.orig/sound/drivers/portman2x4.c
+++ linux/sound/drivers/portman2x4.c
@@ -43,6 +43,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/initval.h>
 #include <sound/rawmidi.h>
Index: linux/sound/drivers/serial-u16550.c
===================================================================
--- linux.orig/sound/drivers/serial-u16550.c
+++ linux/sound/drivers/serial-u16550.c
@@ -37,6 +37,7 @@
 #include <linux/slab.h>
 #include <linux/ioport.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/rawmidi.h>
 #include <sound/initval.h>
Index: linux/sound/drivers/virmidi.c
===================================================================
--- linux.orig/sound/drivers/virmidi.c
+++ linux/sound/drivers/virmidi.c
@@ -46,6 +46,7 @@
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/seq_kernel.h>
 #include <sound/seq_virmidi.h>
Index: linux/sound/firewire/iso-resources.c
===================================================================
--- linux.orig/sound/firewire/iso-resources.c
+++ linux/sound/firewire/iso-resources.c
@@ -12,6 +12,7 @@
 #include <linux/mutex.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
+#include <linux/module.h>
 #include "iso-resources.h"
 
 /**
Index: linux/sound/firewire/packets-buffer.c
===================================================================
--- linux.orig/sound/firewire/packets-buffer.c
+++ linux/sound/firewire/packets-buffer.c
@@ -7,6 +7,7 @@
 
 #include <linux/firewire.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include "packets-buffer.h"
 
 /**
Index: linux/sound/i2c/i2c.c
===================================================================
--- linux.orig/sound/i2c/i2c.c
+++ linux/sound/i2c/i2c.c
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/i2c.h>
 
Index: linux/sound/i2c/other/ak4xxx-adda.c
===================================================================
--- linux.orig/sound/i2c/other/ak4xxx-adda.c
+++ linux/sound/i2c/other/ak4xxx-adda.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/tlv.h>
Index: linux/sound/i2c/other/pt2258.c
===================================================================
--- linux.orig/sound/i2c/other/pt2258.c
+++ linux/sound/i2c/other/pt2258.c
@@ -19,6 +19,8 @@
  *
  */      
 
+#include <linux/module.h>
+
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/tlv.h>
Index: linux/sound/i2c/other/tea575x-tuner.c
===================================================================
--- linux.orig/sound/i2c/other/tea575x-tuner.c
+++ linux/sound/i2c/other/tea575x-tuner.c
@@ -26,6 +26,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/version.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/tea575x-tuner.h>
 
Index: linux/sound/i2c/tea6330t.c
===================================================================
--- linux.orig/sound/i2c/tea6330t.c
+++ linux/sound/i2c/tea6330t.c
@@ -22,6 +22,7 @@
 
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/tea6330t.h>
Index: linux/sound/isa/sb/emu8000.c
===================================================================
--- linux.orig/sound/isa/sb/emu8000.c
+++ linux/sound/isa/sb/emu8000.c
@@ -21,6 +21,7 @@
  */
 
 #include <linux/wait.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
Index: linux/sound/isa/sb/emu8000_callback.c
===================================================================
--- linux.orig/sound/isa/sb/emu8000_callback.c
+++ linux/sound/isa/sb/emu8000_callback.c
@@ -20,6 +20,7 @@
  */
 
 #include "emu8000_local.h"
+#include <linux/module.h>
 #include <sound/asoundef.h>
 
 /*
Index: linux/sound/isa/sb/emu8000_patch.c
===================================================================
--- linux.orig/sound/isa/sb/emu8000_patch.c
+++ linux/sound/isa/sb/emu8000_patch.c
@@ -22,6 +22,7 @@
 #include "emu8000_local.h"
 #include <asm/uaccess.h>
 #include <linux/moduleparam.h>
+#include <linux/module.h>
 
 static int emu8000_reset_addr;
 module_param(emu8000_reset_addr, int, 0444);
Index: linux/sound/isa/sb/emu8000_synth.c
===================================================================
--- linux.orig/sound/isa/sb/emu8000_synth.c
+++ linux/sound/isa/sb/emu8000_synth.c
@@ -22,6 +22,7 @@
 
 #include "emu8000_local.h"
 #include <linux/init.h>
+#include <linux/module.h>
 #include <sound/initval.h>
 
 MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe");
Index: linux/sound/isa/wavefront/wavefront_fx.c
===================================================================
--- linux.orig/sound/isa/wavefront/wavefront_fx.c
+++ linux/sound/isa/wavefront/wavefront_fx.c
@@ -18,6 +18,7 @@
 
 #include <asm/io.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/time.h>
 #include <linux/wait.h>
 #include <linux/slab.h>
Index: linux/sound/isa/wavefront/wavefront_synth.c
===================================================================
--- linux.orig/sound/isa/wavefront/wavefront_synth.c
+++ linux/sound/isa/wavefront/wavefront_synth.c
@@ -22,6 +22,7 @@
 
 #include <asm/io.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/time.h>
Index: linux/sound/pci/asihpi/hpioctl.c
===================================================================
--- linux.orig/sound/pci/asihpi/hpioctl.c
+++ linux/sound/pci/asihpi/hpioctl.c
@@ -33,6 +33,7 @@ Common Linux HPI ioctl and module probe/
 #include <asm/uaccess.h>
 #include <linux/pci.h>
 #include <linux/stringify.h>
+#include <linux/module.h>
 
 #ifdef MODULE_FIRMWARE
 MODULE_FIRMWARE("asihpi/dsp5000.bin");
Index: linux/sound/pci/ctxfi/xfi.c
===================================================================
--- linux.orig/sound/pci/ctxfi/xfi.c
+++ linux/sound/pci/ctxfi/xfi.c
@@ -12,6 +12,7 @@
 #include <linux/pci.h>
 #include <linux/moduleparam.h>
 #include <linux/pci_ids.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/initval.h>
 #include "ctatc.h"
Index: linux/sound/pci/oxygen/oxygen_io.c
===================================================================
--- linux.orig/sound/pci/oxygen/oxygen_io.c
+++ linux/sound/pci/oxygen/oxygen_io.c
@@ -19,6 +19,7 @@
 
 #include <linux/delay.h>
 #include <linux/sched.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/mpu401.h>
 #include <asm/io.h>
Index: linux/sound/synth/emux/emux.c
===================================================================
--- linux.orig/sound/synth/emux/emux.c
+++ linux/sound/synth/emux/emux.c
@@ -24,6 +24,7 @@
 #include <sound/core.h>
 #include <sound/emux_synth.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include "emux_voice.h"
 
 MODULE_AUTHOR("Takashi Iwai");
Index: linux/sound/synth/emux/emux_oss.c
===================================================================
--- linux.orig/sound/synth/emux/emux_oss.c
+++ linux/sound/synth/emux/emux_oss.c
@@ -25,6 +25,7 @@
 
 #ifdef CONFIG_SND_SEQUENCER_OSS
 
+#include <linux/module.h>
 #include <asm/uaccess.h>
 #include <sound/core.h>
 #include "emux_voice.h"
Index: linux/sound/synth/emux/emux_seq.c
===================================================================
--- linux.orig/sound/synth/emux/emux_seq.c
+++ linux/sound/synth/emux/emux_seq.c
@@ -21,6 +21,7 @@
 
 #include "emux_voice.h"
 #include <linux/slab.h>
+#include <linux/module.h>
 
 
 /* Prototypes for static functions */
Index: linux/sound/synth/emux/emux_synth.c
===================================================================
--- linux.orig/sound/synth/emux/emux_synth.c
+++ linux/sound/synth/emux/emux_synth.c
@@ -23,6 +23,7 @@
  */
 
 #include "emux_voice.h"
+#include <linux/module.h>
 #include <sound/asoundef.h>
 
 /*
Index: linux/sound/synth/emux/soundfont.c
===================================================================
--- linux.orig/sound/synth/emux/soundfont.c
+++ linux/sound/synth/emux/soundfont.c
@@ -27,6 +27,7 @@
  */
 #include <asm/uaccess.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/soundfont.h>
 #include <sound/seq_oss_legacy.h>
Index: linux/sound/synth/util_mem.c
===================================================================
--- linux.orig/sound/synth/util_mem.c
+++ linux/sound/synth/util_mem.c
@@ -21,6 +21,7 @@
 #include <linux/mutex.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 #include <sound/core.h>
 #include <sound/util_mem.h>
 
Index: linux/sound/usb/6fire/firmware.c
===================================================================
--- linux.orig/sound/usb/6fire/firmware.c
+++ linux/sound/usb/6fire/firmware.c
@@ -15,6 +15,7 @@
  */
 
 #include <linux/firmware.h>
+#include <linux/module.h>
 #include <linux/bitrev.h>
 
 #include "firmware.h"
Index: linux/sound/usb/midi.c
===================================================================
--- linux.orig/sound/usb/midi.c
+++ linux/sound/usb/midi.c
@@ -47,6 +47,7 @@
 #include <linux/usb.h>
 #include <linux/wait.h>
 #include <linux/usb/audio.h>
+#include <linux/module.h>
 
 #include <sound/core.h>
 #include <sound/control.h>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-05-28 14:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20  6:12 linux-next: build failure after merge of the final tree Stephen Rothwell
2011-05-20 15:24 ` Linus Torvalds
2011-05-20 16:16   ` Thomas Gleixner
2011-05-20 16:29     ` Linus Torvalds
2011-05-23  9:09   ` [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown Ingo Molnar
2011-05-23  9:09     ` Ingo Molnar
2011-05-23 10:21     ` Alexey Dobriyan
2011-05-23 10:55       ` Ingo Molnar
2011-05-23 11:13         ` Alexey Dobriyan
2011-05-23 11:51           ` Ingo Molnar
2011-05-23 16:01     ` Linus Torvalds
2011-05-23 17:01       ` Ingo Molnar
2011-05-23 16:19     ` Sam Ravnborg
2011-05-28  0:36     ` Paul Gortmaker
2011-05-28 14:40       ` [PATCH] Fixes to the module.h splitup tree Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.