diff options
author | Alexander Graf <agraf@suse.de> | 2018-02-08 12:38:53 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-02-08 23:39:41 -0500 |
commit | d20fe50a7b3c8f936f7347e9cab2e9dd89c1199d (patch) | |
tree | 006f51196b43e606bfa12c958bb005b2ab5a5158 | |
parent | 790a9df5fbef982f2a6992194fe497dd2b794a3d (diff) |
KVM: PPC: Book3S HV: Branch inside feature section
We ended up with code that did a conditional branch inside a feature
section to code outside of the feature section. Depending on how the
object file gets organized, that might mean we exceed the 14bit
relocation limit for conditional branches:
arch/powerpc/kvm/built-in.o:arch/powerpc/kvm/book3s_hv_rmhandlers.S:416:(__ftr_alt_97+0x8): relocation truncated to fit: R_PPC64_REL14 against `.text'+1ca4
So instead of doing a conditional branch outside of the feature section,
let's just jump at the end of the same, making the branch very short.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index a7a20b85d8eb..7d1459e77de2 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -413,10 +413,11 @@ FTR_SECTION_ELSE | |||
413 | /* On P9 we use the split_info for coordinating LPCR changes */ | 413 | /* On P9 we use the split_info for coordinating LPCR changes */ |
414 | lwz r4, KVM_SPLIT_DO_SET(r6) | 414 | lwz r4, KVM_SPLIT_DO_SET(r6) |
415 | cmpwi r4, 0 | 415 | cmpwi r4, 0 |
416 | beq 63f | 416 | beq 1f |
417 | mr r3, r6 | 417 | mr r3, r6 |
418 | bl kvmhv_p9_set_lpcr | 418 | bl kvmhv_p9_set_lpcr |
419 | nop | 419 | nop |
420 | 1: | ||
420 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_300) | 421 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_300) |
421 | 63: | 422 | 63: |
422 | /* Order load of vcpu after load of vcore */ | 423 | /* Order load of vcpu after load of vcore */ |