public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: [PATCH, v2] x86: add X86_UPDATE_MPTABLE option
Date: Mon, 18 May 2009 10:59:57 -0700	[thread overview]
Message-ID: <4A11A21D.1080301@kernel.org> (raw)
In-Reply-To: <200905180941.06988.bjorn.helgaas@hp.com>


so could enable it for special purpose.
1. for acpi enabled kernel kexec kernel without acpi
2. for crossing check mptable or have correct mptable

even with this option enabled, user still need to use
update_mpatble or alloc_mptable in command line

v2: update to make it depends on KEXEC according to Bjorn

[ Impact: new config option to disable update_mptable ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Len Brown <lenb@kernel.org>

---
 arch/x86/Kconfig              |   10 ++++++++++
 arch/x86/include/asm/mpspec.h |    6 +++---
 arch/x86/kernel/acpi/boot.c   |    3 ++-
 arch/x86/kernel/mpparse.c     |    4 ++++
 4 files changed, 19 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -292,6 +292,16 @@ config X86_MPPARSE
 	  For old smp systems that do not have proper acpi support. Newer systems
 	  (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
 
+config X86_UPDATE_MPTABLE
+	bool "Enable update mptable according to ACPI"
+	default n
+	depends on X86_MPPARSE && ACPI && KEXEC
+	---help---
+	  Some systems do not have correct mptable. With "update_mptable" or
+	  "alloc_mptable" kernel could try to update mptable according to DSDT.
+	  Then could use kexec to start second kernel (even old) without ACPI
+	  support compiled in or "acpi=off"
+
 config X86_BIGSMP
 	bool "Support for big SMP systems with more than 8 CPUs"
 	depends on X86_32 && SMP
Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
+++ linux-2.6/arch/x86/kernel/acpi/boot.c
@@ -1159,7 +1159,7 @@ void __init mp_config_acpi_legacy_irqs(v
 static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
 			int polarity)
 {
-#ifdef CONFIG_X86_MPPARSE
+#ifdef CONFIG_X86_UPDATE_MPTABLE
 	struct mpc_intsrc mp_irq;
 	struct pci_dev *pdev;
 	unsigned char number;
@@ -1191,6 +1191,7 @@ static int mp_config_acpi_gsi(struct dev
 
 	save_mp_irq(&mp_irq);
 #endif
+
 	return 0;
 }
 
Index: linux-2.6/arch/x86/kernel/mpparse.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/mpparse.c
+++ linux-2.6/arch/x86/kernel/mpparse.c
@@ -797,6 +797,8 @@ void __init find_smp_config(void)
 	__find_smp_config(1);
 }
 
+#ifdef CONFIG_X86_UPDATE_MPTABLE
+
 #ifdef CONFIG_X86_IO_APIC
 static u8 __initdata irq_used[MAX_IRQ_SOURCES];
 
@@ -1080,3 +1082,5 @@ static int __init update_mp_table(void)
 }
 
 late_initcall(update_mp_table);
+
+#endif /* CONFIG_X86_UPDATE_MPTABLE */
Index: linux-2.6/arch/x86/include/asm/mpspec.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/mpspec.h
+++ linux-2.6/arch/x86/include/asm/mpspec.h
@@ -60,10 +60,8 @@ extern void get_smp_config(void);
 
 #ifdef CONFIG_X86_MPPARSE
 extern void find_smp_config(void);
-extern void early_reserve_e820_mpc_new(void);
 #else
 static inline void find_smp_config(void) { }
-static inline void early_reserve_e820_mpc_new(void) { }
 #endif
 
 void __cpuinit generic_processor_info(int apicid, int version);
@@ -87,13 +85,15 @@ static inline int acpi_probe_gsi(void)
 }
 #endif /* CONFIG_ACPI */
 
-#ifdef CONFIG_X86_MPPARSE
+#ifdef CONFIG_X86_UPDATE_MPTABLE
 extern int enable_update_mptable;
+extern void early_reserve_e820_mpc_new(void);
 #else
 static inline int enable_update_mptable(void)
 {
 	return 0;
 }
+static inline void early_reserve_e820_mpc_new(void) { }
 #endif
 
 #define PHYSID_ARRAY_SIZE	BITS_TO_LONGS(MAX_APICS)

  parent reply	other threads:[~2009-05-18 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 19:51 [PATCH] x86: update_mptable need pci_routeirq Yinghai Lu
2009-05-15 19:53 ` [PATCH] x86/acpi: don't call mp_config_acpi_gsi if update_mptable is not used Yinghai Lu
2009-05-18  7:40   ` [tip:irq/numa] x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled tip-bot for Yinghai Lu
2009-05-15 21:07 ` [PATCH] x86: update_mptable need pci_routeirq Bjorn Helgaas
2009-05-15 21:13   ` Yinghai Lu
2009-05-15 21:52     ` Bjorn Helgaas
2009-05-15 22:03       ` Yinghai Lu
2009-05-15 22:08         ` Bjorn Helgaas
2009-05-16 10:25           ` Ingo Molnar
2009-05-16 16:44 ` [PATCH] x86: add X86_UPDATE_MPTABLE option Yinghai Lu
2009-05-18 15:41   ` Bjorn Helgaas
2009-05-18 17:39     ` Yinghai Lu
2009-05-18 17:59     ` Yinghai Lu [this message]
2009-05-18 20:58       ` [PATCH, v2] " Bjorn Helgaas

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=4A11A21D.1080301@kernel.org \
    --to=yinghai@kernel.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox