2006-03-27 02:16:04 -07:00
|
|
|
#ifndef _LINUX_PFN_H_
|
|
|
|
#define _LINUX_PFN_H_
|
|
|
|
|
2008-09-11 02:31:48 -06:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#endif
|
|
|
|
|
2006-03-27 02:16:04 -07:00
|
|
|
#define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
|
|
|
|
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
|
|
|
|
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
2008-09-11 02:31:48 -06:00
|
|
|
#define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
|
2006-03-27 02:16:04 -07:00
|
|
|
|
|
|
|
#endif
|