aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/page_no.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2010-09-07 15:49:10 +1000
committerGeert Uytterhoeven <geert@linux-m68k.org>2010-10-22 09:43:24 +0200
commit138ff3462f53a7370bef15443e623ecba1c350bf (patch)
tree2a12a53579dec5c4b6f3f449be21c7ff1d00ca10 /arch/m68k/include/asm/page_no.h
parentb0860c1d80016df82b93b926f1cff3110ccb5028 (diff)
downloadkernel_samsung_smdk4412-138ff3462f53a7370bef15443e623ecba1c350bf.zip
kernel_samsung_smdk4412-138ff3462f53a7370bef15443e623ecba1c350bf.tar.gz
kernel_samsung_smdk4412-138ff3462f53a7370bef15443e623ecba1c350bf.tar.bz2
m68k/m68knommu: clean up page.h
There is a lot of common defines in the MMU and non-MMU variants of page.h. Factor out the common stuff into the master page.h. It still includes the underlying page_mm.h or page_no.h, but they only contain the real differences now. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include/asm/page_no.h')
-rw-r--r--arch/m68k/include/asm/page_no.h51
1 files changed, 6 insertions, 45 deletions
diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h
index 8029a33..9059572 100644
--- a/arch/m68k/include/asm/page_no.h
+++ b/arch/m68k/include/asm/page_no.h
@@ -1,18 +1,11 @@
-#ifndef _M68KNOMMU_PAGE_H
-#define _M68KNOMMU_PAGE_H
-
-#include <linux/const.h>
-
-/* PAGE_SHIFT determines the page size */
-
-#define PAGE_SHIFT (12)
-#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE-1))
-
-#include <asm/setup.h>
+#ifndef _M68K_PAGE_NO_H
+#define _M68K_PAGE_NO_H
#ifndef __ASSEMBLY__
+extern unsigned long memory_start;
+extern unsigned long memory_end;
+
#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
#define free_user_page(page, addr) free_page(addr)
@@ -26,36 +19,6 @@
alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
-/*
- * These are used to make use of C type-checking..
- */
-typedef struct { unsigned long pte; } pte_t;
-typedef struct { unsigned long pmd[16]; } pmd_t;
-typedef struct { unsigned long pgd; } pgd_t;
-typedef struct { unsigned long pgprot; } pgprot_t;
-typedef struct page *pgtable_t;
-
-#define pte_val(x) ((x).pte)
-#define pmd_val(x) ((&x)->pmd[0])
-#define pgd_val(x) ((x).pgd)
-#define pgprot_val(x) ((x).pgprot)
-
-#define __pte(x) ((pte_t) { (x) } )
-#define __pmd(x) ((pmd_t) { (x) } )
-#define __pgd(x) ((pgd_t) { (x) } )
-#define __pgprot(x) ((pgprot_t) { (x) } )
-
-extern unsigned long memory_start;
-extern unsigned long memory_end;
-
-#endif /* !__ASSEMBLY__ */
-
-#include <asm/page_offset.h>
-
-#define PAGE_OFFSET (PAGE_OFFSET_RAW)
-
-#ifndef __ASSEMBLY__
-
#define __pa(vaddr) ((unsigned long)(vaddr))
#define __va(paddr) ((void *)(paddr))
@@ -74,6 +37,4 @@ extern unsigned long memory_end;
#endif /* __ASSEMBLY__ */
-#include <asm-generic/getorder.h>
-
-#endif /* _M68KNOMMU_PAGE_H */
+#endif /* _M68K_PAGE_NO_H */