From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261626AbVASHy4 (ORCPT ); Wed, 19 Jan 2005 02:54:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261625AbVASHyL (ORCPT ); Wed, 19 Jan 2005 02:54:11 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:51647 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S261626AbVASHdU (ORCPT ); Wed, 19 Jan 2005 02:33:20 -0500 From: "Eric W. Biederman" To: Andrew Morton Cc: , Subject: [PATCH 24/29] x86-crash_shutdown-apic-shutdown Date: Wed, 19 Jan 2005 0:31:37 -0700 Message-ID: X-Mailer: patch-bomb.pl@ebiederm.dsl.xmission.com In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This patch should not make it to the stable kernel without a being reviewed a lot more. It is unclear how much a hardned kernel can take when it comes to misconfigured apics. So since a normal kernel has problems this patch does a clean shutdown. It is my expectation this patch will be dropped from future generations of the kexec work. But for the moment it is a crutch to keep from breaking everything. Signed-off-by: Eric Biederman --- crash.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -uNr linux-2.6.11-rc1-mm1-nokexec-x86-crash_shutdown-snapshot-registers/arch/i386/kernel/crash.c linux-2.6.11-rc1-mm1-nokexec-x86-crash_shutdown-apic-shutdown/arch/i386/kernel/crash.c --- linux-2.6.11-rc1-mm1-nokexec-x86-crash_shutdown-snapshot-registers/arch/i386/kernel/crash.c Tue Jan 18 23:15:34 2005 +++ linux-2.6.11-rc1-mm1-nokexec-x86-crash_shutdown-apic-shutdown/arch/i386/kernel/crash.c Tue Jan 18 23:15:50 2005 @@ -23,6 +23,7 @@ #include #include #include +#include #include #define MAX_NOTE_BYTES 1024 @@ -115,6 +116,7 @@ { local_irq_disable(); crash_save_this_cpu(regs, cpu); + disable_local_APIC(); atomic_dec(&waiting_for_crash_ipi); /* Assume hlt works */ __asm__("hlt"); @@ -153,6 +155,7 @@ } /* Leave the nmi callback set */ + disable_local_APIC(); } #else static void nmi_shootdown_cpus(void) @@ -174,5 +177,9 @@ /* The kernel is broken so disable interrupts */ local_irq_disable(); nmi_shootdown_cpus(); + lapic_shutdown(); +#if defined(CONFIG_X86_IO_APIC) + disable_IO_APIC(); +#endif crash_save_self(); }