diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-s390/dasd.h | 2 | ||||
-rw-r--r-- | include/asm-s390/page.h | 22 | ||||
-rw-r--r-- | include/asm-s390/pgalloc.h | 3 | ||||
-rw-r--r-- | include/asm-s390/pgtable.h | 16 |
4 files changed, 37 insertions, 6 deletions
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index c042f9578081..604f68fa6f56 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -69,11 +69,13 @@ typedef struct dasd_information2_t { | |||
69 | * 0x01: readonly (ro) | 69 | * 0x01: readonly (ro) |
70 | * 0x02: use diag discipline (diag) | 70 | * 0x02: use diag discipline (diag) |
71 | * 0x04: set the device initially online (internal use only) | 71 | * 0x04: set the device initially online (internal use only) |
72 | * 0x08: enable ERP related logging | ||
72 | */ | 73 | */ |
73 | #define DASD_FEATURE_DEFAULT 0x00 | 74 | #define DASD_FEATURE_DEFAULT 0x00 |
74 | #define DASD_FEATURE_READONLY 0x01 | 75 | #define DASD_FEATURE_READONLY 0x01 |
75 | #define DASD_FEATURE_USEDIAG 0x02 | 76 | #define DASD_FEATURE_USEDIAG 0x02 |
76 | #define DASD_FEATURE_INITIAL_ONLINE 0x04 | 77 | #define DASD_FEATURE_INITIAL_ONLINE 0x04 |
78 | #define DASD_FEATURE_ERPLOG 0x08 | ||
77 | 79 | ||
78 | #define DASD_PARTN_BITS 2 | 80 | #define DASD_PARTN_BITS 2 |
79 | 81 | ||
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 363ea761d5ee..05ea6f172786 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -127,6 +127,26 @@ page_get_storage_key(unsigned long addr) | |||
127 | return skey; | 127 | return skey; |
128 | } | 128 | } |
129 | 129 | ||
130 | extern unsigned long max_pfn; | ||
131 | |||
132 | static inline int pfn_valid(unsigned long pfn) | ||
133 | { | ||
134 | unsigned long dummy; | ||
135 | int ccode; | ||
136 | |||
137 | if (pfn >= max_pfn) | ||
138 | return 0; | ||
139 | |||
140 | asm volatile( | ||
141 | " lra %0,0(%2)\n" | ||
142 | " ipm %1\n" | ||
143 | " srl %1,28\n" | ||
144 | : "=d" (dummy), "=d" (ccode) | ||
145 | : "a" (pfn << PAGE_SHIFT) | ||
146 | : "cc"); | ||
147 | return !ccode; | ||
148 | } | ||
149 | |||
130 | #endif /* !__ASSEMBLY__ */ | 150 | #endif /* !__ASSEMBLY__ */ |
131 | 151 | ||
132 | /* to align the pointer to the (next) page boundary */ | 152 | /* to align the pointer to the (next) page boundary */ |
@@ -138,8 +158,6 @@ page_get_storage_key(unsigned long addr) | |||
138 | #define __va(x) (void *)(unsigned long)(x) | 158 | #define __va(x) (void *)(unsigned long)(x) |
139 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 159 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
140 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 160 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
141 | |||
142 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | ||
143 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 161 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
144 | 162 | ||
145 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 163 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 28619de5ecae..0707a7e2fc16 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -25,8 +25,11 @@ extern void diag10(unsigned long addr); | |||
25 | * Page allocation orders. | 25 | * Page allocation orders. |
26 | */ | 26 | */ |
27 | #ifndef __s390x__ | 27 | #ifndef __s390x__ |
28 | # define PTE_ALLOC_ORDER 0 | ||
29 | # define PMD_ALLOC_ORDER 0 | ||
28 | # define PGD_ALLOC_ORDER 1 | 30 | # define PGD_ALLOC_ORDER 1 |
29 | #else /* __s390x__ */ | 31 | #else /* __s390x__ */ |
32 | # define PTE_ALLOC_ORDER 0 | ||
30 | # define PMD_ALLOC_ORDER 2 | 33 | # define PMD_ALLOC_ORDER 2 |
31 | # define PGD_ALLOC_ORDER 2 | 34 | # define PGD_ALLOC_ORDER 2 |
32 | #endif /* __s390x__ */ | 35 | #endif /* __s390x__ */ |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 2d968a69ed1f..ae61aca5d483 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -107,23 +107,25 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
107 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | 107 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced |
108 | * area for the same reason. ;) | 108 | * area for the same reason. ;) |
109 | */ | 109 | */ |
110 | extern unsigned long vmalloc_end; | ||
110 | #define VMALLOC_OFFSET (8*1024*1024) | 111 | #define VMALLOC_OFFSET (8*1024*1024) |
111 | #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \ | 112 | #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \ |
112 | & ~(VMALLOC_OFFSET-1)) | 113 | & ~(VMALLOC_OFFSET-1)) |
114 | #define VMALLOC_END vmalloc_end | ||
113 | 115 | ||
114 | /* | 116 | /* |
115 | * We need some free virtual space to be able to do vmalloc. | 117 | * We need some free virtual space to be able to do vmalloc. |
116 | * VMALLOC_MIN_SIZE defines the minimum size of the vmalloc | 118 | * VMALLOC_MIN_SIZE defines the minimum size of the vmalloc |
117 | * area. On a machine with 2GB memory we make sure that we | 119 | * area. On a machine with 2GB memory we make sure that we |
118 | * have at least 128MB free space for vmalloc. On a machine | 120 | * have at least 128MB free space for vmalloc. On a machine |
119 | * with 4TB we make sure we have at least 1GB. | 121 | * with 4TB we make sure we have at least 128GB. |
120 | */ | 122 | */ |
121 | #ifndef __s390x__ | 123 | #ifndef __s390x__ |
122 | #define VMALLOC_MIN_SIZE 0x8000000UL | 124 | #define VMALLOC_MIN_SIZE 0x8000000UL |
123 | #define VMALLOC_END 0x80000000UL | 125 | #define VMALLOC_END_INIT 0x80000000UL |
124 | #else /* __s390x__ */ | 126 | #else /* __s390x__ */ |
125 | #define VMALLOC_MIN_SIZE 0x40000000UL | 127 | #define VMALLOC_MIN_SIZE 0x2000000000UL |
126 | #define VMALLOC_END 0x40000000000UL | 128 | #define VMALLOC_END_INIT 0x40000000000UL |
127 | #endif /* __s390x__ */ | 129 | #endif /* __s390x__ */ |
128 | 130 | ||
129 | /* | 131 | /* |
@@ -815,11 +817,17 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
815 | 817 | ||
816 | #define kern_addr_valid(addr) (1) | 818 | #define kern_addr_valid(addr) (1) |
817 | 819 | ||
820 | extern int add_shared_memory(unsigned long start, unsigned long size); | ||
821 | extern int remove_shared_memory(unsigned long start, unsigned long size); | ||
822 | |||
818 | /* | 823 | /* |
819 | * No page table caches to initialise | 824 | * No page table caches to initialise |
820 | */ | 825 | */ |
821 | #define pgtable_cache_init() do { } while (0) | 826 | #define pgtable_cache_init() do { } while (0) |
822 | 827 | ||
828 | #define __HAVE_ARCH_MEMMAP_INIT | ||
829 | extern void memmap_init(unsigned long, int, unsigned long, unsigned long); | ||
830 | |||
823 | #define __HAVE_ARCH_PTEP_ESTABLISH | 831 | #define __HAVE_ARCH_PTEP_ESTABLISH |
824 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 832 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
825 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 833 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |