All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: fully honor "nolapic" (take 2)
Date: Fri, 16 Jan 2009 11:46:02 +0000	[thread overview]
Message-ID: <4970818A.76E4.0078.0@novell.com> (raw)

"nolapic" should not only suppress SMP and use of the LAPIC, but it
also ought to have the effect of disabling all IO-APIC related activity
as well as PCI MSI and HT-IRQs.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

---
 arch/x86/kernel/apic.c    |    9 ++++++++-
 arch/x86/kernel/io_apic.c |    6 ++++++
 arch/x86/kernel/smpboot.c |    1 +
 3 files changed, 13 insertions(+), 1 deletion(-)

--- linux-2.6.29-rc1/arch/x86/kernel/apic.c	2009-01-14 11:36:05.000000000 +0100
+++ 2.6.29-rc1-x86-no-lapic/arch/x86/kernel/apic.c	2009-01-16 11:57:45.000000000 +0100
@@ -1125,6 +1125,13 @@ void __cpuinit setup_local_APIC(void)
 	unsigned int value;
 	int i, j;
 
+	if (disable_apic) {
+#ifdef CONFIG_X86_IO_APIC
+		disable_ioapic_setup();
+#endif
+		return;
+	}
+
 #ifdef CONFIG_X86_32
 	/* Pound the ESR really hard over the head with a big hammer - mbligh */
 	if (lapic_is_integrated() && esr_disable) {
@@ -1565,11 +1570,11 @@ int apic_version[MAX_APICS];
 
 int __init APIC_init_uniprocessor(void)
 {
-#ifdef CONFIG_X86_64
 	if (disable_apic) {
 		pr_info("Apic disabled\n");
 		return -1;
 	}
+#ifdef CONFIG_X86_64
 	if (!cpu_has_apic) {
 		disable_apic = 1;
 		pr_info("Apic disabled by BIOS\n");
--- linux-2.6.29-rc1/arch/x86/kernel/io_apic.c	2009-01-14 11:36:05.000000000 +0100
+++ 2.6.29-rc1-x86-no-lapic/arch/x86/kernel/io_apic.c	2009-01-13 15:05:37.000000000 +0100
@@ -3258,6 +3258,9 @@ static int msi_compose_msg(struct pci_de
 	int err;
 	unsigned dest;
 
+	if (disable_apic)
+		return -ENXIO;
+
 	cfg = irq_cfg(irq);
 	err = assign_irq_vector(irq, cfg, TARGET_CPUS);
 	if (err)
@@ -3726,6 +3729,9 @@ int arch_setup_ht_irq(unsigned int irq, 
 	struct irq_cfg *cfg;
 	int err;
 
+	if (disable_apic)
+		return -ENXIO;
+
 	cfg = irq_cfg(irq);
 	err = assign_irq_vector(irq, cfg, TARGET_CPUS);
 	if (!err) {
--- linux-2.6.29-rc1/arch/x86/kernel/smpboot.c	2009-01-14 11:36:05.000000000 +0100
+++ 2.6.29-rc1-x86-no-lapic/arch/x86/kernel/smpboot.c	2009-01-14 09:14:16.000000000 +0100
@@ -1125,6 +1125,7 @@ static int __init smp_sanity_check(unsig
 		printk(KERN_ERR "... forcing use of dummy APIC emulation."
 				"(tell your hw vendor)\n");
 		smpboot_clear_io_apic();
+		disable_ioapic_setup();
 		return -1;
 	}
 




             reply	other threads:[~2009-01-16 11:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 11:46 Jan Beulich [this message]
2009-01-16 12:45 ` [PATCH] x86: fully honor "nolapic" (take 2) Ingo Molnar
2009-01-16 13:41   ` Jan Beulich
2009-01-16 13:42     ` Ingo Molnar
2009-01-16 13:51       ` Jan Beulich
2009-01-16 13:58         ` Ingo Molnar
2009-01-16 14:09           ` Jan Beulich

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=4970818A.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@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 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.