arm/arm64: KVM: Remove unreferenced S2_PGD_ORDER
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 16 Nov 2015 11:28:16 +0000 (11:28 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 18 Dec 2015 10:15:11 +0000 (10:15 +0000)
Since commit a987370 ("arm64: KVM: Fix stage-2 PGD allocation to have
per-page refcounting") there is no reference to S2_PGD_ORDER, so kill it
for the good.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_arm.h
arch/arm/kvm/mmu.c
arch/arm64/include/asm/kvm_mmu.h

index dc641ddf0784304434635080b5732ee215ab588f..b05bb5ae36592b2214e13ac12eff887fb0ddb86a 100644 (file)
 #define KVM_PHYS_SIZE  (1ULL << KVM_PHYS_SHIFT)
 #define KVM_PHYS_MASK  (KVM_PHYS_SIZE - 1ULL)
 #define PTRS_PER_S2_PGD        (1ULL << (KVM_PHYS_SHIFT - 30))
-#define S2_PGD_ORDER   get_order(PTRS_PER_S2_PGD * sizeof(pgd_t))
 
 /* Virtualization Translation Control Register (VTCR) bits */
 #define VTCR_SH0       (3 << 12)
index 61d96a645ff38aa6e304eea5a198373958fe69cb..22f7fa0124ec1d80c550fea0ecf55a2c7d603091 100644 (file)
@@ -656,9 +656,9 @@ static void *kvm_alloc_hwpgd(void)
  * kvm_alloc_stage2_pgd - allocate level-1 table for stage-2 translation.
  * @kvm:       The KVM struct pointer for the VM.
  *
- * Allocates the 1st level table only of size defined by S2_PGD_ORDER (can
- * support either full 40-bit input addresses or limited to 32-bit input
- * addresses). Clears the allocated pages.
+ * Allocates only the stage-2 HW PGD level table(s) (can support either full
+ * 40-bit input addresses or limited to 32-bit input addresses). Clears the
+ * allocated pages.
  *
  * Note we don't need locking here as this is only called when the VM is
  * created, which can only be done once.
index 61505676d0853bb65710fc9ad7746db8f58e4658..54cba803e2d952f12d24a121ae3cb303796903bc 100644 (file)
@@ -158,7 +158,6 @@ static inline bool kvm_s2pmd_readonly(pmd_t *pmd)
 #define PTRS_PER_S2_PGD_SHIFT  (KVM_PHYS_SHIFT - PGDIR_SHIFT)
 #endif
 #define PTRS_PER_S2_PGD                (1 << PTRS_PER_S2_PGD_SHIFT)
-#define S2_PGD_ORDER           get_order(PTRS_PER_S2_PGD * sizeof(pgd_t))
 
 #define kvm_pgd_index(addr)    (((addr) >> PGDIR_SHIFT) & (PTRS_PER_S2_PGD - 1))
 
This page took 0.027729 seconds and 5 git commands to generate.