Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149631
b: refs/heads/master
c: d7cb10d
h: refs/heads/master
i:
  149629: 847cd8a
  149627: f1efaca
  149623: b528a1d
  149615: 278ac67
  149599: 25e0f40
  149567: 6309868
  149503: 95bf031
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed May 21, 2009
1 parent 081e3ab commit 4ba4dac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 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: f2694ba56808a3a0fa45d9bb45289575f31e48d2
refs/heads/master: d7cb10d6d23f451eec3d1f0f4e4e8862333fa152
31 changes: 17 additions & 14 deletions trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,27 +301,30 @@ static inline void handle_one_irq(unsigned int irq)
}
#endif

static inline void check_stack_overflow(void)
{
#ifdef CONFIG_DEBUG_STACKOVERFLOW
long sp;

sp = __get_SP() & (THREAD_SIZE-1);

/* check for stack overflow: is there less than 2KB free? */
if (unlikely(sp < (sizeof(struct thread_info) + 2048))) {
printk("do_IRQ: stack overflow: %ld\n",
sp - sizeof(struct thread_info));
dump_stack();
}
#endif
}

void do_IRQ(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned int irq;

irq_enter();

#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 2KB free? */
{
long sp;

sp = __get_SP() & (THREAD_SIZE-1);

if (unlikely(sp < (sizeof(struct thread_info) + 2048))) {
printk("do_IRQ: stack overflow: %ld\n",
sp - sizeof(struct thread_info));
dump_stack();
}
}
#endif
check_stack_overflow();

/*
* Every platform is required to implement ppc_md.get_irq.
Expand Down

0 comments on commit 4ba4dac

Please sign in to comment.