diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h b/drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h index fe3926b9..a90530b6 100644 --- a/drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h +++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator_priv.h | |||
@@ -46,18 +46,20 @@ struct nvgpu_buddy { | |||
46 | u64 end; /* End address of this buddy. */ | 46 | u64 end; /* End address of this buddy. */ |
47 | u64 order; /* Buddy order. */ | 47 | u64 order; /* Buddy order. */ |
48 | 48 | ||
49 | #define BALLOC_BUDDY_ALLOCED 0x1 | 49 | #define BALLOC_BUDDY_ALLOCED 0x1U |
50 | #define BALLOC_BUDDY_SPLIT 0x2 | 50 | #define BALLOC_BUDDY_SPLIT 0x2U |
51 | #define BALLOC_BUDDY_IN_LIST 0x4 | 51 | #define BALLOC_BUDDY_IN_LIST 0x4U |
52 | int flags; /* List of associated flags. */ | 52 | u32 flags; /* List of associated flags. */ |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Size of the PDE this buddy is using. This allows for grouping like | 55 | * Size of the PDE this buddy is using. This allows for grouping like |
56 | * sized allocations into the same PDE. This uses the gmmu_pgsz_gk20a | 56 | * sized allocations into the same PDE. |
57 | * enum except for the BALLOC_PTE_SIZE_ANY specifier. | ||
58 | */ | 57 | */ |
59 | #define BALLOC_PTE_SIZE_ANY -1 | 58 | #define BALLOC_PTE_SIZE_ANY (~0U) |
60 | int pte_size; | 59 | #define BALLOC_PTE_SIZE_INVALID 0U |
60 | #define BALLOC_PTE_SIZE_SMALL 1U | ||
61 | #define BALLOC_PTE_SIZE_BIG 2U | ||
62 | u32 pte_size; | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | static inline struct nvgpu_buddy * | 65 | static inline struct nvgpu_buddy * |