Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153871
b: refs/heads/master
c: 81b79c2
h: refs/heads/master
i:
  153869: 3aab3c2
  153867: f51c448
  153863: 6214b30
  153855: ec13d35
v: v3
  • Loading branch information
Mike Frysinger committed Jun 23, 2009
1 parent 5a645a3 commit 494b6a8
Show file tree
Hide file tree
Showing 2 changed files with 26 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: 6f10fdabdce356aac3c948e659f39b6f1e2f7382
refs/heads/master: 81b79c213d0200fdd16951a9fb18748fd511d810
43 changes: 25 additions & 18 deletions trunk/arch/blackfin/kernel/irqchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,29 @@ static void check_stack_overflow(int irq)
static inline void check_stack_overflow(int irq) { }
#endif

#ifndef CONFIG_IPIPE
static void maybe_lower_to_irq14(void)
{
unsigned short pending, other_ints;

/*
* If we're the only interrupt running (ignoring IRQ15 which
* is for syscalls), lower our priority to IRQ14 so that
* softirqs run at that level. If there's another,
* lower-level interrupt, irq_exit will defer softirqs to
* that. If the interrupt pipeline is enabled, we are already
* running at IRQ14 priority, so we don't need this code.
*/
CSYNC();
pending = bfin_read_IPEND() & ~0x8000;
other_ints = pending & (pending - 1);
if (other_ints == 0)
lower_to_irq14();
}
#else
static inline void maybe_lower_to_irq14(void) { }
#endif

/*
* do_IRQ handles all hardware IRQs. Decoded IRQs should not
* come via this function. Instead, they should provide their
Expand All @@ -114,9 +137,6 @@ __attribute__((l1_text))
#endif
asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
#ifndef CONFIG_IPIPE
unsigned short pending, other_ints;
#endif
struct pt_regs *old_regs = set_irq_regs(regs);

irq_enter();
Expand All @@ -132,21 +152,8 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
else
generic_handle_irq(irq);

#ifndef CONFIG_IPIPE
/*
* If we're the only interrupt running (ignoring IRQ15 which
* is for syscalls), lower our priority to IRQ14 so that
* softirqs run at that level. If there's another,
* lower-level interrupt, irq_exit will defer softirqs to
* that. If the interrupt pipeline is enabled, we are already
* running at IRQ14 priority, so we don't need this code.
*/
CSYNC();
pending = bfin_read_IPEND() & ~0x8000;
other_ints = pending & (pending - 1);
if (other_ints == 0)
lower_to_irq14();
#endif /* !CONFIG_IPIPE */
maybe_lower_to_irq14();

irq_exit();

set_irq_regs(old_regs);
Expand Down

0 comments on commit 494b6a8

Please sign in to comment.