]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 28 Jan 2020 19:22:13 +0000 (20:22 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 23 Mar 2020 10:24:28 +0000 (11:24 +0100)
BugLink: https://bugs.launchpad.net/bugs/1868538
commit 45939ce292b4b11159719faaf60aba7d58d5fe33 upstream.

It is possible for a system with an ARMv8 timer to run a 32-bit kernel.
When this happens we will unconditionally have the vDSO code remove the
__vdso_gettimeofday and __vdso_clock_gettime symbols because
cntvct_functional() returns false since it does not match that
compatibility string.

Fixes: ecf99a439105 ("ARM: 8331/1: VDSO initialization, mapping, and synchronization")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/arm/kernel/vdso.c

index 9bf16c93ee6a55caab2b521c3aef30afcfc9f9c2..f00e45fa62c408b82133bc0c731d05d18863ab44 100644 (file)
@@ -92,6 +92,8 @@ static bool __init cntvct_functional(void)
         * this.
         */
        np = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
+       if (!np)
+               np = of_find_compatible_node(NULL, NULL, "arm,armv8-timer");
        if (!np)
                goto out_put;