All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	linux-rt-users@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [patch] paravirt: disable Kbuild option for now
Date: Tue, 09 Jan 2007 23:39:41 +1100	[thread overview]
Message-ID: <1168346382.19646.130.camel@localhost.localdomain> (raw)
In-Reply-To: <1168344326.19646.124.camel@localhost.localdomain>

On Tue, 2007-01-09 at 23:05 +1100, Rusty Russell wrote:
> On Tue, 2007-01-09 at 09:45 +0100, Ingo Molnar wrote:
> > * Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > 
> > > In include/linux/irqflags.h safe_halt changed from a macro to a static 
> > > inline function which results in tons of warnings for architectures 
> > > other than x86[-64]:
> No.  Just drop the whole "don't export paravirt_ops" idea, and we'll
> work on that for 2.6.21.

Or, apply this.  Compile & boot tested.

Name: Revert safe_halt to a macro: instead rename paravirt_ops op to avoid the namespace pollution

Making "safe_halt()" an inline function gives lots of warning on other
archs, so it's easiest to just avoid that name.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r 3bbc1e7384c9 arch/i386/kernel/paravirt.c
--- a/arch/i386/kernel/paravirt.c	Tue Jan 09 17:28:27 2007 +1100
+++ b/arch/i386/kernel/paravirt.c	Tue Jan 09 23:16:30 2007 +1100
@@ -683,13 +773,13 @@ EXPORT_SYMBOL(wbinvd);
 
 void raw_safe_halt(void)
 {
-	paravirt_ops.safe_halt();
+	paravirt_ops.halt_safe();
 }
 EXPORT_SYMBOL_GPL(raw_safe_halt);
 
 void halt(void)
 {
-	paravirt_ops.safe_halt();
+	paravirt_ops.halt();
 }
 EXPORT_SYMBOL_GPL(halt);
 
@@ -750,7 +840,7 @@ struct paravirt_ops paravirt_ops = {
 	.restore_fl = native_restore_fl,
 	.irq_disable = native_irq_disable,
 	.irq_enable = native_irq_enable,
-	.safe_halt = native_safe_halt,
+	.halt_safe = native_safe_halt,
 	.halt = native_halt,
 	.wbinvd = native_wbinvd,
 	.read_msr = native_read_msr,
diff -r 3bbc1e7384c9 include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h	Tue Jan 09 17:28:27 2007 +1100
+++ b/include/asm-i386/paravirt.h	Tue Jan 09 23:15:22 2007 +1100
@@ -94,7 +94,7 @@ struct paravirt_ops
 	void (fastcall *restore_fl)(unsigned long);
 	void (fastcall *irq_disable)(void);
 	void (fastcall *irq_enable)(void);
-	void (fastcall *safe_halt)(void);
+	void (fastcall *halt_safe)(void);
 	void (fastcall *halt)(void);
 	void (fastcall *wbinvd)(void);
 
diff -r 3bbc1e7384c9 include/linux/irqflags.h
--- a/include/linux/irqflags.h	Tue Jan 09 17:28:27 2007 +1100
+++ b/include/linux/irqflags.h	Tue Jan 09 23:12:20 2007 +1100
@@ -74,11 +74,11 @@
 #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
 
 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-static inline void safe_halt(void)
-{
-	trace_hardirqs_on();
-	raw_safe_halt();
-}
+#define safe_halt()						\
+	do {							\
+		trace_hardirqs_on();				\
+		raw_safe_halt();				\
+	} while (0)
 
 #define local_save_flags(flags)		raw_local_save_flags(flags)
 

      parent reply	other threads:[~2007-01-09 12:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 16:30 2.6.20-rc4-rt0: i386 assembler in kernel/sys.c Sascha Hauer
2007-01-09  8:45 ` [patch] paravirt: disable Kbuild option for now Ingo Molnar
2007-01-09 12:05   ` Rusty Russell
2007-01-09 12:11     ` Ingo Molnar
2007-01-09 12:39     ` Rusty Russell [this message]

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=1168346382.19646.130.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@osdl.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=s.hauer@pengutronix.de \
    --cc=torvalds@osdl.org \
    /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.