aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/appldata/appldata_base.c59
-rw-r--r--arch/s390/kernel/audit.c7
-rw-r--r--arch/s390/kernel/audit.h15
-rw-r--r--arch/s390/kernel/compat_audit.c1
-rw-r--r--arch/s390/kernel/cpcmd.c100
-rw-r--r--arch/s390/kernel/dis.c5
-rw-r--r--arch/s390/kernel/entry.S12
-rw-r--r--arch/s390/kernel/entry64.S9
-rw-r--r--arch/s390/kernel/ipl.c4
-rw-r--r--arch/s390/kernel/kprobes.c2
-rw-r--r--arch/s390/kernel/ptrace.c5
-rw-r--r--arch/s390/kernel/vmlinux.lds.S234
-rw-r--r--arch/s390/mm/fault.c4
13 files changed, 235 insertions, 222 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 62391fb1f61f..ac61cf43a7d9 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -547,8 +547,7 @@ static void __cpuinit appldata_online_cpu(int cpu)
547 spin_unlock(&appldata_timer_lock); 547 spin_unlock(&appldata_timer_lock);
548} 548}
549 549
550static void 550static void __cpuinit appldata_offline_cpu(int cpu)
551appldata_offline_cpu(int cpu)
552{ 551{
553 del_virt_timer(&per_cpu(appldata_timer, cpu)); 552 del_virt_timer(&per_cpu(appldata_timer, cpu));
554 if (atomic_dec_and_test(&appldata_expire_count)) { 553 if (atomic_dec_and_test(&appldata_expire_count)) {
@@ -560,9 +559,9 @@ appldata_offline_cpu(int cpu)
560 spin_unlock(&appldata_timer_lock); 559 spin_unlock(&appldata_timer_lock);
561} 560}
562 561
563static int __cpuinit 562static int __cpuinit appldata_cpu_notify(struct notifier_block *self,
564appldata_cpu_notify(struct notifier_block *self, 563 unsigned long action,
565 unsigned long action, void *hcpu) 564 void *hcpu)
566{ 565{
567 switch (action) { 566 switch (action) {
568 case CPU_ONLINE: 567 case CPU_ONLINE:
@@ -608,63 +607,15 @@ static int __init appldata_init(void)
608 register_hotcpu_notifier(&appldata_nb); 607 register_hotcpu_notifier(&appldata_nb);
609 608
610 appldata_sysctl_header = register_sysctl_table(appldata_dir_table); 609 appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
611#ifdef MODULE
612 appldata_dir_table[0].de->owner = THIS_MODULE;
613 appldata_table[0].de->owner = THIS_MODULE;
614 appldata_table[1].de->owner = THIS_MODULE;
615#endif
616 610
617 P_DEBUG("Base interface initialized.\n"); 611 P_DEBUG("Base interface initialized.\n");
618 return 0; 612 return 0;
619} 613}
620 614
621/* 615__initcall(appldata_init);
622 * appldata_exit()
623 *
624 * stop timer, unregister /proc entries
625 */
626static void __exit appldata_exit(void)
627{
628 struct list_head *lh;
629 struct appldata_ops *ops;
630 int rc, i;
631 616
632 P_DEBUG("Unloading module ...\n");
633 /*
634 * ops list should be empty, but just in case something went wrong...
635 */
636 spin_lock(&appldata_ops_lock);
637 list_for_each(lh, &appldata_ops_list) {
638 ops = list_entry(lh, struct appldata_ops, list);
639 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
640 (unsigned long) ops->data, ops->size,
641 ops->mod_lvl);
642 if (rc != 0) {
643 P_ERROR("STOP DIAG 0xDC for %s failed, "
644 "return code: %d\n", ops->name, rc);
645 }
646 }
647 spin_unlock(&appldata_ops_lock);
648
649 for_each_online_cpu(i)
650 appldata_offline_cpu(i);
651
652 appldata_timer_active = 0;
653
654 unregister_sysctl_table(appldata_sysctl_header);
655
656 destroy_workqueue(appldata_wq);
657 P_DEBUG("... module unloaded!\n");
658}
659/**************************** init / exit <END> ******************************/ 617/**************************** init / exit <END> ******************************/
660 618
661
662module_init(appldata_init);
663module_exit(appldata_exit);
664MODULE_LICENSE("GPL");
665MODULE_AUTHOR("Gerald Schaefer");
666MODULE_DESCRIPTION("Linux-VM Monitor Stream, base infrastructure");
667
668EXPORT_SYMBOL_GPL(appldata_register_ops); 619EXPORT_SYMBOL_GPL(appldata_register_ops);
669EXPORT_SYMBOL_GPL(appldata_unregister_ops); 620EXPORT_SYMBOL_GPL(appldata_unregister_ops);
670EXPORT_SYMBOL_GPL(appldata_diag); 621EXPORT_SYMBOL_GPL(appldata_diag);
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c
index d1c76fe10f29..f4932c22ebe4 100644
--- a/arch/s390/kernel/audit.c
+++ b/arch/s390/kernel/audit.c
@@ -2,6 +2,7 @@
2#include <linux/types.h> 2#include <linux/types.h>
3#include <linux/audit.h> 3#include <linux/audit.h>
4#include <asm/unistd.h> 4#include <asm/unistd.h>
5#include "audit.h"
5 6
6static unsigned dir_class[] = { 7static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h> 8#include <asm-generic/audit_dir_write.h>
@@ -40,7 +41,6 @@ int audit_classify_arch(int arch)
40int audit_classify_syscall(int abi, unsigned syscall) 41int audit_classify_syscall(int abi, unsigned syscall)
41{ 42{
42#ifdef CONFIG_COMPAT 43#ifdef CONFIG_COMPAT
43 extern int s390_classify_syscall(unsigned);
44 if (abi == AUDIT_ARCH_S390) 44 if (abi == AUDIT_ARCH_S390)
45 return s390_classify_syscall(syscall); 45 return s390_classify_syscall(syscall);
46#endif 46#endif
@@ -61,11 +61,6 @@ int audit_classify_syscall(int abi, unsigned syscall)
61static int __init audit_classes_init(void) 61static int __init audit_classes_init(void)
62{ 62{
63#ifdef CONFIG_COMPAT 63#ifdef CONFIG_COMPAT
64 extern __u32 s390_dir_class[];
65 extern __u32 s390_write_class[];
66 extern __u32 s390_read_class[];
67 extern __u32 s390_chattr_class[];
68 extern __u32 s390_signal_class[];
69 audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); 64 audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class);
70 audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); 65 audit_register_class(AUDIT_CLASS_READ_32, s390_read_class);
71 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); 66 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class);
diff --git a/arch/s390/kernel/audit.h b/arch/s390/kernel/audit.h
new file mode 100644
index 000000000000..12b56f4b5a73
--- /dev/null
+++ b/arch/s390/kernel/audit.h
@@ -0,0 +1,15 @@
1#ifndef __ARCH_S390_KERNEL_AUDIT_H
2#define __ARCH_S390_KERNEL_AUDIT_H
3
4#include <linux/types.h>
5
6#ifdef CONFIG_COMPAT
7extern int s390_classify_syscall(unsigned);
8extern __u32 s390_dir_class[];
9extern __u32 s390_write_class[];
10extern __u32 s390_read_class[];
11extern __u32 s390_chattr_class[];
12extern __u32 s390_signal_class[];
13#endif /* CONFIG_COMPAT */
14
15#endif /* __ARCH_S390_KERNEL_AUDIT_H */
diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c
index 0569f5126e49..d6487bf879e5 100644
--- a/arch/s390/kernel/compat_audit.c
+++ b/arch/s390/kernel/compat_audit.c
@@ -1,5 +1,6 @@
1#undef __s390x__ 1#undef __s390x__
2#include <asm/unistd.h> 2#include <asm/unistd.h>
3#include "audit.h"
3 4
4unsigned s390_dir_class[] = { 5unsigned s390_dir_class[] = {
5#include <asm-generic/audit_dir_write.h> 6#include <asm-generic/audit_dir_write.h>
diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c
index 6c89f30c8e31..d8c1131e0815 100644
--- a/arch/s390/kernel/cpcmd.c
+++ b/arch/s390/kernel/cpcmd.c
@@ -2,7 +2,7 @@
2 * arch/s390/kernel/cpcmd.c 2 * arch/s390/kernel/cpcmd.c
3 * 3 *
4 * S390 version 4 * S390 version
5 * Copyright (C) 1999,2005 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 * Copyright IBM Corp. 1999,2007
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), 6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7 * Christian Borntraeger (cborntra@de.ibm.com), 7 * Christian Borntraeger (cborntra@de.ibm.com),
8 */ 8 */
@@ -21,6 +21,49 @@
21static DEFINE_SPINLOCK(cpcmd_lock); 21static DEFINE_SPINLOCK(cpcmd_lock);
22static char cpcmd_buf[241]; 22static char cpcmd_buf[241];
23 23
24static int diag8_noresponse(int cmdlen)
25{
26 register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
27 register unsigned long reg3 asm ("3") = cmdlen;
28
29 asm volatile(
30#ifndef CONFIG_64BIT
31 " diag %1,%0,0x8\n"
32#else /* CONFIG_64BIT */
33 " sam31\n"
34 " diag %1,%0,0x8\n"
35 " sam64\n"
36#endif /* CONFIG_64BIT */
37 : "+d" (reg3) : "d" (reg2) : "cc");
38 return reg3;
39}
40
41static int diag8_response(int cmdlen, char *response, int *rlen)
42{
43 register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
44 register unsigned long reg3 asm ("3") = (addr_t) response;
45 register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L;
46 register unsigned long reg5 asm ("5") = *rlen;
47
48 asm volatile(
49#ifndef CONFIG_64BIT
50 " diag %2,%0,0x8\n"
51 " brc 8,1f\n"
52 " ar %1,%4\n"
53#else /* CONFIG_64BIT */
54 " sam31\n"
55 " diag %2,%0,0x8\n"
56 " sam64\n"
57 " brc 8,1f\n"
58 " agr %1,%4\n"
59#endif /* CONFIG_64BIT */
60 "1:\n"
61 : "+d" (reg4), "+d" (reg5)
62 : "d" (reg2), "d" (reg3), "d" (*rlen) : "cc");
63 *rlen = reg5;
64 return reg4;
65}
66
24/* 67/*
25 * __cpcmd has some restrictions over cpcmd 68 * __cpcmd has some restrictions over cpcmd
26 * - the response buffer must reside below 2GB (if any) 69 * - the response buffer must reside below 2GB (if any)
@@ -28,59 +71,27 @@ static char cpcmd_buf[241];
28 */ 71 */
29int __cpcmd(const char *cmd, char *response, int rlen, int *response_code) 72int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
30{ 73{
31 unsigned cmdlen; 74 int cmdlen;
32 int return_code, return_len; 75 int rc;
76 int response_len;
33 77
34 cmdlen = strlen(cmd); 78 cmdlen = strlen(cmd);
35 BUG_ON(cmdlen > 240); 79 BUG_ON(cmdlen > 240);
36 memcpy(cpcmd_buf, cmd, cmdlen); 80 memcpy(cpcmd_buf, cmd, cmdlen);
37 ASCEBC(cpcmd_buf, cmdlen); 81 ASCEBC(cpcmd_buf, cmdlen);
38 82
39 if (response != NULL && rlen > 0) { 83 if (response) {
40 register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
41 register unsigned long reg3 asm ("3") = (addr_t) response;
42 register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L;
43 register unsigned long reg5 asm ("5") = rlen;
44
45 memset(response, 0, rlen); 84 memset(response, 0, rlen);
46 asm volatile( 85 response_len = rlen;
47#ifndef CONFIG_64BIT 86 rc = diag8_response(cmdlen, response, &rlen);
48 " diag %2,%0,0x8\n" 87 EBCASC(response, response_len);
49 " brc 8,1f\n"
50 " ar %1,%4\n"
51#else /* CONFIG_64BIT */
52 " sam31\n"
53 " diag %2,%0,0x8\n"
54 " sam64\n"
55 " brc 8,1f\n"
56 " agr %1,%4\n"
57#endif /* CONFIG_64BIT */
58 "1:\n"
59 : "+d" (reg4), "+d" (reg5)
60 : "d" (reg2), "d" (reg3), "d" (rlen) : "cc");
61 return_code = (int) reg4;
62 return_len = (int) reg5;
63 EBCASC(response, rlen);
64 } else { 88 } else {
65 register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf; 89 rc = diag8_noresponse(cmdlen);
66 register unsigned long reg3 asm ("3") = cmdlen;
67 return_len = 0;
68 asm volatile(
69#ifndef CONFIG_64BIT
70 " diag %1,%0,0x8\n"
71#else /* CONFIG_64BIT */
72 " sam31\n"
73 " diag %1,%0,0x8\n"
74 " sam64\n"
75#endif /* CONFIG_64BIT */
76 : "+d" (reg3) : "d" (reg2) : "cc");
77 return_code = (int) reg3;
78 } 90 }
79 if (response_code != NULL) 91 if (response_code)
80 *response_code = return_code; 92 *response_code = rc;
81 return return_len; 93 return rlen;
82} 94}
83
84EXPORT_SYMBOL(__cpcmd); 95EXPORT_SYMBOL(__cpcmd);
85 96
86int cpcmd(const char *cmd, char *response, int rlen, int *response_code) 97int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
@@ -109,5 +120,4 @@ int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
109 } 120 }
110 return len; 121 return len;
111} 122}
112
113EXPORT_SYMBOL(cpcmd); 123EXPORT_SYMBOL(cpcmd);
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index 50d2235df732..c14a336f6300 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -1162,6 +1162,7 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
1162 unsigned int value; 1162 unsigned int value;
1163 char separator; 1163 char separator;
1164 char *ptr; 1164 char *ptr;
1165 int i;
1165 1166
1166 ptr = buffer; 1167 ptr = buffer;
1167 insn = find_insn(code); 1168 insn = find_insn(code);
@@ -1169,7 +1170,8 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
1169 ptr += sprintf(ptr, "%.5s\t", insn->name); 1170 ptr += sprintf(ptr, "%.5s\t", insn->name);
1170 /* Extract the operands. */ 1171 /* Extract the operands. */
1171 separator = 0; 1172 separator = 0;
1172 for (ops = formats[insn->format] + 1; *ops != 0; ops++) { 1173 for (ops = formats[insn->format] + 1, i = 0;
1174 *ops != 0 && i < 6; ops++, i++) {
1173 operand = operands + *ops; 1175 operand = operands + *ops;
1174 value = extract_operand(code, operand); 1176 value = extract_operand(code, operand);
1175 if ((operand->flags & OPERAND_INDEX) && value == 0) 1177 if ((operand->flags & OPERAND_INDEX) && value == 0)
@@ -1241,7 +1243,6 @@ void show_code(struct pt_regs *regs)
1241 } 1243 }
1242 /* Find a starting point for the disassembly. */ 1244 /* Find a starting point for the disassembly. */
1243 while (start < 32) { 1245 while (start < 32) {
1244 hops = 0;
1245 for (i = 0, hops = 0; start + i < 32 && hops < 3; hops++) { 1246 for (i = 0, hops = 0; start + i < 32 && hops < 3; hops++) {
1246 if (!find_insn(code + start + i)) 1247 if (!find_insn(code + start + i))
1247 break; 1248 break;
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index f3bceb165321..139ca153d5cc 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -68,9 +68,15 @@ STACK_SIZE = 1 << STACK_SHIFT
68 l %r1,BASED(.Ltrace_irq_off) 68 l %r1,BASED(.Ltrace_irq_off)
69 basr %r14,%r1 69 basr %r14,%r1
70 .endm 70 .endm
71
72 .macro LOCKDEP_SYS_EXIT
73 l %r1,BASED(.Llockdep_sys_exit)
74 basr %r14,%r1
75 .endm
71#else 76#else
72#define TRACE_IRQS_ON 77#define TRACE_IRQS_ON
73#define TRACE_IRQS_OFF 78#define TRACE_IRQS_OFF
79#define LOCKDEP_SYS_EXIT
74#endif 80#endif
75 81
76/* 82/*
@@ -260,6 +266,7 @@ sysc_return:
260 bno BASED(sysc_leave) 266 bno BASED(sysc_leave)
261 tm __TI_flags+3(%r9),_TIF_WORK_SVC 267 tm __TI_flags+3(%r9),_TIF_WORK_SVC
262 bnz BASED(sysc_work) # there is work to do (signals etc.) 268 bnz BASED(sysc_work) # there is work to do (signals etc.)
269 LOCKDEP_SYS_EXIT
263sysc_leave: 270sysc_leave:
264 RESTORE_ALL __LC_RETURN_PSW,1 271 RESTORE_ALL __LC_RETURN_PSW,1
265 272
@@ -283,6 +290,7 @@ sysc_work:
283 bo BASED(sysc_restart) 290 bo BASED(sysc_restart)
284 tm __TI_flags+3(%r9),_TIF_SINGLE_STEP 291 tm __TI_flags+3(%r9),_TIF_SINGLE_STEP
285 bo BASED(sysc_singlestep) 292 bo BASED(sysc_singlestep)
293 LOCKDEP_SYS_EXIT
286 b BASED(sysc_leave) 294 b BASED(sysc_leave)
287 295
288# 296#
@@ -572,6 +580,7 @@ io_return:
572#endif 580#endif
573 tm __TI_flags+3(%r9),_TIF_WORK_INT 581 tm __TI_flags+3(%r9),_TIF_WORK_INT
574 bnz BASED(io_work) # there is work to do (signals etc.) 582 bnz BASED(io_work) # there is work to do (signals etc.)
583 LOCKDEP_SYS_EXIT
575io_leave: 584io_leave:
576 RESTORE_ALL __LC_RETURN_PSW,0 585 RESTORE_ALL __LC_RETURN_PSW,0
577io_done: 586io_done:
@@ -618,6 +627,7 @@ io_work_loop:
618 bo BASED(io_reschedule) 627 bo BASED(io_reschedule)
619 tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) 628 tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
620 bnz BASED(io_sigpending) 629 bnz BASED(io_sigpending)
630 LOCKDEP_SYS_EXIT
621 b BASED(io_leave) 631 b BASED(io_leave)
622 632
623# 633#
@@ -1040,6 +1050,8 @@ cleanup_io_leave_insn:
1040.Ltrace_irq_on: .long trace_hardirqs_on 1050.Ltrace_irq_on: .long trace_hardirqs_on
1041.Ltrace_irq_off: 1051.Ltrace_irq_off:
1042 .long trace_hardirqs_off 1052 .long trace_hardirqs_off
1053.Llockdep_sys_exit:
1054 .long lockdep_sys_exit
1043#endif 1055#endif
1044.Lcritical_start: 1056.Lcritical_start:
1045 .long __critical_start + 0x80000000 1057 .long __critical_start + 0x80000000
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 9c0d5cc8269d..05e26d1fdf40 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -66,9 +66,14 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
66 .macro TRACE_IRQS_OFF 66 .macro TRACE_IRQS_OFF
67 brasl %r14,trace_hardirqs_off 67 brasl %r14,trace_hardirqs_off
68 .endm 68 .endm
69
70 .macro LOCKDEP_SYS_EXIT
71 brasl %r14,lockdep_sys_exit
72 .endm
69#else 73#else
70#define TRACE_IRQS_ON 74#define TRACE_IRQS_ON
71#define TRACE_IRQS_OFF 75#define TRACE_IRQS_OFF
76#define LOCKDEP_SYS_EXIT
72#endif 77#endif
73 78
74 .macro STORE_TIMER lc_offset 79 .macro STORE_TIMER lc_offset
@@ -255,6 +260,7 @@ sysc_return:
255 jno sysc_leave 260 jno sysc_leave
256 tm __TI_flags+7(%r9),_TIF_WORK_SVC 261 tm __TI_flags+7(%r9),_TIF_WORK_SVC
257 jnz sysc_work # there is work to do (signals etc.) 262 jnz sysc_work # there is work to do (signals etc.)
263 LOCKDEP_SYS_EXIT
258sysc_leave: 264sysc_leave:
259 RESTORE_ALL __LC_RETURN_PSW,1 265 RESTORE_ALL __LC_RETURN_PSW,1
260 266
@@ -278,6 +284,7 @@ sysc_work:
278 jo sysc_restart 284 jo sysc_restart
279 tm __TI_flags+7(%r9),_TIF_SINGLE_STEP 285 tm __TI_flags+7(%r9),_TIF_SINGLE_STEP
280 jo sysc_singlestep 286 jo sysc_singlestep
287 LOCKDEP_SYS_EXIT
281 j sysc_leave 288 j sysc_leave
282 289
283# 290#
@@ -558,6 +565,7 @@ io_return:
558#endif 565#endif
559 tm __TI_flags+7(%r9),_TIF_WORK_INT 566 tm __TI_flags+7(%r9),_TIF_WORK_INT
560 jnz io_work # there is work to do (signals etc.) 567 jnz io_work # there is work to do (signals etc.)
568 LOCKDEP_SYS_EXIT
561io_leave: 569io_leave:
562 RESTORE_ALL __LC_RETURN_PSW,0 570 RESTORE_ALL __LC_RETURN_PSW,0
563io_done: 571io_done:
@@ -605,6 +613,7 @@ io_work_loop:
605 jo io_reschedule 613 jo io_reschedule
606 tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) 614 tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
607 jnz io_sigpending 615 jnz io_sigpending
616 LOCKDEP_SYS_EXIT
608 j io_leave 617 j io_leave
609 618
610# 619#
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 8b8f136d9cc7..66b51901c87d 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -735,10 +735,10 @@ void do_reipl(void)
735 case REIPL_METHOD_CCW_VM: 735 case REIPL_METHOD_CCW_VM:
736 reipl_get_ascii_loadparm(loadparm); 736 reipl_get_ascii_loadparm(loadparm);
737 if (strlen(loadparm) == 0) 737 if (strlen(loadparm) == 0)
738 sprintf(buf, "IPL %X", 738 sprintf(buf, "IPL %X CLEAR",
739 reipl_block_ccw->ipl_info.ccw.devno); 739 reipl_block_ccw->ipl_info.ccw.devno);
740 else 740 else
741 sprintf(buf, "IPL %X LOADPARM '%s'", 741 sprintf(buf, "IPL %X CLEAR LOADPARM '%s'",
742 reipl_block_ccw->ipl_info.ccw.devno, loadparm); 742 reipl_block_ccw->ipl_info.ccw.devno, loadparm);
743 __cpcmd(buf, NULL, 0, NULL); 743 __cpcmd(buf, NULL, 0, NULL);
744 break; 744 break;
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index e40373d9fbce..c5549a206284 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -33,6 +33,8 @@
33DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 33DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
34DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 34DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
35 35
36struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}};
37
36int __kprobes arch_prepare_kprobe(struct kprobe *p) 38int __kprobes arch_prepare_kprobe(struct kprobe *p)
37{ 39{
38 /* Make sure the probe isn't going on a difficult instruction */ 40 /* Make sure the probe isn't going on a difficult instruction */
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index f4503ca27630..1d81bf9488ae 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -683,11 +683,6 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
683 wake_up_process(child); 683 wake_up_process(child);
684 return 0; 684 return 0;
685 685
686 case PTRACE_DETACH:
687 /* detach a process that was attached. */
688 return ptrace_detach(child, data);
689
690
691 /* Do requests that differ for 31/64 bit */ 686 /* Do requests that differ for 31/64 bit */
692 default: 687 default:
693#ifdef CONFIG_COMPAT 688#ifdef CONFIG_COMPAT
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index b4622a3889b0..849120e3e28a 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -2,6 +2,7 @@
2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com) 2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
3 */ 3 */
4 4
5#include <asm/page.h>
5#include <asm-generic/vmlinux.lds.h> 6#include <asm-generic/vmlinux.lds.h>
6 7
7#ifndef CONFIG_64BIT 8#ifndef CONFIG_64BIT
@@ -18,121 +19,142 @@ jiffies = jiffies_64;
18 19
19SECTIONS 20SECTIONS
20{ 21{
21 . = 0x00000000; 22 . = 0x00000000;
22 _text = .; /* Text and read-only data */ 23 .text : {
23 .text : { 24 _text = .; /* Text and read-only data */
24 *(.text.head) 25 *(.text.head)
25 TEXT_TEXT 26 TEXT_TEXT
26 SCHED_TEXT 27 SCHED_TEXT
27 LOCK_TEXT 28 LOCK_TEXT
28 KPROBES_TEXT 29 KPROBES_TEXT
29 *(.fixup) 30 *(.fixup)
30 *(.gnu.warning) 31 *(.gnu.warning)
31 } = 0x0700 32 } = 0x0700
32 33
33 _etext = .; /* End of text section */ 34 _etext = .; /* End of text section */
34 35
35 RODATA 36 RODATA
36 37
37#ifdef CONFIG_SHARED_KERNEL 38#ifdef CONFIG_SHARED_KERNEL
38 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ 39 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
39#endif 40#endif
40 41
41 . = ALIGN(4096); 42 . = ALIGN(PAGE_SIZE);
42 _eshared = .; /* End of shareable data */ 43 _eshared = .; /* End of shareable data */
43 44
44 . = ALIGN(16); /* Exception table */ 45 . = ALIGN(16); /* Exception table */
45 __start___ex_table = .; 46 __ex_table : {
46 __ex_table : { *(__ex_table) } 47 __start___ex_table = .;
47 __stop___ex_table = .; 48 *(__ex_table)
48 49 __stop___ex_table = .;
49 NOTES 50 }
50 51
51 BUG_TABLE 52 NOTES
52 53 BUG_TABLE
53 .data : { /* Data */ 54
54 DATA_DATA 55 .data : { /* Data */
55 CONSTRUCTORS 56 DATA_DATA
56 } 57 CONSTRUCTORS
57 58 }
58 . = ALIGN(4096); 59
59 __nosave_begin = .; 60 . = ALIGN(PAGE_SIZE);
60 .data_nosave : { *(.data.nosave) } 61 .data_nosave : {
61 . = ALIGN(4096); 62 __nosave_begin = .;
62 __nosave_end = .; 63 *(.data.nosave)
63 64 }
64 . = ALIGN(4096); 65 . = ALIGN(PAGE_SIZE);
65 .data.page_aligned : { *(.data.idt) } 66 __nosave_end = .;
66 67
67 . = ALIGN(256); 68 . = ALIGN(PAGE_SIZE);
68 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 69 .data.page_aligned : {
69 70 *(.data.idt)
70 . = ALIGN(256); 71 }
71 .data.read_mostly : { *(.data.read_mostly) } 72
72 _edata = .; /* End of data section */ 73 . = ALIGN(0x100);
73 74 .data.cacheline_aligned : {
74 . = ALIGN(8192); /* init_task */ 75 *(.data.cacheline_aligned)
75 .data.init_task : { *(.data.init_task) } 76 }
76 77
77 /* will be freed after init */ 78 . = ALIGN(0x100);
78 . = ALIGN(4096); /* Init code and data */ 79 .data.read_mostly : {
79 __init_begin = .; 80 *(.data.read_mostly)
80 .init.text : { 81 }
81 _sinittext = .; 82 _edata = .; /* End of data section */
82 *(.init.text) 83
83 _einittext = .; 84 . = ALIGN(2 * PAGE_SIZE); /* init_task */
84 } 85 .data.init_task : {
85 /* 86 *(.data.init_task)
86 * .exit.text is discarded at runtime, not link time, 87 }
87 * to deal with references from __bug_table 88
88 */ 89 /* will be freed after init */
89 .exit.text : { *(.exit.text) } 90 . = ALIGN(PAGE_SIZE); /* Init code and data */
90 91 __init_begin = .;
91 .init.data : { *(.init.data) } 92 .init.text : {
92 . = ALIGN(256); 93 _sinittext = .;
93 __setup_start = .; 94 *(.init.text)
94 .init.setup : { *(.init.setup) } 95 _einittext = .;
95 __setup_end = .; 96 }
96 __initcall_start = .; 97 /*
97 .initcall.init : { 98 * .exit.text is discarded at runtime, not link time,
98 INITCALLS 99 * to deal with references from __bug_table
99 } 100 */
100 __initcall_end = .; 101 .exit.text : {
101 __con_initcall_start = .; 102 *(.exit.text)
102 .con_initcall.init : { *(.con_initcall.init) } 103 }
103 __con_initcall_end = .; 104
104 SECURITY_INIT 105 .init.data : {
106 *(.init.data)
107 }
108 . = ALIGN(0x100);
109 .init.setup : {
110 __setup_start = .;
111 *(.init.setup)
112 __setup_end = .;
113 }
114 .initcall.init : {
115 __initcall_start = .;
116 INITCALLS
117 __initcall_end = .;
118 }
119
120 .con_initcall.init : {
121 __con_initcall_start = .;
122 *(.con_initcall.init)
123 __con_initcall_end = .;
124 }
125 SECURITY_INIT
105 126
106#ifdef CONFIG_BLK_DEV_INITRD 127#ifdef CONFIG_BLK_DEV_INITRD
107 . = ALIGN(256); 128 . = ALIGN(0x100);
108 __initramfs_start = .; 129 .init.ramfs : {
109 .init.ramfs : { *(.init.initramfs) } 130 __initramfs_start = .;
110 . = ALIGN(2); 131 *(.init.ramfs)
111 __initramfs_end = .; 132 . = ALIGN(2);
133 __initramfs_end = .;
134 }
112#endif 135#endif
113 PERCPU(4096) 136
114 . = ALIGN(4096); 137 PERCPU(PAGE_SIZE)
115 __init_end = .; 138 . = ALIGN(PAGE_SIZE);
116 /* freed after init ends here */ 139 __init_end = .; /* freed after init ends here */
117 140
118 __bss_start = .; /* BSS */ 141 /* BSS */
119 .bss : { *(.bss) } 142 .bss : {
120 . = ALIGN(2); 143 __bss_start = .;
121 __bss_stop = .; 144 *(.bss)
122 145 . = ALIGN(2);
123 _end = . ; 146 __bss_stop = .;
124 147 }
125 /* Sections to be discarded */ 148
126 /DISCARD/ : { 149 _end = . ;
127 *(.exit.data) *(.exitcall.exit) 150
128 } 151 /* Sections to be discarded */
129 152 /DISCARD/ : {
130 /* Stabs debugging sections. */ 153 *(.exit.data)
131 .stab 0 : { *(.stab) } 154 *(.exitcall.exit)
132 .stabstr 0 : { *(.stabstr) } 155 }
133 .stab.excl 0 : { *(.stab.excl) } 156
134 .stab.exclstr 0 : { *(.stab.exclstr) } 157 /* Debugging sections. */
135 .stab.index 0 : { *(.stab.index) } 158 STABS_DEBUG
136 .stab.indexstr 0 : { *(.stab.indexstr) } 159 DWARF_DEBUG
137 .comment 0 : { *(.comment) }
138} 160}
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 54055194e9af..14c241ccdd4d 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -218,7 +218,7 @@ static int do_out_of_memory(struct pt_regs *regs, unsigned long error_code,
218 } 218 }
219 printk("VM: killing process %s\n", tsk->comm); 219 printk("VM: killing process %s\n", tsk->comm);
220 if (regs->psw.mask & PSW_MASK_PSTATE) 220 if (regs->psw.mask & PSW_MASK_PSTATE)
221 do_exit(SIGKILL); 221 do_group_exit(SIGKILL);
222 do_no_context(regs, error_code, address); 222 do_no_context(regs, error_code, address);
223 return 0; 223 return 0;
224} 224}
@@ -468,7 +468,7 @@ typedef struct {
468 __u64 refselmk; 468 __u64 refselmk;
469 __u64 refcmpmk; 469 __u64 refcmpmk;
470 __u64 reserved; 470 __u64 reserved;
471} __attribute__ ((packed)) pfault_refbk_t; 471} __attribute__ ((packed, aligned(8))) pfault_refbk_t;
472 472
473int pfault_init(void) 473int pfault_init(void)
474{ 474{