ARM: decompressor: Remove __hyp_get_vectors usage
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 3 Apr 2017 18:38:02 +0000 (19:38 +0100)
committerChristoffer Dall <cdall@linaro.org>
Sun, 9 Apr 2017 14:49:33 +0000 (07:49 -0700)
commit4897e36c8d37fe508a423d6d15a635aba2557b4e
tree5cf15d3edd71a198eac4c4af5878d8f6d1948f09
parent47eb3cba48ec11122994057cdc1e5dd7ab9b2be2
ARM: decompressor: Remove __hyp_get_vectors usage

When the compressed image needs to be relocated to avoid being
overwritten by the decompression process, we need to relocate
the hyp vectors as well so that we can find them once the
decompression has taken effect.

For that, we perform the following calculation:
u32 v = __hyp_get_vectors();
v += offset;
__hyp_set_vectors(v);

But we're guaranteed that the initial value of v as returned by
__hyp_get_vectors is always __hyp_stub_vectors, because we have
just set it by calling __hyp_stub_install.

So let's remove the use of __hyp_get_vectors, and directly use
__hyp_stub_vectors instead.

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
arch/arm/boot/compressed/head.S