Skip to contentSkip to conversation

timer irq setup

DISCUSSION Thomas Koeller 2 participants 2 messages Dec 17, 2007 – Dec 18, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

In arch/mips/kernel/traps.c, per_cpu_trap_init() contains code to set up the global cp0_compare_irq variable. Does this make sense? I'd say that either the irq setup should be moved to trap_init(), or cp0_compare_irq should be changed to a per-cpu variable, depending on what the original intention was.

tk

Signature · 2 lines
Thomas Koeller
thomas at koeller dot dyndns dot org
#1 lore raw
Quoted 6 lines · Thomas Koeller

In arch/mips/kernel/traps.c, per_cpu_trap_init() contains code to set up the global cp0_compare_irq variable. Does this make sense? I'd say that either the irq setup should be moved to trap_init(), or cp0_compare_irq should be changed to a per-cpu variable, depending on what the original intention was.

Technically it would be legal to route the timer interrupt to a different interrupt for each of possibly multiple processors, that's why it's done in per_cpu_trap_init().

Obviously the rest of the code isn't quite there and also to best of my knowledge all actual implementations use the same interrupt across all cores. So something like a global variable and a paranoia check in per_cpu_trap_init() to ensure all CPUs really use the same interrupt would seem reasonable.

Ralf