clocksource: arm_arch_timer: Set arch_mem_timer cpumask to cpu_possible_mask
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 9 Jul 2018 15:45:36 +0000 (16:45 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 10 Jul 2018 20:12:47 +0000 (22:12 +0200)
commit5e18e412973d6bb1804de1d4d30a891c774b006e
tree994d9dd644303b98bcafdc2e35826016c3f1b7bb
parent5b5ccbc2b041f98f26b984e013d303b7f9e6fb8e
clocksource: arm_arch_timer: Set arch_mem_timer cpumask to cpu_possible_mask

Currently, arch_mem_timer cpumask is set to cpu_all_mask which should be
fine. However, cpu_possible_mask is more accurate and if there are other
clockevent source in the system which are set to cpu_possible_mask, then
having cpu_all_mask may result in issue.

E.g. on a platform with arm,sp804 timer with rating 300 and
cpu_possible_mask and this arch_mem_timer timer with rating 400 and
cpu_all_mask, tick_check_preferred may choose both preferred as the
cpumasks are not equal though they must be.

This issue was root caused incorrectly initially and a fix was merged as
commit 1332a9055801 ("tick: Prefer a lower rating device only if it's CPU
local device").

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lkml.kernel.org/r/1531151136-18297-2-git-send-email-sudeep.holla@arm.com
drivers/clocksource/arm_arch_timer.c