aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/alpha/include/asm/io.h8
-rw-r--r--arch/alpha/kernel/Makefile4
-rw-r--r--arch/alpha/kernel/irq.c31
-rw-r--r--arch/alpha/kernel/irq_alpha.c24
-rw-r--r--arch/alpha/kernel/irq_i8259.c26
-rw-r--r--arch/alpha/kernel/irq_pyxis.c27
-rw-r--r--arch/alpha/kernel/irq_srm.c27
-rw-r--r--arch/alpha/kernel/osf_sys.c3
-rw-r--r--arch/alpha/kernel/sys_alcor.c27
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c28
-rw-r--r--arch/alpha/kernel/sys_dp264.c50
-rw-r--r--arch/alpha/kernel/sys_eb64p.c27
-rw-r--r--arch/alpha/kernel/sys_eiger.c27
-rw-r--r--arch/alpha/kernel/sys_jensen.c55
-rw-r--r--arch/alpha/kernel/sys_marvel.c50
-rw-r--r--arch/alpha/kernel/sys_mikasa.c27
-rw-r--r--arch/alpha/kernel/sys_noritake.c27
-rw-r--r--arch/alpha/kernel/sys_rawhide.c27
-rw-r--r--arch/alpha/kernel/sys_rx164.c27
-rw-r--r--arch/alpha/kernel/sys_sable.c28
-rw-r--r--arch/alpha/kernel/sys_takara.c27
-rw-r--r--arch/alpha/kernel/sys_titan.c31
-rw-r--r--arch/alpha/kernel/sys_wildfire.c42
-rw-r--r--arch/alpha/lib/Makefile4
-rw-r--r--arch/alpha/math-emu/Makefile2
-rw-r--r--arch/alpha/mm/Makefile2
-rw-r--r--arch/alpha/oprofile/Makefile2
28 files changed, 159 insertions, 504 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 943fe6930f77..fc95ee1bcf6f 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -68,6 +68,9 @@ config GENERIC_IOMAP
68 bool 68 bool
69 default n 69 default n
70 70
71config GENERIC_HARDIRQS_NO__DO_IRQ
72 def_bool y
73
71config GENERIC_HARDIRQS 74config GENERIC_HARDIRQS
72 bool 75 bool
73 default y 76 default y
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h
index eda9b909aa05..56ff96501350 100644
--- a/arch/alpha/include/asm/io.h
+++ b/arch/alpha/include/asm/io.h
@@ -37,8 +37,9 @@
37 */ 37 */
38extern inline void __set_hae(unsigned long new_hae) 38extern inline void __set_hae(unsigned long new_hae)
39{ 39{
40 unsigned long flags; 40 unsigned long flags = swpipl(IPL_MAX);
41 local_irq_save(flags); 41
42 barrier();
42 43
43 alpha_mv.hae_cache = new_hae; 44 alpha_mv.hae_cache = new_hae;
44 *alpha_mv.hae_register = new_hae; 45 *alpha_mv.hae_register = new_hae;
@@ -46,7 +47,8 @@ extern inline void __set_hae(unsigned long new_hae)
46 /* Re-read to make sure it was written. */ 47 /* Re-read to make sure it was written. */
47 new_hae = *alpha_mv.hae_register; 48 new_hae = *alpha_mv.hae_register;
48 49
49 local_irq_restore(flags); 50 setipl(flags);
51 barrier();
50} 52}
51 53
52extern inline void set_hae(unsigned long new_hae) 54extern inline void set_hae(unsigned long new_hae)
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index 1ee9b5b629b8..9bb7b858ed23 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -3,8 +3,8 @@
3# 3#
4 4
5extra-y := head.o vmlinux.lds 5extra-y := head.o vmlinux.lds
6EXTRA_AFLAGS := $(KBUILD_CFLAGS) 6asflags-y := $(KBUILD_CFLAGS)
7EXTRA_CFLAGS := -Werror -Wno-sign-compare 7ccflags-y := -Werror -Wno-sign-compare
8 8
9obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ 9obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
10 irq_alpha.o signal.o setup.o ptrace.o time.o \ 10 irq_alpha.o signal.o setup.o ptrace.o time.o \
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index fe912984d9b1..9ab234f48dd8 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS];
44 44
45int irq_select_affinity(unsigned int irq) 45int irq_select_affinity(unsigned int irq)
46{ 46{
47 struct irq_desc *desc = irq_to_desc[irq];
47 static int last_cpu; 48 static int last_cpu;
48 int cpu = last_cpu + 1; 49 int cpu = last_cpu + 1;
49 50
50 if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) 51 if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
51 return 1; 52 return 1;
52 53
53 while (!cpu_possible(cpu) || 54 while (!cpu_possible(cpu) ||
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq)
55 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); 56 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
56 last_cpu = cpu; 57 last_cpu = cpu;
57 58
58 cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); 59 cpumask_copy(desc->affinity, cpumask_of(cpu));
59 irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); 60 get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
60 return 0; 61 return 0;
61} 62}
62#endif /* CONFIG_SMP */ 63#endif /* CONFIG_SMP */
@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v)
67 int j; 68 int j;
68 int irq = *(loff_t *) v; 69 int irq = *(loff_t *) v;
69 struct irqaction * action; 70 struct irqaction * action;
71 struct irq_desc *desc;
70 unsigned long flags; 72 unsigned long flags;
71 73
72#ifdef CONFIG_SMP 74#ifdef CONFIG_SMP
@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v)
79#endif 81#endif
80 82
81 if (irq < ACTUAL_NR_IRQS) { 83 if (irq < ACTUAL_NR_IRQS) {
82 raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); 84 desc = irq_to_desc(irq);
83 action = irq_desc[irq].action; 85
86 if (!desc)
87 return 0;
88
89 raw_spin_lock_irqsave(&desc->lock, flags);
90 action = desc->action;
84 if (!action) 91 if (!action)
85 goto unlock; 92 goto unlock;
86 seq_printf(p, "%3d: ", irq); 93 seq_printf(p, "%3d: ", irq);
@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v)
90 for_each_online_cpu(j) 97 for_each_online_cpu(j)
91 seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); 98 seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
92#endif 99#endif
93 seq_printf(p, " %14s", irq_desc[irq].chip->name); 100 seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
94 seq_printf(p, " %c%s", 101 seq_printf(p, " %c%s",
95 (action->flags & IRQF_DISABLED)?'+':' ', 102 (action->flags & IRQF_DISABLED)?'+':' ',
96 action->name); 103 action->name);
@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v)
103 110
104 seq_putc(p, '\n'); 111 seq_putc(p, '\n');
105unlock: 112unlock:
106 raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); 113 raw_spin_unlock_irqrestore(&desc->lock, flags);
107 } else if (irq == ACTUAL_NR_IRQS) { 114 } else if (irq == ACTUAL_NR_IRQS) {
108#ifdef CONFIG_SMP 115#ifdef CONFIG_SMP
109 seq_puts(p, "IPI: "); 116 seq_puts(p, "IPI: ");
@@ -142,8 +149,10 @@ handle_irq(int irq)
142 * handled by some other CPU. (or is disabled) 149 * handled by some other CPU. (or is disabled)
143 */ 150 */
144 static unsigned int illegal_count=0; 151 static unsigned int illegal_count=0;
152 struct irq_desc *desc = irq_to_desc(irq);
145 153
146 if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { 154 if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
155 illegal_count < MAX_ILLEGAL_IRQS)) {
147 irq_err_count++; 156 irq_err_count++;
148 illegal_count++; 157 illegal_count++;
149 printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", 158 printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
@@ -151,14 +160,14 @@ handle_irq(int irq)
151 return; 160 return;
152 } 161 }
153 162
154 irq_enter();
155 /* 163 /*
156 * __do_IRQ() must be called with IPL_MAX. Note that we do not 164 * From here we must proceed with IPL_MAX. Note that we do not
157 * explicitly enable interrupts afterwards - some MILO PALcode 165 * explicitly enable interrupts afterwards - some MILO PALcode
158 * (namely LX164 one) seems to have severe problems with RTI 166 * (namely LX164 one) seems to have severe problems with RTI
159 * at IPL 0. 167 * at IPL 0.
160 */ 168 */
161 local_irq_disable(); 169 local_irq_disable();
162 __do_IRQ(irq); 170 irq_enter();
171 generic_handle_irq_desc(irq, desc);
163 irq_exit(); 172 irq_exit();
164} 173}
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index 4c8bb374eb0a..2d0679b60939 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -219,31 +219,23 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
219 * processed by PALcode, and comes in via entInt vector 1. 219 * processed by PALcode, and comes in via entInt vector 1.
220 */ 220 */
221 221
222static void rtc_enable_disable(unsigned int irq) { }
223static unsigned int rtc_startup(unsigned int irq) { return 0; }
224
225struct irqaction timer_irqaction = { 222struct irqaction timer_irqaction = {
226 .handler = timer_interrupt, 223 .handler = timer_interrupt,
227 .flags = IRQF_DISABLED, 224 .flags = IRQF_DISABLED,
228 .name = "timer", 225 .name = "timer",
229}; 226};
230 227
231static struct irq_chip rtc_irq_type = {
232 .name = "RTC",
233 .startup = rtc_startup,
234 .shutdown = rtc_enable_disable,
235 .enable = rtc_enable_disable,
236 .disable = rtc_enable_disable,
237 .ack = rtc_enable_disable,
238 .end = rtc_enable_disable,
239};
240
241void __init 228void __init
242init_rtc_irq(void) 229init_rtc_irq(void)
243{ 230{
244 irq_desc[RTC_IRQ].status = IRQ_DISABLED; 231 struct irq_desc *desc = irq_to_desc(RTC_IRQ);
245 irq_desc[RTC_IRQ].chip = &rtc_irq_type; 232
246 setup_irq(RTC_IRQ, &timer_irqaction); 233 if (desc) {
234 desc->status |= IRQ_DISABLED;
235 set_irq_chip_and_handler_name(RTC_IRQ, &no_irq_chip,
236 handle_simple_irq, "RTC");
237 setup_irq(RTC_IRQ, &timer_irqaction);
238 }
247} 239}
248 240
249/* Dummy irqactions. */ 241/* Dummy irqactions. */
diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c
index 83a9ac280890..956ea0ed1694 100644
--- a/arch/alpha/kernel/irq_i8259.c
+++ b/arch/alpha/kernel/irq_i8259.c
@@ -69,28 +69,11 @@ i8259a_mask_and_ack_irq(unsigned int irq)
69 spin_unlock(&i8259_irq_lock); 69 spin_unlock(&i8259_irq_lock);
70} 70}
71 71
72unsigned int
73i8259a_startup_irq(unsigned int irq)
74{
75 i8259a_enable_irq(irq);
76 return 0; /* never anything pending */
77}
78
79void
80i8259a_end_irq(unsigned int irq)
81{
82 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
83 i8259a_enable_irq(irq);
84}
85
86struct irq_chip i8259a_irq_type = { 72struct irq_chip i8259a_irq_type = {
87 .name = "XT-PIC", 73 .name = "XT-PIC",
88 .startup = i8259a_startup_irq, 74 .unmask = i8259a_enable_irq,
89 .shutdown = i8259a_disable_irq, 75 .mask = i8259a_disable_irq,
90 .enable = i8259a_enable_irq, 76 .mask_ack = i8259a_mask_and_ack_irq,
91 .disable = i8259a_disable_irq,
92 .ack = i8259a_mask_and_ack_irq,
93 .end = i8259a_end_irq,
94}; 77};
95 78
96void __init 79void __init
@@ -107,8 +90,7 @@ init_i8259a_irqs(void)
107 outb(0xff, 0xA1); /* mask all of 8259A-2 */ 90 outb(0xff, 0xA1); /* mask all of 8259A-2 */
108 91
109 for (i = 0; i < 16; i++) { 92 for (i = 0; i < 16; i++) {
110 irq_desc[i].status = IRQ_DISABLED; 93 set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq);
111 irq_desc[i].chip = &i8259a_irq_type;
112 } 94 }
113 95
114 setup_irq(2, &cascade); 96 setup_irq(2, &cascade);
diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c
index 989ce46a0cf3..2863458c853e 100644
--- a/arch/alpha/kernel/irq_pyxis.c
+++ b/arch/alpha/kernel/irq_pyxis.c
@@ -40,20 +40,6 @@ pyxis_disable_irq(unsigned int irq)
40 pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); 40 pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16)));
41} 41}
42 42
43static unsigned int
44pyxis_startup_irq(unsigned int irq)
45{
46 pyxis_enable_irq(irq);
47 return 0;
48}
49
50static void
51pyxis_end_irq(unsigned int irq)
52{
53 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
54 pyxis_enable_irq(irq);
55}
56
57static void 43static void
58pyxis_mask_and_ack_irq(unsigned int irq) 44pyxis_mask_and_ack_irq(unsigned int irq)
59{ 45{
@@ -72,12 +58,9 @@ pyxis_mask_and_ack_irq(unsigned int irq)
72 58
73static struct irq_chip pyxis_irq_type = { 59static struct irq_chip pyxis_irq_type = {
74 .name = "PYXIS", 60 .name = "PYXIS",
75 .startup = pyxis_startup_irq, 61 .mask_ack = pyxis_mask_and_ack_irq,
76 .shutdown = pyxis_disable_irq, 62 .mask = pyxis_disable_irq,
77 .enable = pyxis_enable_irq, 63 .unmask = pyxis_enable_irq,
78 .disable = pyxis_disable_irq,
79 .ack = pyxis_mask_and_ack_irq,
80 .end = pyxis_end_irq,
81}; 64};
82 65
83void 66void
@@ -119,8 +102,8 @@ init_pyxis_irqs(unsigned long ignore_mask)
119 for (i = 16; i < 48; ++i) { 102 for (i = 16; i < 48; ++i) {
120 if ((ignore_mask >> i) & 1) 103 if ((ignore_mask >> i) & 1)
121 continue; 104 continue;
122 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 105 set_irq_chip_and_handler(i, &pyxis_irq_type, handle_level_irq);
123 irq_desc[i].chip = &pyxis_irq_type; 106 irq_to_desc(i)->status |= IRQ_LEVEL;
124 } 107 }
125 108
126 setup_irq(16+7, &isa_cascade_irqaction); 109 setup_irq(16+7, &isa_cascade_irqaction);
diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c
index d63e93e1e8bf..0e57e828b413 100644
--- a/arch/alpha/kernel/irq_srm.c
+++ b/arch/alpha/kernel/irq_srm.c
@@ -33,29 +33,12 @@ srm_disable_irq(unsigned int irq)
33 spin_unlock(&srm_irq_lock); 33 spin_unlock(&srm_irq_lock);
34} 34}
35 35
36static unsigned int
37srm_startup_irq(unsigned int irq)
38{
39 srm_enable_irq(irq);
40 return 0;
41}
42
43static void
44srm_end_irq(unsigned int irq)
45{
46 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
47 srm_enable_irq(irq);
48}
49
50/* Handle interrupts from the SRM, assuming no additional weirdness. */ 36/* Handle interrupts from the SRM, assuming no additional weirdness. */
51static struct irq_chip srm_irq_type = { 37static struct irq_chip srm_irq_type = {
52 .name = "SRM", 38 .name = "SRM",
53 .startup = srm_startup_irq, 39 .unmask = srm_enable_irq,
54 .shutdown = srm_disable_irq, 40 .mask = srm_disable_irq,
55 .enable = srm_enable_irq, 41 .mask_ack = srm_disable_irq,
56 .disable = srm_disable_irq,
57 .ack = srm_disable_irq,
58 .end = srm_end_irq,
59}; 42};
60 43
61void __init 44void __init
@@ -68,8 +51,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
68 for (i = 16; i < max; ++i) { 51 for (i = 16; i < max; ++i) {
69 if (i < 64 && ((ignore_mask >> i) & 1)) 52 if (i < 64 && ((ignore_mask >> i) & 1))
70 continue; 53 continue;
71 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 54 set_irq_chip_and_handler(i, &srm_irq_type, handle_level_irq);
72 irq_desc[i].chip = &srm_irq_type; 55 irq_to_desc(i)->status |= IRQ_LEVEL;
73 } 56 }
74} 57}
75 58
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 547e8b84b2f7..fe698b5045e9 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -951,9 +951,6 @@ SYSCALL_DEFINE2(osf_utimes, const char __user *, filename,
951 return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); 951 return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0);
952} 952}
953 953
954#define MAX_SELECT_SECONDS \
955 ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
956
957SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp, 954SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp,
958 fd_set __user *, exp, struct timeval32 __user *, tvp) 955 fd_set __user *, exp, struct timeval32 __user *, tvp)
959{ 956{
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
index 20a30b8b9655..7bef61768236 100644
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -65,13 +65,6 @@ alcor_mask_and_ack_irq(unsigned int irq)
65 *(vuip)GRU_INT_CLEAR = 0; mb(); 65 *(vuip)GRU_INT_CLEAR = 0; mb();
66} 66}
67 67
68static unsigned int
69alcor_startup_irq(unsigned int irq)
70{
71 alcor_enable_irq(irq);
72 return 0;
73}
74
75static void 68static void
76alcor_isa_mask_and_ack_irq(unsigned int irq) 69alcor_isa_mask_and_ack_irq(unsigned int irq)
77{ 70{
@@ -82,21 +75,11 @@ alcor_isa_mask_and_ack_irq(unsigned int irq)
82 *(vuip)GRU_INT_CLEAR = 0; mb(); 75 *(vuip)GRU_INT_CLEAR = 0; mb();
83} 76}
84 77
85static void
86alcor_end_irq(unsigned int irq)
87{
88 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
89 alcor_enable_irq(irq);
90}
91
92static struct irq_chip alcor_irq_type = { 78static struct irq_chip alcor_irq_type = {
93 .name = "ALCOR", 79 .name = "ALCOR",
94 .startup = alcor_startup_irq, 80 .unmask = alcor_enable_irq,
95 .shutdown = alcor_disable_irq, 81 .mask = alcor_disable_irq,
96 .enable = alcor_enable_irq, 82 .mask_ack = alcor_mask_and_ack_irq,
97 .disable = alcor_disable_irq,
98 .ack = alcor_mask_and_ack_irq,
99 .end = alcor_end_irq,
100}; 83};
101 84
102static void 85static void
@@ -142,8 +125,8 @@ alcor_init_irq(void)
142 on while IRQ probing. */ 125 on while IRQ probing. */
143 if (i >= 16+20 && i <= 16+30) 126 if (i >= 16+20 && i <= 16+30)
144 continue; 127 continue;
145 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 128 set_irq_chip_and_handler(i, &alcor_irq_type, handle_level_irq);
146 irq_desc[i].chip = &alcor_irq_type; 129 irq_to_desc(i)->status |= IRQ_LEVEL;
147 } 130 }
148 i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; 131 i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
149 132
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index 14c8898d19ec..b0c916493aea 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -57,28 +57,11 @@ cabriolet_disable_irq(unsigned int irq)
57 cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq); 57 cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq);
58} 58}
59 59
60static unsigned int
61cabriolet_startup_irq(unsigned int irq)
62{
63 cabriolet_enable_irq(irq);
64 return 0; /* never anything pending */
65}
66
67static void
68cabriolet_end_irq(unsigned int irq)
69{
70 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
71 cabriolet_enable_irq(irq);
72}
73
74static struct irq_chip cabriolet_irq_type = { 60static struct irq_chip cabriolet_irq_type = {
75 .name = "CABRIOLET", 61 .name = "CABRIOLET",
76 .startup = cabriolet_startup_irq, 62 .unmask = cabriolet_enable_irq,
77 .shutdown = cabriolet_disable_irq, 63 .mask = cabriolet_disable_irq,
78 .enable = cabriolet_enable_irq, 64 .mask_ack = cabriolet_disable_irq,
79 .disable = cabriolet_disable_irq,
80 .ack = cabriolet_disable_irq,
81 .end = cabriolet_end_irq,
82}; 65};
83 66
84static void 67static void
@@ -122,8 +105,9 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
122 outb(0xff, 0x806); 105 outb(0xff, 0x806);
123 106
124 for (i = 16; i < 35; ++i) { 107 for (i = 16; i < 35; ++i) {
125 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 108 set_irq_chip_and_handler(i, &cabriolet_irq_type,
126 irq_desc[i].chip = &cabriolet_irq_type; 109 handle_level_irq);
110 irq_to_desc(i)->status |= IRQ_LEVEL;
127 } 111 }
128 } 112 }
129 113
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index 4026502ab707..edad5f759ccd 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -115,20 +115,6 @@ dp264_disable_irq(unsigned int irq)
115 spin_unlock(&dp264_irq_lock); 115 spin_unlock(&dp264_irq_lock);
116} 116}
117 117
118static unsigned int
119dp264_startup_irq(unsigned int irq)
120{
121 dp264_enable_irq(irq);
122 return 0; /* never anything pending */
123}
124
125static void
126dp264_end_irq(unsigned int irq)
127{
128 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
129 dp264_enable_irq(irq);
130}
131
132static void 118static void
133clipper_enable_irq(unsigned int irq) 119clipper_enable_irq(unsigned int irq)
134{ 120{
@@ -147,20 +133,6 @@ clipper_disable_irq(unsigned int irq)
147 spin_unlock(&dp264_irq_lock); 133 spin_unlock(&dp264_irq_lock);
148} 134}
149 135
150static unsigned int
151clipper_startup_irq(unsigned int irq)
152{
153 clipper_enable_irq(irq);
154 return 0; /* never anything pending */
155}
156
157static void
158clipper_end_irq(unsigned int irq)
159{
160 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
161 clipper_enable_irq(irq);
162}
163
164static void 136static void
165cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) 137cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
166{ 138{
@@ -200,23 +172,17 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
200 172
201static struct irq_chip dp264_irq_type = { 173static struct irq_chip dp264_irq_type = {
202 .name = "DP264", 174 .name = "DP264",
203 .startup = dp264_startup_irq, 175 .unmask = dp264_enable_irq,
204 .shutdown = dp264_disable_irq, 176 .mask = dp264_disable_irq,
205 .enable = dp264_enable_irq, 177 .mask_ack = dp264_disable_irq,
206 .disable = dp264_disable_irq,
207 .ack = dp264_disable_irq,
208 .end = dp264_end_irq,
209 .set_affinity = dp264_set_affinity, 178 .set_affinity = dp264_set_affinity,
210}; 179};
211 180
212static struct irq_chip clipper_irq_type = { 181static struct irq_chip clipper_irq_type = {
213 .name = "CLIPPER", 182 .name = "CLIPPER",
214 .startup = clipper_startup_irq, 183 .unmask = clipper_enable_irq,
215 .shutdown = clipper_disable_irq, 184 .mask = clipper_disable_irq,
216 .enable = clipper_enable_irq, 185 .mask_ack = clipper_disable_irq,
217 .disable = clipper_disable_irq,
218 .ack = clipper_disable_irq,
219 .end = clipper_end_irq,
220 .set_affinity = clipper_set_affinity, 186 .set_affinity = clipper_set_affinity,
221}; 187};
222 188
@@ -302,8 +268,8 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
302{ 268{
303 long i; 269 long i;
304 for (i = imin; i <= imax; ++i) { 270 for (i = imin; i <= imax; ++i) {
305 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 271 irq_to_desc(i)->status |= IRQ_LEVEL;
306 irq_desc[i].chip = ops; 272 set_irq_chip_and_handler(i, ops, handle_level_irq);
307 } 273 }
308} 274}
309 275
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c
index df2090ce5e7f..ae5f29d127b0 100644
--- a/arch/alpha/kernel/sys_eb64p.c
+++ b/arch/alpha/kernel/sys_eb64p.c
@@ -55,28 +55,11 @@ eb64p_disable_irq(unsigned int irq)
55 eb64p_update_irq_hw(irq, cached_irq_mask |= 1 << irq); 55 eb64p_update_irq_hw(irq, cached_irq_mask |= 1 << irq);
56} 56}
57 57
58static unsigned int
59eb64p_startup_irq(unsigned int irq)
60{
61 eb64p_enable_irq(irq);
62 return 0; /* never anything pending */
63}
64
65static void
66eb64p_end_irq(unsigned int irq)
67{
68 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
69 eb64p_enable_irq(irq);
70}
71
72static struct irq_chip eb64p_irq_type = { 58static struct irq_chip eb64p_irq_type = {
73 .name = "EB64P", 59 .name = "EB64P",
74 .startup = eb64p_startup_irq, 60 .unmask = eb64p_enable_irq,
75 .shutdown = eb64p_disable_irq, 61 .mask = eb64p_disable_irq,
76 .enable = eb64p_enable_irq, 62 .mask_ack = eb64p_disable_irq,
77 .disable = eb64p_disable_irq,
78 .ack = eb64p_disable_irq,
79 .end = eb64p_end_irq,
80}; 63};
81 64
82static void 65static void
@@ -135,8 +118,8 @@ eb64p_init_irq(void)
135 init_i8259a_irqs(); 118 init_i8259a_irqs();
136 119
137 for (i = 16; i < 32; ++i) { 120 for (i = 16; i < 32; ++i) {
138 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 121 irq_to_desc(i)->status |= IRQ_LEVEL;
139 irq_desc[i].chip = &eb64p_irq_type; 122 set_irq_chip_and_handler(i, &eb64p_irq_type, handle_level_irq);
140 } 123 }
141 124
142 common_init_isa_dma(); 125 common_init_isa_dma();
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c
index 3ca1dbcf4044..1121bc5c6c6c 100644
--- a/arch/alpha/kernel/sys_eiger.c
+++ b/arch/alpha/kernel/sys_eiger.c
@@ -66,28 +66,11 @@ eiger_disable_irq(unsigned int irq)
66 eiger_update_irq_hw(irq, mask); 66 eiger_update_irq_hw(irq, mask);
67} 67}
68 68
69static unsigned int
70eiger_startup_irq(unsigned int irq)
71{
72 eiger_enable_irq(irq);
73 return 0; /* never anything pending */
74}
75
76static void
77eiger_end_irq(unsigned int irq)
78{
79 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
80 eiger_enable_irq(irq);
81}
82
83static struct irq_chip eiger_irq_type = { 69static struct irq_chip eiger_irq_type = {
84 .name = "EIGER", 70 .name = "EIGER",
85 .startup = eiger_startup_irq, 71 .unmask = eiger_enable_irq,
86 .shutdown = eiger_disable_irq, 72 .mask = eiger_disable_irq,
87 .enable = eiger_enable_irq, 73 .mask_ack = eiger_disable_irq,
88 .disable = eiger_disable_irq,
89 .ack = eiger_disable_irq,
90 .end = eiger_end_irq,
91}; 74};
92 75
93static void 76static void
@@ -153,8 +136,8 @@ eiger_init_irq(void)
153 init_i8259a_irqs(); 136 init_i8259a_irqs();
154 137
155 for (i = 16; i < 128; ++i) { 138 for (i = 16; i < 128; ++i) {
156 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 139 irq_to_desc(i)->status |= IRQ_LEVEL;
157 irq_desc[i].chip = &eiger_irq_type; 140 set_irq_chip_and_handler(i, &eiger_irq_type, handle_level_irq);
158 } 141 }
159} 142}
160 143
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index 7a7ae36fff91..34f55e03d331 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -62,30 +62,6 @@
62 * world. 62 * world.
63 */ 63 */
64 64
65static unsigned int
66jensen_local_startup(unsigned int irq)
67{
68 /* the parport is really hw IRQ 1, silly Jensen. */
69 if (irq == 7)
70 i8259a_startup_irq(1);
71 else
72 /*
73 * For all true local interrupts, set the flag that prevents
74 * the IPL from being dropped during handler processing.
75 */
76 if (irq_desc[irq].action)
77 irq_desc[irq].action->flags |= IRQF_DISABLED;
78 return 0;
79}
80
81static void
82jensen_local_shutdown(unsigned int irq)
83{
84 /* the parport is really hw IRQ 1, silly Jensen. */
85 if (irq == 7)
86 i8259a_disable_irq(1);
87}
88
89static void 65static void
90jensen_local_enable(unsigned int irq) 66jensen_local_enable(unsigned int irq)
91{ 67{
@@ -103,29 +79,18 @@ jensen_local_disable(unsigned int irq)
103} 79}
104 80
105static void 81static void
106jensen_local_ack(unsigned int irq) 82jensen_local_mask_ack(unsigned int irq)
107{ 83{
108 /* the parport is really hw IRQ 1, silly Jensen. */ 84 /* the parport is really hw IRQ 1, silly Jensen. */
109 if (irq == 7) 85 if (irq == 7)
110 i8259a_mask_and_ack_irq(1); 86 i8259a_mask_and_ack_irq(1);
111} 87}
112 88
113static void
114jensen_local_end(unsigned int irq)
115{
116 /* the parport is really hw IRQ 1, silly Jensen. */
117 if (irq == 7)
118 i8259a_end_irq(1);
119}
120
121static struct irq_chip jensen_local_irq_type = { 89static struct irq_chip jensen_local_irq_type = {
122 .name = "LOCAL", 90 .name = "LOCAL",
123 .startup = jensen_local_startup, 91 .unmask = jensen_local_enable,
124 .shutdown = jensen_local_shutdown, 92 .mask = jensen_local_disable,
125 .enable = jensen_local_enable, 93 .mask_ack = jensen_local_mask_ack,
126 .disable = jensen_local_disable,
127 .ack = jensen_local_ack,
128 .end = jensen_local_end,
129}; 94};
130 95
131static void 96static void
@@ -158,7 +123,7 @@ jensen_device_interrupt(unsigned long vector)
158 } 123 }
159 124
160 /* If there is no handler yet... */ 125 /* If there is no handler yet... */
161 if (irq_desc[irq].action == NULL) { 126 if (!irq_has_action(irq)) {
162 /* If it is a local interrupt that cannot be masked... */ 127 /* If it is a local interrupt that cannot be masked... */
163 if (vector >= 0x900) 128 if (vector >= 0x900)
164 { 129 {
@@ -206,11 +171,11 @@ jensen_init_irq(void)
206{ 171{
207 init_i8259a_irqs(); 172 init_i8259a_irqs();
208 173
209 irq_desc[1].chip = &jensen_local_irq_type; 174 set_irq_chip_and_handler(1, &jensen_local_irq_type, handle_level_irq);
210 irq_desc[4].chip = &jensen_local_irq_type; 175 set_irq_chip_and_handler(4, &jensen_local_irq_type, handle_level_irq);
211 irq_desc[3].chip = &jensen_local_irq_type; 176 set_irq_chip_and_handler(3, &jensen_local_irq_type, handle_level_irq);
212 irq_desc[7].chip = &jensen_local_irq_type; 177 set_irq_chip_and_handler(7, &jensen_local_irq_type, handle_level_irq);
213 irq_desc[9].chip = &jensen_local_irq_type; 178 set_irq_chip_and_handler(9, &jensen_local_irq_type, handle_level_irq);
214 179
215 common_init_isa_dma(); 180 common_init_isa_dma();
216} 181}
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 0bb3b5c4f693..2bfc9f1b1ddc 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -143,20 +143,6 @@ io7_disable_irq(unsigned int irq)
143 spin_unlock(&io7->irq_lock); 143 spin_unlock(&io7->irq_lock);
144} 144}
145 145
146static unsigned int
147io7_startup_irq(unsigned int irq)
148{
149 io7_enable_irq(irq);
150 return 0; /* never anything pending */
151}
152
153static void
154io7_end_irq(unsigned int irq)
155{
156 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
157 io7_enable_irq(irq);
158}
159
160static void 146static void
161marvel_irq_noop(unsigned int irq) 147marvel_irq_noop(unsigned int irq)
162{ 148{
@@ -171,32 +157,22 @@ marvel_irq_noop_return(unsigned int irq)
171 157
172static struct irq_chip marvel_legacy_irq_type = { 158static struct irq_chip marvel_legacy_irq_type = {
173 .name = "LEGACY", 159 .name = "LEGACY",
174 .startup = marvel_irq_noop_return, 160 .mask = marvel_irq_noop,
175 .shutdown = marvel_irq_noop, 161 .unmask = marvel_irq_noop,
176 .enable = marvel_irq_noop,
177 .disable = marvel_irq_noop,
178 .ack = marvel_irq_noop,
179 .end = marvel_irq_noop,
180}; 162};
181 163
182static struct irq_chip io7_lsi_irq_type = { 164static struct irq_chip io7_lsi_irq_type = {
183 .name = "LSI", 165 .name = "LSI",
184 .startup = io7_startup_irq, 166 .unmask = io7_enable_irq,
185 .shutdown = io7_disable_irq, 167 .mask = io7_disable_irq,
186 .enable = io7_enable_irq, 168 .mask_ack = io7_disable_irq,
187 .disable = io7_disable_irq,
188 .ack = io7_disable_irq,
189 .end = io7_end_irq,
190}; 169};
191 170
192static struct irq_chip io7_msi_irq_type = { 171static struct irq_chip io7_msi_irq_type = {
193 .name = "MSI", 172 .name = "MSI",
194 .startup = io7_startup_irq, 173 .unmask = io7_enable_irq,
195 .shutdown = io7_disable_irq, 174 .mask = io7_disable_irq,
196 .enable = io7_enable_irq,
197 .disable = io7_disable_irq,
198 .ack = marvel_irq_noop, 175 .ack = marvel_irq_noop,
199 .end = io7_end_irq,
200}; 176};
201 177
202static void 178static void
@@ -304,8 +280,8 @@ init_io7_irqs(struct io7 *io7,
304 280
305 /* Set up the lsi irqs. */ 281 /* Set up the lsi irqs. */
306 for (i = 0; i < 128; ++i) { 282 for (i = 0; i < 128; ++i) {
307 irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; 283 irq_to_desc(base + i)->status |= IRQ_LEVEL;
308 irq_desc[base + i].chip = lsi_ops; 284 set_irq_chip_and_handler(base + i, lsi_ops, handle_level_irq);
309 } 285 }
310 286
311 /* Disable the implemented irqs in hardware. */ 287 /* Disable the implemented irqs in hardware. */
@@ -318,8 +294,8 @@ init_io7_irqs(struct io7 *io7,
318 294
319 /* Set up the msi irqs. */ 295 /* Set up the msi irqs. */
320 for (i = 128; i < (128 + 512); ++i) { 296 for (i = 128; i < (128 + 512); ++i) {
321 irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; 297 irq_to_desc(base + i)->status |= IRQ_LEVEL;
322 irq_desc[base + i].chip = msi_ops; 298 set_irq_chip_and_handler(base + i, msi_ops, handle_level_irq);
323 } 299 }
324 300
325 for (i = 0; i < 16; ++i) 301 for (i = 0; i < 16; ++i)
@@ -336,8 +312,8 @@ marvel_init_irq(void)
336 312
337 /* Reserve the legacy irqs. */ 313 /* Reserve the legacy irqs. */
338 for (i = 0; i < 16; ++i) { 314 for (i = 0; i < 16; ++i) {
339 irq_desc[i].status = IRQ_DISABLED; 315 set_irq_chip_and_handler(i, &marvel_legacy_irq_type,
340 irq_desc[i].chip = &marvel_legacy_irq_type; 316 handle_level_irq);
341 } 317 }
342 318
343 /* Init the io7 irqs. */ 319 /* Init the io7 irqs. */
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index ee8865169811..bcc1639e8efb 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -54,28 +54,11 @@ mikasa_disable_irq(unsigned int irq)
54 mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (irq - 16))); 54 mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (irq - 16)));
55} 55}
56 56
57static unsigned int
58mikasa_startup_irq(unsigned int irq)
59{
60 mikasa_enable_irq(irq);
61 return 0;
62}
63
64static void
65mikasa_end_irq(unsigned int irq)
66{
67 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
68 mikasa_enable_irq(irq);
69}
70
71static struct irq_chip mikasa_irq_type = { 57static struct irq_chip mikasa_irq_type = {
72 .name = "MIKASA", 58 .name = "MIKASA",
73 .startup = mikasa_startup_irq, 59 .unmask = mikasa_enable_irq,
74 .shutdown = mikasa_disable_irq, 60 .mask = mikasa_disable_irq,
75 .enable = mikasa_enable_irq, 61 .mask_ack = mikasa_disable_irq,
76 .disable = mikasa_disable_irq,
77 .ack = mikasa_disable_irq,
78 .end = mikasa_end_irq,
79}; 62};
80 63
81static void 64static void
@@ -115,8 +98,8 @@ mikasa_init_irq(void)
115 mikasa_update_irq_hw(0); 98 mikasa_update_irq_hw(0);
116 99
117 for (i = 16; i < 32; ++i) { 100 for (i = 16; i < 32; ++i) {
118 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 101 irq_to_desc(i)->status |= IRQ_LEVEL;
119 irq_desc[i].chip = &mikasa_irq_type; 102 set_irq_chip_and_handler(i, &mikasa_irq_type, handle_level_irq);
120 } 103 }
121 104
122 init_i8259a_irqs(); 105 init_i8259a_irqs();
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index 86503fe73a88..e88f4ae1260e 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -59,28 +59,11 @@ noritake_disable_irq(unsigned int irq)
59 noritake_update_irq_hw(irq, cached_irq_mask &= ~(1 << (irq - 16))); 59 noritake_update_irq_hw(irq, cached_irq_mask &= ~(1 << (irq - 16)));
60} 60}
61 61
62static unsigned int
63noritake_startup_irq(unsigned int irq)
64{
65 noritake_enable_irq(irq);
66 return 0;
67}
68
69static void
70noritake_end_irq(unsigned int irq)
71{
72 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
73 noritake_enable_irq(irq);
74}
75
76static struct irq_chip noritake_irq_type = { 62static struct irq_chip noritake_irq_type = {
77 .name = "NORITAKE", 63 .name = "NORITAKE",
78 .startup = noritake_startup_irq, 64 .unmask = noritake_enable_irq,
79 .shutdown = noritake_disable_irq, 65 .mask = noritake_disable_irq,
80 .enable = noritake_enable_irq, 66 .mask_ack = noritake_disable_irq,
81 .disable = noritake_disable_irq,
82 .ack = noritake_disable_irq,
83 .end = noritake_end_irq,
84}; 67};
85 68
86static void 69static void
@@ -144,8 +127,8 @@ noritake_init_irq(void)
144 outw(0, 0x54c); 127 outw(0, 0x54c);
145 128
146 for (i = 16; i < 48; ++i) { 129 for (i = 16; i < 48; ++i) {
147 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 130 irq_to_desc(i)->status |= IRQ_LEVEL;
148 irq_desc[i].chip = &noritake_irq_type; 131 set_irq_chip_and_handler(i, &noritake_irq_type, handle_level_irq);
149 } 132 }
150 133
151 init_i8259a_irqs(); 134 init_i8259a_irqs();
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c
index 26c322bf89ee..6a51364dd1cc 100644
--- a/arch/alpha/kernel/sys_rawhide.c
+++ b/arch/alpha/kernel/sys_rawhide.c
@@ -121,28 +121,11 @@ rawhide_mask_and_ack_irq(unsigned int irq)
121 spin_unlock(&rawhide_irq_lock); 121 spin_unlock(&rawhide_irq_lock);
122} 122}
123 123
124static unsigned int
125rawhide_startup_irq(unsigned int irq)
126{
127 rawhide_enable_irq(irq);
128 return 0;
129}
130
131static void
132rawhide_end_irq(unsigned int irq)
133{
134 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
135 rawhide_enable_irq(irq);
136}
137
138static struct irq_chip rawhide_irq_type = { 124static struct irq_chip rawhide_irq_type = {
139 .name = "RAWHIDE", 125 .name = "RAWHIDE",
140 .startup = rawhide_startup_irq, 126 .unmask = rawhide_enable_irq,
141 .shutdown = rawhide_disable_irq, 127 .mask = rawhide_disable_irq,
142 .enable = rawhide_enable_irq, 128 .mask_ack = rawhide_mask_and_ack_irq,
143 .disable = rawhide_disable_irq,
144 .ack = rawhide_mask_and_ack_irq,
145 .end = rawhide_end_irq,
146}; 129};
147 130
148static void 131static void
@@ -194,8 +177,8 @@ rawhide_init_irq(void)
194 } 177 }
195 178
196 for (i = 16; i < 128; ++i) { 179 for (i = 16; i < 128; ++i) {
197 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 180 irq_to_desc(i)->status |= IRQ_LEVEL;
198 irq_desc[i].chip = &rawhide_irq_type; 181 set_irq_chip_and_handler(i, &rawhide_irq_type, handle_level_irq);
199 } 182 }
200 183
201 init_i8259a_irqs(); 184 init_i8259a_irqs();
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c
index be161129eab9..89e7e37ec84c 100644
--- a/arch/alpha/kernel/sys_rx164.c
+++ b/arch/alpha/kernel/sys_rx164.c
@@ -58,28 +58,11 @@ rx164_disable_irq(unsigned int irq)
58 rx164_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); 58 rx164_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16)));
59} 59}
60 60
61static unsigned int
62rx164_startup_irq(unsigned int irq)
63{
64 rx164_enable_irq(irq);
65 return 0;
66}
67
68static void
69rx164_end_irq(unsigned int irq)
70{
71 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
72 rx164_enable_irq(irq);
73}
74
75static struct irq_chip rx164_irq_type = { 61static struct irq_chip rx164_irq_type = {
76 .name = "RX164", 62 .name = "RX164",
77 .startup = rx164_startup_irq, 63 .unmask = rx164_enable_irq,
78 .shutdown = rx164_disable_irq, 64 .mask = rx164_disable_irq,
79 .enable = rx164_enable_irq, 65 .mask_ack = rx164_disable_irq,
80 .disable = rx164_disable_irq,
81 .ack = rx164_disable_irq,
82 .end = rx164_end_irq,
83}; 66};
84 67
85static void 68static void
@@ -116,8 +99,8 @@ rx164_init_irq(void)
116 99
117 rx164_update_irq_hw(0); 100 rx164_update_irq_hw(0);
118 for (i = 16; i < 40; ++i) { 101 for (i = 16; i < 40; ++i) {
119 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 102 irq_to_desc(i)->status |= IRQ_LEVEL;
120 irq_desc[i].chip = &rx164_irq_type; 103 set_irq_chip_and_handler(i, &rx164_irq_type, handle_level_irq);
121 } 104 }
122 105
123 init_i8259a_irqs(); 106 init_i8259a_irqs();
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index b2abe27a23cf..5c4423d1b06c 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -474,20 +474,6 @@ sable_lynx_disable_irq(unsigned int irq)
474#endif 474#endif
475} 475}
476 476
477static unsigned int
478sable_lynx_startup_irq(unsigned int irq)
479{
480 sable_lynx_enable_irq(irq);
481 return 0;
482}
483
484static void
485sable_lynx_end_irq(unsigned int irq)
486{
487 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
488 sable_lynx_enable_irq(irq);
489}
490
491static void 477static void
492sable_lynx_mask_and_ack_irq(unsigned int irq) 478sable_lynx_mask_and_ack_irq(unsigned int irq)
493{ 479{
@@ -503,12 +489,9 @@ sable_lynx_mask_and_ack_irq(unsigned int irq)
503 489
504static struct irq_chip sable_lynx_irq_type = { 490static struct irq_chip sable_lynx_irq_type = {
505 .name = "SABLE/LYNX", 491 .name = "SABLE/LYNX",
506 .startup = sable_lynx_startup_irq, 492 .unmask = sable_lynx_enable_irq,
507 .shutdown = sable_lynx_disable_irq, 493 .mask = sable_lynx_disable_irq,
508 .enable = sable_lynx_enable_irq, 494 .mask_ack = sable_lynx_mask_and_ack_irq,
509 .disable = sable_lynx_disable_irq,
510 .ack = sable_lynx_mask_and_ack_irq,
511 .end = sable_lynx_end_irq,
512}; 495};
513 496
514static void 497static void
@@ -535,8 +518,9 @@ sable_lynx_init_irq(int nr_of_irqs)
535 long i; 518 long i;
536 519
537 for (i = 0; i < nr_of_irqs; ++i) { 520 for (i = 0; i < nr_of_irqs; ++i) {
538 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 521 irq_to_desc(i)->status |= IRQ_LEVEL;
539 irq_desc[i].chip = &sable_lynx_irq_type; 522 set_irq_chip_and_handler(i, &sable_lynx_irq_type,
523 handle_level_irq);
540 } 524 }
541 525
542 common_init_isa_dma(); 526 common_init_isa_dma();
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index 4da596b6adbb..f8a1e8a862fb 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -60,28 +60,11 @@ takara_disable_irq(unsigned int irq)
60 takara_update_irq_hw(irq, mask); 60 takara_update_irq_hw(irq, mask);
61} 61}
62 62
63static unsigned int
64takara_startup_irq(unsigned int irq)
65{
66 takara_enable_irq(irq);
67 return 0; /* never anything pending */
68}
69
70static void
71takara_end_irq(unsigned int irq)
72{
73 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
74 takara_enable_irq(irq);
75}
76
77static struct irq_chip takara_irq_type = { 63static struct irq_chip takara_irq_type = {
78 .name = "TAKARA", 64 .name = "TAKARA",
79 .startup = takara_startup_irq, 65 .unmask = takara_enable_irq,
80 .shutdown = takara_disable_irq, 66 .mask = takara_disable_irq,
81 .enable = takara_enable_irq, 67 .mask_ack = takara_disable_irq,
82 .disable = takara_disable_irq,
83 .ack = takara_disable_irq,
84 .end = takara_end_irq,
85}; 68};
86 69
87static void 70static void
@@ -153,8 +136,8 @@ takara_init_irq(void)
153 takara_update_irq_hw(i, -1); 136 takara_update_irq_hw(i, -1);
154 137
155 for (i = 16; i < 128; ++i) { 138 for (i = 16; i < 128; ++i) {
156 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 139 irq_to_desc(i)->status |= IRQ_LEVEL;
157 irq_desc[i].chip = &takara_irq_type; 140 set_irq_chip_and_handler(i, &takara_irq_type, handle_level_irq);
158 } 141 }
159 142
160 common_init_isa_dma(); 143 common_init_isa_dma();
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 9008d0f20c53..e02494bf5ef3 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -129,20 +129,6 @@ titan_disable_irq(unsigned int irq)
129 spin_unlock(&titan_irq_lock); 129 spin_unlock(&titan_irq_lock);
130} 130}
131 131
132static unsigned int
133titan_startup_irq(unsigned int irq)
134{
135 titan_enable_irq(irq);
136 return 0; /* never anything pending */
137}
138
139static void
140titan_end_irq(unsigned int irq)
141{
142 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
143 titan_enable_irq(irq);
144}
145
146static void 132static void
147titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) 133titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
148{ 134{
@@ -189,20 +175,17 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
189{ 175{
190 long i; 176 long i;
191 for (i = imin; i <= imax; ++i) { 177 for (i = imin; i <= imax; ++i) {
192 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 178 irq_to_desc(i)->status |= IRQ_LEVEL;
193 irq_desc[i].chip = ops; 179 set_irq_chip_and_handler(i, ops, handle_level_irq);
194 } 180 }
195} 181}
196 182
197static struct irq_chip titan_irq_type = { 183static struct irq_chip titan_irq_type = {
198 .name = "TITAN", 184 .name = "TITAN",
199 .startup = titan_startup_irq, 185 .unmask = titan_enable_irq,
200 .shutdown = titan_disable_irq, 186 .mask = titan_disable_irq,
201 .enable = titan_enable_irq, 187 .mask_ack = titan_disable_irq,
202 .disable = titan_disable_irq, 188 .set_affinity = titan_set_irq_affinity,
203 .ack = titan_disable_irq,
204 .end = titan_end_irq,
205 .set_affinity = titan_set_irq_affinity,
206}; 189};
207 190
208static irqreturn_t 191static irqreturn_t
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c
index 62fd972e18ef..eec52594d410 100644
--- a/arch/alpha/kernel/sys_wildfire.c
+++ b/arch/alpha/kernel/sys_wildfire.c
@@ -139,32 +139,11 @@ wildfire_mask_and_ack_irq(unsigned int irq)
139 spin_unlock(&wildfire_irq_lock); 139 spin_unlock(&wildfire_irq_lock);
140} 140}
141 141
142static unsigned int
143wildfire_startup_irq(unsigned int irq)
144{
145 wildfire_enable_irq(irq);
146 return 0; /* never anything pending */
147}
148
149static void
150wildfire_end_irq(unsigned int irq)
151{
152#if 0
153 if (!irq_desc[irq].action)
154 printk("got irq %d\n", irq);
155#endif
156 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
157 wildfire_enable_irq(irq);
158}
159
160static struct irq_chip wildfire_irq_type = { 142static struct irq_chip wildfire_irq_type = {
161 .name = "WILDFIRE", 143 .name = "WILDFIRE",
162 .startup = wildfire_startup_irq, 144 .unmask = wildfire_enable_irq,
163 .shutdown = wildfire_disable_irq, 145 .mask = wildfire_disable_irq,
164 .enable = wildfire_enable_irq, 146 .mask_ack = wildfire_mask_and_ack_irq,
165 .disable = wildfire_disable_irq,
166 .ack = wildfire_mask_and_ack_irq,
167 .end = wildfire_end_irq,
168}; 147};
169 148
170static void __init 149static void __init
@@ -198,15 +177,18 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
198 for (i = 0; i < 16; ++i) { 177 for (i = 0; i < 16; ++i) {
199 if (i == 2) 178 if (i == 2)
200 continue; 179 continue;
201 irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 180 irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
202 irq_desc[i+irq_bias].chip = &wildfire_irq_type; 181 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
182 handle_level_irq);
203 } 183 }
204 184
205 irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 185 irq_to_desc(36+irq_bias)->status |= IRQ_LEVEL;
206 irq_desc[36+irq_bias].chip = &wildfire_irq_type; 186 set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type,
187 handle_level_irq);
207 for (i = 40; i < 64; ++i) { 188 for (i = 40; i < 64; ++i) {
208 irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 189 irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
209 irq_desc[i+irq_bias].chip = &wildfire_irq_type; 190 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
191 handle_level_irq);
210 } 192 }
211 193
212 setup_irq(32+irq_bias, &isa_enable); 194 setup_irq(32+irq_bias, &isa_enable);
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
index 9b72c59c95be..c0a83ab62b78 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -2,8 +2,8 @@
2# Makefile for alpha-specific library files.. 2# Makefile for alpha-specific library files..
3# 3#
4 4
5EXTRA_AFLAGS := $(KBUILD_CFLAGS) 5asflags-y := $(KBUILD_CFLAGS)
6EXTRA_CFLAGS := -Werror 6ccflags-y := -Werror
7 7
8# Many of these routines have implementations tuned for ev6. 8# Many of these routines have implementations tuned for ev6.
9# Choose them iff we're targeting ev6 specifically. 9# Choose them iff we're targeting ev6 specifically.
diff --git a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile
index 359ef087e69e..7f4671995245 100644
--- a/arch/alpha/math-emu/Makefile
+++ b/arch/alpha/math-emu/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the FPU instruction emulation. 2# Makefile for the FPU instruction emulation.
3# 3#
4 4
5EXTRA_CFLAGS := -w 5ccflags-y := -w
6 6
7obj-$(CONFIG_MATHEMU) += math-emu.o 7obj-$(CONFIG_MATHEMU) += math-emu.o
8 8
diff --git a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile
index 09399c5386cb..c993d3f93cf6 100644
--- a/arch/alpha/mm/Makefile
+++ b/arch/alpha/mm/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the linux alpha-specific parts of the memory manager. 2# Makefile for the linux alpha-specific parts of the memory manager.
3# 3#
4 4
5EXTRA_CFLAGS := -Werror 5ccflags-y := -Werror
6 6
7obj-y := init.o fault.o extable.o 7obj-y := init.o fault.o extable.o
8 8
diff --git a/arch/alpha/oprofile/Makefile b/arch/alpha/oprofile/Makefile
index 4aa56247bdc6..3473de751b03 100644
--- a/arch/alpha/oprofile/Makefile
+++ b/arch/alpha/oprofile/Makefile
@@ -1,4 +1,4 @@
1EXTRA_CFLAGS := -Werror -Wno-sign-compare 1ccflags-y := -Werror -Wno-sign-compare
2 2
3obj-$(CONFIG_OPROFILE) += oprofile.o 3obj-$(CONFIG_OPROFILE) += oprofile.o
4 4