arm64: big-endian: write CPU holding pen address as LE
authorMatthew Leach <matthew.leach@arm.com>
Fri, 11 Oct 2013 13:52:18 +0000 (14:52 +0100)
committerVictor Kamensky <victor.kamensky@linaro.org>
Fri, 14 Mar 2014 01:28:33 +0000 (18:28 -0700)
commit67944dd8f2fcffe7084d077228287c6de70888b8
treed0d3ce98fe9acf2dbacbd92ee236fa84f841fc0e
parentbfe6e4a7171eb42cf20e0c0aca680ea2d42f9cd2
arm64: big-endian: write CPU holding pen address as LE

Currently when CPUs are brought online via a spin-table, the address
they should jump to is written to the cpu-release-addr in the kernel's
native endianness. As the kernel may switch endianness, secondaries
might read the value byte-reversed from what was intended, and they
would jump to the wrong address.

As the only current arm64 spin-table implementations are
little-endian, stricten up the arm64 spin-table definition such that
the value written to cpu-release-addr is _always_ little-endian
regardless of the endianness of any CPU. If a spinning CPU is
operating big-endian, it must byte-reverse the value before jumping to
handle this.

Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 710be9ac4ea0d2e02a2c4aa625795e65bf3db5b1)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm64/kernel/smp_spin_table.c