diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-06-30 13:40:37 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-07-03 17:41:27 -0400 |
commit | fd16fe6820ede711c6e6950ffebdbc8ade5d05b3 (patch) | |
tree | c4f9690d8b4f1323933bbc3df98ad51b1c2dcf0b /arch | |
parent | 3f0f8830d440e3edf5580424519a7c3434891c64 (diff) |
arm64: KVM: Kill HYP_PAGE_OFFSET
HYP_PAGE_OFFSET is not massively useful. And the way we use it
in KERN_HYP_VA is inconsistent with the equivalent operation in
EL2, where we use a mask instead.
Let's replace the uses of HYP_PAGE_OFFSET with HYP_PAGE_OFFSET_MASK,
and get rid of the pointless macro.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/kvm_mmu.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index 6149dfc2c012..2f1e1aec5ecb 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h | |||
@@ -70,7 +70,6 @@ | |||
70 | */ | 70 | */ |
71 | #define HYP_PAGE_OFFSET_SHIFT VA_BITS | 71 | #define HYP_PAGE_OFFSET_SHIFT VA_BITS |
72 | #define HYP_PAGE_OFFSET_MASK ((UL(1) << HYP_PAGE_OFFSET_SHIFT) - 1) | 72 | #define HYP_PAGE_OFFSET_MASK ((UL(1) << HYP_PAGE_OFFSET_SHIFT) - 1) |
73 | #define HYP_PAGE_OFFSET (PAGE_OFFSET & HYP_PAGE_OFFSET_MASK) | ||
74 | 73 | ||
75 | /* | 74 | /* |
76 | * Our virtual mapping for the idmap-ed MMU-enable code. Must be | 75 | * Our virtual mapping for the idmap-ed MMU-enable code. Must be |
@@ -104,7 +103,7 @@ alternative_endif | |||
104 | #include <asm/mmu_context.h> | 103 | #include <asm/mmu_context.h> |
105 | #include <asm/pgtable.h> | 104 | #include <asm/pgtable.h> |
106 | 105 | ||
107 | #define KERN_TO_HYP(kva) ((unsigned long)kva - PAGE_OFFSET + HYP_PAGE_OFFSET) | 106 | #define KERN_TO_HYP(kva) ((unsigned long)kva & HYP_PAGE_OFFSET_MASK) |
108 | 107 | ||
109 | /* | 108 | /* |
110 | * We currently only support a 40bit IPA. | 109 | * We currently only support a 40bit IPA. |