blob: 7646637221f3ac45b0e2f9381fd733950b6ff492 [file] [log] [blame]
Dave Hansen22a98352006-03-27 01:16:04 -08001#ifndef _LINUX_PFN_H_
2#define _LINUX_PFN_H_
3
Jeremy Fitzhardinge947d0492008-09-11 01:31:48 -07004#ifndef __ASSEMBLY__
5#include <linux/types.h>
6#endif
7
Dave Hansen22a98352006-03-27 01:16:04 -08008#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 Fitzhardinge947d0492008-09-11 01:31:48 -070011#define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
Dave Hansen22a98352006-03-27 01:16:04 -080012
13#endif