Skip to contentSkip to conversation

Allow OpenPIC irq 0 to be used

PATCH In review Val Henson 1 participant 2 messages Apr 15, 2002 – Apr 16, 2002

lore
Share & tools
lore

Val Henson

author
#0 lore raw

PATCH 1/1 Allow OpenPIC irq 0 to be used

Synergy boards do not have an i8259 hooked up to irq 0, instead we actually use it as a normal irq line. Yes, I know, bad idea, but we're stuck with it. The following patch is ugly, but illustrates the general idea in a way which might possibly be compatible with other OpenPIC boards.

-VAL

===== arch/ppc/kernel/open_pic.c 1.47 vs edited =====

arch/ppc/kernel/open_pic.c +1 -1
@@ -366,7 +366,7 @@
 	}
 
 	/* Init all external sources */
-	for (i = 1; i < NumSources; i++) {
+	for (i = offset ? 1 : 0; i < NumSources; i++) {
 		int pri, sense;
 
 		if (ISR[i] == 0)

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

author
#1 lore raw

Hm, in retrospect, I didn't state the actual bug very clearly. On Synergy boards, devices can't get interrupts on irq 0 because it is never initialized. This patch fixes that, hopefully without introducing bugs in other boards.

-VAL

Quoted 14 lines · Val Henson

Synergy boards do not have an i8259 hooked up to irq 0, instead we actually use it as a normal irq line. Yes, I know, bad idea, but we're stuck with it. The following patch is ugly, but illustrates the general idea in a way which might possibly be compatible with other OpenPIC boards.

-VAL

===== arch/ppc/kernel/open_pic.c 1.47 vs edited =====

arch/ppc/kernel/open_pic.c line 372

Quoted 8 lines
arch/ppc/kernel/open_pic.c +1 -1
@@ -366,7 +366,7 @@
 	}
 
 	/* Init all external sources */
-	for (i = 1; i < NumSources; i++) {
+	for (i = offset ? 1 : 0; i < NumSources; i++) {
 		int pri, sense;
 
 		if (ISR[i] == 0)

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/