From: Marc Zyngier Date: Fri, 27 Mar 2015 13:09:22 +0000 (+0000) Subject: arm64: alternative: Allow immediate branch as alternative instruction X-Git-Tag: omap-for-v4.2/o2_dc~115^2~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fef7f2b2010381c795ae43743ad31931cc58f5ad;p=pandora-kernel.git arm64: alternative: Allow immediate branch as alternative instruction Since all immediate branches are PC-relative on Aarch64, these instructions cannot be used as an alternative with the simplistic approach we currently have (the immediate has been computed from the .altinstr_replacement section, and end-up being completely off if we insert it directly). This patch handles the b and bl instructions in a different way, using the insn framework to recompute the immediate, and generate the right displacement. Reviewed-by: Andre Przywara Acked-by: Will Deacon Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon --- Reading git-diff-tree failed