arm64: alternative: Add support for patching adrp instructions
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 9 Sep 2016 13:07:13 +0000 (14:07 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 9 Sep 2016 14:03:28 +0000 (15:03 +0100)
commitc831b2ae257853ecd36ea4f7d788bf0665e4cf89
treee00da72bef46c833390c94483c9d22714a6d1ded
parent46084bc253e1acdd6c47846e91fc20f4ab4f1fec
arm64: alternative: Add support for patching adrp instructions

adrp uses PC-relative address offset to a page (of 4K size) of
a symbol. If it appears in an alternative code patched in, we
should adjust the offset to reflect the address where it will
be run from. This patch adds support for fixing the offset
for adrp instructions.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/alternative.c