How to use Timer broadcast on Multi-Processor system with linux 3.10?
Posted
by
kevin.ji
on Super User
See other posts from Super User
or by kevin.ji
Published on 2014-05-31T06:32:28Z
Indexed on
2014/05/31
9:34 UTC
Read the original article
Hit count: 338
Hardware: ARM Cortex-A9 * 2
Software: linux-3.10.0
The platform has 2 cores of arm cortex-a9. Item CONFIG_LOCAL_TIMERS is not set in linux menuconfig. I want to use only one hardware timer to supply tick for all cpu.
Interrupts looks like:
CPU0 CPU1
57: 6697 0 GIC timer
81: 213 0 GIC uart-pl011
103: 0 0 GIC gmac0
104: 0 0 GIC gmac1
IPI0: 0 1 CPU wakeup interrupts
IPI1: 0 0 Timer broadcast interrupts
IPI2: 967 866 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 1 2 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 0 0 CPU backtrace
Err: 0
Timer broadcast interrupts counter does not add. And it looks like that cpu1 does not work at all.But this method works well with linux-3.4, and the interrupt info looks as below in linux-3.4:
# cat /proc/interrupts
CPU0 CPU1
57: 8596 0 GIC timer
81: 91 0 GIC uart-pl011
103: 0 0 GIC gmac0
104: 0 0 GIC gmac1
IPI0: 0 8560 Timer broadcast interrupts
IPI1: 884 1020 Rescheduling interrupts
IPI2: 0 0 Function call interrupts
IPI3: 0 6 Single function call interrupts
IPI4: 0 0 CPU stop interrupts
IPI5: 0 0 CPU backtrace
Err: 0
The count of Timer broadcast interrupts is adding. And all of cpus work well. I don't know why. Any answer is welcome. :)
© Super User or respective owner