提交 51890613 编写于 作者: J James Bottomley 提交者: Kyle McMartin

parisc: convert the rest of the irq handlers to simple/percpu

The generic conversion eliminates the spurious no_ack and no_end
routines, converts all the cascaded handlers to handle_simple_irq() and
makes iosapic use a modified handle_percpu_irq() to become the same as
the CPU irq's.  This isn't an essential change, but it eliminates the
mask/unmask overhead of handle_level_irq().
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
Tested-by: NHelge Deller <deller@gmx.de>
Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
上级 d16cd297
...@@ -75,9 +75,6 @@ static void cpu_unmask_irq(unsigned int irq) ...@@ -75,9 +75,6 @@ static void cpu_unmask_irq(unsigned int irq)
smp_send_all_nop(); smp_send_all_nop();
} }
void no_ack_irq(unsigned int irq) { }
void no_end_irq(unsigned int irq) { }
void cpu_ack_irq(unsigned int irq) void cpu_ack_irq(unsigned int irq)
{ {
unsigned long mask = EIEM_MASK(irq); unsigned long mask = EIEM_MASK(irq);
...@@ -241,7 +238,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data) ...@@ -241,7 +238,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, handle_level_irq); set_irq_chip_and_handler(irq, type, handle_percpu_irq);
set_irq_chip_data(irq, data); set_irq_chip_data(irq, data);
cpu_unmask_irq(irq); cpu_unmask_irq(irq);
} }
......
...@@ -349,7 +349,6 @@ static struct irq_chip dino_interrupt_type = { ...@@ -349,7 +349,6 @@ static struct irq_chip dino_interrupt_type = {
.name = "GSC-PCI", .name = "GSC-PCI",
.unmask = dino_unmask_irq, .unmask = dino_unmask_irq,
.mask = dino_mask_irq, .mask = dino_mask_irq,
.ack = no_ack_irq,
}; };
......
...@@ -186,7 +186,6 @@ static struct irq_chip eisa_interrupt_type = { ...@@ -186,7 +186,6 @@ static struct irq_chip eisa_interrupt_type = {
.name = "EISA", .name = "EISA",
.unmask = eisa_unmask_irq, .unmask = eisa_unmask_irq,
.mask = eisa_mask_irq, .mask = eisa_mask_irq,
.ack = no_ack_irq,
}; };
static irqreturn_t eisa_irq(int wax_irq, void *intr_dev) static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
...@@ -340,7 +339,7 @@ static int __init eisa_probe(struct parisc_device *dev) ...@@ -340,7 +339,7 @@ static int __init eisa_probe(struct parisc_device *dev)
setup_irq(2, &irq2_action); setup_irq(2, &irq2_action);
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
set_irq_chip_and_handler(i, &eisa_interrupt_type, set_irq_chip_and_handler(i, &eisa_interrupt_type,
handle_level_irq); handle_simple_irq);
} }
EISA_bus = 1; EISA_bus = 1;
......
...@@ -143,7 +143,6 @@ static struct irq_chip gsc_asic_interrupt_type = { ...@@ -143,7 +143,6 @@ static struct irq_chip gsc_asic_interrupt_type = {
.name = "GSC-ASIC", .name = "GSC-ASIC",
.unmask = gsc_asic_unmask_irq, .unmask = gsc_asic_unmask_irq,
.mask = gsc_asic_mask_irq, .mask = gsc_asic_mask_irq,
.ack = no_ack_irq,
}; };
int gsc_assign_irq(struct irq_chip *type, void *data) int gsc_assign_irq(struct irq_chip *type, void *data)
...@@ -153,7 +152,7 @@ int gsc_assign_irq(struct irq_chip *type, void *data) ...@@ -153,7 +152,7 @@ int gsc_assign_irq(struct irq_chip *type, void *data)
if (irq > GSC_IRQ_MAX) if (irq > GSC_IRQ_MAX)
return NO_IRQ; return NO_IRQ;
set_irq_chip_and_handler(irq, type, handle_level_irq); set_irq_chip_and_handler(irq, type, handle_simple_irq);
set_irq_chip_data(irq, data); set_irq_chip_data(irq, data);
return irq++; return irq++;
......
...@@ -669,6 +669,13 @@ printk("\n"); ...@@ -669,6 +669,13 @@ 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);
}
static void iosapic_eoi_irq(unsigned int irq)
{
struct vector_info *vi = get_irq_chip_data(irq);
iosapic_eoi(vi->eoi_addr, vi->eoi_data);
cpu_eoi_irq(irq); cpu_eoi_irq(irq);
} }
...@@ -705,6 +712,7 @@ static struct irq_chip iosapic_interrupt_type = { ...@@ -705,6 +712,7 @@ static struct irq_chip iosapic_interrupt_type = {
.unmask = iosapic_unmask_irq, .unmask = iosapic_unmask_irq,
.mask = iosapic_mask_irq, .mask = iosapic_mask_irq,
.ack = cpu_ack_irq, .ack = cpu_ack_irq,
.eoi = iosapic_eoi_irq,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.set_affinity = iosapic_set_affinity_irq, .set_affinity = iosapic_set_affinity_irq,
#endif #endif
......
...@@ -323,7 +323,6 @@ static struct irq_chip superio_interrupt_type = { ...@@ -323,7 +323,6 @@ static struct irq_chip superio_interrupt_type = {
.name = SUPERIO, .name = SUPERIO,
.unmask = superio_unmask_irq, .unmask = superio_unmask_irq,
.mask = superio_mask_irq, .mask = superio_mask_irq,
.ack = no_ack_irq,
}; };
#ifdef DEBUG_SUPERIO_INIT #ifdef DEBUG_SUPERIO_INIT
...@@ -354,7 +353,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) ...@@ -354,7 +353,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
#endif #endif
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
set_irq_chip_and_handler(i, &superio_interrupt_type, handle_level_irq); set_irq_chip_and_handler(i, &superio_interrupt_type, handle_simple_irq);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册