Changed ptob()/btop() mult/div into bit shifts.

Added necessary include for PAGE_SHIFT.
This commit is contained in:
Ricardo M. Correia 2009-02-25 21:06:15 +00:00 committed by Brian Behlendorf
parent 7819a92a9b
commit eb7c7f44e8
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,10 @@
#ifndef _SPL_PARAM_H #ifndef _SPL_PARAM_H
#define _SPL_PARAM_H #define _SPL_PARAM_H
#include <asm/page.h>
/* Pages to bytes and back */ /* Pages to bytes and back */
#define ptob(pages) (pages * PAGE_SIZE) #define ptob(pages) (pages << PAGE_SHIFT)
#define btop(bytes) (bytes / PAGE_SIZE) #define btop(bytes) (bytes >> PAGE_SHIFT)
#endif /* SPL_PARAM_H */ #endif /* SPL_PARAM_H */