Commit 35f3c5185b1e28e6591aa649db8bf4fa16f1a7f3

Authored by Paul Mundt
1 parent a700f3594d

sh: Updates for IRQ handler changes.

Trivial fixes for build breakage introduced by IRQ handler changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Showing 20 changed files with 46 additions and 37 deletions Side-by-side Diff

arch/sh/boards/hp6xx/hp6xx_apm.c
... ... @@ -83,7 +83,7 @@
83 83 return p - buf;
84 84 }
85 85  
86   -static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev, struct pt_regs *regs)
  86 +static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
87 87 {
88 88 if (!apm_suspended)
89 89 apm_queue_event(APM_USER_SUSPEND);
... ... @@ -96,7 +96,7 @@
96 96 int ret;
97 97  
98 98 ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
99   - SA_INTERRUPT, MODNAME, 0);
  99 + IRQF_DISABLED, MODNAME, 0);
100 100 if (unlikely(ret < 0)) {
101 101 printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
102 102 HP680_BTN_IRQ);
arch/sh/boards/landisk/landisk_pwb.c
... ... @@ -135,7 +135,7 @@
135 135 return count;
136 136 }
137 137  
138   -static irqreturn_t sw_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  138 +static irqreturn_t sw_interrupt(int irq, void *dev_id)
139 139 {
140 140 landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
141 141 disable_irq(IRQ_BUTTON);
arch/sh/boards/mpc1211/setup.c
... ... @@ -69,7 +69,6 @@
69 69  
70 70 static unsigned char m_irq_mask = 0xfb;
71 71 static unsigned char s_irq_mask = 0xff;
72   -volatile unsigned long irq_err_count;
73 72  
74 73 static void disable_mpc1211_irq(unsigned int irq)
75 74 {
... ... @@ -118,7 +117,7 @@
118 117 if(irq < 8) {
119 118 if(m_irq_mask & (1<<irq)){
120 119 if(!mpc1211_irq_real(irq)){
121   - irq_err_count++;
  120 + atomic_inc(&irq_err_count)
122 121 printk("spurious 8259A interrupt: IRQ %x\n",irq);
123 122 }
124 123 } else {
... ... @@ -131,7 +130,7 @@
131 130 } else {
132 131 if(s_irq_mask & (1<<(irq - 8))){
133 132 if(!mpc1211_irq_real(irq)){
134   - irq_err_count++;
  133 + atomic_inc(&irq_err_count);
135 134 printk("spurious 8259A interrupt: IRQ %x\n",irq);
136 135 }
137 136 } else {
arch/sh/boards/snapgear/setup.c
... ... @@ -33,7 +33,7 @@
33 33 * EraseConfig handling functions
34 34 */
35 35  
36   -static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  36 +static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
37 37 {
38 38 volatile char dummy __attribute__((unused)) = * (volatile char *) 0xb8000000;
39 39  
arch/sh/cchips/hd6446x/hd64461/setup.c
... ... @@ -71,7 +71,7 @@
71 71 .end = end_hd64461_irq,
72 72 };
73 73  
74   -static irqreturn_t hd64461_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  74 +static irqreturn_t hd64461_interrupt(int irq, void *dev_id)
75 75 {
76 76 printk(KERN_INFO
77 77 "HD64461: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
arch/sh/cchips/hd6446x/hd64465/gpio.c
... ... @@ -85,7 +85,7 @@
85 85 void *dev;
86 86 } handlers[GPIO_NPORTS * 8];
87 87  
88   -static irqreturn_t hd64465_gpio_interrupt(int irq, void *dev, struct pt_regs *regs)
  88 +static irqreturn_t hd64465_gpio_interrupt(int irq, void *dev)
89 89 {
90 90 unsigned short port, pin, isr, mask, portpin;
91 91  
arch/sh/cchips/hd6446x/hd64465/setup.c
... ... @@ -84,7 +84,7 @@
84 84 };
85 85  
86 86  
87   -static irqreturn_t hd64465_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  87 +static irqreturn_t hd64465_interrupt(int irq, void *dev_id)
88 88 {
89 89 printk(KERN_INFO
90 90 "HD64465: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
arch/sh/cchips/voyagergx/irq.c
... ... @@ -88,8 +88,7 @@
88 88 .end = end_voyagergx_irq,
89 89 };
90 90  
91   -static irqreturn_t voyagergx_interrupt(int irq, void *dev_id,
92   - struct pt_regs *regs)
  91 +static irqreturn_t voyagergx_interrupt(int irq, void *dev_id)
93 92 {
94 93 printk(KERN_INFO
95 94 "VoyagerGX: spurious interrupt, status: 0x%x\n",
arch/sh/drivers/dma/dma-g2.c
... ... @@ -51,7 +51,7 @@
51 51 ((g2_dma->channel[i].size - \
52 52 g2_dma->status[i].size) & 0x0fffffff)
53 53  
54   -static irqreturn_t g2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  54 +static irqreturn_t g2_dma_interrupt(int irq, void *dev_id)
55 55 {
56 56 int i;
57 57  
arch/sh/drivers/dma/dma-pvr2.c
... ... @@ -21,7 +21,7 @@
21 21 static unsigned int xfer_complete;
22 22 static int count;
23 23  
24   -static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  24 +static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id)
25 25 {
26 26 if (get_dma_residue(PVR2_CASCADE_CHAN)) {
27 27 printk(KERN_WARNING "DMA: SH DMAC did not complete transfer "
arch/sh/drivers/dma/dma-sh.c
... ... @@ -60,9 +60,9 @@
60 60 * Besides that it needs to waken any waiting process, which should handle
61 61 * setting up the next transfer.
62 62 */
63   -static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs)
  63 +static irqreturn_t dma_tei(int irq, void *dev_id)
64 64 {
65   - struct dma_channel *chan = (struct dma_channel *)dev_id;
  65 + struct dma_channel *chan = dev_id;
66 66 u32 chcr;
67 67  
68 68 chcr = ctrl_inl(CHCR[chan->chan]);
... ... @@ -228,7 +228,7 @@
228 228 }
229 229  
230 230 #if defined(CONFIG_CPU_SH4)
231   -static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs)
  231 +static irqreturn_t dma_err(int irq, void *dummy)
232 232 {
233 233 dmaor_reset();
234 234 disable_irq(irq);
arch/sh/drivers/pci/pci-st40.c
... ... @@ -161,7 +161,7 @@
161 161 "Memory Write-and-Invalidate"
162 162 };
163 163  
164   -static irqreturn_t st40_pci_irq(int irq, void *dev_instance, struct pt_regs *regs)
  164 +static irqreturn_t st40_pci_irq(int irq, void *dev_instance)
165 165 {
166 166 unsigned pci_int, pci_air, pci_cir, pci_aint;
167 167 static int count=0;
arch/sh/kernel/irq.c
... ... @@ -17,6 +17,8 @@
17 17 #include <asm/thread_info.h>
18 18 #include <asm/cpu/mmu_context.h>
19 19  
  20 +atomic_t irq_err_count;
  21 +
20 22 /*
21 23 * 'what should we do if we get a hw irq event on an illegal vector'.
22 24 * each architecture has to answer this themselves, it doesn't deserve
... ... @@ -47,8 +49,10 @@
47 49 if (!action)
48 50 goto unlock;
49 51 seq_printf(p, "%3d: ",i);
50   - seq_printf(p, "%10u ", kstat_irqs(i));
51   - seq_printf(p, " %14s", irq_desc[i].chip->typename);
  52 + for_each_online_cpu(j)
  53 + seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
  54 + seq_printf(p, " %14s", irq_desc[i].chip->name);
  55 + seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq));
52 56 seq_printf(p, " %s", action->name);
53 57  
54 58 for (action=action->next; action; action = action->next)
... ... @@ -56,7 +60,9 @@
56 60 seq_putc(p, '\n');
57 61 unlock:
58 62 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
59   - }
  63 + } else if (i == NR_IRQS)
  64 + seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
  65 +
60 66 return 0;
61 67 }
62 68 #endif
... ... @@ -78,6 +84,7 @@
78 84 unsigned long r6, unsigned long r7,
79 85 struct pt_regs regs)
80 86 {
  87 + struct pt_regs *old_regs = set_irq_regs(&regs);
81 88 int irq = r4;
82 89 #ifdef CONFIG_4KSTACKS
83 90 union irq_ctx *curctx, *irqctx;
... ... @@ -139,7 +146,6 @@
139 146  
140 147 __asm__ __volatile__ (
141 148 "mov %0, r4 \n"
142   - "mov %1, r5 \n"
143 149 "mov r15, r9 \n"
144 150 "jsr @%2 \n"
145 151 /* swith to the irq stack */
146 152  
147 153  
... ... @@ -147,17 +153,18 @@
147 153 /* restore the stack (ring zero) */
148 154 "mov r9, r15 \n"
149 155 : /* no outputs */
150   - : "r" (irq), "r" (&regs), "r" (__do_IRQ), "r" (isp)
  156 + : "r" (irq), "r" (generic_handle_irq), "r" (isp)
151 157 /* XXX: A somewhat excessive clobber list? -PFM */
152 158 : "memory", "r0", "r1", "r2", "r3", "r4",
153 159 "r5", "r6", "r7", "r8", "t", "pr"
154 160 );
155 161 } else
156 162 #endif
157   - __do_IRQ(irq, &regs);
  163 + generic_handle_irq(irq);
158 164  
159 165 irq_exit();
160 166  
  167 + set_irq_regs(old_regs);
161 168 return 1;
162 169 }
163 170  
arch/sh/kernel/time.c
... ... @@ -109,13 +109,14 @@
109 109 * handle_timer_tick() needs to keep up the real-time clock,
110 110 * as well as call the "do_timer()" routine every clocktick
111 111 */
112   -void handle_timer_tick(struct pt_regs *regs)
  112 +void handle_timer_tick(void)
113 113 {
114 114 do_timer(1);
115 115 #ifndef CONFIG_SMP
116   - update_process_times(user_mode(regs));
  116 + update_process_times(user_mode(get_irq_regs()));
117 117 #endif
118   - profile_tick(CPU_PROFILING, regs);
  118 + if (current->pid)
  119 + profile_tick(CPU_PROFILING);
119 120  
120 121 #ifdef CONFIG_HEARTBEAT
121 122 if (sh_mv.mv_heartbeat != NULL)
arch/sh/kernel/timers/timer-tmu.c
... ... @@ -80,8 +80,7 @@
80 80 return count;
81 81 }
82 82  
83   -static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
84   - struct pt_regs *regs)
  83 +static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
85 84 {
86 85 unsigned long timer_status;
87 86  
... ... @@ -98,7 +97,7 @@
98 97 * locally disabled. -arca
99 98 */
100 99 write_seqlock(&xtime_lock);
101   - handle_timer_tick(regs);
  100 + handle_timer_tick();
102 101 write_sequnlock(&xtime_lock);
103 102  
104 103 return IRQ_HANDLED;
drivers/rtc/rtc-sh.c
... ... @@ -160,7 +160,7 @@
160 160 tmp |= RCR1_CIE;
161 161 writeb(tmp, rtc->regbase + RCR1);
162 162  
163   - ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, SA_INTERRUPT,
  163 + ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, IRQF_DISABLED,
164 164 "sh-rtc period", dev);
165 165 if (unlikely(ret)) {
166 166 dev_err(dev, "request period IRQ failed with %d, IRQ %d\n",
... ... @@ -168,7 +168,7 @@
168 168 return ret;
169 169 }
170 170  
171   - ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, SA_INTERRUPT,
  171 + ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED,
172 172 "sh-rtc carry", dev);
173 173 if (unlikely(ret)) {
174 174 dev_err(dev, "request carry IRQ failed with %d, IRQ %d\n",
... ... @@ -177,7 +177,7 @@
177 177 goto err_bad_carry;
178 178 }
179 179  
180   - ret = request_irq(rtc->alarm_irq, sh_rtc_interrupt, SA_INTERRUPT,
  180 + ret = request_irq(rtc->alarm_irq, sh_rtc_interrupt, IRQF_DISABLED,
181 181 "sh-rtc alarm", dev);
182 182 if (unlikely(ret)) {
183 183 dev_err(dev, "request alarm IRQ failed with %d, IRQ %d\n",
drivers/serial/sh-sci.c
... ... @@ -808,7 +808,7 @@
808 808 }
809 809  
810 810 if (request_irq(port->irqs[0], sci_mpxed_interrupt,
811   - SA_INTERRUPT, "sci", port)) {
  811 + IRQF_DISABLED, "sci", port)) {
812 812 printk(KERN_ERR "sci: Cannot allocate irq.\n");
813 813 return -ENODEV;
814 814 }
... ... @@ -817,7 +817,7 @@
817 817 if (!port->irqs[i])
818 818 continue;
819 819 if (request_irq(port->irqs[i], handlers[i],
820   - SA_INTERRUPT, desc[i], port)) {
  820 + IRQF_DISABLED, desc[i], port)) {
821 821 printk(KERN_ERR "sci: Cannot allocate irq.\n");
822 822 return -ENODEV;
823 823 }
include/asm-sh/hw_irq.h
1 1 #ifndef __ASM_SH_HW_IRQ_H
2 2 #define __ASM_SH_HW_IRQ_H
3 3  
  4 +#include <asm/atomic.h>
  5 +
  6 +extern atomic_t irq_err_count;
  7 +
4 8 #endif /* __ASM_SH_HW_IRQ_H */
include/asm-sh/irq_regs.h
  1 +#include <asm-generic/irq_regs.h>
include/asm-sh/timer.h
... ... @@ -36,7 +36,7 @@
36 36 struct sys_timer *get_sys_timer(void);
37 37  
38 38 /* arch/sh/kernel/time.c */
39   -void handle_timer_tick(struct pt_regs *);
  39 +void handle_timer_tick(void);
40 40  
41 41 #endif /* __ASM_SH_TIMER_H */