1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/const.h>
7 #include <asm/page_offset.h>
9 /* PAGE_SHIFT determines the page size */
10 #if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
15 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
16 #define PAGE_MASK (~(PAGE_SIZE-1))
17 #define PAGE_OFFSET (PAGE_OFFSET_RAW)
22 * These are used to make use of C type-checking..
24 typedef struct { unsigned long pte
; } pte_t
;
25 typedef struct { unsigned long pmd
[16]; } pmd_t
;
26 typedef struct { unsigned long pgd
; } pgd_t
;
27 typedef struct { unsigned long pgprot
; } pgprot_t
;
28 typedef struct page
*pgtable_t
;
30 #define pte_val(x) ((x).pte)
31 #define pmd_val(x) ((&x)->pmd[0])
32 #define pgd_val(x) ((x).pgd)
33 #define pgprot_val(x) ((x).pgprot)
35 #define __pte(x) ((pte_t) { (x) } )
36 #define __pmd(x) ((pmd_t) { { (x) }, })
37 #define __pgd(x) ((pgd_t) { (x) } )
38 #define __pgprot(x) ((pgprot_t) { (x) } )
40 extern unsigned long _rambase
;
41 extern unsigned long _ramstart
;
42 extern unsigned long _ramend
;
44 #endif /* !__ASSEMBLY__ */
47 #include <asm/page_mm.h>
49 #include <asm/page_no.h>
52 #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT))
53 #define __pfn_to_phys(pfn) PFN_PHYS(pfn)
55 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
56 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
58 #include <asm-generic/getorder.h>
60 #endif /* _M68K_PAGE_H */