diff options
Diffstat (limited to 'include/asm-ppc/page.h')
-rw-r--r-- | include/asm-ppc/page.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index 4789dc024240..fc44f7ca62d7 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h | |||
@@ -34,6 +34,17 @@ typedef unsigned long pte_basic_t; | |||
34 | #define PTE_FMT "%.8lx" | 34 | #define PTE_FMT "%.8lx" |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* align addr on a size boundary - adjust address up/down if needed */ | ||
38 | #define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) | ||
39 | #define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) | ||
40 | |||
41 | /* align addr on a size boundary - adjust address up if needed */ | ||
42 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) | ||
43 | |||
44 | /* to align the pointer to the (next) page boundary */ | ||
45 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | ||
46 | |||
47 | |||
37 | #undef STRICT_MM_TYPECHECKS | 48 | #undef STRICT_MM_TYPECHECKS |
38 | 49 | ||
39 | #ifdef STRICT_MM_TYPECHECKS | 50 | #ifdef STRICT_MM_TYPECHECKS |
@@ -76,13 +87,6 @@ typedef unsigned long pgprot_t; | |||
76 | 87 | ||
77 | #endif | 88 | #endif |
78 | 89 | ||
79 | |||
80 | /* align addr on a size boundary - adjust address up if needed -- Cort */ | ||
81 | #define _ALIGN(addr,size) (((addr)+(size)-1)&(~((size)-1))) | ||
82 | |||
83 | /* to align the pointer to the (next) page boundary */ | ||
84 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
85 | |||
86 | struct page; | 90 | struct page; |
87 | extern void clear_pages(void *page, int order); | 91 | extern void clear_pages(void *page, int order); |
88 | static inline void clear_page(void *page) { clear_pages(page, 0); } | 92 | static inline void clear_page(void *page) { clear_pages(page, 0); } |