diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 1 | ||||
-rw-r--r-- | arch/s390/defconfig | 37 | ||||
-rw-r--r-- | arch/s390/include/asm/facility.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/pgalloc.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/swab.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/tlb.h | 22 | ||||
-rw-r--r-- | arch/s390/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/irq.c | 9 | ||||
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf.c | 4 | ||||
-rw-r--r-- | arch/s390/mm/maccess.c | 27 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 63 |
11 files changed, 108 insertions, 65 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 2b7c0fbe578e..9015060919a0 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -90,7 +90,6 @@ config S390 | |||
90 | select HAVE_KERNEL_XZ | 90 | select HAVE_KERNEL_XZ |
91 | select HAVE_ARCH_MUTEX_CPU_RELAX | 91 | select HAVE_ARCH_MUTEX_CPU_RELAX |
92 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 | 92 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 |
93 | select HAVE_RCU_TABLE_FREE if SMP | ||
94 | select ARCH_SAVE_PAGE_KEYS if HIBERNATION | 93 | select ARCH_SAVE_PAGE_KEYS if HIBERNATION |
95 | select HAVE_MEMBLOCK | 94 | select HAVE_MEMBLOCK |
96 | select HAVE_MEMBLOCK_NODE_MAP | 95 | select HAVE_MEMBLOCK_NODE_MAP |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 6cf8e26b3137..1957a9dd256d 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,8 +1,12 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_FHANDLE=y | ||
5 | CONFIG_TASKSTATS=y | ||
6 | CONFIG_TASK_DELAY_ACCT=y | ||
7 | CONFIG_TASK_XACCT=y | ||
8 | CONFIG_TASK_IO_ACCOUNTING=y | ||
4 | CONFIG_AUDIT=y | 9 | CONFIG_AUDIT=y |
5 | CONFIG_RCU_TRACE=y | ||
6 | CONFIG_IKCONFIG=y | 10 | CONFIG_IKCONFIG=y |
7 | CONFIG_IKCONFIG_PROC=y | 11 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_CGROUPS=y | 12 | CONFIG_CGROUPS=y |
@@ -14,16 +18,22 @@ CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | |||
14 | CONFIG_CGROUP_SCHED=y | 18 | CONFIG_CGROUP_SCHED=y |
15 | CONFIG_RT_GROUP_SCHED=y | 19 | CONFIG_RT_GROUP_SCHED=y |
16 | CONFIG_BLK_CGROUP=y | 20 | CONFIG_BLK_CGROUP=y |
21 | CONFIG_NAMESPACES=y | ||
17 | CONFIG_BLK_DEV_INITRD=y | 22 | CONFIG_BLK_DEV_INITRD=y |
18 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 23 | CONFIG_RD_BZIP2=y |
24 | CONFIG_RD_LZMA=y | ||
25 | CONFIG_RD_XZ=y | ||
26 | CONFIG_RD_LZO=y | ||
27 | CONFIG_EXPERT=y | ||
19 | # CONFIG_COMPAT_BRK is not set | 28 | # CONFIG_COMPAT_BRK is not set |
20 | CONFIG_SLAB=y | ||
21 | CONFIG_PROFILING=y | 29 | CONFIG_PROFILING=y |
22 | CONFIG_OPROFILE=y | 30 | CONFIG_OPROFILE=y |
23 | CONFIG_KPROBES=y | 31 | CONFIG_KPROBES=y |
24 | CONFIG_MODULES=y | 32 | CONFIG_MODULES=y |
25 | CONFIG_MODULE_UNLOAD=y | 33 | CONFIG_MODULE_UNLOAD=y |
26 | CONFIG_MODVERSIONS=y | 34 | CONFIG_MODVERSIONS=y |
35 | CONFIG_PARTITION_ADVANCED=y | ||
36 | CONFIG_IBM_PARTITION=y | ||
27 | CONFIG_DEFAULT_DEADLINE=y | 37 | CONFIG_DEFAULT_DEADLINE=y |
28 | CONFIG_NO_HZ=y | 38 | CONFIG_NO_HZ=y |
29 | CONFIG_HIGH_RES_TIMERS=y | 39 | CONFIG_HIGH_RES_TIMERS=y |
@@ -34,18 +44,15 @@ CONFIG_KSM=y | |||
34 | CONFIG_BINFMT_MISC=m | 44 | CONFIG_BINFMT_MISC=m |
35 | CONFIG_CMM=m | 45 | CONFIG_CMM=m |
36 | CONFIG_HZ_100=y | 46 | CONFIG_HZ_100=y |
37 | CONFIG_KEXEC=y | 47 | CONFIG_CRASH_DUMP=y |
38 | CONFIG_PM=y | ||
39 | CONFIG_HIBERNATION=y | 48 | CONFIG_HIBERNATION=y |
40 | CONFIG_PACKET=y | 49 | CONFIG_PACKET=y |
41 | CONFIG_UNIX=y | 50 | CONFIG_UNIX=y |
42 | CONFIG_NET_KEY=y | 51 | CONFIG_NET_KEY=y |
43 | CONFIG_AFIUCV=m | ||
44 | CONFIG_INET=y | 52 | CONFIG_INET=y |
45 | CONFIG_IP_MULTICAST=y | 53 | CONFIG_IP_MULTICAST=y |
46 | # CONFIG_INET_LRO is not set | 54 | # CONFIG_INET_LRO is not set |
47 | CONFIG_IPV6=y | 55 | CONFIG_IPV6=y |
48 | CONFIG_NET_SCTPPROBE=m | ||
49 | CONFIG_L2TP=m | 56 | CONFIG_L2TP=m |
50 | CONFIG_L2TP_DEBUGFS=m | 57 | CONFIG_L2TP_DEBUGFS=m |
51 | CONFIG_VLAN_8021Q=y | 58 | CONFIG_VLAN_8021Q=y |
@@ -84,15 +91,14 @@ CONFIG_SCSI_CONSTANTS=y | |||
84 | CONFIG_SCSI_LOGGING=y | 91 | CONFIG_SCSI_LOGGING=y |
85 | CONFIG_SCSI_SCAN_ASYNC=y | 92 | CONFIG_SCSI_SCAN_ASYNC=y |
86 | CONFIG_ZFCP=y | 93 | CONFIG_ZFCP=y |
87 | CONFIG_ZFCP_DIF=y | ||
88 | CONFIG_NETDEVICES=y | 94 | CONFIG_NETDEVICES=y |
89 | CONFIG_DUMMY=m | ||
90 | CONFIG_BONDING=m | 95 | CONFIG_BONDING=m |
96 | CONFIG_DUMMY=m | ||
91 | CONFIG_EQUALIZER=m | 97 | CONFIG_EQUALIZER=m |
92 | CONFIG_TUN=m | 98 | CONFIG_TUN=m |
93 | CONFIG_NET_ETHERNET=y | ||
94 | CONFIG_VIRTIO_NET=y | 99 | CONFIG_VIRTIO_NET=y |
95 | CONFIG_RAW_DRIVER=m | 100 | CONFIG_RAW_DRIVER=m |
101 | CONFIG_VIRTIO_BALLOON=y | ||
96 | CONFIG_EXT2_FS=y | 102 | CONFIG_EXT2_FS=y |
97 | CONFIG_EXT3_FS=y | 103 | CONFIG_EXT3_FS=y |
98 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 104 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
@@ -103,27 +109,21 @@ CONFIG_PROC_KCORE=y | |||
103 | CONFIG_TMPFS=y | 109 | CONFIG_TMPFS=y |
104 | CONFIG_TMPFS_POSIX_ACL=y | 110 | CONFIG_TMPFS_POSIX_ACL=y |
105 | # CONFIG_NETWORK_FILESYSTEMS is not set | 111 | # CONFIG_NETWORK_FILESYSTEMS is not set |
106 | CONFIG_PARTITION_ADVANCED=y | ||
107 | CONFIG_IBM_PARTITION=y | ||
108 | CONFIG_DLM=m | ||
109 | CONFIG_MAGIC_SYSRQ=y | 112 | CONFIG_MAGIC_SYSRQ=y |
110 | CONFIG_DEBUG_KERNEL=y | ||
111 | CONFIG_TIMER_STATS=y | 113 | CONFIG_TIMER_STATS=y |
112 | CONFIG_PROVE_LOCKING=y | 114 | CONFIG_PROVE_LOCKING=y |
113 | CONFIG_PROVE_RCU=y | 115 | CONFIG_PROVE_RCU=y |
114 | CONFIG_LOCK_STAT=y | 116 | CONFIG_LOCK_STAT=y |
115 | CONFIG_DEBUG_LOCKDEP=y | 117 | CONFIG_DEBUG_LOCKDEP=y |
116 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
117 | CONFIG_DEBUG_LIST=y | 118 | CONFIG_DEBUG_LIST=y |
118 | CONFIG_DEBUG_NOTIFIERS=y | 119 | CONFIG_DEBUG_NOTIFIERS=y |
119 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 120 | CONFIG_RCU_TRACE=y |
120 | CONFIG_KPROBES_SANITY_TEST=y | 121 | CONFIG_KPROBES_SANITY_TEST=y |
121 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | 122 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y |
122 | CONFIG_CPU_NOTIFIER_ERROR_INJECT=m | 123 | CONFIG_CPU_NOTIFIER_ERROR_INJECT=m |
123 | CONFIG_LATENCYTOP=y | 124 | CONFIG_LATENCYTOP=y |
124 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
125 | CONFIG_DEBUG_PAGEALLOC=y | 125 | CONFIG_DEBUG_PAGEALLOC=y |
126 | # CONFIG_FTRACE is not set | 126 | CONFIG_BLK_DEV_IO_TRACE=y |
127 | # CONFIG_STRICT_DEVMEM is not set | 127 | # CONFIG_STRICT_DEVMEM is not set |
128 | CONFIG_CRYPTO_NULL=m | 128 | CONFIG_CRYPTO_NULL=m |
129 | CONFIG_CRYPTO_CRYPTD=m | 129 | CONFIG_CRYPTO_CRYPTD=m |
@@ -173,4 +173,3 @@ CONFIG_CRYPTO_SHA512_S390=m | |||
173 | CONFIG_CRYPTO_DES_S390=m | 173 | CONFIG_CRYPTO_DES_S390=m |
174 | CONFIG_CRYPTO_AES_S390=m | 174 | CONFIG_CRYPTO_AES_S390=m |
175 | CONFIG_CRC7=m | 175 | CONFIG_CRC7=m |
176 | CONFIG_VIRTIO_BALLOON=y | ||
diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h index 1e5b27edc0c9..2ee66a65f2d4 100644 --- a/arch/s390/include/asm/facility.h +++ b/arch/s390/include/asm/facility.h | |||
@@ -38,12 +38,11 @@ static inline void stfle(u64 *stfle_fac_list, int size) | |||
38 | unsigned long nr; | 38 | unsigned long nr; |
39 | 39 | ||
40 | preempt_disable(); | 40 | preempt_disable(); |
41 | S390_lowcore.stfl_fac_list = 0; | ||
42 | asm volatile( | 41 | asm volatile( |
43 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | 42 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ |
44 | "0:\n" | 43 | "0:\n" |
45 | EX_TABLE(0b, 0b) | 44 | EX_TABLE(0b, 0b) |
46 | : "=m" (S390_lowcore.stfl_fac_list)); | 45 | : "+m" (S390_lowcore.stfl_fac_list)); |
47 | nr = 4; /* bytes stored by stfl */ | 46 | nr = 4; /* bytes stored by stfl */ |
48 | memcpy(stfle_fac_list, &S390_lowcore.stfl_fac_list, 4); | 47 | memcpy(stfle_fac_list, &S390_lowcore.stfl_fac_list, 4); |
49 | if (S390_lowcore.stfl_fac_list & 0x01000000) { | 48 | if (S390_lowcore.stfl_fac_list & 0x01000000) { |
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h index 8eef9b5b3cf4..78e3041919de 100644 --- a/arch/s390/include/asm/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
@@ -22,10 +22,7 @@ void crst_table_free(struct mm_struct *, unsigned long *); | |||
22 | 22 | ||
23 | unsigned long *page_table_alloc(struct mm_struct *, unsigned long); | 23 | unsigned long *page_table_alloc(struct mm_struct *, unsigned long); |
24 | void page_table_free(struct mm_struct *, unsigned long *); | 24 | void page_table_free(struct mm_struct *, unsigned long *); |
25 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
26 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); | 25 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); |
27 | void __tlb_remove_table(void *_table); | ||
28 | #endif | ||
29 | 26 | ||
30 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) | 27 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) |
31 | { | 28 | { |
diff --git a/arch/s390/include/asm/swab.h b/arch/s390/include/asm/swab.h index 6bdee21c077e..a3e4ebb32090 100644 --- a/arch/s390/include/asm/swab.h +++ b/arch/s390/include/asm/swab.h | |||
@@ -77,7 +77,7 @@ static inline __u16 __arch_swab16p(const __u16 *x) | |||
77 | 77 | ||
78 | asm volatile( | 78 | asm volatile( |
79 | #ifndef __s390x__ | 79 | #ifndef __s390x__ |
80 | " icm %0,2,%O+1(%R1)\n" | 80 | " icm %0,2,%O1+1(%R1)\n" |
81 | " ic %0,%1\n" | 81 | " ic %0,%1\n" |
82 | : "=&d" (result) : "Q" (*x) : "cc"); | 82 | : "=&d" (result) : "Q" (*x) : "cc"); |
83 | #else /* __s390x__ */ | 83 | #else /* __s390x__ */ |
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h index c687a2c83462..775a5eea8f9e 100644 --- a/arch/s390/include/asm/tlb.h +++ b/arch/s390/include/asm/tlb.h | |||
@@ -30,14 +30,10 @@ | |||
30 | 30 | ||
31 | struct mmu_gather { | 31 | struct mmu_gather { |
32 | struct mm_struct *mm; | 32 | struct mm_struct *mm; |
33 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
34 | struct mmu_table_batch *batch; | 33 | struct mmu_table_batch *batch; |
35 | #endif | ||
36 | unsigned int fullmm; | 34 | unsigned int fullmm; |
37 | unsigned int need_flush; | ||
38 | }; | 35 | }; |
39 | 36 | ||
40 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
41 | struct mmu_table_batch { | 37 | struct mmu_table_batch { |
42 | struct rcu_head rcu; | 38 | struct rcu_head rcu; |
43 | unsigned int nr; | 39 | unsigned int nr; |
@@ -49,7 +45,6 @@ struct mmu_table_batch { | |||
49 | 45 | ||
50 | extern void tlb_table_flush(struct mmu_gather *tlb); | 46 | extern void tlb_table_flush(struct mmu_gather *tlb); |
51 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); | 47 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); |
52 | #endif | ||
53 | 48 | ||
54 | static inline void tlb_gather_mmu(struct mmu_gather *tlb, | 49 | static inline void tlb_gather_mmu(struct mmu_gather *tlb, |
55 | struct mm_struct *mm, | 50 | struct mm_struct *mm, |
@@ -57,29 +52,20 @@ static inline void tlb_gather_mmu(struct mmu_gather *tlb, | |||
57 | { | 52 | { |
58 | tlb->mm = mm; | 53 | tlb->mm = mm; |
59 | tlb->fullmm = full_mm_flush; | 54 | tlb->fullmm = full_mm_flush; |
60 | tlb->need_flush = 0; | ||
61 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
62 | tlb->batch = NULL; | 55 | tlb->batch = NULL; |
63 | #endif | ||
64 | if (tlb->fullmm) | 56 | if (tlb->fullmm) |
65 | __tlb_flush_mm(mm); | 57 | __tlb_flush_mm(mm); |
66 | } | 58 | } |
67 | 59 | ||
68 | static inline void tlb_flush_mmu(struct mmu_gather *tlb) | 60 | static inline void tlb_flush_mmu(struct mmu_gather *tlb) |
69 | { | 61 | { |
70 | if (!tlb->need_flush) | ||
71 | return; | ||
72 | tlb->need_flush = 0; | ||
73 | __tlb_flush_mm(tlb->mm); | ||
74 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
75 | tlb_table_flush(tlb); | 62 | tlb_table_flush(tlb); |
76 | #endif | ||
77 | } | 63 | } |
78 | 64 | ||
79 | static inline void tlb_finish_mmu(struct mmu_gather *tlb, | 65 | static inline void tlb_finish_mmu(struct mmu_gather *tlb, |
80 | unsigned long start, unsigned long end) | 66 | unsigned long start, unsigned long end) |
81 | { | 67 | { |
82 | tlb_flush_mmu(tlb); | 68 | tlb_table_flush(tlb); |
83 | } | 69 | } |
84 | 70 | ||
85 | /* | 71 | /* |
@@ -105,10 +91,8 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
105 | static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | 91 | static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, |
106 | unsigned long address) | 92 | unsigned long address) |
107 | { | 93 | { |
108 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
109 | if (!tlb->fullmm) | 94 | if (!tlb->fullmm) |
110 | return page_table_free_rcu(tlb, (unsigned long *) pte); | 95 | return page_table_free_rcu(tlb, (unsigned long *) pte); |
111 | #endif | ||
112 | page_table_free(tlb->mm, (unsigned long *) pte); | 96 | page_table_free(tlb->mm, (unsigned long *) pte); |
113 | } | 97 | } |
114 | 98 | ||
@@ -125,10 +109,8 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, | |||
125 | #ifdef __s390x__ | 109 | #ifdef __s390x__ |
126 | if (tlb->mm->context.asce_limit <= (1UL << 31)) | 110 | if (tlb->mm->context.asce_limit <= (1UL << 31)) |
127 | return; | 111 | return; |
128 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
129 | if (!tlb->fullmm) | 112 | if (!tlb->fullmm) |
130 | return tlb_remove_table(tlb, pmd); | 113 | return tlb_remove_table(tlb, pmd); |
131 | #endif | ||
132 | crst_table_free(tlb->mm, (unsigned long *) pmd); | 114 | crst_table_free(tlb->mm, (unsigned long *) pmd); |
133 | #endif | 115 | #endif |
134 | } | 116 | } |
@@ -146,10 +128,8 @@ static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud, | |||
146 | #ifdef __s390x__ | 128 | #ifdef __s390x__ |
147 | if (tlb->mm->context.asce_limit <= (1UL << 42)) | 129 | if (tlb->mm->context.asce_limit <= (1UL << 42)) |
148 | return; | 130 | return; |
149 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
150 | if (!tlb->fullmm) | 131 | if (!tlb->fullmm) |
151 | return tlb_remove_table(tlb, pud); | 132 | return tlb_remove_table(tlb, pud); |
152 | #endif | ||
153 | crst_table_free(tlb->mm, (unsigned long *) pud); | 133 | crst_table_free(tlb->mm, (unsigned long *) pud); |
154 | #endif | 134 | #endif |
155 | } | 135 | } |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index c27a0727f930..adccd908ebc7 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -474,9 +474,9 @@ ENTRY(startup_kdump) | |||
474 | stck __LC_LAST_UPDATE_CLOCK | 474 | stck __LC_LAST_UPDATE_CLOCK |
475 | spt 5f-.LPG0(%r13) | 475 | spt 5f-.LPG0(%r13) |
476 | mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13) | 476 | mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13) |
477 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | ||
477 | #ifndef CONFIG_MARCH_G5 | 478 | #ifndef CONFIG_MARCH_G5 |
478 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} | 479 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} |
479 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | ||
480 | .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list | 480 | .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list |
481 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? | 481 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? |
482 | jz 0f | 482 | jz 0f |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index 1c2cdd59ccd0..8a22c27219dd 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -118,9 +118,10 @@ asmlinkage void do_softirq(void) | |||
118 | "a" (__do_softirq) | 118 | "a" (__do_softirq) |
119 | : "0", "1", "2", "3", "4", "5", "14", | 119 | : "0", "1", "2", "3", "4", "5", "14", |
120 | "cc", "memory" ); | 120 | "cc", "memory" ); |
121 | } else | 121 | } else { |
122 | /* We are already on the async stack. */ | 122 | /* We are already on the async stack. */ |
123 | __do_softirq(); | 123 | __do_softirq(); |
124 | } | ||
124 | } | 125 | } |
125 | 126 | ||
126 | local_irq_restore(flags); | 127 | local_irq_restore(flags); |
@@ -192,11 +193,12 @@ int unregister_external_interrupt(u16 code, ext_int_handler_t handler) | |||
192 | int index = ext_hash(code); | 193 | int index = ext_hash(code); |
193 | 194 | ||
194 | spin_lock_irqsave(&ext_int_hash_lock, flags); | 195 | spin_lock_irqsave(&ext_int_hash_lock, flags); |
195 | list_for_each_entry_rcu(p, &ext_int_hash[index], entry) | 196 | list_for_each_entry_rcu(p, &ext_int_hash[index], entry) { |
196 | if (p->code == code && p->handler == handler) { | 197 | if (p->code == code && p->handler == handler) { |
197 | list_del_rcu(&p->entry); | 198 | list_del_rcu(&p->entry); |
198 | kfree_rcu(p, rcu); | 199 | kfree_rcu(p, rcu); |
199 | } | 200 | } |
201 | } | ||
200 | spin_unlock_irqrestore(&ext_int_hash_lock, flags); | 202 | spin_unlock_irqrestore(&ext_int_hash_lock, flags); |
201 | return 0; | 203 | return 0; |
202 | } | 204 | } |
@@ -211,9 +213,10 @@ void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code, | |||
211 | 213 | ||
212 | old_regs = set_irq_regs(regs); | 214 | old_regs = set_irq_regs(regs); |
213 | irq_enter(); | 215 | irq_enter(); |
214 | if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) | 216 | if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) { |
215 | /* Serve timer interrupts first. */ | 217 | /* Serve timer interrupts first. */ |
216 | clock_comparator_work(); | 218 | clock_comparator_work(); |
219 | } | ||
217 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; | 220 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; |
218 | if (ext_code.code != 0x1004) | 221 | if (ext_code.code != 0x1004) |
219 | __get_cpu_var(s390_idle).nohz_delay = 1; | 222 | __get_cpu_var(s390_idle).nohz_delay = 1; |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 46405086479c..cb019f429e88 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
@@ -178,7 +178,7 @@ static void cpumf_pmu_enable(struct pmu *pmu) | |||
178 | err = lcctl(cpuhw->state); | 178 | err = lcctl(cpuhw->state); |
179 | if (err) { | 179 | if (err) { |
180 | pr_err("Enabling the performance measuring unit " | 180 | pr_err("Enabling the performance measuring unit " |
181 | "failed with rc=%lx\n", err); | 181 | "failed with rc=%x\n", err); |
182 | return; | 182 | return; |
183 | } | 183 | } |
184 | 184 | ||
@@ -203,7 +203,7 @@ static void cpumf_pmu_disable(struct pmu *pmu) | |||
203 | err = lcctl(inactive); | 203 | err = lcctl(inactive); |
204 | if (err) { | 204 | if (err) { |
205 | pr_err("Disabling the performance measuring unit " | 205 | pr_err("Disabling the performance measuring unit " |
206 | "failed with rc=%lx\n", err); | 206 | "failed with rc=%x\n", err); |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | 209 | ||
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index 7bb15fcca75e..e1335dc2b1b7 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -61,21 +61,14 @@ long probe_kernel_write(void *dst, const void *src, size_t size) | |||
61 | return copied < 0 ? -EFAULT : 0; | 61 | return copied < 0 ? -EFAULT : 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* | 64 | static int __memcpy_real(void *dest, void *src, size_t count) |
65 | * Copy memory in real mode (kernel to kernel) | ||
66 | */ | ||
67 | int memcpy_real(void *dest, void *src, size_t count) | ||
68 | { | 65 | { |
69 | register unsigned long _dest asm("2") = (unsigned long) dest; | 66 | register unsigned long _dest asm("2") = (unsigned long) dest; |
70 | register unsigned long _len1 asm("3") = (unsigned long) count; | 67 | register unsigned long _len1 asm("3") = (unsigned long) count; |
71 | register unsigned long _src asm("4") = (unsigned long) src; | 68 | register unsigned long _src asm("4") = (unsigned long) src; |
72 | register unsigned long _len2 asm("5") = (unsigned long) count; | 69 | register unsigned long _len2 asm("5") = (unsigned long) count; |
73 | unsigned long flags; | ||
74 | int rc = -EFAULT; | 70 | int rc = -EFAULT; |
75 | 71 | ||
76 | if (!count) | ||
77 | return 0; | ||
78 | flags = __arch_local_irq_stnsm(0xf8UL); | ||
79 | asm volatile ( | 72 | asm volatile ( |
80 | "0: mvcle %1,%2,0x0\n" | 73 | "0: mvcle %1,%2,0x0\n" |
81 | "1: jo 0b\n" | 74 | "1: jo 0b\n" |
@@ -86,7 +79,23 @@ int memcpy_real(void *dest, void *src, size_t count) | |||
86 | "+d" (_len2), "=m" (*((long *) dest)) | 79 | "+d" (_len2), "=m" (*((long *) dest)) |
87 | : "m" (*((long *) src)) | 80 | : "m" (*((long *) src)) |
88 | : "cc", "memory"); | 81 | : "cc", "memory"); |
89 | arch_local_irq_restore(flags); | 82 | return rc; |
83 | } | ||
84 | |||
85 | /* | ||
86 | * Copy memory in real mode (kernel to kernel) | ||
87 | */ | ||
88 | int memcpy_real(void *dest, void *src, size_t count) | ||
89 | { | ||
90 | unsigned long flags; | ||
91 | int rc; | ||
92 | |||
93 | if (!count) | ||
94 | return 0; | ||
95 | local_irq_save(flags); | ||
96 | __arch_local_irq_stnsm(0xfbUL); | ||
97 | rc = __memcpy_real(dest, src, count); | ||
98 | local_irq_restore(flags); | ||
90 | return rc; | 99 | return rc; |
91 | } | 100 | } |
92 | 101 | ||
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 373adf69b01c..6e765bf00670 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -678,8 +678,6 @@ void page_table_free(struct mm_struct *mm, unsigned long *table) | |||
678 | } | 678 | } |
679 | } | 679 | } |
680 | 680 | ||
681 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
682 | |||
683 | static void __page_table_free_rcu(void *table, unsigned bit) | 681 | static void __page_table_free_rcu(void *table, unsigned bit) |
684 | { | 682 | { |
685 | struct page *page; | 683 | struct page *page; |
@@ -733,7 +731,66 @@ void __tlb_remove_table(void *_table) | |||
733 | free_pages((unsigned long) table, ALLOC_ORDER); | 731 | free_pages((unsigned long) table, ALLOC_ORDER); |
734 | } | 732 | } |
735 | 733 | ||
736 | #endif | 734 | static void tlb_remove_table_smp_sync(void *arg) |
735 | { | ||
736 | /* Simply deliver the interrupt */ | ||
737 | } | ||
738 | |||
739 | static void tlb_remove_table_one(void *table) | ||
740 | { | ||
741 | /* | ||
742 | * This isn't an RCU grace period and hence the page-tables cannot be | ||
743 | * assumed to be actually RCU-freed. | ||
744 | * | ||
745 | * It is however sufficient for software page-table walkers that rely | ||
746 | * on IRQ disabling. See the comment near struct mmu_table_batch. | ||
747 | */ | ||
748 | smp_call_function(tlb_remove_table_smp_sync, NULL, 1); | ||
749 | __tlb_remove_table(table); | ||
750 | } | ||
751 | |||
752 | static void tlb_remove_table_rcu(struct rcu_head *head) | ||
753 | { | ||
754 | struct mmu_table_batch *batch; | ||
755 | int i; | ||
756 | |||
757 | batch = container_of(head, struct mmu_table_batch, rcu); | ||
758 | |||
759 | for (i = 0; i < batch->nr; i++) | ||
760 | __tlb_remove_table(batch->tables[i]); | ||
761 | |||
762 | free_page((unsigned long)batch); | ||
763 | } | ||
764 | |||
765 | void tlb_table_flush(struct mmu_gather *tlb) | ||
766 | { | ||
767 | struct mmu_table_batch **batch = &tlb->batch; | ||
768 | |||
769 | if (*batch) { | ||
770 | __tlb_flush_mm(tlb->mm); | ||
771 | call_rcu_sched(&(*batch)->rcu, tlb_remove_table_rcu); | ||
772 | *batch = NULL; | ||
773 | } | ||
774 | } | ||
775 | |||
776 | void tlb_remove_table(struct mmu_gather *tlb, void *table) | ||
777 | { | ||
778 | struct mmu_table_batch **batch = &tlb->batch; | ||
779 | |||
780 | if (*batch == NULL) { | ||
781 | *batch = (struct mmu_table_batch *) | ||
782 | __get_free_page(GFP_NOWAIT | __GFP_NOWARN); | ||
783 | if (*batch == NULL) { | ||
784 | __tlb_flush_mm(tlb->mm); | ||
785 | tlb_remove_table_one(table); | ||
786 | return; | ||
787 | } | ||
788 | (*batch)->nr = 0; | ||
789 | } | ||
790 | (*batch)->tables[(*batch)->nr++] = table; | ||
791 | if ((*batch)->nr == MAX_TABLE_BATCH) | ||
792 | tlb_table_flush(tlb); | ||
793 | } | ||
737 | 794 | ||
738 | /* | 795 | /* |
739 | * switch on pgstes for its userspace process (for kvm) | 796 | * switch on pgstes for its userspace process (for kvm) |