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>
This commit is contained in:
parent
a700f3594d
commit
35f3c5185b
|
@ -83,7 +83,7 @@ static int hp6x0_apm_get_info(char *buf, char **start, off_t fpos, int length)
|
||||||
return p - buf;
|
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)
|
if (!apm_suspended)
|
||||||
apm_queue_event(APM_USER_SUSPEND);
|
apm_queue_event(APM_USER_SUSPEND);
|
||||||
|
@ -96,7 +96,7 @@ static int __init hp6x0_apm_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
|
ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
|
||||||
SA_INTERRUPT, MODNAME, 0);
|
IRQF_DISABLED, MODNAME, 0);
|
||||||
if (unlikely(ret < 0)) {
|
if (unlikely(ret < 0)) {
|
||||||
printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
|
printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
|
||||||
HP680_BTN_IRQ);
|
HP680_BTN_IRQ);
|
||||||
|
|
|
@ -135,7 +135,7 @@ static int swdrv_write(struct file *filp, const char *buff, size_t count,
|
||||||
return 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)));
|
landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
|
||||||
disable_irq(IRQ_BUTTON);
|
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 m_irq_mask = 0xfb;
|
||||||
static unsigned char s_irq_mask = 0xff;
|
static unsigned char s_irq_mask = 0xff;
|
||||||
volatile unsigned long irq_err_count;
|
|
||||||
|
|
||||||
static void disable_mpc1211_irq(unsigned int irq)
|
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(irq < 8) {
|
||||||
if(m_irq_mask & (1<<irq)){
|
if(m_irq_mask & (1<<irq)){
|
||||||
if(!mpc1211_irq_real(irq)){
|
if(!mpc1211_irq_real(irq)){
|
||||||
irq_err_count++;
|
atomic_inc(&irq_err_count)
|
||||||
printk("spurious 8259A interrupt: IRQ %x\n",irq);
|
printk("spurious 8259A interrupt: IRQ %x\n",irq);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +130,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
|
||||||
} else {
|
} else {
|
||||||
if(s_irq_mask & (1<<(irq - 8))){
|
if(s_irq_mask & (1<<(irq - 8))){
|
||||||
if(!mpc1211_irq_real(irq)){
|
if(!mpc1211_irq_real(irq)){
|
||||||
irq_err_count++;
|
atomic_inc(&irq_err_count);
|
||||||
printk("spurious 8259A interrupt: IRQ %x\n",irq);
|
printk("spurious 8259A interrupt: IRQ %x\n",irq);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,7 +33,7 @@ extern void pcibios_init(void);
|
||||||
* EraseConfig handling functions
|
* 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;
|
volatile char dummy __attribute__((unused)) = * (volatile char *) 0xb8000000;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ static struct hw_interrupt_type hd64461_irq_type = {
|
||||||
.end = end_hd64461_irq,
|
.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
|
printk(KERN_INFO
|
||||||
"HD64461: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
|
"HD64461: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
|
||||||
|
|
|
@ -85,7 +85,7 @@ static struct {
|
||||||
void *dev;
|
void *dev;
|
||||||
} handlers[GPIO_NPORTS * 8];
|
} 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;
|
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
|
printk(KERN_INFO
|
||||||
"HD64465: spurious interrupt, nirr: 0x%x nimr: 0x%x\n",
|
"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,
|
.end = end_voyagergx_irq,
|
||||||
};
|
};
|
||||||
|
|
||||||
static irqreturn_t voyagergx_interrupt(int irq, void *dev_id,
|
static irqreturn_t voyagergx_interrupt(int irq, void *dev_id)
|
||||||
struct pt_regs *regs)
|
|
||||||
{
|
{
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"VoyagerGX: spurious interrupt, status: 0x%x\n",
|
"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->channel[i].size - \
|
||||||
g2_dma->status[i].size) & 0x0fffffff)
|
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;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
static unsigned int xfer_complete;
|
static unsigned int xfer_complete;
|
||||||
static int count;
|
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)) {
|
if (get_dma_residue(PVR2_CASCADE_CHAN)) {
|
||||||
printk(KERN_WARNING "DMA: SH DMAC did not complete transfer "
|
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
|
* Besides that it needs to waken any waiting process, which should handle
|
||||||
* setting up the next transfer.
|
* 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;
|
u32 chcr;
|
||||||
|
|
||||||
chcr = ctrl_inl(CHCR[chan->chan]);
|
chcr = ctrl_inl(CHCR[chan->chan]);
|
||||||
|
@ -228,7 +228,7 @@ static inline int dmaor_reset(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_SH4)
|
#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();
|
dmaor_reset();
|
||||||
disable_irq(irq);
|
disable_irq(irq);
|
||||||
|
|
|
@ -161,7 +161,7 @@ static char * pci_commands[16]={
|
||||||
"Memory Write-and-Invalidate"
|
"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;
|
unsigned pci_int, pci_air, pci_cir, pci_aint;
|
||||||
static int count=0;
|
static int count=0;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
#include <asm/cpu/mmu_context.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'.
|
* '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
|
* 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)
|
if (!action)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
seq_printf(p, "%3d: ",i);
|
seq_printf(p, "%3d: ",i);
|
||||||
seq_printf(p, "%10u ", kstat_irqs(i));
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, " %14s", irq_desc[i].chip->typename);
|
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);
|
seq_printf(p, " %s", action->name);
|
||||||
|
|
||||||
for (action=action->next; action; action = action->next)
|
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');
|
seq_putc(p, '\n');
|
||||||
unlock:
|
unlock:
|
||||||
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,6 +84,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
|
||||||
unsigned long r6, unsigned long r7,
|
unsigned long r6, unsigned long r7,
|
||||||
struct pt_regs regs)
|
struct pt_regs regs)
|
||||||
{
|
{
|
||||||
|
struct pt_regs *old_regs = set_irq_regs(®s);
|
||||||
int irq = r4;
|
int irq = r4;
|
||||||
#ifdef CONFIG_4KSTACKS
|
#ifdef CONFIG_4KSTACKS
|
||||||
union irq_ctx *curctx, *irqctx;
|
union irq_ctx *curctx, *irqctx;
|
||||||
|
@ -139,7 +146,6 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"mov %0, r4 \n"
|
"mov %0, r4 \n"
|
||||||
"mov %1, r5 \n"
|
|
||||||
"mov r15, r9 \n"
|
"mov r15, r9 \n"
|
||||||
"jsr @%2 \n"
|
"jsr @%2 \n"
|
||||||
/* swith to the irq stack */
|
/* swith to the irq stack */
|
||||||
|
@ -147,17 +153,18 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
|
||||||
/* restore the stack (ring zero) */
|
/* restore the stack (ring zero) */
|
||||||
"mov r9, r15 \n"
|
"mov r9, r15 \n"
|
||||||
: /* no outputs */
|
: /* no outputs */
|
||||||
: "r" (irq), "r" (®s), "r" (__do_IRQ), "r" (isp)
|
: "r" (irq), "r" (generic_handle_irq), "r" (isp)
|
||||||
/* XXX: A somewhat excessive clobber list? -PFM */
|
/* XXX: A somewhat excessive clobber list? -PFM */
|
||||||
: "memory", "r0", "r1", "r2", "r3", "r4",
|
: "memory", "r0", "r1", "r2", "r3", "r4",
|
||||||
"r5", "r6", "r7", "r8", "t", "pr"
|
"r5", "r6", "r7", "r8", "t", "pr"
|
||||||
);
|
);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
__do_IRQ(irq, ®s);
|
generic_handle_irq(irq);
|
||||||
|
|
||||||
irq_exit();
|
irq_exit();
|
||||||
|
|
||||||
|
set_irq_regs(old_regs);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,13 +109,14 @@ static long last_rtc_update;
|
||||||
* handle_timer_tick() needs to keep up the real-time clock,
|
* handle_timer_tick() needs to keep up the real-time clock,
|
||||||
* as well as call the "do_timer()" routine every clocktick
|
* 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);
|
do_timer(1);
|
||||||
#ifndef CONFIG_SMP
|
#ifndef CONFIG_SMP
|
||||||
update_process_times(user_mode(regs));
|
update_process_times(user_mode(get_irq_regs()));
|
||||||
#endif
|
#endif
|
||||||
profile_tick(CPU_PROFILING, regs);
|
if (current->pid)
|
||||||
|
profile_tick(CPU_PROFILING);
|
||||||
|
|
||||||
#ifdef CONFIG_HEARTBEAT
|
#ifdef CONFIG_HEARTBEAT
|
||||||
if (sh_mv.mv_heartbeat != NULL)
|
if (sh_mv.mv_heartbeat != NULL)
|
||||||
|
|
|
@ -80,8 +80,7 @@ static unsigned long tmu_timer_get_offset(void)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
|
static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
|
||||||
struct pt_regs *regs)
|
|
||||||
{
|
{
|
||||||
unsigned long timer_status;
|
unsigned long timer_status;
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
|
||||||
* locally disabled. -arca
|
* locally disabled. -arca
|
||||||
*/
|
*/
|
||||||
write_seqlock(&xtime_lock);
|
write_seqlock(&xtime_lock);
|
||||||
handle_timer_tick(regs);
|
handle_timer_tick();
|
||||||
write_sequnlock(&xtime_lock);
|
write_sequnlock(&xtime_lock);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|
|
@ -160,7 +160,7 @@ static int sh_rtc_open(struct device *dev)
|
||||||
tmp |= RCR1_CIE;
|
tmp |= RCR1_CIE;
|
||||||
writeb(tmp, rtc->regbase + RCR1);
|
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);
|
"sh-rtc period", dev);
|
||||||
if (unlikely(ret)) {
|
if (unlikely(ret)) {
|
||||||
dev_err(dev, "request period IRQ failed with %d, IRQ %d\n",
|
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;
|
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);
|
"sh-rtc carry", dev);
|
||||||
if (unlikely(ret)) {
|
if (unlikely(ret)) {
|
||||||
dev_err(dev, "request carry IRQ failed with %d, IRQ %d\n",
|
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;
|
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);
|
"sh-rtc alarm", dev);
|
||||||
if (unlikely(ret)) {
|
if (unlikely(ret)) {
|
||||||
dev_err(dev, "request alarm IRQ failed with %d, IRQ %d\n",
|
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,
|
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");
|
printk(KERN_ERR "sci: Cannot allocate irq.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -817,7 +817,7 @@ static int sci_request_irq(struct sci_port *port)
|
||||||
if (!port->irqs[i])
|
if (!port->irqs[i])
|
||||||
continue;
|
continue;
|
||||||
if (request_irq(port->irqs[i], handlers[i],
|
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");
|
printk(KERN_ERR "sci: Cannot allocate irq.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#ifndef __ASM_SH_HW_IRQ_H
|
#ifndef __ASM_SH_HW_IRQ_H
|
||||||
#define __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 */
|
#endif /* __ASM_SH_HW_IRQ_H */
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#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);
|
struct sys_timer *get_sys_timer(void);
|
||||||
|
|
||||||
/* arch/sh/kernel/time.c */
|
/* arch/sh/kernel/time.c */
|
||||||
void handle_timer_tick(struct pt_regs *);
|
void handle_timer_tick(void);
|
||||||
|
|
||||||
#endif /* __ASM_SH_TIMER_H */
|
#endif /* __ASM_SH_TIMER_H */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue