From 138ff3462f53a7370bef15443e623ecba1c350bf Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 7 Sep 2010 15:49:10 +1000 Subject: 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 Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/page_mm.h | 49 +++-------------------------------------- 1 file changed, 3 insertions(+), 46 deletions(-) (limited to 'arch/m68k/include/asm/page_mm.h') diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h index eeb6764c105..66f0b3938cb 100644 --- a/arch/m68k/include/asm/page_mm.h +++ b/arch/m68k/include/asm/page_mm.h @@ -1,23 +1,9 @@ -#ifndef _M68K_PAGE_H -#define _M68K_PAGE_H - -#include - -/* PAGE_SHIFT determines the page size */ -#ifndef CONFIG_SUN3 -#define PAGE_SHIFT (12) -#else -#define PAGE_SHIFT (13) -#endif -#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) - -#include +#ifndef _M68K_PAGE_MM_H +#define _M68K_PAGE_MM_H #ifndef __ASSEMBLY__ #include - #include #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) @@ -78,33 +64,6 @@ static inline void clear_page(void *page) flush_dcache_page(page); \ } while (0) -/* - * 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) } ) - -#endif /* !__ASSEMBLY__ */ - -#include - -#define PAGE_OFFSET (PAGE_OFFSET_RAW) - -#ifndef __ASSEMBLY__ - extern unsigned long m68k_memoffset; #ifndef CONFIG_SUN3 @@ -217,6 +176,4 @@ static inline __attribute_const__ int __virt_to_node_shift(void) #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include - -#endif /* _M68K_PAGE_H */ +#endif /* _M68K_PAGE_MM_H */ -- cgit v1.2.3-70-g09d2