Commit f4d4c354bca18210296cc0a8f592c0cdb720bf20

Authored by Benjamin Herrenschmidt
Committed by Paul Mackerras
1 parent f49196a5f5

[POWERPC] Fix CHRP platforms with only 8259

On CHRP platforms with only a 8259 controller, we should set the
default IRQ host to the 8259 driver's one for the IRQ probing
fallbacks to work in case the IRQ tree is incorrect (like on
Pegasos for example). Without this fix, we get a bunch of WARN_ON's
during boot.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Showing 3 changed files with 9 additions and 1 deletions Side-by-side Diff

arch/powerpc/platforms/chrp/setup.c
... ... @@ -477,8 +477,10 @@
477 477 " address, polling\n");
478 478  
479 479 i8259_init(pic, chrp_int_ack);
480   - if (ppc_md.get_irq == NULL)
  480 + if (ppc_md.get_irq == NULL) {
481 481 ppc_md.get_irq = i8259_irq;
  482 + irq_set_default_host(i8259_get_host());
  483 + }
482 484 if (chrp_mpic != NULL) {
483 485 cascade_irq = irq_of_parse_and_map(pic, 0);
484 486 if (cascade_irq == NO_IRQ)
arch/powerpc/sysdev/i8259.c
... ... @@ -224,6 +224,11 @@
224 224 .xlate = i8259_host_xlate,
225 225 };
226 226  
  227 +struct irq_host *i8259_get_host(void)
  228 +{
  229 + return i8259_host;
  230 +}
  231 +
227 232 /**
228 233 * i8259_init - Initialize the legacy controller
229 234 * @node: device node of the legacy PIC (can be NULL, but then, it will match
include/asm-powerpc/i8259.h
... ... @@ -7,6 +7,7 @@
7 7 #ifdef CONFIG_PPC_MERGE
8 8 extern void i8259_init(struct device_node *node, unsigned long intack_addr);
9 9 extern unsigned int i8259_irq(void);
  10 +extern struct irq_host *i8259_get_host(void);
10 11 #else
11 12 extern void i8259_init(unsigned long intack_addr, int offset);
12 13 extern int i8259_irq(void);