Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Merge VCPU_GPR

Merge the defines of VCPU_GPR from different places.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Neuling and committed by
Benjamin Herrenschmidt
d72be892 44ce6a5e

+7 -14
+7
arch/powerpc/include/asm/ppc_asm.h
··· 178 178 #define HMT_HIGH or 3,3,3 179 179 #define HMT_EXTRA_HIGH or 7,7,7 # power7 only 180 180 181 + #ifdef CONFIG_PPC64 182 + #define ULONG_SIZE 8 183 + #else 184 + #define ULONG_SIZE 4 185 + #endif 186 + #define VCPU_GPR(n) (VCPU_GPRS + (n * ULONG_SIZE)) 187 + 181 188 #ifdef __KERNEL__ 182 189 #ifdef CONFIG_PPC64 183 190
-3
arch/powerpc/kvm/book3s_hv_rmhandlers.S
··· 72 72 mtsrr1 r6 73 73 RFI 74 74 75 - #define ULONG_SIZE 8 76 - #define VCPU_GPR(n) (VCPU_GPRS + (n * ULONG_SIZE)) 77 - 78 75 /****************************************************************************** 79 76 * * 80 77 * Entry code *
-8
arch/powerpc/kvm/book3s_interrupts.S
··· 25 25 #include <asm/exception-64s.h> 26 26 27 27 #if defined(CONFIG_PPC_BOOK3S_64) 28 - 29 - #define ULONG_SIZE 8 30 28 #define FUNC(name) GLUE(.,name) 31 - 32 29 #elif defined(CONFIG_PPC_BOOK3S_32) 33 - 34 - #define ULONG_SIZE 4 35 30 #define FUNC(name) name 36 - 37 31 #endif /* CONFIG_PPC_BOOK3S_XX */ 38 32 39 - 40 - #define VCPU_GPR(n) (VCPU_GPRS + (n * ULONG_SIZE)) 41 33 #define VCPU_LOAD_NVGPRS(vcpu) \ 42 34 PPC_LL r14, VCPU_GPR(R14)(vcpu); \ 43 35 PPC_LL r15, VCPU_GPR(R15)(vcpu); \
-2
arch/powerpc/kvm/booke_interrupts.S
··· 25 25 #include <asm/page.h> 26 26 #include <asm/asm-offsets.h> 27 27 28 - #define VCPU_GPR(n) (VCPU_GPRS + (n * 4)) 29 - 30 28 /* The host stack layout: */ 31 29 #define HOST_R1 0 /* Implied by stwu. */ 32 30 #define HOST_CALLEE_LR 4
-1
arch/powerpc/kvm/bookehv_interrupts.S
··· 37 37 38 38 #define LONGBYTES (BITS_PER_LONG / 8) 39 39 40 - #define VCPU_GPR(n) (VCPU_GPRS + (n * LONGBYTES)) 41 40 #define VCPU_GUEST_SPRG(n) (VCPU_GUEST_SPRGS + (n * LONGBYTES)) 42 41 43 42 /* The host stack layout: */