ARM: ensure that processor vtables is not lost after boot
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 14 Feb 2019 14:49:29 +0000 (09:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:18:27 +0000 (10:18 +0100)
commit2307923f865c500b3b05ff131f00a9388bd442dd
tree254c03112d27d6bc44aac7fee5bfff76a4d7bcb6
parentab6c39771d579350bcd9c46514831b05430bd51a
ARM: ensure that processor vtables is not lost after boot

Commit 3a4d0c2172bcf15b7a3d9d498b2b355f9864286b upstream.

Marek Szyprowski reported problems with CPU hotplug in current kernels.
This was tracked down to the processor vtables being located in an
init section, and therefore discarded after kernel boot, despite being
required after boot to properly initialise the non-boot CPUs.

Arrange for these tables to end up in .rodata when required.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 383fb3ee8024 ("ARM: spectre-v2: per-CPU vtables to work around big.Little systems")
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mm/proc-macros.S