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>

authored by

Voss, Nikolaus and committed by
Haavard Skinnemoen
56d3eef2 db6ea2c1

+5 -1
+5 -1
arch/avr32/kernel/time.c
··· 43 43 { 44 44 struct clock_event_device *evdev = dev_id; 45 45 46 + if (unlikely(!(intc_get_pending(0) & 1))) 47 + return IRQ_NONE; 48 + 46 49 /* 47 50 * Disable the interrupt until the clockevent subsystem 48 51 * reprograms it. ··· 58 55 59 56 static struct irqaction timer_irqaction = { 60 57 .handler = timer_interrupt, 61 - .flags = IRQF_TIMER | IRQF_DISABLED, 58 + /* Oprofile uses the same irq as the timer, so allow it to be shared */ 59 + .flags = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED, 62 60 .name = "avr32_comparator", 63 61 }; 64 62