0001
0002 #ifndef _LINUX_PFN_H_
0003 #define _LINUX_PFN_H_
0004
0005 #ifndef __ASSEMBLY__
0006 #include <linux/types.h>
0007
0008
0009
0010
0011
0012
0013 typedef struct {
0014 u64 val;
0015 } pfn_t;
0016 #endif
0017
0018 #define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
0019 #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
0020 #define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
0021 #define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
0022 #define PHYS_PFN(x) ((unsigned long)((x) >> PAGE_SHIFT))
0023
0024 #endif