parisc: convert iosapic interrupts to proper flow handlers
Shift the ->end call (cpu eoi) from __do_IRQ into our unmask handler. Also nuke some redundant code. Signed-off-by: Kyle McMartin <kyle@redhat.com>
This commit is contained in:
@@ -241,7 +241,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
|
|||||||
|
|
||||||
/* for iosapic interrupts */
|
/* for iosapic interrupts */
|
||||||
if (type) {
|
if (type) {
|
||||||
set_irq_chip_and_handler(irq, type, parisc_do_IRQ);
|
set_irq_chip_and_handler(irq, type, handle_level_irq);
|
||||||
set_irq_chip_data(irq, data);
|
set_irq_chip_data(irq, data);
|
||||||
cpu_unmask_irq(irq);
|
cpu_unmask_irq(irq);
|
||||||
}
|
}
|
||||||
|
@@ -615,7 +615,7 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void iosapic_disable_irq(unsigned int irq)
|
static void iosapic_mask_irq(unsigned int irq)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct vector_info *vi = get_irq_chip_data(irq);
|
struct vector_info *vi = get_irq_chip_data(irq);
|
||||||
@@ -628,7 +628,7 @@ static void iosapic_disable_irq(unsigned int irq)
|
|||||||
spin_unlock_irqrestore(&iosapic_lock, flags);
|
spin_unlock_irqrestore(&iosapic_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iosapic_enable_irq(unsigned int irq)
|
static void iosapic_unmask_irq(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct vector_info *vi = get_irq_chip_data(irq);
|
struct vector_info *vi = get_irq_chip_data(irq);
|
||||||
u32 d0, d1;
|
u32 d0, d1;
|
||||||
@@ -669,31 +669,9 @@ printk("\n");
|
|||||||
DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
|
DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
|
||||||
vi->eoi_addr, vi->eoi_data);
|
vi->eoi_addr, vi->eoi_data);
|
||||||
iosapic_eoi(vi->eoi_addr, vi->eoi_data);
|
iosapic_eoi(vi->eoi_addr, vi->eoi_data);
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PARISC only supports PCI devices below I/O SAPIC.
|
|
||||||
* PCI only supports level triggered in order to share IRQ lines.
|
|
||||||
* ergo I/O SAPIC must always issue EOI on parisc.
|
|
||||||
*
|
|
||||||
* i386/ia64 support ISA devices and have to deal with
|
|
||||||
* edge-triggered interrupts too.
|
|
||||||
*/
|
|
||||||
static void iosapic_end_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
struct vector_info *vi = get_irq_chip_data(irq);
|
|
||||||
DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
|
|
||||||
vi->eoi_addr, vi->eoi_data);
|
|
||||||
iosapic_eoi(vi->eoi_addr, vi->eoi_data);
|
|
||||||
cpu_eoi_irq(irq);
|
cpu_eoi_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int iosapic_startup_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
iosapic_enable_irq(irq);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
static int iosapic_set_affinity_irq(unsigned int irq,
|
static int iosapic_set_affinity_irq(unsigned int irq,
|
||||||
const struct cpumask *dest)
|
const struct cpumask *dest)
|
||||||
@@ -723,13 +701,10 @@ static int iosapic_set_affinity_irq(unsigned int irq,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct irq_chip iosapic_interrupt_type = {
|
static struct irq_chip iosapic_interrupt_type = {
|
||||||
.name = "IO-SAPIC-level",
|
.name = "IO-SAPIC-level",
|
||||||
.startup = iosapic_startup_irq,
|
.unmask = iosapic_unmask_irq,
|
||||||
.shutdown = iosapic_disable_irq,
|
.mask = iosapic_mask_irq,
|
||||||
.enable = iosapic_enable_irq,
|
.ack = cpu_ack_irq,
|
||||||
.disable = iosapic_disable_irq,
|
|
||||||
.ack = cpu_ack_irq,
|
|
||||||
.end = iosapic_end_irq,
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
.set_affinity = iosapic_set_affinity_irq,
|
.set_affinity = iosapic_set_affinity_irq,
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user