ARM: add PROC_VTABLE and PROC_TABLE macros
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 13 Feb 2019 21:32:20 +0000 (16:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:25:38 +0000 (10:25 +0100)
commitb11fd96c0eca0c1840d82bc4999ee147ad2ebbdc
tree60766d971713bd0c848c05651d79cf4bca9078a8
parent06b5ec99f2eef0dcc2492f0623c95aa64fe064f3
ARM: add PROC_VTABLE and PROC_TABLE macros

Commit e209950fdd065d2cc46e6338e47e52841b830cba upstream.

Allow the way we access members of the processor vtable to be changed
at compile time.  We will need to move to per-CPU vtables to fix the
Spectre variant 2 issues on big.Little systems.

However, we have a couple of calls that do not need the vtable
treatment, and indeed cause a kernel warning due to the (later) use
of smp_processor_id(), so also introduce the PROC_TABLE macro for
these which always use CPU 0's function pointers.

Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David A. Long <dave.long@linaro.org>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Tested-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/include/asm/proc-fns.h
arch/arm/kernel/setup.c