Commit 23ae2fde authored by Anton Blanchard's avatar Anton Blanchard

ppc64: update ppc64 to new IRQ API from Andrew Morton

parent 8b71770a
......@@ -212,7 +212,8 @@ do_free_irq(int irq, void* dev_id)
return -ENOENT;
}
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
int request_irq(unsigned int irq,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
struct irqaction *action;
......@@ -743,6 +744,7 @@ void init_irq_proc (void)
}
}
void no_action(int irq, void *dev, struct pt_regs *regs)
irqreturn_t no_action(int irq, void *dev, struct pt_regs *regs)
{
return IRQ_NONE;
}
......@@ -764,9 +764,11 @@ static void openpic_end_ipi(unsigned int irq_nr)
openpic_eoi();
}
static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
static irqreturn_t openpic_ipi_action(int cpl, void *dev_id,
struct pt_regs *regs)
{
smp_message_recv(cpl-openpic_vec_ipi, regs);
return IRQ_HANDLED;
}
#endif /* CONFIG_SMP */
......
......@@ -298,7 +298,8 @@ static void openpic_set_spurious(u_int vector);
#ifdef CONFIG_SMP
/* Interprocessor Interrupts */
static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
static irqreturn_t openpic_ipi_action(int cpl, void *dev_id,
struct pt_regs *regs);
#endif
/* Timer Interrupts */
......
......@@ -54,8 +54,10 @@
#include <asm/rtas.h>
#include <asm/ppcdebug.h>
static void ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs);
static void ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs);
static irqreturn_t ras_epow_interrupt(int irq, void *dev_id,
struct pt_regs * regs);
static irqreturn_t ras_error_interrupt(int irq, void *dev_id,
struct pt_regs * regs);
void init_ras_IRQ(void);
/* #define DEBUG */
......@@ -73,7 +75,7 @@ void init_ras_IRQ(void) {
&len))) {
for(i=0; i<(len / sizeof(*ireg)); i++) {
request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS,
&ras_error_interrupt, 0,
ras_error_interrupt, 0,
"RAS_ERROR", NULL);
ireg++;
}
......@@ -84,7 +86,7 @@ void init_ras_IRQ(void) {
&len))) {
for(i=0; i<(len / sizeof(*ireg)); i++) {
request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS,
&ras_epow_interrupt, 0,
ras_epow_interrupt, 0,
"RAS_EPOW", NULL);
ireg++;
}
......@@ -98,7 +100,7 @@ void init_ras_IRQ(void) {
* to examine the type of power failure and take appropriate action where
* the time horizon permits something useful to be done.
*/
static void
static irqreturn_t
ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
struct rtas_error_log log_entry;
......@@ -115,6 +117,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
*((unsigned long *)&log_entry), status);
printk(KERN_WARNING
"EPOW <0x%lx 0x%lx>\n",*((unsigned long *)&log_entry), status);
return IRQ_HANDLED;
}
/*
......@@ -125,7 +128,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
* For nonrecoverable errors, an error is logged and we stop all processing
* as quickly as possible in order to prevent propagation of the failure.
*/
static void
static irqreturn_t
ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
struct rtas_error_log log_entry;
......@@ -158,7 +161,6 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
printk(KERN_WARNING
"Warning: Recoverable hardware error <0x%lx 0x%lx>\n",
*((unsigned long *)&log_entry), status);
return;
}
return IRQ_HANDLED;
}
......@@ -319,12 +319,14 @@ int xics_get_irq(struct pt_regs *regs)
extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
irqreturn_t xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
{
int cpu = smp_processor_id();
int handled = 0;
ops->qirr_info(cpu, 0xff);
while (xics_ipi_message[cpu].value) {
handled = 1;
if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION,
&xics_ipi_message[cpu].value)) {
mb();
......@@ -350,6 +352,7 @@ void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
}
#endif
}
return IRQ_RETVAL(handled);
}
void xics_cause_IPI(int cpu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment