diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/kvm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index 926f93fd722d..239a70d750a2 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c | |||
@@ -107,6 +107,20 @@ static void kvm_patch_ins_nop(u32 *inst) | |||
107 | kvm_patch_ins(inst, KVM_INST_NOP); | 107 | kvm_patch_ins(inst, KVM_INST_NOP); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void kvm_patch_ins_b(u32 *inst, int addr) | ||
111 | { | ||
112 | #ifdef CONFIG_RELOCATABLE | ||
113 | /* On relocatable kernels interrupts handlers and our code | ||
114 | can be in different regions, so we don't patch them */ | ||
115 | |||
116 | extern u32 __end_interrupts; | ||
117 | if ((ulong)inst < (ulong)&__end_interrupts) | ||
118 | return; | ||
119 | #endif | ||
120 | |||
121 | kvm_patch_ins(inst, KVM_INST_B | (addr & KVM_INST_B_MASK)); | ||
122 | } | ||
123 | |||
110 | static u32 *kvm_alloc(int len) | 124 | static u32 *kvm_alloc(int len) |
111 | { | 125 | { |
112 | u32 *p; | 126 | u32 *p; |