public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG 2.4] INT_SRC_OVR information is lost
@ 2004-05-12 17:08 Sergey Vlasov
  0 siblings, 0 replies; only message in thread
From: Sergey Vlasov @ 2004-05-12 17:08 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 3285 bytes --]

Hello!

Trying to run 2.4.26 with the ACPI patch
(http://www.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.4.26/acpi-20040326-2.4.26.diff.bz2),
I got this:

..TIMER: vector=0x31 pin1=0 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...  failed.
...trying to set up timer as Virtual Wire IRQ... failed.
...trying to set up timer as ExtINT IRQ... works.


Previous versions (and 2.4.26 without the ACPI patch) did not have any
problems with the APIC timer on this machine:

..TIMER: vector=0x31 pin1=2 pin2=-1
Using local APIC timer interrupts.

Note that the pin1 value is different - no wonder that with pin1=0 the
APIC timer does not work.

I have tracked this down to a bug introduced by this changeset:

http://linux.bkbits.net:8080/linux-2.4/cset-/MfijFki0w/FbKanZc64klQ35bramzZVgttLm9hokYQ@public.gmane.org
[ACPI] enhance intr-src-override parsing to handle ES7000
http://bugme.osdl.org/show_bug.cgi?id=2520

This patch moves the call to mp_config_acpi_legacy_irqs() later -
after parsing MADT and getting INT_SRC_OVR from there.  However, in
2.4.x mp_config_acpi_legacy_irqs() allocates the memory for the MP
tables and initialises mp_irqs, so the changes made before calling it
are lost (and I'm not sure where they end up in the memory...).

This problem is 2.4.x-specific (in 2.6.x mp_irqs and other related
data is not dynamically allocated).

The following patch fixes the problem by splitting
mp_config_acpi_legacy_irqs() into two functions and allocating the MP
table data before it is filled.


--- kernel-source-2.4.26/include/asm-i386/mpspec.h.acpi-madt-fix	2004-05-11 15:22:38 +0400
+++ kernel-source-2.4.26/include/asm-i386/mpspec.h	2004-05-12 15:19:02 +0400
@@ -226,6 +226,7 @@ extern void mp_register_lapic_address (u
 #ifdef CONFIG_X86_IO_APIC
 extern void mp_register_ioapic (u8 id, u32 address, u32 irq_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 global_irq);
+extern void mp_config_acpi_init (void);
 extern void mp_config_acpi_legacy_irqs (void);
 extern void mp_parse_prt (void);
 #endif /*!CONFIG_X86_IO_APIC*/
--- kernel-source-2.4.26/arch/i386/kernel/mpparse.c.acpi-madt-fix	2004-05-11 15:14:46 +0400
+++ kernel-source-2.4.26/arch/i386/kernel/mpparse.c	2004-05-12 15:19:02 +0400
@@ -1148,10 +1148,9 @@ void __init mp_override_legacy_irq (
 }
 
 
-void __init mp_config_acpi_legacy_irqs (void)
+void __init mp_config_acpi_init (void)
 {
-	int			i = 0;
-	int			ioapic = -1;
+	int i;
 
 	/*
 	 * Initialize mp_irqs for IRQ configuration.
@@ -1178,6 +1177,12 @@ void __init mp_config_acpi_legacy_irqs (
 	 */
 	mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA;
 	Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
+}
+
+void __init mp_config_acpi_legacy_irqs (void)
+{
+	int i;
+	int ioapic;
 
 	/* 
 	 * Locate the IOAPIC that manages the ISA IRQs (0-15). 
--- kernel-source-2.4.26/arch/i386/kernel/acpi.c.acpi-madt-fix	2004-05-11 15:14:46 +0400
+++ kernel-source-2.4.26/arch/i386/kernel/acpi.c	2004-05-12 15:19:02 +0400
@@ -543,6 +543,8 @@ acpi_boot_init (void)
 		return result;
 	}
 
+	mp_config_acpi_init();
+
 	/* Record sci_int for use when looking for MADT sci_int override */
 	acpi_table_parse(ACPI_FADT, acpi_parse_fadt);
 


-- 
Sergey Vlasov

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-12 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-12 17:08 [BUG 2.4] INT_SRC_OVR information is lost Sergey Vlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox