From 7a2e30267bdb9ab2ff15a1e9d7e57bb7ea9bd3a3 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 21 Jul 2016 13:46:44 -0700 Subject: gpu: nvgpu: Use consistent definition for PTE size In the buddy allocator the BALLOC_PTE_SIZE_* macros are inconsistent with the gmmu_page_size_* enum. This patch makes the buddy allocator use the gmmu_page_size_* fields and now has only BALLOC_PTE_SIZE_ANY for when the allocator does not care about PTE size. Change-Id: Idbe727b8208e1ace2b947d67f698c471782d5587 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1185136 Reviewed-by: Konsta Holtta GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu --- drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h') diff --git a/drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h b/drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h index 55de9bc9..1a6aed48 100644 --- a/drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h +++ b/drivers/gpu/nvgpu/gk20a/buddy_allocator_priv.h @@ -46,11 +46,10 @@ struct gk20a_buddy { /* * Size of the PDE this buddy is using. This allows for grouping like - * sized allocations into the same PDE. + * sized allocations into the same PDE. This uses the gmmu_pgsz_gk20a + * enum except for the BALLOC_PTE_SIZE_ANY specifier. */ -#define BALLOC_PTE_SIZE_ANY 0x0 -#define BALLOC_PTE_SIZE_SMALL 0x1 -#define BALLOC_PTE_SIZE_BIG 0x2 +#define BALLOC_PTE_SIZE_ANY -1 int pte_size; }; -- cgit v1.2.2