diff options
Diffstat (limited to 'include/mach')
-rw-r--r-- | include/mach/vm_param.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mach/vm_param.h b/include/mach/vm_param.h index cdccce82..4cbd0eca 100644 --- a/include/mach/vm_param.h +++ b/include/mach/vm_param.h @@ -88,11 +88,15 @@ #define round_page(x) ((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) & ~PAGE_MASK)) #define trunc_page(x) ((vm_offset_t)(((vm_offset_t)(x)) & ~PAGE_MASK)) +#define round_phys(x) ((phys_addr_t)((((phys_addr_t)(x)) + PAGE_MASK) & ~PAGE_MASK)) +#define trunc_phys(x) ((phys_addr_t)(((phys_addr_t)(x)) & ~PAGE_MASK)) + /* * Determine whether an address is page-aligned, or a count is * an exact page multiple. */ #define page_aligned(x) ((((vm_offset_t) (x)) & PAGE_MASK) == 0) +#define phys_aligned(x) ((((phys_addr_t) (x)) & PAGE_MASK) == 0) #endif /* _MACH_VM_PARAM_H_ */ |