From 14ecafa9d595ebb677811582d06c6a089cf7d7cb Mon Sep 17 00:00:00 2001 From: Maria Yu Date: Thu, 6 May 2021 11:22:59 +0800 Subject: [PATCH] Revert "clocksource: arch_timer: make virtual counter access configurable" This reverts commit dc9b4c45b25988bdd2e0bcd89eb7bbf4940f58e0. Disable userspace virtual counter access intended to makes it difficult to obtain precise timing measurements of the cache side channel. But it has been deprecated since it was found to be ineffective. Change-Id: I5cf59632ff1beb6ea51a53bea4eb3ad9467d4cd0 Signed-off-by: Maria Yu --- drivers/clocksource/Kconfig | 8 -------- drivers/clocksource/arm_arch_timer.c | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index e37cd76b6163..080f05b740b8 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -385,14 +385,6 @@ config SUN50I_ERRATUM_UNKNOWN1 the Allwinner A64 SoC. The workaround will only be active if the allwinner,erratum-unknown1 property is found in the timer node. -config ARM_ARCH_TIMER_VCT_ACCESS - bool "Support for ARM architected timer virtual counter access in userspace" - default n - depends on ARM_ARCH_TIMER - help - This option enables support for reading the ARM architected timer's - virtual counter in userspace. - config ARM_GLOBAL_TIMER bool "Support for the ARM global timer" if COMPILE_TEST select TIMER_OF if OF diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index e23f995e390d..ed29722e0258 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -863,8 +863,7 @@ static void arch_counter_set_user_access(void) * need to be workaround. The vdso may have been already * disabled though. */ - if (arch_timer_this_cpu_has_cntvct_wa() || - !IS_ENABLED(CONFIG_ARM_ARCH_TIMER_VCT_ACCESS)) + if (arch_timer_this_cpu_has_cntvct_wa()) pr_info("CPU%d: Trapping CNTVCT access\n", smp_processor_id()); else cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;