powerpc/lib: Add alt patching test of branching past the last instruction
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 16 Apr 2018 14:39:05 +0000 (00:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 11 May 2018 13:29:03 +0000 (23:29 +1000)
commit6158faed7c80256fb6b370781cb3cd6815f4ba69
tree4ac69bbbda49b8975863df88893a370c0a7b8e0c
parentb58e7987965028c1afbd95cc0b14be0543b937a0
powerpc/lib: Add alt patching test of branching past the last instruction

Add a test of the relative branch patching logic in the alternate
section feature fixup code. This tests that if we branch past the last
instruction of the alternate section, the branch is not patched.
That's because the assembler will have created a branch that already
points to the first instruction after the patched section, which is
correct and needs no further patching.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/feature-fixups-test.S
arch/powerpc/lib/feature-fixups.c