]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Updates for IRQ handler changes.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 6 Oct 2006 06:31:16 +0000 (15:31 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 6 Oct 2006 06:31:16 +0000 (15:31 +0900)
Trivial fixes for build breakage introduced by IRQ handler changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
20 files changed:
arch/sh/boards/hp6xx/hp6xx_apm.c
arch/sh/boards/landisk/landisk_pwb.c
arch/sh/boards/mpc1211/setup.c
arch/sh/boards/snapgear/setup.c
arch/sh/cchips/hd6446x/hd64461/setup.c
arch/sh/cchips/hd6446x/hd64465/gpio.c
arch/sh/cchips/hd6446x/hd64465/setup.c
arch/sh/cchips/voyagergx/irq.c
arch/sh/drivers/dma/dma-g2.c
arch/sh/drivers/dma/dma-pvr2.c
arch/sh/drivers/dma/dma-sh.c
arch/sh/drivers/pci/pci-st40.c
arch/sh/kernel/irq.c
arch/sh/kernel/time.c
arch/sh/kernel/timers/timer-tmu.c
drivers/rtc/rtc-sh.c
drivers/serial/sh-sci.c
include/asm-sh/hw_irq.h
include/asm-sh/irq_regs.h [new file with mode: 0644]
include/asm-sh/timer.h

index 75f91aaae0777ab373cd476da69bd9e6bf5620bf..219179114f0fe6fda9faf5b610c7e2a17781a5cf 100644 (file)
@@ -83,7 +83,7 @@ static int hp6x0_apm_get_info(char *buf, char **start, off_t fpos, int length)
        return p - buf;
 }
 
-static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev, struct pt_regs *regs)
+static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
 {
        if (!apm_suspended)
                apm_queue_event(APM_USER_SUSPEND);
@@ -96,7 +96,7 @@ static int __init hp6x0_apm_init(void)
        int ret;
 
        ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
-                         SA_INTERRUPT, MODNAME, 0);
+                         IRQF_DISABLED, MODNAME, 0);
        if (unlikely(ret < 0)) {
                printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
                       HP680_BTN_IRQ);
index 0b7bee1a9ca5af99c0c3bdeb33aa0a8370f39174..e62524978160ac3fbb79448ea7d0656764bd2ee1 100644 (file)
@@ -135,7 +135,7 @@ static int swdrv_write(struct file *filp, const char *buff, size_t count,
        return count;
 }
 
-static irqreturn_t sw_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t sw_interrupt(int irq, void *dev_id)
 {
        landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
        disable_irq(IRQ_BUTTON);
index 01c10fa5c0589092677190289dd626120df7d20a..7c3d1d304157f48d70555fa4dc71bdc199aeb00d 100644 (file)
@@ -69,7 +69,6 @@ static void __init pci_write_config(unsigned long busNo,
 
 static unsigned char m_irq_mask = 0xfb;
 static unsigned char s_irq_mask = 0xff;
-volatile unsigned long irq_err_count;
 
 static void disable_mpc1211_irq(unsigned int irq)
 {
@@ -118,7 +117,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
        if(irq < 8) {
                if(m_irq_mask & (1<<irq)){
                  if(!mpc1211_irq_real(irq)){
-                   irq_err_count++;
+                   atomic_inc(&irq_err_count)
                    printk("spurious 8259A interrupt: IRQ %x\n",irq);
                   }
                } else {
@@ -131,7 +130,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
        } else {
                if(s_irq_mask & (1<<(irq - 8))){
                  if(!mpc1211_irq_real(irq)){
-                   irq_err_count++;
+                   atomic_inc(&irq_err_count);
                    printk("spurious 8259A interrupt: IRQ %x\n",irq);
                  }
                } else {
index f5e98c56b530a7c23d3e43b77e2b063cf19a448f..540d0bf16446e6edf6f3375e99661d5712ded7ce 100644 (file)
@@ -33,7 +33,7 @@ extern void pcibios_init(void);
  * EraseConfig handling functions
  */
 
-static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
 {
        volatile char dummy __attribute__((unused)) = * (volatile char *) 0xb8000000;
 
index 38f1e8171a3abbf361ac628e2b1f63c24c4b9f92..4d49b5cbcc1333632c685adb64cef2b5e79210f7 100644 (file)
@@ -71,7 +71,7 @@ static struct hw_interrupt_type hd64461_irq_type = {
        .end            = end_hd64461_irq,
 };
 
-static irqreturn_t hd64461_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t hd64461_interrupt(int irq, void *dev_id)
 {
        printk(KERN_INFO
               "HD64461: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
index 72320d02d69af015a7996997945ebc93918960d5..43431855ec86976874a0b4cf2c76305d10b42d5a 100644 (file)
@@ -85,7 +85,7 @@ static struct {
     void *dev;
 } handlers[GPIO_NPORTS * 8];
 
-static irqreturn_t hd64465_gpio_interrupt(int irq, void *dev, struct pt_regs *regs)
+static irqreturn_t hd64465_gpio_interrupt(int irq, void *dev)
 {
        unsigned short port, pin, isr, mask, portpin;
        
index 30573d3e1966717c46c420703972166625cb785f..d126e1f30dee60b99f0f959bd8755516c3618086 100644 (file)
@@ -84,7 +84,7 @@ static struct hw_interrupt_type hd64465_irq_type = {
 };
 
 
-static irqreturn_t hd64465_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t hd64465_interrupt(int irq, void *dev_id)
 {
        printk(KERN_INFO
               "HD64465: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
index 392c8b12ce36789dea7dbe0b8b3a25084f49371b..bf1b28feca06d7222ca5c5f53e272b753a0d6a3f 100644 (file)
@@ -88,8 +88,7 @@ static struct hw_interrupt_type voyagergx_irq_type = {
        .end = end_voyagergx_irq,
 };
 
-static irqreturn_t voyagergx_interrupt(int irq, void *dev_id,
-                                     struct pt_regs *regs)
+static irqreturn_t voyagergx_interrupt(int irq, void *dev_id)
 {
        printk(KERN_INFO
               "VoyagerGX: spurious interrupt, status: 0x%x\n",
index 9cb0709241808b6365e1a024f048722cbffb8a94..0caf11bb7e27993ae65d6e0ae5ff1531514c931a 100644 (file)
@@ -51,7 +51,7 @@ static volatile struct g2_dma_info *g2_dma = (volatile struct g2_dma_info *)0xa0
        ((g2_dma->channel[i].size - \
          g2_dma->status[i].size) & 0x0fffffff)
 
-static irqreturn_t g2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t g2_dma_interrupt(int irq, void *dev_id)
 {
        int i;
 
index c1b6bc23c107f3cfc0d39941fd9cff9e2c2b9529..838fad566eaf68f8e4282fa4f218c02915e15147 100644 (file)
@@ -21,7 +21,7 @@
 static unsigned int xfer_complete;
 static int count;
 
-static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id)
 {
        if (get_dma_residue(PVR2_CASCADE_CHAN)) {
                printk(KERN_WARNING "DMA: SH DMAC did not complete transfer "
index cbbe8bce3d679fd7d5b77e4f40363fd314dc3dee..d8ece20bb2cf078fd913facab2fdc4def5d1f384 100644 (file)
@@ -60,9 +60,9 @@ static inline unsigned int calc_xmit_shift(struct dma_channel *chan)
  * Besides that it needs to waken any waiting process, which should handle
  * setting up the next transfer.
  */
-static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dma_tei(int irq, void *dev_id)
 {
-       struct dma_channel *chan = (struct dma_channel *)dev_id;
+       struct dma_channel *chan = dev_id;
        u32 chcr;
 
        chcr = ctrl_inl(CHCR[chan->chan]);
@@ -228,7 +228,7 @@ static inline int dmaor_reset(void)
 }
 
 #if defined(CONFIG_CPU_SH4)
-static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dma_err(int irq, void *dummy)
 {
        dmaor_reset();
        disable_irq(irq);
index 4ab5ea6b35fb5eeaf22fa5dd5889803f4d9555c1..efecb3d5995c24e8dd7221420b0205da06ab3d4a 100644 (file)
@@ -161,7 +161,7 @@ static char * pci_commands[16]={
        "Memory Write-and-Invalidate"
 };
 
-static irqreturn_t st40_pci_irq(int irq, void *dev_instance, struct pt_regs *regs)
+static irqreturn_t st40_pci_irq(int irq, void *dev_instance)
 {
        unsigned pci_int, pci_air, pci_cir, pci_aint;
        static int count=0;
index c7ebd6aec9514cdb4f16583a94a6570e01262440..3b93682bf18b416fc6bf58256cd707790f4af52b 100644 (file)
@@ -17,6 +17,8 @@
 #include <asm/thread_info.h>
 #include <asm/cpu/mmu_context.h>
 
+atomic_t irq_err_count;
+
 /*
  * 'what should we do if we get a hw irq event on an illegal vector'.
  * each architecture has to answer this themselves, it doesn't deserve
@@ -47,8 +49,10 @@ int show_interrupts(struct seq_file *p, void *v)
                if (!action)
                        goto unlock;
                seq_printf(p, "%3d: ",i);
-               seq_printf(p, "%10u ", kstat_irqs(i));
-               seq_printf(p, " %14s", irq_desc[i].chip->typename);
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+               seq_printf(p, " %14s", irq_desc[i].chip->name);
+               seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq));
                seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
@@ -56,7 +60,9 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 unlock:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       }
+       } else if (i == NR_IRQS)
+               seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
+
        return 0;
 }
 #endif
@@ -78,6 +84,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
                      unsigned long r6, unsigned long r7,
                      struct pt_regs regs)
 {
+       struct pt_regs *old_regs = set_irq_regs(&regs);
        int irq = r4;
 #ifdef CONFIG_4KSTACKS
        union irq_ctx *curctx, *irqctx;
@@ -139,7 +146,6 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
 
                __asm__ __volatile__ (
                        "mov    %0, r4          \n"
-                       "mov    %1, r5          \n"
                        "mov    r15, r9         \n"
                        "jsr    @%2             \n"
                        /* swith to the irq stack */
@@ -147,17 +153,18 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
                        /* restore the stack (ring zero) */
                        "mov    r9, r15         \n"
                        : /* no outputs */
-                       : "r" (irq), "r" (&regs), "r" (__do_IRQ), "r" (isp)
+                       : "r" (irq), "r" (generic_handle_irq), "r" (isp)
                        /* XXX: A somewhat excessive clobber list? -PFM */
                        : "memory", "r0", "r1", "r2", "r3", "r4",
                          "r5", "r6", "r7", "r8", "t", "pr"
                );
        } else
 #endif
-               __do_IRQ(irq, &regs);
+               generic_handle_irq(irq);
 
        irq_exit();
 
+       set_irq_regs(old_regs);
        return 1;
 }
 
index 1fbb83c665ddcb21f32ce1a7f218b350814331a8..57e708d7b52df705cdf6ebcf48d1608485dc2abd 100644 (file)
@@ -109,13 +109,14 @@ static long last_rtc_update;
  * handle_timer_tick() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
  */
-void handle_timer_tick(struct pt_regs *regs)
+void handle_timer_tick(void)
 {
        do_timer(1);
 #ifndef CONFIG_SMP
-       update_process_times(user_mode(regs));
+       update_process_times(user_mode(get_irq_regs()));
 #endif
-       profile_tick(CPU_PROFILING, regs);
+       if (current->pid)
+               profile_tick(CPU_PROFILING);
 
 #ifdef CONFIG_HEARTBEAT
        if (sh_mv.mv_heartbeat != NULL)
index badfedb455a9f21793b80824f89ec34aa14e9535..24927015dc31fc901153935e91eca80e32332c67 100644 (file)
@@ -80,8 +80,7 @@ static unsigned long tmu_timer_get_offset(void)
        return count;
 }
 
-static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
-                                      struct pt_regs *regs)
+static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
 {
        unsigned long timer_status;
 
@@ -98,7 +97,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
         * locally disabled. -arca
         */
        write_seqlock(&xtime_lock);
-       handle_timer_tick(regs);
+       handle_timer_tick();
        write_sequnlock(&xtime_lock);
 
        return IRQ_HANDLED;
index 8b6efcc05058ff5e66706735ccccc19d406146f2..143302a8e79c5ed283a86b960850aa753014592e 100644 (file)
@@ -160,7 +160,7 @@ static int sh_rtc_open(struct device *dev)
        tmp |= RCR1_CIE;
        writeb(tmp, rtc->regbase + RCR1);
 
-       ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, SA_INTERRUPT,
+       ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, IRQF_DISABLED,
                          "sh-rtc period", dev);
        if (unlikely(ret)) {
                dev_err(dev, "request period IRQ failed with %d, IRQ %d\n",
@@ -168,7 +168,7 @@ static int sh_rtc_open(struct device *dev)
                return ret;
        }
 
-       ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, SA_INTERRUPT,
+       ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED,
                          "sh-rtc carry", dev);
        if (unlikely(ret)) {
                dev_err(dev, "request carry IRQ failed with %d, IRQ %d\n",
@@ -177,7 +177,7 @@ static int sh_rtc_open(struct device *dev)
                goto err_bad_carry;
        }
 
-       ret = request_irq(rtc->alarm_irq, sh_rtc_interrupt, SA_INTERRUPT,
+       ret = request_irq(rtc->alarm_irq, sh_rtc_interrupt, IRQF_DISABLED,
                          "sh-rtc alarm", dev);
        if (unlikely(ret)) {
                dev_err(dev, "request alarm IRQ failed with %d, IRQ %d\n",
index 266aa325569e0f4a3e819063b10c9b049c0dc84c..cfcc3caf49d8f5a0a71997ee1bb6b1833035e6ac 100644 (file)
@@ -808,7 +808,7 @@ static int sci_request_irq(struct sci_port *port)
                }
 
                if (request_irq(port->irqs[0], sci_mpxed_interrupt,
-                               SA_INTERRUPT, "sci", port)) {
+                               IRQF_DISABLED, "sci", port)) {
                        printk(KERN_ERR "sci: Cannot allocate irq.\n");
                        return -ENODEV;
                }
@@ -817,7 +817,7 @@ static int sci_request_irq(struct sci_port *port)
                        if (!port->irqs[i])
                                continue;
                        if (request_irq(port->irqs[i], handlers[i],
-                                       SA_INTERRUPT, desc[i], port)) {
+                                       IRQF_DISABLED, desc[i], port)) {
                                printk(KERN_ERR "sci: Cannot allocate irq.\n");
                                return -ENODEV;
                        }
index fed26616967a03979d0d6ea6e7c14d1d6a446f97..80ee1cda7498f2383cd72588a800c66ad68178e3 100644 (file)
@@ -1,4 +1,8 @@
 #ifndef __ASM_SH_HW_IRQ_H
 #define __ASM_SH_HW_IRQ_H
 
+#include <asm/atomic.h>
+
+extern atomic_t irq_err_count;
+
 #endif /* __ASM_SH_HW_IRQ_H */
diff --git a/include/asm-sh/irq_regs.h b/include/asm-sh/irq_regs.h
new file mode 100644 (file)
index 0000000..3dd9c0b
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/irq_regs.h>
index 341cb71c2f9b0e03150a4ad80aca0979670799bf..5df842bcf7b63d554ef6486b11e07a663514c373 100644 (file)
@@ -36,7 +36,6 @@ static inline unsigned long get_timer_offset(void)
 struct sys_timer *get_sys_timer(void);
 
 /* arch/sh/kernel/time.c */
-void handle_timer_tick(struct pt_regs *);
+void handle_timer_tick(void);
 
 #endif /* __ASM_SH_TIMER_H */
-