All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben@fluff.org>
To: David Miller <davem@davemloft.net>
Cc: viro@ftp.linux.org.uk, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, avi@qumranet.com
Subject: Re: [PATCH] smp_call_function_single() should be a macro on UP
Date: Wed, 18 Jul 2007 00:54:17 +0100	[thread overview]
Message-ID: <20070717235417.GA18459@fluff.org.uk> (raw)
In-Reply-To: <20070717.144042.41636155.davem@davemloft.net>

On Tue, Jul 17, 2007 at 02:40:42PM -0700, David Miller wrote:
> From: Al Viro <viro@ftp.linux.org.uk>
> 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 <viro@zeniv.linux.org.uk>
> 
> Acked-by: David S. Miller <davem@davemloft.net>
> 
> 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 (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2007-07-17 23:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 21:29 [PATCH] smp_call_function_single() should be a macro on UP Al Viro
2007-07-17 21:40 ` David Miller
2007-07-17 23:54   ` Ben Dooks [this message]
2007-07-18  0:00     ` Al Viro
2007-07-18  0:07     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070717235417.GA18459@fluff.org.uk \
    --to=ben@fluff.org \
    --cc=avi@qumranet.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.