diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-02-15 04:55:07 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2016-02-16 05:44:26 +0300 |
commit | 462ee11e58c96b81707d98fb1d02a8a3e84290ce (patch) | |
tree | bbf91f9e84eea0c675e68e461d4e2f14e0a5d046 /arch/powerpc/kvm/book3s_64_vio.c | |
parent | f8626985c7c2485c423ce9f448028f81535b0ecc (diff) | |
download | linux-462ee11e58c96b81707d98fb1d02a8a3e84290ce.tar.xz |
KVM: PPC: Replace SPAPR_TCE_SHIFT with IOMMU_PAGE_SHIFT_4K
SPAPR_TCE_SHIFT is used in few places only and since IOMMU_PAGE_SHIFT_4K
can be easily used instead, remove SPAPR_TCE_SHIFT.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_vio.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_64_vio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index 1a1e14f8572f..84993d151db3 100644 --- a/arch/powerpc/kvm/book3s_64_vio.c +++ b/arch/powerpc/kvm/book3s_64_vio.c @@ -36,12 +36,13 @@ #include <asm/ppc-opcode.h> #include <asm/kvm_host.h> #include <asm/udbg.h> +#include <asm/iommu.h> #define TCES_PER_PAGE (PAGE_SIZE / sizeof(u64)) static unsigned long kvmppc_tce_pages(unsigned long window_size) { - return ALIGN((window_size >> SPAPR_TCE_SHIFT) + return ALIGN((window_size >> IOMMU_PAGE_SHIFT_4K) * sizeof(u64), PAGE_SIZE) / PAGE_SIZE; } |