Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57764
b: refs/heads/master
c: 462b529
h: refs/heads/master
v: v3
  • Loading branch information
Grant Grundler authored and Kyle McMartin committed Jun 12, 2007
1 parent 9006dba commit ffb665d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3d4ed4e3e5aa8d9e6b4b795f004a7028ce780e9
refs/heads/master: 462b529f91b618f4bd144bbc6184f616dfb58a1e
26 changes: 8 additions & 18 deletions trunk/arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *);
static volatile unsigned long cpu_eiem = 0;

/*
** ack bitmap ... habitually set to 1, but reset to zero
** local ACK bitmap ... habitually set to 1, but reset to zero
** between ->ack() and ->end() of the interrupt to prevent
** re-interruption of a processing interrupt.
*/
static volatile unsigned long global_ack_eiem = ~0UL;
/*
** Local bitmap, same as above but for per-cpu interrupts
*/
static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;

static void cpu_disable_irq(unsigned int irq)
Expand Down Expand Up @@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq)
int cpu = smp_processor_id();

/* Clear in EIEM so we can no longer process */
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
per_cpu(local_ack_eiem, cpu) &= ~mask;
else
global_ack_eiem &= ~mask;
per_cpu(local_ack_eiem, cpu) &= ~mask;

/* disable the interrupt */
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));

/* and now ack it */
mtctl(mask, 23);
}
Expand All @@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq)
int cpu = smp_processor_id();

/* set it in the eiems---it's no longer in process */
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
per_cpu(local_ack_eiem, cpu) |= mask;
else
global_ack_eiem |= mask;
per_cpu(local_ack_eiem, cpu) |= mask;

/* enable the interrupt */
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
}

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
local_irq_disable();
irq_enter();

eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem &
per_cpu(local_ack_eiem, cpu);
eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
if (!eirr_val)
goto set_out;
irq = eirr_to_irq(eirr_val);
Expand All @@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
return;

set_out:
set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
goto out;
}

Expand Down

0 comments on commit ffb665d

Please sign in to comment.