Re: [PATCH] smp_call_function_single() should be a macro on UP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 17, 2007 at 02:40:42PM -0700, David Miller wrote:
> From: Al Viro <[email protected]>
> Date: Tue, 17 Jul 2007 22:29:46 +0100
> 
> > ... or we end up with header include order problems from hell.
> > E.g. on m68k this is 100% fatal - local_irq_enable() there
> > wants preempt_count(), which wants task_struct fields, which
> > we won't have when we are in smp.h pulled from sched.h.
> > 
> > Signed-off-by: Al Viro <[email protected]>
> 
> Acked-by: David S. Miller <[email protected]>
> 
> I was going to fix the sparc64/UP build fallout by
> adding linux/kernel.h include to linux/smp.h but that
> definitely would not handle this m68k case at all.

This has broken _all_ ARM builds, due to using WARN_ON()
in this header. Warn on needs <asm/bug.h> and this is
needs <linux/kernel.h> to make it compile cleanly on ARM
which is unfortuantely what we where trying to avoid in
the first place?

This patch fixes the compile on ARM, but moves the
includes out of the CONFIG_SMP block.

diff -urpN -X linux-2.6.22-git9/Documentation/dontdiff linux-2.6.22-git9/include/linux/smp.h linux-2.6.22-git9-fix1/include/linux/smp.h
--- linux-2.6.22-git9/include/linux/smp.h	2007-07-18 00:40:45.000000000 +0100
+++ linux-2.6.22-git9-fix1/include/linux/smp.h	2007-07-18 00:43:24.000000000 +0100
@@ -7,15 +7,17 @@
  */
 
 #include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/compiler.h>
+
 #include <asm/system.h>
+#include <asm/bug.h>
 
 extern void cpu_idle(void);
 
 #ifdef CONFIG_SMP
 
 #include <linux/preempt.h>
-#include <linux/kernel.h>
-#include <linux/compiler.h>
 #include <linux/thread_info.h>
 #include <asm/smp.h>
 


-- 
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux