Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] Lasat: Fix overlap of interrupt number ranges.

The range of MIPS_CPU IRQ and the range of LASAT IRQ overlap.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Yoichi Yuasa and committed by
Ralf Baechle
89becf5c fcee3faf

+44 -28
+14 -8
arch/mips/lasat/interrupt.c
··· 19 19 * Lasat boards. 20 20 */ 21 21 #include <linux/init.h> 22 - #include <linux/irq.h> 23 - #include <linux/sched.h> 24 - #include <linux/slab.h> 25 22 #include <linux/interrupt.h> 26 - #include <linux/kernel_stat.h> 23 + #include <linux/irq.h> 27 24 28 25 #include <asm/bootinfo.h> 29 26 #include <asm/irq_cpu.h> 30 27 #include <asm/lasat/lasatint.h> 31 - #include <asm/time.h> 32 - #include <asm/gdb-stub.h> 28 + 29 + #include <irq.h> 33 30 34 31 static volatile int *lasat_int_status; 35 32 static volatile int *lasat_int_mask; ··· 94 97 95 98 /* if int_status == 0, then the interrupt has already been cleared */ 96 99 if (int_status) { 97 - irq = LASATINT_BASE + ls1bit32(int_status); 100 + irq = LASAT_IRQ_BASE + ls1bit32(int_status); 98 101 99 102 do_IRQ(irq); 100 103 } 101 104 } 105 + 106 + static struct irqaction cascade = { 107 + .handler = no_action, 108 + .mask = CPU_MASK_NONE, 109 + .name = "cascade", 110 + }; 102 111 103 112 void __init arch_init_irq(void) 104 113 { ··· 130 127 } 131 128 132 129 mips_cpu_irq_init(); 133 - for (i = LASATINT_BASE; i <= LASATINT_END; i++) 130 + 131 + for (i = LASAT_IRQ_BASE; i <= LASAT_IRQ_END; i++) 134 132 set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq); 133 + 134 + setup_irq(LASAT_CASCADE_IRQ, &cascade); 135 135 }
+17 -15
arch/mips/pci/pci-lasat.c
··· 5 5 * 6 6 * Copyright (C) 2000, 2001, 04 Keith M Wesolowski 7 7 */ 8 - #include <linux/kernel.h> 9 8 #include <linux/init.h> 9 + #include <linux/kernel.h> 10 10 #include <linux/pci.h> 11 11 #include <linux/types.h> 12 + 12 13 #include <asm/bootinfo.h> 13 - #include <asm/lasat/lasatint.h> 14 + 15 + #include <irq.h> 14 16 15 17 extern struct pci_ops nile4_pci_ops; 16 18 extern struct pci_ops gt64xxx_pci0_ops; ··· 57 55 58 56 arch_initcall(lasat_pci_setup); 59 57 60 - #define LASATINT_ETH1 (LASATINT_BASE + 0) 61 - #define LASATINT_ETH0 (LASATINT_BASE + 1) 62 - #define LASATINT_HDC (LASATINT_BASE + 2) 63 - #define LASATINT_COMP (LASATINT_BASE + 3) 64 - #define LASATINT_HDLC (LASATINT_BASE + 4) 65 - #define LASATINT_PCIA (LASATINT_BASE + 5) 66 - #define LASATINT_PCIB (LASATINT_BASE + 6) 67 - #define LASATINT_PCIC (LASATINT_BASE + 7) 68 - #define LASATINT_PCID (LASATINT_BASE + 8) 58 + #define LASAT_IRQ_ETH1 (LASAT_IRQ_BASE + 0) 59 + #define LASAT_IRQ_ETH0 (LASAT_IRQ_BASE + 1) 60 + #define LASAT_IRQ_HDC (LASAT_IRQ_BASE + 2) 61 + #define LASAT_IRQ_COMP (LASAT_IRQ_BASE + 3) 62 + #define LASAT_IRQ_HDLC (LASAT_IRQ_BASE + 4) 63 + #define LASAT_IRQ_PCIA (LASAT_IRQ_BASE + 5) 64 + #define LASAT_IRQ_PCIB (LASAT_IRQ_BASE + 6) 65 + #define LASAT_IRQ_PCIC (LASAT_IRQ_BASE + 7) 66 + #define LASAT_IRQ_PCID (LASAT_IRQ_BASE + 8) 69 67 70 68 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 71 69 { ··· 73 71 case 1: 74 72 case 2: 75 73 case 3: 76 - return LASATINT_PCIA + (((slot-1) + (pin-1)) % 4); 74 + return LASAT_IRQ_PCIA + (((slot-1) + (pin-1)) % 4); 77 75 case 4: 78 - return LASATINT_ETH1; /* Ethernet 1 (LAN 2) */ 76 + return LASAT_IRQ_ETH1; /* Ethernet 1 (LAN 2) */ 79 77 case 5: 80 - return LASATINT_ETH0; /* Ethernet 0 (LAN 1) */ 78 + return LASAT_IRQ_ETH0; /* Ethernet 0 (LAN 1) */ 81 79 case 6: 82 - return LASATINT_HDC; /* IDE controller */ 80 + return LASAT_IRQ_HDC; /* IDE controller */ 83 81 default: 84 82 return 0xff; /* Illegal */ 85 83 }
-5
include/asm-mips/lasat/lasatint.h
··· 1 1 #ifndef __ASM_LASAT_LASATINT_H 2 2 #define __ASM_LASAT_LASATINT_H 3 3 4 - #include <linux/irq.h> 5 - 6 - #define LASATINT_BASE MIPS_CPU_IRQ_BASE 7 - #define LASATINT_END (LASATINT_BASE + 16) 8 - 9 4 /* lasat 100 */ 10 5 #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) 11 6 #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000))
+13
include/asm-mips/mach-lasat/irq.h
··· 1 + #ifndef _ASM_MACH_LASAT_IRQ_H 2 + #define _ASM_MACH_LASAT_IRQ_H 3 + 4 + #define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) 5 + 6 + #define LASAT_IRQ_BASE 8 7 + #define LASAT_IRQ_END 23 8 + 9 + #define NR_IRQS 24 10 + 11 + #include_next <irq.h> 12 + 13 + #endif /* _ASM_MACH_LASAT_IRQ_H */