1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef __ASM_SH_PGTABLE_H 13 #define __ASM_SH_PGTABLE_H 14 15 #include <asm-generic/pgtable-nopmd.h> 16 #include <asm/page.h> 17 18 #ifndef __ASSEMBLY__ 19 #include <asm/addrspace.h> 20 #include <asm/fixmap.h> 21 22 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) 23 24 #endif 25 26 #define NEFF 32 27 #define NEFF_SIGN (1LL << (NEFF - 1)) 28 #define NEFF_MASK (-1LL << NEFF) 29 30 #define NPHYS 29 31 32 #define NPHYS_SIGN (1LL << (NPHYS - 1)) 33 #define NPHYS_MASK (-1LL << NPHYS) 34 35 #define PTE_MAGNITUDE 2 36 #define PTE_SHIFT PAGE_SHIFT 37 #define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE) 38 39 #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) 40 #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 41 #define PGDIR_MASK (~(PGDIR_SIZE-1)) 42 43 #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) 44 #define PTRS_PER_PGD (PAGE_SIZE / sizeof(pgd_t)) 45 46 #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 47 #define FIRST_USER_ADDRESS 0 48 49 #define PHYS_ADDR_MASK 0x1fffffff 50 51 #define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) 52 53 #define VMALLOC_START (P3SEG) 54 #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) 55 56 #include <asm/pgtable_32.h> 57 58 #define __P000 PAGE_NONE 59 #define __P001 PAGE_READONLY 60 #define __P010 PAGE_COPY 61 #define __P011 PAGE_COPY 62 #define __P100 PAGE_EXECREAD 63 #define __P101 PAGE_EXECREAD 64 #define __P110 PAGE_COPY 65 #define __P111 PAGE_COPY 66 67 #define __S000 PAGE_NONE 68 #define __S001 PAGE_READONLY 69 #define __S010 PAGE_WRITEONLY 70 #define __S011 PAGE_SHARED 71 #define __S100 PAGE_EXECREAD 72 #define __S101 PAGE_EXECREAD 73 #define __S110 PAGE_RWX 74 #define __S111 PAGE_RWX 75 76 typedef pte_t *pte_addr_t; 77 78 #define kern_addr_valid(addr) (1) 79 80 #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) remap_pfn_range(vma, vaddr, pfn, size, prot) 81 82 #define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT))) 83 84 #define pgtable_cache_init() do { } while (0) 85 86 struct mm_struct; 87 #define __HAVE_ARCH_PTEP_GET_AND_CLEAR 88 89 struct vm_area_struct; 90 91 #include <asm-generic/pgtable.h> 92 93 #endif 94