diff options
author | Quentin Perret <qperret@google.com> | 2021-06-08 14:45:17 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-06-11 15:24:11 +0300 |
commit | 87ec0606733e1aa9568f54ddb41f03aa6b5687f2 (patch) | |
tree | a97ecf27ebebbd18a5301e024eb2d3d84fdf4085 /arch/arm64/kvm/hyp/include/nvhe/gfp.h | |
parent | d978b9cfe6fe8008467f8c5d51677f52e7815b39 (diff) | |
download | linux-87ec0606733e1aa9568f54ddb41f03aa6b5687f2.tar.xz |
KVM: arm64: Use less bits for hyp_page order
The hyp_page order is currently encoded on 4 bytes even though it is
guaranteed to be smaller than this. Make it 2 bytes to reduce the hyp
vmemmap overhead.
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210608114518.748712-7-qperret@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/include/nvhe/gfp.h')
-rw-r--r-- | arch/arm64/kvm/hyp/include/nvhe/gfp.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp/include/nvhe/gfp.h b/arch/arm64/kvm/hyp/include/nvhe/gfp.h index 3ea7bfb6c380..fb0f523d1492 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/gfp.h +++ b/arch/arm64/kvm/hyp/include/nvhe/gfp.h @@ -7,7 +7,7 @@ #include <nvhe/memory.h> #include <nvhe/spinlock.h> -#define HYP_NO_ORDER UINT_MAX +#define HYP_NO_ORDER USHRT_MAX struct hyp_pool { /* @@ -19,11 +19,11 @@ struct hyp_pool { struct list_head free_area[MAX_ORDER]; phys_addr_t range_start; phys_addr_t range_end; - unsigned int max_order; + unsigned short max_order; }; /* Allocation */ -void *hyp_alloc_pages(struct hyp_pool *pool, unsigned int order); +void *hyp_alloc_pages(struct hyp_pool *pool, unsigned short order); void hyp_get_page(struct hyp_pool *pool, void *addr); void hyp_put_page(struct hyp_pool *pool, void *addr); |