mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: use native_halt on a halt
@ 2010-12-13 16:51 Cliff Wickman
  2010-12-27 23:00 ` [tip:x86/paravirt] x86, paravirt: Use native_halt on a halt, not native_safe_halt tip-bot for Cliff Wickman
  0 siblings, 1 reply; 2+ messages in thread
From: Cliff Wickman @ 2010-12-13 16:51 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel


halt() should use native_halt()
safe_halt() uses native_safe_halt()

If CONFIG_PARAVIRT=y, halt() is defined in arch/x86/include/asm/paravirt.h as

static inline void halt(void)
{
        PVOP_VCALL0(pv_irq_ops.safe_halt);
}

Otherwise (no CONFIG_PARAVIRT) halt() in arch/x86/include/asm/irqflags.h is

static inline void halt(void)
{
        native_halt();
}

So it looks to me like the CONFIG_PARAVIRT case of using native_safe_halt()
for a halt() is an oversight.
Am I missing something?

It probably hasn't shown up as a problem because the local apic is disabled
on a shutdown or restart.  But if we disable interrupts and call halt()
we shouldn't expect that the halt() will re-enable interrupts.

Signed-off-by: Cliff Wickman <cpw@sgi.com>

---
 arch/x86/include/asm/paravirt.h |    2 +-
 arch/x86/kernel/apic/apic.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86/include/asm/paravirt.h
===================================================================
--- linux.orig/arch/x86/include/asm/paravirt.h
+++ linux/arch/x86/include/asm/paravirt.h
@@ -112,7 +112,7 @@ static inline void raw_safe_halt(void)
 
 static inline void halt(void)
 {
-	PVOP_VCALL0(pv_irq_ops.safe_halt);
+	PVOP_VCALL0(pv_irq_ops.halt);
 }
 
 static inline void wbinvd(void)

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

end of thread, other threads:[~2010-12-27 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-13 16:51 [PATCH] x86: use native_halt on a halt Cliff Wickman
2010-12-27 23:00 ` [tip:x86/paravirt] x86, paravirt: Use native_halt on a halt, not native_safe_halt tip-bot for Cliff Wickman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome