diff options
author | Voss, Nikolaus <N.Voss@weinmann.de> | 2008-07-18 16:44:48 +0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-25 16:31:29 +0400 |
commit | 56d3eef2b49b06618981c87edba16a607bf10ddd (patch) | |
tree | 99c105d080bd52414dee7ca7d049a17991272948 /arch/avr32/kernel | |
parent | db6ea2c17cef531a58f48c51c3a0892edcaf1380 (diff) | |
download | linux-56d3eef2b49b06618981c87edba16a607bf10ddd.tar.xz |
avr32: allow system timer to share interrupt to make OProfile work
The following patch allows the avr32_comparator interrupt to be shared.
This is necessary as the avr32 oprofile driver shares the irq group 0
with the timer.
To make OProfile actually work on AVR32, a small patch for oprofiled is
also needed (posted to the oprofile mailing list).
Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
[haavard.skinnemoen@atmel.com: set IRQF_SHARED unconditionally]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r-- | arch/avr32/kernel/time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index abd954fb7ba0..7e7f32771ae1 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c @@ -43,6 +43,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) { struct clock_event_device *evdev = dev_id; + if (unlikely(!(intc_get_pending(0) & 1))) + return IRQ_NONE; + /* * Disable the interrupt until the clockevent subsystem * reprograms it. @@ -55,7 +58,8 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_TIMER | IRQF_DISABLED, + /* Oprofile uses the same irq as the timer, so allow it to be shared */ + .flags = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED, .name = "avr32_comparator", }; |