[PATCH v2 26/28] clock: csrc-4k: Add support for vdso_direct

Vincenzo Frascino
2018-11-29T17:11:53Z

This patch is a consequence of the introduction of vdso_direct on mips
architectures.

If the clock source is selected, vdso_direct is set to true.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
arch/mips/kernel/csrc-r4k.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
index eed099f35bf1..97e2a8aafdd6 100644
--- a/arch/mips/kernel/csrc-r4k.c
+++ b/arch/mips/kernel/csrc-r4k.c
@@ -77,8 +77,10 @@ int __init init_r4k_clocksource(void)
* R2 onwards makes the count accessible to user mode so it can be used
* by the VDSO (HWREna is configured by configure_hwrena()).
*/
- if (cpu_has_mips_r2_r6 && rdhwr_count_usable())
+ if (cpu_has_mips_r2_r6 && rdhwr_count_usable()) {
+ clocksource_mips.archdata.vdso_direct = true;
clocksource_mips.archdata.vdso_clock_mode = VDSO_CLOCK_R4K;
+ }

clocksource_register_hz(&clocksource_mips, mips_hpt_frequency);