summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/page.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-06 12:23:33 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-06 12:23:33 +1000
commit7c8c6b9776fb41134d87ef50706a777a45d61cd4 (patch)
tree5f3cc71e34bc244d53364e103a9746bfe92da9ae /include/asm-ppc/page.h
parent9b6b563c0d2d25ecc3111916031aa7255543fbfb (diff)
downloadop-kernel-dev-7c8c6b9776fb41134d87ef50706a777a45d61cd4.zip
op-kernel-dev-7c8c6b9776fb41134d87ef50706a777a45d61cd4.tar.gz
powerpc: Merge lmb.c and make MM initialization use it.
This also creates merged versions of do_init_bootmem, paging_init and mem_init and moves them to arch/powerpc/mm/mem.c. It gets rid of the mem_pieces stuff. I made memory_limit a parameter to lmb_enforce_memory_limit rather than a global referenced by that function. This will require some small changes to ppc64 if we want to continue building ARCH=ppc64 using the merged lmb.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc/page.h')
-rw-r--r--include/asm-ppc/page.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 4789dc0..fc44f7c 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -34,6 +34,17 @@ typedef unsigned long pte_basic_t;
#define PTE_FMT "%.8lx"
#endif
+/* align addr on a size boundary - adjust address up/down if needed */
+#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
+#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1)))
+
+/* align addr on a size boundary - adjust address up if needed */
+#define _ALIGN(addr,size) _ALIGN_UP(addr,size)
+
+/* to align the pointer to the (next) page boundary */
+#define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE)
+
+
#undef STRICT_MM_TYPECHECKS
#ifdef STRICT_MM_TYPECHECKS
@@ -76,13 +87,6 @@ typedef unsigned long pgprot_t;
#endif
-
-/* align addr on a size boundary - adjust address up if needed -- Cort */
-#define _ALIGN(addr,size) (((addr)+(size)-1)&(~((size)-1)))
-
-/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-
struct page;
extern void clear_pages(void *page, int order);
static inline void clear_page(void *page) { clear_pages(page, 0); }
OpenPOWER on IntegriCloud