2003-08-21 16:14:42

by Jeff Garzik

[permalink] [raw]
Subject: [PATCH] 'noapic' already handled elsewhere

I sent a previous patch to s/LOCAL_APIC/IO_APIC/, as Zwane noticed
my first patch needed that. In that patch, I commented __setup()
would be better.

Well... line 718 of arch/i386/kernel/io_apic.c _already_ handles this
case, using __setup() properly.

Word of warning... patch only compile tested, but seems obvious from
looking at io_apic.c.

BTW, why isn't ACPI using __setup() as well? I don't see that ACPI
needs to patch arch/i386/kernel/setup.c at all.


===== arch/i386/kernel/setup.c 1.94 vs edited =====
--- 1.94/arch/i386/kernel/setup.c Thu Aug 21 01:32:04 2003
+++ edited/arch/i386/kernel/setup.c Thu Aug 21 12:09:13 2003
@@ -544,12 +544,6 @@
if (!acpi_force) acpi_disabled = 1;
}

-#ifdef CONFIG_X86_LOCAL_APIC
- /* disable IO-APIC */
- else if (!memcmp(from, "noapic", 6)) {
- skip_ioapic_setup = 1;
- }
-#endif /* CONFIG_X86_LOCAL_APIC */
#endif /* CONFIG_ACPI_BOOT */

/*


2003-08-21 17:12:09

by Brown, Len

[permalink] [raw]
Subject: RE: [PATCH] 'noapic' already handled elsewhere

Jeff,
This won't work.
acpi_boot_init() is called from setup_arch(), which is called from
start_kernel() _before_ parse_options(). Ie. ACPI needs to consume this
flag before __setup() is invoked.

-Len

> -----Original Message-----
> From: Jeff Garzik [mailto:[email protected]]
> Sent: Thursday, August 21, 2003 12:15 PM
> To: [email protected]
> Cc: Brown, Len; Grover, Andrew; [email protected];
> [email protected]
> Subject: [PATCH] 'noapic' already handled elsewhere
>
>
> I sent a previous patch to s/LOCAL_APIC/IO_APIC/, as Zwane noticed
> my first patch needed that. In that patch, I commented __setup()
> would be better.
>
> Well... line 718 of arch/i386/kernel/io_apic.c _already_ handles this
> case, using __setup() properly.
>
> Word of warning... patch only compile tested, but seems obvious from
> looking at io_apic.c.
>
> BTW, why isn't ACPI using __setup() as well? I don't see that ACPI
> needs to patch arch/i386/kernel/setup.c at all.
>
>
> ===== arch/i386/kernel/setup.c 1.94 vs edited =====
> --- 1.94/arch/i386/kernel/setup.c Thu Aug 21 01:32:04 2003
> +++ edited/arch/i386/kernel/setup.c Thu Aug 21 12:09:13 2003
> @@ -544,12 +544,6 @@
> if (!acpi_force) acpi_disabled = 1;
> }
>
> -#ifdef CONFIG_X86_LOCAL_APIC
> - /* disable IO-APIC */
> - else if (!memcmp(from, "noapic", 6)) {
> - skip_ioapic_setup = 1;
> - }
> -#endif /* CONFIG_X86_LOCAL_APIC */
> #endif /* CONFIG_ACPI_BOOT */
>
> /*
>

2003-08-21 21:11:46

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] 'noapic' already handled elsewhere

Brown, Len wrote:
> Jeff,
> This won't work.
> acpi_boot_init() is called from setup_arch(), which is called from
> start_kernel() _before_ parse_options(). Ie. ACPI needs to consume this
> flag before __setup() is invoked.


Thanks for the correction. I'll resend the earlier
s/LOCAL_APIC/IO_APIC/ patch then.

Just found another ACPI bug in 2.6:

> config ACPI_HT
> bool "ACPI Processor Enumeration for HT"
> depends on (X86 && X86_LOCAL_APIC)
> default y
[...]
> config ACPI
> bool "Full ACPI Support"
> depends on !X86_VISWS
> depends on !IA64_HP_SIM
> depends on IA64 || (X86 && ACPI_HT)


So CONFIG_ACPI is not allowed on uniprocessor anymore, _and_ it requires
HyperThreading code? ;-) No wonder CONFIG_ACPI didn't appear for my
uniprocessor Pentium3 'make oldconfig' ;-)

(ACPI requires ACPI_HT, which requires LOCAL_APIC)

Another reason why I was saying that CONFIG_ACPI should be the toplevel
config option (even if CONFIG_ACPI never actually appears in any code,
but only in Kconfig)...

Jeff



2003-08-21 21:34:27

by Brown, Len

[permalink] [raw]
Subject: RE: [PATCH] 'noapic' already handled elsewhere

Re: config
Yes, I fixed this they way you suggested yesterday, both in 2.4 and 2.6.
The 2.4 tree is being tested, and the 2.6 patch is being buttoned up
now.


Thanks,
-Len

Ps I sent a note on this to acpi-devel yesterday, but just got a
message from "Mail Delivery System [[email protected]]" that
my message has been waiting to go out for over 8 hours...


> -----Original Message-----
> From: Jeff Garzik [mailto:[email protected]]
> Sent: Thursday, August 21, 2003 5:11 PM
> To: Brown, Len
> Cc: [email protected]; Grover, Andrew; [email protected];
> [email protected]
> Subject: Re: [PATCH] 'noapic' already handled elsewhere
>
>
> Brown, Len wrote:
> > Jeff,
> > This won't work.
> > acpi_boot_init() is called from setup_arch(), which is called from
> > start_kernel() _before_ parse_options(). Ie. ACPI needs to
> consume this
> > flag before __setup() is invoked.
>
>
> Thanks for the correction. I'll resend the earlier
> s/LOCAL_APIC/IO_APIC/ patch then.
>
> Just found another ACPI bug in 2.6:
>
> > config ACPI_HT
> > bool "ACPI Processor Enumeration for HT"
> > depends on (X86 && X86_LOCAL_APIC)
> > default y
> [...]
> > config ACPI
> > bool "Full ACPI Support"
> > depends on !X86_VISWS
> > depends on !IA64_HP_SIM
> > depends on IA64 || (X86 && ACPI_HT)
>
>
> So CONFIG_ACPI is not allowed on uniprocessor anymore, _and_
> it requires
> HyperThreading code? ;-) No wonder CONFIG_ACPI didn't appear for my
> uniprocessor Pentium3 'make oldconfig' ;-)
>
> (ACPI requires ACPI_HT, which requires LOCAL_APIC)
>
> Another reason why I was saying that CONFIG_ACPI should be
> the toplevel
> config option (even if CONFIG_ACPI never actually appears in
> any code,
> but only in Kconfig)...
>
> Jeff
>
>
>
>