* RE: [bug] endless loop in arch/i386/kernel/mpparse.c
@ 2002-09-29 21:32 Grover, Andrew
[not found] ` <EDC461A30AC4D511ADE10002A5072CAD0236DED9-OU+JdkIUtvd9zuciVAfUoVDQ4js95KgL@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Grover, Andrew @ 2002-09-29 21:32 UTC (permalink / raw)
To: 'Bjoern A. Zeeb', Linus Torvalds
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Well I actually wrote that patch, so any bugs are my fault...
> From: Bjoern A. Zeeb [mailto:bzeeb-lists-mt/InyFV0sMN6vK3N8ee0qxOck334EZe@public.gmane.org]
> On boot time the kernel "hangs" (log down under).
> This problem was reported on lkml without more details (i.e. any
> specific code where the kernel "hangs") too.
> The point is that the loop for some reason is endless.
> Can anybody fix that please ? As this core code and I am not going
> to touch it ;-)
You're the first one to report a problem with this code, so you are in the
best position to maybe diagnose this one a little more, and possibly fix
it...the code looks fine to me but maybe I'm too close to it.
Regards -- Andy
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [bug] endless loop in arch/i386/kernel/mpparse.c
@ 2002-09-30 17:59 Grover, Andrew
0 siblings, 0 replies; 6+ messages in thread
From: Grover, Andrew @ 2002-09-30 17:59 UTC (permalink / raw)
To: 'Bjoern A. Zeeb', Matthew Wilcox
Cc: Linus Torvalds, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> From: Bjoern A. Zeeb [mailto:bzeeb-lists-mt/InyFV0sMN6vK3N8ee0qxOck334EZe@public.gmane.org]
> > buggy MADT, but let's not _crash_ when the vendor provides
> a shit BIOS.
>
> the other thing that I was thinking of is: entry is icremented by 8
> but to reach madt_end we need to do another 494 increments. As I am
> not really in that code I ask myself what is in that struct. If I
> remember correctly 309 objects, ... were found; far not that much ...
> (assumtion that we walk through them).
> This, with the entry->header.length being zero I think (repeating
> myself) madt_end may be wrong ?
I cribbed this code from table.c acpi_table_parse_madt_family, which works
fine.
Some change must have screwed something up for this to be hanging...
Regards -- Andy
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug] endless loop in arch/i386/kernel/mpparse.c
@ 2002-09-29 19:27 Bjoern A. Zeeb
[not found] ` <Pine.BSF.4.44.0209292102340.427-100000-pDROZl1FiGxrJICXbmAK0A3q8rc3x57SrE5yTffgRl4@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Bjoern A. Zeeb @ 2002-09-29 19:27 UTC (permalink / raw)
To: Linus Torvalds; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi Linus,
with
D 1.21 02/09/26 16:01:50-07:00 torvalds-NOXD9LnmIcc+KpMpn4J55tBPR1lH4CV8@public.gmane.org 43 42 00029/00000/01101
P arch/i386/kernel/mpparse.c
C Make the ACPI SCI interrupt get the right polarity
C when it is explicitly overridden in the MADT
you merged in following code where I added a printk:
===== mpparse.c 1.20 vs 1.21 =====
--- 1.20/arch/i386/kernel/mpparse.c Fri Sep 20 01:14:32 2002
+++ 1.21/arch/i386/kernel/mpparse.c Thu Sep 26 23:01:50 2002
@@ -1019,10 +1019,39 @@
/* Ensure the ACPI SCI interrupt level is active low, edge-triggered */
+extern FADT_DESCRIPTOR acpi_fadt;
+
void __init mp_config_ioapic_for_sci(int irq)
{
int ioapic;
int ioapic_pin;
+ struct acpi_table_madt *madt;
+ struct acpi_table_int_src_ovr *entry = NULL;
+ void *madt_end;
+ acpi_status status;
+
+ /*
+ * Ensure that if there is an interrupt source override entry
+ * for the ACPI SCI, we leave it as is. Unfortunately this involves
+ * walking the MADT again.
+ */
+ status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
+ (acpi_table_header **) &madt);
+ if (ACPI_SUCCESS(status)) {
+ madt_end = madt + madt->header.length;
+
+ entry = (struct acpi_table_int_src_ovr *)
+ ((unsigned long) madt + sizeof(struct acpi_table_madt));
+
+ while ((void *) entry < madt_end) {
printk("[%s:%s:%d] madt_end=%p, entry=%p\n",
__FILE__, __func__, __LINE__, madt_end, entry);
+ if (entry->header.type == ACPI_MADT_INT_SRC_OVR &&
+ acpi_fadt.sci_int == entry->global_irq)
+ return;
+
+ entry = (struct acpi_table_int_src_ovr *)
+ ((unsigned long) entry + entry->header.length);
+ }
+ }
ioapic = mp_find_ioapic(irq);
=== end ===
On boot time the kernel "hangs" (log down under).
This problem was reported on lkml without more details (i.e. any
specific code where the kernel "hangs") too.
The point is that the loop for some reason is endless.
Can anybody fix that please ? As this core code and I am not going
to touch it ;-)
simply #if 0ing out the above diff the kernel comes up fine.
--- boot log excerpt ---
...
PCI: PCI BIOS revision 2.10 entry at 0xfdb91, last bus=1
PCI: Using configuration type 1
ACPI: Subsystem revision 20020918
tbxface-0099 [03] Acpi_load_tables : ACPI Tables successfully loaded
Parsing Methods:......................................................................................................
Table [DSDT] - 309 Objects with 22 Devices 102 Methods 19 Regions
ACPI Namespace successfully loaded at root c03a741c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d88070dc
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d88070e4
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d88070ec
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d88070f8
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d8807102
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
[mpparse.c:mp_config_ioapic_for_sci:1047] madt_end=d8808080, entry=d880710c
...
...
...
--- end ---
If you need further information or testing please let me know.
Thanks i advance.
--
Greetings
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
56 69 73 69 74 http://www.zabbadoz.net/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-30 17:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-29 21:32 [bug] endless loop in arch/i386/kernel/mpparse.c Grover, Andrew
[not found] ` <EDC461A30AC4D511ADE10002A5072CAD0236DED9-OU+JdkIUtvd9zuciVAfUoVDQ4js95KgL@public.gmane.org>
2002-09-29 22:30 ` Ernst Herzberg
-- strict thread matches above, loose matches on Subject: below --
2002-09-30 17:59 Grover, Andrew
2002-09-29 19:27 Bjoern A. Zeeb
[not found] ` <Pine.BSF.4.44.0209292102340.427-100000-pDROZl1FiGxrJICXbmAK0A3q8rc3x57SrE5yTffgRl4@public.gmane.org>
2002-09-29 22:35 ` Matthew Wilcox
[not found] ` <20020929233532.H18377-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2002-09-30 5:41 ` Bjoern A. Zeeb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox