aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/page_mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/include/asm/page_mm.h')
-rw-r--r--arch/m68k/include/asm/page_mm.h57
1 files changed, 4 insertions, 53 deletions
diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h
index d009f3ea39ab..31d5570d6567 100644
--- a/arch/m68k/include/asm/page_mm.h
+++ b/arch/m68k/include/asm/page_mm.h
@@ -1,29 +1,9 @@
1#ifndef _M68K_PAGE_H 1#ifndef _M68K_PAGE_MM_H
2#define _M68K_PAGE_H 2#define _M68K_PAGE_MM_H
3
4#include <linux/const.h>
5
6/* PAGE_SHIFT determines the page size */
7#ifndef CONFIG_SUN3
8#define PAGE_SHIFT (12)
9#else
10#define PAGE_SHIFT (13)
11#endif
12#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
13#define PAGE_MASK (~(PAGE_SIZE-1))
14
15#include <asm/setup.h>
16
17#if PAGE_SHIFT < 13
18#define THREAD_SIZE (8192)
19#else
20#define THREAD_SIZE PAGE_SIZE
21#endif
22 3
23#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
24 5
25#include <linux/compiler.h> 6#include <linux/compiler.h>
26
27#include <asm/module.h> 7#include <asm/module.h>
28 8
29#define get_user_page(vaddr) __get_free_page(GFP_KERNEL) 9#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
@@ -84,33 +64,6 @@ static inline void clear_page(void *page)
84 flush_dcache_page(page); \ 64 flush_dcache_page(page); \
85 } while (0) 65 } while (0)
86 66
87/*
88 * These are used to make use of C type-checking..
89 */
90typedef struct { unsigned long pte; } pte_t;
91typedef struct { unsigned long pmd[16]; } pmd_t;
92typedef struct { unsigned long pgd; } pgd_t;
93typedef struct { unsigned long pgprot; } pgprot_t;
94typedef struct page *pgtable_t;
95
96#define pte_val(x) ((x).pte)
97#define pmd_val(x) ((&x)->pmd[0])
98#define pgd_val(x) ((x).pgd)
99#define pgprot_val(x) ((x).pgprot)
100
101#define __pte(x) ((pte_t) { (x) } )
102#define __pmd(x) ((pmd_t) { (x) } )
103#define __pgd(x) ((pgd_t) { (x) } )
104#define __pgprot(x) ((pgprot_t) { (x) } )
105
106#endif /* !__ASSEMBLY__ */
107
108#include <asm/page_offset.h>
109
110#define PAGE_OFFSET (PAGE_OFFSET_RAW)
111
112#ifndef __ASSEMBLY__
113
114extern unsigned long m68k_memoffset; 67extern unsigned long m68k_memoffset;
115 68
116#ifndef CONFIG_SUN3 69#ifndef CONFIG_SUN3
@@ -127,7 +80,7 @@ static inline unsigned long ___pa(void *vaddr)
127 : "0" (vaddr), "i" (m68k_fixup_memoffset)); 80 : "0" (vaddr), "i" (m68k_fixup_memoffset));
128 return paddr; 81 return paddr;
129} 82}
130#define __pa(vaddr) ___pa((void *)(vaddr)) 83#define __pa(vaddr) ___pa((void *)(long)(vaddr))
131static inline void *__va(unsigned long paddr) 84static inline void *__va(unsigned long paddr)
132{ 85{
133 void *vaddr; 86 void *vaddr;
@@ -223,6 +176,4 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
223#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 176#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
224 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 177 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
225 178
226#include <asm-generic/getorder.h> 179#endif /* _M68K_PAGE_MM_H */
227
228#endif /* _M68K_PAGE_H */