Changed ptob()/btop() mult/div into bit shifts.
Added necessary include for PAGE_SHIFT.
This commit is contained in:
parent
7819a92a9b
commit
eb7c7f44e8
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue