summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Aberg <maberg@gaisler.com>2017-04-11 13:55:02 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2017-05-02 12:34:49 +0200
commit8927c0f8e72a12ee9e325033c0770adc1eed879d (patch)
treee7a6287e742d6ba719e183ba3e8e34d267a848c0
parentleon, gptimer: fixed probing separate interrupts (diff)
downloadrtems-8927c0f8e72a12ee9e325033c0770adc1eed879d.tar.bz2
leon, gptimer: offset intnum with subtimer index
If separate interrupts are not available, then do not add the timer hardware index number when configuring interrupt affinity.
-rw-r--r--c/src/lib/libbsp/sparc/shared/timer/gptimer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
index 229e90666d..014bd7cd68 100644
--- a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
+++ b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
@@ -444,7 +444,13 @@ static void gptimer_tlib_irq_reg(struct tlib_dev *hand, tlib_isr_t func, void *d
#if RTEMS_SMP
if (flags & TLIB_FLAGS_BROADCAST) {
- drvmgr_interrupt_set_affinity(priv->dev, timer->tindex,
+ int tindex = 0;
+
+ if (priv->separate_interrupt) {
+ /* Offset interrupt number with HW subtimer index */
+ tindex = timer->tindex;
+ }
+ drvmgr_interrupt_set_affinity(priv->dev, tindex,
_SMP_Online_processors);
}
#endif