diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/Kconfig | 10 | ||||
-rw-r--r-- | arch/m68k/amiga/amiints.c | 114 | ||||
-rw-r--r-- | arch/m68k/apollo/dn_ints.c | 22 | ||||
-rw-r--r-- | arch/m68k/include/asm/irq.h | 63 | ||||
-rw-r--r-- | arch/m68k/include/asm/q40ints.h | 5 | ||||
-rw-r--r-- | arch/m68k/kernel/Makefile | 10 | ||||
-rw-r--r-- | arch/m68k/kernel/ints.c | 297 | ||||
-rw-r--r-- | arch/m68k/mac/baboon.c | 41 | ||||
-rw-r--r-- | arch/m68k/mac/oss.c | 78 | ||||
-rw-r--r-- | arch/m68k/mac/psc.c | 44 | ||||
-rw-r--r-- | arch/m68k/mac/via.c | 104 | ||||
-rw-r--r-- | arch/m68k/q40/q40ints.c | 16 | ||||
-rw-r--r-- | arch/m68k/sun3/sun3ints.c | 20 |
13 files changed, 4 insertions, 820 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 06198ced2245..361d54019bb0 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -4,8 +4,8 @@ config M68K | |||
4 | select HAVE_IDE | 4 | select HAVE_IDE |
5 | select HAVE_AOUT if MMU | 5 | select HAVE_AOUT if MMU |
6 | select GENERIC_ATOMIC64 if MMU | 6 | select GENERIC_ATOMIC64 if MMU |
7 | select HAVE_GENERIC_HARDIRQS if !MMU | 7 | select HAVE_GENERIC_HARDIRQS |
8 | select GENERIC_IRQ_SHOW if !MMU | 8 | select GENERIC_IRQ_SHOW |
9 | select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS | 9 | select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS |
10 | 10 | ||
11 | config RWSEM_GENERIC_SPINLOCK | 11 | config RWSEM_GENERIC_SPINLOCK |
@@ -84,12 +84,6 @@ config MMU_SUN3 | |||
84 | bool | 84 | bool |
85 | depends on MMU && !MMU_MOTOROLA | 85 | depends on MMU && !MMU_MOTOROLA |
86 | 86 | ||
87 | config USE_GENERIC_HARDIRQS | ||
88 | bool "Use genirq" | ||
89 | depends on MMU | ||
90 | select HAVE_GENERIC_HARDIRQS | ||
91 | select GENERIC_IRQ_SHOW | ||
92 | |||
93 | menu "Platform setup" | 87 | menu "Platform setup" |
94 | 88 | ||
95 | source arch/m68k/Kconfig.cpu | 89 | source arch/m68k/Kconfig.cpu |
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index a8da47126584..47b5f90002ab 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
@@ -9,9 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
13 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
14 | #endif | ||
15 | 13 | ||
16 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
17 | #include <asm/traps.h> | 15 | #include <asm/traps.h> |
@@ -48,7 +46,6 @@ static struct irq_chip amiga_irq_chip = { | |||
48 | * The builtin Amiga hardware interrupt handlers. | 46 | * The builtin Amiga hardware interrupt handlers. |
49 | */ | 47 | */ |
50 | 48 | ||
51 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
52 | static void ami_int1(unsigned int irq, struct irq_desc *desc) | 49 | static void ami_int1(unsigned int irq, struct irq_desc *desc) |
53 | { | 50 | { |
54 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 51 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
@@ -140,103 +137,6 @@ static void ami_int5(unsigned int irq, struct irq_desc *desc) | |||
140 | generic_handle_irq(IRQ_AMIGA_DSKSYN); | 137 | generic_handle_irq(IRQ_AMIGA_DSKSYN); |
141 | } | 138 | } |
142 | } | 139 | } |
143 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
144 | static irqreturn_t ami_int1(int irq, void *dev_id) | ||
145 | { | ||
146 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
147 | |||
148 | /* if serial transmit buffer empty, interrupt */ | ||
149 | if (ints & IF_TBE) { | ||
150 | amiga_custom.intreq = IF_TBE; | ||
151 | generic_handle_irq(IRQ_AMIGA_TBE); | ||
152 | } | ||
153 | |||
154 | /* if floppy disk transfer complete, interrupt */ | ||
155 | if (ints & IF_DSKBLK) { | ||
156 | amiga_custom.intreq = IF_DSKBLK; | ||
157 | generic_handle_irq(IRQ_AMIGA_DSKBLK); | ||
158 | } | ||
159 | |||
160 | /* if software interrupt set, interrupt */ | ||
161 | if (ints & IF_SOFT) { | ||
162 | amiga_custom.intreq = IF_SOFT; | ||
163 | generic_handle_irq(IRQ_AMIGA_SOFT); | ||
164 | } | ||
165 | return IRQ_HANDLED; | ||
166 | } | ||
167 | |||
168 | static irqreturn_t ami_int3(int irq, void *dev_id) | ||
169 | { | ||
170 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
171 | |||
172 | /* if a blitter interrupt */ | ||
173 | if (ints & IF_BLIT) { | ||
174 | amiga_custom.intreq = IF_BLIT; | ||
175 | generic_handle_irq(IRQ_AMIGA_BLIT); | ||
176 | } | ||
177 | |||
178 | /* if a copper interrupt */ | ||
179 | if (ints & IF_COPER) { | ||
180 | amiga_custom.intreq = IF_COPER; | ||
181 | generic_handle_irq(IRQ_AMIGA_COPPER); | ||
182 | } | ||
183 | |||
184 | /* if a vertical blank interrupt */ | ||
185 | if (ints & IF_VERTB) { | ||
186 | amiga_custom.intreq = IF_VERTB; | ||
187 | generic_handle_irq(IRQ_AMIGA_VERTB); | ||
188 | } | ||
189 | return IRQ_HANDLED; | ||
190 | } | ||
191 | |||
192 | static irqreturn_t ami_int4(int irq, void *dev_id) | ||
193 | { | ||
194 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
195 | |||
196 | /* if audio 0 interrupt */ | ||
197 | if (ints & IF_AUD0) { | ||
198 | amiga_custom.intreq = IF_AUD0; | ||
199 | generic_handle_irq(IRQ_AMIGA_AUD0); | ||
200 | } | ||
201 | |||
202 | /* if audio 1 interrupt */ | ||
203 | if (ints & IF_AUD1) { | ||
204 | amiga_custom.intreq = IF_AUD1; | ||
205 | generic_handle_irq(IRQ_AMIGA_AUD1); | ||
206 | } | ||
207 | |||
208 | /* if audio 2 interrupt */ | ||
209 | if (ints & IF_AUD2) { | ||
210 | amiga_custom.intreq = IF_AUD2; | ||
211 | generic_handle_irq(IRQ_AMIGA_AUD2); | ||
212 | } | ||
213 | |||
214 | /* if audio 3 interrupt */ | ||
215 | if (ints & IF_AUD3) { | ||
216 | amiga_custom.intreq = IF_AUD3; | ||
217 | generic_handle_irq(IRQ_AMIGA_AUD3); | ||
218 | } | ||
219 | return IRQ_HANDLED; | ||
220 | } | ||
221 | |||
222 | static irqreturn_t ami_int5(int irq, void *dev_id) | ||
223 | { | ||
224 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
225 | |||
226 | /* if serial receive buffer full interrupt */ | ||
227 | if (ints & IF_RBF) { | ||
228 | /* acknowledge of IF_RBF must be done by the serial interrupt */ | ||
229 | generic_handle_irq(IRQ_AMIGA_RBF); | ||
230 | } | ||
231 | |||
232 | /* if a disk sync interrupt */ | ||
233 | if (ints & IF_DSKSYN) { | ||
234 | amiga_custom.intreq = IF_DSKSYN; | ||
235 | generic_handle_irq(IRQ_AMIGA_DSKSYN); | ||
236 | } | ||
237 | return IRQ_HANDLED; | ||
238 | } | ||
239 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
240 | 140 | ||
241 | 141 | ||
242 | /* | 142 | /* |
@@ -252,7 +152,6 @@ static irqreturn_t ami_int5(int irq, void *dev_id) | |||
252 | 152 | ||
253 | void __init amiga_init_IRQ(void) | 153 | void __init amiga_init_IRQ(void) |
254 | { | 154 | { |
255 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
256 | m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER, | 155 | m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER, |
257 | AMI_STD_IRQS); | 156 | AMI_STD_IRQS); |
258 | 157 | ||
@@ -260,19 +159,6 @@ void __init amiga_init_IRQ(void) | |||
260 | irq_set_chained_handler(IRQ_AUTO_3, ami_int3); | 159 | irq_set_chained_handler(IRQ_AUTO_3, ami_int3); |
261 | irq_set_chained_handler(IRQ_AUTO_4, ami_int4); | 160 | irq_set_chained_handler(IRQ_AUTO_4, ami_int4); |
262 | irq_set_chained_handler(IRQ_AUTO_5, ami_int5); | 161 | irq_set_chained_handler(IRQ_AUTO_5, ami_int5); |
263 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
264 | if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL)) | ||
265 | pr_err("Couldn't register int%d\n", 1); | ||
266 | if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL)) | ||
267 | pr_err("Couldn't register int%d\n", 3); | ||
268 | if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL)) | ||
269 | pr_err("Couldn't register int%d\n", 4); | ||
270 | if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL)) | ||
271 | pr_err("Couldn't register int%d\n", 5); | ||
272 | |||
273 | m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER, | ||
274 | AMI_STD_IRQS); | ||
275 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
276 | 162 | ||
277 | /* turn off PCMCIA interrupts */ | 163 | /* turn off PCMCIA interrupts */ |
278 | if (AMIGAHW_PRESENT(PCMCIA)) | 164 | if (AMIGAHW_PRESENT(PCMCIA)) |
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index fc190b34b621..b7d0aa37d199 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c | |||
@@ -1,23 +1,9 @@ | |||
1 | #include <linux/interrupt.h> | 1 | #include <linux/interrupt.h> |
2 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
3 | #include <linux/irq.h> | 2 | #include <linux/irq.h> |
4 | #else | ||
5 | #include <asm/irq.h> | ||
6 | #endif | ||
7 | 3 | ||
8 | #include <asm/traps.h> | 4 | #include <asm/traps.h> |
9 | #include <asm/apollohw.h> | 5 | #include <asm/apollohw.h> |
10 | 6 | ||
11 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
12 | void dn_process_int(unsigned int irq, struct pt_regs *fp) | ||
13 | { | ||
14 | do_IRQ(irq, fp); | ||
15 | |||
16 | *(volatile unsigned char *)(pica)=0x20; | ||
17 | *(volatile unsigned char *)(picb)=0x20; | ||
18 | } | ||
19 | #endif | ||
20 | |||
21 | unsigned int apollo_irq_startup(struct irq_data *data) | 7 | unsigned int apollo_irq_startup(struct irq_data *data) |
22 | { | 8 | { |
23 | unsigned int irq = data->irq; | 9 | unsigned int irq = data->irq; |
@@ -39,31 +25,23 @@ void apollo_irq_shutdown(struct irq_data *data) | |||
39 | *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); | 25 | *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); |
40 | } | 26 | } |
41 | 27 | ||
42 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
43 | void apollo_irq_eoi(struct irq_data *data) | 28 | void apollo_irq_eoi(struct irq_data *data) |
44 | { | 29 | { |
45 | *(volatile unsigned char *)(pica) = 0x20; | 30 | *(volatile unsigned char *)(pica) = 0x20; |
46 | *(volatile unsigned char *)(picb) = 0x20; | 31 | *(volatile unsigned char *)(picb) = 0x20; |
47 | } | 32 | } |
48 | #endif | ||
49 | 33 | ||
50 | static struct irq_chip apollo_irq_chip = { | 34 | static struct irq_chip apollo_irq_chip = { |
51 | .name = "apollo", | 35 | .name = "apollo", |
52 | .irq_startup = apollo_irq_startup, | 36 | .irq_startup = apollo_irq_startup, |
53 | .irq_shutdown = apollo_irq_shutdown, | 37 | .irq_shutdown = apollo_irq_shutdown, |
54 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
55 | .irq_eoi = apollo_irq_eoi, | 38 | .irq_eoi = apollo_irq_eoi, |
56 | #endif | ||
57 | }; | 39 | }; |
58 | 40 | ||
59 | 41 | ||
60 | void __init dn_init_IRQ(void) | 42 | void __init dn_init_IRQ(void) |
61 | { | 43 | { |
62 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
63 | m68k_setup_user_interrupt(VEC_USER + 96, 16, NULL); | 44 | m68k_setup_user_interrupt(VEC_USER + 96, 16, NULL); |
64 | #else | ||
65 | m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); | ||
66 | #endif | ||
67 | m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq, | 45 | m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq, |
68 | IRQ_APOLLO, 16); | 46 | IRQ_APOLLO, 16); |
69 | } | 47 | } |
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h index 518e61f2fccb..94349a525bc2 100644 --- a/arch/m68k/include/asm/irq.h +++ b/arch/m68k/include/asm/irq.h | |||
@@ -62,67 +62,6 @@ | |||
62 | #define IRQ_FLG_STD (0x8000) /* internally used */ | 62 | #define IRQ_FLG_STD (0x8000) /* internally used */ |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
66 | |||
67 | #include <linux/linkage.h> | ||
68 | #include <linux/hardirq.h> | ||
69 | #include <linux/irqreturn.h> | ||
70 | #include <linux/spinlock_types.h> | ||
71 | |||
72 | struct pt_regs; | ||
73 | |||
74 | /* | ||
75 | * This structure is used to chain together the ISRs for a particular | ||
76 | * interrupt source (if it supports chaining). | ||
77 | */ | ||
78 | struct irq_data { | ||
79 | unsigned int irq; | ||
80 | irqreturn_t (*handler)(int, void *); | ||
81 | void *dev_id; | ||
82 | struct irq_data *next; | ||
83 | unsigned long flags; | ||
84 | const char *devname; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * This structure has only 4 elements for speed reasons | ||
89 | */ | ||
90 | struct irq_handler { | ||
91 | int (*handler)(int, void *); | ||
92 | unsigned long flags; | ||
93 | void *dev_id; | ||
94 | const char *devname; | ||
95 | }; | ||
96 | |||
97 | struct irq_chip { | ||
98 | const char *name; | ||
99 | unsigned int (*irq_startup)(struct irq_data *data); | ||
100 | void (*irq_shutdown)(struct irq_data *data); | ||
101 | void (*irq_enable)(struct irq_data *data); | ||
102 | void (*irq_disable)(struct irq_data *data); | ||
103 | }; | ||
104 | |||
105 | extern unsigned int m68k_irq_startup(struct irq_data *data); | ||
106 | extern unsigned int m68k_irq_startup_irq(unsigned int irq); | ||
107 | extern void m68k_irq_shutdown(struct irq_data *data); | ||
108 | |||
109 | /* | ||
110 | * This function returns a new struct irq_data | ||
111 | */ | ||
112 | extern struct irq_data *new_irq_node(void); | ||
113 | |||
114 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); | ||
115 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | ||
116 | void (*handler)(unsigned int, struct pt_regs *)); | ||
117 | extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int); | ||
118 | #define m68k_setup_irq_controller(chip, dummy, irq, cnt) \ | ||
119 | m68k_setup_irq_chip((chip), (irq), (cnt)) | ||
120 | |||
121 | extern void generic_handle_irq(unsigned int); | ||
122 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs); | ||
123 | |||
124 | #else /* CONFIG_GENERIC_HARDIRQS */ | ||
125 | |||
126 | struct irq_data; | 65 | struct irq_data; |
127 | struct irq_chip; | 66 | struct irq_chip; |
128 | struct irq_desc; | 67 | struct irq_desc; |
@@ -139,8 +78,6 @@ extern void m68k_setup_irq_controller(struct irq_chip *, | |||
139 | struct irq_desc *desc), | 78 | struct irq_desc *desc), |
140 | unsigned int irq, unsigned int cnt); | 79 | unsigned int irq, unsigned int cnt); |
141 | 80 | ||
142 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
143 | |||
144 | extern unsigned int irq_canonicalize(unsigned int irq); | 81 | extern unsigned int irq_canonicalize(unsigned int irq); |
145 | 82 | ||
146 | #else | 83 | #else |
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h index 01cdbb4da465..22f12c9eb910 100644 --- a/arch/m68k/include/asm/q40ints.h +++ b/arch/m68k/include/asm/q40ints.h | |||
@@ -24,8 +24,3 @@ | |||
24 | #define Q40_IRQ10_MASK (1<<5) | 24 | #define Q40_IRQ10_MASK (1<<5) |
25 | #define Q40_IRQ14_MASK (1<<6) | 25 | #define Q40_IRQ14_MASK (1<<6) |
26 | #define Q40_IRQ15_MASK (1<<7) | 26 | #define Q40_IRQ15_MASK (1<<7) |
27 | |||
28 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
29 | extern unsigned long q40_probe_irq_on (void); | ||
30 | extern int q40_probe_irq_off (unsigned long irqs); | ||
31 | #endif | ||
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 141425785c4e..c5696193281a 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile | |||
@@ -6,11 +6,10 @@ extra-$(CONFIG_MMU) := head.o | |||
6 | extra-$(CONFIG_SUN3) := sun3-head.o | 6 | extra-$(CONFIG_SUN3) := sun3-head.o |
7 | extra-y += vmlinux.lds | 7 | extra-y += vmlinux.lds |
8 | 8 | ||
9 | obj-y := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \ | 9 | obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o setup.o \ |
10 | sys_m68k.o syscalltable.o time.o traps.o | 10 | signal.o sys_m68k.o syscalltable.o time.o traps.o |
11 | 11 | ||
12 | obj-$(CONFIG_MMU) += ints.o vectors.o | 12 | obj-$(CONFIG_MMU) += ints.o vectors.o |
13 | devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o | ||
14 | 13 | ||
15 | ifndef CONFIG_MMU_SUN3 | 14 | ifndef CONFIG_MMU_SUN3 |
16 | obj-y += dma.o | 15 | obj-y += dma.o |
@@ -18,9 +17,4 @@ endif | |||
18 | ifndef CONFIG_MMU | 17 | ifndef CONFIG_MMU |
19 | obj-y += init_task.o | 18 | obj-y += init_task.o |
20 | endif | 19 | endif |
21 | ifdef CONFIG_GENERIC_HARDIRQS | ||
22 | obj-y += irq.o | ||
23 | else | ||
24 | obj-y += devres.o | ||
25 | endif | ||
26 | 20 | ||
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index cea439f9819b..e2b056b3a314 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -31,20 +31,6 @@ extern u32 auto_irqhandler_fixup[]; | |||
31 | extern u32 user_irqhandler_fixup[]; | 31 | extern u32 user_irqhandler_fixup[]; |
32 | extern u16 user_irqvec_fixup[]; | 32 | extern u16 user_irqvec_fixup[]; |
33 | 33 | ||
34 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
35 | /* table for system interrupt handlers */ | ||
36 | static struct irq_data *irq_list[NR_IRQS]; | ||
37 | static struct irq_chip *irq_chip[NR_IRQS]; | ||
38 | static int irq_depth[NR_IRQS]; | ||
39 | |||
40 | static inline int irq_set_chip(unsigned int irq, struct irq_chip *chip) | ||
41 | { | ||
42 | irq_chip[irq] = chip; | ||
43 | return 0; | ||
44 | } | ||
45 | #define irq_set_chip_and_handler(irq, chip, dummy) irq_set_chip(irq, chip) | ||
46 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
47 | |||
48 | static int m68k_first_user_vec; | 34 | static int m68k_first_user_vec; |
49 | 35 | ||
50 | static struct irq_chip auto_irq_chip = { | 36 | static struct irq_chip auto_irq_chip = { |
@@ -59,11 +45,6 @@ static struct irq_chip user_irq_chip = { | |||
59 | .irq_shutdown = m68k_irq_shutdown, | 45 | .irq_shutdown = m68k_irq_shutdown, |
60 | }; | 46 | }; |
61 | 47 | ||
62 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
63 | #define NUM_IRQ_NODES 100 | ||
64 | static struct irq_data nodes[NUM_IRQ_NODES]; | ||
65 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
66 | |||
67 | /* | 48 | /* |
68 | * void init_IRQ(void) | 49 | * void init_IRQ(void) |
69 | * | 50 | * |
@@ -133,8 +114,6 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | |||
133 | flush_icache(); | 114 | flush_icache(); |
134 | } | 115 | } |
135 | 116 | ||
136 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
137 | |||
138 | /** | 117 | /** |
139 | * m68k_setup_irq_controller | 118 | * m68k_setup_irq_controller |
140 | * @chip: irq chip which controls specified irq | 119 | * @chip: irq chip which controls specified irq |
@@ -160,198 +139,6 @@ void m68k_setup_irq_controller(struct irq_chip *chip, | |||
160 | } | 139 | } |
161 | } | 140 | } |
162 | 141 | ||
163 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
164 | |||
165 | /** | ||
166 | * m68k_setup_irq_chip | ||
167 | * @contr: irq controller which controls specified irq | ||
168 | * @irq: first irq to be managed by the controller | ||
169 | * | ||
170 | * Change the controller for the specified range of irq, which will be used to | ||
171 | * manage these irq. auto/user irq already have a default controller, which can | ||
172 | * be changed as well, but the controller probably should use m68k_irq_startup/ | ||
173 | * m68k_irq_shutdown. | ||
174 | */ | ||
175 | void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, | ||
176 | unsigned int cnt) | ||
177 | { | ||
178 | int i; | ||
179 | |||
180 | for (i = 0; i < cnt; i++) | ||
181 | irq_set_chip(irq + i, contr); | ||
182 | } | ||
183 | |||
184 | struct irq_data *new_irq_node(void) | ||
185 | { | ||
186 | struct irq_data *node; | ||
187 | short i; | ||
188 | |||
189 | for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { | ||
190 | if (!node->handler) { | ||
191 | memset(node, 0, sizeof(*node)); | ||
192 | return node; | ||
193 | } | ||
194 | } | ||
195 | |||
196 | printk ("new_irq_node: out of nodes\n"); | ||
197 | return NULL; | ||
198 | } | ||
199 | |||
200 | static int m68k_setup_irq(unsigned int irq, struct irq_data *node) | ||
201 | { | ||
202 | struct irq_chip *contr; | ||
203 | struct irq_data **prev; | ||
204 | unsigned long flags; | ||
205 | |||
206 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | ||
207 | printk("%s: Incorrect IRQ %d from %s\n", | ||
208 | __func__, irq, node->devname); | ||
209 | return -ENXIO; | ||
210 | } | ||
211 | |||
212 | local_irq_save(flags); | ||
213 | |||
214 | prev = irq_list + irq; | ||
215 | if (*prev) { | ||
216 | /* Can't share interrupts unless both agree to */ | ||
217 | if (!((*prev)->flags & node->flags & IRQF_SHARED)) { | ||
218 | local_irq_restore(flags); | ||
219 | return -EBUSY; | ||
220 | } | ||
221 | while (*prev) | ||
222 | prev = &(*prev)->next; | ||
223 | } | ||
224 | |||
225 | if (!irq_list[irq]) { | ||
226 | if (contr->irq_startup) | ||
227 | contr->irq_startup(node); | ||
228 | else | ||
229 | contr->irq_enable(node); | ||
230 | } | ||
231 | node->next = NULL; | ||
232 | *prev = node; | ||
233 | |||
234 | local_irq_restore(flags); | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | int request_irq(unsigned int irq, | ||
240 | irq_handler_t handler, | ||
241 | unsigned long flags, const char *devname, void *dev_id) | ||
242 | { | ||
243 | struct irq_data *node; | ||
244 | int res; | ||
245 | |||
246 | node = new_irq_node(); | ||
247 | if (!node) | ||
248 | return -ENOMEM; | ||
249 | |||
250 | node->irq = irq; | ||
251 | node->handler = handler; | ||
252 | node->flags = flags; | ||
253 | node->dev_id = dev_id; | ||
254 | node->devname = devname; | ||
255 | |||
256 | res = m68k_setup_irq(irq, node); | ||
257 | if (res) | ||
258 | node->handler = NULL; | ||
259 | |||
260 | return res; | ||
261 | } | ||
262 | |||
263 | EXPORT_SYMBOL(request_irq); | ||
264 | |||
265 | void free_irq(unsigned int irq, void *dev_id) | ||
266 | { | ||
267 | struct irq_chip *contr; | ||
268 | struct irq_data **p, *node; | ||
269 | unsigned long flags; | ||
270 | |||
271 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | ||
272 | printk("%s: Incorrect IRQ %d\n", __func__, irq); | ||
273 | return; | ||
274 | } | ||
275 | |||
276 | local_irq_save(flags); | ||
277 | |||
278 | p = irq_list + irq; | ||
279 | while ((node = *p)) { | ||
280 | if (node->dev_id == dev_id) | ||
281 | break; | ||
282 | p = &node->next; | ||
283 | } | ||
284 | |||
285 | if (node) { | ||
286 | *p = node->next; | ||
287 | node->handler = NULL; | ||
288 | } else | ||
289 | printk("%s: Removing probably wrong IRQ %d\n", | ||
290 | __func__, irq); | ||
291 | |||
292 | if (!irq_list[irq]) { | ||
293 | if (contr->irq_shutdown) | ||
294 | contr->irq_shutdown(node); | ||
295 | else | ||
296 | contr->irq_disable(node); | ||
297 | } | ||
298 | |||
299 | local_irq_restore(flags); | ||
300 | } | ||
301 | |||
302 | EXPORT_SYMBOL(free_irq); | ||
303 | |||
304 | void enable_irq(unsigned int irq) | ||
305 | { | ||
306 | struct irq_chip *contr; | ||
307 | unsigned long flags; | ||
308 | |||
309 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | ||
310 | printk("%s: Incorrect IRQ %d\n", | ||
311 | __func__, irq); | ||
312 | return; | ||
313 | } | ||
314 | |||
315 | local_irq_save(flags); | ||
316 | if (irq_depth[irq]) { | ||
317 | if (!--irq_depth[irq]) { | ||
318 | if (contr->irq_enable) | ||
319 | contr->irq_enable(irq_list[irq]); | ||
320 | } | ||
321 | } else | ||
322 | WARN_ON(1); | ||
323 | local_irq_restore(flags); | ||
324 | } | ||
325 | |||
326 | EXPORT_SYMBOL(enable_irq); | ||
327 | |||
328 | void disable_irq(unsigned int irq) | ||
329 | { | ||
330 | struct irq_chip *contr; | ||
331 | unsigned long flags; | ||
332 | |||
333 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | ||
334 | printk("%s: Incorrect IRQ %d\n", | ||
335 | __func__, irq); | ||
336 | return; | ||
337 | } | ||
338 | |||
339 | local_irq_save(flags); | ||
340 | if (!irq_depth[irq]++) { | ||
341 | if (contr->irq_disable) | ||
342 | contr->irq_disable(irq_list[irq]); | ||
343 | } | ||
344 | local_irq_restore(flags); | ||
345 | } | ||
346 | |||
347 | EXPORT_SYMBOL(disable_irq); | ||
348 | |||
349 | void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq"))); | ||
350 | |||
351 | EXPORT_SYMBOL(disable_irq_nosync); | ||
352 | |||
353 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
354 | |||
355 | unsigned int m68k_irq_startup_irq(unsigned int irq) | 142 | unsigned int m68k_irq_startup_irq(unsigned int irq) |
356 | { | 143 | { |
357 | if (irq <= IRQ_AUTO_7) | 144 | if (irq <= IRQ_AUTO_7) |
@@ -377,36 +164,6 @@ void m68k_irq_shutdown(struct irq_data *data) | |||
377 | } | 164 | } |
378 | 165 | ||
379 | 166 | ||
380 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
381 | |||
382 | /* | ||
383 | * Do we need these probe functions on the m68k? | ||
384 | * | ||
385 | * ... may be useful with ISA devices | ||
386 | */ | ||
387 | unsigned long probe_irq_on (void) | ||
388 | { | ||
389 | #ifdef CONFIG_Q40 | ||
390 | if (MACH_IS_Q40) | ||
391 | return q40_probe_irq_on(); | ||
392 | #endif | ||
393 | return 0; | ||
394 | } | ||
395 | |||
396 | EXPORT_SYMBOL(probe_irq_on); | ||
397 | |||
398 | int probe_irq_off (unsigned long irqs) | ||
399 | { | ||
400 | #ifdef CONFIG_Q40 | ||
401 | if (MACH_IS_Q40) | ||
402 | return q40_probe_irq_off(irqs); | ||
403 | #endif | ||
404 | return 0; | ||
405 | } | ||
406 | |||
407 | EXPORT_SYMBOL(probe_irq_off); | ||
408 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
409 | |||
410 | unsigned int irq_canonicalize(unsigned int irq) | 167 | unsigned int irq_canonicalize(unsigned int irq) |
411 | { | 168 | { |
412 | #ifdef CONFIG_Q40 | 169 | #ifdef CONFIG_Q40 |
@@ -418,63 +175,9 @@ unsigned int irq_canonicalize(unsigned int irq) | |||
418 | 175 | ||
419 | EXPORT_SYMBOL(irq_canonicalize); | 176 | EXPORT_SYMBOL(irq_canonicalize); |
420 | 177 | ||
421 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
422 | void generic_handle_irq(unsigned int irq) | ||
423 | { | ||
424 | struct irq_data *node; | ||
425 | kstat_cpu(0).irqs[irq]++; | ||
426 | node = irq_list[irq]; | ||
427 | do { | ||
428 | node->handler(irq, node->dev_id); | ||
429 | node = node->next; | ||
430 | } while (node); | ||
431 | } | ||
432 | |||
433 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | ||
434 | { | ||
435 | struct pt_regs *old_regs; | ||
436 | old_regs = set_irq_regs(regs); | ||
437 | generic_handle_irq(irq); | ||
438 | set_irq_regs(old_regs); | ||
439 | } | ||
440 | |||
441 | asmlinkage void handle_badint(struct pt_regs *regs) | ||
442 | { | ||
443 | kstat_cpu(0).irqs[0]++; | ||
444 | printk("unexpected interrupt from %u\n", regs->vector); | ||
445 | } | ||
446 | |||
447 | int show_interrupts(struct seq_file *p, void *v) | ||
448 | { | ||
449 | struct irq_chip *contr; | ||
450 | struct irq_data *node; | ||
451 | int i = *(loff_t *) v; | ||
452 | |||
453 | /* autovector interrupts */ | ||
454 | if (irq_list[i]) { | ||
455 | contr = irq_chip[i]; | ||
456 | node = irq_list[i]; | ||
457 | seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname); | ||
458 | while ((node = node->next)) | ||
459 | seq_printf(p, ", %s", node->devname); | ||
460 | seq_puts(p, "\n"); | ||
461 | } | ||
462 | return 0; | ||
463 | } | ||
464 | |||
465 | #ifdef CONFIG_PROC_FS | ||
466 | void init_irq_proc(void) | ||
467 | { | ||
468 | /* Insert /proc/irq driver here */ | ||
469 | } | ||
470 | #endif | ||
471 | |||
472 | #else /* CONFIG_GENERIC_HARDIRQS */ | ||
473 | 178 | ||
474 | asmlinkage void handle_badint(struct pt_regs *regs) | 179 | asmlinkage void handle_badint(struct pt_regs *regs) |
475 | { | 180 | { |
476 | atomic_inc(&irq_err_count); | 181 | atomic_inc(&irq_err_count); |
477 | pr_warn("unexpected interrupt from %u\n", regs->vector); | 182 | pr_warn("unexpected interrupt from %u\n", regs->vector); |
478 | } | 183 | } |
479 | |||
480 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 425144cbfa7d..b55ead284971 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
@@ -11,9 +11,7 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
15 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
16 | #endif | ||
17 | 15 | ||
18 | #include <asm/traps.h> | 16 | #include <asm/traps.h> |
19 | #include <asm/bootinfo.h> | 17 | #include <asm/bootinfo.h> |
@@ -56,7 +54,6 @@ void __init baboon_init(void) | |||
56 | * Baboon interrupt handler. This works a lot like a VIA. | 54 | * Baboon interrupt handler. This works a lot like a VIA. |
57 | */ | 55 | */ |
58 | 56 | ||
59 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
60 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) | 57 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) |
61 | { | 58 | { |
62 | int irq_bit, irq_num; | 59 | int irq_bit, irq_num; |
@@ -88,39 +85,6 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc) | |||
88 | baboon->mb_ifr &= ~events; | 85 | baboon->mb_ifr &= ~events; |
89 | #endif | 86 | #endif |
90 | } | 87 | } |
91 | #else | ||
92 | static irqreturn_t baboon_irq(int irq, void *dev_id) | ||
93 | { | ||
94 | int irq_bit, irq_num; | ||
95 | unsigned char events; | ||
96 | |||
97 | #ifdef DEBUG_IRQS | ||
98 | printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n", | ||
99 | (uint) baboon->mb_control, (uint) baboon->mb_ifr, | ||
100 | (uint) baboon->mb_status); | ||
101 | #endif | ||
102 | |||
103 | if (!(events = baboon->mb_ifr & 0x07)) | ||
104 | return IRQ_NONE; | ||
105 | |||
106 | irq_num = IRQ_BABOON_0; | ||
107 | irq_bit = 1; | ||
108 | do { | ||
109 | if (events & irq_bit) { | ||
110 | baboon->mb_ifr &= ~irq_bit; | ||
111 | generic_handle_irq(irq_num); | ||
112 | } | ||
113 | irq_bit <<= 1; | ||
114 | irq_num++; | ||
115 | } while(events >= irq_bit); | ||
116 | #if 0 | ||
117 | if (baboon->mb_ifr & 0x02) macide_ack_intr(NULL); | ||
118 | /* for now we need to smash all interrupts */ | ||
119 | baboon->mb_ifr &= ~events; | ||
120 | #endif | ||
121 | return IRQ_HANDLED; | ||
122 | } | ||
123 | #endif | ||
124 | 88 | ||
125 | /* | 89 | /* |
126 | * Register the Baboon interrupt dispatcher on nubus slot $C. | 90 | * Register the Baboon interrupt dispatcher on nubus slot $C. |
@@ -129,12 +93,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
129 | void __init baboon_register_interrupts(void) | 93 | void __init baboon_register_interrupts(void) |
130 | { | 94 | { |
131 | baboon_disabled = 0; | 95 | baboon_disabled = 0; |
132 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
133 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); | 96 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); |
134 | #else | ||
135 | if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) | ||
136 | pr_err("Couldn't register baboon interrupt\n"); | ||
137 | #endif | ||
138 | } | 97 | } |
139 | 98 | ||
140 | /* | 99 | /* |
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index cc784c2ff6e8..a4c82dab9ff1 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -19,9 +19,7 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
23 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
24 | #endif | ||
25 | 23 | ||
26 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
27 | #include <asm/macintosh.h> | 25 | #include <asm/macintosh.h> |
@@ -32,11 +30,7 @@ | |||
32 | int oss_present; | 30 | int oss_present; |
33 | volatile struct mac_oss *oss; | 31 | volatile struct mac_oss *oss; |
34 | 32 | ||
35 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
36 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); | 33 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); |
37 | #else | ||
38 | extern irqreturn_t via1_irq(int, void *); | ||
39 | #endif | ||
40 | 34 | ||
41 | /* | 35 | /* |
42 | * Initialize the OSS | 36 | * Initialize the OSS |
@@ -76,7 +70,6 @@ void __init oss_nubus_init(void) | |||
76 | * and SCSI; everything else is routed to its own autovector IRQ. | 70 | * and SCSI; everything else is routed to its own autovector IRQ. |
77 | */ | 71 | */ |
78 | 72 | ||
79 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
80 | static void oss_irq(unsigned int irq, struct irq_desc *desc) | 73 | static void oss_irq(unsigned int irq, struct irq_desc *desc) |
81 | { | 74 | { |
82 | int events; | 75 | int events; |
@@ -103,35 +96,6 @@ static void oss_irq(unsigned int irq, struct irq_desc *desc) | |||
103 | /* FIXME: error check here? */ | 96 | /* FIXME: error check here? */ |
104 | } | 97 | } |
105 | } | 98 | } |
106 | #else | ||
107 | static irqreturn_t oss_irq(int irq, void *dev_id) | ||
108 | { | ||
109 | int events; | ||
110 | |||
111 | events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI); | ||
112 | if (!events) | ||
113 | return IRQ_NONE; | ||
114 | |||
115 | #ifdef DEBUG_IRQS | ||
116 | if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) { | ||
117 | printk("oss_irq: irq %d events = 0x%04X\n", irq, | ||
118 | (int) oss->irq_pending); | ||
119 | } | ||
120 | #endif | ||
121 | /* FIXME: how do you clear a pending IRQ? */ | ||
122 | |||
123 | if (events & OSS_IP_SOUND) { | ||
124 | oss->irq_pending &= ~OSS_IP_SOUND; | ||
125 | /* FIXME: call sound handler */ | ||
126 | } else if (events & OSS_IP_SCSI) { | ||
127 | oss->irq_pending &= ~OSS_IP_SCSI; | ||
128 | generic_handle_irq(IRQ_MAC_SCSI); | ||
129 | } else { | ||
130 | /* FIXME: error check here? */ | ||
131 | } | ||
132 | return IRQ_HANDLED; | ||
133 | } | ||
134 | #endif | ||
135 | 99 | ||
136 | /* | 100 | /* |
137 | * Nubus IRQ handler, OSS style | 101 | * Nubus IRQ handler, OSS style |
@@ -139,7 +103,6 @@ static irqreturn_t oss_irq(int irq, void *dev_id) | |||
139 | * Unlike the VIA/RBV this is on its own autovector interrupt level. | 103 | * Unlike the VIA/RBV this is on its own autovector interrupt level. |
140 | */ | 104 | */ |
141 | 105 | ||
142 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
143 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) | 106 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) |
144 | { | 107 | { |
145 | int events, irq_bit, i; | 108 | int events, irq_bit, i; |
@@ -166,35 +129,6 @@ static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) | |||
166 | } | 129 | } |
167 | } while(events & (irq_bit - 1)); | 130 | } while(events & (irq_bit - 1)); |
168 | } | 131 | } |
169 | #else | ||
170 | static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | ||
171 | { | ||
172 | int events, irq_bit, i; | ||
173 | |||
174 | events = oss->irq_pending & OSS_IP_NUBUS; | ||
175 | if (!events) | ||
176 | return IRQ_NONE; | ||
177 | |||
178 | #ifdef DEBUG_NUBUS_INT | ||
179 | if (console_loglevel > 7) { | ||
180 | printk("oss_nubus_irq: events = 0x%04X\n", events); | ||
181 | } | ||
182 | #endif | ||
183 | /* There are only six slots on the OSS, not seven */ | ||
184 | |||
185 | i = 6; | ||
186 | irq_bit = 0x40; | ||
187 | do { | ||
188 | --i; | ||
189 | irq_bit >>= 1; | ||
190 | if (events & irq_bit) { | ||
191 | oss->irq_pending &= ~irq_bit; | ||
192 | generic_handle_irq(NUBUS_SOURCE_BASE + i); | ||
193 | } | ||
194 | } while(events & (irq_bit - 1)); | ||
195 | return IRQ_HANDLED; | ||
196 | } | ||
197 | #endif | ||
198 | 132 | ||
199 | /* | 133 | /* |
200 | * Register the OSS and NuBus interrupt dispatchers. | 134 | * Register the OSS and NuBus interrupt dispatchers. |
@@ -202,22 +136,10 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | |||
202 | 136 | ||
203 | void __init oss_register_interrupts(void) | 137 | void __init oss_register_interrupts(void) |
204 | { | 138 | { |
205 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
206 | irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq); | 139 | irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq); |
207 | irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq); | 140 | irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq); |
208 | irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq); | 141 | irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq); |
209 | irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq); | 142 | irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq); |
210 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
211 | if (request_irq(OSS_IRQLEV_SCSI, oss_irq, 0, "scsi", (void *)oss)) | ||
212 | pr_err("Couldn't register %s interrupt\n", "scsi"); | ||
213 | if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, 0, "nubus", | ||
214 | (void *)oss)) | ||
215 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
216 | if (request_irq(OSS_IRQLEV_SOUND, oss_irq, 0, "sound", (void *)oss)) | ||
217 | pr_err("Couldn't register %s interrupt\n", "sound"); | ||
218 | if (request_irq(OSS_IRQLEV_VIA1, via1_irq, 0, "via1", (void *)via1)) | ||
219 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
220 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
221 | } | 143 | } |
222 | 144 | ||
223 | /* | 145 | /* |
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index 52840b8c03b8..e6c2d20f328d 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c | |||
@@ -18,9 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
22 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
23 | #endif | ||
24 | 22 | ||
25 | #include <asm/traps.h> | 23 | #include <asm/traps.h> |
26 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
@@ -116,7 +114,6 @@ void __init psc_init(void) | |||
116 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. | 114 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. |
117 | */ | 115 | */ |
118 | 116 | ||
119 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
120 | static void psc_irq(unsigned int irq, struct irq_desc *desc) | 117 | static void psc_irq(unsigned int irq, struct irq_desc *desc) |
121 | { | 118 | { |
122 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); | 119 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); |
@@ -145,36 +142,6 @@ static void psc_irq(unsigned int irq, struct irq_desc *desc) | |||
145 | irq_bit <<= 1; | 142 | irq_bit <<= 1; |
146 | } while (events >= irq_bit); | 143 | } while (events >= irq_bit); |
147 | } | 144 | } |
148 | #else | ||
149 | static irqreturn_t psc_irq(int irq, void *dev_id) | ||
150 | { | ||
151 | int pIFR = pIFRbase + ((int) dev_id); | ||
152 | int pIER = pIERbase + ((int) dev_id); | ||
153 | int irq_num; | ||
154 | unsigned char irq_bit, events; | ||
155 | |||
156 | #ifdef DEBUG_IRQS | ||
157 | printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n", | ||
158 | irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER)); | ||
159 | #endif | ||
160 | |||
161 | events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF; | ||
162 | if (!events) | ||
163 | return IRQ_NONE; | ||
164 | |||
165 | irq_num = irq << 3; | ||
166 | irq_bit = 1; | ||
167 | do { | ||
168 | if (events & irq_bit) { | ||
169 | psc_write_byte(pIFR, irq_bit); | ||
170 | generic_handle_irq(irq_num); | ||
171 | } | ||
172 | irq_num++; | ||
173 | irq_bit <<= 1; | ||
174 | } while (events >= irq_bit); | ||
175 | return IRQ_HANDLED; | ||
176 | } | ||
177 | #endif | ||
178 | 145 | ||
179 | /* | 146 | /* |
180 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. | 147 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. |
@@ -182,7 +149,6 @@ static irqreturn_t psc_irq(int irq, void *dev_id) | |||
182 | 149 | ||
183 | void __init psc_register_interrupts(void) | 150 | void __init psc_register_interrupts(void) |
184 | { | 151 | { |
185 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
186 | irq_set_chained_handler(IRQ_AUTO_3, psc_irq); | 152 | irq_set_chained_handler(IRQ_AUTO_3, psc_irq); |
187 | irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); | 153 | irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); |
188 | irq_set_chained_handler(IRQ_AUTO_4, psc_irq); | 154 | irq_set_chained_handler(IRQ_AUTO_4, psc_irq); |
@@ -191,16 +157,6 @@ void __init psc_register_interrupts(void) | |||
191 | irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); | 157 | irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); |
192 | irq_set_chained_handler(IRQ_AUTO_6, psc_irq); | 158 | irq_set_chained_handler(IRQ_AUTO_6, psc_irq); |
193 | irq_set_handler_data(IRQ_AUTO_6, (void *)0x60); | 159 | irq_set_handler_data(IRQ_AUTO_6, (void *)0x60); |
194 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
195 | if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30)) | ||
196 | pr_err("Couldn't register psc%d interrupt\n", 3); | ||
197 | if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40)) | ||
198 | pr_err("Couldn't register psc%d interrupt\n", 4); | ||
199 | if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50)) | ||
200 | pr_err("Couldn't register psc%d interrupt\n", 5); | ||
201 | if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60)) | ||
202 | pr_err("Couldn't register psc%d interrupt\n", 6); | ||
203 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
204 | } | 160 | } |
205 | 161 | ||
206 | void psc_irq_enable(int irq) { | 162 | void psc_irq_enable(int irq) { |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index b8156ac496a0..f1600ad26621 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
32 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
33 | #endif | ||
34 | 32 | ||
35 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
36 | #include <asm/macintosh.h> | 34 | #include <asm/macintosh.h> |
@@ -417,7 +415,6 @@ void __init via_nubus_init(void) | |||
417 | * via6522.c :-), disable/pending masks added. | 415 | * via6522.c :-), disable/pending masks added. |
418 | */ | 416 | */ |
419 | 417 | ||
420 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
421 | void via1_irq(unsigned int irq, struct irq_desc *desc) | 418 | void via1_irq(unsigned int irq, struct irq_desc *desc) |
422 | { | 419 | { |
423 | int irq_num; | 420 | int irq_num; |
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc) | |||
459 | irq_bit <<= 1; | 456 | irq_bit <<= 1; |
460 | } while (events >= irq_bit); | 457 | } while (events >= irq_bit); |
461 | } | 458 | } |
462 | #else | ||
463 | irqreturn_t via1_irq(int irq, void *dev_id) | ||
464 | { | ||
465 | int irq_num; | ||
466 | unsigned char irq_bit, events; | ||
467 | |||
468 | events = via1[vIFR] & via1[vIER] & 0x7F; | ||
469 | if (!events) | ||
470 | return IRQ_NONE; | ||
471 | |||
472 | irq_num = VIA1_SOURCE_BASE; | ||
473 | irq_bit = 1; | ||
474 | do { | ||
475 | if (events & irq_bit) { | ||
476 | via1[vIFR] = irq_bit; | ||
477 | generic_handle_irq(irq_num); | ||
478 | } | ||
479 | ++irq_num; | ||
480 | irq_bit <<= 1; | ||
481 | } while (events >= irq_bit); | ||
482 | return IRQ_HANDLED; | ||
483 | } | ||
484 | |||
485 | irqreturn_t via2_irq(int irq, void *dev_id) | ||
486 | { | ||
487 | int irq_num; | ||
488 | unsigned char irq_bit, events; | ||
489 | |||
490 | events = via2[gIFR] & via2[gIER] & 0x7F; | ||
491 | if (!events) | ||
492 | return IRQ_NONE; | ||
493 | |||
494 | irq_num = VIA2_SOURCE_BASE; | ||
495 | irq_bit = 1; | ||
496 | do { | ||
497 | if (events & irq_bit) { | ||
498 | via2[gIFR] = irq_bit | rbv_clear; | ||
499 | generic_handle_irq(irq_num); | ||
500 | } | ||
501 | ++irq_num; | ||
502 | irq_bit <<= 1; | ||
503 | } while (events >= irq_bit); | ||
504 | return IRQ_HANDLED; | ||
505 | } | ||
506 | #endif | ||
507 | 459 | ||
508 | /* | 460 | /* |
509 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the | 461 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the |
510 | * VIA2 dispatcher as a fast interrupt handler. | 462 | * VIA2 dispatcher as a fast interrupt handler. |
511 | */ | 463 | */ |
512 | 464 | ||
513 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
514 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | 465 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) |
515 | { | 466 | { |
516 | int slot_irq; | 467 | int slot_irq; |
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | |||
545 | events &= ~via2[vDirA]; | 496 | events &= ~via2[vDirA]; |
546 | } while (events); | 497 | } while (events); |
547 | } | 498 | } |
548 | #else | ||
549 | irqreturn_t via_nubus_irq(int irq, void *dev_id) | ||
550 | { | ||
551 | int slot_irq; | ||
552 | unsigned char slot_bit, events; | ||
553 | |||
554 | events = ~via2[gBufA] & 0x7F; | ||
555 | if (rbv_present) | ||
556 | events &= via2[rSIER]; | ||
557 | else | ||
558 | events &= ~via2[vDirA]; | ||
559 | if (!events) | ||
560 | return IRQ_NONE; | ||
561 | |||
562 | do { | ||
563 | slot_irq = IRQ_NUBUS_F; | ||
564 | slot_bit = 0x40; | ||
565 | do { | ||
566 | if (events & slot_bit) { | ||
567 | events &= ~slot_bit; | ||
568 | generic_handle_irq(slot_irq); | ||
569 | } | ||
570 | --slot_irq; | ||
571 | slot_bit >>= 1; | ||
572 | } while (events); | ||
573 | |||
574 | /* clear the CA1 interrupt and make certain there's no more. */ | ||
575 | via2[gIFR] = 0x02 | rbv_clear; | ||
576 | events = ~via2[gBufA] & 0x7F; | ||
577 | if (rbv_present) | ||
578 | events &= via2[rSIER]; | ||
579 | else | ||
580 | events &= ~via2[vDirA]; | ||
581 | } while (events); | ||
582 | return IRQ_HANDLED; | ||
583 | } | ||
584 | #endif | ||
585 | 499 | ||
586 | /* | 500 | /* |
587 | * Register the interrupt dispatchers for VIA or RBV machines only. | 501 | * Register the interrupt dispatchers for VIA or RBV machines only. |
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
589 | 503 | ||
590 | void __init via_register_interrupts(void) | 504 | void __init via_register_interrupts(void) |
591 | { | 505 | { |
592 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
593 | if (via_alt_mapping) { | 506 | if (via_alt_mapping) { |
594 | /* software interrupt */ | 507 | /* software interrupt */ |
595 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); | 508 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); |
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void) | |||
600 | } | 513 | } |
601 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); | 514 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); |
602 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); | 515 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); |
603 | #else | ||
604 | if (via_alt_mapping) { | ||
605 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "software", | ||
606 | (void *)via1)) | ||
607 | pr_err("Couldn't register %s interrupt\n", "software"); | ||
608 | if (request_irq(IRQ_AUTO_6, via1_irq, 0, "via1", (void *)via1)) | ||
609 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
610 | } else { | ||
611 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "via1", (void *)via1)) | ||
612 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
613 | } | ||
614 | if (request_irq(IRQ_AUTO_2, via2_irq, 0, "via2", (void *)via2)) | ||
615 | pr_err("Couldn't register %s interrupt\n", "via2"); | ||
616 | if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus", | ||
617 | (void *)via2)) | ||
618 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
619 | #endif | ||
620 | } | 516 | } |
621 | 517 | ||
622 | void via_irq_enable(int irq) { | 518 | void via_irq_enable(int irq) { |
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index f1e5288f043f..2b888491f29a 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c | |||
@@ -15,11 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
19 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
20 | #else | ||
21 | #include <asm/irq.h> | ||
22 | #endif | ||
23 | 19 | ||
24 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
25 | #include <asm/system.h> | 21 | #include <asm/system.h> |
@@ -329,15 +325,3 @@ void q40_irq_disable(struct irq_data *data) | |||
329 | printk("disable_irq nesting count %d\n",mext_disabled); | 325 | printk("disable_irq nesting count %d\n",mext_disabled); |
330 | } | 326 | } |
331 | } | 327 | } |
332 | |||
333 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
334 | unsigned long q40_probe_irq_on(void) | ||
335 | { | ||
336 | printk("irq probing not working - reconfigure the driver to avoid this\n"); | ||
337 | return -1; | ||
338 | } | ||
339 | int q40_probe_irq_off(unsigned long irqs) | ||
340 | { | ||
341 | return -1; | ||
342 | } | ||
343 | #endif | ||
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 626b601931e9..7eb378195cf7 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c | |||
@@ -53,9 +53,6 @@ static irqreturn_t sun3_int7(int irq, void *dev_id) | |||
53 | { | 53 | { |
54 | unsigned int cnt; | 54 | unsigned int cnt; |
55 | 55 | ||
56 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
57 | *sun3_intreg |= (1 << irq); | ||
58 | #endif | ||
59 | cnt = kstat_irqs_cpu(irq, 0); | 56 | cnt = kstat_irqs_cpu(irq, 0); |
60 | if (!(cnt % 2000)) | 57 | if (!(cnt % 2000)) |
61 | sun3_leds(led_pattern[cnt % 16000 / 2000]); | 58 | sun3_leds(led_pattern[cnt % 16000 / 2000]); |
@@ -69,9 +66,6 @@ static irqreturn_t sun3_int5(int irq, void *dev_id) | |||
69 | #ifdef CONFIG_SUN3 | 66 | #ifdef CONFIG_SUN3 |
70 | intersil_clear(); | 67 | intersil_clear(); |
71 | #endif | 68 | #endif |
72 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
73 | *sun3_intreg |= (1 << irq); | ||
74 | #endif | ||
75 | #ifdef CONFIG_SUN3 | 69 | #ifdef CONFIG_SUN3 |
76 | intersil_clear(); | 70 | intersil_clear(); |
77 | #endif | 71 | #endif |
@@ -89,15 +83,6 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id) | |||
89 | return IRQ_HANDLED; | 83 | return IRQ_HANDLED; |
90 | } | 84 | } |
91 | 85 | ||
92 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
93 | static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) | ||
94 | { | ||
95 | *sun3_intreg &= ~(1 << irq); | ||
96 | |||
97 | do_IRQ(irq, fp); | ||
98 | } | ||
99 | #endif | ||
100 | |||
101 | static void sun3_irq_enable(struct irq_data *data) | 86 | static void sun3_irq_enable(struct irq_data *data) |
102 | { | 87 | { |
103 | sun3_enable_irq(data->irq); | 88 | sun3_enable_irq(data->irq); |
@@ -114,19 +99,14 @@ static struct irq_chip sun3_irq_chip = { | |||
114 | .irq_shutdown = m68k_irq_shutdown, | 99 | .irq_shutdown = m68k_irq_shutdown, |
115 | .irq_enable = sun3_irq_enable, | 100 | .irq_enable = sun3_irq_enable, |
116 | .irq_disable = sun3_irq_disable, | 101 | .irq_disable = sun3_irq_disable, |
117 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
118 | .irq_mask = sun3_irq_disable, | 102 | .irq_mask = sun3_irq_disable, |
119 | .irq_unmask = sun3_irq_enable, | 103 | .irq_unmask = sun3_irq_enable, |
120 | #endif | ||
121 | }; | 104 | }; |
122 | 105 | ||
123 | void __init sun3_init_IRQ(void) | 106 | void __init sun3_init_IRQ(void) |
124 | { | 107 | { |
125 | *sun3_intreg = 1; | 108 | *sun3_intreg = 1; |
126 | 109 | ||
127 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
128 | m68k_setup_auto_interrupt(sun3_inthandle); | ||
129 | #endif | ||
130 | m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1, | 110 | m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1, |
131 | 7); | 111 | 7); |
132 | m68k_setup_user_interrupt(VEC_USER, 128, NULL); | 112 | m68k_setup_user_interrupt(VEC_USER, 128, NULL); |