Skip to contentSkip to conversation

2.2 and AMD-760MP I/O APIC

PATCH Johannes Erdfelt 2 participants 2 messages Mar 16, 2001

lore
Share & tools
lore
#0 lore raw

The I/O APIC code for 2.2 contains a little trick which sets the destination to 0 to disable an I/O APIC entry. This apparently trips up the I/O APIC on AMD-760MP systems causing a lockup during boot.

This patch removes that trick in favor of doing what 2.4 does, masking out the entries.

This patch is relative to 2.2.18, but should apply cleanly to 2.2.19-pre since -pre17 doesn't touch this code at all.

JE

arch/i386/kernel/io_apic.c +4 -9
@@ -200,8 +200,6 @@
  * We disable IO-APIC IRQs by setting their 'destination CPU mask' to
  * zero. Trick by Ramesh Nalluri.
  */
-DO_ACTION( disable, 1, &= 0x00ffffff, io_apic_sync(entry->apic))/* destination = 0x00 */
-DO_ACTION( enable,  1, |= 0xff000000, )				/* destination = 0xff */
 DO_ACTION( mask,    0, |= 0x00010000, io_apic_sync(entry->apic))/* mask = 1 */
 DO_ACTION( unmask,  0, &= 0xfffeffff, )				/* mask = 0 */
 
@@ -612,7 +610,7 @@
 		entry.delivery_mode = dest_LowestPrio;
 		entry.dest_mode = 1;			/* logical delivery */
 		entry.mask = 0;				/* enable IRQ */
-		entry.dest.logical.logical_dest = 0;	/* but no route */
+		entry.dest.logical.logical_dest = 0xff;	/* but no route */
 
 		idx = find_irq_entry(apic,pin,mp_INT);
 		if (idx == -1) {
@@ -1017,13 +1015,10 @@
 static void enable_edge_ioapic_irq(unsigned int irq)
 {
 	self_IPI(irq);
-	enable_IO_APIC_irq(irq);
+	unmask_IO_APIC_irq(irq);
 }
 
-static void disable_edge_ioapic_irq(unsigned int irq)
-{
-	disable_IO_APIC_irq(irq);
-}
+static void disable_edge_ioapic_irq(unsigned int irq) { /* nothing */ }
 
 /*
  * Starting up a edge-triggered IO-APIC interrupt is
@@ -1239,7 +1234,7 @@
 
 	pin1 = find_timer_pin(mp_INT);
 	pin2 = find_timer_pin(mp_ExtINT);
-	enable_IO_APIC_irq(0);
+	unmask_IO_APIC_irq(0);
 	if (!timer_irq_works()) {
 
 		if (pin1 != -1)
#1 lore raw
Quoted 3 lines · Johannes Erdfelt

The I/O APIC code for 2.2 contains a little trick which sets the destination to 0 to disable an I/O APIC entry. This apparently trips up the I/O APIC on AMD-760MP systems causing a lockup during boot.

[snip]

I'd love you test your patch! What does it take to become equipt with such a motherboard? <snicker>