diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/dis.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/ftrace.c | 9 | ||||
-rw-r--r-- | arch/s390/kernel/mcount.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/mcount64.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 7f4a4a8c847c..be87d3e05a5b 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -1862,6 +1862,8 @@ void print_fn_code(unsigned char *code, unsigned long len) | |||
1862 | while (len) { | 1862 | while (len) { |
1863 | ptr = buffer; | 1863 | ptr = buffer; |
1864 | opsize = insn_length(*code); | 1864 | opsize = insn_length(*code); |
1865 | if (opsize > len) | ||
1866 | break; | ||
1865 | ptr += sprintf(ptr, "%p: ", code); | 1867 | ptr += sprintf(ptr, "%p: ", code); |
1866 | for (i = 0; i < opsize; i++) | 1868 | for (i = 0; i < opsize; i++) |
1867 | ptr += sprintf(ptr, "%02x", code[i]); | 1869 | ptr += sprintf(ptr, "%02x", code[i]); |
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 78bdf0e5dff7..e3043aef87a9 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c | |||
@@ -16,12 +16,6 @@ | |||
16 | #include <trace/syscall.h> | 16 | #include <trace/syscall.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | 18 | ||
19 | #ifdef CONFIG_64BIT | ||
20 | #define MCOUNT_OFFSET_RET 12 | ||
21 | #else | ||
22 | #define MCOUNT_OFFSET_RET 22 | ||
23 | #endif | ||
24 | |||
25 | #ifdef CONFIG_DYNAMIC_FTRACE | 19 | #ifdef CONFIG_DYNAMIC_FTRACE |
26 | 20 | ||
27 | void ftrace_disable_code(void); | 21 | void ftrace_disable_code(void); |
@@ -155,9 +149,10 @@ unsigned long __kprobes prepare_ftrace_return(unsigned long parent, | |||
155 | 149 | ||
156 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) | 150 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) |
157 | goto out; | 151 | goto out; |
152 | ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; | ||
158 | if (ftrace_push_return_trace(parent, ip, &trace.depth, 0) == -EBUSY) | 153 | if (ftrace_push_return_trace(parent, ip, &trace.depth, 0) == -EBUSY) |
159 | goto out; | 154 | goto out; |
160 | trace.func = (ip & PSW_ADDR_INSN) - MCOUNT_OFFSET_RET; | 155 | trace.func = ip; |
161 | /* Only trace if the calling function expects to. */ | 156 | /* Only trace if the calling function expects to. */ |
162 | if (!ftrace_graph_entry(&trace)) { | 157 | if (!ftrace_graph_entry(&trace)) { |
163 | current->curr_ret_stack--; | 158 | current->curr_ret_stack--; |
diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S index 4567ce20d900..08dcf21cb8df 100644 --- a/arch/s390/kernel/mcount.S +++ b/arch/s390/kernel/mcount.S | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/asm-offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/ftrace.h> | ||
10 | 11 | ||
11 | .section .kprobes.text, "ax" | 12 | .section .kprobes.text, "ax" |
12 | 13 | ||
@@ -33,6 +34,7 @@ ENTRY(ftrace_caller) | |||
33 | la %r2,0(%r14) | 34 | la %r2,0(%r14) |
34 | st %r0,__SF_BACKCHAIN(%r15) | 35 | st %r0,__SF_BACKCHAIN(%r15) |
35 | la %r3,0(%r3) | 36 | la %r3,0(%r3) |
37 | ahi %r2,-MCOUNT_INSN_SIZE | ||
36 | l %r14,0b-0b(%r1) | 38 | l %r14,0b-0b(%r1) |
37 | l %r14,0(%r14) | 39 | l %r14,0(%r14) |
38 | basr %r14,%r14 | 40 | basr %r14,%r14 |
diff --git a/arch/s390/kernel/mcount64.S b/arch/s390/kernel/mcount64.S index 11332193db30..1c52eae3396a 100644 --- a/arch/s390/kernel/mcount64.S +++ b/arch/s390/kernel/mcount64.S | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/asm-offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/ftrace.h> | ||
10 | 11 | ||
11 | .section .kprobes.text, "ax" | 12 | .section .kprobes.text, "ax" |
12 | 13 | ||
@@ -29,6 +30,7 @@ ENTRY(ftrace_caller) | |||
29 | stg %r1,__SF_BACKCHAIN(%r15) | 30 | stg %r1,__SF_BACKCHAIN(%r15) |
30 | lgr %r2,%r14 | 31 | lgr %r2,%r14 |
31 | lg %r3,168(%r15) | 32 | lg %r3,168(%r15) |
33 | aghi %r2,-MCOUNT_INSN_SIZE | ||
32 | larl %r14,ftrace_trace_function | 34 | larl %r14,ftrace_trace_function |
33 | lg %r14,0(%r14) | 35 | lg %r14,0(%r14) |
34 | basr %r14,%r14 | 36 | basr %r14,%r14 |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 8074cb4b7cbf..05674b669001 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -645,7 +645,7 @@ static int __cpuinit __smp_rescan_cpus(struct sclp_cpu_info *info, | |||
645 | continue; | 645 | continue; |
646 | pcpu = pcpu_devices + cpu; | 646 | pcpu = pcpu_devices + cpu; |
647 | pcpu->address = info->cpu[i].address; | 647 | pcpu->address = info->cpu[i].address; |
648 | pcpu->state = (cpu >= info->configured) ? | 648 | pcpu->state = (i >= info->configured) ? |
649 | CPU_STATE_STANDBY : CPU_STATE_CONFIGURED; | 649 | CPU_STATE_STANDBY : CPU_STATE_CONFIGURED; |
650 | smp_cpu_set_polarization(cpu, POLARIZATION_UNKNOWN); | 650 | smp_cpu_set_polarization(cpu, POLARIZATION_UNKNOWN); |
651 | set_cpu_present(cpu, true); | 651 | set_cpu_present(cpu, true); |