aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-21 12:36:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-21 12:36:46 -0400
commitc4ad180f0e2ef98de48179aec7afe004562c0ec5 (patch)
tree150e920f530a4a12b56102e96fdf81ddf466cb68 /arch/s390
parentaa033810461ee56abbef6cef10aabd6b97f5caee (diff)
parent6b8224e40af147d3300136ce6d037db48f89068f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 update from Martin Schwidefsky: "An additional sysfs attribute for channel paths and a couple of bux fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pgtable: fix ipte notify bit s390/xpram: mark xpram as non-rotational s390/smp: fix cpu re-scan vs. cpu state s390/cio: add channel ID sysfs attribute s390/ftrace: fix mcount adjustment s390: fix gmap_ipte_notifier vs. software dirty pages s390: disable pfmf for clear page instruction s390/disassembler: prevent endless loop in print_fn_code() s390: remove non existent reference to GENERIC_KERNEL_THREAD
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/include/asm/ftrace.h12
-rw-r--r--arch/s390/include/asm/page.h20
-rw-r--r--arch/s390/include/asm/pgtable.h4
-rw-r--r--arch/s390/kernel/dis.c2
-rw-r--r--arch/s390/kernel/ftrace.c9
-rw-r--r--arch/s390/kernel/mcount.S2
-rw-r--r--arch/s390/kernel/mcount64.S2
-rw-r--r--arch/s390/kernel/smp.c2
-rw-r--r--arch/s390/mm/pgtable.c3
10 files changed, 27 insertions, 30 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 2c9789da0e24..da183c5a103c 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -98,7 +98,6 @@ config S390
98 select CLONE_BACKWARDS2 98 select CLONE_BACKWARDS2
99 select GENERIC_CLOCKEVENTS 99 select GENERIC_CLOCKEVENTS
100 select GENERIC_CPU_DEVICES if !SMP 100 select GENERIC_CPU_DEVICES if !SMP
101 select GENERIC_KERNEL_THREAD
102 select GENERIC_SMP_IDLE_THREAD 101 select GENERIC_SMP_IDLE_THREAD
103 select GENERIC_TIME_VSYSCALL_OLD 102 select GENERIC_TIME_VSYSCALL_OLD
104 select HAVE_ALIGNED_STRUCT_PAGE if SLUB 103 select HAVE_ALIGNED_STRUCT_PAGE if SLUB
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h
index b7931faaef6d..bf246dae1367 100644
--- a/arch/s390/include/asm/ftrace.h
+++ b/arch/s390/include/asm/ftrace.h
@@ -9,11 +9,6 @@ struct dyn_arch_ftrace { };
9 9
10#define MCOUNT_ADDR ((long)_mcount) 10#define MCOUNT_ADDR ((long)_mcount)
11 11
12#ifdef CONFIG_64BIT
13#define MCOUNT_INSN_SIZE 12
14#else
15#define MCOUNT_INSN_SIZE 20
16#endif
17 12
18static inline unsigned long ftrace_call_adjust(unsigned long addr) 13static inline unsigned long ftrace_call_adjust(unsigned long addr)
19{ 14{
@@ -21,4 +16,11 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
21} 16}
22 17
23#endif /* __ASSEMBLY__ */ 18#endif /* __ASSEMBLY__ */
19
20#ifdef CONFIG_64BIT
21#define MCOUNT_INSN_SIZE 12
22#else
23#define MCOUNT_INSN_SIZE 22
24#endif
25
24#endif /* _ASM_S390_FTRACE_H */ 26#endif /* _ASM_S390_FTRACE_H */
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h
index 75ce9b065f9f..5d64fb7619cc 100644
--- a/arch/s390/include/asm/page.h
+++ b/arch/s390/include/asm/page.h
@@ -32,7 +32,7 @@
32 32
33void storage_key_init_range(unsigned long start, unsigned long end); 33void storage_key_init_range(unsigned long start, unsigned long end);
34 34
35static unsigned long pfmf(unsigned long function, unsigned long address) 35static inline unsigned long pfmf(unsigned long function, unsigned long address)
36{ 36{
37 asm volatile( 37 asm volatile(
38 " .insn rre,0xb9af0000,%[function],%[address]" 38 " .insn rre,0xb9af0000,%[function],%[address]"
@@ -44,17 +44,13 @@ static unsigned long pfmf(unsigned long function, unsigned long address)
44 44
45static inline void clear_page(void *page) 45static inline void clear_page(void *page)
46{ 46{
47 if (MACHINE_HAS_PFMF) { 47 register unsigned long reg1 asm ("1") = 0;
48 pfmf(0x10000, (unsigned long)page); 48 register void *reg2 asm ("2") = page;
49 } else { 49 register unsigned long reg3 asm ("3") = 4096;
50 register unsigned long reg1 asm ("1") = 0; 50 asm volatile(
51 register void *reg2 asm ("2") = page; 51 " mvcl 2,0"
52 register unsigned long reg3 asm ("3") = 4096; 52 : "+d" (reg2), "+d" (reg3) : "d" (reg1)
53 asm volatile( 53 : "memory", "cc");
54 " mvcl 2,0"
55 : "+d" (reg2), "+d" (reg3) : "d" (reg1)
56 : "memory", "cc");
57 }
58} 54}
59 55
60static inline void copy_page(void *to, void *from) 56static inline void copy_page(void *to, void *from)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 4105b8221fdd..0f0de30e3e3f 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -306,7 +306,7 @@ extern unsigned long MODULES_END;
306#define RCP_HC_BIT 0x00200000UL 306#define RCP_HC_BIT 0x00200000UL
307#define RCP_GR_BIT 0x00040000UL 307#define RCP_GR_BIT 0x00040000UL
308#define RCP_GC_BIT 0x00020000UL 308#define RCP_GC_BIT 0x00020000UL
309#define RCP_IN_BIT 0x00008000UL /* IPTE notify bit */ 309#define RCP_IN_BIT 0x00002000UL /* IPTE notify bit */
310 310
311/* User dirty / referenced bit for KVM's migration feature */ 311/* User dirty / referenced bit for KVM's migration feature */
312#define KVM_UR_BIT 0x00008000UL 312#define KVM_UR_BIT 0x00008000UL
@@ -374,7 +374,7 @@ extern unsigned long MODULES_END;
374#define RCP_HC_BIT 0x0020000000000000UL 374#define RCP_HC_BIT 0x0020000000000000UL
375#define RCP_GR_BIT 0x0004000000000000UL 375#define RCP_GR_BIT 0x0004000000000000UL
376#define RCP_GC_BIT 0x0002000000000000UL 376#define RCP_GC_BIT 0x0002000000000000UL
377#define RCP_IN_BIT 0x0000800000000000UL /* IPTE notify bit */ 377#define RCP_IN_BIT 0x0000200000000000UL /* IPTE notify bit */
378 378
379/* User dirty / referenced bit for KVM's migration feature */ 379/* User dirty / referenced bit for KVM's migration feature */
380#define KVM_UR_BIT 0x0000800000000000UL 380#define KVM_UR_BIT 0x0000800000000000UL
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
27void ftrace_disable_code(void); 21void ftrace_disable_code(void);
@@ -155,9 +149,10 @@ unsigned long __kprobes prepare_ftrace_return(unsigned long parent,
155 149
156 if (unlikely(atomic_read(&current->tracing_graph_pause))) 150 if (unlikely(atomic_read(&current->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);
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 7805ddca833d..18dc417aaf79 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -677,8 +677,7 @@ int gmap_ipte_notify(struct gmap *gmap, unsigned long start, unsigned long len)
677 break; 677 break;
678 } 678 }
679 /* Get the page mapped */ 679 /* Get the page mapped */
680 if (get_user_pages(current, gmap->mm, addr, 1, 1, 0, 680 if (fixup_user_fault(current, gmap->mm, addr, FAULT_FLAG_WRITE)) {
681 NULL, NULL) != 1) {
682 rc = -EFAULT; 681 rc = -EFAULT;
683 break; 682 break;
684 } 683 }