Commit dc9267f0 authored by David S. Miller's avatar David S. Miller

[SPARC64]: SA_SAMPLE_RANDOMNESS fix.

Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 306b8009
...@@ -791,16 +791,24 @@ void handler_irq(int irq, struct pt_regs *regs) ...@@ -791,16 +791,24 @@ void handler_irq(int irq, struct pt_regs *regs)
#endif #endif
if ((flags & IBF_MULTI) == 0) { if ((flags & IBF_MULTI) == 0) {
struct irqaction *ap = bp->irq_info; struct irqaction *ap = bp->irq_info;
ap->handler(__irq(bp), ap->dev_id, regs); int ret;
random |= ap->flags & SA_SAMPLE_RANDOM;
ret = ap->handler(__irq(bp), ap->dev_id, regs);
if (ret == IRQ_HANDLED)
random |= ap->flags;
} else { } else {
void **vector = (void **)bp->irq_info; void **vector = (void **)bp->irq_info;
int ent; int ent;
for (ent = 0; ent < 4; ent++) { for (ent = 0; ent < 4; ent++) {
struct irqaction *ap = vector[ent]; struct irqaction *ap = vector[ent];
if (ap != NULL) { if (ap != NULL) {
ap->handler(__irq(bp), ap->dev_id, regs); int ret;
random |= ap->flags & SA_SAMPLE_RANDOM;
ret = ap->handler(__irq(bp),
ap->dev_id,
regs);
if (ret == IRQ_HANDLED)
random |= ap->flags;
} }
} }
} }
...@@ -813,8 +821,9 @@ void handler_irq(int irq, struct pt_regs *regs) ...@@ -813,8 +821,9 @@ void handler_irq(int irq, struct pt_regs *regs)
} }
#endif #endif
upa_writel(ICLR_IDLE, bp->iclr); upa_writel(ICLR_IDLE, bp->iclr);
/* Test and add entropy */ /* Test and add entropy */
if (random) if (random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq); add_interrupt_randomness(irq);
} }
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment