Skip to content

Commit

Permalink
parisc: convert cpu interrupts to proper flow handlers
Browse files Browse the repository at this point in the history
Only major change is renaming functions to match the conventions
expected by the generic irq code.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
  • Loading branch information
Kyle McMartin committed Oct 14, 2010
1 parent ba20085 commit 4d4f681
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion arch/parisc/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern void parisc_do_IRQ(unsigned int irq, struct irq_desc *desc);
void no_ack_irq(unsigned int irq);
void no_end_irq(unsigned int irq);
void cpu_ack_irq(unsigned int irq);
void cpu_end_irq(unsigned int irq);
void cpu_eoi_irq(unsigned int irq);

extern int txn_alloc_irq(unsigned int nbits);
extern int txn_claim_irq(int);
Expand Down
25 changes: 9 additions & 16 deletions arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static volatile unsigned long cpu_eiem = 0;
*/
static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;

static void cpu_disable_irq(unsigned int irq)
static void cpu_mask_irq(unsigned int irq)
{
unsigned long eirr_bit = EIEM_MASK(irq);

Expand All @@ -63,7 +63,7 @@ static void cpu_disable_irq(unsigned int irq)
* then gets disabled */
}

static void cpu_enable_irq(unsigned int irq)
static void cpu_unmask_irq(unsigned int irq)
{
unsigned long eirr_bit = EIEM_MASK(irq);

Expand All @@ -75,12 +75,6 @@ static void cpu_enable_irq(unsigned int irq)
smp_send_all_nop();
}

static unsigned int cpu_startup_irq(unsigned int irq)
{
cpu_enable_irq(irq);
return 0;
}

void no_ack_irq(unsigned int irq) { }
void no_end_irq(unsigned int irq) { }

Expand All @@ -99,7 +93,7 @@ void cpu_ack_irq(unsigned int irq)
mtctl(mask, 23);
}

void cpu_end_irq(unsigned int irq)
void cpu_eoi_irq(unsigned int irq)
{
unsigned long mask = EIEM_MASK(irq);
int cpu = smp_processor_id();
Expand Down Expand Up @@ -146,12 +140,10 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)

static struct irq_chip cpu_interrupt_type = {
.name = "CPU",
.startup = cpu_startup_irq,
.shutdown = cpu_disable_irq,
.enable = cpu_enable_irq,
.disable = cpu_disable_irq,
.mask = cpu_mask_irq,
.unmask = cpu_unmask_irq,
.ack = cpu_ack_irq,
.eoi = cpu_end_irq,
.eoi = cpu_eoi_irq,
#ifdef CONFIG_SMP
.set_affinity = cpu_set_affinity_irq,
#endif
Expand Down Expand Up @@ -251,7 +243,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
if (type) {
set_irq_chip_and_handler(irq, type, parisc_do_IRQ);
set_irq_chip_data(irq, data);
cpu_enable_irq(irq);
cpu_unmask_irq(irq);
}
return 0;
}
Expand Down Expand Up @@ -399,7 +391,8 @@ static void claim_cpu_irqs(void)
{
int i;
for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
set_irq_chip_and_handler(i, &cpu_interrupt_type, parisc_do_IRQ);
set_irq_chip_and_handler(i, &cpu_interrupt_type,
handle_level_irq);
}

set_irq_handler(TIMER_IRQ, handle_percpu_irq);
Expand Down
2 changes: 1 addition & 1 deletion drivers/parisc/iosapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ static void iosapic_end_irq(unsigned int 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_end_irq(irq);
cpu_eoi_irq(irq);
}

static unsigned int iosapic_startup_irq(unsigned int irq)
Expand Down

0 comments on commit 4d4f681

Please sign in to comment.