diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-12-07 06:15:33 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-12-07 06:15:33 -0500 |
commit | 222e82bef4bd520a31d48c31ab24e49dd46daa46 (patch) | |
tree | b6e73cad8e0b3a1c3e1acc537789e97aadaefa92 /arch/s390 | |
parent | 38ca9c927c7d3db61f57e3d3a9334958c3af6e9a (diff) | |
parent | 18a2f371f5edf41810f6469cb9be39931ef9deb9 (diff) |
Merge branch 'linus' into sched/core
Pick up the autogroups fix and other fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/cio.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/compat.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 35 | ||||
-rw-r--r-- | arch/s390/include/asm/topology.h | 3 | ||||
-rw-r--r-- | arch/s390/include/uapi/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 14 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/sclp.S | 8 | ||||
-rw-r--r-- | arch/s390/kernel/signal.c | 14 | ||||
-rw-r--r-- | arch/s390/kernel/topology.c | 6 | ||||
-rw-r--r-- | arch/s390/lib/uaccess_pt.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/gup.c | 7 |
13 files changed, 71 insertions, 29 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 5dba755a43e6..d385f396dfee 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -96,6 +96,7 @@ config S390 | |||
96 | select HAVE_MEMBLOCK_NODE_MAP | 96 | select HAVE_MEMBLOCK_NODE_MAP |
97 | select HAVE_CMPXCHG_LOCAL | 97 | select HAVE_CMPXCHG_LOCAL |
98 | select HAVE_CMPXCHG_DOUBLE | 98 | select HAVE_CMPXCHG_DOUBLE |
99 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB | ||
99 | select HAVE_VIRT_CPU_ACCOUNTING | 100 | select HAVE_VIRT_CPU_ACCOUNTING |
100 | select VIRT_CPU_ACCOUNTING | 101 | select VIRT_CPU_ACCOUNTING |
101 | select ARCH_DISCARD_MEMBLOCK | 102 | select ARCH_DISCARD_MEMBLOCK |
diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h index 55bde6035216..ad2b924167d7 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #define LPM_ANYPATH 0xff | 10 | #define LPM_ANYPATH 0xff |
11 | #define __MAX_CSSID 0 | 11 | #define __MAX_CSSID 0 |
12 | #define __MAX_SUBCHANNEL 65535 | ||
13 | #define __MAX_SSID 3 | ||
12 | 14 | ||
13 | #include <asm/scsw.h> | 15 | #include <asm/scsw.h> |
14 | 16 | ||
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index a34a9d612fc0..18cd6b592650 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define PSW32_MASK_CC 0x00003000UL | 20 | #define PSW32_MASK_CC 0x00003000UL |
21 | #define PSW32_MASK_PM 0x00000f00UL | 21 | #define PSW32_MASK_PM 0x00000f00UL |
22 | 22 | ||
23 | #define PSW32_MASK_USER 0x00003F00UL | 23 | #define PSW32_MASK_USER 0x0000FF00UL |
24 | 24 | ||
25 | #define PSW32_ADDR_AMODE 0x80000000UL | 25 | #define PSW32_ADDR_AMODE 0x80000000UL |
26 | #define PSW32_ADDR_INSN 0x7FFFFFFFUL | 26 | #define PSW32_ADDR_INSN 0x7FFFFFFFUL |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index dd647c919a66..2d3b7cb26005 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -506,12 +506,15 @@ static inline int pud_bad(pud_t pud) | |||
506 | 506 | ||
507 | static inline int pmd_present(pmd_t pmd) | 507 | static inline int pmd_present(pmd_t pmd) |
508 | { | 508 | { |
509 | return (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) != 0UL; | 509 | unsigned long mask = _SEGMENT_ENTRY_INV | _SEGMENT_ENTRY_RO; |
510 | return (pmd_val(pmd) & mask) == _HPAGE_TYPE_NONE || | ||
511 | !(pmd_val(pmd) & _SEGMENT_ENTRY_INV); | ||
510 | } | 512 | } |
511 | 513 | ||
512 | static inline int pmd_none(pmd_t pmd) | 514 | static inline int pmd_none(pmd_t pmd) |
513 | { | 515 | { |
514 | return (pmd_val(pmd) & _SEGMENT_ENTRY_INV) != 0UL; | 516 | return (pmd_val(pmd) & _SEGMENT_ENTRY_INV) && |
517 | !(pmd_val(pmd) & _SEGMENT_ENTRY_RO); | ||
515 | } | 518 | } |
516 | 519 | ||
517 | static inline int pmd_large(pmd_t pmd) | 520 | static inline int pmd_large(pmd_t pmd) |
@@ -1223,6 +1226,11 @@ static inline void __pmd_idte(unsigned long address, pmd_t *pmdp) | |||
1223 | } | 1226 | } |
1224 | 1227 | ||
1225 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 1228 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
1229 | |||
1230 | #define SEGMENT_NONE __pgprot(_HPAGE_TYPE_NONE) | ||
1231 | #define SEGMENT_RO __pgprot(_HPAGE_TYPE_RO) | ||
1232 | #define SEGMENT_RW __pgprot(_HPAGE_TYPE_RW) | ||
1233 | |||
1226 | #define __HAVE_ARCH_PGTABLE_DEPOSIT | 1234 | #define __HAVE_ARCH_PGTABLE_DEPOSIT |
1227 | extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable); | 1235 | extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable); |
1228 | 1236 | ||
@@ -1242,16 +1250,15 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, | |||
1242 | 1250 | ||
1243 | static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) | 1251 | static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) |
1244 | { | 1252 | { |
1245 | unsigned long pgprot_pmd = 0; | 1253 | /* |
1246 | 1254 | * pgprot is PAGE_NONE, PAGE_RO, or PAGE_RW (see __Pxxx / __Sxxx) | |
1247 | if (pgprot_val(pgprot) & _PAGE_INVALID) { | 1255 | * Convert to segment table entry format. |
1248 | if (pgprot_val(pgprot) & _PAGE_SWT) | 1256 | */ |
1249 | pgprot_pmd |= _HPAGE_TYPE_NONE; | 1257 | if (pgprot_val(pgprot) == pgprot_val(PAGE_NONE)) |
1250 | pgprot_pmd |= _SEGMENT_ENTRY_INV; | 1258 | return pgprot_val(SEGMENT_NONE); |
1251 | } | 1259 | if (pgprot_val(pgprot) == pgprot_val(PAGE_RO)) |
1252 | if (pgprot_val(pgprot) & _PAGE_RO) | 1260 | return pgprot_val(SEGMENT_RO); |
1253 | pgprot_pmd |= _SEGMENT_ENTRY_RO; | 1261 | return pgprot_val(SEGMENT_RW); |
1254 | return pgprot_pmd; | ||
1255 | } | 1262 | } |
1256 | 1263 | ||
1257 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | 1264 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) |
@@ -1269,7 +1276,9 @@ static inline pmd_t pmd_mkhuge(pmd_t pmd) | |||
1269 | 1276 | ||
1270 | static inline pmd_t pmd_mkwrite(pmd_t pmd) | 1277 | static inline pmd_t pmd_mkwrite(pmd_t pmd) |
1271 | { | 1278 | { |
1272 | pmd_val(pmd) &= ~_SEGMENT_ENTRY_RO; | 1279 | /* Do not clobber _HPAGE_TYPE_NONE pages! */ |
1280 | if (!(pmd_val(pmd) & _SEGMENT_ENTRY_INV)) | ||
1281 | pmd_val(pmd) &= ~_SEGMENT_ENTRY_RO; | ||
1273 | return pmd; | 1282 | return pmd; |
1274 | } | 1283 | } |
1275 | 1284 | ||
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 9ca305383760..9935cbd6a46f 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
@@ -8,6 +8,9 @@ struct cpu; | |||
8 | 8 | ||
9 | #ifdef CONFIG_SCHED_BOOK | 9 | #ifdef CONFIG_SCHED_BOOK |
10 | 10 | ||
11 | extern unsigned char cpu_socket_id[NR_CPUS]; | ||
12 | #define topology_physical_package_id(cpu) (cpu_socket_id[cpu]) | ||
13 | |||
11 | extern unsigned char cpu_core_id[NR_CPUS]; | 14 | extern unsigned char cpu_core_id[NR_CPUS]; |
12 | extern cpumask_t cpu_core_map[NR_CPUS]; | 15 | extern cpumask_t cpu_core_map[NR_CPUS]; |
13 | 16 | ||
diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h index 705588a16d70..a5ca214b34fd 100644 --- a/arch/s390/include/uapi/asm/ptrace.h +++ b/arch/s390/include/uapi/asm/ptrace.h | |||
@@ -239,7 +239,7 @@ typedef struct | |||
239 | #define PSW_MASK_EA 0x00000000UL | 239 | #define PSW_MASK_EA 0x00000000UL |
240 | #define PSW_MASK_BA 0x00000000UL | 240 | #define PSW_MASK_BA 0x00000000UL |
241 | 241 | ||
242 | #define PSW_MASK_USER 0x00003F00UL | 242 | #define PSW_MASK_USER 0x0000FF00UL |
243 | 243 | ||
244 | #define PSW_ADDR_AMODE 0x80000000UL | 244 | #define PSW_ADDR_AMODE 0x80000000UL |
245 | #define PSW_ADDR_INSN 0x7FFFFFFFUL | 245 | #define PSW_ADDR_INSN 0x7FFFFFFFUL |
@@ -269,7 +269,7 @@ typedef struct | |||
269 | #define PSW_MASK_EA 0x0000000100000000UL | 269 | #define PSW_MASK_EA 0x0000000100000000UL |
270 | #define PSW_MASK_BA 0x0000000080000000UL | 270 | #define PSW_MASK_BA 0x0000000080000000UL |
271 | 271 | ||
272 | #define PSW_MASK_USER 0x00003F8180000000UL | 272 | #define PSW_MASK_USER 0x0000FF8180000000UL |
273 | 273 | ||
274 | #define PSW_ADDR_AMODE 0x0000000000000000UL | 274 | #define PSW_ADDR_AMODE 0x0000000000000000UL |
275 | #define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL | 275 | #define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index a1e8a8694bb7..593fcc9253fc 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -309,6 +309,10 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) | |||
309 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 309 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | |
310 | (__u64)(regs32.psw.mask & PSW32_MASK_USER) << 32 | | 310 | (__u64)(regs32.psw.mask & PSW32_MASK_USER) << 32 | |
311 | (__u64)(regs32.psw.addr & PSW32_ADDR_AMODE); | 311 | (__u64)(regs32.psw.addr & PSW32_ADDR_AMODE); |
312 | /* Check for invalid user address space control. */ | ||
313 | if ((regs->psw.mask & PSW_MASK_ASC) >= (psw_kernel_bits & PSW_MASK_ASC)) | ||
314 | regs->psw.mask = (psw_user_bits & PSW_MASK_ASC) | | ||
315 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
312 | regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN); | 316 | regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN); |
313 | for (i = 0; i < NUM_GPRS; i++) | 317 | for (i = 0; i < NUM_GPRS; i++) |
314 | regs->gprs[i] = (__u64) regs32.gprs[i]; | 318 | regs->gprs[i] = (__u64) regs32.gprs[i]; |
@@ -481,7 +485,10 @@ static int setup_frame32(int sig, struct k_sigaction *ka, | |||
481 | 485 | ||
482 | /* Set up registers for signal handler */ | 486 | /* Set up registers for signal handler */ |
483 | regs->gprs[15] = (__force __u64) frame; | 487 | regs->gprs[15] = (__force __u64) frame; |
484 | regs->psw.mask |= PSW_MASK_BA; /* force amode 31 */ | 488 | /* Force 31 bit amode and default user address space control. */ |
489 | regs->psw.mask = PSW_MASK_BA | | ||
490 | (psw_user_bits & PSW_MASK_ASC) | | ||
491 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
485 | regs->psw.addr = (__force __u64) ka->sa.sa_handler; | 492 | regs->psw.addr = (__force __u64) ka->sa.sa_handler; |
486 | 493 | ||
487 | regs->gprs[2] = map_signal(sig); | 494 | regs->gprs[2] = map_signal(sig); |
@@ -549,7 +556,10 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
549 | 556 | ||
550 | /* Set up registers for signal handler */ | 557 | /* Set up registers for signal handler */ |
551 | regs->gprs[15] = (__force __u64) frame; | 558 | regs->gprs[15] = (__force __u64) frame; |
552 | regs->psw.mask |= PSW_MASK_BA; /* force amode 31 */ | 559 | /* Force 31 bit amode and default user address space control. */ |
560 | regs->psw.mask = PSW_MASK_BA | | ||
561 | (psw_user_bits & PSW_MASK_ASC) | | ||
562 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
553 | regs->psw.addr = (__u64) ka->sa.sa_handler; | 563 | regs->psw.addr = (__u64) ka->sa.sa_handler; |
554 | 564 | ||
555 | regs->gprs[2] = map_signal(sig); | 565 | regs->gprs[2] = map_signal(sig); |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index ad79b846535c..827e094a2f49 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -28,7 +28,7 @@ ENTRY(sys32_open_wrapper) | |||
28 | llgtr %r2,%r2 # const char * | 28 | llgtr %r2,%r2 # const char * |
29 | lgfr %r3,%r3 # int | 29 | lgfr %r3,%r3 # int |
30 | lgfr %r4,%r4 # int | 30 | lgfr %r4,%r4 # int |
31 | jg sys_open # branch to system call | 31 | jg compat_sys_open # branch to system call |
32 | 32 | ||
33 | ENTRY(sys32_close_wrapper) | 33 | ENTRY(sys32_close_wrapper) |
34 | llgfr %r2,%r2 # unsigned int | 34 | llgfr %r2,%r2 # unsigned int |
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S index bf053898630d..b6506ee32a36 100644 --- a/arch/s390/kernel/sclp.S +++ b/arch/s390/kernel/sclp.S | |||
@@ -44,6 +44,12 @@ _sclp_wait_int: | |||
44 | #endif | 44 | #endif |
45 | mvc .LoldpswS1-.LbaseS1(16,%r13),0(%r8) | 45 | mvc .LoldpswS1-.LbaseS1(16,%r13),0(%r8) |
46 | mvc 0(16,%r8),0(%r9) | 46 | mvc 0(16,%r8),0(%r9) |
47 | #ifdef CONFIG_64BIT | ||
48 | epsw %r6,%r7 # set current addressing mode | ||
49 | nill %r6,0x1 # in new psw (31 or 64 bit mode) | ||
50 | nilh %r7,0x8000 | ||
51 | stm %r6,%r7,0(%r8) | ||
52 | #endif | ||
47 | lhi %r6,0x0200 # cr mask for ext int (cr0.54) | 53 | lhi %r6,0x0200 # cr mask for ext int (cr0.54) |
48 | ltr %r2,%r2 | 54 | ltr %r2,%r2 |
49 | jz .LsetctS1 | 55 | jz .LsetctS1 |
@@ -87,7 +93,7 @@ _sclp_wait_int: | |||
87 | .long 0x00080000, 0x80000000+.LwaitS1 # PSW to handle ext int | 93 | .long 0x00080000, 0x80000000+.LwaitS1 # PSW to handle ext int |
88 | #ifdef CONFIG_64BIT | 94 | #ifdef CONFIG_64BIT |
89 | .LextpswS1_64: | 95 | .LextpswS1_64: |
90 | .quad 0x0000000180000000, .LwaitS1 # PSW to handle ext int, 64 bit | 96 | .quad 0, .LwaitS1 # PSW to handle ext int, 64 bit |
91 | #endif | 97 | #endif |
92 | .LwaitpswS1: | 98 | .LwaitpswS1: |
93 | .long 0x010a0000, 0x00000000+.LloopS1 # PSW to wait for ext int | 99 | .long 0x010a0000, 0x00000000+.LloopS1 # PSW to wait for ext int |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index c13a2a37ef00..d1259d875074 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -136,6 +136,10 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
136 | /* Use regs->psw.mask instead of psw_user_bits to preserve PER bit. */ | 136 | /* Use regs->psw.mask instead of psw_user_bits to preserve PER bit. */ |
137 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 137 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | |
138 | (user_sregs.regs.psw.mask & PSW_MASK_USER); | 138 | (user_sregs.regs.psw.mask & PSW_MASK_USER); |
139 | /* Check for invalid user address space control. */ | ||
140 | if ((regs->psw.mask & PSW_MASK_ASC) >= (psw_kernel_bits & PSW_MASK_ASC)) | ||
141 | regs->psw.mask = (psw_user_bits & PSW_MASK_ASC) | | ||
142 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
139 | /* Check for invalid amode */ | 143 | /* Check for invalid amode */ |
140 | if (regs->psw.mask & PSW_MASK_EA) | 144 | if (regs->psw.mask & PSW_MASK_EA) |
141 | regs->psw.mask |= PSW_MASK_BA; | 145 | regs->psw.mask |= PSW_MASK_BA; |
@@ -273,7 +277,10 @@ static int setup_frame(int sig, struct k_sigaction *ka, | |||
273 | 277 | ||
274 | /* Set up registers for signal handler */ | 278 | /* Set up registers for signal handler */ |
275 | regs->gprs[15] = (unsigned long) frame; | 279 | regs->gprs[15] = (unsigned long) frame; |
276 | regs->psw.mask |= PSW_MASK_EA | PSW_MASK_BA; /* 64 bit amode */ | 280 | /* Force default amode and default user address space control. */ |
281 | regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | | ||
282 | (psw_user_bits & PSW_MASK_ASC) | | ||
283 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
277 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; | 284 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; |
278 | 285 | ||
279 | regs->gprs[2] = map_signal(sig); | 286 | regs->gprs[2] = map_signal(sig); |
@@ -346,7 +353,10 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
346 | 353 | ||
347 | /* Set up registers for signal handler */ | 354 | /* Set up registers for signal handler */ |
348 | regs->gprs[15] = (unsigned long) frame; | 355 | regs->gprs[15] = (unsigned long) frame; |
349 | regs->psw.mask |= PSW_MASK_EA | PSW_MASK_BA; /* 64 bit amode */ | 356 | /* Force default amode and default user address space control. */ |
357 | regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | | ||
358 | (psw_user_bits & PSW_MASK_ASC) | | ||
359 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
350 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; | 360 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; |
351 | 361 | ||
352 | regs->gprs[2] = map_signal(sig); | 362 | regs->gprs[2] = map_signal(sig); |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 54d93f4b6818..dd55f7c20104 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -40,6 +40,7 @@ static DEFINE_SPINLOCK(topology_lock); | |||
40 | static struct mask_info core_info; | 40 | static struct mask_info core_info; |
41 | cpumask_t cpu_core_map[NR_CPUS]; | 41 | cpumask_t cpu_core_map[NR_CPUS]; |
42 | unsigned char cpu_core_id[NR_CPUS]; | 42 | unsigned char cpu_core_id[NR_CPUS]; |
43 | unsigned char cpu_socket_id[NR_CPUS]; | ||
43 | 44 | ||
44 | static struct mask_info book_info; | 45 | static struct mask_info book_info; |
45 | cpumask_t cpu_book_map[NR_CPUS]; | 46 | cpumask_t cpu_book_map[NR_CPUS]; |
@@ -83,11 +84,12 @@ static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu, | |||
83 | cpumask_set_cpu(lcpu, &book->mask); | 84 | cpumask_set_cpu(lcpu, &book->mask); |
84 | cpu_book_id[lcpu] = book->id; | 85 | cpu_book_id[lcpu] = book->id; |
85 | cpumask_set_cpu(lcpu, &core->mask); | 86 | cpumask_set_cpu(lcpu, &core->mask); |
87 | cpu_core_id[lcpu] = rcpu; | ||
86 | if (one_core_per_cpu) { | 88 | if (one_core_per_cpu) { |
87 | cpu_core_id[lcpu] = rcpu; | 89 | cpu_socket_id[lcpu] = rcpu; |
88 | core = core->next; | 90 | core = core->next; |
89 | } else { | 91 | } else { |
90 | cpu_core_id[lcpu] = core->id; | 92 | cpu_socket_id[lcpu] = core->id; |
91 | } | 93 | } |
92 | smp_cpu_set_polarization(lcpu, tl_cpu->pp); | 94 | smp_cpu_set_polarization(lcpu, tl_cpu->pp); |
93 | } | 95 | } |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 2d37bb861faf..9017a63dda3d 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -39,7 +39,7 @@ static __always_inline unsigned long follow_table(struct mm_struct *mm, | |||
39 | pmd = pmd_offset(pud, addr); | 39 | pmd = pmd_offset(pud, addr); |
40 | if (pmd_none(*pmd)) | 40 | if (pmd_none(*pmd)) |
41 | return -0x10UL; | 41 | return -0x10UL; |
42 | if (pmd_huge(*pmd)) { | 42 | if (pmd_large(*pmd)) { |
43 | if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO)) | 43 | if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO)) |
44 | return -0x04UL; | 44 | return -0x04UL; |
45 | return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK); | 45 | return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK); |
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 60acb93a4680..1f5315d1215c 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -126,7 +126,7 @@ static inline int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, | |||
126 | */ | 126 | */ |
127 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) | 127 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) |
128 | return 0; | 128 | return 0; |
129 | if (unlikely(pmd_huge(pmd))) { | 129 | if (unlikely(pmd_large(pmd))) { |
130 | if (!gup_huge_pmd(pmdp, pmd, addr, next, | 130 | if (!gup_huge_pmd(pmdp, pmd, addr, next, |
131 | write, pages, nr)) | 131 | write, pages, nr)) |
132 | return 0; | 132 | return 0; |
@@ -180,8 +180,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
180 | addr = start; | 180 | addr = start; |
181 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 181 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
182 | end = start + len; | 182 | end = start + len; |
183 | if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ, | 183 | if ((end < start) || (end > TASK_SIZE)) |
184 | (void __user *)start, len))) | ||
185 | return 0; | 184 | return 0; |
186 | 185 | ||
187 | local_irq_save(flags); | 186 | local_irq_save(flags); |
@@ -229,7 +228,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
229 | addr = start; | 228 | addr = start; |
230 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 229 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
231 | end = start + len; | 230 | end = start + len; |
232 | if (end < start) | 231 | if ((end < start) || (end > TASK_SIZE)) |
233 | goto slow_irqon; | 232 | goto slow_irqon; |
234 | 233 | ||
235 | /* | 234 | /* |