aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-13 16:16:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-13 16:16:16 -0500
commitcbd88cd4c07f9361914ab7fd7e21c9227986fe68 (patch)
tree8bc448d73f93f10ebd34ef38c911b06359000ed0 /arch/s390/mm
parent928b3f12e5fea9d201bbc029d8d537ba7cc14fe7 (diff)
parentc2ab7282f0fcd11eea4d0ba45d1c65d89428c314 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky: "Among the traditional bug fixes and cleanups are some improvements: - A tool to generated the facility lists, generating the bit fields by hand has been a source of bugs in the past - The spinlock loop is reordered to avoid bursts of hypervisor calls - Add support for the open-for-business interface to the service element - The get_cpu call is added to the vdso - A set of tracepoints is defined for the common I/O layer - The deprecated sclp_cpi module is removed - Update default configuration" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (56 commits) s390/sclp: fix possible control register corruption s390: fix normalization bug in exception table sorting s390/configs: update default configurations s390/vdso: optimize getcpu system call s390: drop smp_mb in vdso_init s390: rename struct _lowcore to struct lowcore s390/mem_detect: use unsigned longs s390/ptrace: get rid of long longs in psw_bits s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields s390: get rid of CONFIG_SCHED_MC and CONFIG_SCHED_BOOK s390/Kconfig: remove pointless 64 bit dependencies s390/dasd: fix failfast for disconnected devices s390/con3270: testing return kzalloc retval s390/hmcdrv: constify hmcdrv_ftp_ops structs s390/cio: add NULL test s390/cio: Change I/O instructions from inline to normal functions s390/cio: Introduce common I/O layer tracepoints s390/cio: Consolidate inline assemblies and related data definitions s390/cio: Fix incorrect xsch opcode specification s390/cio: Remove unused inline assemblies ...
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/extable.c8
-rw-r--r--arch/s390/mm/extmem.c4
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/s390/mm/gup.c1
-rw-r--r--arch/s390/mm/maccess.c4
-rw-r--r--arch/s390/mm/mem_detect.c7
6 files changed, 12 insertions, 14 deletions
diff --git a/arch/s390/mm/extable.c b/arch/s390/mm/extable.c
index 4d1ee88864e8..18c8b819b0aa 100644
--- a/arch/s390/mm/extable.c
+++ b/arch/s390/mm/extable.c
@@ -52,12 +52,16 @@ void sort_extable(struct exception_table_entry *start,
52 int i; 52 int i;
53 53
54 /* Normalize entries to being relative to the start of the section */ 54 /* Normalize entries to being relative to the start of the section */
55 for (p = start, i = 0; p < finish; p++, i += 8) 55 for (p = start, i = 0; p < finish; p++, i += 8) {
56 p->insn += i; 56 p->insn += i;
57 p->fixup += i + 4;
58 }
57 sort(start, finish - start, sizeof(*start), cmp_ex, NULL); 59 sort(start, finish - start, sizeof(*start), cmp_ex, NULL);
58 /* Denormalize all entries */ 60 /* Denormalize all entries */
59 for (p = start, i = 0; p < finish; p++, i += 8) 61 for (p = start, i = 0; p < finish; p++, i += 8) {
60 p->insn -= i; 62 p->insn -= i;
63 p->fixup -= i + 4;
64 }
61} 65}
62 66
63#ifdef CONFIG_MODULES 67#ifdef CONFIG_MODULES
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 18fccc303db7..a1bf4ad8925d 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -94,7 +94,7 @@ static DEFINE_MUTEX(dcss_lock);
94static LIST_HEAD(dcss_list); 94static LIST_HEAD(dcss_list);
95static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC", 95static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
96 "EW/EN-MIXED" }; 96 "EW/EN-MIXED" };
97static int loadshr_scode, loadnsr_scode, findseg_scode; 97static int loadshr_scode, loadnsr_scode;
98static int segext_scode, purgeseg_scode; 98static int segext_scode, purgeseg_scode;
99static int scode_set; 99static int scode_set;
100 100
@@ -130,7 +130,6 @@ dcss_set_subcodes(void)
130 loadshr_scode = DCSS_LOADSHRX; 130 loadshr_scode = DCSS_LOADSHRX;
131 loadnsr_scode = DCSS_LOADNSRX; 131 loadnsr_scode = DCSS_LOADNSRX;
132 purgeseg_scode = DCSS_PURGESEG; 132 purgeseg_scode = DCSS_PURGESEG;
133 findseg_scode = DCSS_FINDSEGX;
134 segext_scode = DCSS_SEGEXTX; 133 segext_scode = DCSS_SEGEXTX;
135 return 0; 134 return 0;
136 } 135 }
@@ -138,7 +137,6 @@ dcss_set_subcodes(void)
138 loadshr_scode = DCSS_LOADNOLY; 137 loadshr_scode = DCSS_LOADNOLY;
139 loadnsr_scode = DCSS_LOADNSR; 138 loadnsr_scode = DCSS_LOADNSR;
140 purgeseg_scode = DCSS_PURGESEG; 139 purgeseg_scode = DCSS_PURGESEG;
141 findseg_scode = DCSS_FINDSEG;
142 segext_scode = DCSS_SEGEXT; 140 segext_scode = DCSS_SEGEXT;
143 return 0; 141 return 0;
144} 142}
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index ec1a30d0d11a..1b903f6ad54a 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -254,7 +254,6 @@ static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
254static noinline void do_no_context(struct pt_regs *regs) 254static noinline void do_no_context(struct pt_regs *regs)
255{ 255{
256 const struct exception_table_entry *fixup; 256 const struct exception_table_entry *fixup;
257 unsigned long address;
258 257
259 /* Are we prepared to handle this kernel fault? */ 258 /* Are we prepared to handle this kernel fault? */
260 fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN); 259 fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN);
@@ -267,7 +266,6 @@ static noinline void do_no_context(struct pt_regs *regs)
267 * Oops. The kernel tried to access some bad page. We'll have to 266 * Oops. The kernel tried to access some bad page. We'll have to
268 * terminate things with extreme prejudice. 267 * terminate things with extreme prejudice.
269 */ 268 */
270 address = regs->int_parm_long & __FAIL_ADDR_MASK;
271 if (!user_space_fault(regs)) 269 if (!user_space_fault(regs))
272 printk(KERN_ALERT "Unable to handle kernel pointer dereference" 270 printk(KERN_ALERT "Unable to handle kernel pointer dereference"
273 " in virtual kernel address space\n"); 271 " in virtual kernel address space\n");
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c
index 12bbf0e8478f..21c74a71e2ab 100644
--- a/arch/s390/mm/gup.c
+++ b/arch/s390/mm/gup.c
@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
233 struct mm_struct *mm = current->mm; 233 struct mm_struct *mm = current->mm;
234 int nr, ret; 234 int nr, ret;
235 235
236 might_sleep();
236 start &= PAGE_MASK; 237 start &= PAGE_MASK;
237 nr = __get_user_pages_fast(start, nr_pages, write, pages); 238 nr = __get_user_pages_fast(start, nr_pages, write, pages);
238 if (nr == nr_pages) 239 if (nr == nr_pages)
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c
index 8a993a53fcd6..fec59c067d0d 100644
--- a/arch/s390/mm/maccess.c
+++ b/arch/s390/mm/maccess.c
@@ -163,11 +163,11 @@ static int is_swapped(unsigned long addr)
163 unsigned long lc; 163 unsigned long lc;
164 int cpu; 164 int cpu;
165 165
166 if (addr < sizeof(struct _lowcore)) 166 if (addr < sizeof(struct lowcore))
167 return 1; 167 return 1;
168 for_each_online_cpu(cpu) { 168 for_each_online_cpu(cpu) {
169 lc = (unsigned long) lowcore_ptr[cpu]; 169 lc = (unsigned long) lowcore_ptr[cpu];
170 if (addr > lc + sizeof(struct _lowcore) - 1 || addr < lc) 170 if (addr > lc + sizeof(struct lowcore) - 1 || addr < lc)
171 continue; 171 continue;
172 return 1; 172 return 1;
173 } 173 }
diff --git a/arch/s390/mm/mem_detect.c b/arch/s390/mm/mem_detect.c
index e00f0d5d296d..d612cc3eec6a 100644
--- a/arch/s390/mm/mem_detect.c
+++ b/arch/s390/mm/mem_detect.c
@@ -14,8 +14,6 @@
14#include <asm/sclp.h> 14#include <asm/sclp.h>
15#include <asm/setup.h> 15#include <asm/setup.h>
16 16
17#define ADDR2G (1ULL << 31)
18
19#define CHUNK_READ_WRITE 0 17#define CHUNK_READ_WRITE 0
20#define CHUNK_READ_ONLY 1 18#define CHUNK_READ_ONLY 1
21 19
@@ -27,15 +25,14 @@ static inline void memblock_physmem_add(phys_addr_t start, phys_addr_t size)
27 25
28void __init detect_memory_memblock(void) 26void __init detect_memory_memblock(void)
29{ 27{
30 unsigned long long memsize, rnmax, rzm; 28 unsigned long memsize, rnmax, rzm, addr, size;
31 unsigned long addr, size;
32 int type; 29 int type;
33 30
34 rzm = sclp.rzm; 31 rzm = sclp.rzm;
35 rnmax = sclp.rnmax; 32 rnmax = sclp.rnmax;
36 memsize = rzm * rnmax; 33 memsize = rzm * rnmax;
37 if (!rzm) 34 if (!rzm)
38 rzm = 1ULL << 17; 35 rzm = 1UL << 17;
39 max_physmem_end = memsize; 36 max_physmem_end = memsize;
40 addr = 0; 37 addr = 0;
41 /* keep memblock lists close to the kernel */ 38 /* keep memblock lists close to the kernel */