summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/zevio-timer.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-03-31 20:49:00 +0530
committerIngo Molnar <mingo@kernel.org>2015-04-02 17:46:00 +0200
commitb337a9380f7effd60d082569dd7e0b97a7549730 (patch)
tree2cf1f6d3e69a57782d3d0ed71533aace12e00150 /drivers/clocksource/zevio-timer.c
parent345527b1edce8df719e0884500c76832a18211c3 (diff)
downloadop-kernel-dev-b337a9380f7effd60d082569dd7e0b97a7549730.zip
op-kernel-dev-b337a9380f7effd60d082569dd7e0b97a7549730.tar.gz
timer: Allocate per-cpu tvec_base's statically
Memory for the 'tvec_base' array is allocated separately for the boot CPU (statically) and non-boot CPUs (dynamically). The reason is because __TIMER_INITIALIZER() needs to set ->base to a valid pointer (because we've made NULL special, hint: lock_timer_base()) and we cannot get a compile time pointer to per-cpu entries because we don't know where we'll map the section, even for the boot cpu. This can be simplified a bit by statically allocating per-cpu memory. The only disadvantage is that memory for one of the structures will stay unused, i.e. for the boot CPU, which uses boot_tvec_bases. This will also guarantee that tvec_base is cacheline aligned. Even though tvec_base has ____cacheline_aligned stuck on, kzalloc_node() does not actually respect that (but guarantees a minimum u64 alignment). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/17cdf560f2727f687ab159707d0aa591f8a2f82d.1427814611.git.viresh.kumar@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/clocksource/zevio-timer.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud