All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: vgoyal@in.ibm.com, tglx@linutronix.de
Cc: hbabu@us.ibm.com, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH] Revert x86: add lapic_shutdown for x86_64
Date: Mon, 29 Oct 2007 15:39:46 -0700	[thread overview]
Message-ID: <47266132.5050001@ct.jp.nec.com> (raw)
In-Reply-To: <20071024062933.GA4622@in.ibm.com>

lapic_shutdown is useless on x86_64.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/kernel/apic_64.c |   14 --------------
 arch/x86/kernel/crash.c   |    5 +++++
 include/asm-x86/apic_64.h |    1 -
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index f28ccb5..f47bc49 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -287,20 +287,6 @@ void disable_local_APIC(void)
 	apic_write(APIC_SPIV, value);
 }
 
-void lapic_shutdown(void)
-{
-	unsigned long flags;
-
-	if (!cpu_has_apic)
-		return;
-
-	local_irq_save(flags);
-
-	disable_local_APIC();
-
-	local_irq_restore(flags);
-}
-
 /*
  * This is to verify that we're looking at a real local APIC.
  * Check these against your board if the CPUs aren't getting
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 8bb482f..79a5a25 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -136,7 +136,12 @@ void machine_crash_shutdown(struct pt_regs *regs)
 	/* Make a note of crashing cpu. Will be used in NMI callback.*/
 	crashing_cpu = safe_smp_processor_id();
 	nmi_shootdown_cpus();
+#ifdef CONFIG_X86_32
 	lapic_shutdown();
+#else
+	if (cpu_has_apic)
+		disable_local_APIC();
+#endif
 #if defined(CONFIG_X86_IO_APIC)
 	disable_IO_APIC();
 #endif
diff --git a/include/asm-x86/apic_64.h b/include/asm-x86/apic_64.h
index 2747a11..3c8f21e 100644
--- a/include/asm-x86/apic_64.h
+++ b/include/asm-x86/apic_64.h
@@ -69,7 +69,6 @@ extern void clear_local_APIC (void);
 extern void connect_bsp_APIC (void);
 extern void disconnect_bsp_APIC (int virt_wire_setup);
 extern void disable_local_APIC (void);
-extern void lapic_shutdown (void);
 extern int verify_local_APIC (void);
 extern void cache_APIC_registers (void);
 extern void sync_Arb_IDs (void);
-- 
1.5.3.4


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: vgoyal@in.ibm.com, tglx@linutronix.de
Cc: hbabu@us.ibm.com, linux-kernel@vger.kernel.org,
	kexec@lists.infradead.org,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH] Revert x86: add lapic_shutdown for x86_64
Date: Mon, 29 Oct 2007 15:39:46 -0700	[thread overview]
Message-ID: <47266132.5050001@ct.jp.nec.com> (raw)
In-Reply-To: <20071024062933.GA4622@in.ibm.com>

lapic_shutdown is useless on x86_64.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/kernel/apic_64.c |   14 --------------
 arch/x86/kernel/crash.c   |    5 +++++
 include/asm-x86/apic_64.h |    1 -
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index f28ccb5..f47bc49 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -287,20 +287,6 @@ void disable_local_APIC(void)
 	apic_write(APIC_SPIV, value);
 }
 
-void lapic_shutdown(void)
-{
-	unsigned long flags;
-
-	if (!cpu_has_apic)
-		return;
-
-	local_irq_save(flags);
-
-	disable_local_APIC();
-
-	local_irq_restore(flags);
-}
-
 /*
  * This is to verify that we're looking at a real local APIC.
  * Check these against your board if the CPUs aren't getting
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 8bb482f..79a5a25 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -136,7 +136,12 @@ void machine_crash_shutdown(struct pt_regs *regs)
 	/* Make a note of crashing cpu. Will be used in NMI callback.*/
 	crashing_cpu = safe_smp_processor_id();
 	nmi_shootdown_cpus();
+#ifdef CONFIG_X86_32
 	lapic_shutdown();
+#else
+	if (cpu_has_apic)
+		disable_local_APIC();
+#endif
 #if defined(CONFIG_X86_IO_APIC)
 	disable_IO_APIC();
 #endif
diff --git a/include/asm-x86/apic_64.h b/include/asm-x86/apic_64.h
index 2747a11..3c8f21e 100644
--- a/include/asm-x86/apic_64.h
+++ b/include/asm-x86/apic_64.h
@@ -69,7 +69,6 @@ extern void clear_local_APIC (void);
 extern void connect_bsp_APIC (void);
 extern void disconnect_bsp_APIC (int virt_wire_setup);
 extern void disable_local_APIC (void);
-extern void lapic_shutdown (void);
 extern int verify_local_APIC (void);
 extern void cache_APIC_registers (void);
 extern void sync_Arb_IDs (void);
-- 
1.5.3.4


  parent reply	other threads:[~2007-10-29 22:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-20  1:18 [PATCH 0/3] x86: unify crash_32/64.c Hiroshi Shimamoto
2007-10-20  1:18 ` Hiroshi Shimamoto
2007-10-20  1:21 ` [PATCH 1/3] x86: add lapic_shutdown for x86_64 Hiroshi Shimamoto
2007-10-20  1:21   ` Hiroshi Shimamoto
2007-10-24  6:29   ` Vivek Goyal
2007-10-24  6:29     ` Vivek Goyal
2007-10-24 21:27     ` Hiroshi Shimamoto
2007-10-24 21:27       ` Hiroshi Shimamoto
2007-10-25  0:28       ` Eric W. Biederman
2007-10-25  0:28         ` Eric W. Biederman
2007-10-29 22:45         ` Hiroshi Shimamoto
2007-10-29 22:45           ` Hiroshi Shimamoto
2007-10-29 22:39     ` Hiroshi Shimamoto [this message]
2007-10-29 22:39       ` [PATCH] Revert " Hiroshi Shimamoto
2007-10-29 23:15       ` Arjan van de Ven
2007-10-29 23:15         ` Arjan van de Ven
2007-10-30  0:05         ` Hiroshi Shimamoto
2007-10-30  0:05           ` Hiroshi Shimamoto
2007-10-30  1:06           ` Thomas Gleixner
2007-10-30  1:06             ` Thomas Gleixner
2007-10-20  1:23 ` [PATCH 2/3] x86: add safe_smp_processor_id " Hiroshi Shimamoto
2007-10-20  1:23   ` Hiroshi Shimamoto
2007-10-24  6:31   ` Vivek Goyal
2007-10-24  6:31     ` Vivek Goyal
2007-10-24  9:01     ` Vivek Goyal
2007-10-24  9:01       ` Vivek Goyal
2007-10-20  1:24 ` [PATCH 3/3] x86: unify crash_32/64.c Hiroshi Shimamoto
2007-10-20  1:24   ` Hiroshi Shimamoto
2007-10-20 10:50 ` [PATCH 0/3] " Thomas Gleixner
2007-10-20 10:50   ` Thomas Gleixner
2007-10-24  6:34 ` Vivek Goyal
2007-10-24  6:34   ` Vivek Goyal
2007-10-24 16:28   ` Hiroshi Shimamoto
2007-10-24 16:28     ` Hiroshi Shimamoto
2007-10-25 17:58     ` Hiroshi Shimamoto
2007-10-25 17:58       ` Hiroshi Shimamoto
2007-10-26 21:43       ` Hiroshi Shimamoto
2007-10-26 21:43         ` Hiroshi Shimamoto
2007-10-26 22:37         ` Thomas Gleixner
2007-10-26 22:37           ` Thomas Gleixner
2007-10-27  0:13           ` Hiroshi Shimamoto
2007-10-27  0:13             ` Hiroshi Shimamoto
2007-10-27  1:15             ` Hiroshi Shimamoto
2007-10-27  1:15               ` Hiroshi Shimamoto

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=47266132.5050001@ct.jp.nec.com \
    --to=h-shimamoto@ct.jp.nec.com \
    --cc=ebiederm@xmission.com \
    --cc=hbabu@us.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@in.ibm.com \
    /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.