diff options
-rw-r--r-- | include/sys/param.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sys/param.h b/include/sys/param.h index d6b4f761f..dbcdb6e9c 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,8 +1,10 @@ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H +#include <asm/page.h> + /* 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 */ |