2003-11-06 00:27:46

by Zwane Mwaikambo

[permalink] [raw]
Subject: [PATCH][2.6] Don't disable IOAPIC with nosmp

This patch addresses bugzilla bug#1487
http://bugme.osdl.org/show_bug.cgi?id=1487

We're disabling the IOAPIC when someone boots with the nosmp kernel
parameter, this happens to break interrupt routing for some folks.

Tested on the following;
SMP P3 (afflicted system)
UP AMD K6
UP Intel Celeron
SMP 3x P133

Index: linux-2.6.0-test9-mm2/arch/i386/kernel/smpboot.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm2/arch/i386/kernel/smpboot.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 smpboot.c
--- linux-2.6.0-test9-mm2/arch/i386/kernel/smpboot.c 5 Nov 2003 19:57:23 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm2/arch/i386/kernel/smpboot.c 5 Nov 2003 22:50:48 -0000
@@ -995,11 +995,8 @@ static void __init smp_boot_cpus(unsigne
* If SMP should be disabled, then really disable it!
*/
if (!max_cpus) {
- smp_found_config = 0;
- printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n");
- smpboot_clear_io_apic_irqs();
+ printk(KERN_INFO "SMP mode deactivated, booting 1 Processor\n");
phys_cpu_present_map = physid_mask_of_physid(0);
- return;
}

connect_bsp_APIC();
@@ -1022,6 +1019,9 @@ static void __init smp_boot_cpus(unsigne

kicked = 1;
for (bit = 0; kicked < NR_CPUS && bit < MAX_APICS; bit++) {
+ if (kicked > max_cpus)
+ break;
+
apicid = cpu_present_to_apicid(bit);
/*
* Don't even attempt to start the boot CPU!


2003-11-07 22:21:55

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH][2.6] Don't disable IOAPIC with nosmp

On Fri, 7 Nov 2003, Maciej W. Rozycki wrote:

> On Wed, 5 Nov 2003, Zwane Mwaikambo wrote:
>
> > This patch addresses bugzilla bug#1487
> > http://bugme.osdl.org/show_bug.cgi?id=1487
> >
> > We're disabling the IOAPIC when someone boots with the nosmp kernel
> > parameter, this happens to break interrupt routing for some folks.
>
> I object -- that's a feature. Use "maxcpus=1" instead of "nosmp" or
> "maxcpus=0" (which is an equivalent) to keep APICs enabled with a single
> CPU running.

Nick does maxcpus=1 work for you?

2003-11-07 22:42:25

by Maciej W. Rozycki

[permalink] [raw]
Subject: Re: [PATCH][2.6] Don't disable IOAPIC with nosmp

On Wed, 5 Nov 2003, Zwane Mwaikambo wrote:

> This patch addresses bugzilla bug#1487
> http://bugme.osdl.org/show_bug.cgi?id=1487
>
> We're disabling the IOAPIC when someone boots with the nosmp kernel
> parameter, this happens to break interrupt routing for some folks.

I object -- that's a feature. Use "maxcpus=1" instead of "nosmp" or
"maxcpus=0" (which is an equivalent) to keep APICs enabled with a single
CPU running.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [email protected], PGP key available +