pfn.h 385 字节
Newer Older
D
Dave Hansen 已提交
1 2 3
#ifndef _LINUX_PFN_H_
#define _LINUX_PFN_H_

4 5 6 7
#ifndef __ASSEMBLY__
#include <linux/types.h>
#endif

D
Dave Hansen 已提交
8 9 10
#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)
11
#define PFN_PHYS(x)	((phys_addr_t)(x) << PAGE_SHIFT)
12
#define PHYS_PFN(x)	((unsigned long)((x) >> PAGE_SHIFT))
D
Dave Hansen 已提交
13 14

#endif