Early serial console setup regression
Hi David,
I already discussed this problem with Bjorn yesterday (see below email). Please consider applying the fix.
Thanks,
Gary
Signature · 55 lines
Gary Hade IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 [email protected] http://www.ibm.com/linux/ltc ia64: Fix early serial console setup regression on the IBM x450 and x455. This patch removes the ACPI LEGACY_DEVICES IA-PC boot architecture flag as a condition for early serial console setup. This flag may not be set on some systems (e.g. IBM x450 and x455) where early serial console setup is possible. Signed-off-by: Gary Hade <[email protected]> --- linux-2.6.6/arch/ia64/kernel/setup.c.orig 2004-06-03 13:11:05.151519371 -0700 +++ linux-2.6.6/arch/ia64/kernel/setup.c 2004-06-03 14:35:40.278410326 -0700 @@ -330,16 +330,9 @@ setup_arch (char **cmdline_p) setup_serial_hcdp(efi.hcdp); } #endif - /* - * Without HCDP, we won't discover any serial ports until the serial driver looks - * in the ACPI namespace. If ACPI claims there are some legacy devices, register - * the legacy COM ports so serial console works earlier. This is slightly dangerous - * because we don't *really* know whether there's anything there, but we hope that - * all new boxes will implement HCDP. - */ { extern unsigned char acpi_legacy_devices; - if (!efi.hcdp && acpi_legacy_devices) + if (!efi.hcdp) setup_serial_legacy(); } #endif ----- Forwarded message from Bjorn Helgaas <[email protected]> ----- From: Bjorn Helgaas <[email protected]> To: Gary Hade <[email protected]> Subject: Re: Early serial console setup problem Cc: [email protected] Date: Thu, 3 Jun 2004 16:20:59 -0600 X-Sieve: CMU Sieve 2.2 User-Agent: KMail/1.6.2 In-Reply-To: <[email protected]> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on imap.raleigh.ibm.com X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Level:
Quoted 11 lines · Gary Hade
We are seeing a problem on our IBM ia64 systems where
setup_serial_legacy()is not being called becauseacpi_legacy_devices= 0. This causes KDB initialization to fail.At first, I thought that we might have a BIOS problem but after studying the ACPI specification description of the
LEGACY_DEVICESIA-PC boot architecture flag it is not clear that this flag is required to be set if all devices on the system can "be detected exclusively via industry standard device enumeration mechanisms".
Right. The spec is very vague on what that bit means.
Quoted 2 lines
What are your thoughts on the use of the
LEGACY_DEVICESbit? Do you see any problem with the below change?
I think it's so ill-defined as to be not worth looking at. I asked for clarification in the ACPI 3.0 spec, but that'll probably be too little, too late. Your patch looks reasonable to me.
I would encourage you to take a look at the HCDP/PCDP spec and consider supporting that in future firmware.
http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf
Quoted 11 lines
arch/ia64/kernel/setup.c renamed from arch/ia64/kernel/setup.c.orig +0
-4@@ -330,16 +330,9 @@ setup_arch (char **cmdline_p) setup_serial_hcdp(efi.hcdp); }#endif -/* -* Without HCDP, we won't discover any serial ports until the serial driver looks -* in the ACPI namespace. If ACPI claims there are some legacy devices, register -* the legacy COM ports so serial console works earlier. This is slightly dangerous
arch/ia64/kernel/setup.c setup_arch (char **cmdline_p) · line 338
Quoted 10 lines
arch/ia64/kernel/setup.c renamed from arch/ia64/kernel/setup.c.orig +1
-4-* because we don't *really* know whether there's anything there, but we hope that -* all new boxes will implement HCDP. -*/ {extern unsigned char acpi_legacy_devices; -if (!efi.hcdp && acpi_legacy_devices) +if (!efi.hcdp)setup_serial_legacy (); }#endif
----- End forwarded message -----
Review
Quoted 13 lines · Gary Hade
(quoted diff) +1
-8- /* - * Without HCDP, we won't discover any serial ports until the serial driver looks - * in the ACPI namespace. If ACPI claims there are some legacy devices, register - * the legacy COM ports so serial console works earlier. This is slightly dangerous - * because we don't *really* know whether there's anything there, but we hope that - * all new boxes will implement HCDP. - */ { extern unsigned char acpi_legacy_devices; - if (!efi.hcdp && acpi_legacy_devices) + if (!efi.hcdp) setup_serial_legacy(); }
Don't you also want to delete the " extern unsigned char acpi_legacy_devices;" line?
Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain
Quoted 17 lines · Matthew Wilcox
Review
Quoted 13 lines · Gary Hade
(quoted diff) +1
-8- /* - * Without HCDP, we won't discover any serial ports until the serial driver looks - * in the ACPI namespace. If ACPI claims there are some legacy devices, register - * the legacy COM ports so serial console works earlier. This is slightly dangerous - * because we don't *really* know whether there's anything there, but we hope that - * all new boxes will implement HCDP. - */ { extern unsigned char acpi_legacy_devices; - if (!efi.hcdp && acpi_legacy_devices) + if (!efi.hcdp) setup_serial_legacy(); }Don't you also want to delete the " extern unsigned char
acpi_legacy_devices;" line?
Yes. David Mosberger also noticed this and fixed it. Thanks for pointing it out.
Gary
Signature · 5 lines
Gary Hade IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 [email protected] http://www.ibm.com/linux/ltc