Skip to content

Commit d890d73

Browse files
committed
m68k/irq: Remove obsolete m68k irq framework
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent a03010e commit d890d73

13 files changed

Lines changed: 4 additions & 820 deletions

File tree

‎arch/m68k/Kconfig‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ config M68K
44
select HAVE_IDE
55
select HAVE_AOUT if MMU
66
select GENERIC_ATOMIC64 if MMU
7-
select HAVE_GENERIC_HARDIRQS if !MMU
8-
select GENERIC_IRQ_SHOW if !MMU
7+
select HAVE_GENERIC_HARDIRQS
8+
select GENERIC_IRQ_SHOW
99
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
1010

1111
config RWSEM_GENERIC_SPINLOCK
@@ -84,12 +84,6 @@ config MMU_SUN3
8484
bool
8585
depends on MMU && !MMU_MOTOROLA
8686

87-
config USE_GENERIC_HARDIRQS
88-
bool "Use genirq"
89-
depends on MMU
90-
select HAVE_GENERIC_HARDIRQS
91-
select GENERIC_IRQ_SHOW
92-
9387
menu "Platform setup"
9488

9589
source arch/m68k/Kconfig.cpu

‎arch/m68k/amiga/amiints.c‎

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
#include <linux/init.h>
1010
#include <linux/interrupt.h>
1111
#include <linux/errno.h>
12-
#ifdef CONFIG_GENERIC_HARDIRQS
1312
#include <linux/irq.h>
14-
#endif
1513

1614
#include <asm/irq.h>
1715
#include <asm/traps.h>
@@ -48,7 +46,6 @@ static struct irq_chip amiga_irq_chip = {
4846
* The builtin Amiga hardware interrupt handlers.
4947
*/
5048

51-
#ifdef CONFIG_GENERIC_HARDIRQS
5249
static void ami_int1(unsigned int irq, struct irq_desc *desc)
5350
{
5451
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
@@ -140,103 +137,6 @@ static void ami_int5(unsigned int irq, struct irq_desc *desc)
140137
generic_handle_irq(IRQ_AMIGA_DSKSYN);
141138
}
142139
}
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 */
240140

241141

242142
/*
@@ -252,27 +152,13 @@ static irqreturn_t ami_int5(int irq, void *dev_id)
252152

253153
void __init amiga_init_IRQ(void)
254154
{
255-
#ifdef CONFIG_GENERIC_HARDIRQS
256155
m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
257156
AMI_STD_IRQS);
258157

259158
irq_set_chained_handler(IRQ_AUTO_1, ami_int1);
260159
irq_set_chained_handler(IRQ_AUTO_3, ami_int3);
261160
irq_set_chained_handler(IRQ_AUTO_4, ami_int4);
262161
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 */
276162

277163
/* turn off PCMCIA interrupts */
278164
if (AMIGAHW_PRESENT(PCMCIA))

‎arch/m68k/apollo/dn_ints.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
#include <linux/interrupt.h>
2-
#ifdef CONFIG_GENERIC_HARDIRQS
32
#include <linux/irq.h>
4-
#else
5-
#include <asm/irq.h>
6-
#endif
73

84
#include <asm/traps.h>
95
#include <asm/apollohw.h>
106

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-
217
unsigned int apollo_irq_startup(struct irq_data *data)
228
{
239
unsigned int irq = data->irq;
@@ -39,31 +25,23 @@ void apollo_irq_shutdown(struct irq_data *data)
3925
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
4026
}
4127

42-
#ifdef CONFIG_GENERIC_HARDIRQS
4328
void apollo_irq_eoi(struct irq_data *data)
4429
{
4530
*(volatile unsigned char *)(pica) = 0x20;
4631
*(volatile unsigned char *)(picb) = 0x20;
4732
}
48-
#endif
4933

5034
static struct irq_chip apollo_irq_chip = {
5135
.name = "apollo",
5236
.irq_startup = apollo_irq_startup,
5337
.irq_shutdown = apollo_irq_shutdown,
54-
#ifdef CONFIG_GENERIC_HARDIRQS
5538
.irq_eoi = apollo_irq_eoi,
56-
#endif
5739
};
5840

5941

6042
void __init dn_init_IRQ(void)
6143
{
62-
#ifdef CONFIG_GENERIC_HARDIRQS
6344
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
6745
m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
6846
IRQ_APOLLO, 16);
6947
}

‎arch/m68k/include/asm/irq.h‎

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -62,67 +62,6 @@
6262
#define IRQ_FLG_STD (0x8000) /* internally used */
6363
#endif
6464

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-
12665
struct irq_data;
12766
struct irq_chip;
12867
struct irq_desc;
@@ -139,8 +78,6 @@ extern void m68k_setup_irq_controller(struct irq_chip *,
13978
struct irq_desc *desc),
14079
unsigned int irq, unsigned int cnt);
14180

142-
#endif /* CONFIG_GENERIC_HARDIRQS */
143-
14481
extern unsigned int irq_canonicalize(unsigned int irq);
14582

14683
#else

‎arch/m68k/include/asm/q40ints.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,3 @@
2424
#define Q40_IRQ10_MASK (1<<5)
2525
#define Q40_IRQ14_MASK (1<<6)
2626
#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

‎arch/m68k/kernel/Makefile‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ extra-$(CONFIG_MMU) := head.o
66
extra-$(CONFIG_SUN3) := sun3-head.o
77
extra-y += vmlinux.lds
88

9-
obj-y := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \
10-
sys_m68k.o syscalltable.o time.o traps.o
9+
obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o setup.o \
10+
signal.o sys_m68k.o syscalltable.o time.o traps.o
1111

1212
obj-$(CONFIG_MMU) += ints.o vectors.o
13-
devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o
1413

1514
ifndef CONFIG_MMU_SUN3
1615
obj-y += dma.o
1716
endif
1817
ifndef CONFIG_MMU
1918
obj-y += init_task.o
2019
endif
21-
ifdef CONFIG_GENERIC_HARDIRQS
22-
obj-y += irq.o
23-
else
24-
obj-y += devres.o
25-
endif
2620

0 commit comments

Comments
 (0)