diff options
Diffstat (limited to 'drivers/staging/zsmalloc/zsmalloc_int.h')
-rw-r--r-- | drivers/staging/zsmalloc/zsmalloc_int.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/zsmalloc/zsmalloc_int.h b/drivers/staging/zsmalloc/zsmalloc_int.h index e06e142..4d66d2d 100644 --- a/drivers/staging/zsmalloc/zsmalloc_int.h +++ b/drivers/staging/zsmalloc/zsmalloc_int.h @@ -26,6 +26,13 @@ #define ZS_ALIGN 8 /* + * A single 'zspage' is composed of up to 2^N discontiguous 0-order (single) + * pages. ZS_MAX_ZSPAGE_ORDER defines upper limit on N. + */ +#define ZS_MAX_ZSPAGE_ORDER 2 +#define ZS_MAX_PAGES_PER_ZSPAGE (_AC(1, UL) << ZS_MAX_ZSPAGE_ORDER) + +/* * Object location (<PFN>, <obj_idx>) is encoded as * as single (void *) handle value. * @@ -59,12 +66,6 @@ ZS_SIZE_CLASS_DELTA + 1) /* - * A single 'zspage' is composed of N discontiguous 0-order (single) pages. - * This defines upper limit on N. - */ -static const int max_zspage_order = 4; - -/* * We do not maintain any list for completely empty or full pages */ enum fullness_group { |