Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91546
b: refs/heads/master
c: e6768a4
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Apr 16, 2008
1 parent 5daa303 commit 0a85a8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 7c6352a4699e9a3a2d91b2cddbf3f1048207e904
refs/heads/master: e6768a4f392d05bc11ed508d35938932c73aac5a
15 changes: 14 additions & 1 deletion trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,21 @@ void do_IRQ(struct pt_regs *regs)
handler = &__do_IRQ;
irqtp->task = curtp->task;
irqtp->flags = 0;

/* Copy the softirq bits in preempt_count so that the
* softirq checks work in the hardirq context.
*/
irqtp->preempt_count =
(irqtp->preempt_count & ~SOFTIRQ_MASK) |
(curtp->preempt_count & SOFTIRQ_MASK);

call_handle_irq(irq, desc, irqtp, handler);
irqtp->task = NULL;


/* Set any flag that may have been set on the
* alternate stack
*/
if (irqtp->flags)
set_bits(irqtp->flags, &curtp->flags);
} else
Expand Down Expand Up @@ -357,7 +370,7 @@ void irq_ctx_init(void)
memset((void *)softirq_ctx[i], 0, THREAD_SIZE);
tp = softirq_ctx[i];
tp->cpu = i;
tp->preempt_count = SOFTIRQ_OFFSET;
tp->preempt_count = 0;

memset((void *)hardirq_ctx[i], 0, THREAD_SIZE);
tp = hardirq_ctx[i];
Expand Down

0 comments on commit 0a85a8a

Please sign in to comment.