Skip to content

Commit

Permalink
parisc: convert the rest of the irq handlers to simple/percpu
Browse files Browse the repository at this point in the history
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: James Bottomley <[email protected]>
Tested-by: Helge Deller <[email protected]>
Signed-off-by: Kyle McMartin <[email protected]>
  • Loading branch information
James Bottomley authored and jkkm committed Dec 4, 2010
1 parent d16cd29 commit 5189061
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
5 changes: 1 addition & 4 deletions arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ static void cpu_unmask_irq(unsigned int irq)
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)
{
unsigned long mask = EIEM_MASK(irq);
Expand Down Expand Up @@ -241,7 +238,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)

/* for iosapic interrupts */
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);
cpu_unmask_irq(irq);
}
Expand Down
1 change: 0 additions & 1 deletion drivers/parisc/dino.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ static struct irq_chip dino_interrupt_type = {
.name = "GSC-PCI",
.unmask = dino_unmask_irq,
.mask = dino_mask_irq,
.ack = no_ack_irq,
};


Expand Down
3 changes: 1 addition & 2 deletions drivers/parisc/eisa.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ static struct irq_chip eisa_interrupt_type = {
.name = "EISA",
.unmask = eisa_unmask_irq,
.mask = eisa_mask_irq,
.ack = no_ack_irq,
};

static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
Expand Down Expand Up @@ -340,7 +339,7 @@ static int __init eisa_probe(struct parisc_device *dev)
setup_irq(2, &irq2_action);
for (i = 0; i < 16; i++) {
set_irq_chip_and_handler(i, &eisa_interrupt_type,
handle_level_irq);
handle_simple_irq);
}

EISA_bus = 1;
Expand Down
3 changes: 1 addition & 2 deletions drivers/parisc/gsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ static struct irq_chip gsc_asic_interrupt_type = {
.name = "GSC-ASIC",
.unmask = gsc_asic_unmask_irq,
.mask = gsc_asic_mask_irq,
.ack = no_ack_irq,
};

int gsc_assign_irq(struct irq_chip *type, void *data)
Expand All @@ -153,7 +152,7 @@ int gsc_assign_irq(struct irq_chip *type, void *data)
if (irq > GSC_IRQ_MAX)
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);

return irq++;
Expand Down
8 changes: 8 additions & 0 deletions drivers/parisc/iosapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,13 @@ printk("\n");
DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
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);
}

Expand Down Expand Up @@ -705,6 +712,7 @@ static struct irq_chip iosapic_interrupt_type = {
.unmask = iosapic_unmask_irq,
.mask = iosapic_mask_irq,
.ack = cpu_ack_irq,
.eoi = iosapic_eoi_irq,
#ifdef CONFIG_SMP
.set_affinity = iosapic_set_affinity_irq,
#endif
Expand Down
3 changes: 1 addition & 2 deletions drivers/parisc/superio.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ static struct irq_chip superio_interrupt_type = {
.name = SUPERIO,
.unmask = superio_unmask_irq,
.mask = superio_mask_irq,
.ack = no_ack_irq,
};

#ifdef DEBUG_SUPERIO_INIT
Expand Down Expand Up @@ -354,7 +353,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
#endif

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);
}

/*
Expand Down

0 comments on commit 5189061

Please sign in to comment.