提交 35f3c518 编写于 作者: P Paul Mundt

sh: Updates for IRQ handler changes.

Trivial fixes for build breakage introduced by IRQ handler changes.
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 a700f359
......@@ -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);
......
......@@ -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);
......
......@@ -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 {
......
......@@ -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;
......
......@@ -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",
......
......@@ -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;
......
......@@ -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",
......
......@@ -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",
......
......@@ -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;
......
......@@ -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 "
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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;
......
......@@ -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",
......
......@@ -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;
}
......
#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 */
#include <asm-generic/irq_regs.h>
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册