diff --git a/include/sys/param.h b/include/sys/param.h index d6b4f761f3..dbcdb6e9c1 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,8 +1,10 @@ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H +#include + /* Pages to bytes and back */ -#define ptob(pages) (pages * PAGE_SIZE) -#define btop(bytes) (bytes / PAGE_SIZE) +#define ptob(pages) (pages << PAGE_SHIFT) +#define btop(bytes) (bytes >> PAGE_SHIFT) #endif /* SPL_PARAM_H */