diff options
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/page.h | 20 | ||||
-rw-r--r-- | include/asm-s390/pgtable.h | 9 | ||||
-rw-r--r-- | include/asm-s390/sparsemem.h | 18 |
3 files changed, 21 insertions, 26 deletions
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index b01e6fc9a295..f0f4579eac13 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -125,26 +125,6 @@ page_get_storage_key(unsigned long addr) | |||
125 | return skey; | 125 | return skey; |
126 | } | 126 | } |
127 | 127 | ||
128 | extern unsigned long max_pfn; | ||
129 | |||
130 | static inline int pfn_valid(unsigned long pfn) | ||
131 | { | ||
132 | unsigned long dummy; | ||
133 | int ccode; | ||
134 | |||
135 | if (pfn >= max_pfn) | ||
136 | return 0; | ||
137 | |||
138 | asm volatile( | ||
139 | " lra %0,0(%2)\n" | ||
140 | " ipm %1\n" | ||
141 | " srl %1,28\n" | ||
142 | : "=d" (dummy), "=d" (ccode) | ||
143 | : "a" (pfn << PAGE_SHIFT) | ||
144 | : "cc"); | ||
145 | return !ccode; | ||
146 | } | ||
147 | |||
148 | #endif /* !__ASSEMBLY__ */ | 128 | #endif /* !__ASSEMBLY__ */ |
149 | 129 | ||
150 | /* to align the pointer to the (next) page boundary */ | 130 | /* to align the pointer to the (next) page boundary */ |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index fd336f2e2a7a..c7f4f8e3e297 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -129,7 +129,7 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
129 | #define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page)) | 129 | #define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page)) |
130 | #define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES) | 130 | #define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES) |
131 | #define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1)) | 131 | #define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1)) |
132 | #define VMEM_MAP ((struct page *) VMALLOC_END) | 132 | #define vmemmap ((struct page *) VMALLOC_END) |
133 | 133 | ||
134 | /* | 134 | /* |
135 | * A 31 bit pagetable entry of S390 has following format: | 135 | * A 31 bit pagetable entry of S390 has following format: |
@@ -1075,8 +1075,8 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
1075 | 1075 | ||
1076 | #define kern_addr_valid(addr) (1) | 1076 | #define kern_addr_valid(addr) (1) |
1077 | 1077 | ||
1078 | extern int add_shared_memory(unsigned long start, unsigned long size); | 1078 | extern int vmem_add_mapping(unsigned long start, unsigned long size); |
1079 | extern int remove_shared_memory(unsigned long start, unsigned long size); | 1079 | extern int vmem_remove_mapping(unsigned long start, unsigned long size); |
1080 | extern int s390_enable_sie(void); | 1080 | extern int s390_enable_sie(void); |
1081 | 1081 | ||
1082 | /* | 1082 | /* |
@@ -1084,9 +1084,6 @@ extern int s390_enable_sie(void); | |||
1084 | */ | 1084 | */ |
1085 | #define pgtable_cache_init() do { } while (0) | 1085 | #define pgtable_cache_init() do { } while (0) |
1086 | 1086 | ||
1087 | #define __HAVE_ARCH_MEMMAP_INIT | ||
1088 | extern void memmap_init(unsigned long, int, unsigned long, unsigned long); | ||
1089 | |||
1090 | #include <asm-generic/pgtable.h> | 1087 | #include <asm-generic/pgtable.h> |
1091 | 1088 | ||
1092 | #endif /* _S390_PAGE_H */ | 1089 | #endif /* _S390_PAGE_H */ |
diff --git a/include/asm-s390/sparsemem.h b/include/asm-s390/sparsemem.h new file mode 100644 index 000000000000..06dfdab6c0e8 --- /dev/null +++ b/include/asm-s390/sparsemem.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _ASM_S390_SPARSEMEM_H | ||
2 | #define _ASM_S390_SPARSEMEM_H | ||
3 | |||
4 | #define SECTION_SIZE_BITS 25 | ||
5 | |||
6 | #ifdef CONFIG_64BIT | ||
7 | |||
8 | #define MAX_PHYSADDR_BITS 42 | ||
9 | #define MAX_PHYSMEM_BITS 42 | ||
10 | |||
11 | #else | ||
12 | |||
13 | #define MAX_PHYSADDR_BITS 31 | ||
14 | #define MAX_PHYSMEM_BITS 31 | ||
15 | |||
16 | #endif /* CONFIG_64BIT */ | ||
17 | |||
18 | #endif /* _ASM_S390_SPARSEMEM_H */ | ||