Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261636AbVASIE2 (ORCPT ); Wed, 19 Jan 2005 03:04:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261657AbVASIDd (ORCPT ); Wed, 19 Jan 2005 03:03:33 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:53951 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S261637AbVASHdo (ORCPT ); Wed, 19 Jan 2005 02:33:44 -0500 From: "Eric W. Biederman" To: Andrew Morton Cc: , Subject: [PATCH 2/29] x86-local-apic-fix 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 Content-Length: 4017 Lines: 124 From: "Maciej W. Rozycki" Fix a kexec problem whcih causes local APIC detection failure. The problem is detect_init_APIC() is called early, before the command line have been processed. Therefore "lapic" (and "nolapic") have not been seen, yet. Signed-off-by: Maciej W. Rozycki Signed-off-by: Eric Biederman --- arch/i386/kernel/apic.c | 25 +++++-------------------- arch/i386/kernel/setup.c | 11 +++++++++++ include/asm-i386/apic.h | 13 +++++++++++++ 3 files changed, 29 insertions(+), 20 deletions(-) diff -uNr linux-2.6.11-rc1-mm1-nokexec-x86-rename-apic_mode_exint/arch/i386/kernel/apic.c linux-2.6.11-rc1-mm1-nokexec-x86-local-apic-fix/arch/i386/kernel/apic.c --- linux-2.6.11-rc1-mm1-nokexec-x86-rename-apic_mode_exint/arch/i386/kernel/apic.c Fri Jan 14 04:32:22 2005 +++ linux-2.6.11-rc1-mm1-nokexec-x86-local-apic-fix/arch/i386/kernel/apic.c Tue Jan 18 22:43:54 2005 @@ -41,6 +41,11 @@ #include "io_ports.h" /* + * Knob to control our willingness to enable the local APIC. + */ +int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ + +/* * Debug level */ int apic_verbosity; @@ -666,26 +671,6 @@ * Detect and enable local APICs on non-SMP boards. * Original code written by Keir Fraser. */ - -/* - * Knob to control our willingness to enable the local APIC. - */ -int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ - -static int __init lapic_disable(char *str) -{ - enable_local_apic = -1; - clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); - return 0; -} -__setup("nolapic", lapic_disable); - -static int __init lapic_enable(char *str) -{ - enable_local_apic = 1; - return 0; -} -__setup("lapic", lapic_enable); static int __init apic_set_verbosity(char *str) { diff -uNr linux-2.6.11-rc1-mm1-nokexec-x86-rename-apic_mode_exint/arch/i386/kernel/setup.c linux-2.6.11-rc1-mm1-nokexec-x86-local-apic-fix/arch/i386/kernel/setup.c --- linux-2.6.11-rc1-mm1-nokexec-x86-rename-apic_mode_exint/arch/i386/kernel/setup.c Fri Jan 14 04:28:30 2005 +++ linux-2.6.11-rc1-mm1-nokexec-x86-local-apic-fix/arch/i386/kernel/setup.c Tue Jan 18 22:43:55 2005 @@ -41,6 +41,7 @@ #include #include #include