linux-next.vger.kernel.org archive mirror
 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; 195+ 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] 195+ 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   ` [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown Ingo Molnar
  0 siblings, 2 replies; 195+ 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] 195+ 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   ` [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown Ingo Molnar
  1 sibling, 1 reply; 195+ 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] 195+ 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; 195+ 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] 195+ 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-20 16:16   ` Thomas Gleixner
@ 2011-05-23  9:09   ` Ingo Molnar
  2011-05-23 10:21     ` Alexey Dobriyan
                       ` (3 more replies)
  1 sibling, 4 replies; 195+ 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] 195+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  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 10:21     ` Alexey Dobriyan
  2011-05-23 10:55       ` Ingo Molnar
  2011-05-23 16:01     ` Linus Torvalds
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 195+ 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] 195+ 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; 195+ 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] 195+ 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; 195+ 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] 195+ 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; 195+ 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] 195+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  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 10:21     ` Alexey Dobriyan
@ 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
  3 siblings, 1 reply; 195+ 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] 195+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  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 10:21     ` Alexey Dobriyan
  2011-05-23 16:01     ` Linus Torvalds
@ 2011-05-23 16:19     ` Sam Ravnborg
  2011-05-28  0:36     ` Paul Gortmaker
  3 siblings, 0 replies; 195+ 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] 195+ 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; 195+ 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] 195+ messages in thread

* Re: [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown ...
  2011-05-23  9:09   ` [bloat] Measuring header file bloat effects on kernel build performance: a more than 2x slowdown Ingo Molnar
                       ` (2 preceding siblings ...)
  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
  3 siblings, 1 reply; 195+ 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] 195+ 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; 195+ 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] 195+ messages in thread

* Re: linux-next: build failure after merge of the final tree
  2014-05-28 20:48         ` Paul Bolle
@ 2014-05-28 21:15           ` Greg KH
  0 siblings, 0 replies; 195+ messages in thread
From: Greg KH @ 2014-05-28 21:15 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Wed, May 28, 2014 at 10:48:02PM +0200, Paul Bolle wrote:
> On Wed, 2014-05-28 at 13:42 -0700, Greg KH wrote:
> > Either is fine with me, I can revert it, or apply a fix, which ever you
> > want, just let me know.
> 
> Well, a proper fix would make this whole episode worthwhile. But if I
> can't come up with anything that actually builds in a day or two it'll
> have to be a revert. If that exceeds your patience you're free to hand
> me a shorter deadline.

How about I revert it now, that way you can provide a proper fix
whenever you get the chance.

thanks,

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28 20:42       ` Greg KH
@ 2014-05-28 20:48         ` Paul Bolle
  2014-05-28 21:15           ` Greg KH
  0 siblings, 1 reply; 195+ messages in thread
From: Paul Bolle @ 2014-05-28 20:48 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Wed, 2014-05-28 at 13:42 -0700, Greg KH wrote:
> Either is fine with me, I can revert it, or apply a fix, which ever you
> want, just let me know.

Well, a proper fix would make this whole episode worthwhile. But if I
can't come up with anything that actually builds in a day or two it'll
have to be a revert. If that exceeds your patience you're free to hand
me a shorter deadline.


Paul Bolle

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28 20:21     ` Paul Bolle
@ 2014-05-28 20:42       ` Greg KH
  2014-05-28 20:48         ` Paul Bolle
  0 siblings, 1 reply; 195+ messages in thread
From: Greg KH @ 2014-05-28 20:42 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Wed, May 28, 2014 at 10:21:28PM +0200, Paul Bolle wrote:
> Greg,
> 
> On Wed, 2014-05-28 at 12:14 +0200, Paul Bolle wrote:
> > I must have compile tested this with CONFIG_LIB80211_CRYPT_TKIP=m while
> > the code checks for CONFIG_LIB80211_CRYPT_TKIP only (ie, builtin only).
> > I'll have to have a better look at this.
> > 
> > Greg, can the cleaning up of this mess involve an entirely new patch? An
> > incremental patch would leave this build error in a certain range of
> > commits.

As I already have the patch in my tree, I can't do that, we can live
with the build issue.

> The pieces of the latest linux-next build were handed to me by Stephen
> as my patch managed to break it.
> 
> I'm assuming you'd like to include rtl8192u in linux-next's builds
> again. Currently I got nothing to offer to you but a request to either
> drop "staging: rtl8192u: rename CONFIG_IEEE80211_CRYPT_TKIP" from
> staging-next or, if that's not how staging-next works, a request to
> revert it. What do you prefer?

Either is fine with me, I can revert it, or apply a fix, which ever you
want, just let me know.

thanks,

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28 10:14   ` Paul Bolle
@ 2014-05-28 20:21     ` Paul Bolle
  2014-05-28 20:42       ` Greg KH
  0 siblings, 1 reply; 195+ messages in thread
From: Paul Bolle @ 2014-05-28 20:21 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, linux-kernel

Greg,

On Wed, 2014-05-28 at 12:14 +0200, Paul Bolle wrote:
> I must have compile tested this with CONFIG_LIB80211_CRYPT_TKIP=m while
> the code checks for CONFIG_LIB80211_CRYPT_TKIP only (ie, builtin only).
> I'll have to have a better look at this.
> 
> Greg, can the cleaning up of this mess involve an entirely new patch? An
> incremental patch would leave this build error in a certain range of
> commits.

The pieces of the latest linux-next build were handed to me by Stephen
as my patch managed to break it.

I'm assuming you'd like to include rtl8192u in linux-next's builds
again. Currently I got nothing to offer to you but a request to either
drop "staging: rtl8192u: rename CONFIG_IEEE80211_CRYPT_TKIP" from
staging-next or, if that's not how staging-next works, a request to
revert it. What do you prefer?

Either way I'll see whether I can come up with a fix that allows me to
take off that brown paper bag.


Paul Bolle

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28  9:57 ` Paul Bolle
  2014-05-28 10:14   ` Paul Bolle
@ 2014-05-28 10:24   ` Stephen Rothwell
  1 sibling, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2014-05-28 10:24 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Greg KH, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

Hi Paul,

On Wed, 28 May 2014 11:57:21 +0200 Paul Bolle <pebolle@tiscali.nl> wrote:
> 
> That may be related to my "staging: rtl8192u: rename
> CONFIG_IEEE80211_CRYPT_TKIP" (see https://lkml.org/lkml/2014/5/26/531 .)
> My message states it was compile tested, but that would be on x86_64.
> Did it only break on powerpc or did powerpc hit this first?

The powerpc allyesconfig build was just where I found it - I don't do
that many different builds during the day.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28  9:57 ` Paul Bolle
@ 2014-05-28 10:14   ` Paul Bolle
  2014-05-28 20:21     ` Paul Bolle
  2014-05-28 10:24   ` Stephen Rothwell
  1 sibling, 1 reply; 195+ messages in thread
From: Paul Bolle @ 2014-05-28 10:14 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel

On Wed, 2014-05-28 at 11:57 +0200, Paul Bolle wrote:
> On Wed, 2014-05-28 at 19:46 +1000, Stephen Rothwell wrote:
> That may be related to my "staging: rtl8192u: rename
> CONFIG_IEEE80211_CRYPT_TKIP" (see https://lkml.org/lkml/2014/5/26/531 .)
> My message states it was compile tested, but that would be on x86_64.
> Did it only break on powerpc or did powerpc hit this first?

I must have compile tested this with CONFIG_LIB80211_CRYPT_TKIP=m while
the code checks for CONFIG_LIB80211_CRYPT_TKIP only (ie, builtin only).
I'll have to have a better look at this.

Greg, can the cleaning up of this mess involve an entirely new patch? An
incremental patch would leave this build error in a certain range of
commits.


Paul Bolle

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

* Re: linux-next: build failure after merge of the final tree
  2014-05-28  9:46 linux-next: build failure after merge of the final tree Stephen Rothwell
@ 2014-05-28  9:57 ` Paul Bolle
  2014-05-28 10:14   ` Paul Bolle
  2014-05-28 10:24   ` Stephen Rothwell
  0 siblings, 2 replies; 195+ messages in thread
From: Paul Bolle @ 2014-05-28  9:57 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel

On Wed, 2014-05-28 at 19:46 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:203:34: error: 'struct ieee80211_hdr' has no member named 'addr1'
>            ieee->dev->name, header->addr1);
>                                   ^
> 
> I can't easily see what caused this, so I just disabled the staging
> tree driver:

That may be related to my "staging: rtl8192u: rename
CONFIG_IEEE80211_CRYPT_TKIP" (see https://lkml.org/lkml/2014/5/26/531 .)
My message states it was compile tested, but that would be on x86_64.
Did it only break on powerpc or did powerpc hit this first?

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 28 May 2014 19:43:17 +1000
> Subject: [PATCH] staging: rtl8192u: diable broken driver
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/staging/rtl8192u/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/staging/rtl8192u/Kconfig
> index 3ee9d0d00fb6..ea5d02d8cca2 100644
> --- a/drivers/staging/rtl8192u/Kconfig
> +++ b/drivers/staging/rtl8192u/Kconfig
> @@ -2,6 +2,7 @@ config RTL8192U
>  	tristate "RealTek RTL8192U Wireless LAN NIC driver"
>  	depends on PCI && WLAN && USB
>  	depends on m
> +	depends on BROKEN
>  	select WIRELESS_EXT
>  	select WEXT_PRIV
>  	select CRYPTO
> -- 
> 2.0.0.rc4

Thanks,


Paul Bolle

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

* linux-next: build failure after merge of the final tree
@ 2014-05-28  9:46 Stephen Rothwell
  2014-05-28  9:57 ` Paul Bolle
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2014-05-28  9:46 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

Hi all,

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

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:203:34: error: 'struct ieee80211_hdr' has no member named 'addr1'
           ieee->dev->name, header->addr1);
                                  ^

I can't easily see what caused this, so I just disabled the staging
tree driver:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 28 May 2014 19:43:17 +1000
Subject: [PATCH] staging: rtl8192u: diable broken driver

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/staging/rtl8192u/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/staging/rtl8192u/Kconfig
index 3ee9d0d00fb6..ea5d02d8cca2 100644
--- a/drivers/staging/rtl8192u/Kconfig
+++ b/drivers/staging/rtl8192u/Kconfig
@@ -2,6 +2,7 @@ config RTL8192U
 	tristate "RealTek RTL8192U Wireless LAN NIC driver"
 	depends on PCI && WLAN && USB
 	depends on m
+	depends on BROKEN
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select CRYPTO
-- 
2.0.0.rc4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2014-04-07 18:26 ` Andrew Morton
@ 2014-04-07 21:51   ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2014-04-07 21:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus, linux-next, linux-kernel, Steven Rostedt, Mark Fasheh,
	Joel Becker, ocfs2-devel

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

Hi Andrew,

On Mon, 7 Apr 2014 11:26:54 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Mon, 7 Apr 2014 14:52:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > fs/ocfs2/suballoc.c: In function 'ocfs2_block_group_set_bits':
> > fs/ocfs2/suballoc.c:1357:2: error: implicit declaration of function 'trace_ocfs2_block_group_set_bits' [-Werror=implicit-function-declaration]
> >   trace_ocfs2_block_group_set_bits(bit_off, num_bits);
> >   ^
> > 
> > I have no idea how to track this down :-( The only patches affecting this
> > code are now in Linus' tree.  I can only assume that some implicitly
> > included header file is no longer included.  I have just left it broken
> > for now.
> 
> I can't reproduce this with either mainline or linux-next.  Pulled half
> an hour ago, powerpc allyesconfig.

Rats!  I think I have been fooled by my own scripts.  What was built here
was the result of me trying to merge your tree.  After abandoning the
attempt, my build tree did not get reset to the final linux-next before I
did my final build checks which include the powerpc allyesconfig.

Sorry about that.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2014-04-07  4:52 Stephen Rothwell
@ 2014-04-07 18:26 ` Andrew Morton
  2014-04-07 21:51   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Andrew Morton @ 2014-04-07 18:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, linux-next, linux-kernel, Steven Rostedt, Mark Fasheh,
	Joel Becker, ocfs2-devel

On Mon, 7 Apr 2014 14:52:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> fs/ocfs2/suballoc.c: In function 'ocfs2_block_group_set_bits':
> fs/ocfs2/suballoc.c:1357:2: error: implicit declaration of function 'trace_ocfs2_block_group_set_bits' [-Werror=implicit-function-declaration]
>   trace_ocfs2_block_group_set_bits(bit_off, num_bits);
>   ^
> 
> I have no idea how to track this down :-( The only patches affecting this
> code are now in Linus' tree.  I can only assume that some implicitly
> included header file is no longer included.  I have just left it broken
> for now.

I can't reproduce this with either mainline or linux-next.  Pulled half
an hour ago, powerpc allyesconfig.

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

* linux-next: build failure after merge of the final tree
@ 2014-04-07  4:52 Stephen Rothwell
  2014-04-07 18:26 ` Andrew Morton
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2014-04-07  4:52 UTC (permalink / raw)
  To: Andrew Morton, Linus
  Cc: linux-next, linux-kernel, Steven Rostedt, Mark Fasheh,
	Joel Becker, ocfs2-devel

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

Hi all,

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

fs/ocfs2/suballoc.c: In function 'ocfs2_block_group_set_bits':
fs/ocfs2/suballoc.c:1357:2: error: implicit declaration of function 'trace_ocfs2_block_group_set_bits' [-Werror=implicit-function-declaration]
  trace_ocfs2_block_group_set_bits(bit_off, num_bits);
  ^

I have no idea how to track this down :-( The only patches affecting this
code are now in Linus' tree.  I can only assume that some implicitly
included header file is no longer included.  I have just left it broken
for now.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2014-01-30  3:55 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2014-01-30  3:55 UTC (permalink / raw)
  To: Paul Gortmaker, Alexander Graf; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

Hi all,

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

arch/powerpc/kvm/44x.c: In function 'kvmppc_44x_exit':
arch/powerpc/kvm/44x.c:231:2: error: implicit declaration of function 'kvmppc_booke_exit' [-Werror=implicit-function-declaration]

Caused by my conflict fixup in the init tree.  I just reverted the rest
of commit f9315b9d2680 ("powerpc: kvm e500/44x is not modular, so don't
use module_init") from the init tree.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2014-01-06  9:28 Stephen Rothwell
@ 2014-01-06 23:12 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 195+ messages in thread
From: Benjamin Herrenschmidt @ 2014-01-06 23:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linuxppc-dev, linux-next, linux-kernel, Mahesh Salgaonkar

On Mon, 2014-01-06 at 20:28 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
> arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards
> 
> The last time I got this error, I needed to apply patch "powerpc: Fix
> "attempt to move .org backwards" error", but that has been included in
> the powerpc tree now, so I guess something else has added code in a
> critical place. :-(
> 
> I have just left this broken for today.

I had to modify that patch when applying it, it's possible that the
"new" version isn't making as much room. Without that change it would
fail the build on some of my configs due to some of the asm for the
maskable exception handling being too far from the conditional branches
that calls it.

I think it's time we do a bit of re-org of that file to figure out
precisely what has to be where and move things out more aggressively.

Cheers,
Ben.

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

* linux-next: build failure after merge of the final tree
@ 2014-01-06  9:28 Stephen Rothwell
  2014-01-06 23:12 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2014-01-06  9:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev
  Cc: linux-next, linux-kernel, Mahesh Salgaonkar

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

Hi all,

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

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards

The last time I got this error, I needed to apply patch "powerpc: Fix
"attempt to move .org backwards" error", but that has been included in
the powerpc tree now, so I guess something else has added code in a
critical place. :-(

I have just left this broken for today.
-- 
Cheers,
Stephen Rothwell <sfr@canb.auug.org.au>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-17  5:59 Stephen Rothwell
@ 2013-12-17  8:26 ` Heiko Stübner
  0 siblings, 0 replies; 195+ messages in thread
From: Heiko Stübner @ 2013-12-17  8:26 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

Hi,

Am Dienstag, 17. Dezember 2013, 06:59:56 schrieb Stephen Rothwell:
> Caused by commit 34ef6d7fe467 ("rtc: add hym8563 rtc-driver") from the
> akpm-current tree.  Probably some missing include(s).
> 
> I just reverted that commit for today.

The includes are fine, I just seem to have forgotten the dependency of 
COMMON_CLK, which enables the clk structs in clk-provider.h. Sorry about that.

Follow up patch coming shortly.


Heiko

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

* linux-next: build failure after merge of the final tree
@ 2013-12-17  5:59 Stephen Rothwell
  2013-12-17  8:26 ` Heiko Stübner
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-12-17  5:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Heiko Stuebner

[-- Attachment #1: Type: text/plain, Size: 9630 bytes --]

Hi all,

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

drivers/rtc/rtc-hym8563.c:90:17: error: field 'clkout_hw' has incomplete type
  struct clk_hw  clkout_hw;
                 ^
In file included from include/asm-generic/bug.h:13:0,
                 from arch/powerpc/include/asm/bug.h:127,
                 from include/linux/bug.h:4,
                 from include/linux/thread_info.h:11,
                 from include/asm-generic/preempt.h:4,
                 from arch/powerpc/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/rtc/rtc-hym8563.c:20:
drivers/rtc/rtc-hym8563.c: In function 'hym8563_clkout_recalc_rate':
include/linux/kernel.h:801:48: warning: initialization from incompatible pointer type [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:305:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
include/linux/kernel.h:801:48: warning: (near initialization for 'hym8563') [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:305:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
drivers/rtc/rtc-hym8563.c: In function 'hym8563_clkout_set_rate':
include/linux/kernel.h:801:48: warning: initialization from incompatible pointer type [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:331:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
include/linux/kernel.h:801:48: warning: (near initialization for 'hym8563') [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:331:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
drivers/rtc/rtc-hym8563.c: In function 'hym8563_clkout_control':
include/linux/kernel.h:801:48: warning: initialization from incompatible pointer type [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:352:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
include/linux/kernel.h:801:48: warning: (near initialization for 'hym8563') [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:352:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
drivers/rtc/rtc-hym8563.c: In function 'hym8563_clkout_is_prepared':
include/linux/kernel.h:801:48: warning: initialization from incompatible pointer type [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:379:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
include/linux/kernel.h:801:48: warning: (near initialization for 'hym8563') [enabled by default]
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
drivers/rtc/rtc-hym8563.c:293:35: note: in expansion of macro 'container_of'
 #define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
                                   ^
drivers/rtc/rtc-hym8563.c:379:28: note: in expansion of macro 'clkout_hw_to_hym8563'
  struct hym8563 *hym8563 = clkout_hw_to_hym8563(hw);
                            ^
drivers/rtc/rtc-hym8563.c: At top level:
drivers/rtc/rtc-hym8563.c:389:14: error: variable 'hym8563_clkout_ops' has initializer but incomplete type
 const struct clk_ops hym8563_clkout_ops = {
              ^
drivers/rtc/rtc-hym8563.c:390:2: error: unknown field 'prepare' specified in initializer
  .prepare = hym8563_clkout_prepare,
  ^
drivers/rtc/rtc-hym8563.c:390:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:390:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c:391:2: error: unknown field 'unprepare' specified in initializer
  .unprepare = hym8563_clkout_unprepare,
  ^
drivers/rtc/rtc-hym8563.c:391:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:391:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c:392:2: error: unknown field 'is_prepared' specified in initializer
  .is_prepared = hym8563_clkout_is_prepared,
  ^
drivers/rtc/rtc-hym8563.c:392:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:392:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c:393:2: error: unknown field 'recalc_rate' specified in initializer
  .recalc_rate = hym8563_clkout_recalc_rate,
  ^
drivers/rtc/rtc-hym8563.c:393:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:393:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c:394:2: error: unknown field 'round_rate' specified in initializer
  .round_rate = hym8563_clkout_round_rate,
  ^
drivers/rtc/rtc-hym8563.c:394:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:394:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c:395:2: error: unknown field 'set_rate' specified in initializer
  .set_rate = hym8563_clkout_set_rate,
  ^
drivers/rtc/rtc-hym8563.c:395:2: warning: excess elements in struct initializer [enabled by default]
drivers/rtc/rtc-hym8563.c:395:2: warning: (near initialization for 'hym8563_clkout_ops') [enabled by default]
drivers/rtc/rtc-hym8563.c: In function 'hym8563_clkout_register_clk':
drivers/rtc/rtc-hym8563.c:403:23: error: storage size of 'init' isn't known
  struct clk_init_data init;
                       ^
drivers/rtc/rtc-hym8563.c:413:15: error: 'CLK_IS_ROOT' undeclared (first use in this function)
  init.flags = CLK_IS_ROOT;
               ^
drivers/rtc/rtc-hym8563.c:413:15: note: each undeclared identifier is reported only once for each function it appears in
drivers/rtc/rtc-hym8563.c:419:2: error: implicit declaration of function 'clk_register' [-Werror=implicit-function-declaration]
  clk = clk_register(&client->dev, &hym8563->clkout_hw);
  ^
drivers/rtc/rtc-hym8563.c:422:3: error: implicit declaration of function 'of_clk_add_provider' [-Werror=implicit-function-declaration]
   of_clk_add_provider(node, of_clk_src_simple_get, clk);
   ^
drivers/rtc/rtc-hym8563.c:422:29: error: 'of_clk_src_simple_get' undeclared (first use in this function)
   of_clk_add_provider(node, of_clk_src_simple_get, clk);
                             ^
drivers/rtc/rtc-hym8563.c:403:23: warning: unused variable 'init' [-Wunused-variable]
  struct clk_init_data init;
                       ^

Caused by commit 34ef6d7fe467 ("rtc: add hym8563 rtc-driver") from the
akpm-current tree.  Probably some missing include(s).

I just reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-16 12:33       ` Mark Brown
@ 2013-12-16 13:29         ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2013-12-16 13:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: Krzysztof Kozlowski, Kyungmin Park, linux-next, linux-kernel,
	Andrew Morton, Linus

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

On Mon, 16 Dec 2013 12:33:01 +0000 Mark Brown <broonie@kernel.org> wrote:
>
> On Mon, Dec 16, 2013 at 01:13:41PM +0100, Krzysztof Kozlowski wrote:
> 
> > Thanks for applying the patch. The commit introducing error was picked
> > up by Andrew to MM tree and lately got merged to Linus' tree:
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8d2763770c34e8ed771f0be86760eb4485febc05
> 
> Yeah, I saw it went in through -mm - what I was wondering was why it
> wasn't causing failures in -next.

That patch was never in mmotm (which is what linux-next mostly
includes).  mmotm hasn't been updated since Nov 22.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-16 12:13     ` Krzysztof Kozlowski
@ 2013-12-16 12:33       ` Mark Brown
  2013-12-16 13:29         ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Mark Brown @ 2013-12-16 12:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Stephen Rothwell, Kyungmin Park, linux-next, linux-kernel,
	Andrew Morton, Linus

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

On Mon, Dec 16, 2013 at 01:13:41PM +0100, Krzysztof Kozlowski wrote:

> Thanks for applying the patch. The commit introducing error was picked
> up by Andrew to MM tree and lately got merged to Linus' tree:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8d2763770c34e8ed771f0be86760eb4485febc05

Yeah, I saw it went in through -mm - what I was wondering was why it
wasn't causing failures in -next.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-16 11:45   ` Mark Brown
@ 2013-12-16 12:13     ` Krzysztof Kozlowski
  2013-12-16 12:33       ` Mark Brown
  0 siblings, 1 reply; 195+ messages in thread
From: Krzysztof Kozlowski @ 2013-12-16 12:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Rothwell, Kyungmin Park, linux-next, linux-kernel,
	Andrew Morton, Linus

Hi,

On Mon, 2013-12-16 at 11:45 +0000, Mark Brown wrote:
> On Mon, Dec 16, 2013 at 08:08:34AM +0100, Krzysztof Kozlowski wrote:
> 
> > I sent a fix for this already on last Wednesday but I forgot to put you
> > on as recipient.
> > http://thread.gmane.org/gmane.linux.kernel/1612360
> > Fix is needed also for clock driver and on Saturday Rashika Kheria
> > posted similar patch.
> 
> I've now applied your patch (which fixes both regulator and clocks, the
> separate patch isn't needed).  The big question I have is how this
> managed to get into Linus' tree - why didn't this show up in -next?

Thanks for applying the patch. The commit introducing error was picked
up by Andrew to MM tree and lately got merged to Linus' tree:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8d2763770c34e8ed771f0be86760eb4485febc05

Best regards,
Krzysztof

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-16  7:08 ` Krzysztof Kozlowski
@ 2013-12-16 11:45   ` Mark Brown
  2013-12-16 12:13     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 195+ messages in thread
From: Mark Brown @ 2013-12-16 11:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Stephen Rothwell, Kyungmin Park, linux-next, linux-kernel,
	Andrew Morton, Linus

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

On Mon, Dec 16, 2013 at 08:08:34AM +0100, Krzysztof Kozlowski wrote:

> I sent a fix for this already on last Wednesday but I forgot to put you
> on as recipient.
> http://thread.gmane.org/gmane.linux.kernel/1612360
> Fix is needed also for clock driver and on Saturday Rashika Kheria
> posted similar patch.

I've now applied your patch (which fixes both regulator and clocks, the
separate patch isn't needed).  The big question I have is how this
managed to get into Linus' tree - why didn't this show up in -next?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-12-16  5:47 Stephen Rothwell
@ 2013-12-16  7:08 ` Krzysztof Kozlowski
  2013-12-16 11:45   ` Mark Brown
  0 siblings, 1 reply; 195+ messages in thread
From: Krzysztof Kozlowski @ 2013-12-16  7:08 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Kyungmin Park, linux-next, linux-kernel, Mark Brown,
	Andrew Morton, Linus

Hi,

I sent a fix for this already on last Wednesday but I forgot to put you
on as recipient.
http://thread.gmane.org/gmane.linux.kernel/1612360
Fix is needed also for clock driver and on Saturday Rashika Kheria
posted similar patch.

Best regards,
Krzysztof


On Mon, 2013-12-16 at 16:47 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/regulator/s2mps11.c: In function 's2mps11_pmic_probe':
> drivers/regulator/s2mps11.c:441:23: error: 'struct sec_pmic_dev' has no member named 'regmap'
>   config.regmap = iodev->regmap;
>                        ^
> 
> Caused by commit 3e1e4a5f3a32 ("mfd/rtc: s5m: fix register updating by
> adding regmap for RTC") from Linus' tree.  Grep is your friend ...
> 
> I have added the following fix patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 16 Dec 2013 16:43:02 +1100
> Subject: [PATCH] mfd/rtc: fix for previous RTC fix
> 
> This updates drivers/regulator/s2mps11.c for the changes in commit
> 3e1e4a5f3a32 ("mfd/rtc: s5m: fix register updating by adding regmap
> for RTC").
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/regulator/s2mps11.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
> index 333677d68d0e..9e61922d8230 100644
> --- a/drivers/regulator/s2mps11.c
> +++ b/drivers/regulator/s2mps11.c
> @@ -438,7 +438,7 @@ common_reg:
>  	platform_set_drvdata(pdev, s2mps11);
>  
>  	config.dev = &pdev->dev;
> -	config.regmap = iodev->regmap;
> +	config.regmap = iodev->regmap_pmic;
>  	config.driver_data = s2mps11;
>  	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
>  		if (!reg_np) {
> -- 
> 1.8.5.1
> 

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

* linux-next: build failure after merge of the final tree
@ 2013-12-16  5:47 Stephen Rothwell
  2013-12-16  7:08 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-12-16  5:47 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-next, linux-kernel, Mark Brown, Andrew Morton, Linus

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

Hi all,

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

drivers/regulator/s2mps11.c: In function 's2mps11_pmic_probe':
drivers/regulator/s2mps11.c:441:23: error: 'struct sec_pmic_dev' has no member named 'regmap'
  config.regmap = iodev->regmap;
                       ^

Caused by commit 3e1e4a5f3a32 ("mfd/rtc: s5m: fix register updating by
adding regmap for RTC") from Linus' tree.  Grep is your friend ...

I have added the following fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 16 Dec 2013 16:43:02 +1100
Subject: [PATCH] mfd/rtc: fix for previous RTC fix

This updates drivers/regulator/s2mps11.c for the changes in commit
3e1e4a5f3a32 ("mfd/rtc: s5m: fix register updating by adding regmap
for RTC").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/regulator/s2mps11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 333677d68d0e..9e61922d8230 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -438,7 +438,7 @@ common_reg:
 	platform_set_drvdata(pdev, s2mps11);
 
 	config.dev = &pdev->dev;
-	config.regmap = iodev->regmap;
+	config.regmap = iodev->regmap_pmic;
 	config.driver_data = s2mps11;
 	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
 		if (!reg_np) {
-- 
1.8.5.1

-- 
Cheers,
Stephen Rothwell <sfr@canb.auug.org.au>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-11-18  8:49 ` Kirill A. Shutemov
@ 2013-11-18 23:09   ` David Miller
  0 siblings, 0 replies; 195+ messages in thread
From: David Miller @ 2013-11-18 23:09 UTC (permalink / raw)
  To: kirill.shutemov; +Cc: sfr, torvalds, akpm, linux-next, linux-kernel

From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date: Mon, 18 Nov 2013 10:49:41 +0200 (EET)

> Stephen Rothwell wrote:
>> Hi all,
>> 
>> After merging the final tree, today's linux-next build (sparc64 defconfig)
>> failed like this:
>> 
>> arch/sparc/mm/init_64.c: In function 'pte_alloc_one':
>> arch/sparc/mm/init_64.c:2568:9: error: unused variable 'pte' [-Werror=unused-variable]
>> 
>> Caused by the merge between commit 37b3a8ff3e08 ("sparc64: Move from 4MB
>> to 8MB huge pages") and commit 1ae9ae5f7df7 ("sparc: handle
>> pgtable_page_ctor() fail") (I had the following merge fix in linux-next,
>> but it didn't seem to propagate upstream - may have forgotten to point it
>> out :-().
>> 
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Mon, 18 Nov 2013 14:16:40 +1100
>> Subject: [PATCH] sparc64: merge fix
>> 
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

Applied, thanks everyone.

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

* RE: linux-next: build failure after merge of the final tree
  2013-11-18  3:19 Stephen Rothwell
@ 2013-11-18  8:49 ` Kirill A. Shutemov
  2013-11-18 23:09   ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Kirill A. Shutemov @ 2013-11-18  8:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Torvalds, Andrew Morton, linux-next, linux-kernel,
	Kirill A. Shutemov, David S. Miller

Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> arch/sparc/mm/init_64.c: In function 'pte_alloc_one':
> arch/sparc/mm/init_64.c:2568:9: error: unused variable 'pte' [-Werror=unused-variable]
> 
> Caused by the merge between commit 37b3a8ff3e08 ("sparc64: Move from 4MB
> to 8MB huge pages") and commit 1ae9ae5f7df7 ("sparc: handle
> pgtable_page_ctor() fail") (I had the following merge fix in linux-next,
> but it didn't seem to propagate upstream - may have forgotten to point it
> out :-().
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 18 Nov 2013 14:16:40 +1100
> Subject: [PATCH] sparc64: merge fix
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

> ---
>  arch/sparc/mm/init_64.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
> index 6b643790e4fe..5322e530d09c 100644
> --- a/arch/sparc/mm/init_64.c
> +++ b/arch/sparc/mm/init_64.c
> @@ -2565,8 +2565,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm,
>  {
>  	struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK |
>  				       __GFP_REPEAT | __GFP_ZERO);
> -	pte_t *pte = NULL;
> -
>  	if (!page)
>  		return NULL;
>  	if (!pgtable_page_ctor(page)) {
> -- 
> 1.8.4.3
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au

-- 
 Kirill A. Shutemov

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

* linux-next: build failure after merge of the final tree
@ 2013-11-18  3:19 Stephen Rothwell
  2013-11-18  8:49 ` Kirill A. Shutemov
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-11-18  3:19 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linux-next, linux-kernel, Kirill A. Shutemov, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]

Hi all,

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

arch/sparc/mm/init_64.c: In function 'pte_alloc_one':
arch/sparc/mm/init_64.c:2568:9: error: unused variable 'pte' [-Werror=unused-variable]

Caused by the merge between commit 37b3a8ff3e08 ("sparc64: Move from 4MB
to 8MB huge pages") and commit 1ae9ae5f7df7 ("sparc: handle
pgtable_page_ctor() fail") (I had the following merge fix in linux-next,
but it didn't seem to propagate upstream - may have forgotten to point it
out :-().

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 18 Nov 2013 14:16:40 +1100
Subject: [PATCH] sparc64: merge fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/mm/init_64.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 6b643790e4fe..5322e530d09c 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2565,8 +2565,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm,
 {
 	struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK |
 				       __GFP_REPEAT | __GFP_ZERO);
-	pte_t *pte = NULL;
-
 	if (!page)
 		return NULL;
 	if (!pgtable_page_ctor(page)) {
-- 
1.8.4.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2013-11-18  3:01 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2013-11-18  3:01 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linux-next, linux-kernel, Kirill A. Shutemov

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

Hi all,

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

In file included from arch/sparc/include/asm/tlbflush_64.h:4:0,
                 from arch/sparc/include/asm/tlbflush.h:4,
                 from arch/sparc/include/asm/pgtable_64.h:961,
                 from arch/sparc/include/asm/pgtable.h:4,
                 from arch/sparc/mm/tsb.c:10:
include/linux/mm.h: In function 'pgtable_init':
include/linux/mm.h:1391:2: error: implicit declaration of function 'pgtable_cache_init' [-Werror=implicit-function-declaration]
In file included from arch/sparc/include/asm/pgtable.h:4:0,
                 from arch/sparc/mm/tsb.c:10:
arch/sparc/include/asm/pgtable_64.h: At top level:
arch/sparc/include/asm/pgtable_64.h:978:13: error: conflicting types for 'pgtable_cache_init' [-Werror]
include/linux/mm.h:1391:2: note: previous implicit declaration of 'pgtable_cache_init' was here

Caused by commit ea1e7ed33708 ("mm: create a separate slab for page->ptl
allocation") from Linus' tree.  I have not seen that patch in linux-next
before today :-(

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-11-04  6:52 Stephen Rothwell
@ 2013-11-04 17:06 ` Mark Brown
  0 siblings, 0 replies; 195+ messages in thread
From: Mark Brown @ 2013-11-04 17:06 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Liam Girdwood, linux-next, linux-kernel, Nicolin Chen

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

On Mon, Nov 04, 2013 at 05:52:51PM +1100, Stephen Rothwell wrote:

> Caused by commit fc1a38653793 ("ASoC: Add pinctrl PM to components of
> active DAIs") from the sound-asoc tree.

> I have reverted that commit for today.

Thanks, I'd already reverted it in my tree after a report from Fengguang
but that must've been after you fetched the trees for today.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2013-11-04  6:52 Stephen Rothwell
  2013-11-04 17:06 ` Mark Brown
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-11-04  6:52 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: linux-next, linux-kernel, Nicolin Chen

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

Hi all,

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

sound/soc/soc-pcm.c: In function 'soc_pcm_open':
sound/soc/soc-pcm.c:186:2: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration]
  pinctrl_pm_select_default_state(cpu_dai->dev);
  ^
sound/soc/soc-pcm.c:323:3: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration]
   pinctrl_pm_select_sleep_state(codec_dai->dev);
   ^

Caused by commit fc1a38653793 ("ASoC: Add pinctrl PM to components of
active DAIs") from the sound-asoc tree.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-10-29 13:11 ` Linus Walleij
@ 2013-10-29 13:20   ` Linus Walleij
  0 siblings, 0 replies; 195+ messages in thread
From: Linus Walleij @ 2013-10-29 13:20 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alexandre Courbot

On Tue, Oct 29, 2013 at 2:11 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Oct 29, 2013 at 10:16 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
>> drivers/built-in.o: In function `mmc_gpio_request_cd':
>> clkdev.c:(.text+0x75c3c): undefined reference to `devm_gpio_request_one'
>>
>> CONFIG_GPIO_DEVRES is not defined for this build.  I am not sure what
>> made the above error show up, and I have left it broken for today.
>
> Hm and I thought I had put proper stubs in place for this.
> Oh well, better take a look again.

Bah I had just missed to push that to the for-next branch.

This will work tomorrow, fingers crossed.

Yours,
Linus Walleij

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

* Re: linux-next: build failure after merge of the final tree
  2013-10-29  9:16 Stephen Rothwell
@ 2013-10-29 13:11 ` Linus Walleij
  2013-10-29 13:20   ` Linus Walleij
  0 siblings, 1 reply; 195+ messages in thread
From: Linus Walleij @ 2013-10-29 13:11 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

On Tue, Oct 29, 2013 at 10:16 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> drivers/built-in.o: In function `mmc_gpio_request_cd':
> clkdev.c:(.text+0x75c3c): undefined reference to `devm_gpio_request_one'
>
> CONFIG_GPIO_DEVRES is not defined for this build.  I am not sure what
> made the above error show up, and I have left it broken for today.

Hm and I thought I had put proper stubs in place for this.
Oh well, better take a look again.

Yours,
Linus Walleij

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

* linux-next: build failure after merge of the final tree
@ 2013-10-29  9:16 Stephen Rothwell
  2013-10-29 13:11 ` Linus Walleij
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-10-29  9:16 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

Hi all,

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

drivers/built-in.o: In function `mmc_gpio_request_cd':
clkdev.c:(.text+0x75c3c): undefined reference to `devm_gpio_request_one'

CONFIG_GPIO_DEVRES is not defined for this build.  I am not sure what
made the above error show up, and I have left it broken for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-09-27  8:32 Stephen Rothwell
@ 2013-09-27 14:40 ` Chris Ball
  0 siblings, 0 replies; 195+ messages in thread
From: Chris Ball @ 2013-09-27 14:40 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Dong Aisheng

Hi Stephen,

On Fri, Sep 27 2013, Stephen Rothwell wrote:
> drivers/mmc/host/sdhci-of-esdhc.c: In function 'esdhc_of_set_clock':
> drivers/mmc/host/sdhci-of-esdhc.c:230:10: error: 'host_clock' undeclared (first use in this function)
>    clock, host_clock / pre_div / div);

Sorry about that.  I've pushed the proper fix out to mmc-next now,
so you can drop your temporary fix.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>

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

* linux-next: build failure after merge of the final tree
@ 2013-09-27  8:32 Stephen Rothwell
  2013-09-27 14:40 ` Chris Ball
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-09-27  8:32 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-next, linux-kernel, Dong Aisheng

[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

Hi all,

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

In file included from include/linux/kernel.h:14:0,
                 from include/linux/debug_locks.h:4,
                 from include/linux/lockdep.h:23,
                 from include/linux/sysfs.h:18,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from arch/powerpc/include/asm/io.h:27,
                 from include/linux/io.h:22,
                 from drivers/mmc/host/sdhci-of-esdhc.c:17:
drivers/mmc/host/sdhci-of-esdhc.c: In function 'esdhc_of_set_clock':
drivers/mmc/host/sdhci-of-esdhc.c:230:10: error: 'host_clock' undeclared (first use in this function)
   clock, host_clock / pre_div / div);
          ^
include/linux/dynamic_debug.h:87:9: note: in definition of macro 'dynamic_dev_dbg'
       ##__VA_ARGS__);  \
         ^
drivers/mmc/host/sdhci-of-esdhc.c:229:2: note: in expansion of macro 'dev_dbg'
  dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
  ^

Caused by commit d31fc00a71b4 ("mmc: sdhci-esdhc: move common
esdhc_set_clock to platform driver") from the mmc tree.

I applied this temporary fix (reverting looked too hard):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 27 Sep 2013 18:28:29 +1000
Subject: [PATCH] mmc: sdhci-esdhc: temporary build fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/mmc/host/sdhci-of-esdhc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index b1605a1..82d22ff 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -226,8 +226,8 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 	while (host->max_clk / pre_div / div > clock && div < 16)
 		div++;
 
-	dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
-		clock, host_clock / pre_div / div);
+	// dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
+	//	clock, host_clock / pre_div / div);
 
 	pre_div >>= 1;
 	div--;
-- 
1.8.4.rc3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-21  6:30       ` Jeremy Kerr
@ 2013-08-21 15:56         ` Ben Myers
  0 siblings, 0 replies; 195+ messages in thread
From: Ben Myers @ 2013-08-21 15:56 UTC (permalink / raw)
  To: Jeremy Kerr
  Cc: cbe-oss-dev, Stephen Rothwell, Arnd Bergmann,
	Benjamin Herrenschmidt, Dwight Engen, linux-kernel, xfs,
	linux-next, Gao feng, linuxppc-dev

Hey Dwight,

On Wed, Aug 21, 2013 at 02:30:04PM +0800, Jeremy Kerr wrote:
> > Yes, I agree. The other filesystems that take an Opt_uid as well do use
> > current_user_ns() and not init_user_ns. They also do a uid_valid()
> > check and fail the mount (or fallback to GLOBAL_ROOT_UID). So I think
> > that would look like this:
> 
> Looks good to me. Builds and mounts as expected.
> 
> Acked-by: Jeremy Kerr <jk@ozlabs.org>

Could you repost this patch with the right subject and a commit header?  Given
Jeremy's Ack I think we could proceed to pull this in.

Regards,
	Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-21  0:22     ` Stephen Rothwell
@ 2013-08-21 15:54       ` Ben Myers
  0 siblings, 0 replies; 195+ messages in thread
From: Ben Myers @ 2013-08-21 15:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: cbe-oss-dev, Arnd Bergmann, Benjamin Herrenschmidt, Dwight Engen,
	linux-kernel, xfs, linux-next, Jeremy Kerr, linuxppc-dev,
	Gao feng

Hey Stephen,

On Wed, Aug 21, 2013 at 10:22:46AM +1000, Stephen Rothwell wrote:
> On Tue, 20 Aug 2013 14:28:44 -0500 Ben Myers <bpm@sgi.com> wrote:
> > I'd prefer not to break Stephen's tree two days in a row.  We could just revert
> > d6970d4b726c in the xfs tree for the time being as Stephen has done, but given
> > the choice would prefer the fix.  Do you have a preference between the two
> > approaches that Dwight has posted?  The first seems more conservative...
> 
> I will automatically revert that commit when I merge the xfs tree until
> some other solution is forthcoming (so you don't have to do the revert in
> the xfs tree).

Gah.  That makes sense.  ;)

> This does need to be fixed fairly soon, though.

Agreed, thanks.

-Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-21  5:08     ` Dwight Engen
@ 2013-08-21  6:30       ` Jeremy Kerr
  2013-08-21 15:56         ` Ben Myers
  0 siblings, 1 reply; 195+ messages in thread
From: Jeremy Kerr @ 2013-08-21  6:30 UTC (permalink / raw)
  To: Dwight Engen
  Cc: cbe-oss-dev, Stephen Rothwell, Arnd Bergmann,
	Benjamin Herrenschmidt, linux-kernel, xfs, Ben Myers, linux-next,
	Gao feng, linuxppc-dev

Hi all,

> Yes, I agree. The other filesystems that take an Opt_uid as well do use
> current_user_ns() and not init_user_ns. They also do a uid_valid()
> check and fail the mount (or fallback to GLOBAL_ROOT_UID). So I think
> that would look like this:

Looks good to me. Builds and mounts as expected.

Acked-by: Jeremy Kerr <jk@ozlabs.org>

Cheers,


Jeremy

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-20 20:46   ` Arnd Bergmann
@ 2013-08-21  5:08     ` Dwight Engen
  2013-08-21  6:30       ` Jeremy Kerr
  0 siblings, 1 reply; 195+ messages in thread
From: Dwight Engen @ 2013-08-21  5:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: cbe-oss-dev, Stephen Rothwell, Benjamin Herrenschmidt,
	linux-kernel, xfs, Ben Myers, linux-next, Gao feng, linuxppc-dev,
	Jeremy Kerr

On Tue, 20 Aug 2013 22:46:30 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Tuesday 20 August 2013, Dwight Engen wrote:
> > diff --git a/arch/powerpc/platforms/cell/spufs/inode.c
> > b/arch/powerpc/platforms/cell/spufs/inode.c index f390042..90fb308
> > 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c
> > +++ b/arch/powerpc/platforms/cell/spufs/inode.c
> > @@ -620,12 +620,12 @@ spufs_parse_options(struct super_block *sb,
> > char *options, struct inode *root) case Opt_uid:
> >                         if (match_int(&args[0], &option))
> >                                 return 0;
> > -                       root->i_uid = option;
> > +                       root->i_uid = make_kuid(&init_user_ns,
> > option); break;
> >                 case Opt_gid:
> >                         if (match_int(&args[0], &option))
> >                                 return 0;
> > -                       root->i_gid = option;
> > +                       root->i_gid = make_kgid(&init_user_ns,
> > option); break;
> >                 case Opt_mode:
> >                         if (match_octal(&args[0], &option))
> 
> Doesn't this mean the uid/gid is taken from the initial namespace
> rather than from the namespace of the 'mount' process calling this? I
> think the logical choice would be to have the UID be the one that
> gets passed here in the caller's namespace.

Yes, I agree. The other filesystems that take an Opt_uid as well do use
current_user_ns() and not init_user_ns. They also do a uid_valid()
check and fail the mount (or fallback to GLOBAL_ROOT_UID). So I think
that would look like this:

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index f390042..87ba7cf 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -620,12 +620,16 @@ spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
                case Opt_uid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       root->i_uid = option;
+                       root->i_uid = make_kuid(current_user_ns(), option);
+                       if (!uid_valid(root->i_uid))
+                               return 0;
                        break;
                case Opt_gid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       root->i_gid = option;
+                       root->i_gid = make_kgid(current_user_ns(), option);
+                       if (!gid_valid(root->i_gid))
+                               return 0;
                        break;
                case Opt_mode:
                        if (match_octal(&args[0], &option))

Again, I have not run tested this so we may just want to disable SPU_FS
with USER_NS until they can be tested together.

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-20 19:28   ` Ben Myers
@ 2013-08-21  0:22     ` Stephen Rothwell
  2013-08-21 15:54       ` Ben Myers
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-08-21  0:22 UTC (permalink / raw)
  To: Ben Myers
  Cc: cbe-oss-dev, Arnd Bergmann, Benjamin Herrenschmidt, Dwight Engen,
	linux-kernel, xfs, linux-next, Jeremy Kerr, linuxppc-dev,
	Gao feng


[-- Attachment #1.1: Type: text/plain, Size: 689 bytes --]

Hi Ben,

On Tue, 20 Aug 2013 14:28:44 -0500 Ben Myers <bpm@sgi.com> wrote:
>
> I'd prefer not to break Stephen's tree two days in a row.  We could just revert
> d6970d4b726c in the xfs tree for the time being as Stephen has done, but given
> the choice would prefer the fix.  Do you have a preference between the two
> approaches that Dwight has posted?  The first seems more conservative...

I will automatically revert that commit when I merge the xfs tree until
some other solution is forthcoming (so you don't have to do the revert in
the xfs tree).  This does need to be fixed fairly soon, though.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-20 16:07 ` Dwight Engen
  2013-08-20 19:28   ` Ben Myers
@ 2013-08-20 20:46   ` Arnd Bergmann
  2013-08-21  5:08     ` Dwight Engen
  1 sibling, 1 reply; 195+ messages in thread
From: Arnd Bergmann @ 2013-08-20 20:46 UTC (permalink / raw)
  To: Dwight Engen
  Cc: cbe-oss-dev, Stephen Rothwell, Benjamin Herrenschmidt,
	linux-kernel, xfs, Ben Myers, linux-next, Gao feng, linuxppc-dev,
	Jeremy Kerr

On Tuesday 20 August 2013, Dwight Engen wrote:
> diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
> index f390042..90fb308 100644
> --- a/arch/powerpc/platforms/cell/spufs/inode.c
> +++ b/arch/powerpc/platforms/cell/spufs/inode.c
> @@ -620,12 +620,12 @@ spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
>                 case Opt_uid:
>                         if (match_int(&args[0], &option))
>                                 return 0;
> -                       root->i_uid = option;
> +                       root->i_uid = make_kuid(&init_user_ns, option);
>                         break;
>                 case Opt_gid:
>                         if (match_int(&args[0], &option))
>                                 return 0;
> -                       root->i_gid = option;
> +                       root->i_gid = make_kgid(&init_user_ns, option);
>                         break;
>                 case Opt_mode:
>                         if (match_octal(&args[0], &option))

Doesn't this mean the uid/gid is taken from the initial namespace rather than
from the namespace of the 'mount' process calling this? I think the logical
choice would be to have the UID be the one that gets passed here in the caller's
namespace.

	Arnd

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-20 16:07 ` Dwight Engen
@ 2013-08-20 19:28   ` Ben Myers
  2013-08-21  0:22     ` Stephen Rothwell
  2013-08-20 20:46   ` Arnd Bergmann
  1 sibling, 1 reply; 195+ messages in thread
From: Ben Myers @ 2013-08-20 19:28 UTC (permalink / raw)
  To: Dwight Engen, Jeremy Kerr
  Cc: cbe-oss-dev, Stephen Rothwell, Arnd Bergmann,
	Benjamin Herrenschmidt, linux-kernel, xfs, linux-next, Gao feng,
	linuxppc-dev

Hi Jeremy,

Apologies for breaking your build...

On Tue, Aug 20, 2013 at 12:07:02PM -0400, Dwight Engen wrote:
> On Tue, 20 Aug 2013 17:20:52 +1000
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > arch/powerpc/platforms/cell/spufs/inode.c: In function
> > 'spufs_parse_options':
> > arch/powerpc/platforms/cell/spufs/inode.c:623:16: error: incompatible
> > types when assigning to type 'kuid_t' from type 'int' root->i_uid =
> > option; ^ arch/powerpc/platforms/cell/spufs/inode.c:628:16: error:
> > incompatible types when assigning to type 'kgid_t' from type 'int'
> > root->i_gid = option; ^
> > 
> > Caused by commit d6970d4b726c ("enable building user namespace with
> > xfs") from the xfs tree (that was fun to find :-)).
> > 
> > I have reverted that commit for today.  It could probably be replaced
> > with a patch that just changed XFS_FS to SPU_FS in the
> > UIDGID_CONVERTED config dependency - or someone could fix up SPU_FS.
> 
> Hi, (already sent this email based on Intel's kbuild robot this
> morning, sorry for the dup to those who already got it). 
> 
> Yep this looks to me like SPU_FS should have been in the list of
> stuff that had not been UIDGID_CONVERTED, but reviving
> UIDGID_CONVERTED and adding SPU_FS to it won't work for
> non powerpc arch because SPU_FS = n won't be defined. The following can
> be used to mark it as incompatible with USER_NS:
> 
> diff --git a/arch/powerpc/platforms/cell/Kconfig
> b/arch/powerpc/platforms/cell/Kconfig index 9978f59..fcf8336 100644
> --- a/arch/powerpc/platforms/cell/Kconfig
> +++ b/arch/powerpc/platforms/cell/Kconfig
> @@ -61,6 +61,7 @@ config SPU_FS
>         tristate "SPU file system"
>         default m
>         depends on PPC_CELL
> +       depends on USER_NS=n
>         select SPU_BASE
>         select MEMORY_HOTPLUG
>         help
> 
> Or if the rest of spufs is already okay for user namespace (I have not
> checked it, but this seems to be the only place it is dealing with
> uid/gid), then the following will fix these particular errors
> (cross-compile tested, but I don't have a powerpc to run test on):
> 
> diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
> index f390042..90fb308 100644
> --- a/arch/powerpc/platforms/cell/spufs/inode.c
> +++ b/arch/powerpc/platforms/cell/spufs/inode.c
> @@ -620,12 +620,12 @@ spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
>                 case Opt_uid:
>                         if (match_int(&args[0], &option))
>                                 return 0;
> -                       root->i_uid = option;
> +                       root->i_uid = make_kuid(&init_user_ns, option);
>                         break;
>                 case Opt_gid:
>                         if (match_int(&args[0], &option))
>                                 return 0;
> -                       root->i_gid = option;
> +                       root->i_gid = make_kgid(&init_user_ns, option);
>                         break;
>                 case Opt_mode:
>                         if (match_octal(&args[0], &option))

I'd prefer not to break Stephen's tree two days in a row.  We could just revert
d6970d4b726c in the xfs tree for the time being as Stephen has done, but given
the choice would prefer the fix.  Do you have a preference between the two
approaches that Dwight has posted?  The first seems more conservative...

Thanks,
	Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: linux-next: build failure after merge of the final tree
  2013-08-20  7:20 Stephen Rothwell
@ 2013-08-20 16:07 ` Dwight Engen
  2013-08-20 19:28   ` Ben Myers
  2013-08-20 20:46   ` Arnd Bergmann
  0 siblings, 2 replies; 195+ messages in thread
From: Dwight Engen @ 2013-08-20 16:07 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Ben Myers, David Chinner, xfs, linux-next, linux-kernel,
	linuxppc-dev, Gao feng, Jeremy Kerr, Arnd Bergmann,
	Benjamin Herrenschmidt, cbe-oss-dev

On Tue, 20 Aug 2013 17:20:52 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> arch/powerpc/platforms/cell/spufs/inode.c: In function
> 'spufs_parse_options':
> arch/powerpc/platforms/cell/spufs/inode.c:623:16: error: incompatible
> types when assigning to type 'kuid_t' from type 'int' root->i_uid =
> option; ^ arch/powerpc/platforms/cell/spufs/inode.c:628:16: error:
> incompatible types when assigning to type 'kgid_t' from type 'int'
> root->i_gid = option; ^
> 
> Caused by commit d6970d4b726c ("enable building user namespace with
> xfs") from the xfs tree (that was fun to find :-)).
> 
> I have reverted that commit for today.  It could probably be replaced
> with a patch that just changed XFS_FS to SPU_FS in the
> UIDGID_CONVERTED config dependency - or someone could fix up SPU_FS.

Hi, (already sent this email based on Intel's kbuild robot this
morning, sorry for the dup to those who already got it). 

Yep this looks to me like SPU_FS should have been in the list of
stuff that had not been UIDGID_CONVERTED, but reviving
UIDGID_CONVERTED and adding SPU_FS to it won't work for
non powerpc arch because SPU_FS = n won't be defined. The following can
be used to mark it as incompatible with USER_NS:

diff --git a/arch/powerpc/platforms/cell/Kconfig
b/arch/powerpc/platforms/cell/Kconfig index 9978f59..fcf8336 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -61,6 +61,7 @@ config SPU_FS
        tristate "SPU file system"
        default m
        depends on PPC_CELL
+       depends on USER_NS=n
        select SPU_BASE
        select MEMORY_HOTPLUG
        help

Or if the rest of spufs is already okay for user namespace (I have not
checked it, but this seems to be the only place it is dealing with
uid/gid), then the following will fix these particular errors
(cross-compile tested, but I don't have a powerpc to run test on):

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index f390042..90fb308 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -620,12 +620,12 @@ spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
                case Opt_uid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       root->i_uid = option;
+                       root->i_uid = make_kuid(&init_user_ns, option);
                        break;
                case Opt_gid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       root->i_gid = option;
+                       root->i_gid = make_kgid(&init_user_ns, option);
                        break;
                case Opt_mode:
                        if (match_octal(&args[0], &option))

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

* linux-next: build failure after merge of the final tree
@ 2013-08-20  7:20 Stephen Rothwell
  2013-08-20 16:07 ` Dwight Engen
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-08-20  7:20 UTC (permalink / raw)
  To: Ben Myers, David Chinner, xfs
  Cc: linux-next, linux-kernel, Dwight Engen, linuxppc-dev, Gao feng,
	Jeremy Kerr, Arnd Bergmann, Benjamin Herrenschmidt, cbe-oss-dev

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Hi all,

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

arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_parse_options':
arch/powerpc/platforms/cell/spufs/inode.c:623:16: error: incompatible types when assigning to type 'kuid_t' from type 'int'
    root->i_uid = option;
                ^
arch/powerpc/platforms/cell/spufs/inode.c:628:16: error: incompatible types when assigning to type 'kgid_t' from type 'int'
    root->i_gid = option;
                ^

Caused by commit d6970d4b726c ("enable building user namespace with xfs")
from the xfs tree (that was fun to find :-)).

I have reverted that commit for today.  It could probably be replaced
with a patch that just changed XFS_FS to SPU_FS in the UIDGID_CONVERTED
config dependency - or someone could fix up SPU_FS.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-03-12 16:13     ` Dmitry Torokhov
@ 2013-03-13 11:20       ` Daniel Hellstrom
  0 siblings, 0 replies; 195+ messages in thread
From: Daniel Hellstrom @ 2013-03-13 11:20 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Stephen Rothwell, linux-next, linux-kernel

On 03/12/2013 05:13 PM, Dmitry Torokhov wrote:
> On Tue, Mar 12, 2013 at 10:57:19PM +1100, Stephen Rothwell wrote:
>> On Tue, 12 Mar 2013 10:31:09 +0100 Daniel Hellstrom <daniel@gaisler.com> wrote:
>>> APBPS2 driver is missing linux/slab.h required on at least PowerPC. See patch below. How do you want me to proceed?
>> That is up to Dmitry - either a fix up patch (with SoB and commit
>> message) or a replacement patch.
> I fixed up the commit and refreshed the branch.
>
> Thanks.

Thanks,
Daniel

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

* Re: linux-next: build failure after merge of the final tree
  2013-03-12 11:57   ` Stephen Rothwell
@ 2013-03-12 16:13     ` Dmitry Torokhov
  2013-03-13 11:20       ` Daniel Hellstrom
  0 siblings, 1 reply; 195+ messages in thread
From: Dmitry Torokhov @ 2013-03-12 16:13 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Daniel Hellstrom, linux-next, linux-kernel

On Tue, Mar 12, 2013 at 10:57:19PM +1100, Stephen Rothwell wrote:
> On Tue, 12 Mar 2013 10:31:09 +0100 Daniel Hellstrom <daniel@gaisler.com> wrote:
> >
> > APBPS2 driver is missing linux/slab.h required on at least PowerPC. See patch below. How do you want me to proceed?
> 
> That is up to Dmitry - either a fix up patch (with SoB and commit
> message) or a replacement patch.

I fixed up the commit and refreshed the branch.

Thanks.

-- 
Dmitry

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

* Re: linux-next: build failure after merge of the final tree
  2013-03-12  9:31 ` Daniel Hellstrom
@ 2013-03-12 11:57   ` Stephen Rothwell
  2013-03-12 16:13     ` Dmitry Torokhov
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-03-12 11:57 UTC (permalink / raw)
  To: Daniel Hellstrom; +Cc: Dmitry Torokhov, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Tue, 12 Mar 2013 10:31:09 +0100 Daniel Hellstrom <daniel@gaisler.com> wrote:
>
> APBPS2 driver is missing linux/slab.h required on at least PowerPC. See patch below. How do you want me to proceed?

That is up to Dmitry - either a fix up patch (with SoB and commit
message) or a replacement patch.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-03-12  4:30 Stephen Rothwell
@ 2013-03-12  9:31 ` Daniel Hellstrom
  2013-03-12 11:57   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Daniel Hellstrom @ 2013-03-12  9:31 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Dmitry Torokhov, linux-next, linux-kernel

Hello,

APBPS2 driver is missing linux/slab.h required on at least PowerPC. See patch below. How do you want me to proceed?

Thanks,
Daniel


diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 611aac0..858b0c9 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -30,6 +30,7 @@
  #include <linux/string.h>
  #include <linux/kernel.h>
  #include <linux/io.h>
+#include <linux/slab.h>

  struct apbps2_regs {
         u32 __iomem data;       /* 0x00 */


On 03/12/2013 05:30 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/input/serio/apbps2.c: In function 'apbps2_of_probe':
> drivers/input/serio/apbps2.c:176:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
> drivers/input/serio/apbps2.c:176:11: warning: assignment makes pointer from integer without a cast [enabled by default]
>
> Caused by commit 928a48c9e40e ("Input: add support for GRLIB APBPS2 PS/2
> Keyboard/Mouse") from the input tree.
>
> I have reverted that commit for today.

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

* linux-next: build failure after merge of the final tree
@ 2013-03-12  4:30 Stephen Rothwell
  2013-03-12  9:31 ` Daniel Hellstrom
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-03-12  4:30 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-next, linux-kernel, Daniel Hellstrom

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Hi all,

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

drivers/input/serio/apbps2.c: In function 'apbps2_of_probe':
drivers/input/serio/apbps2.c:176:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
drivers/input/serio/apbps2.c:176:11: warning: assignment makes pointer from integer without a cast [enabled by default]

Caused by commit 928a48c9e40e ("Input: add support for GRLIB APBPS2 PS/2
Keyboard/Mouse") from the input tree.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2013-02-06 17:52   ` Greg Kroah-Hartman
@ 2013-02-06 18:40     ` David Miller
  0 siblings, 0 replies; 195+ messages in thread
From: David Miller @ 2013-02-06 18:40 UTC (permalink / raw)
  To: gregkh; +Cc: sfr, linux-next, linux-kernel

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Wed, 6 Feb 2013 09:52:05 -0800

> Sorry for missing this one, the fix looks correct to me, I'll queue it
> up in my tree, or it can go through David's.

It should go via your tree, my tree didn't add this regression.

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

* Re: linux-next: build failure after merge of the final tree
  2013-02-06  7:42 ` Stephen Rothwell
@ 2013-02-06 17:52   ` Greg Kroah-Hartman
  2013-02-06 18:40     ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Greg Kroah-Hartman @ 2013-02-06 17:52 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, David S. Miller

On Wed, Feb 06, 2013 at 06:42:43PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 6 Feb 2013 18:30:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (sparc defconfig)
> > failed like this:
> > 
> > arch/sparc/kernel/kgdb_32.c: In function 'sleeping_thread_to_gdb_regs':
> > arch/sparc/kernel/kgdb_32.c:46:9: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
> > arch/sparc/kernel/kgdb_32.c:46:26: error: initialization makes pointer from integer without a cast [-Werror]
> > 
> > I can only imagine that the implicit include of linux/sched.h got removed
> > in one of our include file changes. :-(
> > 
> > I have added this patch for today:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Wed, 6 Feb 2013 18:26:51 +1100
> > Subject: [PATCH] sparc: explicitly include sched.h to get task_thread_info declaration
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  arch/sparc/kernel/kgdb_32.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
> > index 2e424a5..dcf2108 100644
> > --- a/arch/sparc/kernel/kgdb_32.c
> > +++ b/arch/sparc/kernel/kgdb_32.c
> > @@ -5,6 +5,7 @@
> >  
> >  #include <linux/kgdb.h>
> >  #include <linux/kdebug.h>
> > +#include <linux/sched.h>
> >  
> >  #include <asm/kdebug.h>
> >  #include <asm/ptrace.h>
> 
> This was probably caused by commit 16559ae48c76 ("kgdb: remove #include
> <linux/serial_8250.h> from kgdb.h") from the tty tree.
> 
> Removing includes from include files is always fraught with this sort of
> danger :-(

Yes it is, and I caught a bunch of crazy dependancies when I fixed this
up, but now the build should be so much easier for those of us working
on the serial code, the whole tree will now not have to rebuild for no
reason at all.

Sorry for missing this one, the fix looks correct to me, I'll queue it
up in my tree, or it can go through David's.

thanks,

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2013-02-06  7:30 Stephen Rothwell
@ 2013-02-06  7:42 ` Stephen Rothwell
  2013-02-06 17:52   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-02-06  7:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

Hi all,

On Wed, 6 Feb 2013 18:30:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (sparc defconfig)
> failed like this:
> 
> arch/sparc/kernel/kgdb_32.c: In function 'sleeping_thread_to_gdb_regs':
> arch/sparc/kernel/kgdb_32.c:46:9: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
> arch/sparc/kernel/kgdb_32.c:46:26: error: initialization makes pointer from integer without a cast [-Werror]
> 
> I can only imagine that the implicit include of linux/sched.h got removed
> in one of our include file changes. :-(
> 
> I have added this patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 6 Feb 2013 18:26:51 +1100
> Subject: [PATCH] sparc: explicitly include sched.h to get task_thread_info declaration
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/kernel/kgdb_32.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
> index 2e424a5..dcf2108 100644
> --- a/arch/sparc/kernel/kgdb_32.c
> +++ b/arch/sparc/kernel/kgdb_32.c
> @@ -5,6 +5,7 @@
>  
>  #include <linux/kgdb.h>
>  #include <linux/kdebug.h>
> +#include <linux/sched.h>
>  
>  #include <asm/kdebug.h>
>  #include <asm/ptrace.h>

This was probably caused by commit 16559ae48c76 ("kgdb: remove #include
<linux/serial_8250.h> from kgdb.h") from the tty tree.

Removing includes from include files is always fraught with this sort of
danger :-(
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2013-02-06  7:30 Stephen Rothwell
  2013-02-06  7:42 ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2013-02-06  7:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

Hi all,

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

arch/sparc/kernel/kgdb_32.c: In function 'sleeping_thread_to_gdb_regs':
arch/sparc/kernel/kgdb_32.c:46:9: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
arch/sparc/kernel/kgdb_32.c:46:26: error: initialization makes pointer from integer without a cast [-Werror]

I can only imagine that the implicit include of linux/sched.h got removed
in one of our include file changes. :-(

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 6 Feb 2013 18:26:51 +1100
Subject: [PATCH] sparc: explicitly include sched.h to get task_thread_info declaration

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/kgdb_32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
index 2e424a5..dcf2108 100644
--- a/arch/sparc/kernel/kgdb_32.c
+++ b/arch/sparc/kernel/kgdb_32.c
@@ -5,6 +5,7 @@
 
 #include <linux/kgdb.h>
 #include <linux/kdebug.h>
+#include <linux/sched.h>
 
 #include <asm/kdebug.h>
 #include <asm/ptrace.h>
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-10-16  3:50 Stephen Rothwell
@ 2012-10-16  4:21 ` Al Viro
  0 siblings, 0 replies; 195+ messages in thread
From: Al Viro @ 2012-10-16  4:21 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, David S. Miller

On Tue, Oct 16, 2012 at 02:50:29PM +1100, Stephen Rothwell wrote:
> Hi Al,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> arch/sparc/kernel/head_64.o: In function `sys64_execve':
> (.text+0x1f58): relocation truncated to fit: R_SPARC_WDISP19 against symbol `sys_execve' defined in .text section in fs/built-in.o
> arch/sparc/kernel/head_64.o: In function `sys32_execve':
> (.text+0x1f64): relocation truncated to fit: R_SPARC_WDISP19 against symbol `compat_sys_execve' defined in .text section in fs/built-in.o
> 
> Probably caused by commit 3223f8aab885 ("sparc64: convert to generic
> execve") and following from the signal tree.
> 
> I have added this patch you suggested on IRC:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 16 Oct 2012 14:43:51 +1100
> Subject: [PATCH] sparc: fixup for conversion to generic execve
> 
> Fixes these errors:
> 
> arch/sparc/kernel/head_64.o: In function `sys64_execve':
> (.text+0x1f58): relocation truncated to fit: R_SPARC_WDISP19 against symbol `sys_execve' defined in .text section in fs/built-in.o
> arch/sparc/kernel/head_64.o: In function `sys32_execve':
> (.text+0x1f64): relocation truncated to fit: R_SPARC_WDISP19 against symbol `compat_sys_execve' defined in .text section in fs/built-in.o
> 
> Dictated-by: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/kernel/syscalls.S |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
> index 4bae096..f667cdf 100644
> --- a/arch/sparc/kernel/syscalls.S
> +++ b/arch/sparc/kernel/syscalls.S
> @@ -2,15 +2,19 @@
>  	 * environment settings are the same as the calling processes.
>  	 */
>  sys64_execve:
> -	ba,pt	%xcc,sys_execve
> -	 flushw
> +	flushw
> +	mov	%o7, %l5
> +	call	sys_execve
> +	 mov	%l5, %o7
>  
>  #ifdef CONFIG_COMPAT
>  sunos_execv:
>  	mov	%g0, %o2
>  sys32_execve:
> -	ba,pt	%xcc,compat_sys_execve
> -	 flushw
> +	flushw
> +	mov	%o7, %l5
> +	call	compat_sys_execve
> +	 mov	%l5, %o7
>  #endif

BTW, that's really quick and dirty; I'm not at all sure we need that
flushw there, which could make things much simpler.  Namely, kill
sys64_execve completely, making it equivalent to sys_execve(), do the
same to sys32_execve() (== compat_sys_execve()) and as for sunos_execv(),
I'd simply put it into sys_sparc32.c as
SYSCALL_DEFINE2(sunos_execv,
		char __user *, filename,
		const char __user *const __user *, argv)
{
	return compat_sys_execve(filename, argv, NULL);
}
We definitely want flushw in fork and friends, but I'm not sure what we
need it for in execve(2)...

Anyway, the brute-force variant works.  I had been lucky to stay within the
ba,pt target limit on the config I used (very heavily modular, so not much
code in vmlinux in the first place, let alone before fs/exec.o), so I'd missed
the problem until now.  I've booted that with fatter config that would blow the
previous variant at link time and it works.

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

* linux-next: build failure after merge of the final tree
@ 2012-10-16  3:50 Stephen Rothwell
  2012-10-16  4:21 ` Al Viro
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-10-16  3:50 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]

Hi Al,

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

arch/sparc/kernel/head_64.o: In function `sys64_execve':
(.text+0x1f58): relocation truncated to fit: R_SPARC_WDISP19 against symbol `sys_execve' defined in .text section in fs/built-in.o
arch/sparc/kernel/head_64.o: In function `sys32_execve':
(.text+0x1f64): relocation truncated to fit: R_SPARC_WDISP19 against symbol `compat_sys_execve' defined in .text section in fs/built-in.o

Probably caused by commit 3223f8aab885 ("sparc64: convert to generic
execve") and following from the signal tree.

I have added this patch you suggested on IRC:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 16 Oct 2012 14:43:51 +1100
Subject: [PATCH] sparc: fixup for conversion to generic execve

Fixes these errors:

arch/sparc/kernel/head_64.o: In function `sys64_execve':
(.text+0x1f58): relocation truncated to fit: R_SPARC_WDISP19 against symbol `sys_execve' defined in .text section in fs/built-in.o
arch/sparc/kernel/head_64.o: In function `sys32_execve':
(.text+0x1f64): relocation truncated to fit: R_SPARC_WDISP19 against symbol `compat_sys_execve' defined in .text section in fs/built-in.o

Dictated-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/syscalls.S |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
index 4bae096..f667cdf 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -2,15 +2,19 @@
 	 * environment settings are the same as the calling processes.
 	 */
 sys64_execve:
-	ba,pt	%xcc,sys_execve
-	 flushw
+	flushw
+	mov	%o7, %l5
+	call	sys_execve
+	 mov	%l5, %o7
 
 #ifdef CONFIG_COMPAT
 sunos_execv:
 	mov	%g0, %o2
 sys32_execve:
-	ba,pt	%xcc,compat_sys_execve
-	 flushw
+	flushw
+	mov	%o7, %l5
+	call	compat_sys_execve
+	 mov	%l5, %o7
 #endif
 
 	.align	32
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2012-07-31  5:14 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-07-31  5:14 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, linux-kernel, Sangbeom Kim, Samuel Ortiz, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

Hi all,

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

drivers/regulator/s5m8767.c: In function 's5m8767_pmic_probe':
drivers/regulator/s5m8767.c:575:2: error: implicit declaration of function 's5m_reg_write' [-Werror=implicit-function-declaration]

Caused by a mismerge in Linus' tree between commits c848bc8538cd
("regulator: s5m8767a: Support AP watchdog reset operation") and
63063bfbffe9 ("mfd: Modify samsung mfd driver for common api").

Fixed by commit 938e05bf1313 ("regulator: Fix an s5m8767 build failure")
from Linus' tree which I have cherry picked for today.

This was reported a couple of weeks ago when it caused a merge conflict
in linux-next.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-19  7:08 Stephen Rothwell
@ 2012-07-19 13:53 ` Javier Muñoz
  0 siblings, 0 replies; 195+ messages in thread
From: Javier Muñoz @ 2012-07-19 13:53 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel

On 07/19/2012 09:08 AM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc allyesconfig)
> failed like this:
> 
> drivers/staging/sm7xxfb/sm7xxfb.c: In function 'smtcfb_pci_probe':
> drivers/staging/sm7xxfb/sm7xxfb.c:829:33: error: 'smtc_screen_info' undeclared (first use in this function)
> 
> Caused by commit 013db67415d1 ("staging: sm7xxfb: rename smtc_screen_info
> to smtc_scr_info").  Grep is your friend.
> 
> I have added the following patch for today.

Sorry, my mistake. Thanks Stephen.

javi

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

* linux-next: build failure after merge of the final tree
@ 2012-07-19  7:08 Stephen Rothwell
  2012-07-19 13:53 ` Javier Muñoz
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-07-19  7:08 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Javier M. Mellid

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

Hi all,

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

drivers/staging/sm7xxfb/sm7xxfb.c: In function 'smtcfb_pci_probe':
drivers/staging/sm7xxfb/sm7xxfb.c:829:33: error: 'smtc_screen_info' undeclared (first use in this function)

Caused by commit 013db67415d1 ("staging: sm7xxfb: rename smtc_screen_info
to smtc_scr_info").  Grep is your friend.

I have added the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Jul 2012 17:04:39 +1000
Subject: [PATCH] staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/staging/sm7xxfb/sm7xxfb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 90c90db..1c1780c 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -826,7 +826,7 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
 
 #ifdef __BIG_ENDIAN
 	if (sfb->fb.var.bits_per_pixel == 24)
-		sfb->fb.var.bits_per_pixel = (smtc_screen_info.lfb_depth = 32);
+		sfb->fb.var.bits_per_pixel = (smtc_scr_info.lfb_depth = 32);
 #endif
 	/* Map address and memory detection */
 	pFramebufferPhysical = pci_resource_start(pdev, 0);
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-06  3:01       ` Stephen Rothwell
@ 2012-07-06  6:08         ` Alan Modra
  0 siblings, 0 replies; 195+ messages in thread
From: Alan Modra @ 2012-07-06  6:08 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-next,
	linux-kernel, tony

On Fri, Jul 06, 2012 at 01:01:37PM +1000, Stephen Rothwell wrote:
> solos-pci.c:(.text+0x1ff923c): relocation truncated to fit: R_PPC64_REL24
                     ^^^^^^^^^

> I assume at this point, we are just too large.

Yeah, but not in total.  I didn't see any of these in the allyes
kernel I built with our proof of concept hack to avoid ld -r.  I think
you'll find that these are all from ld -r output, as I assume no one
in kernel land writes drivers or whatever with 33M of text in a single
file.  Branches in that monstrous section can't even reach the
trampolines that ld inserts to extend branch reach.  Did I mention
that ld -r is a bad idea?

One workaround might be to compile with -ffunction-sections.

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-06  0:57     ` Alan Modra
@ 2012-07-06  3:01       ` Stephen Rothwell
  2012-07-06  6:08         ` Alan Modra
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-07-06  3:01 UTC (permalink / raw)
  To: Alan Modra
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-next,
	linux-kernel, tony

[-- Attachment #1: Type: text/plain, Size: 2870 bytes --]

Hi Alan,

On Fri, 6 Jul 2012 10:27:10 +0930 Alan Modra <amodra@gmail.com> wrote:
>
> On Fri, Jul 06, 2012 at 10:21:51AM +1000, Stephen Rothwell wrote:
> > which have now been fixed.  So would a simple patch that puts the
> > _savegpr etc functions in their own section (defined how?) fix this for
> > us?
> 
> Ah, the kernel provides its own save/restore functions, and these get
> mashed into a .text containing normal functions with toc references by
> ld -r.  Well, you could stop using ld -r.  Otherwise, try
> 
>  .section ".text.save.restore","ax",@progbits

OK, so that helped a lot.  Now I get this:

drivers/built-in.o: In function `.idt77252_init_ubr.isra.10':
idt77252.c:(.text+0x1ff801c): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
drivers/built-in.o: In function `.idt77252_init_tx':
idt77252.c:(.text+0x1ff8258): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
drivers/built-in.o: In function `.idt77252_change_qos':
idt77252.c:(.text+0x1ff86a0): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
drivers/built-in.o: In function `.idt77252_open':
idt77252.c:(.text+0x1ff898c): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
idt77252.c:(.text+0x1ff8f4c): relocation truncated to fit: R_PPC64_REL24 against symbol `_restgpr0_22' defined in .text.save.restore section in arch/powerpc/lib/built-in.o
drivers/built-in.o: In function `.next_string':
solos-pci.c:(.text+0x1ff8f54): relocation truncated to fit: R_PPC64_REL24 against symbol `_savegpr0_29' defined in .text.save.restore section in arch/powerpc/lib/built-in.o
solos-pci.c:(.text+0x1ff8f64): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
drivers/built-in.o: In function `.print_buffer':
solos-pci.c:(.text+0x1ff904c): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
drivers/built-in.o: In function `.atm_remove':
solos-pci.c:(.text+0x1ff91d4): relocation truncated to fit: R_PPC64_REL24 against symbol `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o
solos-pci.c:(.text+0x1ff923c): relocation truncated to fit: R_PPC64_REL24 against symbol `.sysfs_remove_group' defined in .text section in fs/built-in.o
drivers/built-in.o: In function `.fpga_tx':
solos-pci.c:(.text+0x1ff950c): additional relocation overflows omitted from the output

I assume at this point, we are just too large.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-06  0:21   ` Stephen Rothwell
@ 2012-07-06  0:57     ` Alan Modra
  2012-07-06  3:01       ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Alan Modra @ 2012-07-06  0:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-next,
	linux-kernel, tony

On Fri, Jul 06, 2012 at 10:21:51AM +1000, Stephen Rothwell wrote:
> which have now been fixed.  So would a simple patch that puts the
> _savegpr etc functions in their own section (defined how?) fix this for
> us?

Ah, the kernel provides its own save/restore functions, and these get
mashed into a .text containing normal functions with toc references by
ld -r.  Well, you could stop using ld -r.  Otherwise, try

 .section ".text.save.restore","ax",@progbits

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-05  9:43 ` Alan Modra
@ 2012-07-06  0:21   ` Stephen Rothwell
  2012-07-06  0:57     ` Alan Modra
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-07-06  0:21 UTC (permalink / raw)
  To: Alan Modra
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-next,
	linux-kernel, tony

[-- Attachment #1: Type: text/plain, Size: 2725 bytes --]

Hi Alan,

On Thu, 5 Jul 2012 19:13:48 +0930 Alan Modra <amodra@gmail.com> wrote:
>
> On Thu, Jul 05, 2012 at 06:33:45PM +1000, Stephen Rothwell wrote:
> > powerpc64-linux-ld: drivers/built-in.o: In function `.gpiochip_is_requested':
> > (.text+0x4): sibling call optimization to `_savegpr0_29' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_savegpr0_29' extern
> > 
> > I got more than 60000 of these messages before I killed the link. :-(  I
> > am not sure what has changed to do this, but it may have been masked for
> > the past few releases due to other linking problems.
> 
> Let me guess.  You're using bleeding edge gcc but not binutils.

powerpc-linux-gcc (GCC) 4.6.3
GNU ld (GNU Binutils) 2.22

both built from upstream sources (by Tony).

> a) Recent gcc has fixed prologue and epilogue generation which now
>    properly makes use of out-of-line register save and restore
>    functions when compiling with -Os.
> b) Recent ld doesn't emit out-of-line save/restore function for ld -r,
>    but yours does.  You need my 2012-06-22 patch.
> c) Kernel uses ld -r for packaging.
> 
> (b) and (c) together mean you get a definition for _savegpr0_29 munged
> together with other functions.  That's bad.  If _savegpr0_29 wasn't
> emitted until the final link stage then it would be in a code section
> containing just save/restore functions.  ld will analyse that section
> and notice the absense of toc relocations; functions therein don't
> use the toc and can thus be called from any toc group without needing
> a toc adjusting stub.  In your case _savegpr0_29 is in a section that
> has toc relocations (from normal compiled code), so ld decides that
> any function in that section must have a proper value for the toc
> register.  But calls to _savegpr0_29 don't have a following nop to
> overwrite with a toc restore insn, hence the ld error.
> 
> Score another black mark for ld -r.

OK, the new toolchain may be the problem.  I changed from:

powerpc-linux-gcc (GCC) 4.6.0
GNU ld (GNU Binutils) 2.21

on June 20 and the current errors may have been masked an early bailout
after getting theses errors:

powerpc64-linux-ld: arch/powerpc/net/built-in.o: In function `bpf_slow_path_word':
(.text+0x90): sibling call optimization to `skb_copy_bits' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `skb_copy_bits' extern

which have now been fixed.  So would a simple patch that puts the
_savegpr etc functions in their own section (defined how?) fix this for
us?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-07-05  8:33 Stephen Rothwell
@ 2012-07-05  9:43 ` Alan Modra
  2012-07-06  0:21   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Alan Modra @ 2012-07-05  9:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-next,
	linux-kernel

On Thu, Jul 05, 2012 at 06:33:45PM +1000, Stephen Rothwell wrote:
> powerpc64-linux-ld: drivers/built-in.o: In function `.gpiochip_is_requested':
> (.text+0x4): sibling call optimization to `_savegpr0_29' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_savegpr0_29' extern
> 
> I got more than 60000 of these messages before I killed the link. :-(  I
> am not sure what has changed to do this, but it may have been masked for
> the past few releases due to other linking problems.

Let me guess.  You're using bleeding edge gcc but not binutils.

a) Recent gcc has fixed prologue and epilogue generation which now
   properly makes use of out-of-line register save and restore
   functions when compiling with -Os.
b) Recent ld doesn't emit out-of-line save/restore function for ld -r,
   but yours does.  You need my 2012-06-22 patch.
c) Kernel uses ld -r for packaging.

(b) and (c) together mean you get a definition for _savegpr0_29 munged
together with other functions.  That's bad.  If _savegpr0_29 wasn't
emitted until the final link stage then it would be in a code section
containing just save/restore functions.  ld will analyse that section
and notice the absense of toc relocations; functions therein don't
use the toc and can thus be called from any toc group without needing
a toc adjusting stub.  In your case _savegpr0_29 is in a section that
has toc relocations (from normal compiled code), so ld decides that
any function in that section must have a proper value for the toc
register.  But calls to _savegpr0_29 don't have a following nop to
overwrite with a toc restore insn, hence the ld error.

Score another black mark for ld -r.

-- 
Alan Modra
Australia Development Lab, IBM

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

* linux-next: build failure after merge of the final tree
@ 2012-07-05  8:33 Stephen Rothwell
  2012-07-05  9:43 ` Alan Modra
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-07-05  8:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: linux-next, linux-kernel, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

Hi all,

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

powerpc64-linux-ld: drivers/built-in.o: In function `.gpiochip_is_requested':
(.text+0x4): sibling call optimization to `_savegpr0_29' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_savegpr0_29' extern

I got more than 60000 of these messages before I killed the link. :-(  I
am not sure what has changed to do this, but it may have been masked for
the past few releases due to other linking problems.

I have left this broken for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-24  7:16       ` Stephen Rothwell
  2012-05-24  7:22         ` Ingo Molnar
@ 2012-05-24 14:06         ` H. Peter Anvin
  1 sibling, 0 replies; 195+ messages in thread
From: H. Peter Anvin @ 2012-05-24 14:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Ingo Molnar, Thomas Gleixner, Ingo Molnar, Peter Zijlstra,
	linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

On 05/24/2012 12:16 AM, Stephen Rothwell wrote:
> 
> OK, clearly something is wrong :-( There could well be a problem with my
> toolchain.
> 

Apparently so... this is troublesome because it means that we have
silently built broken kernels not just with ld 2.22.52.0.x but with
older lds as well.

What originally made the ld problems surface was actually checking that
we didn't run into any absolute symbols we didn't know about, which
previously was supposed to be done by developers manually, i.e. never
done.  This is extremely serious because it means that a kernel compiled
with CONFIG_RELOCATABLE doesn't actually relocate.

The workaround -- and it is a workaround -- is to take these symbols as
they appear and add them to the [S_REL] whitelist in
arch/x86/tools/relocs.c.  This is the same workaround as existed before,
the only difference is that we are now enforcing it.

A patch for this particular subcase is attached and I will commit it to
tip:x86/urgent.

> $ i386-linux-ld --version
> GNU ld (GNU Binutils) 2.21
> Copyright 2010 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) a later version.
> This program has absolutely no warranty.

> Invalid absolute R_386_32 relocation: jiffies
> make[3]: *** [arch/x86/boot/compressed/vmlinux.relocs] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 2
> make[1]: *** [bzImage] Error 2
> make: *** [sub-make] Error 2

jiffies is yet another symbol created by the linker script.  This one in
particular is created outside any section, so it isn't all that strange
that some versions of the linker created it absolute.  Again, such a
kernel would have malfunctioned if relocated.

The really disturbing part of this one is that it shows that these
problems covers multiple GNU ld versions.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


[-- Attachment #2: 0001-x86-relocs-Add-jiffies-and-jiffies_64-to-the-relativ.patch --]
[-- Type: text/x-patch, Size: 1371 bytes --]

>From a8040166e638e3d5d982e339e20d1569641ce404 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@zytor.com>
Date: Thu, 24 May 2012 07:01:38 -0700
Subject: [PATCH] x86, relocs: Add jiffies and jiffies_64 to the relative
 whitelist

The symbol jiffies is created in the linker script as an alias to
jiffies_64.  Unfortunately this is done outside any section, and
apparently GNU ld 2.21 doesn't carry the section with it, so we end up
with an absolute symbol and therefore a broken kernel.

Add jiffies and jiffies_64 to the whitelist.

The most disturbing bit with this discovery is that it shows that we
have had multiple linker bugs in this area crossing multiple
generations, and have been silently building bad kernels for some time.

Link: http://lkml.kernel.org/r/20120524171604.0d98284f3affc643e9714470@canb.auug.org.au
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/tools/relocs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index b8f7c65..b685296 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -71,6 +71,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
 	"__(start|stop)_notes|"
 	"__end_rodata|"
 	"__initramfs_start|"
+	"(jiffies|jiffies_64)|"
 	"_end)$"
 };
 
-- 
1.7.6.5


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

* Re: linux-next: build failure after merge of the final tree
  2012-05-24  7:16       ` Stephen Rothwell
@ 2012-05-24  7:22         ` Ingo Molnar
  2012-05-24 14:06         ` H. Peter Anvin
  1 sibling, 0 replies; 195+ messages in thread
From: Ingo Molnar @ 2012-05-24  7:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Ingo,
> 
> On Wed, 23 May 2012 17:35:36 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > On Mon, 21 May 2012 11:12:57 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> > > >
> > > > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > 
> > > > > After merging the final tree, today's linux-next build (i386 defconfig)
> > > > > failed like this:
> > > > > 
> > > > > Invalid absolute R_386_32 relocation: jiffies
> > > > 
> > > > Hm, that's our fault: seems like a linker bug fallout, one which 
> > > > we fixed in -tip.
> > > > 
> > > > > I am not sure what caused this (it may even been a bad merge 
> > > > > on my part).  I have left it broken for today.
> > > > 
> > > > While we've fixed this, to simplify merge window integration of 
> > > > linux-next I've excluded tip:x86/trampoline from the linux-next 
> > > > branch for now, so this build failure should go away tomorrow.
> > > 
> > > Weirdly, I still got the same error today.  Any ideas?
> > 
> > Ought to be fixed now.
> 
> OK, clearly something is wrong :-( There could well be a 
> problem with my toolchain.
> 
> I am still getting this error.  Build is an i386 defconfig

Hm, Peter?

Thanks,

	Ingo

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-23 15:35     ` Ingo Molnar
@ 2012-05-24  7:16       ` Stephen Rothwell
  2012-05-24  7:22         ` Ingo Molnar
  2012-05-24 14:06         ` H. Peter Anvin
  0 siblings, 2 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-24  7:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

Hi Ingo,

On Wed, 23 May 2012 17:35:36 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > On Mon, 21 May 2012 11:12:57 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > 
> > > > After merging the final tree, today's linux-next build (i386 defconfig)
> > > > failed like this:
> > > > 
> > > > Invalid absolute R_386_32 relocation: jiffies
> > > 
> > > Hm, that's our fault: seems like a linker bug fallout, one which 
> > > we fixed in -tip.
> > > 
> > > > I am not sure what caused this (it may even been a bad merge 
> > > > on my part).  I have left it broken for today.
> > > 
> > > While we've fixed this, to simplify merge window integration of 
> > > linux-next I've excluded tip:x86/trampoline from the linux-next 
> > > branch for now, so this build failure should go away tomorrow.
> > 
> > Weirdly, I still got the same error today.  Any ideas?
> 
> Ought to be fixed now.

OK, clearly something is wrong :-( There could well be a problem with my
toolchain.

I am still getting this error.  Build is an i386 defconfig

$ i386-linux-gcc --version
i386-linux-gcc (GCC) 4.6.0
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ i386-linux-ld --version
GNU ld (GNU Binutils) 2.21
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I have CONFIG_DEBUG_SECTION_MISMATCH=y and -s on the build command line.

This is the entire build log:

In file included from /scratch/sfr/next/arch/x86/include/asm/uaccess.h:580:0,
                 from /scratch/sfr/next/include/linux/uaccess.h:5,
                 from /scratch/sfr/next/include/linux/highmem.h:8,
                 from /scratch/sfr/next/include/linux/pagemap.h:10,
                 from /scratch/sfr/next/fs/binfmt_misc.c:27:
/scratch/sfr/next/arch/x86/include/asm/uaccess_32.h: In function 'parse_command.part.1':
/scratch/sfr/next/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default]
sort done marker at 9112a4
Invalid absolute R_386_32 relocation: jiffies
make[3]: *** [arch/x86/boot/compressed/vmlinux.relocs] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make[1]: *** [bzImage] Error 2
make: *** [sub-make] Error 2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-22  8:25   ` Stephen Rothwell
@ 2012-05-23 15:35     ` Ingo Molnar
  2012-05-24  7:16       ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Ingo Molnar @ 2012-05-23 15:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Ingo,
> 
> On Mon, 21 May 2012 11:12:57 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > Hi all,
> > > 
> > > After merging the final tree, today's linux-next build (i386 defconfig)
> > > failed like this:
> > > 
> > > Invalid absolute R_386_32 relocation: jiffies
> > 
> > Hm, that's our fault: seems like a linker bug fallout, one which 
> > we fixed in -tip.
> > 
> > > I am not sure what caused this (it may even been a bad merge 
> > > on my part).  I have left it broken for today.
> > 
> > While we've fixed this, to simplify merge window integration of 
> > linux-next I've excluded tip:x86/trampoline from the linux-next 
> > branch for now, so this build failure should go away tomorrow.
> 
> Weirdly, I still got the same error today.  Any ideas?

Ought to be fixed now.

Thanks,

	Ingo

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-22 19:05 ` David Miller
@ 2012-05-23  2:08   ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-23  2:08 UTC (permalink / raw)
  To: David Miller; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

Hi Dave,

On Tue, 22 May 2012 15:05:25 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 22 May 2012 18:20:10 +1000
> 
> > After merging the final tree, today's linux-next build (sparc32 defconfig)
> > failed like this:
> > 
> > arch/sparc/kernel/time_32.c: In function 'timer_interrupt':
> > arch/sparc/kernel/time_32.c:105:3: error: invalid use of undefined type 'struct clock_event_device'
>  ...
> > I have no idea what caused this, I did not get this yesterday.  I have
> > left this build broken for today.
> 
> It builds cleanly in Linus's tree, and I have no local changes in sparc-next.

I bisected it down to my merge of the tip tree (commit 26b38c5887 in
next-20120522).  I only enable GENERIC_CLOCKEVENTS for sparc64 - I missed
a subtle interaction between commit 62f082830d63 ("sparc32: generic
clockevent support") from the sparc-next tree and commit ded1cc5cfc3b
("sparc: Use: generic time config") from the tip tree.

I will fix this up in linux-next today.  Sorry for the noise.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-22  8:20 Stephen Rothwell
@ 2012-05-22 19:05 ` David Miller
  2012-05-23  2:08   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: David Miller @ 2012-05-22 19:05 UTC (permalink / raw)
  To: sfr; +Cc: linux-next, linux-kernel

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 22 May 2012 18:20:10 +1000

> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> arch/sparc/kernel/time_32.c: In function 'timer_interrupt':
> arch/sparc/kernel/time_32.c:105:3: error: invalid use of undefined type 'struct clock_event_device'
 ...
> I have no idea what caused this, I did not get this yesterday.  I have
> left this build broken for today.

It builds cleanly in Linus's tree, and I have no local changes in sparc-next.

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-21  9:12 ` Ingo Molnar
  2012-05-21  9:15   ` Stephen Rothwell
@ 2012-05-22  8:25   ` Stephen Rothwell
  2012-05-23 15:35     ` Ingo Molnar
  1 sibling, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-22  8:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

Hi Ingo,

On Mon, 21 May 2012 11:12:57 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > After merging the final tree, today's linux-next build (i386 defconfig)
> > failed like this:
> > 
> > Invalid absolute R_386_32 relocation: jiffies
> 
> Hm, that's our fault: seems like a linker bug fallout, one which 
> we fixed in -tip.
> 
> > I am not sure what caused this (it may even been a bad merge 
> > on my part).  I have left it broken for today.
> 
> While we've fixed this, to simplify merge window integration of 
> linux-next I've excluded tip:x86/trampoline from the linux-next 
> branch for now, so this build failure should go away tomorrow.

Weirdly, I still got the same error today.  Any ideas?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2012-05-22  8:20 Stephen Rothwell
  2012-05-22 19:05 ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-22  8:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]

Hi all,

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

arch/sparc/kernel/time_32.c: In function 'timer_interrupt':
arch/sparc/kernel/time_32.c:105:3: error: invalid use of undefined type 'struct clock_event_device'
arch/sparc/kernel/time_32.c: At top level:
arch/sparc/kernel/time_32.c:111:17: error: 'enum clock_event_mode' declared inside parameter list [-Werror]
arch/sparc/kernel/time_32.c:111:17: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
arch/sparc/kernel/time_32.c:110:53: error: parameter 1 ('mode') has incomplete type
arch/sparc/kernel/time_32.c:110:13: error: function declaration isn't a prototype [-Werror=strict-prototypes]
arch/sparc/kernel/time_32.c: In function 'timer_ce_set_mode':
arch/sparc/kernel/time_32.c:114:8: error: 'CLOCK_EVT_MODE_PERIODIC' undeclared (first use in this function)
arch/sparc/kernel/time_32.c:114:8: note: each undeclared identifier is reported only once for each function it appears in
arch/sparc/kernel/time_32.c:115:8: error: 'CLOCK_EVT_MODE_RESUME' undeclared (first use in this function)
arch/sparc/kernel/time_32.c:118:8: error: 'CLOCK_EVT_MODE_SHUTDOWN' undeclared (first use in this function)
arch/sparc/kernel/time_32.c: In function 'setup_timer_ce':
arch/sparc/kernel/time_32.c:133:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:134:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:135:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:135:17: error: 'CLOCK_EVT_FEAT_PERIODIC' undeclared (first use in this function)
arch/sparc/kernel/time_32.c:136:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:137:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:138:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:139:4: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:139:2: error: implicit declaration of function 'div_sc' [-Werror=implicit-function-declaration]
arch/sparc/kernel/time_32.c:140:26: error: dereferencing pointer to incomplete type
arch/sparc/kernel/time_32.c:141:2: error: implicit declaration of function 'clockevents_register_device' [-Werror=implicit-function-declaration]

I have no idea what caused this, I did not get this yesterday.  I have
left this build broken for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-21  9:12 ` Ingo Molnar
@ 2012-05-21  9:15   ` Stephen Rothwell
  2012-05-22  8:25   ` Stephen Rothwell
  1 sibling, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-21  9:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Hi Ingo,

On Mon, 21 May 2012 11:12:57 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > After merging the final tree, today's linux-next build (i386 defconfig)
> > failed like this:
> > 
> > Invalid absolute R_386_32 relocation: jiffies
> 
> Hm, that's our fault: seems like a linker bug fallout, one which 
> we fixed in -tip.
> 
> > I am not sure what caused this (it may even been a bad merge 
> > on my part).  I have left it broken for today.
> 
> While we've fixed this, to simplify merge window integration of 
> linux-next I've excluded tip:x86/trampoline from the linux-next 
> branch for now, so this build failure should go away tomorrow.

OK, thanks
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-05-21  8:54 Stephen Rothwell
@ 2012-05-21  9:12 ` Ingo Molnar
  2012-05-21  9:15   ` Stephen Rothwell
  2012-05-22  8:25   ` Stephen Rothwell
  0 siblings, 2 replies; 195+ messages in thread
From: Ingo Molnar @ 2012-05-21  9:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (i386 defconfig)
> failed like this:
> 
> Invalid absolute R_386_32 relocation: jiffies

Hm, that's our fault: seems like a linker bug fallout, one which 
we fixed in -tip.

> I am not sure what caused this (it may even been a bad merge 
> on my part).  I have left it broken for today.

While we've fixed this, to simplify merge window integration of 
linux-next I've excluded tip:x86/trampoline from the linux-next 
branch for now, so this build failure should go away tomorrow.

Sorry and thanks,

	Ingo

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

* linux-next: build failure after merge of the final tree
@ 2012-05-21  8:54 Stephen Rothwell
  2012-05-21  9:12 ` Ingo Molnar
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-05-21  8:54 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

Hi all,

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

Invalid absolute R_386_32 relocation: jiffies

I am not sure what caused this (it may even been a bad merge on my
part).  I have left it broken for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-02-27  9:19 ` Benjamin Herrenschmidt
@ 2012-02-27 23:30   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 195+ messages in thread
From: Benjamin Herrenschmidt @ 2012-02-27 23:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jesse Barnes, linux-next, linux-kernel, Bjorn Helgaas, ppc-dev

On Mon, 2012-02-27 at 20:19 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2012-02-27 at 17:37 +1100, Stephen Rothwell wrote:
> >         pci_add_resource_offset(resources, res,
> > -                       (resource_size_t) hose->io_base_virt - _IO_BASE);
> > +                       (resource_size_t)(unsigned long)hose->io_base_virt - _IO_BASE);
> 
> We have to be careful here as we do want sign extension to happen (yeah
> it's odd, but it's the way we do IOs on ppc32 :-) Maybe I should change
> it one day).
> 
> So we probably want to do:
> 
> 	 (resource_size_t)(long long)(hose->io_base_virt - _IO_BASE)

Oops ... that was meant to read (long) not (long long)... Any ways, I
more or less convinced myself that even without the sign extension it
would still work, since the IO port number is eventually cast to an
unsigned int by the accessors, so as long as the low 32-bits are correct
(and they'll be with or without the sign extension), we should be fine.
It's just that something trying to print the resource might end up
displaying garbage in the top bits.

Cheers,
Ben.


> Basically, IO resources are relative to _IO_BASE which on ppc32 is
> basically the virtual address where we map the first PHB IO space.
> 
> Subsequent PHB mappings can end up below _IO_BASE, leading to negative
> resource values for IO BARs on those busses. It all works fine because
> even an unsigned addition will do the right thing as long as the value
> is fully sign extended.
> 
> Cheers,
> Ben.

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

* Re: linux-next: build failure after merge of the final tree
  2012-02-27 21:17 ` Greg KH
@ 2012-02-27 21:24   ` Alan Cox
  0 siblings, 0 replies; 195+ messages in thread
From: Alan Cox @ 2012-02-27 21:24 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, linux-kernel, Alan Cox

On Mon, 27 Feb 2012 13:17:48 -0800
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Mon, Feb 27, 2012 at 06:06:01PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the final tree, today's linux-next build (sparc32 defconfig)
> > failed like this:
> > 
> > drivers/tty/vt/keyboard.c: In function 'vt_do_diacrit':
> > drivers/tty/vt/keyboard.c:1500:3: error: implicit declaration of function 'put_user' [-Werror=implicit-function-declaration]
> > drivers/tty/vt/keyboard.c:1502:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
> > drivers/tty/vt/keyboard.c:1545:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration]
> > drivers/tty/vt/keyboard.c:1556:4: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
> > 
> > Caused by commit 247ff8e610cb ("vt: lock the accent table") from the tty
> > tree.
> > 
> > I have reverted that patch for today.
> 
> Odd.  Alan, a simple:
> 	#include <linux/uaccess.h>
> in that file should solve this, right?

Yep.. I guess other archs have a lucky include path to it already. Sorry
about that.

Alan

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

* Re: linux-next: build failure after merge of the final tree
  2012-02-27  7:06 Stephen Rothwell
@ 2012-02-27 21:17 ` Greg KH
  2012-02-27 21:24   ` Alan Cox
  0 siblings, 1 reply; 195+ messages in thread
From: Greg KH @ 2012-02-27 21:17 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alan Cox

On Mon, Feb 27, 2012 at 06:06:01PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> drivers/tty/vt/keyboard.c: In function 'vt_do_diacrit':
> drivers/tty/vt/keyboard.c:1500:3: error: implicit declaration of function 'put_user' [-Werror=implicit-function-declaration]
> drivers/tty/vt/keyboard.c:1502:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
> drivers/tty/vt/keyboard.c:1545:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration]
> drivers/tty/vt/keyboard.c:1556:4: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
> 
> Caused by commit 247ff8e610cb ("vt: lock the accent table") from the tty
> tree.
> 
> I have reverted that patch for today.

Odd.  Alan, a simple:
	#include <linux/uaccess.h>
in that file should solve this, right?

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2012-02-27  6:37 Stephen Rothwell
@ 2012-02-27  9:19 ` Benjamin Herrenschmidt
  2012-02-27 23:30   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 195+ messages in thread
From: Benjamin Herrenschmidt @ 2012-02-27  9:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jesse Barnes, linux-next, linux-kernel, Bjorn Helgaas, ppc-dev

On Mon, 2012-02-27 at 17:37 +1100, Stephen Rothwell wrote:
>         pci_add_resource_offset(resources, res,
> -                       (resource_size_t) hose->io_base_virt - _IO_BASE);
> +                       (resource_size_t)(unsigned long)hose->io_base_virt - _IO_BASE);

We have to be careful here as we do want sign extension to happen (yeah
it's odd, but it's the way we do IOs on ppc32 :-) Maybe I should change
it one day).

So we probably want to do:

	 (resource_size_t)(long long)(hose->io_base_virt - _IO_BASE)

Basically, IO resources are relative to _IO_BASE which on ppc32 is
basically the virtual address where we map the first PHB IO space.

Subsequent PHB mappings can end up below _IO_BASE, leading to negative
resource values for IO BARs on those busses. It all works fine because
even an unsigned addition will do the right thing as long as the value
is fully sign extended.

Cheers,
Ben.

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

* linux-next: build failure after merge of the final tree
@ 2012-02-27  7:06 Stephen Rothwell
  2012-02-27 21:17 ` Greg KH
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-02-27  7:06 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

Hi all,

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

drivers/tty/vt/keyboard.c: In function 'vt_do_diacrit':
drivers/tty/vt/keyboard.c:1500:3: error: implicit declaration of function 'put_user' [-Werror=implicit-function-declaration]
drivers/tty/vt/keyboard.c:1502:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
drivers/tty/vt/keyboard.c:1545:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration]
drivers/tty/vt/keyboard.c:1556:4: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]

Caused by commit 247ff8e610cb ("vt: lock the accent table") from the tty
tree.

I have reverted that patch for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2012-02-27  7:05 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-02-27  7:05 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

Hi all,

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

lib/atomic64_test.c: In function 'test_atomic64':
lib/atomic64_test.c:26:2: error: implicit declaration of function 'BUG_ON' [-Werror=implicit-function-declaration]

Caused by commit cf86c17fe37dnn ("kernel.h: doesn't explicitly use bug.h,
so don't include it") from the moduleh tree.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2012-02-27  6:37 Stephen Rothwell
  2012-02-27  9:19 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-02-27  6:37 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: linux-next, linux-kernel, Bjorn Helgaas, Benjamin Herrenschmidt, ppc-dev

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

Hi all,

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

arch/powerpc/kernel/pci-common.c: In function 'pcibios_setup_phb_resources':
arch/powerpc/kernel/pci-common.c:1520:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Caused by commit 6c5705fec63d ("powerpc/PCI: get rid of device resource
fixups") from the pci tree.  In this build, resource_size_t is 64 bits
while pointers are only 32.

I applied the following fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 27 Feb 2012 17:33:48 +1100
Subject: [PATCH] powerpc/PCI: fix up for mismatch between resource_size_t and
 pointer size

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/pci-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 910b9de..808ecbb 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1517,7 +1517,7 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
 		 (unsigned long long)res->end,
 		 (unsigned long)res->flags);
 	pci_add_resource_offset(resources, res,
-			(resource_size_t) hose->io_base_virt - _IO_BASE);
+			(resource_size_t)(unsigned long)hose->io_base_virt - _IO_BASE);
 
 	/* Hookup PHB Memory resources */
 	for (i = 0; i < 3; ++i) {
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-20  7:21 Stephen Rothwell
@ 2012-01-20  9:08 ` Deepthi Dharwar
  0 siblings, 0 replies; 195+ messages in thread
From: Deepthi Dharwar @ 2012-01-20  9:08 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	Arun R Bharadwaj, linux-next, linux-kernel, Trinabh Gupta

On 01/20/2012 12:51 PM, Stephen Rothwell wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allmodconfig) failed like this:
> 
> arch/powerpc/platforms/pseries/processor_idle.c:35:6: error: redefinition of 'update_smt_snooze_delay'
> arch/powerpc/include/asm/system.h:230:20: note: previous definition of 'update_smt_snooze_delay' was here
> arch/powerpc/platforms/pseries/processor_idle.c:175:5: error: redefinition of 'pseries_notify_cpuidle_add_cpu'
> arch/powerpc/include/asm/system.h:231:19: note: previous definition of 'pseries_notify_cpuidle_add_cpu' was here
> 
> Caused by commit 707827f3387d ("powerpc/cpuidle: cpuidle driver for
> pSeries").  For this build, CONFIG_PSERIES_IDLE is "m".
> 
> 
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev




Hi Stephen,

We had a discussion on this particular problem on ppcdev list a few
days back and concluded that it is best not have pseries_idle
as a module.

http://old.nabble.com/-PATCH--cpuidle%3A-Default-y-for-pseries-to33118294.html#a33127587

The following patch disables pseries cpuidle driver to be loaded as a
module as there are build problems reported when one is trying to do so.

arch/powerpc/platforms/pseries/processor_idle.c:35:6: error:
redefinition of 'update_smt_snooze_delay'
arch/powerpc/include/asm/system.h:230:20: note:
previous definition of 'update_smt_snooze_delay' was here
arch/powerpc/platforms/pseries/processor_idle.c:175:5:
error: redefinition of 'pseries_notify_cpuidle_add_cpu'
arch/powerpc/include/asm/system.h:231:19: note:
previous definition of 'pseries_notify_cpuidle_add_cpu' was here

Since the above two functions
are used in core power architecture functions (store_smt_snooze_delay
at kernel/sysfs.c and smp_xics_setup_cpu at platforms/pseries/smp.c),
this requires some rework in these interactions. For now please
disable PSERIES_IDLE to be built as a module for now.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/Kconfig
b/arch/powerpc/platforms/pseries/Kconfig
index ae7b6d4..31f22c1 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -122,7 +122,7 @@ config DTL
 	  Say N if you are unsure.

 config PSERIES_IDLE
-	tristate "Cpuidle driver for pSeries platforms"
+	bool "Cpuidle driver for pSeries platforms"
 	depends on CPU_IDLE
 	depends on PPC_PSERIES
 	default y

Regards,
Deepthi

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-20  7:34 ` Andrew Morton
@ 2012-01-20  8:21   ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 195+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-01-20  8:21 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Christian Gmeiner,
	Lars-Peter Clausen, Richard Purdie

On 01/20/2012 08:34 AM, Andrew Morton wrote:
> Like this?

Yes.

Sebastian

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-20  7:11 Stephen Rothwell
@ 2012-01-20  7:34 ` Andrew Morton
  2012-01-20  8:21   ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 195+ messages in thread
From: Andrew Morton @ 2012-01-20  7:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Sebastian Andrzej Siewior,
	Christian Gmeiner, Lars-Peter Clausen, Richard Purdie

On Fri, 20 Jan 2012 18:11:31 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (s390 allmodconfig)
> failed like this:
> 
> drivers/leds/leds-ot200.c: In function 'ot200_led_brightness_set':
> drivers/leds/leds-ot200.c:114: error: implicit declaration of function 'outb'
> 
> Caused by commit 891b7aeff9fe ("leds: add led driver for Bachmann's ot200").

Like this?

--- a/drivers/leds/Kconfig~leds-add-led-driver-for-bachmanns-ot200-fix
+++ a/drivers/leds/Kconfig
@@ -405,7 +405,7 @@ config LEDS_MAX8997
 
 config LEDS_OT200
 	tristate "LED support for the Bachmann OT200"
-	depends on LEDS_CLASS
+	depends on LEDS_CLASS && HAS_IOMEM
 	help
 	  This option enables support for the LEDs on the Bachmann OT200.
 	  Say Y to enable LEDs on the Bachmann OT200.

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

* linux-next: build failure after merge of the final tree
@ 2012-01-20  7:21 Stephen Rothwell
  2012-01-20  9:08 ` Deepthi Dharwar
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-20  7:21 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: linux-next, linux-kernel, Deepthi Dharwar, Trinabh Gupta,
	Arun R Bharadwaj

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Hi all,

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

arch/powerpc/platforms/pseries/processor_idle.c:35:6: error: redefinition of 'update_smt_snooze_delay'
arch/powerpc/include/asm/system.h:230:20: note: previous definition of 'update_smt_snooze_delay' was here
arch/powerpc/platforms/pseries/processor_idle.c:175:5: error: redefinition of 'pseries_notify_cpuidle_add_cpu'
arch/powerpc/include/asm/system.h:231:19: note: previous definition of 'pseries_notify_cpuidle_add_cpu' was here

Caused by commit 707827f3387d ("powerpc/cpuidle: cpuidle driver for
pSeries").  For this build, CONFIG_PSERIES_IDLE is "m".

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2012-01-20  7:11 Stephen Rothwell
  2012-01-20  7:34 ` Andrew Morton
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-20  7:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Sebastian Andrzej Siewior,
	Christian Gmeiner, Lars-Peter Clausen, Richard Purdie

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Hi all,

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

drivers/leds/leds-ot200.c: In function 'ot200_led_brightness_set':
drivers/leds/leds-ot200.c:114: error: implicit declaration of function 'outb'

Caused by commit 891b7aeff9fe ("leds: add led driver for Bachmann's ot200").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au


[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09 21:35     ` David Miller
@ 2012-01-09 21:41       ` Steven Rostedt
  0 siblings, 0 replies; 195+ messages in thread
From: Steven Rostedt @ 2012-01-09 21:41 UTC (permalink / raw)
  To: David Miller
  Cc: sfr, akpm, fweisbec, mingo, linux-next, linux-kernel, torvalds

On Mon, 2012-01-09 at 13:35 -0800, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 9 Jan 2012 16:59:50 +1100
> 
> >> > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> >> > In file included from include/trace/ftrace.h:774:0,
> >> >                  from include/trace/define_trace.h:86,
> >> >                  from include/trace/events/power.h:240,
> >> >                  from kernel/trace/power-traces.c:14:
> >> > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> >> > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> 
> I think the problem has to do with slab_def.h's explicit inclusion of
> trace/kmem.h
> 
> If this somehow gets included while we are expanding define_trace.h, then
> TRACE_SYSTEM will get redefined and screw up all of the includes that
> define_trace.h is trying to perform for the sake of power.h
> 
> Other architectures probably hit slab_def.h via some earlier includes
> and therefore don't hit this situation like Sparc does.
> 
> Adding an explicit <linux/slab.h> include to power-traces.c indeed fixes
> the build.

Yeah, I have a patch that fixes the bug (removing the
trace/events/kmem.h from slab.h). I'll be posting it as soon as it
finishes my final tests.

-- Steve

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09  5:59   ` Stephen Rothwell
  2012-01-09  6:20     ` Stephen Rothwell
@ 2012-01-09 21:35     ` David Miller
  2012-01-09 21:41       ` Steven Rostedt
  1 sibling, 1 reply; 195+ messages in thread
From: David Miller @ 2012-01-09 21:35 UTC (permalink / raw)
  To: sfr; +Cc: akpm, rostedt, fweisbec, mingo, linux-next, linux-kernel, torvalds

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 9 Jan 2012 16:59:50 +1100

>> > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
>> > In file included from include/trace/ftrace.h:774:0,
>> >                  from include/trace/define_trace.h:86,
>> >                  from include/trace/events/power.h:240,
>> >                  from kernel/trace/power-traces.c:14:
>> > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
>> > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]

I think the problem has to do with slab_def.h's explicit inclusion of
trace/kmem.h

If this somehow gets included while we are expanding define_trace.h, then
TRACE_SYSTEM will get redefined and screw up all of the includes that
define_trace.h is trying to perform for the sake of power.h

Other architectures probably hit slab_def.h via some earlier includes
and therefore don't hit this situation like Sparc does.

Adding an explicit <linux/slab.h> include to power-traces.c indeed fixes
the build.

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09 15:54         ` Steven Rostedt
@ 2012-01-09 16:27           ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-09 16:27 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Greg KH, Kay Sievers, Andrew Morton, Frederic Weisbecker,
	Ingo Molnar, linux-next, linux-kernel, David Miller, Linus

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

Hi Steve,

On Mon, 09 Jan 2012 10:54:24 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Stephen, what config does this trigger with?

sparc64 defconfig

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09 15:42       ` Greg KH
  2012-01-09 15:54         ` Steven Rostedt
@ 2012-01-09 16:26         ` Stephen Rothwell
  1 sibling, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-09 16:26 UTC (permalink / raw)
  To: Greg KH
  Cc: Kay Sievers, Andrew Morton, Steven Rostedt, Frederic Weisbecker,
	Ingo Molnar, linux-next, linux-kernel, David Miller, Linus

[-- Attachment #1: Type: text/plain, Size: 4369 bytes --]

Hi Greg,

On Mon, 9 Jan 2012 07:42:59 -0800 Greg KH <greg@kroah.com> wrote:
>
> On Mon, Jan 09, 2012 at 05:20:16PM +1100, Stephen Rothwell wrote:
> > On Mon, 9 Jan 2012 16:59:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 5 Jan 2012 16:04:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> > > >
> > > > On Thu, 5 Jan 2012 19:04:05 +1100
> > > > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > 
> > > > > After merging the final tree, today's linux-next build (sparc64 defconfig)
> > > > > failed like this:
> > > > > 
> > > > > In file included from include/trace/ftrace.h:567:0,
> > > > >                  from include/trace/define_trace.h:86,
> > > > >                  from include/trace/events/power.h:240,
> > > > >                  from kernel/trace/power-traces.c:14:
> > > > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
> > > > > include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
> > > > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
> > > > >
> > > > > ...
> > > > >
> > > > > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> > > > > In file included from include/trace/ftrace.h:774:0,
> > > > >                  from include/trace/define_trace.h:86,
> > > > >                  from include/trace/events/power.h:240,
> > > > >                  from kernel/trace/power-traces.c:14:
> > > > > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> > > > > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> > > > > 
> > > > > I have no idea what has gone wrong here, but I did not get this error
> > > > > yesterday.  The only thing that touched include/trace/events/kmem.h is
> > > > > patch "mm-tracepoint: rename page-free events" from the akpm tree, but
> > > > > that was there yesterday as well and doesn't look suspicious.
> > > > 
> > > > Yes, it's not due to anything in the akpm tree.  Tracing stuff blew up.
> > > > 
> > > > > I just have to leave things broken for today in the hope that someone
> > > > > figures something out.  This does not affect my X86_64 allmodconfig build
> > > > > or my PowerPC builds (including an allyesconfig build).
> > > > 
> > > > It fails with sparc64 defconfig but succeeds with sparc64 allmodconfig.
> > > > Some config-dependent thing.  3.2 is OK, so it's something in -next.
> > > > 
> > > > It could be that some far-off sparc64 Kconfig change is newly
> > > > triggering this.  
> > > > 
> > > > I suppose I could get off my ass and actually work out why it broke,
> > > > but the tracing code is too icky.
> > > 
> > > This failure is now in Linus' tree.  I am not sure when it got there.
> > 
> > Bisected down to:
> > 
> > 8a25a2fd126c621f44f3aeaef80d51f00fc11639 is the first bad commit
> > commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639
> > Author: Kay Sievers <kay.sievers@vrfy.org>
> > Date:   Wed Dec 21 14:29:42 2011 -0800
> > 
> >     cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem
> 
> How is this triggering this build problem?  I didn't see this happen
> before, and it wasn't showing up in linux-next in the past, right?

I think this error showed up the first time that the sysdev removal stuff
was included in linux-next i.e. after the other errors/warnings had been
dealt with.

> This patch has nothing to to with tracing, perhaps it is an #include
> file problem?  Or is the build error a different one (remember the
> -Werror problem in linux-next that I fixed up for PPC?)
> 
> confused,

The tracing code is obscure and I suspect that there may be some ordering
issue in there.  What seems to have triggered this is the include of
device.h instead of sysdev.h in cpu.h.  This has caused a whole lot more
tracepoints(?) to be defined.

So it is a side effect and needs the tracing guys to track it down :-(
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09 15:42       ` Greg KH
@ 2012-01-09 15:54         ` Steven Rostedt
  2012-01-09 16:27           ` Stephen Rothwell
  2012-01-09 16:26         ` Stephen Rothwell
  1 sibling, 1 reply; 195+ messages in thread
From: Steven Rostedt @ 2012-01-09 15:54 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Rothwell, Kay Sievers, Andrew Morton,
	Frederic Weisbecker, Ingo Molnar, linux-next, linux-kernel,
	David Miller, Linus

On Mon, 2012-01-09 at 07:42 -0800, Greg KH wrote:
>  
> > 8a25a2fd126c621f44f3aeaef80d51f00fc11639 is the first bad commit
> > commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639
> > Author: Kay Sievers <kay.sievers@vrfy.org>
> > Date:   Wed Dec 21 14:29:42 2011 -0800
> > 
> >     cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem
> 
> How is this triggering this build problem?  I didn't see this happen
> before, and it wasn't showing up in linux-next in the past, right?
> 
> This patch has nothing to to with tracing, perhaps it is an #include
> file problem?  Or is the build error a different one (remember the
> -Werror problem in linux-next that I fixed up for PPC?)

I'll take a look at this today. The problem is that something probably
included one of the "include/trace/event/*.h" files in a header. That's
always a pain, as those files should not be in headers and only called
by C files that directly use tracepoints. Those headers have the macro
magic to create those undefined symbols that Stephen is seeing and when
you have one trace/event/*.h included in another, it can sometimes cause
strange side effects like this.

Thus, simply adding an "include" somewhere can trigger this.

I'll checkout latest mainline and see.

Stephen, what config does this trigger with?

Thanks,

-- Steve

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09  6:20     ` Stephen Rothwell
@ 2012-01-09 15:42       ` Greg KH
  2012-01-09 15:54         ` Steven Rostedt
  2012-01-09 16:26         ` Stephen Rothwell
  0 siblings, 2 replies; 195+ messages in thread
From: Greg KH @ 2012-01-09 15:42 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Kay Sievers, Andrew Morton, Steven Rostedt, Frederic Weisbecker,
	Ingo Molnar, linux-next, linux-kernel, David Miller, Linus

On Mon, Jan 09, 2012 at 05:20:16PM +1100, Stephen Rothwell wrote:
> On Mon, 9 Jan 2012 16:59:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Thu, 5 Jan 2012 16:04:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > On Thu, 5 Jan 2012 19:04:05 +1100
> > > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > 
> > > > After merging the final tree, today's linux-next build (sparc64 defconfig)
> > > > failed like this:
> > > > 
> > > > In file included from include/trace/ftrace.h:567:0,
> > > >                  from include/trace/define_trace.h:86,
> > > >                  from include/trace/events/power.h:240,
> > > >                  from kernel/trace/power-traces.c:14:
> > > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
> > > > include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
> > > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
> > > >
> > > > ...
> > > >
> > > > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> > > > In file included from include/trace/ftrace.h:774:0,
> > > >                  from include/trace/define_trace.h:86,
> > > >                  from include/trace/events/power.h:240,
> > > >                  from kernel/trace/power-traces.c:14:
> > > > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> > > > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> > > > 
> > > > I have no idea what has gone wrong here, but I did not get this error
> > > > yesterday.  The only thing that touched include/trace/events/kmem.h is
> > > > patch "mm-tracepoint: rename page-free events" from the akpm tree, but
> > > > that was there yesterday as well and doesn't look suspicious.
> > > 
> > > Yes, it's not due to anything in the akpm tree.  Tracing stuff blew up.
> > > 
> > > > I just have to leave things broken for today in the hope that someone
> > > > figures something out.  This does not affect my X86_64 allmodconfig build
> > > > or my PowerPC builds (including an allyesconfig build).
> > > 
> > > It fails with sparc64 defconfig but succeeds with sparc64 allmodconfig.
> > > Some config-dependent thing.  3.2 is OK, so it's something in -next.
> > > 
> > > It could be that some far-off sparc64 Kconfig change is newly
> > > triggering this.  
> > > 
> > > I suppose I could get off my ass and actually work out why it broke,
> > > but the tracing code is too icky.
> > 
> > This failure is now in Linus' tree.  I am not sure when it got there.
> 
> Bisected down to:
> 
> 8a25a2fd126c621f44f3aeaef80d51f00fc11639 is the first bad commit
> commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639
> Author: Kay Sievers <kay.sievers@vrfy.org>
> Date:   Wed Dec 21 14:29:42 2011 -0800
> 
>     cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem

How is this triggering this build problem?  I didn't see this happen
before, and it wasn't showing up in linux-next in the past, right?

This patch has nothing to to with tracing, perhaps it is an #include
file problem?  Or is the build error a different one (remember the
-Werror problem in linux-next that I fixed up for PPC?)

confused,

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-09  5:59   ` Stephen Rothwell
@ 2012-01-09  6:20     ` Stephen Rothwell
  2012-01-09 15:42       ` Greg KH
  2012-01-09 21:35     ` David Miller
  1 sibling, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-09  6:20 UTC (permalink / raw)
  To: Greg KH, Kay Sievers
  Cc: Andrew Morton, Steven Rostedt, Frederic Weisbecker, Ingo Molnar,
	linux-next, linux-kernel, David Miller, Linus

[-- Attachment #1: Type: text/plain, Size: 5403 bytes --]

On Mon, 9 Jan 2012 16:59:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 5 Jan 2012 16:04:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Thu, 5 Jan 2012 19:04:05 +1100
> > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > After merging the final tree, today's linux-next build (sparc64 defconfig)
> > > failed like this:
> > > 
> > > In file included from include/trace/ftrace.h:567:0,
> > >                  from include/trace/define_trace.h:86,
> > >                  from include/trace/events/power.h:240,
> > >                  from kernel/trace/power-traces.c:14:
> > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
> > > include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
> > > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
> > >
> > > ...
> > >
> > > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> > > In file included from include/trace/ftrace.h:774:0,
> > >                  from include/trace/define_trace.h:86,
> > >                  from include/trace/events/power.h:240,
> > >                  from kernel/trace/power-traces.c:14:
> > > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> > > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> > > 
> > > I have no idea what has gone wrong here, but I did not get this error
> > > yesterday.  The only thing that touched include/trace/events/kmem.h is
> > > patch "mm-tracepoint: rename page-free events" from the akpm tree, but
> > > that was there yesterday as well and doesn't look suspicious.
> > 
> > Yes, it's not due to anything in the akpm tree.  Tracing stuff blew up.
> > 
> > > I just have to leave things broken for today in the hope that someone
> > > figures something out.  This does not affect my X86_64 allmodconfig build
> > > or my PowerPC builds (including an allyesconfig build).
> > 
> > It fails with sparc64 defconfig but succeeds with sparc64 allmodconfig.
> > Some config-dependent thing.  3.2 is OK, so it's something in -next.
> > 
> > It could be that some far-off sparc64 Kconfig change is newly
> > triggering this.  
> > 
> > I suppose I could get off my ass and actually work out why it broke,
> > but the tracing code is too icky.
> 
> This failure is now in Linus' tree.  I am not sure when it got there.

Bisected down to:

8a25a2fd126c621f44f3aeaef80d51f00fc11639 is the first bad commit
commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639
Author: Kay Sievers <kay.sievers@vrfy.org>
Date:   Wed Dec 21 14:29:42 2011 -0800

    cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem
    
    This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.
    
    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.
    
    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.
    
    Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
    Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Paul Mundt <lethal@linux-sh.org>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Chris Metcalf <cmetcalf@tilera.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Borislav Petkov <bp@amd64.org>
    Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
    Cc: Len Brown <lenb@kernel.org>
    Cc: Zhang Rui <rui.zhang@intel.com>
    Cc: Dave Jones <davej@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Russell King <rmk+kernel@arm.linux.org.uk>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
    Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

:040000 040000 9f2bf9fd8c5aded0a2ee73e897384dcf751c7be3 e0a42f67ed44979aa64b2be4c6de265832e940ca M	arch
:040000 040000 f910621f42e19d9d023350ef0dc29e82d1dc9087 513187817d23d20eccbd12fae6d54ab46f6224a3 M	drivers
:040000 040000 1e4d8217d84d59840615679ff4c28b04bb6ff635 296baef04fc04321aba25b5bdbc8e7210765e7b8 M	include
:040000 040000 65e9478a4ef764542a61132c53378ef89d8677ba 671ac443ad56c84707d80c84eee9e3902fc5edea M	kernel

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-06  0:04 ` Andrew Morton
@ 2012-01-09  5:59   ` Stephen Rothwell
  2012-01-09  6:20     ` Stephen Rothwell
  2012-01-09 21:35     ` David Miller
  0 siblings, 2 replies; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-09  5:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, linux-next,
	linux-kernel, David Miller, Linus

[-- Attachment #1: Type: text/plain, Size: 2650 bytes --]

On Thu, 5 Jan 2012 16:04:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 5 Jan 2012 19:04:05 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > After merging the final tree, today's linux-next build (sparc64 defconfig)
> > failed like this:
> > 
> > In file included from include/trace/ftrace.h:567:0,
> >                  from include/trace/define_trace.h:86,
> >                  from include/trace/events/power.h:240,
> >                  from kernel/trace/power-traces.c:14:
> > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
> > include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
> > include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
> >
> > ...
> >
> > include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> > In file included from include/trace/ftrace.h:774:0,
> >                  from include/trace/define_trace.h:86,
> >                  from include/trace/events/power.h:240,
> >                  from kernel/trace/power-traces.c:14:
> > include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> > include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> > 
> > I have no idea what has gone wrong here, but I did not get this error
> > yesterday.  The only thing that touched include/trace/events/kmem.h is
> > patch "mm-tracepoint: rename page-free events" from the akpm tree, but
> > that was there yesterday as well and doesn't look suspicious.
> 
> Yes, it's not due to anything in the akpm tree.  Tracing stuff blew up.
> 
> > I just have to leave things broken for today in the hope that someone
> > figures something out.  This does not affect my X86_64 allmodconfig build
> > or my PowerPC builds (including an allyesconfig build).
> 
> It fails with sparc64 defconfig but succeeds with sparc64 allmodconfig.
> Some config-dependent thing.  3.2 is OK, so it's something in -next.
> 
> It could be that some far-off sparc64 Kconfig change is newly
> triggering this.  
> 
> I suppose I could get off my ass and actually work out why it broke,
> but the tracing code is too icky.

This failure is now in Linus' tree.  I am not sure when it got there.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2012-01-05  8:04 Stephen Rothwell
@ 2012-01-06  0:04 ` Andrew Morton
  2012-01-09  5:59   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Andrew Morton @ 2012-01-06  0:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, linux-next,
	linux-kernel, David Miller

On Thu, 5 Jan 2012 19:04:05 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi ,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> In file included from include/trace/ftrace.h:567:0,
>                  from include/trace/define_trace.h:86,
>                  from include/trace/events/power.h:240,
>                  from kernel/trace/power-traces.c:14:
> include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
> include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
> include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
>
> ...
>
> include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
> In file included from include/trace/ftrace.h:774:0,
>                  from include/trace/define_trace.h:86,
>                  from include/trace/events/power.h:240,
>                  from kernel/trace/power-traces.c:14:
> include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
> include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]
> 
> I have no idea what has gone wrong here, but I did not get this error
> yesterday.  The only thing that touched include/trace/events/kmem.h is
> patch "mm-tracepoint: rename page-free events" from the akpm tree, but
> that was there yesterday as well and doesn't look suspicious.

Yes, it's not due to anything in the akpm tree.  Tracing stuff blew up.

> I just have to leave things broken for today in the hope that someone
> figures something out.  This does not affect my X86_64 allmodconfig build
> or my PowerPC builds (including an allyesconfig build).

It fails with sparc64 defconfig but succeeds with sparc64 allmodconfig.
Some config-dependent thing.  3.2 is OK, so it's something in -next.

It could be that some far-off sparc64 Kconfig change is newly
triggering this.  

I suppose I could get off my ass and actually work out why it broke,
but the tracing code is too icky.

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

* linux-next: build failure after merge of the final tree
@ 2012-01-05  8:04 Stephen Rothwell
  2012-01-06  0:04 ` Andrew Morton
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2012-01-05  8:04 UTC (permalink / raw)
  To: Steven Rostedt, Frederic Weisbecker, Ingo Molnar
  Cc: linux-next, linux-kernel, Andrew Morton, David Miller

[-- Attachment #1: Type: text/plain, Size: 4012 bytes --]

Hi ,

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

In file included from include/trace/ftrace.h:567:0,
                 from include/trace/define_trace.h:86,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc':
include/trace/events/kmem.h:45:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc':
include/trace/events/kmem.h:53:1: error: implicit declaration of function 'check_trace_callback_type_kmem_cache_alloc' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_kmalloc_node':
include/trace/events/kmem.h:99:1: error: implicit declaration of function 'check_trace_callback_type_kmalloc_node' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_alloc_node':
include/trace/events/kmem.h:108:1: error: implicit declaration of function 'check_trace_callback_type_kmem_cache_alloc_node' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_kfree':
include/trace/events/kmem.h:136:1: error: implicit declaration of function 'check_trace_callback_type_kfree' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_kmem_cache_free':
include/trace/events/kmem.h:143:1: error: implicit declaration of function 'check_trace_callback_type_kmem_cache_free' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_mm_page_free':
include/trace/events/kmem.h:150:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_free' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_mm_page_free_batched':
include/trace/events/kmem.h:172:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_free_batched' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_mm_page_alloc':
include/trace/events/kmem.h:194:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_mm_page_alloc_zone_locked':
include/trace/events/kmem.h:249:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_zone_locked' [-Werror=implicit-function-declaration]
include/trace/events/kmem.h: In function 'ftrace_test_probe_mm_page_alloc_extfrag':
include/trace/events/kmem.h:267:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_alloc_extfrag' [-Werror=implicit-function-declaration]
In file included from include/trace/ftrace.h:774:0,
                 from include/trace/define_trace.h:86,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/trace/events/kmem.h: In function 'perf_test_probe_mm_page_pcpu_drain':
include/trace/events/kmem.h:256:1: error: implicit declaration of function 'check_trace_callback_type_mm_page_pcpu_drain' [-Werror=implicit-function-declaration]

I have no idea what has gone wrong here, but I did not get this error
yesterday.  The only thing that touched include/trace/events/kmem.h is
patch "mm-tracepoint: rename page-free events" from the akpm tree, but
that was there yesterday as well and doesn't look suspicious.

I just have to leave things broken for today in the hope that someone
figures something out.  This does not affect my X86_64 allmodconfig build
or my PowerPC builds (including an allyesconfig build).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-12-17  4:22 Stephen Rothwell
@ 2011-12-17  4:27 ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-12-17  4:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Daney, Paul Mundt

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

Hi,

On Sat, 17 Dec 2011 15:22:53 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (sh
> edosk7705_defconfig and lots of other sh configs) failed like this:
> 
> mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
> mm/pgtable-generic.c:76: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed
> 
> This is the
> 
> 	VM_BUG_ON(address & ~HPAGE_PMD_MASK);
> 
> in pmdp_clear_flush_young().
> 
> Exposed by commit 835cea45a4a0 ("hugetlb: replace BUG() with BUILD_BUG()
> for dummy definitions") from the akpm tree but I don't know the root
> cause.
> 
> This may have a fix somewhere (if it is sh specific) but the current sh
> tree in linux-next
> (git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git) does
> not exist.

We are getting the same for all the cris config builds.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-12-17  4:22 Stephen Rothwell
  2011-12-17  4:27 ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-12-17  4:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Daney, Paul Mundt

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

Hi ,

After merging the final tree, today's linux-next build (sh
edosk7705_defconfig and lots of other sh configs) failed like this:

mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
mm/pgtable-generic.c:76: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed

This is the

	VM_BUG_ON(address & ~HPAGE_PMD_MASK);

in pmdp_clear_flush_young().

Exposed by commit 835cea45a4a0 ("hugetlb: replace BUG() with BUILD_BUG()
for dummy definitions") from the akpm tree but I don't know the root
cause.

This may have a fix somewhere (if it is sh specific) but the current sh
tree in linux-next
(git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git) does
not exist.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-30  1:05 Stephen Rothwell
@ 2011-09-30  7:57 ` Heiko Carstens
  0 siblings, 0 replies; 195+ messages in thread
From: Heiko Carstens @ 2011-09-30  7:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, linux-next, linux-kernel, Paul Gortmaker

On Fri, Sep 30, 2011 at 11:05:14AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, the next-20110929 build (s390x allmodconfig)
> failed like this:
> 
> drivers/s390/char/zcore.c:393: error: 'THIS_MODULE' undeclared here (not in a function)
> drivers/s390/char/zcore.c:741: error: expected declaration specifiers or '...' before string constant
> drivers/s390/char/zcore.c:741: warning: data definition has no type or storage class
> drivers/s390/char/zcore.c:741: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
> drivers/s390/char/zcore.c:741: warning: function declaration isn't a prototype
> drivers/s390/char/zcore.c:742: error: expected declaration specifiers or '...' before string constant
> drivers/s390/char/zcore.c:742: warning: data definition has no type or storage class
> drivers/s390/char/zcore.c:742: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
> drivers/s390/char/zcore.c:742: warning: function declaration isn't a prototype
> drivers/s390/char/zcore.c:743: error: expected declaration specifiers or '...' before string constant
> drivers/s390/char/zcore.c:743: warning: data definition has no type or storage class
> drivers/s390/char/zcore.c:743: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
> drivers/s390/char/zcore.c:743: warning: function declaration isn't a prototype
> 
> Probably revealed by the module.h split up.
> 
> This file needs to include module.h

Hmm.. wondering why I haven't seen that during my build tests a couple of
days ago. Anyway, thanks for letting us know!
I added a patch to our local tree. As soon as Martin pushes it out it
should be fixed.

Thanks,
Heiko

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-30  3:05   ` Stephen Rothwell
@ 2011-09-30  3:22     ` Paul Gortmaker
  0 siblings, 0 replies; 195+ messages in thread
From: Paul Gortmaker @ 2011-09-30  3:22 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

[Re: linux-next: build failure after merge of the final tree] On 30/09/2011 (Fri 13:05) Stephen Rothwell wrote:

> Hi Paul,
> 
> On Thu, 29 Sep 2011 22:40:59 -0400 Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
> >
> > On Thu, Sep 29, 2011 at 9:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the final tree, today's linux-next build (avr32 allnoconfig)
> > > failed like this:
> > >
> > > arch/avr32/mach-at32ap/pio.c: In function 'pio_probe':
> > > arch/avr32/mach-at32ap/pio.c:401: error: 'THIS_MODULE' undeclared (first use in this function)
> > >
> > > Probably revealed by the module.h split up.  I guess it needs export.h
> > > included.
> > 
> > Since export.h does not exist for most people, I'm OK adding it
> > in instances like this as a post-merge patch.
> 
> I had another look at this and it turns out that export.h is already
> included, but only conditionally.  I guess the include just needs moving
> to the top of the file.

Agreed.  A side effect of my "find a linux include and add another below
it" script.   These conditional includes (which are dubious to begin
with) seem to always get caught by that.  I'll fix this up and make it
unconditional for tomorrow.

Thanks,
Paul.

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

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-30  2:40 ` Paul Gortmaker
@ 2011-09-30  3:05   ` Stephen Rothwell
  2011-09-30  3:22     ` Paul Gortmaker
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-30  3:05 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Hi Paul,

On Thu, 29 Sep 2011 22:40:59 -0400 Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
>
> On Thu, Sep 29, 2011 at 9:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (avr32 allnoconfig)
> > failed like this:
> >
> > arch/avr32/mach-at32ap/pio.c: In function 'pio_probe':
> > arch/avr32/mach-at32ap/pio.c:401: error: 'THIS_MODULE' undeclared (first use in this function)
> >
> > Probably revealed by the module.h split up.  I guess it needs export.h
> > included.
> 
> Since export.h does not exist for most people, I'm OK adding it
> in instances like this as a post-merge patch.

I had another look at this and it turns out that export.h is already
included, but only conditionally.  I guess the include just needs moving
to the top of the file.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-30  1:38 Stephen Rothwell
@ 2011-09-30  2:49 ` Yoshihiro Shimoda
  0 siblings, 0 replies; 195+ messages in thread
From: Yoshihiro Shimoda @ 2011-09-30  2:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Paul Gortmaker, Paul Mundt,
	David S. Miller, netdev

Hi Stephen,

Thank you for the report.
I will submit a patch for the issue soon.
Since I used the net-next.git, the build failure didn't happen.
This is because that the linux/device.h of the net-next.git has "#include <linux/module.h>".
But, I was wrong to remove "#include <linux/module.h>" in the sh_eth.{c,h}.

Thanks,
Yoshihiro Shimoda

2011/09/30 10:38, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, the next-20110929 build (various sh configs)
> failed like this:
> 
> drivers/net/ethernet/renesas/sh_eth.c:601: error: 'THIS_MODULE' undeclared here (not in a function)
> drivers/net/ethernet/renesas/sh_eth.c:1970: error: expected declaration specifiers or '...' before string constant
> drivers/net/ethernet/renesas/sh_eth.c:1970: warning: data definition has no type or storage class
> drivers/net/ethernet/renesas/sh_eth.c:1970: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
> drivers/net/ethernet/renesas/sh_eth.c:1970: warning: function declaration isn't a prototype
> drivers/net/ethernet/renesas/sh_eth.c:1971: error: expected declaration specifiers or '...' before string constant
> drivers/net/ethernet/renesas/sh_eth.c:1971: warning: data definition has no type or storage class
> drivers/net/ethernet/renesas/sh_eth.c:1971: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
> drivers/net/ethernet/renesas/sh_eth.c:1971: warning: function declaration isn't a prototype
> drivers/net/ethernet/renesas/sh_eth.c:1972: error: expected declaration specifiers or '...' before string constant
> drivers/net/ethernet/renesas/sh_eth.c:1972: warning: data definition has no type or storage class
> drivers/net/ethernet/renesas/sh_eth.c:1972: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
> drivers/net/ethernet/renesas/sh_eth.c:1972: warning: function declaration isn't a prototype
> 
> Presumbly revealed by the module.h split up.  This file needs to include module.h.

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-30  1:12 Stephen Rothwell
@ 2011-09-30  2:40 ` Paul Gortmaker
  2011-09-30  3:05   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Paul Gortmaker @ 2011-09-30  2:40 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

On Thu, Sep 29, 2011 at 9:12 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (avr32 allnoconfig)
> failed like this:
>
> arch/avr32/mach-at32ap/pio.c: In function 'pio_probe':
> arch/avr32/mach-at32ap/pio.c:401: error: 'THIS_MODULE' undeclared (first use in this function)
>
> Probably revealed by the module.h split up.  I guess it needs export.h
> included.

Since export.h does not exist for most people, I'm OK adding it
in instances like this as a post-merge patch.  For instances where
it is obvious that the full module.h is required, I'd rather the originator
of the new module dependent code simply add the required module.h
themselves. (I think this is consistent with what Stephen has been
recommending to people on a case-by-case basis anyway).

I can/will temporarily add the module.h cases to the post-merge queue
too, but my intention is to move as many of these post-merge commits
off to the sub-maintainers as possible.

P.

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

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

* linux-next: build failure after merge of the final tree
@ 2011-09-30  1:38 Stephen Rothwell
  2011-09-30  2:49 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-30  1:38 UTC (permalink / raw)
  To: Yoshihiro Shimoda
  Cc: linux-next, linux-kernel, Paul Gortmaker, Paul Mundt,
	David S. Miller, netdev

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

Hi all,

After merging the final tree, the next-20110929 build (various sh configs)
failed like this:

drivers/net/ethernet/renesas/sh_eth.c:601: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/net/ethernet/renesas/sh_eth.c:1970: error: expected declaration specifiers or '...' before string constant
drivers/net/ethernet/renesas/sh_eth.c:1970: warning: data definition has no type or storage class
drivers/net/ethernet/renesas/sh_eth.c:1970: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/net/ethernet/renesas/sh_eth.c:1970: warning: function declaration isn't a prototype
drivers/net/ethernet/renesas/sh_eth.c:1971: error: expected declaration specifiers or '...' before string constant
drivers/net/ethernet/renesas/sh_eth.c:1971: warning: data definition has no type or storage class
drivers/net/ethernet/renesas/sh_eth.c:1971: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/net/ethernet/renesas/sh_eth.c:1971: warning: function declaration isn't a prototype
drivers/net/ethernet/renesas/sh_eth.c:1972: error: expected declaration specifiers or '...' before string constant
drivers/net/ethernet/renesas/sh_eth.c:1972: warning: data definition has no type or storage class
drivers/net/ethernet/renesas/sh_eth.c:1972: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/net/ethernet/renesas/sh_eth.c:1972: warning: function declaration isn't a prototype

Presumbly revealed by the module.h split up.  This file needs to include module.h.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-09-30  1:23 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-30  1:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-next, linux-kernel, Alan Cox, Lu Guanqun, Vinod Koul,
	Wu Fengguang, devel, Paul Gortmaker

[-- Attachment #1: Type: text/plain, Size: 4652 bytes --]

Hi all,

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

drivers/staging/intel_sst/intelmid.c:52: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:52: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:52: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:52: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:53: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:53: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:53: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:53: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:54: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:54: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:54: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:54: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:55: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:55: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:55: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:55: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:56: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:56: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:56: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/staging/intel_sst/intelmid.c:56: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:57: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:57: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:57: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/intel_sst/intelmid.c:57: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:58: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:58: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:58: warning: type defaults to 'int' in declaration of 'MODULE_SUPPORTED_DEVICE'
drivers/staging/intel_sst/intelmid.c:58: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:64: error: expected ')' before 'int'
drivers/staging/intel_sst/intelmid.c:65: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:66: error: expected ')' before numeric constant
drivers/staging/intel_sst/intelmid.c:67: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:461: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:461: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:461: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c:475: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:475: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:475: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c: In function 'snd_intelmad_probe':
drivers/staging/intel_sst/intelmid.c:859: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/intel_sst/intelmid.c:859: error: (Each undeclared identifier is reported only once
drivers/staging/intel_sst/intelmid.c:859: error: for each function it appears in.)
drivers/staging/intel_sst/intelmid.c: At top level:
drivers/staging/intel_sst/intelmid.c:989: error: 'THIS_MODULE' undeclared here (not in a function)

Presumably revealed by the module.h split up.  This file needs to include
mofdule.h.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-09-30  1:12 Stephen Rothwell
  2011-09-30  2:40 ` Paul Gortmaker
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-30  1:12 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Hi all,

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

arch/avr32/mach-at32ap/pio.c: In function 'pio_probe':
arch/avr32/mach-at32ap/pio.c:401: error: 'THIS_MODULE' undeclared (first use in this function)

Probably revealed by the module.h split up.  I guess it needs export.h
included.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-09-30  1:05 Stephen Rothwell
  2011-09-30  7:57 ` Heiko Carstens
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-30  1:05 UTC (permalink / raw)
  To: Martin Schwidefsky, Heiko Carstens
  Cc: linux-next, linux-kernel, Paul Gortmaker

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

Hi all,

After merging the final tree, the next-20110929 build (s390x allmodconfig)
failed like this:

drivers/s390/char/zcore.c:393: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/s390/char/zcore.c:741: error: expected declaration specifiers or '...' before string constant
drivers/s390/char/zcore.c:741: warning: data definition has no type or storage class
drivers/s390/char/zcore.c:741: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/s390/char/zcore.c:741: warning: function declaration isn't a prototype
drivers/s390/char/zcore.c:742: error: expected declaration specifiers or '...' before string constant
drivers/s390/char/zcore.c:742: warning: data definition has no type or storage class
drivers/s390/char/zcore.c:742: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/s390/char/zcore.c:742: warning: function declaration isn't a prototype
drivers/s390/char/zcore.c:743: error: expected declaration specifiers or '...' before string constant
drivers/s390/char/zcore.c:743: warning: data definition has no type or storage class
drivers/s390/char/zcore.c:743: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/s390/char/zcore.c:743: warning: function declaration isn't a prototype

Probably revealed by the module.h split up.

This file needs to include module.h
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-09-28  9:56 Stephen Rothwell
@ 2011-09-28 12:02 ` huang ying
  0 siblings, 0 replies; 195+ messages in thread
From: huang ying @ 2011-09-28 12:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, David Miller, Huang Ying

On Wed, Sep 28, 2011 at 5:56 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
>
> In file included from include/linux/irq_work.h:4:0,
>                 from include/linux/perf_event.h:510,
>                 from arch/sparc/mm/fault_32.c:21:
> include/linux/llist.h: In function 'llist_add':
> include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'
> In file included from include/linux/irq_work.h:4:0,
>                 from include/linux/perf_event.h:510,
>                 from arch/sparc/kernel/unaligned_32.c:18:
> include/linux/llist.h: In function 'llist_add':
> include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'
> In file included from include/linux/irq_work.h:4:0,
>                 from include/linux/perf_event.h:510,
>                 from kernel/sys.c:16:
> include/linux/llist.h: In function 'llist_add':
> include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'
>
> Caused by commit 510d7dc70eab ("llist: make all llist functions inline")
> from the akpm tree.

Sorry, should have done at least building test for sparc.  Will pay
more attention next time.

Best Regards,
Huang Ying

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

* linux-next: build failure after merge of the final tree
@ 2011-09-28  9:56 Stephen Rothwell
  2011-09-28 12:02 ` huang ying
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-09-28  9:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Miller, Huang Ying

Hi all,

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

In file included from include/linux/irq_work.h:4:0,
                 from include/linux/perf_event.h:510,
                 from arch/sparc/mm/fault_32.c:21:
include/linux/llist.h: In function 'llist_add':
include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'
In file included from include/linux/irq_work.h:4:0,
                 from include/linux/perf_event.h:510,
                 from arch/sparc/kernel/unaligned_32.c:18:
include/linux/llist.h: In function 'llist_add':
include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'
In file included from include/linux/irq_work.h:4:0,
                 from include/linux/perf_event.h:510,
                 from kernel/sys.c:16:
include/linux/llist.h: In function 'llist_add':
include/linux/llist.h:158:2: error: implicit declaration of function 'in_nmi'

Caused by commit 510d7dc70eab ("llist: make all llist functions inline")
from the akpm tree.

I applied this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 28 Sep 2011 19:51:38 +1000
Subject: [PATCH] llist: using in_nmi requires including hardirq.h

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

diff --git a/include/linux/llist.h b/include/linux/llist.h
index 5d23564..fb81b7b 100644
--- a/include/linux/llist.h
+++ b/include/linux/llist.h
@@ -73,6 +73,7 @@ struct llist_node {
 #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
 #define CHECK_NMI_SAFE_CMPXCHG()
 #else
+#include <linux/hardirq.h>
 #define CHECK_NMI_SAFE_CMPXCHG()	BUG_ON(in_nmi())
 #endif
 
-- 
1.7.6.3

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

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

* Re: linux-next: build failure after merge of the final tree
  2011-08-23  5:48 Stephen Rothwell
@ 2011-08-23 14:32 ` Randy Dunlap
  0 siblings, 0 replies; 195+ messages in thread
From: Randy Dunlap @ 2011-08-23 14:32 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: James Morris, linux-next, linux-kernel, David Howells

On Tue, 23 Aug 2011 15:48:11 +1000 Stephen Rothwell wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
> 
> kernel/cred.c: In function 'prepare_kernel_cred':
> kernel/cred.c:657:2: error: 'tgcred' undeclared (first use in this function)
> 
> Caused by commit 012146d0728f ("CRED: Fix prepare_kernel_cred() to
> provide a new thread_group_cred struct").  CONFIG_KEYS is not set in this
> build ...
> 
> Please, please build test with and without CONFIG settings that affect
> your changes.
> 
> I discovered this after releaseing linux-next for today.

This one also causes UML (defconfig) builds to fail today.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* linux-next: build failure after merge of the final tree
@ 2011-08-23  5:48 Stephen Rothwell
  2011-08-23 14:32 ` Randy Dunlap
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-08-23  5:48 UTC (permalink / raw)
  To: James Morris; +Cc: linux-next, linux-kernel, David Howells

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

Hi all,

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

kernel/cred.c: In function 'prepare_kernel_cred':
kernel/cred.c:657:2: error: 'tgcred' undeclared (first use in this function)

Caused by commit 012146d0728f ("CRED: Fix prepare_kernel_cred() to
provide a new thread_group_cred struct").  CONFIG_KEYS is not set in this
build ...

Please, please build test with and without CONFIG settings that affect
your changes.

I discovered this after releaseing linux-next for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-07-18 17:58 ` David Miller
@ 2011-07-18 20:52   ` Sam Ravnborg
  0 siblings, 0 replies; 195+ messages in thread
From: Sam Ravnborg @ 2011-07-18 20:52 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, linux-next, linux-kernel

On Mon, Jul 18, 2011 at 10:58:21AM -0700, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 18 Jul 2011 19:30:53 +1000
> 
> > After merging the final tree, today's linux-next build (sparc64 defconfig)
> > failed like this:
> > 
> > In file included from arch/sparc/include/asm/pgtable.h:4:0,
> >                  from include/linux/mm.h:41,
> >                  from include/linux/fs.h:395,
> >                  from include/linux/compat.h:15,
> >                  from arch/sparc/include/asm/siginfo.h:19,
> >                  from include/linux/signal.h:5,
> >                  from include/linux/sched.h:73,
> >                  from arch/sparc/kernel/asm-offsets.c:13:
> > arch/sparc/include/asm/pgtable_64.h: In function '__set_pte_at':
> > arch/sparc/include/asm/pgtable_64.h:674:6: error: 'init_mm' undeclared (first use in this function)
> > 
> > I assume some include file changes.  Anyone have any clues how to find
> > this?
> 
> The great irony is that sparc64 doesn't use anything this file
> generates (you won't find a single asm-offsets.h include in any
> sparc64 code).
Today sparc64 code actually uses AOFF_mm_context from asm-offsets.h.
The asm-offsets.h file is likely pulled in by some other header file.

> This asm-offset mechanim is, for whatever reason, enabled on every
> single architecture whether it's needed or not.  Maybe we should
> rethink that.
Most archs uses asm-offsets to some extent - trying to make it optional
would just result in a lot of otherwise pointless ifdefs.

With respect to the bug that triggered the mail....
It looks like another definition stuffed down in sched.h where is does not
belong. mm_types.h looks like the right place.
Then arch/sparc/include/asm/pgtable.h should obviously pull in this header.
But I do not have -next handy to try it out.

	Sam

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

* Re: linux-next: build failure after merge of the final tree
  2011-07-18  9:30 Stephen Rothwell
@ 2011-07-18 17:58 ` David Miller
  2011-07-18 20:52   ` Sam Ravnborg
  0 siblings, 1 reply; 195+ messages in thread
From: David Miller @ 2011-07-18 17:58 UTC (permalink / raw)
  To: sfr; +Cc: linux-next, linux-kernel

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 18 Jul 2011 19:30:53 +1000

> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> In file included from arch/sparc/include/asm/pgtable.h:4:0,
>                  from include/linux/mm.h:41,
>                  from include/linux/fs.h:395,
>                  from include/linux/compat.h:15,
>                  from arch/sparc/include/asm/siginfo.h:19,
>                  from include/linux/signal.h:5,
>                  from include/linux/sched.h:73,
>                  from arch/sparc/kernel/asm-offsets.c:13:
> arch/sparc/include/asm/pgtable_64.h: In function '__set_pte_at':
> arch/sparc/include/asm/pgtable_64.h:674:6: error: 'init_mm' undeclared (first use in this function)
> 
> I assume some include file changes.  Anyone have any clues how to find
> this?

The great irony is that sparc64 doesn't use anything this file
generates (you won't find a single asm-offsets.h include in any
sparc64 code).

This asm-offset mechanim is, for whatever reason, enabled on every
single architecture whether it's needed or not.  Maybe we should
rethink that.

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

* linux-next: build failure after merge of the final tree
@ 2011-07-18  9:35 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-07-18  9:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: linux-next, linux-kernel, Avi Kivity, Marcelo Tosatti

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

Hi all,

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

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1151: Error: attempt to move .org backwards
arch/powerpc/kernel/exceptions-64s.S:1160: Error: attempt to move .org backwards

This is probably powerpc or kvm tree related.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-07-18  9:30 Stephen Rothwell
  2011-07-18 17:58 ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-07-18  9:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi all,

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

In file included from arch/sparc/include/asm/pgtable.h:4:0,
                 from include/linux/mm.h:41,
                 from include/linux/fs.h:395,
                 from include/linux/compat.h:15,
                 from arch/sparc/include/asm/siginfo.h:19,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from arch/sparc/kernel/asm-offsets.c:13:
arch/sparc/include/asm/pgtable_64.h: In function '__set_pte_at':
arch/sparc/include/asm/pgtable_64.h:674:6: error: 'init_mm' undeclared (first use in this function)

I assume some include file changes.  Anyone have any clues how to find
this?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-27  5:11 Stephen Rothwell
@ 2011-05-27 14:47 ` Mike Frysinger
  0 siblings, 0 replies; 195+ messages in thread
From: Mike Frysinger @ 2011-05-27 14:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Linus, Andrew Morton

On Fri, May 27, 2011 at 01:11, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
>
> drivers/misc/kgdbts.c: In function 'check_and_rewind_pc':
> drivers/misc/kgdbts.c:307: error: implicit declaration of function 'instruction_pointer_set'
>
> Caused by commit 63ab25ebbc50 ("kgdbts: unify/generalize gdb breakpoint
> adjustment") from Linus' tree.
>
> Lots of architectures do not use asm-generic/ptrace.h where
> instruction_pointer_set() is defined.

yes, but lots of arches dont implement kgdb, so it doesnt matter :).
i thought i got all of them, but i must have missed some, or new
arches showed up since i wrote the patches.  i'll take a look later
today and send out a fix.
-mike

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

* linux-next: build failure after merge of the final tree
@ 2011-05-27  5:11 Stephen Rothwell
  2011-05-27 14:47 ` Mike Frysinger
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-27  5:11 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-next, linux-kernel, Linus, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hi all,

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

drivers/misc/kgdbts.c: In function 'check_and_rewind_pc':
drivers/misc/kgdbts.c:307: error: implicit declaration of function 'instruction_pointer_set'

Caused by commit 63ab25ebbc50 ("kgdbts: unify/generalize gdb breakpoint
adjustment") from Linus' tree.

Lots of architectures do not use asm-generic/ptrace.h where
instruction_pointer_set() is defined.

I have reverted that commit for today.

This error was detected in our builds of the mmotm tree on May 14
(see http://kisskb.ellerman.id.au/kisskb/buildresult/4161286/).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-25  9:24         ` Felipe Balbi
@ 2011-05-25 12:13           ` Mike Frysinger
  0 siblings, 0 replies; 195+ messages in thread
From: Mike Frysinger @ 2011-05-25 12:13 UTC (permalink / raw)
  To: balbi
  Cc: Linus Torvalds, Stephen Rothwell, linux-next, linux-kernel,
	David S. Miller, netdev, Andrew Morton, Mel Gorman, linux-mm,
	Alexander Viro, linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Wed, May 25, 2011 at 05:24, Felipe Balbi wrote:
> On Tue, May 24, 2011 at 01:10:42PM -0400, Mike Frysinger wrote:
>> latest tree seems to only fail for me now on the musb driver.  i can
>> send out a patch later today if no one else has gotten to it yet.
>
> please do send out, but what was the compile breakage with musb ?

i logged it earlier in the thread:
drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
drivers/usb/musb/musb_core.c:219: error: implicit declaration of
function 'prefetch'
make[3]: *** [drivers/usb/musb/musb_core.o] Error 1

patch sent out now
-mike

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24 17:10       ` Mike Frysinger
  2011-05-24 17:29         ` Linus Torvalds
@ 2011-05-25  9:24         ` Felipe Balbi
  2011-05-25 12:13           ` Mike Frysinger
  1 sibling, 1 reply; 195+ messages in thread
From: Felipe Balbi @ 2011-05-25  9:24 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Linus Torvalds, Stephen Rothwell, linux-next, linux-kernel,
	David S. Miller, netdev, Andrew Morton, Mel Gorman, linux-mm,
	Alexander Viro, linux-fsdevel, Paul E. McKenney, Dipankar Sarma,
	Balbi, Felipe

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

On Tue, May 24, 2011 at 01:10:42PM -0400, Mike Frysinger wrote:
> On Tue, May 24, 2011 at 00:10, Mike Frysinger wrote:
> > On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
> >> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
> >>>
> >>> more failures:
> >>
> >> Is this blackfin or something?
> >
> > let's go with "something" ...
> >
> >> I did an allyesconfig with a special x86 patch that should have caught
> >> everything that didn't have the proper prefetch.h include, but non-x86
> >> drivers would have passed that.
> >
> > the isp1362-hcd failure probably is before your
> > 268bb0ce3e87872cb9290c322b0d35bce230d88f.  i think i was reading a log
> > that is a few days old (ive been traveling and am playing catch up
> > atm).  i'll refresh and see what's what still.
> >
> > the common musb code only allows it to be built if the arch glue is
> > available, and there is no x86 glue.  so an allyesconfig on x86
> > wouldnt have picked up the failure.  it'll bomb though for any target
> > which does have the glue.

anyone with a PCI OPT card to help adding a PCI glue layer for MUSB ?

> latest tree seems to only fail for me now on the musb driver.  i can
> send out a patch later today if no one else has gotten to it yet.

please do send out, but what was the compile breakage with musb ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24 12:48       ` Greg KH
@ 2011-05-24 21:52         ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-24 21:52 UTC (permalink / raw)
  To: Greg KH
  Cc: Mike Frysinger, Linus, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

Hi Greg,

On Tue, 24 May 2011 05:48:33 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Tue, May 24, 2011 at 01:59:30PM +1000, Stephen Rothwell wrote:
> > 
> > The cause was a patch from Linus ...
> 
> Ah, ok, that makes more sense, sorry for the noise.

And it doesn't show up in many builds because musb depends on ARM ||
(BF54x && !BF544) || (BF52x && !BF522 && !BF523).  So it probably appears
in some of the overnight builds, but not the ones I do while creating
linux-next.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24 17:10       ` Mike Frysinger
@ 2011-05-24 17:29         ` Linus Torvalds
  2011-05-25  9:24         ` Felipe Balbi
  1 sibling, 0 replies; 195+ messages in thread
From: Linus Torvalds @ 2011-05-24 17:29 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma, Balbi, Felipe

On Tue, May 24, 2011 at 10:10 AM, Mike Frysinger <vapier.adi@gmail.com> wrote:
>
> latest tree seems to only fail for me now on the musb driver.  i can
> send out a patch later today if no one else has gotten to it yet.

Please do.

I did a

  grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')

but there are drivers out there that have that "prefetch()" pattern
without being about actual CPU prefetching at all (see for example
drivers/ide/cmd640.c), so once I got allyesconfig with my x86
detection hack going, I didn't bother with the few odd men out.

                  Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  4:10     ` Mike Frysinger
@ 2011-05-24 17:10       ` Mike Frysinger
  2011-05-24 17:29         ` Linus Torvalds
  2011-05-25  9:24         ` Felipe Balbi
  0 siblings, 2 replies; 195+ messages in thread
From: Mike Frysinger @ 2011-05-24 17:10 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma, Balbi, Felipe

On Tue, May 24, 2011 at 00:10, Mike Frysinger wrote:
> On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
>> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
>>>
>>> more failures:
>>
>> Is this blackfin or something?
>
> let's go with "something" ...
>
>> I did an allyesconfig with a special x86 patch that should have caught
>> everything that didn't have the proper prefetch.h include, but non-x86
>> drivers would have passed that.
>
> the isp1362-hcd failure probably is before your
> 268bb0ce3e87872cb9290c322b0d35bce230d88f.  i think i was reading a log
> that is a few days old (ive been traveling and am playing catch up
> atm).  i'll refresh and see what's what still.
>
> the common musb code only allows it to be built if the arch glue is
> available, and there is no x86 glue.  so an allyesconfig on x86
> wouldnt have picked up the failure.  it'll bomb though for any target
> which does have the glue.

latest tree seems to only fail for me now on the musb driver.  i can
send out a patch later today if no one else has gotten to it yet.
-mike

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  3:59     ` Stephen Rothwell
@ 2011-05-24 12:48       ` Greg KH
  2011-05-24 21:52         ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Greg KH @ 2011-05-24 12:48 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mike Frysinger, Linus, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Tue, May 24, 2011 at 01:59:30PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> On Mon, 23 May 2011 19:51:51 -0700 Greg KH <greg@kroah.com> wrote:
> >
> > On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> > > On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > > > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > > > iterators").
> > > >
> > > > I added the following patch for today:
> > > 
> > > probably should get added to whatever tree that commit is coming from
> > > so we dont have bisect hell ?
> > > 
> > > more failures:
> > > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> > > drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> > > function 'prefetch'
> > > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> > > drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> > > function 'prefetchw'
> > > make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
> > > 
> > > drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> > > drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> > > function 'prefetch'
> > > make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
> > > 
> > > although it seems like it should be fairly trivial to look at the
> > > funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> > > of the files that are missing the include
> > 
> > How did this not show up in linux-next?  Where did the patch that caused
> > this show up from?
> > 
> > totally confused,
> 
> :-)
> 
> sfr said above:
> > Caused by commit e66eed651fd1 ("list: remove prefetching from regular
> > list iterators").
> 
> The cause was a patch from Linus ...

Ah, ok, that makes more sense, sorry for the noise.

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  4:01   ` Linus Torvalds
@ 2011-05-24  4:10     ` Mike Frysinger
  2011-05-24 17:10       ` Mike Frysinger
  0 siblings, 1 reply; 195+ messages in thread
From: Mike Frysinger @ 2011-05-24  4:10 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
>>
>> more failures:
>
> Is this blackfin or something?

let's go with "something" ...

> I did an allyesconfig with a special x86 patch that should have caught
> everything that didn't have the proper prefetch.h include, but non-x86
> drivers would have passed that.

the isp1362-hcd failure probably is before your
268bb0ce3e87872cb9290c322b0d35bce230d88f.  i think i was reading a log
that is a few days old (ive been traveling and am playing catch up
atm).  i'll refresh and see what's what still.

the common musb code only allows it to be built if the arch glue is
available, and there is no x86 glue.  so an allyesconfig on x86
wouldnt have picked up the failure.  it'll bomb though for any target
which does have the glue.
-mike

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  2:06 ` Mike Frysinger
  2011-05-24  2:51   ` Greg KH
@ 2011-05-24  4:01   ` Linus Torvalds
  2011-05-24  4:10     ` Mike Frysinger
  1 sibling, 1 reply; 195+ messages in thread
From: Linus Torvalds @ 2011-05-24  4:01 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
>
> more failures:

Is this blackfin or something?

I did an allyesconfig with a special x86 patch that should have caught
everything that didn't have the proper prefetch.h include, but non-x86
drivers would have passed that.

And I guess I didn't do my "force staging drivers on" hack for that test either.

                      Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  2:51   ` Greg KH
@ 2011-05-24  3:59     ` Stephen Rothwell
  2011-05-24 12:48       ` Greg KH
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-24  3:59 UTC (permalink / raw)
  To: Greg KH
  Cc: Mike Frysinger, Linus, linux-next, linux-kernel, David S. Miller,
	netdev, Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]

Hi Greg,

On Mon, 23 May 2011 19:51:51 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> > On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > > iterators").
> > >
> > > I added the following patch for today:
> > 
> > probably should get added to whatever tree that commit is coming from
> > so we dont have bisect hell ?
> > 
> > more failures:
> > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> > drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> > function 'prefetch'
> > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> > drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> > function 'prefetchw'
> > make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
> > 
> > drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> > drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> > function 'prefetch'
> > make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
> > 
> > although it seems like it should be fairly trivial to look at the
> > funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> > of the files that are missing the include
> 
> How did this not show up in linux-next?  Where did the patch that caused
> this show up from?
> 
> totally confused,

:-)

sfr said above:
> Caused by commit e66eed651fd1 ("list: remove prefetching from regular
> list iterators").

The cause was a patch from Linus ...

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-24  2:06 ` Mike Frysinger
@ 2011-05-24  2:51   ` Greg KH
  2011-05-24  3:59     ` Stephen Rothwell
  2011-05-24  4:01   ` Linus Torvalds
  1 sibling, 1 reply; 195+ messages in thread
From: Greg KH @ 2011-05-24  2:51 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Stephen Rothwell, Linus, linux-next, linux-kernel,
	David S. Miller, netdev, Andrew Morton, Mel Gorman, linux-mm,
	Alexander Viro, linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > iterators").
> >
> > I added the following patch for today:
> 
> probably should get added to whatever tree that commit is coming from
> so we dont have bisect hell ?
> 
> more failures:
> drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> function 'prefetch'
> drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> function 'prefetchw'
> make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
> 
> drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> function 'prefetch'
> make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
> 
> although it seems like it should be fairly trivial to look at the
> funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> of the files that are missing the include

How did this not show up in linux-next?  Where did the patch that caused
this show up from?

totally confused,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-20  6:18 Stephen Rothwell
@ 2011-05-24  2:06 ` Mike Frysinger
  2011-05-24  2:51   ` Greg KH
  2011-05-24  4:01   ` Linus Torvalds
  0 siblings, 2 replies; 195+ messages in thread
From: Mike Frysinger @ 2011-05-24  2:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, linux-next, linux-kernel, David S. Miller, netdev,
	Andrew Morton, Mel Gorman, linux-mm, Alexander Viro,
	linux-fsdevel, Paul E. McKenney, Dipankar Sarma

On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> iterators").
>
> I added the following patch for today:

probably should get added to whatever tree that commit is coming from
so we dont have bisect hell ?

more failures:
drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
function 'prefetch'
drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
function 'prefetchw'
make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1

drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
drivers/usb/musb/musb_core.c:219: error: implicit declaration of
function 'prefetch'
make[3]: *** [drivers/usb/musb/musb_core.o] Error 1

although it seems like it should be fairly trivial to look at the
funcs in linux/prefetch.h, grep the tree, and find a pretty good list
of the files that are missing the include
-mike

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-23  4:56 Stephen Rothwell
@ 2011-05-23  5:17 ` Artem Bityutskiy
  0 siblings, 0 replies; 195+ messages in thread
From: Artem Bityutskiy @ 2011-05-23  5:17 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

On Mon, 2011-05-23 at 14:56 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:

Hi,

should be fixed now, thanks and apologies for the breakage.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

* linux-next: build failure after merge of the final tree
@ 2011-05-23  4:56 Stephen Rothwell
  2011-05-23  5:17 ` Artem Bityutskiy
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-23  4:56 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

Hi all,

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

fs/ubifs/super.c: In function 'mount_ubifs':
fs/ubifs/super.c:1432: error: implicit declaration of function 'dbg_msg'
fs/ubifs/replay.c: In function 'set_bud_lprops':
fs/ubifs/replay.c:144: error: implicit declaration of function 'dbg_msg'
fs/ubifs/commit.c: In function 'ubifs_bg_thread':
fs/ubifs/commit.c:296: error: implicit declaration of function 'dbg_msg'

Caused by commit 327fdae87979 ("UBIFS: switch to dynamic printks").  This
build does not have CONFIG_UBIFS_FS_DEBUG set.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-05-20  6:32 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-20  6:32 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, linux-kernel, Paul Mundt, linux-fbdev

Hi all,

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

drivers/video/udlfb.c: In function 'dlfb_compress_hline':
drivers/video/udlfb.c:421: error: implicit declaration of function 'prefetch_range'

Presumably caused by commit e66eed651fd1 ("list: remove prefetching from
regular list iterators").  We need to include preempt.h explictly, now.

I have included this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 May 2011 16:29:01 +1000
Subject: [PATCH] udlfb: include prefetch.h explicitly

Commit e66eed651fd1 ("list: remove prefetching from
regular list iterators") removed the include of prefetch.h from list.h,
so we need to include it explicitly, now.

fixes this build error on powerpc:

drivers/video/udlfb.c: In function 'dlfb_compress_hline':
drivers/video/udlfb.c:421: error: implicit declaration of function 'prefetch_range'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/video/udlfb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index 68041d9..4c299cc 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -28,6 +28,7 @@
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/prefetch.h>
 #include <video/udlfb.h>
 #include "edid.h"
 
-- 
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] 195+ messages in thread

* linux-next: build failure after merge of the final tree
@ 2011-05-20  6:27 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-20  6:27 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, linux-kernel

Hi all,

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

mm/slab.c: In function '__cache_alloc':
mm/slab.c:3493: error: implicit declaration of function 'prefetchw'

Applied this patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 May 2011 16:24:17 +1000
Subject: [PATCH] mm: include prefetch.h

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h, so include
it explicitly.

Fixes this build error on sparc32:

mm/slab.c: In function '__cache_alloc':
mm/slab.c:3493: error: implicit declaration of function 'prefetchw'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/slab.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 46a9c16..bcfa498 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -115,6 +115,7 @@
 #include	<linux/debugobjects.h>
 #include	<linux/kmemcheck.h>
 #include	<linux/memory.h>
+#include	<linux/prefetch.h>
 
 #include	<asm/cacheflush.h>
 #include	<asm/tlbflush.h>
-- 
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] 195+ messages in thread

* linux-next: build failure after merge of the final tree
@ 2011-05-20  6:23 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-20  6:23 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, linux-kernel, David S. Miller, linux-mm

Hi all,

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

mm/prio_tree.c: In function 'vma_prio_tree_next':
mm/prio_tree.c:178: error: implicit declaration of function 'prefetch'

Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
iterators").

I added this patch  for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 May 2011 16:19:57 +1000
Subject: [PATCH] mm: include prefetch.h

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h, so include
it explicitly.

Fixes thids build error on sparc32:

mm/prio_tree.c: In function 'vma_prio_tree_next':
mm/prio_tree.c:178: error: implicit declaration of function 'prefetch'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/prio_tree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/prio_tree.c b/mm/prio_tree.c
index 603ae98..799dcfd 100644
--- a/mm/prio_tree.c
+++ b/mm/prio_tree.c
@@ -13,6 +13,7 @@
 
 #include <linux/mm.h>
 #include <linux/prio_tree.h>
+#include <linux/prefetch.h>
 
 /*
  * See lib/prio_tree.c for details on the general radix priority search tree
-- 
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] 195+ messages in thread

* linux-next: build failure after merge of the final tree
@ 2011-05-20  6:18 Stephen Rothwell
  2011-05-24  2:06 ` Mike Frysinger
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-05-20  6:18 UTC (permalink / raw)
  To: Linus
  Cc: linux-next, linux-kernel, David S. Miller, netdev, Andrew Morton,
	Mel Gorman, linux-mm, Alexander Viro, linux-fsdevel,
	Paul E. McKenney, Dipankar Sarma

Hi all,

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

mm/page_alloc.c: In function '__free_pages_bootmem':
mm/page_alloc.c:704: error: implicit declaration of function 'prefetchw'
fs/dcache.c: In function '__d_lookup_rcu':
fs/dcache.c:1810: error: implicit declaration of function 'prefetch'
fs/inode.c: In function 'new_inode':
fs/inode.c:894: error: implicit declaration of function 'spin_lock_prefetch'
net/core/skbuff.c: In function '__alloc_skb':
net/core/skbuff.c:184: error: implicit declaration of function 'prefetchw'
In file included from net/ipv4/ip_forward.c:32:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
In file included from net/ipv6/af_inet6.c:48:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
net/unix/af_unix.c: In function 'unix_ioctl':
net/unix/af_unix.c:2066: error: implicit declaration of function 'prefetch'
In file included from net/sunrpc/xprtsock.c:44:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
kernel/rcutiny.c: In function 'rcu_process_callbacks':
kernel/rcutiny.c:180: error: implicit declaration of function 'prefetch'

Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
iterators").

I added the following patch for today:

>From 1a101eb2766057372006b1b487d05f40fe899478 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 May 2011 16:08:48 +1000
Subject: [PATCH] include prefetch.h where needed

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h.

fixes these build errors on sparc:

mm/page_alloc.c: In function '__free_pages_bootmem':
mm/page_alloc.c:704: error: implicit declaration of function 'prefetchw'
fs/dcache.c: In function '__d_lookup_rcu':
fs/dcache.c:1810: error: implicit declaration of function 'prefetch'
fs/inode.c: In function 'new_inode':
fs/inode.c:894: error: implicit declaration of function 'spin_lock_prefetch'
net/core/skbuff.c: In function '__alloc_skb':
net/core/skbuff.c:184: error: implicit declaration of function 'prefetchw'
In file included from net/ipv4/ip_forward.c:32:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
In file included from net/ipv6/af_inet6.c:48:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
net/unix/af_unix.c: In function 'unix_ioctl':
net/unix/af_unix.c:2066: error: implicit declaration of function 'prefetch'
In file included from net/sunrpc/xprtsock.c:44:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
kernel/rcutiny.c: In function 'rcu_process_callbacks':
kernel/rcutiny.c:180: error: implicit declaration of function 'prefetch'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/dcache.c            |    1 +
 fs/inode.c             |    1 +
 include/linux/skbuff.h |    1 +
 kernel/rcutiny.c       |    1 +
 mm/page_alloc.c        |    1 +
 net/core/skbuff.c      |    1 +
 6 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 22a0ef4..18b2a1f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -35,6 +35,7 @@
 #include <linux/hardirq.h>
 #include <linux/bit_spinlock.h>
 #include <linux/rculist_bl.h>
+#include <linux/prefetch.h>
 #include "internal.h"
 
 /*
diff --git a/fs/inode.c b/fs/inode.c
index 33c963d..c77081f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -26,6 +26,7 @@
 #include <linux/posix_acl.h>
 #include <linux/ima.h>
 #include <linux/cred.h>
+#include <linux/prefetch.h>
 #include "internal.h"
 
 /*
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 79aafbb..f963b8f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -29,6 +29,7 @@
 #include <linux/rcupdate.h>
 #include <linux/dmaengine.h>
 #include <linux/hrtimer.h>
+#include <linux/prefetch.h>
 
 /* Don't change this without changing skb_csum_unnecessary! */
 #define CHECKSUM_NONE 0
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 421abfd..7bbac7d 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -35,6 +35,7 @@
 #include <linux/init.h>
 #include <linux/time.h>
 #include <linux/cpu.h>
+#include <linux/prefetch.h>
 
 /* Controls for rcu_kthread() kthread, replacing RCU_SOFTIRQ used previously. */
 static struct task_struct *rcu_kthread_task;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 44b3d7b..9d5498e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -54,6 +54,7 @@
 #include <trace/events/kmem.h>
 #include <linux/ftrace_event.h>
 #include <linux/memcontrol.h>
+#include <linux/prefetch.h>
 
 #include <asm/tlbflush.h>
 #include <asm/div64.h>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3e934fe..46cbd28 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -57,6 +57,7 @@
 #include <linux/init.h>
 #include <linux/scatterlist.h>
 #include <linux/errqueue.h>
+#include <linux/prefetch.h>
 
 #include <net/protocol.h>
 #include <net/dst.h>
-- 
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] 195+ messages in thread

* linux-next: build failure after merge of the final tree
@ 2011-03-28  3:44 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-03-28  3:44 UTC (permalink / raw)
  To: Linus, Andrew Morton; +Cc: linux-next, linux-kernel, Maxim Levitsky

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

Hi all,

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

drivers/memstick/host/r592.c:26: error: 'enable_dma' redeclared as different kind of symbol
arch/powerpc/include/asm/dma.h:189: note: previous definition of 'enable_dma' was here

Caused by commit 926341250102 ("memstick: add driver for Ricoh R5C592
card reader").

enable_dma() is also defined in a few other architectures including x86
(presumably asm/dma.h does not get included there).

I just reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-03-24  4:13 ` Andrew Morton
@ 2011-03-24 19:55   ` Tony Luck
  0 siblings, 0 replies; 195+ messages in thread
From: Tony Luck @ 2011-03-24 19:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, Linus, linux-next, linux-kernel,
	David S. Miller, David Rientjes

On Wed, Mar 23, 2011 at 9:13 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> Meanwhile, ddd588b5dd55f143203799 reverts cleanly and I'd suggest we do
> that.

I tried that revert (from Linus' tree this morning HEAD
=6c5103890057b1bb781b26b7aae38d33e4c517d8)
and got:


  CC      mm/page_alloc.o
mm/page_alloc.c: In function ‘__alloc_pages_slowpath’:
mm/page_alloc.c:2180: error: ‘SHOW_MEM_FILTER_NODES’ undeclared (first
use in this function)
mm/page_alloc.c:2180: error: (Each undeclared identifier is reported only once
mm/page_alloc.c:2180: error: for each function it appears in.)
mm/page_alloc.c:2198: error: implicit declaration of function ‘__show_mem’
make[1]: *** [mm/page_alloc.o] Error 1
make: *** [mm] Error 2

-Tony

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

* Re: linux-next: build failure after merge of the final tree
  2011-03-24  3:30 Stephen Rothwell
@ 2011-03-24  4:13 ` Andrew Morton
  2011-03-24 19:55   ` Tony Luck
  0 siblings, 1 reply; 195+ messages in thread
From: Andrew Morton @ 2011-03-24  4:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, linux-next, linux-kernel, David S. Miller, David Rientjes,
	Luck, Tony

On Thu, 24 Mar 2011 14:30:19 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> lib/lib.a(show_mem.o): In function `show_mem':
> show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
> arch/sparc/mm/built-in.o:(.text+0xd70): first defined here

I discovered this on ia64 today.

> This has been reported elsewhere, caused by commit ddd588b5dd55 ("oom:
> suppress nodes that are not allowed from meminfo on oom kill").
> 

Yeah, this is tricky.  The addition of the symbol __show_mem caused the
linker to newly take lib/show_mem.o out of lib/lib.a, whereas
previously that object file would have been omitted from the build
altogether.  Even though we compile it!

Making show_mem() __weak would "fix" it, but it's still wrong.  Given
that architectures can implement private versions of show_mem(), the
patch was wrong to call the generic version (renamed to __show_mem) at
all.

So...  a suitable fix would be to remove __show_mem and to add the
extra arg to show_mem() itself then fix up all callers and to fix up
all implementations to honour "filter".

Meanwhile, ddd588b5dd55f143203799 reverts cleanly and I'd suggest we do
that.

The dependence on linker .a handling is just gross and we should clean
that up.  CONFIG_ARCH_HAS_SHOW_MEM or something.

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

* linux-next: build failure after merge of the final tree
@ 2011-03-24  3:30 Stephen Rothwell
  2011-03-24  4:13 ` Andrew Morton
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-03-24  3:30 UTC (permalink / raw)
  To: Linus, Andrew Morton
  Cc: linux-next, linux-kernel, David S. Miller, David Rientjes

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

Hi all,

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

lib/lib.a(show_mem.o): In function `show_mem':
show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
arch/sparc/mm/built-in.o:(.text+0xd70): first defined here

This has been reported elsewhere, caused by commit ddd588b5dd55 ("oom:
suppress nodes that are not allowed from meminfo on oom kill").

I presume that this will be fixed soon, and so have left it as is.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2011-01-31  6:26 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2011-01-31  6:26 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

Hi all,

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

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:989: Error: attempt to move .org backwards
arch/powerpc/kernel/exceptions-64s.S:999: Error: attempt to move .org backwards
arch/powerpc/kernel/exceptions-64s.S:1008: Error: attempt to move .org backwards

So something has added a bit of bloat in there.  I have left this broken
for now.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-01-15  2:10 Stephen Rothwell
@ 2011-01-15  4:27 ` Andrea Arcangeli
  0 siblings, 0 replies; 195+ messages in thread
From: Andrea Arcangeli @ 2011-01-15  4:27 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Andrew Morton, Linus Torvalds, David S. Miller

Hello,

On Sat, Jan 15, 2011 at 01:10:27PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> In file included from arch/sparc/include/asm/pgtable_32.h:455,
>                  from arch/sparc/include/asm/pgtable.h:6,
>                  from include/linux/mm.h:41,
>                  from arch/sparc/kernel/process_32.c:17:
> include/asm-generic/pgtable.h: In function 'pmdp_get_and_clear':
> include/asm-generic/pgtable.h:96: error: implicit declaration of function '__pmd'
> include/asm-generic/pgtable.h:96: error: incompatible types when returning type 'int' but 'pmd_t' was expected
> 
> and *lots* more.
> 
> Caused by commit e2cda322648122dc400c85ada80eaddbc612ef6a ("thp: add pmd
> mangling generic functions").  This has already been reported broken in
> other architectures as well.
> 
> I have just left it for today.

See arch/sparc/include/asm/page_32.h

/* #define __pmd(x)        ((pmd_t) { (x) } ) */ /* XXX procedure with loop */
/* #define __pmd(x)        (x) */ /* XXX later */


Not sure why __pmd is commented out on sparc32 (it isn't in sparc64,
this is why sparc looked like building ok in a earlier report).

Removing those two comments at first glance should fix the build, but
I don't understand the comment, so I'm unsure if it's safe and what
"XXX later" means. Overall this __pmd(0) thing is just a fake.  We've
to return some dummy pmd_t structure to build, because the function
returns a pmd_t, there's a BUG() before __pmd is evaluated, but I
didn't think of a better way yet than to return __pmd(0).

static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
       	      	    			             unsigned long
       	      	    			             address,
						     pmd_t *pmdp)
{
	BUG();
	return __pmd(0);
}

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

* linux-next: build failure after merge of the final tree
@ 2011-01-15  2:10 Stephen Rothwell
  2011-01-15  4:27 ` Andrea Arcangeli
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2011-01-15  2:10 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: linux-next, linux-kernel, Andrew Morton, Linus Torvalds, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

Hi all,

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

In file included from arch/sparc/include/asm/pgtable_32.h:455,
                 from arch/sparc/include/asm/pgtable.h:6,
                 from include/linux/mm.h:41,
                 from arch/sparc/kernel/process_32.c:17:
include/asm-generic/pgtable.h: In function 'pmdp_get_and_clear':
include/asm-generic/pgtable.h:96: error: implicit declaration of function '__pmd'
include/asm-generic/pgtable.h:96: error: incompatible types when returning type 'int' but 'pmd_t' was expected

and *lots* more.

Caused by commit e2cda322648122dc400c85ada80eaddbc612ef6a ("thp: add pmd
mangling generic functions").  This has already been reported broken in
other architectures as well.

I have just left it for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2010-11-29  2:07 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-11-29  2:07 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, linux-kernel, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]

Hi Linus,

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

In file included from include/linux/splice.h:11,
                 from net/core/skbuff.c:54:
include/linux/pipe_fs_i.h: In function 'get_pipe_info':
include/linux/pipe_fs_i.h:171: error: dereferencing pointer to incomplete type
include/linux/pipe_fs_i.h:173: error: dereferencing pointer to incomplete type
include/linux/pipe_fs_i.h:173: error: dereferencing pointer to incomplete type

Caused by commit c66fb347946ebdd5b10908866ecc9fa05ee2cf3d ("Export
'get_pipe_info()' to other users") from Linus' tree.

I cherry-picked the fix from Linus' tree.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2010-11-09  4:03 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-11-09  4:03 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-next, linux-kernel, David S. Miller, Linus

Hi Al,

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

fs/openpromfs/inode.c: In function 'openprom_mount':
fs/openpromfs/inode.c:422: error: expected ';' before '}' token

Caused by commit fc14f2fef682df677d64a145256dbd263df2aa7b ("convert
get_sb_single() users") from Linus' tree.   Pity that conmmit never made
it into the linux-next tree :-(

I added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 9 Nov 2010 14:58:55 +1100
Subject: [PATCH] openpromfs: fix for bad get_sb_single() conversion

Fixes:

fs/openpromfs/inode.c: In function 'openprom_mount':
fs/openpromfs/inode.c:422: error: expected ';' before '}' token

on sparc.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/openpromfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index ddb1f41..911e61f 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -418,7 +418,7 @@ out_no_root:
 static struct dentry *openprom_mount(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *data)
 {
-	return mount_single(fs_type, flags, data, openprom_fill_super)
+	return mount_single(fs_type, flags, data, openprom_fill_super);
 }
 
 static struct file_system_type openprom_fs_type = {
-- 
1.7.2.3

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

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

* Re: linux-next: build failure after merge of the final tree
  2010-09-16  5:15 Stephen Rothwell
@ 2010-09-16  5:47 ` Takashi Iwai
  0 siblings, 0 replies; 195+ messages in thread
From: Takashi Iwai @ 2010-09-16  5:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Kailang Yang

At Thu, 16 Sep 2010 15:15:34 +1000,
Stephen Rothwell wrote:
> 
> Hi Takashi,
> 
> After merging the final tree, today's linux-next build (i386 defconfig)
> failed like this:
> 
> sound/pci/hda/patch_realtek.c: In function 'patch_alc269':
> sound/pci/hda/patch_realtek.c:15028: error: 'alc269_suspend' undeclared (first use in this function)
> 
> Caused by commit bf402279498f71e6629d90939737c7c0d311c5d6 ("ALSA: hda -
> Set up COEFs for ALC269 to avoid click noises at power-saving").
> 
> I have reverted that commit for today.
> 
> BTW, that commit has no Signed-off-by from its author.

Yes, obviously overlooked.  Fixed both issues now.


thanks,

Takashi

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

* linux-next: build failure after merge of the final tree
@ 2010-09-16  5:15 Stephen Rothwell
  2010-09-16  5:47 ` Takashi Iwai
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-09-16  5:15 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-next, linux-kernel, Kailang Yang

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi Takashi,

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

sound/pci/hda/patch_realtek.c: In function 'patch_alc269':
sound/pci/hda/patch_realtek.c:15028: error: 'alc269_suspend' undeclared (first use in this function)

Caused by commit bf402279498f71e6629d90939737c7c0d311c5d6 ("ALSA: hda -
Set up COEFs for ALC269 to avoid click noises at power-saving").

I have reverted that commit for today.

BTW, that commit has no Signed-off-by from its author.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-08-11  5:23 ` Andrew Morton
@ 2010-08-11  7:38   ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-08-11  7:38 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus, linux-next, linux-kernel, Alexey Fomenko, Rusty Russell,
	Michal Marek, Trevor Keith

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Hi Andrew,

On Tue, 10 Aug 2010 22:23:10 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> doh.  This?
> 
> 
> From: Andrew Morton <akpm@linux-foundation.org>
> 
> - don't kfree("")
> 
> - fix one missed conversion
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
> Cc: Trevor Keith <tsrk@tsrk.net>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michal Marek <mmarek@suse.cz>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

works for me, thanks.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Now, don't you wish that had been in linux-next?  ;-)

Please send to Linus (if you haven't already) and I will add it to my
fixes tree for linux-next tomorrow unless Linus has taken it by then.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-08-11  3:38 Stephen Rothwell
@ 2010-08-11  5:23 ` Andrew Morton
  2010-08-11  7:38   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Andrew Morton @ 2010-08-11  5:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, linux-next, linux-kernel, Alexey Fomenko, Rusty Russell,
	Michal Marek, Trevor Keith

On Wed, 11 Aug 2010 13:38:12 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> The only patch new to linux-next since yesterday that affects scripts/mod
> is commit 37ed19d5cce35a40d3913cf9aa208ce9f60db3d7
> ("scripts/mod/modpost.c: fix memory leak") from Linus' tree.
> 
> I have reverted that commit in linux-next for today as that makes the
> error go away.

doh.  This?


From: Andrew Morton <akpm@linux-foundation.org>

- don't kfree("")

- fix one missed conversion

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Cc: Trevor Keith <tsrk@tsrk.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/mod/modpost.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN scripts/mod/modpost.c~d scripts/mod/modpost.c
--- a/scripts/mod/modpost.c~d
+++ a/scripts/mod/modpost.c
@@ -14,6 +14,7 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <ctype.h>
+#include <string.h>
 #include "modpost.h"
 #include "../../include/generated/autoconf.h"
 #include "../../include/linux/license.h"
@@ -1167,7 +1168,7 @@ static char *sec2annotation(const char *
 			strcat(p, " ");
 		return r; /* we leak her but we do not care */
 	} else {
-		return "";
+		return strdup("");
 	}
 }
 
@@ -1302,7 +1303,7 @@ static void report_sec_mismatch(const ch
 		"%s%s so it may be used outside an exit section.\n",
 		from, prl_from, fromsym, from_p,
 		to, prl_to, tosym, to_p,
-		sec2annotation(tosec), tosym, to_p);
+		prl_to, tosym, to_p);
 		free(prl_from);
 		free(prl_to);
 		break;
_

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

* linux-next: build failure after merge of the final tree
@ 2010-08-11  3:38 Stephen Rothwell
  2010-08-11  5:23 ` Andrew Morton
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-08-11  3:38 UTC (permalink / raw)
  To: Linus, Andrew Morton
  Cc: linux-next, linux-kernel, Alexey Fomenko, Rusty Russell,
	Michal Marek, Trevor Keith

[-- Attachment #1: Type: text/plain, Size: 3055 bytes --]

Hi ,

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

*** glibc detected *** scripts/mod/modpost: munmap_chunk(): invalid pointer: 0x00000000004095fc ***
======= Backtrace: =========
/lib/libc.so.6(+0x71b16)[0x2b4f000b6b16]
scripts/mod/modpost[0x40284e]
scripts/mod/modpost[0x403aee]
scripts/mod/modpost[0x40446e]
/lib/libc.so.6(__libc_start_main+0xfd)[0x2b4f00063c4d]
scripts/mod/modpost[0x401219]
======= Memory map: ========
00400000-0040e000 r-xp 00000000 08:11 30327842                           /scratch/sfr/powerpc_allyesconfig/scripts/mod/modpost
0060d000-0060e000 rw-p 0000d000 08:11 30327842                           /scratch/sfr/powerpc_allyesconfig/scripts/mod/modpost
0060e000-00611000 rw-p 00000000 00:00 0 
006cf000-006f0000 rw-p 00000000 00:00 0                                  [heap]
2b4effe25000-2b4effe43000 r-xp 00000000 08:01 483871                     /lib/ld-2.11.2.so
2b4effe43000-2b4effe45000 rw-p 00000000 00:00 0 
2b4effe45000-2b4efff9e000 rw-p 00000000 08:11 30334167                   /scratch/sfr/powerpc_allyesconfig/arch/powerpc/kernel/built-in.o
2b4f00042000-2b4f00043000 r--p 0001d000 08:01 483871                     /lib/ld-2.11.2.so
2b4f00043000-2b4f00044000 rw-p 0001e000 08:01 483871                     /lib/ld-2.11.2.so
2b4f00044000-2b4f00045000 rw-p 00000000 00:00 0 
2b4f00045000-2b4f0019d000 r-xp 00000000 08:01 483859                     /lib/libc-2.11.2.so
2b4f0019d000-2b4f0039c000 ---p 00158000 08:01 483859                     /lib/libc-2.11.2.so
2b4f0039c000-2b4f003a0000 r--p 00157000 08:01 483859                     /lib/libc-2.11.2.so
2b4f003a0000-2b4f003a1000 rw-p 0015b000 08:01 483859                     /lib/libc-2.11.2.so
2b4f003a1000-2b4f003a8000 rw-p 00000000 00:00 0 
2b4f003a8000-2b4f003be000 r-xp 00000000 08:01 482546                     /lib/libgcc_s.so.1
2b4f003be000-2b4f005bd000 ---p 00016000 08:01 482546                     /lib/libgcc_s.so.1
2b4f005bd000-2b4f005be000 rw-p 00015000 08:01 482546                     /lib/libgcc_s.so.1
7fffe11d6000-7fffe11f8000 rw-p 00000000 00:00 0                          [stack]
7fffe11ff000-7fffe1200000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/bin/sh: line 1:  5229 Aborted                 scripts/mod/modpost arch/powerpc/kernel/built-in.o

I got this error a few times during that build and during the sparc64
defconfig build as well.

This was an x86_64 hosted build using libc 2.11.2 from Debian (so eglibc
based), gcc 4.4.4 and binutils 2.20.1-system.20100303.

The only patch new to linux-next since yesterday that affects scripts/mod
is commit 37ed19d5cce35a40d3913cf9aa208ce9f60db3d7
("scripts/mod/modpost.c: fix memory leak") from Linus' tree.

I have reverted that commit in linux-next for today as that makes the
error go away.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2010-07-27  7:00 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-07-27  7:00 UTC (permalink / raw)
  To: Russell King; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Hi Russell,

After merging the final tree, today's linux-next build (all the arm config
builds) failed like this:

arch/arm/kernel/process.c: In function 'arm_machine_restart':
arch/arm/kernel/process.c:106: error: implicit declaration of function 'flush_cache_all'

Caused by commit 287f6bfbe760fe580d939657fc1341d6c0059f78 ("ARM: Factor
out common code from cpu_proc_fin()").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-07-16 20:58   ` Russell King
@ 2010-07-16 23:07     ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-07-16 23:07 UTC (permalink / raw)
  To: Russell King; +Cc: Yinghai Lu, linux-next, linux-kernel, Benjamin Herrenschmidt

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

Hi Russell,

On Fri, 16 Jul 2010 21:58:13 +0100 Russell King <rmk@arm.linux.org.uk> wrote:
>
> On Fri, Jul 16, 2010 at 11:39:34AM -0700, Yinghai Lu wrote:
> > On 07/16/2010 12:11 AM, Stephen Rothwell wrote:
> > > Hi Russell,
> > > 
> > > After merging the final tree, today's linux-next build (most, if not all
> > > arm configs) failed (not unexpectedly) due to the lmb -> memblock rename
> > > (commit 95f72d1ed41a66f1c1c29c24d479de81a0bea36f "lmb: rename to
> > > memblock").
> > > 
> > > See http://kisskb.ellerman.id.au/kisskb/branch/9/
> > 
> > You or Russell may need to run the scripts in that patch
> 
> I've already fixed it up.  I'm guessing that we'll see the results
> sometime on Monday.

I figured that you would have.  And, yes, I will pick it up in Monday.

Thanks.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-07-16 18:39 ` Yinghai Lu
@ 2010-07-16 20:58   ` Russell King
  2010-07-16 23:07     ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Russell King @ 2010-07-16 20:58 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Stephen Rothwell, linux-next, linux-kernel, Benjamin Herrenschmidt

On Fri, Jul 16, 2010 at 11:39:34AM -0700, Yinghai Lu wrote:
> On 07/16/2010 12:11 AM, Stephen Rothwell wrote:
> > Hi Russell,
> > 
> > After merging the final tree, today's linux-next build (most, if not all
> > arm configs) failed (not unexpectedly) due to the lmb -> memblock rename
> > (commit 95f72d1ed41a66f1c1c29c24d479de81a0bea36f "lmb: rename to
> > memblock").
> > 
> > See http://kisskb.ellerman.id.au/kisskb/branch/9/
> 
> You or Russell may need to run the scripts in that patch

I've already fixed it up.  I'm guessing that we'll see the results
sometime on Monday.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: linux-next: build failure after merge of the final tree
  2010-07-16  7:11 Stephen Rothwell
@ 2010-07-16 18:39 ` Yinghai Lu
  2010-07-16 20:58   ` Russell King
  0 siblings, 1 reply; 195+ messages in thread
From: Yinghai Lu @ 2010-07-16 18:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Russell King, linux-next, linux-kernel, Benjamin Herrenschmidt

On 07/16/2010 12:11 AM, Stephen Rothwell wrote:
> Hi Russell,
> 
> After merging the final tree, today's linux-next build (most, if not all
> arm configs) failed (not unexpectedly) due to the lmb -> memblock rename
> (commit 95f72d1ed41a66f1c1c29c24d479de81a0bea36f "lmb: rename to
> memblock").
> 
> See http://kisskb.ellerman.id.au/kisskb/branch/9/

You or Russell may need to run the scripts in that patch

      FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

      sed -i \
        -e 's/lmb/memblock/g' \
        -e 's/LMB/MEMBLOCK/g' \
        $FILES

      for N in $(find . -name lmb.[ch]); do
        M=$(echo $N | sed 's/lmb/memblock/g')
        mv $N $M
      done


Thanks

Yinghai

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

* linux-next: build failure after merge of the final tree
@ 2010-07-16  7:11 Stephen Rothwell
  2010-07-16 18:39 ` Yinghai Lu
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-07-16  7:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-next, linux-kernel, Yinghai Lu, Benjamin Herrenschmidt

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

Hi Russell,

After merging the final tree, today's linux-next build (most, if not all
arm configs) failed (not unexpectedly) due to the lmb -> memblock rename
(commit 95f72d1ed41a66f1c1c29c24d479de81a0bea36f "lmb: rename to
memblock").

See http://kisskb.ellerman.id.au/kisskb/branch/9/
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-06-24  9:00   ` Catalin Marinas
  2010-06-24  9:09     ` Russell King
@ 2010-06-24 10:18     ` Phil Carmody
  1 sibling, 0 replies; 195+ messages in thread
From: Phil Carmody @ 2010-06-24 10:18 UTC (permalink / raw)
  To: ext Catalin Marinas
  Cc: Stephen Rothwell, Russell King, linux-next, linux-kernel

On 24/06/10 11:00 +0200, ext Catalin Marinas wrote:
> On Thu, 2010-06-24 at 10:36 +1000, Stephen Rothwell wrote:
> > Hi Russell,
> > 
> > On Thu, 24 Jun 2010 02:19:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the final tree, the next-20100616 and later linux-next
> > > builds for most arm configs (including versatile_defconfig) failed like this:
> > > 
> > > In file included from include/linux/module.h:23,
> > >                  from include/linux/device.h:23,
> > >                  from include/linux/dma-mapping.h:4,
> > >                  from arch/arm/kernel/asm-offsets.c:15:
> > > include/trace/events/module.h:11: error: two or more data types in declaration 
> > > 
> > > Reverting commit f0028612a8ffedcdafa8b7ae83ab090d8b0318b4 ("ARM: 6171/1:
> > > module - simplify unwind table handling") (and
> > > cecaa4c6b8173b02c9f7ecfdbbc81f573a7a9f33 ("ARM: 6172/1: module -
> > > additional unwind tables for exit/devexit sections") that depends on it)
> > > fixes this build error.
> > 
> > I have reverted those 2 commits in linux-next today.
> 
> Thanks. Stephen, do you build with just the standard defconfig for
> ARCH=arm?
> 
> The problem is commit f0028612a8f which contains the hunk below for
> the !ARM_UNWIND case):
> 
> +struct mod_arch_specific {
> +}
> 
> Phil, could you please add a semicolon after '}' and send Russell a
> patch?

Such a patch has already been sent by Peter Huewe, last week:
http://lkml.org/lkml/2010/6/17/73


Phil

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

* Re: linux-next: build failure after merge of the final tree
  2010-06-24  9:00   ` Catalin Marinas
@ 2010-06-24  9:09     ` Russell King
  2010-06-24 10:18     ` Phil Carmody
  1 sibling, 0 replies; 195+ messages in thread
From: Russell King @ 2010-06-24  9:09 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Stephen Rothwell, linux-next, linux-kernel, Phil Carmody

On Thu, Jun 24, 2010 at 10:00:56AM +0100, Catalin Marinas wrote:
> On Thu, 2010-06-24 at 10:36 +1000, Stephen Rothwell wrote:
> > Hi Russell,
> > 
> > On Thu, 24 Jun 2010 02:19:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the final tree, the next-20100616 and later linux-next
> > > builds for most arm configs (including versatile_defconfig) failed like this:
> > > 
> > > In file included from include/linux/module.h:23,
> > >                  from include/linux/device.h:23,
> > >                  from include/linux/dma-mapping.h:4,
> > >                  from arch/arm/kernel/asm-offsets.c:15:
> > > include/trace/events/module.h:11: error: two or more data types in declaration 
> > > 
> > > Reverting commit f0028612a8ffedcdafa8b7ae83ab090d8b0318b4 ("ARM: 6171/1:
> > > module - simplify unwind table handling") (and
> > > cecaa4c6b8173b02c9f7ecfdbbc81f573a7a9f33 ("ARM: 6172/1: module -
> > > additional unwind tables for exit/devexit sections") that depends on it)
> > > fixes this build error.
> > 
> > I have reverted those 2 commits in linux-next today.
> 
> Thanks. Stephen, do you build with just the standard defconfig for
> ARCH=arm?

The linux-next website has all the build results for all the defconfigs.
You can get to the ARM build results via:

  http://kisskb.ellerman.id.au/kisskb/compiler/11/

> Phil, could you please add a semicolon after '}' and send Russell a
> patch?

... and also test the result before sending.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: linux-next: build failure after merge of the final tree
  2010-06-24  0:36 ` Stephen Rothwell
@ 2010-06-24  9:00   ` Catalin Marinas
  2010-06-24  9:09     ` Russell King
  2010-06-24 10:18     ` Phil Carmody
  0 siblings, 2 replies; 195+ messages in thread
From: Catalin Marinas @ 2010-06-24  9:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Russell King, linux-next, linux-kernel, Phil Carmody

On Thu, 2010-06-24 at 10:36 +1000, Stephen Rothwell wrote:
> Hi Russell,
> 
> On Thu, 24 Jun 2010 02:19:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, the next-20100616 and later linux-next
> > builds for most arm configs (including versatile_defconfig) failed like this:
> > 
> > In file included from include/linux/module.h:23,
> >                  from include/linux/device.h:23,
> >                  from include/linux/dma-mapping.h:4,
> >                  from arch/arm/kernel/asm-offsets.c:15:
> > include/trace/events/module.h:11: error: two or more data types in declaration 
> > 
> > Reverting commit f0028612a8ffedcdafa8b7ae83ab090d8b0318b4 ("ARM: 6171/1:
> > module - simplify unwind table handling") (and
> > cecaa4c6b8173b02c9f7ecfdbbc81f573a7a9f33 ("ARM: 6172/1: module -
> > additional unwind tables for exit/devexit sections") that depends on it)
> > fixes this build error.
> 
> I have reverted those 2 commits in linux-next today.

Thanks. Stephen, do you build with just the standard defconfig for
ARCH=arm?

The problem is commit f0028612a8f which contains the hunk below for
the !ARM_UNWIND case):

+struct mod_arch_specific {
+}

Phil, could you please add a semicolon after '}' and send Russell a
patch?

Thanks.

-- 
Catalin

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

* Re: linux-next: build failure after merge of the final tree
  2010-06-23 16:19 Stephen Rothwell
@ 2010-06-24  0:36 ` Stephen Rothwell
  2010-06-24  9:00   ` Catalin Marinas
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-06-24  0:36 UTC (permalink / raw)
  To: Russell King; +Cc: linux-next, linux-kernel, Phil Carmody, Catalin Marinas

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Hi Russell,

On Thu, 24 Jun 2010 02:19:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, the next-20100616 and later linux-next
> builds for most arm configs (including versatile_defconfig) failed like this:
> 
> In file included from include/linux/module.h:23,
>                  from include/linux/device.h:23,
>                  from include/linux/dma-mapping.h:4,
>                  from arch/arm/kernel/asm-offsets.c:15:
> include/trace/events/module.h:11: error: two or more data types in declaration 
> 
> Reverting commit f0028612a8ffedcdafa8b7ae83ab090d8b0318b4 ("ARM: 6171/1:
> module - simplify unwind table handling") (and
> cecaa4c6b8173b02c9f7ecfdbbc81f573a7a9f33 ("ARM: 6172/1: module -
> additional unwind tables for exit/devexit sections") that depends on it)
> fixes this build error.

I have reverted those 2 commits in linux-next today.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* linux-next: build failure after merge of the final tree
@ 2010-06-23 16:19 Stephen Rothwell
  2010-06-24  0:36 ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-06-23 16:19 UTC (permalink / raw)
  To: Russell King; +Cc: linux-next, linux-kernel, Phil Carmody, Catalin Marinas

[-- Attachment #1: Type: text/plain, Size: 850 bytes --]

Hi all,

After merging the final tree, the next-20100616 and later linux-next
builds for most arm configs (including versatile_defconfig) failed like this:

In file included from include/linux/module.h:23,
                 from include/linux/device.h:23,
                 from include/linux/dma-mapping.h:4,
                 from arch/arm/kernel/asm-offsets.c:15:
include/trace/events/module.h:11: error: two or more data types in declaration 

Reverting commit f0028612a8ffedcdafa8b7ae83ab090d8b0318b4 ("ARM: 6171/1:
module - simplify unwind table handling") (and
cecaa4c6b8173b02c9f7ecfdbbc81f573a7a9f33 ("ARM: 6172/1: module -
additional unwind tables for exit/devexit sections") that depends on it)
fixes this build error.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-25  5:14   ` Herbert Xu
@ 2010-05-25  6:56     ` David Miller
  0 siblings, 0 replies; 195+ messages in thread
From: David Miller @ 2010-05-25  6:56 UTC (permalink / raw)
  To: herbert; +Cc: sfr, netdev, linux-next, linux-kernel

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 25 May 2010 15:14:42 +1000

> On Mon, May 24, 2010 at 09:58:51PM -0700, David Miller wrote:
>> 
>> Herbert, can you take a look?
> 
> Sorry, I hadn't tested the built-in case.
> 
> cls_cgroup: Fix build error when built-in
> 
> There is a typo in cgroup_cls_state when cls_cgroup is built-in.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks Herbert.

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-25  4:58 ` David Miller
@ 2010-05-25  5:14   ` Herbert Xu
  2010-05-25  6:56     ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Herbert Xu @ 2010-05-25  5:14 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

On Mon, May 24, 2010 at 09:58:51PM -0700, David Miller wrote:
> 
> Herbert, can you take a look?

Sorry, I hadn't tested the built-in case.

cls_cgroup: Fix build error when built-in

There is a typo in cgroup_cls_state when cls_cgroup is built-in.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h
index f9a0b01..4e75a1f 100644
--- a/include/net/cls_cgroup.h
+++ b/include/net/cls_cgroup.h
@@ -31,7 +31,7 @@ static inline u32 task_cls_classid(struct task_struct *p)
 		return 0;
 
 	return container_of(task_subsys_state(p, net_cls_subsys_id),
-			    struct cgroup_cls_state, css).classid;
+			    struct cgroup_cls_state, css)->classid;
 }
 #else
 extern int net_cls_subsys_id;

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-25  4:10 Stephen Rothwell
@ 2010-05-25  4:58 ` David Miller
  2010-05-25  5:14   ` Herbert Xu
  0 siblings, 1 reply; 195+ messages in thread
From: David Miller @ 2010-05-25  4:58 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, herbert

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 25 May 2010 14:10:46 +1000

> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> In file included from net/socket.c:97:
> include/net/cls_cgroup.h: In function 'task_cls_classid':
> include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union
> In file included from net/core/sock.c:126:
> include/net/cls_cgroup.h: In function 'task_cls_classid':
> include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union
> In file included from net/sched/cls_cgroup.c:23:
> include/net/cls_cgroup.h: In function 'task_cls_classid':
> include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union
> 
> CONFIG_CGROUPS=y, CONFIG_NET_CLS_CGROUP=y
> 
> Caused by commit f845172531fb7410c7fb7780b1a6e51ee6df7d52 ("cls_cgroup:
> Store classid in struct sock") from the net-current tree.
> 
> I have reverted that commit for today (and commit
> 8286274284e15b11b0f531b6ceeef21fbe00a8dd "tun: Update classid on packet
> injection" that depends on it).

Yuck, and we already went through two iterations of this patch fixing exactly
these kinds of build problems :-/

Herbert, can you take a look?

Thanks!

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

* linux-next: build failure after merge of the final tree
@ 2010-05-25  4:10 Stephen Rothwell
  2010-05-25  4:58 ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-05-25  4:10 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Herbert Xu

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

Hi Dave,

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

In file included from net/socket.c:97:
include/net/cls_cgroup.h: In function 'task_cls_classid':
include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union
In file included from net/core/sock.c:126:
include/net/cls_cgroup.h: In function 'task_cls_classid':
include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union
In file included from net/sched/cls_cgroup.c:23:
include/net/cls_cgroup.h: In function 'task_cls_classid':
include/net/cls_cgroup.h:33: error: request for member 'classid' in something not a structure or union

CONFIG_CGROUPS=y, CONFIG_NET_CLS_CGROUP=y

Caused by commit f845172531fb7410c7fb7780b1a6e51ee6df7d52 ("cls_cgroup:
Store classid in struct sock") from the net-current tree.

I have reverted that commit for today (and commit
8286274284e15b11b0f531b6ceeef21fbe00a8dd "tun: Update classid on packet
injection" that depends on it).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-15  7:37   ` Ingo Molnar
@ 2010-05-15 20:28     ` Frederic Weisbecker
  0 siblings, 0 replies; 195+ messages in thread
From: Frederic Weisbecker @ 2010-05-15 20:28 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Don Zickus, Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
	Peter Zijlstra, linux-next, linux-kernel, David Miller

On Sat, May 15, 2010 at 09:37:32AM +0200, Ingo Molnar wrote:
> 
> * Don Zickus <dzickus@redhat.com> wrote:
> 
> > Sorry for the mess.  I think the following patch 
> > cleans it up.  The last piece deals with the sparc 
> > mess, the other two pieces should deal with the x86 
> > fallout.
> 
> This patch breaks x86:
> 
> arch/x86/built-in.o: In function `show_stack_log_lvl':
> (.text+0xc2c0): undefined reference to `touch_nmi_watchdog'
> arch/x86/built-in.o: In function `print_trace_address':
> dumpstack.c:(.text+0xd893): undefined reference to `touch_nmi_watchdog'
> arch/x86/built-in.o: In function `mce_timed_out':
> mce.c:(.text+0x20008): undefined reference to `touch_nmi_watchdog'
> arch/x86/built-in.o: In function `enable_lapic_nmi_watchdog':
> (.text+0x261f2): undefined reference to `touch_nmi_watchdog'
> 
> CONFIG_CLOCKSOURCE_WATCHDOG=y
> CONFIG_PERF_EVENTS_NMI=y
> CONFIG_IPMI_WATCHDOG=m
> CONFIG_WATCHDOG=y
> CONFIG_WATCHDOG_NOWAYOUT=y
> # CONFIG_SOFT_WATCHDOG is not set
> CONFIG_HP_WATCHDOG=y
> CONFIG_SBC_EPX_C3_WATCHDOG=m
> # CONFIG_PCIPCWATCHDOG is not set
> # CONFIG_USBPCWATCHDOG is not set
> CONFIG_HAVE_FTRACE_NMI_ENTER=y
> CONFIG_FTRACE_NMI_ENTER=y
> 
> I'd _strongly_ suggest to simplify the code. There's 
> a few things that could be done to that end:
> 
> - just have a single watchdog option and dont split 
>   the soft-dog from the hard-dog.


This is what we have, ie: CONFIG_LOCKUP_DETECTOR

But we need to keep the softlockup detection out of
the perf dependency. This is what we had previously.
And more especially softlockup detection doesn't need
perf.



> - provide a smooth pathway for architectures that 
>   have an NMI watchdog right now. Dont overlap their 
>   symbols for example.



Agreed.


 
> ... and similar measures.


And I add: remove the old nmi watchdog code from x86, for good.

I'm working on it.

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-14 15:03 ` Don Zickus
@ 2010-05-15  7:37   ` Ingo Molnar
  2010-05-15 20:28     ` Frederic Weisbecker
  0 siblings, 1 reply; 195+ messages in thread
From: Ingo Molnar @ 2010-05-15  7:37 UTC (permalink / raw)
  To: Don Zickus
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
	Peter Zijlstra, linux-next, linux-kernel, David Miller


* Don Zickus <dzickus@redhat.com> wrote:

> Sorry for the mess.  I think the following patch 
> cleans it up.  The last piece deals with the sparc 
> mess, the other two pieces should deal with the x86 
> fallout.

This patch breaks x86:

arch/x86/built-in.o: In function `show_stack_log_lvl':
(.text+0xc2c0): undefined reference to `touch_nmi_watchdog'
arch/x86/built-in.o: In function `print_trace_address':
dumpstack.c:(.text+0xd893): undefined reference to `touch_nmi_watchdog'
arch/x86/built-in.o: In function `mce_timed_out':
mce.c:(.text+0x20008): undefined reference to `touch_nmi_watchdog'
arch/x86/built-in.o: In function `enable_lapic_nmi_watchdog':
(.text+0x261f2): undefined reference to `touch_nmi_watchdog'

CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_PERF_EVENTS_NMI=y
CONFIG_IPMI_WATCHDOG=m
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_HP_WATCHDOG=y
CONFIG_SBC_EPX_C3_WATCHDOG=m
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_USBPCWATCHDOG is not set
CONFIG_HAVE_FTRACE_NMI_ENTER=y
CONFIG_FTRACE_NMI_ENTER=y

I'd _strongly_ suggest to simplify the code. There's 
a few things that could be done to that end:

- just have a single watchdog option and dont split 
  the soft-dog from the hard-dog.

- use config options to define default behavior: i.e.
  whether the soft-dog and hard-dog is enabled by default,
  but otherwise keep them both included.

- provide a smooth pathway for architectures that 
  have an NMI watchdog right now. Dont overlap their 
  symbols for example.

... and similar measures.

Thanks,

	Ingo

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-14  5:53 Stephen Rothwell
  2010-05-14 15:03 ` Don Zickus
@ 2010-05-14 15:11 ` Don Zickus
  1 sibling, 0 replies; 195+ messages in thread
From: Don Zickus @ 2010-05-14 15:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, David Miller

On Fri, May 14, 2010 at 03:53:12PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> kernel/built-in.o: In function `touch_nmi_watchdog':
> (.text+0x449bc): multiple definition of `touch_nmi_watchdog'
> arch/sparc/kernel/built-in.o:(.text+0x11b28): first defined here
> 
> Probably caused by commit 58687acba59266735adb8ccd9b5b9aa2c7cd205b
> ("lockup_detector: Combine nmi_watchdog and softlockup detector").
> 
> The one in kernel/ used to only be built when CONFIG_NMI_WATCHDOG was set
> which depended on CONFIG_PERF_EVENTS_NMI which was only ever set for
> ARCH=x86.  This probably breaks mn10300 and blackfin as well, at least.
> We also have ARCH_HAS_NMI_WATCHDOG to determine this ...
> 
> I tried protecting the definition of touch_nmi_watchdog with
> ARCH_HAS_NMI_WATCHDOG, but that broke the x86_64 allmodconfig build
> (which defines ARCH_HAS_NMI_WATCHDOG if CONFIG_X86_LOCAL_APIC is defined
> but only builds its version if CONFIG_LOCKUP_DETECTOR is not 'y').
> 
> So I have left is as it is for today.  Please see if someone can come up
> with a solution.

I realized I was lazy and different provide a formal patch (and I had a
couple of warnings too).  Here is something better.

Cheers,
Don

---
commit 578178d5133403e469543bfff8a4e404d878563b
Author: Don Zickus <dzickus@redhat.com>
Date:   Fri May 14 11:04:52 2010 -0400

    [watchdog] nmi: cross arch compile fixes
    
    Combining the softlockup and hardlockup code causes watchdog.c to always be
    compiled.  Surround some code which prevents the hardlockup stuff from being
    compiled if other arches have a different NMI handler.
    
    Signed-off-by: Don Zickus <dzickus@redhat.com>

diff --git a/arch/x86/kernel/apic/Makefile b/arch/x86/kernel/apic/Makefile
index 52f32e0..3a57a04 100644
--- a/arch/x86/kernel/apic/Makefile
+++ b/arch/x86/kernel/apic/Makefile
@@ -3,10 +3,10 @@
 #
 
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o apic_noop.o probe_$(BITS).o ipi.o
-ifneq ($(CONFIG_LOCKUP_DETECTOR),y)
+ifneq ($(CONFIG_PERF_EVENTS_NMI),y)
 obj-$(CONFIG_X86_LOCAL_APIC)	+= nmi.o
 endif
-obj-$(CONFIG_LOCKUP_DETECTOR)	+= hw_nmi.o
+obj-$(CONFIG_PERF_EVENTS_NMI)	+= hw_nmi.o
 
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index abd48aa..9a30da4 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -20,7 +20,7 @@ extern void touch_nmi_watchdog(void);
 extern void acpi_nmi_disable(void);
 extern void acpi_nmi_enable(void);
 #else
-#ifndef CONFIG_LOCKUP_DETECTOR
+#ifndef CONFIG_PERF_EVENTS_NMI
 static inline void touch_nmi_watchdog(void)
 {
 	touch_softlockup_watchdog();
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index be5e74e..65429dd 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -31,13 +31,13 @@ int watchdog_enabled;
 int __read_mostly softlockup_thresh = 60;
 
 static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts);
-static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
 static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog);
 static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer);
 static DEFINE_PER_CPU(bool, softlockup_touch_sync);
-static DEFINE_PER_CPU(bool, hard_watchdog_warn);
 static DEFINE_PER_CPU(bool, soft_watchdog_warn);
 #ifdef CONFIG_PERF_EVENTS_NMI
+static DEFINE_PER_CPU(bool, hard_watchdog_warn);
+static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
 static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts);
 static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved);
 static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
@@ -139,6 +139,7 @@ void touch_all_softlockup_watchdogs(void)
 		per_cpu(watchdog_touch_ts, cpu) = 0;
 }
 
+#ifdef CONFIG_PERF_EVENTS_NMI
 void touch_nmi_watchdog(void)
 {
 	__get_cpu_var(watchdog_nmi_touch) = true;
@@ -146,6 +147,8 @@ void touch_nmi_watchdog(void)
 }
 EXPORT_SYMBOL(touch_nmi_watchdog);
 
+#endif
+
 void touch_softlockup_watchdog_sync(void)
 {
 	__raw_get_cpu_var(softlockup_touch_sync) = true;

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

* Re: linux-next: build failure after merge of the final tree
  2010-05-14  5:53 Stephen Rothwell
@ 2010-05-14 15:03 ` Don Zickus
  2010-05-15  7:37   ` Ingo Molnar
  2010-05-14 15:11 ` Don Zickus
  1 sibling, 1 reply; 195+ messages in thread
From: Don Zickus @ 2010-05-14 15:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, David Miller

On Fri, May 14, 2010 at 03:53:12PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> kernel/built-in.o: In function `touch_nmi_watchdog':
> (.text+0x449bc): multiple definition of `touch_nmi_watchdog'
> arch/sparc/kernel/built-in.o:(.text+0x11b28): first defined here
> 
> Probably caused by commit 58687acba59266735adb8ccd9b5b9aa2c7cd205b
> ("lockup_detector: Combine nmi_watchdog and softlockup detector").
> 
> The one in kernel/ used to only be built when CONFIG_NMI_WATCHDOG was set
> which depended on CONFIG_PERF_EVENTS_NMI which was only ever set for
> ARCH=x86.  This probably breaks mn10300 and blackfin as well, at least.
> We also have ARCH_HAS_NMI_WATCHDOG to determine this ...
> 
> I tried protecting the definition of touch_nmi_watchdog with
> ARCH_HAS_NMI_WATCHDOG, but that broke the x86_64 allmodconfig build
> (which defines ARCH_HAS_NMI_WATCHDOG if CONFIG_X86_LOCAL_APIC is defined
> but only builds its version if CONFIG_LOCKUP_DETECTOR is not 'y').
> 
> So I have left is as it is for today.  Please see if someone can come up
> with a solution.

Sorry for the mess.  I think the following patch cleans it up.  The last
piece deals with the sparc mess, the other two pieces should deal with the
x86 fallout.

Cheers,
Don


diff --git a/arch/x86/kernel/apic/Makefile b/arch/x86/kernel/apic/Makefile
index 52f32e0..3a57a04 100644
--- a/arch/x86/kernel/apic/Makefile
+++ b/arch/x86/kernel/apic/Makefile
@@ -3,10 +3,10 @@
 #
 
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o apic_noop.o probe_$(BITS).o ipi.o
-ifneq ($(CONFIG_LOCKUP_DETECTOR),y)
+ifneq ($(CONFIG_PERF_EVENTS_NMI),y)
 obj-$(CONFIG_X86_LOCAL_APIC)	+= nmi.o
 endif
-obj-$(CONFIG_LOCKUP_DETECTOR)	+= hw_nmi.o
+obj-$(CONFIG_PERF_EVENTS_NMI)	+= hw_nmi.o
 
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index abd48aa..9a30da4 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -20,7 +20,7 @@ extern void touch_nmi_watchdog(void);
 extern void acpi_nmi_disable(void);
 extern void acpi_nmi_enable(void);
 #else
-#ifndef CONFIG_LOCKUP_DETECTOR
+#ifndef CONFIG_PERF_EVENTS_NMI
 static inline void touch_nmi_watchdog(void)
 {
 	touch_softlockup_watchdog();
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index be5e74e..61b63ca 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -139,12 +139,14 @@ void touch_all_softlockup_watchdogs(void)
 		per_cpu(watchdog_touch_ts, cpu) = 0;
 }
 
+#ifdef CONFIG_PERF_EVENTS_NMI
 void touch_nmi_watchdog(void)
 {
 	__get_cpu_var(watchdog_nmi_touch) = true;
 	touch_softlockup_watchdog();
 }
 EXPORT_SYMBOL(touch_nmi_watchdog);
+#endif
 
 void touch_softlockup_watchdog_sync(void)
 {

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

* linux-next: build failure after merge of the final tree
@ 2010-05-14  5:53 Stephen Rothwell
  2010-05-14 15:03 ` Don Zickus
  2010-05-14 15:11 ` Don Zickus
  0 siblings, 2 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-05-14  5:53 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, David Miller, Don Zickus

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]

Hi all,

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

kernel/built-in.o: In function `touch_nmi_watchdog':
(.text+0x449bc): multiple definition of `touch_nmi_watchdog'
arch/sparc/kernel/built-in.o:(.text+0x11b28): first defined here

Probably caused by commit 58687acba59266735adb8ccd9b5b9aa2c7cd205b
("lockup_detector: Combine nmi_watchdog and softlockup detector").

The one in kernel/ used to only be built when CONFIG_NMI_WATCHDOG was set
which depended on CONFIG_PERF_EVENTS_NMI which was only ever set for
ARCH=x86.  This probably breaks mn10300 and blackfin as well, at least.
We also have ARCH_HAS_NMI_WATCHDOG to determine this ...

I tried protecting the definition of touch_nmi_watchdog with
ARCH_HAS_NMI_WATCHDOG, but that broke the x86_64 allmodconfig build
(which defines ARCH_HAS_NMI_WATCHDOG if CONFIG_X86_LOCAL_APIC is defined
but only builds its version if CONFIG_LOCKUP_DETECTOR is not 'y').

So I have left is as it is for today.  Please see if someone can come up
with a solution.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2010-04-27  5:49 Stephen Rothwell
  2010-04-28  9:41 ` Alexander Graf
@ 2010-04-28 15:21 ` Marcelo Tosatti
  1 sibling, 0 replies; 195+ messages in thread
From: Marcelo Tosatti @ 2010-04-28 15:21 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Avi Kivity, linux-next, linux-kernel, Alexander Graf

On Tue, Apr 27, 2010 at 03:49:17PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> arch/powerpc/kvm/book3s.c: In function 'kvmppc_core_vcpu_create':
> arch/powerpc/kvm/book3s.c:1241: error: implicit declaration of function 'kzalloc'
> arch/powerpc/kvm/book3s.c:1241: warning: cast to pointer from integer of different size
> arch/powerpc/kvm/book3s.c:1281: error: implicit declaration of function 'kfree'
> 
> Caused by commit 046cdc052ffcbf1ee1c627ef811031d18654bafe ("KVM: PPC:
> Improve indirect svcpu accessors") from the kvm tree.
> 
> You have to include slab.h directly to use kzalloc/kfree ...
> 
> I have applied the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 27 Apr 2010 15:32:53 +1000
> Subject: [PATCH] kvm: powerpc: use of kzalloc/kfree requires including slab.h
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks.

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

* Re: linux-next: build failure after merge of the final tree
  2010-04-28  9:41 ` Alexander Graf
@ 2010-04-28  9:48   ` Avi Kivity
  0 siblings, 0 replies; 195+ messages in thread
From: Avi Kivity @ 2010-04-28  9:48 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Stephen Rothwell, Marcelo Tosatti, linux-next, linux-kernel

On 04/28/2010 12:41 PM, Alexander Graf wrote:
>
> Am 27.04.2010 um 06:49 schrieb Stephen Rothwell <sfr@canb.auug.org.au>:
>
>> Hi all,
>>
>> After merging the final tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>>
>> arch/powerpc/kvm/book3s.c: In function 'kvmppc_core_vcpu_create':
>> arch/powerpc/kvm/book3s.c:1241: error: implicit declaration of 
>> function 'kzalloc'
>> arch/powerpc/kvm/book3s.c:1241: warning: cast to pointer from integer 
>> of different size
>> arch/powerpc/kvm/book3s.c:1281: error: implicit declaration of 
>> function 'kfree'
>>
>> Caused by commit 046cdc052ffcbf1ee1c627ef811031d18654bafe ("KVM: PPC:
>> Improve indirect svcpu accessors") from the kvm tree.
>>
>> You have to include slab.h directly to use kzalloc/kfree ...
>>
>> I have applied the following patch for today.
>
> Thank you. Is that behavior new? I didn't get any breakage when 
> compile testing myself.

Probably .config dependent.

> Will this commit automatically move back to kvm.git or is there any 
> intervention required from my side?

Marcelo or me need to apply it.

-- 
error compiling committee.c: too many arguments to function

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

* Re: linux-next: build failure after merge of the final tree
  2010-04-27  5:49 Stephen Rothwell
@ 2010-04-28  9:41 ` Alexander Graf
  2010-04-28  9:48   ` Avi Kivity
  2010-04-28 15:21 ` Marcelo Tosatti
  1 sibling, 1 reply; 195+ messages in thread
From: Alexander Graf @ 2010-04-28  9:41 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Avi Kivity, Marcelo Tosatti, linux-next, linux-kernel


Am 27.04.2010 um 06:49 schrieb Stephen Rothwell <sfr@canb.auug.org.au>:

> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> arch/powerpc/kvm/book3s.c: In function 'kvmppc_core_vcpu_create':
> arch/powerpc/kvm/book3s.c:1241: error: implicit declaration of  
> function 'kzalloc'
> arch/powerpc/kvm/book3s.c:1241: warning: cast to pointer from  
> integer of different size
> arch/powerpc/kvm/book3s.c:1281: error: implicit declaration of  
> function 'kfree'
>
> Caused by commit 046cdc052ffcbf1ee1c627ef811031d18654bafe ("KVM: PPC:
> Improve indirect svcpu accessors") from the kvm tree.
>
> You have to include slab.h directly to use kzalloc/kfree ...
>
> I have applied the following patch for today.

Thank you. Is that behavior new? I didn't get any breakage when  
compile testing myself.

Will this commit automatically move back to kvm.git or is there any  
intervention required from my side?


Alex

>

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

* linux-next: build failure after merge of the final tree
@ 2010-04-27  5:49 Stephen Rothwell
  2010-04-28  9:41 ` Alexander Graf
  2010-04-28 15:21 ` Marcelo Tosatti
  0 siblings, 2 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-04-27  5:49 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-next, linux-kernel, Alexander Graf

Hi all,

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

arch/powerpc/kvm/book3s.c: In function 'kvmppc_core_vcpu_create':
arch/powerpc/kvm/book3s.c:1241: error: implicit declaration of function 'kzalloc'
arch/powerpc/kvm/book3s.c:1241: warning: cast to pointer from integer of different size
arch/powerpc/kvm/book3s.c:1281: error: implicit declaration of function 'kfree'

Caused by commit 046cdc052ffcbf1ee1c627ef811031d18654bafe ("KVM: PPC:
Improve indirect svcpu accessors") from the kvm tree.

You have to include slab.h directly to use kzalloc/kfree ...

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 27 Apr 2010 15:32:53 +1000
Subject: [PATCH] kvm: powerpc: use of kzalloc/kfree requires including slab.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kvm/book3s.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 9f97dbe..28e785f 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -16,6 +16,7 @@
 
 #include <linux/kvm_host.h>
 #include <linux/err.h>
+#include <linux/slab.h>
 
 #include <asm/reg.h>
 #include <asm/cputable.h>
-- 
1.7.0.5

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

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

* RE: linux-next: build failure after merge of the final tree
  2010-04-08 22:59     ` Stephen Rothwell
@ 2010-04-08 23:01       ` John Linn
  0 siblings, 0 replies; 195+ messages in thread
From: John Linn @ 2010-04-08 23:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, jtyner, grant.likely

> -----Original Message-----
> From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> Sent: Thursday, April 08, 2010 4:59 PM
> To: John Linn
> Cc: David Miller; netdev@vger.kernel.org; linux-next@vger.kernel.org;
linux-kernel@vger.kernel.org;
> jtyner@cs.ucr.edu; grant.likely@secretlab.ca
> Subject: Re: linux-next: build failure after merge of the final tree
> 
> Hi John,
> 
> On Thu, 8 Apr 2010 08:15:12 -0600 John Linn <John.Linn@xilinx.com>
wrote:
> >
> > I'm not pushing back here, just trying to make sure I understand and
> > do it better next time :)
> >
> > I don't see that my patch has touched that part of the driver as
that
> > call was already in the driver before my patch (but maybe I'm just
> > missing it).
> >
> > My patch did change the dependency in the Kconfig so that it only
> > depends on powerpc rather than powerpc DCR and maybe that exposed
> > something that wasn't previously exposed.
> 
> Yeah, virt_to_bus() is only defined on 32bit PowerPC, not 64 bit.
> 
> CONFIG_PPC is set for both 32 and 64 bit PowerPC builds.
> --

Thanks for confirming that.  Spun a new patch (set) to hopefully take
care of that.

-- John

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

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

* Re: linux-next: build failure after merge of the final tree
  2010-04-08 14:15   ` John Linn
@ 2010-04-08 22:59     ` Stephen Rothwell
  2010-04-08 23:01       ` John Linn
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-04-08 22:59 UTC (permalink / raw)
  To: John Linn
  Cc: David Miller, netdev, linux-next, linux-kernel, jtyner, grant.likely

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

Hi John,

On Thu, 8 Apr 2010 08:15:12 -0600 John Linn <John.Linn@xilinx.com> wrote:
>
> I'm not pushing back here, just trying to make sure I understand and do
> it better next time :)
> 
> I don't see that my patch has touched that part of the driver as that
> call was already in the driver before my patch (but maybe I'm just
> missing it).
> 
> My patch did change the dependency in the Kconfig so that it only
> depends on powerpc rather than powerpc DCR and maybe that exposed
> something that wasn't previously exposed.

Yeah, virt_to_bus() is only defined on 32bit PowerPC, not 64 bit.

CONFIG_PPC is set for both 32 and 64 bit PowerPC builds.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* RE: linux-next: build failure after merge of the final tree
  2010-04-08  6:25 ` David Miller
@ 2010-04-08 14:15   ` John Linn
  2010-04-08 22:59     ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: John Linn @ 2010-04-08 14:15 UTC (permalink / raw)
  To: David Miller, sfr; +Cc: netdev, linux-next, linux-kernel, jtyner, grant.likely

> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Thursday, April 08, 2010 12:25 AM
> To: sfr@canb.auug.org.au
> Cc: netdev@vger.kernel.org; linux-next@vger.kernel.org;
linux-kernel@vger.kernel.org; John Linn;
> jtyner@cs.ucr.edu
> Subject: Re: linux-next: build failure after merge of the final tree
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 8 Apr 2010 15:35:05 +1000
> 
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > drivers/net/ll_temac_main.c: In function 'll_temac_recv':
> > drivers/net/ll_temac_main.c:695: error: implicit declaration of
function 'virt_to_bus'
> >
> > Caused by commit 459569145516f7967b916c57445feb02c600668c ("Add
> > non-Virtex5 support for LL TEMAC driver") from the net tree.
> >
> > I have reverted that commit for today.
> 
> And I'm reverting it too, it's illegal to use virt_to_bus()
> in new code in this day and age.

I'm not pushing back here, just trying to make sure I understand and do
it better next time :)

I don't see that my patch has touched that part of the driver as that
call was already in the driver before my patch (but maybe I'm just
missing it).

My patch did change the dependency in the Kconfig so that it only
depends on powerpc rather than powerpc DCR and maybe that exposed
something that wasn't previously exposed.

Maybe this is an issue in linux-next and I need to test against that,
I'm pulling it now.  I was testing against Linus's tree.

> 
> John, you'll need to use the DMA mapping APIs in this change when you
> resubmit it.

Thanks, will spin it again and get that fixed.  My apologies for the
hassles, appreciate the help.

-- John

> 
> Thanks.


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



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

* Re: linux-next: build failure after merge of the final tree
  2010-04-08  5:35 Stephen Rothwell
@ 2010-04-08  6:25 ` David Miller
  2010-04-08 14:15   ` John Linn
  0 siblings, 1 reply; 195+ messages in thread
From: David Miller @ 2010-04-08  6:25 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, john.linn, jtyner

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 8 Apr 2010 15:35:05 +1000

> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/net/ll_temac_main.c: In function 'll_temac_recv':
> drivers/net/ll_temac_main.c:695: error: implicit declaration of function 'virt_to_bus'
> 
> Caused by commit 459569145516f7967b916c57445feb02c600668c ("Add
> non-Virtex5 support for LL TEMAC driver") from the net tree.
> 
> I have reverted that commit for today.

And I'm reverting it too, it's illegal to use virt_to_bus()
in new code in this day and age.

John, you'll need to use the DMA mapping APIs in this change when you
resubmit it.

Thanks.

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

* linux-next: build failure after merge of the final tree
@ 2010-04-08  5:35 Stephen Rothwell
  2010-04-08  6:25 ` David Miller
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-04-08  5:35 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, John Linn, John Tyner

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

Hi all,

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

drivers/net/ll_temac_main.c: In function 'll_temac_recv':
drivers/net/ll_temac_main.c:695: error: implicit declaration of function 'virt_to_bus'

Caused by commit 459569145516f7967b916c57445feb02c600668c ("Add
non-Virtex5 support for LL TEMAC driver") from the net tree.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
       [not found] <20100318160220.b7eaded6.sfr@canb.auug.org.au>
@ 2010-03-18  6:21 ` David Miller
  0 siblings, 0 replies; 195+ messages in thread
From: David Miller @ 2010-03-18  6:21 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, rjw

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 18 Mar 2010 16:02:20 +1100

> Caused by commit 23606cf5d1192c2b17912cb2ef6e62f9b11de133 ("e1000e /
> PCI / PM: Add basic runtime PM support (rev. 4)") from the net tree.

I have a fix for this pushed to net-next-2.6 and I'm sure
Tom will have a fix for the rps UP build failure soon too.

Thanks!

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

* Re: linux-next: build failure after merge of the final tree
  2010-03-01  9:38 Stephen Rothwell
@ 2010-03-02 20:47 ` Greg KH
  0 siblings, 0 replies; 195+ messages in thread
From: Greg KH @ 2010-03-02 20:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Eric W. Biederman

On Mon, Mar 01, 2010 at 08:38:36PM +1100, Stephen Rothwell wrote:
> Hi Greg,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files':
> drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand
> drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' operand
> 
> Caused by commit 8e36e9ee3c5a9228b68717b35101c58fe9a001c5 ("sysfs: Use
> sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes")
> interacting with commit 71f496c9ec9821d2e09b00298915b99b6cbc9d92 ("sysfs:
> Use one lockdep class per sysfs attribute") both from the driver-core
> tree.
> 
> I applied the following patch for today.

Thanks, I've added this to the tree to send to Linus.

greg k-h

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

* Re: linux-next: build failure after merge of the final tree
  2010-03-01  9:42 ` Jens Axboe
@ 2010-03-01 10:07   ` Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-03-01 10:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, linux-kernel, Martin K. Petersen

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Hi Jens,

On Mon, 1 Mar 2010 10:42:55 +0100 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> Oops, thanks, applied.

Thanks.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
       [not found] <20100301203453.938e4136.sfr@canb.auug.org.au>
@ 2010-03-01  9:42 ` Jens Axboe
  2010-03-01 10:07   ` Stephen Rothwell
  0 siblings, 1 reply; 195+ messages in thread
From: Jens Axboe @ 2010-03-01  9:42 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Martin K. Petersen

On Mon, Mar 01 2010, Stephen Rothwell wrote:
> Hi Jens,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/block/ps3vram.c: In function 'ps3vram_probe':
> drivers/block/ps3vram.c:754: error: 'BLK_MAX_HW_SEGMENTS' undeclared (first use in this function)
> 
> Caused by commit 8a78362c4eefc1deddbefe2c7f38aabbc2429d6b ("block:
> Consolidate phys_segment and hw_segment limits") from the block tree.
> 
> I have applied the following patch for today.

Oops, thanks, applied.

-- 
Jens Axboe

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

* linux-next: build failure after merge of the final tree
@ 2010-03-01  9:40 Stephen Rothwell
  0 siblings, 0 replies; 195+ messages in thread
From: Stephen Rothwell @ 2010-03-01  9:40 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, linux-kernel, Maxim Levitsky

Hi David,

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

drivers/mtd/nand/r852.c:22: error: 'enable_dma' redeclared as different kind of symbol
arch/powerpc/include/asm/dma.h:189: note: previous definition of 'enable_dma' was here
drivers/mtd/nand/r852.c: In function 'r852_engine_enable':
drivers/mtd/nand/r852.c:545: error: implicit declaration of function 'msleep'

Caused by commit 67e054e919248fa1db93de727fb9ad49eb700642 ("mtd: nand:
Add driver for Ricoh xD/SmartMedia reader") from the mtd.

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 1 Mar 2010 20:21:06 +1100
Subject: [PATCH] mtd: nand: fix name space clash

and include delay.h for msleep().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/mtd/nand/r852.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index 218a42d..ca21883 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -13,15 +13,16 @@
 #include <linux/workqueue.h>
 #include <linux/interrupt.h>
 #include <linux/pci_ids.h>
+#include <linux/delay.h>
 #include <asm/byteorder.h>
 #include <linux/sched.h>
 #include "sm_common.h"
 #include "r852.h"
 
 
-static int enable_dma = 1;
-module_param(enable_dma, bool, S_IRUGO);
-MODULE_PARM_DESC(enable_dma, "Enable usage of the DMA (default)");
+static int r852_enable_dma = 1;
+module_param(r852_enable_dma, bool, S_IRUGO);
+MODULE_PARM_DESC(r852_enable_dma, "Enable usage of the DMA (default)");
 
 static int debug;
 module_param(debug, int, S_IRUGO | S_IWUSR);
@@ -75,7 +76,7 @@ static void r852_dma_test(struct r852_device *dev)
 	if (!dev->dma_usable)
 		message("Non dma capable device detected, dma disabled");
 
-	if (!enable_dma) {
+	if (!r852_enable_dma) {
 		message("disabling dma on user request");
 		dev->dma_usable = 0;
 	}
-- 
1.7.0

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

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

* linux-next: build failure after merge of the final tree
@ 2010-03-01  9:38 Stephen Rothwell
  2010-03-02 20:47 ` Greg KH
  0 siblings, 1 reply; 195+ messages in thread
From: Stephen Rothwell @ 2010-03-01  9:38 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Eric W. Biederman

Hi Greg,

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

drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files':
drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand
drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' operand

Caused by commit 8e36e9ee3c5a9228b68717b35101c58fe9a001c5 ("sysfs: Use
sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes")
interacting with commit 71f496c9ec9821d2e09b00298915b99b6cbc9d92 ("sysfs:
Use one lockdep class per sysfs attribute") both from the driver-core
tree.

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 1 Mar 2010 19:41:15 +1100
Subject: [PATCH] sysfs: fix for thinko with sysfs_bin_attr_init()

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/pci/pci-sysfs.c |    4 ++--
 include/linux/sysfs.h   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 9fa183c..de29645 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -642,7 +642,7 @@ void pci_create_legacy_files(struct pci_bus *b)
 	if (!b->legacy_io)
 		goto kzalloc_err;
 
-	sysfs_bin_attr_init(&b->legacy_io);
+	sysfs_bin_attr_init(b->legacy_io);
 	b->legacy_io->attr.name = "legacy_io";
 	b->legacy_io->size = 0xffff;
 	b->legacy_io->attr.mode = S_IRUSR | S_IWUSR;
@@ -655,7 +655,7 @@ void pci_create_legacy_files(struct pci_bus *b)
 		goto legacy_io_err;
 
 	/* Allocated above after the legacy_io struct */
-	sysfs_bin_attr_init(&b->legacy_mem);
+	sysfs_bin_attr_init(b->legacy_mem);
 	b->legacy_mem = b->legacy_io + 1;
 	b->legacy_mem->attr.name = "legacy_mem";
 	b->legacy_mem->size = 1024*1024;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index d77cde6..f0496b3 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -110,7 +110,7 @@ struct bin_attribute {
  *	enabled.  Lockdep gives a nice error when your attribute is
  *	added to sysfs if you don't have this.
  */
-#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&bin_attr->attr)
+#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
 
 struct sysfs_ops {
 	ssize_t	(*show)(struct kobject *, struct attribute *,char *);
-- 
1.7.0

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

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

end of thread, other threads:[~2014-05-28 21:11 UTC | newest]

Thread overview: 195+ 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 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
  -- strict thread matches above, loose matches on Subject: below --
2014-05-28  9:46 linux-next: build failure after merge of the final tree Stephen Rothwell
2014-05-28  9:57 ` Paul Bolle
2014-05-28 10:14   ` Paul Bolle
2014-05-28 20:21     ` Paul Bolle
2014-05-28 20:42       ` Greg KH
2014-05-28 20:48         ` Paul Bolle
2014-05-28 21:15           ` Greg KH
2014-05-28 10:24   ` Stephen Rothwell
2014-04-07  4:52 Stephen Rothwell
2014-04-07 18:26 ` Andrew Morton
2014-04-07 21:51   ` Stephen Rothwell
2014-01-30  3:55 Stephen Rothwell
2014-01-06  9:28 Stephen Rothwell
2014-01-06 23:12 ` Benjamin Herrenschmidt
2013-12-17  5:59 Stephen Rothwell
2013-12-17  8:26 ` Heiko Stübner
2013-12-16  5:47 Stephen Rothwell
2013-12-16  7:08 ` Krzysztof Kozlowski
2013-12-16 11:45   ` Mark Brown
2013-12-16 12:13     ` Krzysztof Kozlowski
2013-12-16 12:33       ` Mark Brown
2013-12-16 13:29         ` Stephen Rothwell
2013-11-18  3:19 Stephen Rothwell
2013-11-18  8:49 ` Kirill A. Shutemov
2013-11-18 23:09   ` David Miller
2013-11-18  3:01 Stephen Rothwell
2013-11-04  6:52 Stephen Rothwell
2013-11-04 17:06 ` Mark Brown
2013-10-29  9:16 Stephen Rothwell
2013-10-29 13:11 ` Linus Walleij
2013-10-29 13:20   ` Linus Walleij
2013-09-27  8:32 Stephen Rothwell
2013-09-27 14:40 ` Chris Ball
2013-08-20  7:20 Stephen Rothwell
2013-08-20 16:07 ` Dwight Engen
2013-08-20 19:28   ` Ben Myers
2013-08-21  0:22     ` Stephen Rothwell
2013-08-21 15:54       ` Ben Myers
2013-08-20 20:46   ` Arnd Bergmann
2013-08-21  5:08     ` Dwight Engen
2013-08-21  6:30       ` Jeremy Kerr
2013-08-21 15:56         ` Ben Myers
2013-03-12  4:30 Stephen Rothwell
2013-03-12  9:31 ` Daniel Hellstrom
2013-03-12 11:57   ` Stephen Rothwell
2013-03-12 16:13     ` Dmitry Torokhov
2013-03-13 11:20       ` Daniel Hellstrom
2013-02-06  7:30 Stephen Rothwell
2013-02-06  7:42 ` Stephen Rothwell
2013-02-06 17:52   ` Greg Kroah-Hartman
2013-02-06 18:40     ` David Miller
2012-10-16  3:50 Stephen Rothwell
2012-10-16  4:21 ` Al Viro
2012-07-31  5:14 Stephen Rothwell
2012-07-19  7:08 Stephen Rothwell
2012-07-19 13:53 ` Javier Muñoz
2012-07-05  8:33 Stephen Rothwell
2012-07-05  9:43 ` Alan Modra
2012-07-06  0:21   ` Stephen Rothwell
2012-07-06  0:57     ` Alan Modra
2012-07-06  3:01       ` Stephen Rothwell
2012-07-06  6:08         ` Alan Modra
2012-05-22  8:20 Stephen Rothwell
2012-05-22 19:05 ` David Miller
2012-05-23  2:08   ` Stephen Rothwell
2012-05-21  8:54 Stephen Rothwell
2012-05-21  9:12 ` Ingo Molnar
2012-05-21  9:15   ` Stephen Rothwell
2012-05-22  8:25   ` Stephen Rothwell
2012-05-23 15:35     ` Ingo Molnar
2012-05-24  7:16       ` Stephen Rothwell
2012-05-24  7:22         ` Ingo Molnar
2012-05-24 14:06         ` H. Peter Anvin
2012-02-27  7:06 Stephen Rothwell
2012-02-27 21:17 ` Greg KH
2012-02-27 21:24   ` Alan Cox
2012-02-27  7:05 Stephen Rothwell
2012-02-27  6:37 Stephen Rothwell
2012-02-27  9:19 ` Benjamin Herrenschmidt
2012-02-27 23:30   ` Benjamin Herrenschmidt
2012-01-20  7:21 Stephen Rothwell
2012-01-20  9:08 ` Deepthi Dharwar
2012-01-20  7:11 Stephen Rothwell
2012-01-20  7:34 ` Andrew Morton
2012-01-20  8:21   ` Sebastian Andrzej Siewior
2012-01-05  8:04 Stephen Rothwell
2012-01-06  0:04 ` Andrew Morton
2012-01-09  5:59   ` Stephen Rothwell
2012-01-09  6:20     ` Stephen Rothwell
2012-01-09 15:42       ` Greg KH
2012-01-09 15:54         ` Steven Rostedt
2012-01-09 16:27           ` Stephen Rothwell
2012-01-09 16:26         ` Stephen Rothwell
2012-01-09 21:35     ` David Miller
2012-01-09 21:41       ` Steven Rostedt
2011-12-17  4:22 Stephen Rothwell
2011-12-17  4:27 ` Stephen Rothwell
2011-09-30  1:38 Stephen Rothwell
2011-09-30  2:49 ` Yoshihiro Shimoda
2011-09-30  1:23 Stephen Rothwell
2011-09-30  1:12 Stephen Rothwell
2011-09-30  2:40 ` Paul Gortmaker
2011-09-30  3:05   ` Stephen Rothwell
2011-09-30  3:22     ` Paul Gortmaker
2011-09-30  1:05 Stephen Rothwell
2011-09-30  7:57 ` Heiko Carstens
2011-09-28  9:56 Stephen Rothwell
2011-09-28 12:02 ` huang ying
2011-08-23  5:48 Stephen Rothwell
2011-08-23 14:32 ` Randy Dunlap
2011-07-18  9:35 Stephen Rothwell
2011-07-18  9:30 Stephen Rothwell
2011-07-18 17:58 ` David Miller
2011-07-18 20:52   ` Sam Ravnborg
2011-05-27  5:11 Stephen Rothwell
2011-05-27 14:47 ` Mike Frysinger
2011-05-23  4:56 Stephen Rothwell
2011-05-23  5:17 ` Artem Bityutskiy
2011-05-20  6:32 Stephen Rothwell
2011-05-20  6:27 Stephen Rothwell
2011-05-20  6:23 Stephen Rothwell
2011-05-20  6:18 Stephen Rothwell
2011-05-24  2:06 ` Mike Frysinger
2011-05-24  2:51   ` Greg KH
2011-05-24  3:59     ` Stephen Rothwell
2011-05-24 12:48       ` Greg KH
2011-05-24 21:52         ` Stephen Rothwell
2011-05-24  4:01   ` Linus Torvalds
2011-05-24  4:10     ` Mike Frysinger
2011-05-24 17:10       ` Mike Frysinger
2011-05-24 17:29         ` Linus Torvalds
2011-05-25  9:24         ` Felipe Balbi
2011-05-25 12:13           ` Mike Frysinger
2011-03-28  3:44 Stephen Rothwell
2011-03-24  3:30 Stephen Rothwell
2011-03-24  4:13 ` Andrew Morton
2011-03-24 19:55   ` Tony Luck
2011-01-31  6:26 Stephen Rothwell
2011-01-15  2:10 Stephen Rothwell
2011-01-15  4:27 ` Andrea Arcangeli
2010-11-29  2:07 Stephen Rothwell
2010-11-09  4:03 Stephen Rothwell
2010-09-16  5:15 Stephen Rothwell
2010-09-16  5:47 ` Takashi Iwai
2010-08-11  3:38 Stephen Rothwell
2010-08-11  5:23 ` Andrew Morton
2010-08-11  7:38   ` Stephen Rothwell
2010-07-27  7:00 Stephen Rothwell
2010-07-16  7:11 Stephen Rothwell
2010-07-16 18:39 ` Yinghai Lu
2010-07-16 20:58   ` Russell King
2010-07-16 23:07     ` Stephen Rothwell
2010-06-23 16:19 Stephen Rothwell
2010-06-24  0:36 ` Stephen Rothwell
2010-06-24  9:00   ` Catalin Marinas
2010-06-24  9:09     ` Russell King
2010-06-24 10:18     ` Phil Carmody
2010-05-25  4:10 Stephen Rothwell
2010-05-25  4:58 ` David Miller
2010-05-25  5:14   ` Herbert Xu
2010-05-25  6:56     ` David Miller
2010-05-14  5:53 Stephen Rothwell
2010-05-14 15:03 ` Don Zickus
2010-05-15  7:37   ` Ingo Molnar
2010-05-15 20:28     ` Frederic Weisbecker
2010-05-14 15:11 ` Don Zickus
2010-04-27  5:49 Stephen Rothwell
2010-04-28  9:41 ` Alexander Graf
2010-04-28  9:48   ` Avi Kivity
2010-04-28 15:21 ` Marcelo Tosatti
2010-04-08  5:35 Stephen Rothwell
2010-04-08  6:25 ` David Miller
2010-04-08 14:15   ` John Linn
2010-04-08 22:59     ` Stephen Rothwell
2010-04-08 23:01       ` John Linn
     [not found] <20100318160220.b7eaded6.sfr@canb.auug.org.au>
2010-03-18  6:21 ` David Miller
     [not found] <20100301203453.938e4136.sfr@canb.auug.org.au>
2010-03-01  9:42 ` Jens Axboe
2010-03-01 10:07   ` Stephen Rothwell
2010-03-01  9:40 Stephen Rothwell
2010-03-01  9:38 Stephen Rothwell
2010-03-02 20:47 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).