Dave Hansen | 22a9835 | 2006-03-27 01:16:04 -0800 | [diff] [blame] | 1 | #ifndef _LINUX_PFN_H_ |
| 2 | #define _LINUX_PFN_H_ |
| 3 | |
Jeremy Fitzhardinge | 947d049 | 2008-09-11 01:31:48 -0700 | [diff] [blame] | 4 | #ifndef __ASSEMBLY__ |
| 5 | #include <linux/types.h> |
| 6 | #endif |
| 7 | |
Dave Hansen | 22a9835 | 2006-03-27 01:16:04 -0800 | [diff] [blame] | 8 | #define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK) |
| 9 | #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) |
| 10 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) |
Jeremy Fitzhardinge | 947d049 | 2008-09-11 01:31:48 -0700 | [diff] [blame] | 11 | #define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT) |
Dave Hansen | 22a9835 | 2006-03-27 01:16:04 -0800 | [diff] [blame] | 12 | |
| 13 | #endif |