diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 17:35:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 17:35:30 -0400 |
commit | 1f8c538ed6a3323b06c2459e9ca36e0ae8bb0ebc (patch) | |
tree | 852cfd52103939d2ddcba38f4f1c34b9da258d97 /arch | |
parent | 190f918660a69d1c56fd05dc8c6cbb8336a8a0af (diff) | |
parent | 233faec97a1dfef1f4bc271f9e5d33f2ba4845ca (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
"There are two memory management related changes, the CMMA support for
KVM to avoid swap-in of freed pages and the split page table lock for
the PMD level. These two come with common code changes in mm/.
A fix for the long standing theoretical TLB flush problem, this one
comes with a common code change in kernel/sched/.
Another set of changes is Heikos uaccess work, included is the initial
set of patches with more to come.
And fixes and cleanups as usual"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (36 commits)
s390/con3270: optionally disable auto update
s390/mm: remove unecessary parameter from pgste_ipte_notify
s390/mm: remove unnecessary parameter from gmap_do_ipte_notify
s390/mm: fixing comment so that parameter name match
s390/smp: limit number of cpus in possible cpu mask
hypfs: Add clarification for "weight_min" attribute
s390: update defconfigs
s390/ptrace: add support for PTRACE_SINGLEBLOCK
s390/perf: make print_debug_cf() static
s390/topology: Remove call to update_cpu_masks()
s390/compat: remove compat exec domain
s390: select CONFIG_TTY for use of tty in unconditional keyboard driver
s390/appldata_os: fix cpu array size calculation
s390/checksum: remove memset() within csum_partial_copy_from_user()
s390/uaccess: remove copy_from_user_real()
s390/sclp_early: Return correct HSA block count also for zero
s390: add some drivers/subsystems to the MAINTAINERS file
s390: improve debug feature usage
s390/airq: add support for irq ranges
s390/mm: enable split page table lock for PMD level
...
Diffstat (limited to 'arch')
45 files changed, 734 insertions, 359 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index bb74b21f007a..953f17c8d17c 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -141,6 +141,7 @@ config S390 | |||
141 | select OLD_SIGACTION | 141 | select OLD_SIGACTION |
142 | select OLD_SIGSUSPEND3 | 142 | select OLD_SIGSUSPEND3 |
143 | select SYSCTL_EXCEPTION_TRACE | 143 | select SYSCTL_EXCEPTION_TRACE |
144 | select TTY | ||
144 | select VIRT_CPU_ACCOUNTING | 145 | select VIRT_CPU_ACCOUNTING |
145 | select VIRT_TO_BUS | 146 | select VIRT_TO_BUS |
146 | 147 | ||
@@ -416,6 +417,10 @@ config ARCH_ENABLE_MEMORY_HOTPLUG | |||
416 | config ARCH_ENABLE_MEMORY_HOTREMOVE | 417 | config ARCH_ENABLE_MEMORY_HOTREMOVE |
417 | def_bool y | 418 | def_bool y |
418 | 419 | ||
420 | config ARCH_ENABLE_SPLIT_PMD_PTLOCK | ||
421 | def_bool y | ||
422 | depends on 64BIT | ||
423 | |||
419 | config FORCE_MAX_ZONEORDER | 424 | config FORCE_MAX_ZONEORDER |
420 | int | 425 | int |
421 | default "9" | 426 | default "9" |
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index de8e2b3b0180..69b23b25ac34 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c | |||
@@ -171,7 +171,7 @@ static int __init appldata_os_init(void) | |||
171 | int rc, max_size; | 171 | int rc, max_size; |
172 | 172 | ||
173 | max_size = sizeof(struct appldata_os_data) + | 173 | max_size = sizeof(struct appldata_os_data) + |
174 | (NR_CPUS * sizeof(struct appldata_os_per_cpu)); | 174 | (num_possible_cpus() * sizeof(struct appldata_os_per_cpu)); |
175 | if (max_size > APPLDATA_MAX_REC_SIZE) { | 175 | if (max_size > APPLDATA_MAX_REC_SIZE) { |
176 | pr_err("Maximum OS record size %i exceeds the maximum " | 176 | pr_err("Maximum OS record size %i exceeds the maximum " |
177 | "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE); | 177 | "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE); |
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index e0af2ee58751..ddaae2f5c913 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
@@ -46,6 +46,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
46 | CONFIG_CFQ_GROUP_IOSCHED=y | 46 | CONFIG_CFQ_GROUP_IOSCHED=y |
47 | CONFIG_DEFAULT_DEADLINE=y | 47 | CONFIG_DEFAULT_DEADLINE=y |
48 | CONFIG_MARCH_Z9_109=y | 48 | CONFIG_MARCH_Z9_109=y |
49 | CONFIG_NR_CPUS=256 | ||
49 | CONFIG_PREEMPT=y | 50 | CONFIG_PREEMPT=y |
50 | CONFIG_HZ_100=y | 51 | CONFIG_HZ_100=y |
51 | CONFIG_MEMORY_HOTPLUG=y | 52 | CONFIG_MEMORY_HOTPLUG=y |
@@ -58,7 +59,6 @@ CONFIG_HOTPLUG_PCI=y | |||
58 | CONFIG_HOTPLUG_PCI_S390=y | 59 | CONFIG_HOTPLUG_PCI_S390=y |
59 | CONFIG_CHSC_SCH=y | 60 | CONFIG_CHSC_SCH=y |
60 | CONFIG_CRASH_DUMP=y | 61 | CONFIG_CRASH_DUMP=y |
61 | CONFIG_ZFCPDUMP=y | ||
62 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 62 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
63 | CONFIG_BINFMT_MISC=m | 63 | CONFIG_BINFMT_MISC=m |
64 | CONFIG_HIBERNATION=y | 64 | CONFIG_HIBERNATION=y |
@@ -101,7 +101,6 @@ CONFIG_TCP_CONG_VENO=m | |||
101 | CONFIG_TCP_CONG_YEAH=m | 101 | CONFIG_TCP_CONG_YEAH=m |
102 | CONFIG_TCP_CONG_ILLINOIS=m | 102 | CONFIG_TCP_CONG_ILLINOIS=m |
103 | CONFIG_IPV6=y | 103 | CONFIG_IPV6=y |
104 | CONFIG_IPV6_PRIVACY=y | ||
105 | CONFIG_IPV6_ROUTER_PREF=y | 104 | CONFIG_IPV6_ROUTER_PREF=y |
106 | CONFIG_INET6_AH=m | 105 | CONFIG_INET6_AH=m |
107 | CONFIG_INET6_ESP=m | 106 | CONFIG_INET6_ESP=m |
@@ -111,6 +110,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
111 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 110 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
112 | CONFIG_INET6_XFRM_MODE_BEET=m | 111 | CONFIG_INET6_XFRM_MODE_BEET=m |
113 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 112 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
113 | CONFIG_IPV6_VTI=m | ||
114 | CONFIG_IPV6_SIT=m | 114 | CONFIG_IPV6_SIT=m |
115 | CONFIG_IPV6_GRE=m | 115 | CONFIG_IPV6_GRE=m |
116 | CONFIG_IPV6_MULTIPLE_TABLES=y | 116 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -135,7 +135,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
135 | CONFIG_NF_CONNTRACK_TFTP=m | 135 | CONFIG_NF_CONNTRACK_TFTP=m |
136 | CONFIG_NF_CT_NETLINK=m | 136 | CONFIG_NF_CT_NETLINK=m |
137 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 137 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
138 | CONFIG_NETFILTER_TPROXY=m | 138 | CONFIG_NF_TABLES=m |
139 | CONFIG_NFT_EXTHDR=m | ||
140 | CONFIG_NFT_META=m | ||
141 | CONFIG_NFT_CT=m | ||
142 | CONFIG_NFT_RBTREE=m | ||
143 | CONFIG_NFT_HASH=m | ||
144 | CONFIG_NFT_COUNTER=m | ||
145 | CONFIG_NFT_LOG=m | ||
146 | CONFIG_NFT_LIMIT=m | ||
147 | CONFIG_NFT_NAT=m | ||
148 | CONFIG_NFT_COMPAT=m | ||
139 | CONFIG_NETFILTER_XT_SET=m | 149 | CONFIG_NETFILTER_XT_SET=m |
140 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 150 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
141 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 151 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -204,7 +214,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
204 | CONFIG_IP_SET_HASH_IPPORT=m | 214 | CONFIG_IP_SET_HASH_IPPORT=m |
205 | CONFIG_IP_SET_HASH_IPPORTIP=m | 215 | CONFIG_IP_SET_HASH_IPPORTIP=m |
206 | CONFIG_IP_SET_HASH_IPPORTNET=m | 216 | CONFIG_IP_SET_HASH_IPPORTNET=m |
217 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
207 | CONFIG_IP_SET_HASH_NET=m | 218 | CONFIG_IP_SET_HASH_NET=m |
219 | CONFIG_IP_SET_HASH_NETNET=m | ||
208 | CONFIG_IP_SET_HASH_NETPORT=m | 220 | CONFIG_IP_SET_HASH_NETPORT=m |
209 | CONFIG_IP_SET_HASH_NETIFACE=m | 221 | CONFIG_IP_SET_HASH_NETIFACE=m |
210 | CONFIG_IP_SET_LIST_SET=m | 222 | CONFIG_IP_SET_LIST_SET=m |
@@ -227,6 +239,11 @@ CONFIG_IP_VS_FTP=m | |||
227 | CONFIG_IP_VS_PE_SIP=m | 239 | CONFIG_IP_VS_PE_SIP=m |
228 | CONFIG_NF_CONNTRACK_IPV4=m | 240 | CONFIG_NF_CONNTRACK_IPV4=m |
229 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 241 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
242 | CONFIG_NF_TABLES_IPV4=m | ||
243 | CONFIG_NFT_REJECT_IPV4=m | ||
244 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
245 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
246 | CONFIG_NF_TABLES_ARP=m | ||
230 | CONFIG_IP_NF_IPTABLES=m | 247 | CONFIG_IP_NF_IPTABLES=m |
231 | CONFIG_IP_NF_MATCH_AH=m | 248 | CONFIG_IP_NF_MATCH_AH=m |
232 | CONFIG_IP_NF_MATCH_ECN=m | 249 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -249,6 +266,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
249 | CONFIG_IP_NF_ARPFILTER=m | 266 | CONFIG_IP_NF_ARPFILTER=m |
250 | CONFIG_IP_NF_ARP_MANGLE=m | 267 | CONFIG_IP_NF_ARP_MANGLE=m |
251 | CONFIG_NF_CONNTRACK_IPV6=m | 268 | CONFIG_NF_CONNTRACK_IPV6=m |
269 | CONFIG_NF_TABLES_IPV6=m | ||
270 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
271 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
252 | CONFIG_IP6_NF_IPTABLES=m | 272 | CONFIG_IP6_NF_IPTABLES=m |
253 | CONFIG_IP6_NF_MATCH_AH=m | 273 | CONFIG_IP6_NF_MATCH_AH=m |
254 | CONFIG_IP6_NF_MATCH_EUI64=m | 274 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -268,6 +288,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
268 | CONFIG_NF_NAT_IPV6=m | 288 | CONFIG_NF_NAT_IPV6=m |
269 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 289 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
270 | CONFIG_IP6_NF_TARGET_NPT=m | 290 | CONFIG_IP6_NF_TARGET_NPT=m |
291 | CONFIG_NF_TABLES_BRIDGE=m | ||
271 | CONFIG_NET_SCTPPROBE=m | 292 | CONFIG_NET_SCTPPROBE=m |
272 | CONFIG_RDS=m | 293 | CONFIG_RDS=m |
273 | CONFIG_RDS_RDMA=m | 294 | CONFIG_RDS_RDMA=m |
@@ -314,6 +335,7 @@ CONFIG_NET_CLS_RSVP=m | |||
314 | CONFIG_NET_CLS_RSVP6=m | 335 | CONFIG_NET_CLS_RSVP6=m |
315 | CONFIG_NET_CLS_FLOW=m | 336 | CONFIG_NET_CLS_FLOW=m |
316 | CONFIG_NET_CLS_CGROUP=y | 337 | CONFIG_NET_CLS_CGROUP=y |
338 | CONFIG_NET_CLS_BPF=m | ||
317 | CONFIG_NET_CLS_ACT=y | 339 | CONFIG_NET_CLS_ACT=y |
318 | CONFIG_NET_ACT_POLICE=m | 340 | CONFIG_NET_ACT_POLICE=m |
319 | CONFIG_NET_ACT_GACT=m | 341 | CONFIG_NET_ACT_GACT=m |
@@ -381,8 +403,8 @@ CONFIG_BLK_DEV_DM=m | |||
381 | CONFIG_DM_CRYPT=m | 403 | CONFIG_DM_CRYPT=m |
382 | CONFIG_DM_SNAPSHOT=m | 404 | CONFIG_DM_SNAPSHOT=m |
383 | CONFIG_DM_MIRROR=m | 405 | CONFIG_DM_MIRROR=m |
384 | CONFIG_DM_RAID=m | ||
385 | CONFIG_DM_LOG_USERSPACE=m | 406 | CONFIG_DM_LOG_USERSPACE=m |
407 | CONFIG_DM_RAID=m | ||
386 | CONFIG_DM_ZERO=m | 408 | CONFIG_DM_ZERO=m |
387 | CONFIG_DM_MULTIPATH=m | 409 | CONFIG_DM_MULTIPATH=m |
388 | CONFIG_DM_MULTIPATH_QL=m | 410 | CONFIG_DM_MULTIPATH_QL=m |
@@ -434,7 +456,6 @@ CONFIG_TN3270_FS=y | |||
434 | CONFIG_WATCHDOG=y | 456 | CONFIG_WATCHDOG=y |
435 | CONFIG_WATCHDOG_NOWAYOUT=y | 457 | CONFIG_WATCHDOG_NOWAYOUT=y |
436 | CONFIG_SOFT_WATCHDOG=m | 458 | CONFIG_SOFT_WATCHDOG=m |
437 | CONFIG_ZVM_WATCHDOG=m | ||
438 | # CONFIG_HID is not set | 459 | # CONFIG_HID is not set |
439 | # CONFIG_USB_SUPPORT is not set | 460 | # CONFIG_USB_SUPPORT is not set |
440 | CONFIG_INFINIBAND=m | 461 | CONFIG_INFINIBAND=m |
@@ -534,13 +555,23 @@ CONFIG_UNUSED_SYMBOLS=y | |||
534 | CONFIG_MAGIC_SYSRQ=y | 555 | CONFIG_MAGIC_SYSRQ=y |
535 | CONFIG_DEBUG_KERNEL=y | 556 | CONFIG_DEBUG_KERNEL=y |
536 | CONFIG_DEBUG_PAGEALLOC=y | 557 | CONFIG_DEBUG_PAGEALLOC=y |
558 | CONFIG_DEBUG_OBJECTS=y | ||
559 | CONFIG_DEBUG_OBJECTS_SELFTEST=y | ||
560 | CONFIG_DEBUG_OBJECTS_FREE=y | ||
561 | CONFIG_DEBUG_OBJECTS_TIMERS=y | ||
562 | CONFIG_DEBUG_OBJECTS_WORK=y | ||
563 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
564 | CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y | ||
537 | CONFIG_SLUB_DEBUG_ON=y | 565 | CONFIG_SLUB_DEBUG_ON=y |
538 | CONFIG_SLUB_STATS=y | 566 | CONFIG_SLUB_STATS=y |
567 | CONFIG_DEBUG_KMEMLEAK=y | ||
539 | CONFIG_DEBUG_STACK_USAGE=y | 568 | CONFIG_DEBUG_STACK_USAGE=y |
540 | CONFIG_DEBUG_VM=y | 569 | CONFIG_DEBUG_VM=y |
541 | CONFIG_DEBUG_VM_RB=y | 570 | CONFIG_DEBUG_VM_RB=y |
542 | CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m | 571 | CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m |
543 | CONFIG_DEBUG_PER_CPU_MAPS=y | 572 | CONFIG_DEBUG_PER_CPU_MAPS=y |
573 | CONFIG_DEBUG_SHIRQ=y | ||
574 | CONFIG_DETECT_HUNG_TASK=y | ||
544 | CONFIG_TIMER_STATS=y | 575 | CONFIG_TIMER_STATS=y |
545 | CONFIG_DEBUG_RT_MUTEXES=y | 576 | CONFIG_DEBUG_RT_MUTEXES=y |
546 | CONFIG_RT_MUTEX_TESTER=y | 577 | CONFIG_RT_MUTEX_TESTER=y |
@@ -573,9 +604,11 @@ CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | |||
573 | CONFIG_BLK_DEV_IO_TRACE=y | 604 | CONFIG_BLK_DEV_IO_TRACE=y |
574 | # CONFIG_KPROBE_EVENT is not set | 605 | # CONFIG_KPROBE_EVENT is not set |
575 | CONFIG_LKDTM=m | 606 | CONFIG_LKDTM=m |
607 | CONFIG_TEST_LIST_SORT=y | ||
576 | CONFIG_KPROBES_SANITY_TEST=y | 608 | CONFIG_KPROBES_SANITY_TEST=y |
577 | CONFIG_RBTREE_TEST=m | 609 | CONFIG_RBTREE_TEST=y |
578 | CONFIG_INTERVAL_TREE_TEST=m | 610 | CONFIG_INTERVAL_TREE_TEST=m |
611 | CONFIG_PERCPU_TEST=m | ||
579 | CONFIG_ATOMIC64_SELFTEST=y | 612 | CONFIG_ATOMIC64_SELFTEST=y |
580 | CONFIG_DMA_API_DEBUG=y | 613 | CONFIG_DMA_API_DEBUG=y |
581 | # CONFIG_STRICT_DEVMEM is not set | 614 | # CONFIG_STRICT_DEVMEM is not set |
@@ -638,7 +671,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
638 | CONFIG_CRYPTO_GHASH_S390=m | 671 | CONFIG_CRYPTO_GHASH_S390=m |
639 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 672 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
640 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 673 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
641 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
642 | CONFIG_X509_CERTIFICATE_PARSER=m | 674 | CONFIG_X509_CERTIFICATE_PARSER=m |
643 | CONFIG_CRC7=m | 675 | CONFIG_CRC7=m |
644 | CONFIG_CRC8=m | 676 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index b9f6b4cab927..c81a74e3e25a 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
@@ -46,6 +46,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
46 | CONFIG_CFQ_GROUP_IOSCHED=y | 46 | CONFIG_CFQ_GROUP_IOSCHED=y |
47 | CONFIG_DEFAULT_DEADLINE=y | 47 | CONFIG_DEFAULT_DEADLINE=y |
48 | CONFIG_MARCH_Z9_109=y | 48 | CONFIG_MARCH_Z9_109=y |
49 | CONFIG_NR_CPUS=256 | ||
49 | CONFIG_HZ_100=y | 50 | CONFIG_HZ_100=y |
50 | CONFIG_MEMORY_HOTPLUG=y | 51 | CONFIG_MEMORY_HOTPLUG=y |
51 | CONFIG_MEMORY_HOTREMOVE=y | 52 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -56,7 +57,6 @@ CONFIG_HOTPLUG_PCI=y | |||
56 | CONFIG_HOTPLUG_PCI_S390=y | 57 | CONFIG_HOTPLUG_PCI_S390=y |
57 | CONFIG_CHSC_SCH=y | 58 | CONFIG_CHSC_SCH=y |
58 | CONFIG_CRASH_DUMP=y | 59 | CONFIG_CRASH_DUMP=y |
59 | CONFIG_ZFCPDUMP=y | ||
60 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 60 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
61 | CONFIG_BINFMT_MISC=m | 61 | CONFIG_BINFMT_MISC=m |
62 | CONFIG_HIBERNATION=y | 62 | CONFIG_HIBERNATION=y |
@@ -99,7 +99,6 @@ CONFIG_TCP_CONG_VENO=m | |||
99 | CONFIG_TCP_CONG_YEAH=m | 99 | CONFIG_TCP_CONG_YEAH=m |
100 | CONFIG_TCP_CONG_ILLINOIS=m | 100 | CONFIG_TCP_CONG_ILLINOIS=m |
101 | CONFIG_IPV6=y | 101 | CONFIG_IPV6=y |
102 | CONFIG_IPV6_PRIVACY=y | ||
103 | CONFIG_IPV6_ROUTER_PREF=y | 102 | CONFIG_IPV6_ROUTER_PREF=y |
104 | CONFIG_INET6_AH=m | 103 | CONFIG_INET6_AH=m |
105 | CONFIG_INET6_ESP=m | 104 | CONFIG_INET6_ESP=m |
@@ -109,6 +108,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
109 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 108 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
110 | CONFIG_INET6_XFRM_MODE_BEET=m | 109 | CONFIG_INET6_XFRM_MODE_BEET=m |
111 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 110 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
111 | CONFIG_IPV6_VTI=m | ||
112 | CONFIG_IPV6_SIT=m | 112 | CONFIG_IPV6_SIT=m |
113 | CONFIG_IPV6_GRE=m | 113 | CONFIG_IPV6_GRE=m |
114 | CONFIG_IPV6_MULTIPLE_TABLES=y | 114 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -133,7 +133,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
133 | CONFIG_NF_CONNTRACK_TFTP=m | 133 | CONFIG_NF_CONNTRACK_TFTP=m |
134 | CONFIG_NF_CT_NETLINK=m | 134 | CONFIG_NF_CT_NETLINK=m |
135 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 135 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
136 | CONFIG_NETFILTER_TPROXY=m | 136 | CONFIG_NF_TABLES=m |
137 | CONFIG_NFT_EXTHDR=m | ||
138 | CONFIG_NFT_META=m | ||
139 | CONFIG_NFT_CT=m | ||
140 | CONFIG_NFT_RBTREE=m | ||
141 | CONFIG_NFT_HASH=m | ||
142 | CONFIG_NFT_COUNTER=m | ||
143 | CONFIG_NFT_LOG=m | ||
144 | CONFIG_NFT_LIMIT=m | ||
145 | CONFIG_NFT_NAT=m | ||
146 | CONFIG_NFT_COMPAT=m | ||
137 | CONFIG_NETFILTER_XT_SET=m | 147 | CONFIG_NETFILTER_XT_SET=m |
138 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 148 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
139 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 149 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -202,7 +212,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
202 | CONFIG_IP_SET_HASH_IPPORT=m | 212 | CONFIG_IP_SET_HASH_IPPORT=m |
203 | CONFIG_IP_SET_HASH_IPPORTIP=m | 213 | CONFIG_IP_SET_HASH_IPPORTIP=m |
204 | CONFIG_IP_SET_HASH_IPPORTNET=m | 214 | CONFIG_IP_SET_HASH_IPPORTNET=m |
215 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
205 | CONFIG_IP_SET_HASH_NET=m | 216 | CONFIG_IP_SET_HASH_NET=m |
217 | CONFIG_IP_SET_HASH_NETNET=m | ||
206 | CONFIG_IP_SET_HASH_NETPORT=m | 218 | CONFIG_IP_SET_HASH_NETPORT=m |
207 | CONFIG_IP_SET_HASH_NETIFACE=m | 219 | CONFIG_IP_SET_HASH_NETIFACE=m |
208 | CONFIG_IP_SET_LIST_SET=m | 220 | CONFIG_IP_SET_LIST_SET=m |
@@ -225,6 +237,11 @@ CONFIG_IP_VS_FTP=m | |||
225 | CONFIG_IP_VS_PE_SIP=m | 237 | CONFIG_IP_VS_PE_SIP=m |
226 | CONFIG_NF_CONNTRACK_IPV4=m | 238 | CONFIG_NF_CONNTRACK_IPV4=m |
227 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 239 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
240 | CONFIG_NF_TABLES_IPV4=m | ||
241 | CONFIG_NFT_REJECT_IPV4=m | ||
242 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
243 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
244 | CONFIG_NF_TABLES_ARP=m | ||
228 | CONFIG_IP_NF_IPTABLES=m | 245 | CONFIG_IP_NF_IPTABLES=m |
229 | CONFIG_IP_NF_MATCH_AH=m | 246 | CONFIG_IP_NF_MATCH_AH=m |
230 | CONFIG_IP_NF_MATCH_ECN=m | 247 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -247,6 +264,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
247 | CONFIG_IP_NF_ARPFILTER=m | 264 | CONFIG_IP_NF_ARPFILTER=m |
248 | CONFIG_IP_NF_ARP_MANGLE=m | 265 | CONFIG_IP_NF_ARP_MANGLE=m |
249 | CONFIG_NF_CONNTRACK_IPV6=m | 266 | CONFIG_NF_CONNTRACK_IPV6=m |
267 | CONFIG_NF_TABLES_IPV6=m | ||
268 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
269 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
250 | CONFIG_IP6_NF_IPTABLES=m | 270 | CONFIG_IP6_NF_IPTABLES=m |
251 | CONFIG_IP6_NF_MATCH_AH=m | 271 | CONFIG_IP6_NF_MATCH_AH=m |
252 | CONFIG_IP6_NF_MATCH_EUI64=m | 272 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -266,6 +286,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
266 | CONFIG_NF_NAT_IPV6=m | 286 | CONFIG_NF_NAT_IPV6=m |
267 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 287 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
268 | CONFIG_IP6_NF_TARGET_NPT=m | 288 | CONFIG_IP6_NF_TARGET_NPT=m |
289 | CONFIG_NF_TABLES_BRIDGE=m | ||
269 | CONFIG_NET_SCTPPROBE=m | 290 | CONFIG_NET_SCTPPROBE=m |
270 | CONFIG_RDS=m | 291 | CONFIG_RDS=m |
271 | CONFIG_RDS_RDMA=m | 292 | CONFIG_RDS_RDMA=m |
@@ -311,6 +332,7 @@ CONFIG_NET_CLS_RSVP=m | |||
311 | CONFIG_NET_CLS_RSVP6=m | 332 | CONFIG_NET_CLS_RSVP6=m |
312 | CONFIG_NET_CLS_FLOW=m | 333 | CONFIG_NET_CLS_FLOW=m |
313 | CONFIG_NET_CLS_CGROUP=y | 334 | CONFIG_NET_CLS_CGROUP=y |
335 | CONFIG_NET_CLS_BPF=m | ||
314 | CONFIG_NET_CLS_ACT=y | 336 | CONFIG_NET_CLS_ACT=y |
315 | CONFIG_NET_ACT_POLICE=m | 337 | CONFIG_NET_ACT_POLICE=m |
316 | CONFIG_NET_ACT_GACT=m | 338 | CONFIG_NET_ACT_GACT=m |
@@ -378,8 +400,8 @@ CONFIG_BLK_DEV_DM=m | |||
378 | CONFIG_DM_CRYPT=m | 400 | CONFIG_DM_CRYPT=m |
379 | CONFIG_DM_SNAPSHOT=m | 401 | CONFIG_DM_SNAPSHOT=m |
380 | CONFIG_DM_MIRROR=m | 402 | CONFIG_DM_MIRROR=m |
381 | CONFIG_DM_RAID=m | ||
382 | CONFIG_DM_LOG_USERSPACE=m | 403 | CONFIG_DM_LOG_USERSPACE=m |
404 | CONFIG_DM_RAID=m | ||
383 | CONFIG_DM_ZERO=m | 405 | CONFIG_DM_ZERO=m |
384 | CONFIG_DM_MULTIPATH=m | 406 | CONFIG_DM_MULTIPATH=m |
385 | CONFIG_DM_MULTIPATH_QL=m | 407 | CONFIG_DM_MULTIPATH_QL=m |
@@ -431,7 +453,6 @@ CONFIG_TN3270_FS=y | |||
431 | CONFIG_WATCHDOG=y | 453 | CONFIG_WATCHDOG=y |
432 | CONFIG_WATCHDOG_NOWAYOUT=y | 454 | CONFIG_WATCHDOG_NOWAYOUT=y |
433 | CONFIG_SOFT_WATCHDOG=m | 455 | CONFIG_SOFT_WATCHDOG=m |
434 | CONFIG_ZVM_WATCHDOG=m | ||
435 | # CONFIG_HID is not set | 456 | # CONFIG_HID is not set |
436 | # CONFIG_USB_SUPPORT is not set | 457 | # CONFIG_USB_SUPPORT is not set |
437 | CONFIG_INFINIBAND=m | 458 | CONFIG_INFINIBAND=m |
@@ -540,6 +561,7 @@ CONFIG_BLK_DEV_IO_TRACE=y | |||
540 | CONFIG_LKDTM=m | 561 | CONFIG_LKDTM=m |
541 | CONFIG_RBTREE_TEST=m | 562 | CONFIG_RBTREE_TEST=m |
542 | CONFIG_INTERVAL_TREE_TEST=m | 563 | CONFIG_INTERVAL_TREE_TEST=m |
564 | CONFIG_PERCPU_TEST=m | ||
543 | CONFIG_ATOMIC64_SELFTEST=y | 565 | CONFIG_ATOMIC64_SELFTEST=y |
544 | # CONFIG_STRICT_DEVMEM is not set | 566 | # CONFIG_STRICT_DEVMEM is not set |
545 | CONFIG_S390_PTDUMP=y | 567 | CONFIG_S390_PTDUMP=y |
@@ -601,7 +623,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
601 | CONFIG_CRYPTO_GHASH_S390=m | 623 | CONFIG_CRYPTO_GHASH_S390=m |
602 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 624 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
603 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 625 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
604 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
605 | CONFIG_X509_CERTIFICATE_PARSER=m | 626 | CONFIG_X509_CERTIFICATE_PARSER=m |
606 | CONFIG_CRC7=m | 627 | CONFIG_CRC7=m |
607 | CONFIG_CRC8=m | 628 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index 91087b43e8fa..b5ba8fe1cc64 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
@@ -44,6 +44,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
44 | CONFIG_CFQ_GROUP_IOSCHED=y | 44 | CONFIG_CFQ_GROUP_IOSCHED=y |
45 | CONFIG_DEFAULT_DEADLINE=y | 45 | CONFIG_DEFAULT_DEADLINE=y |
46 | CONFIG_MARCH_Z9_109=y | 46 | CONFIG_MARCH_Z9_109=y |
47 | CONFIG_NR_CPUS=256 | ||
47 | CONFIG_HZ_100=y | 48 | CONFIG_HZ_100=y |
48 | CONFIG_MEMORY_HOTPLUG=y | 49 | CONFIG_MEMORY_HOTPLUG=y |
49 | CONFIG_MEMORY_HOTREMOVE=y | 50 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -54,7 +55,6 @@ CONFIG_HOTPLUG_PCI=y | |||
54 | CONFIG_HOTPLUG_PCI_S390=y | 55 | CONFIG_HOTPLUG_PCI_S390=y |
55 | CONFIG_CHSC_SCH=y | 56 | CONFIG_CHSC_SCH=y |
56 | CONFIG_CRASH_DUMP=y | 57 | CONFIG_CRASH_DUMP=y |
57 | CONFIG_ZFCPDUMP=y | ||
58 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 58 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
59 | CONFIG_BINFMT_MISC=m | 59 | CONFIG_BINFMT_MISC=m |
60 | CONFIG_HIBERNATION=y | 60 | CONFIG_HIBERNATION=y |
@@ -97,7 +97,6 @@ CONFIG_TCP_CONG_VENO=m | |||
97 | CONFIG_TCP_CONG_YEAH=m | 97 | CONFIG_TCP_CONG_YEAH=m |
98 | CONFIG_TCP_CONG_ILLINOIS=m | 98 | CONFIG_TCP_CONG_ILLINOIS=m |
99 | CONFIG_IPV6=y | 99 | CONFIG_IPV6=y |
100 | CONFIG_IPV6_PRIVACY=y | ||
101 | CONFIG_IPV6_ROUTER_PREF=y | 100 | CONFIG_IPV6_ROUTER_PREF=y |
102 | CONFIG_INET6_AH=m | 101 | CONFIG_INET6_AH=m |
103 | CONFIG_INET6_ESP=m | 102 | CONFIG_INET6_ESP=m |
@@ -107,6 +106,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
107 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 106 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
108 | CONFIG_INET6_XFRM_MODE_BEET=m | 107 | CONFIG_INET6_XFRM_MODE_BEET=m |
109 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 108 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
109 | CONFIG_IPV6_VTI=m | ||
110 | CONFIG_IPV6_SIT=m | 110 | CONFIG_IPV6_SIT=m |
111 | CONFIG_IPV6_GRE=m | 111 | CONFIG_IPV6_GRE=m |
112 | CONFIG_IPV6_MULTIPLE_TABLES=y | 112 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -131,7 +131,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
131 | CONFIG_NF_CONNTRACK_TFTP=m | 131 | CONFIG_NF_CONNTRACK_TFTP=m |
132 | CONFIG_NF_CT_NETLINK=m | 132 | CONFIG_NF_CT_NETLINK=m |
133 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 133 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
134 | CONFIG_NETFILTER_TPROXY=m | 134 | CONFIG_NF_TABLES=m |
135 | CONFIG_NFT_EXTHDR=m | ||
136 | CONFIG_NFT_META=m | ||
137 | CONFIG_NFT_CT=m | ||
138 | CONFIG_NFT_RBTREE=m | ||
139 | CONFIG_NFT_HASH=m | ||
140 | CONFIG_NFT_COUNTER=m | ||
141 | CONFIG_NFT_LOG=m | ||
142 | CONFIG_NFT_LIMIT=m | ||
143 | CONFIG_NFT_NAT=m | ||
144 | CONFIG_NFT_COMPAT=m | ||
135 | CONFIG_NETFILTER_XT_SET=m | 145 | CONFIG_NETFILTER_XT_SET=m |
136 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 146 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
137 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 147 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -200,7 +210,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
200 | CONFIG_IP_SET_HASH_IPPORT=m | 210 | CONFIG_IP_SET_HASH_IPPORT=m |
201 | CONFIG_IP_SET_HASH_IPPORTIP=m | 211 | CONFIG_IP_SET_HASH_IPPORTIP=m |
202 | CONFIG_IP_SET_HASH_IPPORTNET=m | 212 | CONFIG_IP_SET_HASH_IPPORTNET=m |
213 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
203 | CONFIG_IP_SET_HASH_NET=m | 214 | CONFIG_IP_SET_HASH_NET=m |
215 | CONFIG_IP_SET_HASH_NETNET=m | ||
204 | CONFIG_IP_SET_HASH_NETPORT=m | 216 | CONFIG_IP_SET_HASH_NETPORT=m |
205 | CONFIG_IP_SET_HASH_NETIFACE=m | 217 | CONFIG_IP_SET_HASH_NETIFACE=m |
206 | CONFIG_IP_SET_LIST_SET=m | 218 | CONFIG_IP_SET_LIST_SET=m |
@@ -223,6 +235,11 @@ CONFIG_IP_VS_FTP=m | |||
223 | CONFIG_IP_VS_PE_SIP=m | 235 | CONFIG_IP_VS_PE_SIP=m |
224 | CONFIG_NF_CONNTRACK_IPV4=m | 236 | CONFIG_NF_CONNTRACK_IPV4=m |
225 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 237 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
238 | CONFIG_NF_TABLES_IPV4=m | ||
239 | CONFIG_NFT_REJECT_IPV4=m | ||
240 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
241 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
242 | CONFIG_NF_TABLES_ARP=m | ||
226 | CONFIG_IP_NF_IPTABLES=m | 243 | CONFIG_IP_NF_IPTABLES=m |
227 | CONFIG_IP_NF_MATCH_AH=m | 244 | CONFIG_IP_NF_MATCH_AH=m |
228 | CONFIG_IP_NF_MATCH_ECN=m | 245 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -245,6 +262,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
245 | CONFIG_IP_NF_ARPFILTER=m | 262 | CONFIG_IP_NF_ARPFILTER=m |
246 | CONFIG_IP_NF_ARP_MANGLE=m | 263 | CONFIG_IP_NF_ARP_MANGLE=m |
247 | CONFIG_NF_CONNTRACK_IPV6=m | 264 | CONFIG_NF_CONNTRACK_IPV6=m |
265 | CONFIG_NF_TABLES_IPV6=m | ||
266 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
267 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
248 | CONFIG_IP6_NF_IPTABLES=m | 268 | CONFIG_IP6_NF_IPTABLES=m |
249 | CONFIG_IP6_NF_MATCH_AH=m | 269 | CONFIG_IP6_NF_MATCH_AH=m |
250 | CONFIG_IP6_NF_MATCH_EUI64=m | 270 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -264,6 +284,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
264 | CONFIG_NF_NAT_IPV6=m | 284 | CONFIG_NF_NAT_IPV6=m |
265 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 285 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
266 | CONFIG_IP6_NF_TARGET_NPT=m | 286 | CONFIG_IP6_NF_TARGET_NPT=m |
287 | CONFIG_NF_TABLES_BRIDGE=m | ||
267 | CONFIG_NET_SCTPPROBE=m | 288 | CONFIG_NET_SCTPPROBE=m |
268 | CONFIG_RDS=m | 289 | CONFIG_RDS=m |
269 | CONFIG_RDS_RDMA=m | 290 | CONFIG_RDS_RDMA=m |
@@ -309,6 +330,7 @@ CONFIG_NET_CLS_RSVP=m | |||
309 | CONFIG_NET_CLS_RSVP6=m | 330 | CONFIG_NET_CLS_RSVP6=m |
310 | CONFIG_NET_CLS_FLOW=m | 331 | CONFIG_NET_CLS_FLOW=m |
311 | CONFIG_NET_CLS_CGROUP=y | 332 | CONFIG_NET_CLS_CGROUP=y |
333 | CONFIG_NET_CLS_BPF=m | ||
312 | CONFIG_NET_CLS_ACT=y | 334 | CONFIG_NET_CLS_ACT=y |
313 | CONFIG_NET_ACT_POLICE=m | 335 | CONFIG_NET_ACT_POLICE=m |
314 | CONFIG_NET_ACT_GACT=m | 336 | CONFIG_NET_ACT_GACT=m |
@@ -376,8 +398,8 @@ CONFIG_BLK_DEV_DM=m | |||
376 | CONFIG_DM_CRYPT=m | 398 | CONFIG_DM_CRYPT=m |
377 | CONFIG_DM_SNAPSHOT=m | 399 | CONFIG_DM_SNAPSHOT=m |
378 | CONFIG_DM_MIRROR=m | 400 | CONFIG_DM_MIRROR=m |
379 | CONFIG_DM_RAID=m | ||
380 | CONFIG_DM_LOG_USERSPACE=m | 401 | CONFIG_DM_LOG_USERSPACE=m |
402 | CONFIG_DM_RAID=m | ||
381 | CONFIG_DM_ZERO=m | 403 | CONFIG_DM_ZERO=m |
382 | CONFIG_DM_MULTIPATH=m | 404 | CONFIG_DM_MULTIPATH=m |
383 | CONFIG_DM_MULTIPATH_QL=m | 405 | CONFIG_DM_MULTIPATH_QL=m |
@@ -429,7 +451,6 @@ CONFIG_TN3270_FS=y | |||
429 | CONFIG_WATCHDOG=y | 451 | CONFIG_WATCHDOG=y |
430 | CONFIG_WATCHDOG_NOWAYOUT=y | 452 | CONFIG_WATCHDOG_NOWAYOUT=y |
431 | CONFIG_SOFT_WATCHDOG=m | 453 | CONFIG_SOFT_WATCHDOG=m |
432 | CONFIG_ZVM_WATCHDOG=m | ||
433 | # CONFIG_HID is not set | 454 | # CONFIG_HID is not set |
434 | # CONFIG_USB_SUPPORT is not set | 455 | # CONFIG_USB_SUPPORT is not set |
435 | CONFIG_INFINIBAND=m | 456 | CONFIG_INFINIBAND=m |
@@ -532,6 +553,7 @@ CONFIG_LATENCYTOP=y | |||
532 | CONFIG_BLK_DEV_IO_TRACE=y | 553 | CONFIG_BLK_DEV_IO_TRACE=y |
533 | # CONFIG_KPROBE_EVENT is not set | 554 | # CONFIG_KPROBE_EVENT is not set |
534 | CONFIG_LKDTM=m | 555 | CONFIG_LKDTM=m |
556 | CONFIG_PERCPU_TEST=m | ||
535 | CONFIG_ATOMIC64_SELFTEST=y | 557 | CONFIG_ATOMIC64_SELFTEST=y |
536 | # CONFIG_STRICT_DEVMEM is not set | 558 | # CONFIG_STRICT_DEVMEM is not set |
537 | CONFIG_S390_PTDUMP=y | 559 | CONFIG_S390_PTDUMP=y |
@@ -593,7 +615,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
593 | CONFIG_CRYPTO_GHASH_S390=m | 615 | CONFIG_CRYPTO_GHASH_S390=m |
594 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 616 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
595 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 617 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
596 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
597 | CONFIG_X509_CERTIFICATE_PARSER=m | 618 | CONFIG_X509_CERTIFICATE_PARSER=m |
598 | CONFIG_CRC7=m | 619 | CONFIG_CRC7=m |
599 | CONFIG_CRC8=m | 620 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index d725c4d956e4..cef073ca1f07 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
@@ -19,7 +19,6 @@ CONFIG_HZ_100=y | |||
19 | # CONFIG_CHSC_SCH is not set | 19 | # CONFIG_CHSC_SCH is not set |
20 | # CONFIG_SCM_BUS is not set | 20 | # CONFIG_SCM_BUS is not set |
21 | CONFIG_CRASH_DUMP=y | 21 | CONFIG_CRASH_DUMP=y |
22 | CONFIG_ZFCPDUMP=y | ||
23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 22 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
24 | # CONFIG_SECCOMP is not set | 23 | # CONFIG_SECCOMP is not set |
25 | # CONFIG_IUCV is not set | 24 | # CONFIG_IUCV is not set |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 33f57514f424..4557cb7ffddf 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -40,6 +40,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
40 | CONFIG_IBM_PARTITION=y | 40 | CONFIG_IBM_PARTITION=y |
41 | CONFIG_DEFAULT_DEADLINE=y | 41 | CONFIG_DEFAULT_DEADLINE=y |
42 | CONFIG_MARCH_Z196=y | 42 | CONFIG_MARCH_Z196=y |
43 | CONFIG_NR_CPUS=256 | ||
43 | CONFIG_HZ_100=y | 44 | CONFIG_HZ_100=y |
44 | CONFIG_MEMORY_HOTPLUG=y | 45 | CONFIG_MEMORY_HOTPLUG=y |
45 | CONFIG_MEMORY_HOTREMOVE=y | 46 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -122,22 +123,31 @@ CONFIG_TMPFS=y | |||
122 | CONFIG_TMPFS_POSIX_ACL=y | 123 | CONFIG_TMPFS_POSIX_ACL=y |
123 | CONFIG_HUGETLBFS=y | 124 | CONFIG_HUGETLBFS=y |
124 | # CONFIG_NETWORK_FILESYSTEMS is not set | 125 | # CONFIG_NETWORK_FILESYSTEMS is not set |
126 | CONFIG_UNUSED_SYMBOLS=y | ||
127 | CONFIG_DEBUG_SECTION_MISMATCH=y | ||
125 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | 128 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y |
126 | CONFIG_MAGIC_SYSRQ=y | 129 | CONFIG_MAGIC_SYSRQ=y |
127 | CONFIG_DEBUG_PAGEALLOC=y | 130 | CONFIG_DEBUG_PAGEALLOC=y |
131 | CONFIG_DETECT_HUNG_TASK=y | ||
128 | CONFIG_TIMER_STATS=y | 132 | CONFIG_TIMER_STATS=y |
133 | CONFIG_DEBUG_RT_MUTEXES=y | ||
129 | CONFIG_PROVE_LOCKING=y | 134 | CONFIG_PROVE_LOCKING=y |
130 | CONFIG_LOCK_STAT=y | 135 | CONFIG_LOCK_STAT=y |
131 | CONFIG_DEBUG_LOCKDEP=y | 136 | CONFIG_DEBUG_LOCKDEP=y |
137 | CONFIG_DEBUG_ATOMIC_SLEEP=y | ||
138 | CONFIG_DEBUG_WRITECOUNT=y | ||
132 | CONFIG_DEBUG_LIST=y | 139 | CONFIG_DEBUG_LIST=y |
140 | CONFIG_DEBUG_SG=y | ||
133 | CONFIG_DEBUG_NOTIFIERS=y | 141 | CONFIG_DEBUG_NOTIFIERS=y |
134 | CONFIG_PROVE_RCU=y | 142 | CONFIG_PROVE_RCU=y |
135 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 | 143 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 |
136 | CONFIG_RCU_TRACE=y | 144 | CONFIG_RCU_TRACE=y |
137 | CONFIG_LATENCYTOP=y | 145 | CONFIG_LATENCYTOP=y |
146 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | ||
138 | CONFIG_BLK_DEV_IO_TRACE=y | 147 | CONFIG_BLK_DEV_IO_TRACE=y |
139 | CONFIG_KPROBES_SANITY_TEST=y | 148 | CONFIG_KPROBES_SANITY_TEST=y |
140 | # CONFIG_STRICT_DEVMEM is not set | 149 | # CONFIG_STRICT_DEVMEM is not set |
150 | CONFIG_S390_PTDUMP=y | ||
141 | CONFIG_CRYPTO_CRYPTD=m | 151 | CONFIG_CRYPTO_CRYPTD=m |
142 | CONFIG_CRYPTO_AUTHENC=m | 152 | CONFIG_CRYPTO_AUTHENC=m |
143 | CONFIG_CRYPTO_TEST=m | 153 | CONFIG_CRYPTO_TEST=m |
diff --git a/arch/s390/hypfs/hypfs_vm.c b/arch/s390/hypfs/hypfs_vm.c index 24908ce149f1..32040ace00ea 100644 --- a/arch/s390/hypfs/hypfs_vm.c +++ b/arch/s390/hypfs/hypfs_vm.c | |||
@@ -32,7 +32,7 @@ struct diag2fc_data { | |||
32 | __u32 pcpus; | 32 | __u32 pcpus; |
33 | __u32 lcpus; | 33 | __u32 lcpus; |
34 | __u32 vcpus; | 34 | __u32 vcpus; |
35 | __u32 cpu_min; | 35 | __u32 ocpus; |
36 | __u32 cpu_max; | 36 | __u32 cpu_max; |
37 | __u32 cpu_shares; | 37 | __u32 cpu_shares; |
38 | __u32 cpu_use_samp; | 38 | __u32 cpu_use_samp; |
@@ -142,7 +142,12 @@ static int hpyfs_vm_create_guest(struct dentry *systems_dir, | |||
142 | ATTRIBUTE(cpus_dir, "capped", capped_value); | 142 | ATTRIBUTE(cpus_dir, "capped", capped_value); |
143 | ATTRIBUTE(cpus_dir, "dedicated", dedicated_flag); | 143 | ATTRIBUTE(cpus_dir, "dedicated", dedicated_flag); |
144 | ATTRIBUTE(cpus_dir, "count", data->vcpus); | 144 | ATTRIBUTE(cpus_dir, "count", data->vcpus); |
145 | ATTRIBUTE(cpus_dir, "weight_min", data->cpu_min); | 145 | /* |
146 | * Note: The "weight_min" attribute got the wrong name. | ||
147 | * The value represents the number of non-stopped (operating) | ||
148 | * CPUS. | ||
149 | */ | ||
150 | ATTRIBUTE(cpus_dir, "weight_min", data->ocpus); | ||
146 | ATTRIBUTE(cpus_dir, "weight_max", data->cpu_max); | 151 | ATTRIBUTE(cpus_dir, "weight_max", data->cpu_max); |
147 | ATTRIBUTE(cpus_dir, "weight_cur", data->cpu_shares); | 152 | ATTRIBUTE(cpus_dir, "weight_cur", data->cpu_shares); |
148 | 153 | ||
diff --git a/arch/s390/include/asm/airq.h b/arch/s390/include/asm/airq.h index 4bbb5957ed1b..bd93ff6661b8 100644 --- a/arch/s390/include/asm/airq.h +++ b/arch/s390/include/asm/airq.h | |||
@@ -44,11 +44,21 @@ struct airq_iv { | |||
44 | 44 | ||
45 | struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags); | 45 | struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags); |
46 | void airq_iv_release(struct airq_iv *iv); | 46 | void airq_iv_release(struct airq_iv *iv); |
47 | unsigned long airq_iv_alloc_bit(struct airq_iv *iv); | 47 | unsigned long airq_iv_alloc(struct airq_iv *iv, unsigned long num); |
48 | void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit); | 48 | void airq_iv_free(struct airq_iv *iv, unsigned long bit, unsigned long num); |
49 | unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, | 49 | unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, |
50 | unsigned long end); | 50 | unsigned long end); |
51 | 51 | ||
52 | static inline unsigned long airq_iv_alloc_bit(struct airq_iv *iv) | ||
53 | { | ||
54 | return airq_iv_alloc(iv, 1); | ||
55 | } | ||
56 | |||
57 | static inline void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit) | ||
58 | { | ||
59 | airq_iv_free(iv, bit, 1); | ||
60 | } | ||
61 | |||
52 | static inline unsigned long airq_iv_end(struct airq_iv *iv) | 62 | static inline unsigned long airq_iv_end(struct airq_iv *iv) |
53 | { | 63 | { |
54 | return iv->end; | 64 | return iv->end; |
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 6e6ad0680829..ec5ef891db6b 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h | |||
@@ -13,9 +13,9 @@ | |||
13 | * | 13 | * |
14 | * The bitop functions are defined to work on unsigned longs, so for an | 14 | * The bitop functions are defined to work on unsigned longs, so for an |
15 | * s390x system the bits end up numbered: | 15 | * s390x system the bits end up numbered: |
16 | * |63..............0|127............64|191...........128|255...........196| | 16 | * |63..............0|127............64|191...........128|255...........192| |
17 | * and on s390: | 17 | * and on s390: |
18 | * |31.....0|63....31|95....64|127...96|159..128|191..160|223..192|255..224| | 18 | * |31.....0|63....32|95....64|127...96|159..128|191..160|223..192|255..224| |
19 | * | 19 | * |
20 | * There are a few little-endian macros used mostly for filesystem | 20 | * There are a few little-endian macros used mostly for filesystem |
21 | * bitmaps, these work on similar bit arrays layouts, but | 21 | * bitmaps, these work on similar bit arrays layouts, but |
@@ -30,7 +30,7 @@ | |||
30 | * on an s390x system the bits are numbered: | 30 | * on an s390x system the bits are numbered: |
31 | * |0..............63|64............127|128...........191|192...........255| | 31 | * |0..............63|64............127|128...........191|192...........255| |
32 | * and on s390: | 32 | * and on s390: |
33 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 33 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
34 | * | 34 | * |
35 | * The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit | 35 | * The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit |
36 | * number field needs to be reversed compared to the LSB0 encoded bit | 36 | * number field needs to be reversed compared to the LSB0 encoded bit |
@@ -304,7 +304,7 @@ static inline int test_bit(unsigned long nr, const volatile unsigned long *ptr) | |||
304 | * On an s390x system the bits are numbered: | 304 | * On an s390x system the bits are numbered: |
305 | * |0..............63|64............127|128...........191|192...........255| | 305 | * |0..............63|64............127|128...........191|192...........255| |
306 | * and on s390: | 306 | * and on s390: |
307 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 307 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
308 | */ | 308 | */ |
309 | unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size); | 309 | unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size); |
310 | unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size, | 310 | unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size, |
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h index f201af8be580..a9c2c0686177 100644 --- a/arch/s390/include/asm/ccwdev.h +++ b/arch/s390/include/asm/ccwdev.h | |||
@@ -219,7 +219,9 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *); | |||
219 | #define to_ccwdev(n) container_of(n, struct ccw_device, dev) | 219 | #define to_ccwdev(n) container_of(n, struct ccw_device, dev) |
220 | #define to_ccwdrv(n) container_of(n, struct ccw_driver, driver) | 220 | #define to_ccwdrv(n) container_of(n, struct ccw_driver, driver) |
221 | 221 | ||
222 | extern struct ccw_device *ccw_device_probe_console(void); | 222 | extern struct ccw_device *ccw_device_create_console(struct ccw_driver *); |
223 | extern void ccw_device_destroy_console(struct ccw_device *); | ||
224 | extern int ccw_device_enable_console(struct ccw_device *); | ||
223 | extern void ccw_device_wait_idle(struct ccw_device *); | 225 | extern void ccw_device_wait_idle(struct ccw_device *); |
224 | extern int ccw_device_force_console(struct ccw_device *); | 226 | extern int ccw_device_force_console(struct ccw_device *); |
225 | 227 | ||
diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h index 4f57a4f3909a..740364856355 100644 --- a/arch/s390/include/asm/checksum.h +++ b/arch/s390/include/asm/checksum.h | |||
@@ -44,22 +44,15 @@ csum_partial(const void *buff, int len, __wsum sum) | |||
44 | * here even more important to align src and dst on a 32-bit (or even | 44 | * here even more important to align src and dst on a 32-bit (or even |
45 | * better 64-bit) boundary | 45 | * better 64-bit) boundary |
46 | * | 46 | * |
47 | * Copy from userspace and compute checksum. If we catch an exception | 47 | * Copy from userspace and compute checksum. |
48 | * then zero the rest of the buffer. | ||
49 | */ | 48 | */ |
50 | static inline __wsum | 49 | static inline __wsum |
51 | csum_partial_copy_from_user(const void __user *src, void *dst, | 50 | csum_partial_copy_from_user(const void __user *src, void *dst, |
52 | int len, __wsum sum, | 51 | int len, __wsum sum, |
53 | int *err_ptr) | 52 | int *err_ptr) |
54 | { | 53 | { |
55 | int missing; | 54 | if (unlikely(copy_from_user(dst, src, len))) |
56 | |||
57 | missing = copy_from_user(dst, src, len); | ||
58 | if (missing) { | ||
59 | memset(dst + len - missing, 0, missing); | ||
60 | *err_ptr = -EFAULT; | 55 | *err_ptr = -EFAULT; |
61 | } | ||
62 | |||
63 | return csum_partial(dst, len, sum); | 56 | return csum_partial(dst, len, sum); |
64 | } | 57 | } |
65 | 58 | ||
diff --git a/arch/s390/include/asm/futex.h b/arch/s390/include/asm/futex.h index 51bcaa0fdeef..fda46bd38c99 100644 --- a/arch/s390/include/asm/futex.h +++ b/arch/s390/include/asm/futex.h | |||
@@ -5,7 +5,10 @@ | |||
5 | #include <linux/uaccess.h> | 5 | #include <linux/uaccess.h> |
6 | #include <asm/errno.h> | 6 | #include <asm/errno.h> |
7 | 7 | ||
8 | static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | 8 | int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval); |
9 | int __futex_atomic_op_inuser(int op, u32 __user *uaddr, int oparg, int *old); | ||
10 | |||
11 | static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) | ||
9 | { | 12 | { |
10 | int op = (encoded_op >> 28) & 7; | 13 | int op = (encoded_op >> 28) & 7; |
11 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
@@ -17,7 +20,7 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
17 | oparg = 1 << oparg; | 20 | oparg = 1 << oparg; |
18 | 21 | ||
19 | pagefault_disable(); | 22 | pagefault_disable(); |
20 | ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval); | 23 | ret = __futex_atomic_op_inuser(op, uaddr, oparg, &oldval); |
21 | pagefault_enable(); | 24 | pagefault_enable(); |
22 | 25 | ||
23 | if (!ret) { | 26 | if (!ret) { |
@@ -34,10 +37,4 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
34 | return ret; | 37 | return ret; |
35 | } | 38 | } |
36 | 39 | ||
37 | static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
38 | u32 oldval, u32 newval) | ||
39 | { | ||
40 | return uaccess.futex_atomic_cmpxchg(uval, uaddr, oldval, newval); | ||
41 | } | ||
42 | |||
43 | #endif /* _ASM_S390_FUTEX_H */ | 40 | #endif /* _ASM_S390_FUTEX_H */ |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index eef3dd3fd9a9..9bf95bb30f1a 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -106,7 +106,9 @@ struct kvm_s390_sie_block { | |||
106 | __u64 gbea; /* 0x0180 */ | 106 | __u64 gbea; /* 0x0180 */ |
107 | __u8 reserved188[24]; /* 0x0188 */ | 107 | __u8 reserved188[24]; /* 0x0188 */ |
108 | __u32 fac; /* 0x01a0 */ | 108 | __u32 fac; /* 0x01a0 */ |
109 | __u8 reserved1a4[68]; /* 0x01a4 */ | 109 | __u8 reserved1a4[20]; /* 0x01a4 */ |
110 | __u64 cbrlo; /* 0x01b8 */ | ||
111 | __u8 reserved1c0[40]; /* 0x01c0 */ | ||
110 | __u64 itdba; /* 0x01e8 */ | 112 | __u64 itdba; /* 0x01e8 */ |
111 | __u8 reserved1f0[16]; /* 0x01f0 */ | 113 | __u8 reserved1f0[16]; /* 0x01f0 */ |
112 | } __attribute__((packed)); | 114 | } __attribute__((packed)); |
@@ -155,6 +157,7 @@ struct kvm_vcpu_stat { | |||
155 | u32 instruction_stsi; | 157 | u32 instruction_stsi; |
156 | u32 instruction_stfl; | 158 | u32 instruction_stfl; |
157 | u32 instruction_tprot; | 159 | u32 instruction_tprot; |
160 | u32 instruction_essa; | ||
158 | u32 instruction_sigp_sense; | 161 | u32 instruction_sigp_sense; |
159 | u32 instruction_sigp_sense_running; | 162 | u32 instruction_sigp_sense_running; |
160 | u32 instruction_sigp_external_call; | 163 | u32 instruction_sigp_external_call; |
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index 5d1f950704dc..38149b63dc44 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -48,13 +48,42 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) | |||
48 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 48 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
49 | struct task_struct *tsk) | 49 | struct task_struct *tsk) |
50 | { | 50 | { |
51 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); | 51 | int cpu = smp_processor_id(); |
52 | update_mm(next, tsk); | 52 | |
53 | if (prev == next) | ||
54 | return; | ||
55 | if (atomic_inc_return(&next->context.attach_count) >> 16) { | ||
56 | /* Delay update_mm until all TLB flushes are done. */ | ||
57 | set_tsk_thread_flag(tsk, TIF_TLB_WAIT); | ||
58 | } else { | ||
59 | cpumask_set_cpu(cpu, mm_cpumask(next)); | ||
60 | update_mm(next, tsk); | ||
61 | if (next->context.flush_mm) | ||
62 | /* Flush pending TLBs */ | ||
63 | __tlb_flush_mm(next); | ||
64 | } | ||
53 | atomic_dec(&prev->context.attach_count); | 65 | atomic_dec(&prev->context.attach_count); |
54 | WARN_ON(atomic_read(&prev->context.attach_count) < 0); | 66 | WARN_ON(atomic_read(&prev->context.attach_count) < 0); |
55 | atomic_inc(&next->context.attach_count); | 67 | } |
56 | /* Check for TLBs not flushed yet */ | 68 | |
57 | __tlb_flush_mm_lazy(next); | 69 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch |
70 | static inline void finish_arch_post_lock_switch(void) | ||
71 | { | ||
72 | struct task_struct *tsk = current; | ||
73 | struct mm_struct *mm = tsk->mm; | ||
74 | |||
75 | if (!test_tsk_thread_flag(tsk, TIF_TLB_WAIT)) | ||
76 | return; | ||
77 | preempt_disable(); | ||
78 | clear_tsk_thread_flag(tsk, TIF_TLB_WAIT); | ||
79 | while (atomic_read(&mm->context.attach_count) >> 16) | ||
80 | cpu_relax(); | ||
81 | |||
82 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | ||
83 | update_mm(mm, tsk); | ||
84 | if (mm->context.flush_mm) | ||
85 | __tlb_flush_mm(mm); | ||
86 | preempt_enable(); | ||
58 | } | 87 | } |
59 | 88 | ||
60 | #define enter_lazy_tlb(mm,tsk) do { } while (0) | 89 | #define enter_lazy_tlb(mm,tsk) do { } while (0) |
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h index e1408ddb94f8..884017cbfa9f 100644 --- a/arch/s390/include/asm/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
@@ -22,6 +22,7 @@ unsigned long *page_table_alloc(struct mm_struct *, unsigned long); | |||
22 | void page_table_free(struct mm_struct *, unsigned long *); | 22 | void page_table_free(struct mm_struct *, unsigned long *); |
23 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); | 23 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); |
24 | 24 | ||
25 | void page_table_reset_pgste(struct mm_struct *, unsigned long, unsigned long); | ||
25 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, | 26 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, |
26 | unsigned long key, bool nq); | 27 | unsigned long key, bool nq); |
27 | 28 | ||
@@ -91,11 +92,22 @@ static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) | |||
91 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | 92 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) |
92 | { | 93 | { |
93 | unsigned long *table = crst_table_alloc(mm); | 94 | unsigned long *table = crst_table_alloc(mm); |
94 | if (table) | 95 | |
95 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | 96 | if (!table) |
97 | return NULL; | ||
98 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | ||
99 | if (!pgtable_pmd_page_ctor(virt_to_page(table))) { | ||
100 | crst_table_free(mm, table); | ||
101 | return NULL; | ||
102 | } | ||
96 | return (pmd_t *) table; | 103 | return (pmd_t *) table; |
97 | } | 104 | } |
98 | #define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) | 105 | |
106 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
107 | { | ||
108 | pgtable_pmd_page_dtor(virt_to_page(pmd)); | ||
109 | crst_table_free(mm, (unsigned long *) pmd); | ||
110 | } | ||
99 | 111 | ||
100 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | 112 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) |
101 | { | 113 | { |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 2204400d0bd5..1ab75eaacbd4 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -229,6 +229,7 @@ extern unsigned long MODULES_END; | |||
229 | #define _PAGE_READ 0x010 /* SW pte read bit */ | 229 | #define _PAGE_READ 0x010 /* SW pte read bit */ |
230 | #define _PAGE_WRITE 0x020 /* SW pte write bit */ | 230 | #define _PAGE_WRITE 0x020 /* SW pte write bit */ |
231 | #define _PAGE_SPECIAL 0x040 /* SW associated with special page */ | 231 | #define _PAGE_SPECIAL 0x040 /* SW associated with special page */ |
232 | #define _PAGE_UNUSED 0x080 /* SW bit for pgste usage state */ | ||
232 | #define __HAVE_ARCH_PTE_SPECIAL | 233 | #define __HAVE_ARCH_PTE_SPECIAL |
233 | 234 | ||
234 | /* Set of bits not changed in pte_modify */ | 235 | /* Set of bits not changed in pte_modify */ |
@@ -394,6 +395,12 @@ extern unsigned long MODULES_END; | |||
394 | 395 | ||
395 | #endif /* CONFIG_64BIT */ | 396 | #endif /* CONFIG_64BIT */ |
396 | 397 | ||
398 | /* Guest Page State used for virtualization */ | ||
399 | #define _PGSTE_GPS_ZERO 0x0000000080000000UL | ||
400 | #define _PGSTE_GPS_USAGE_MASK 0x0000000003000000UL | ||
401 | #define _PGSTE_GPS_USAGE_STABLE 0x0000000000000000UL | ||
402 | #define _PGSTE_GPS_USAGE_UNUSED 0x0000000001000000UL | ||
403 | |||
397 | /* | 404 | /* |
398 | * A user page table pointer has the space-switch-event bit, the | 405 | * A user page table pointer has the space-switch-event bit, the |
399 | * private-space-control bit and the storage-alteration-event-control | 406 | * private-space-control bit and the storage-alteration-event-control |
@@ -617,6 +624,14 @@ static inline int pte_none(pte_t pte) | |||
617 | return pte_val(pte) == _PAGE_INVALID; | 624 | return pte_val(pte) == _PAGE_INVALID; |
618 | } | 625 | } |
619 | 626 | ||
627 | static inline int pte_swap(pte_t pte) | ||
628 | { | ||
629 | /* Bit pattern: (pte & 0x603) == 0x402 */ | ||
630 | return (pte_val(pte) & (_PAGE_INVALID | _PAGE_PROTECT | | ||
631 | _PAGE_TYPE | _PAGE_PRESENT)) | ||
632 | == (_PAGE_INVALID | _PAGE_TYPE); | ||
633 | } | ||
634 | |||
620 | static inline int pte_file(pte_t pte) | 635 | static inline int pte_file(pte_t pte) |
621 | { | 636 | { |
622 | /* Bit pattern: (pte & 0x601) == 0x600 */ | 637 | /* Bit pattern: (pte & 0x601) == 0x600 */ |
@@ -821,20 +836,20 @@ unsigned long gmap_translate(unsigned long address, struct gmap *); | |||
821 | unsigned long __gmap_fault(unsigned long address, struct gmap *); | 836 | unsigned long __gmap_fault(unsigned long address, struct gmap *); |
822 | unsigned long gmap_fault(unsigned long address, struct gmap *); | 837 | unsigned long gmap_fault(unsigned long address, struct gmap *); |
823 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *); | 838 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *); |
839 | void __gmap_zap(unsigned long address, struct gmap *); | ||
824 | 840 | ||
825 | void gmap_register_ipte_notifier(struct gmap_notifier *); | 841 | void gmap_register_ipte_notifier(struct gmap_notifier *); |
826 | void gmap_unregister_ipte_notifier(struct gmap_notifier *); | 842 | void gmap_unregister_ipte_notifier(struct gmap_notifier *); |
827 | int gmap_ipte_notify(struct gmap *, unsigned long start, unsigned long len); | 843 | int gmap_ipte_notify(struct gmap *, unsigned long start, unsigned long len); |
828 | void gmap_do_ipte_notify(struct mm_struct *, unsigned long addr, pte_t *); | 844 | void gmap_do_ipte_notify(struct mm_struct *, pte_t *); |
829 | 845 | ||
830 | static inline pgste_t pgste_ipte_notify(struct mm_struct *mm, | 846 | static inline pgste_t pgste_ipte_notify(struct mm_struct *mm, |
831 | unsigned long addr, | ||
832 | pte_t *ptep, pgste_t pgste) | 847 | pte_t *ptep, pgste_t pgste) |
833 | { | 848 | { |
834 | #ifdef CONFIG_PGSTE | 849 | #ifdef CONFIG_PGSTE |
835 | if (pgste_val(pgste) & PGSTE_IN_BIT) { | 850 | if (pgste_val(pgste) & PGSTE_IN_BIT) { |
836 | pgste_val(pgste) &= ~PGSTE_IN_BIT; | 851 | pgste_val(pgste) &= ~PGSTE_IN_BIT; |
837 | gmap_do_ipte_notify(mm, addr, ptep); | 852 | gmap_do_ipte_notify(mm, ptep); |
838 | } | 853 | } |
839 | #endif | 854 | #endif |
840 | return pgste; | 855 | return pgste; |
@@ -852,6 +867,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
852 | 867 | ||
853 | if (mm_has_pgste(mm)) { | 868 | if (mm_has_pgste(mm)) { |
854 | pgste = pgste_get_lock(ptep); | 869 | pgste = pgste_get_lock(ptep); |
870 | pgste_val(pgste) &= ~_PGSTE_GPS_ZERO; | ||
855 | pgste_set_key(ptep, pgste, entry); | 871 | pgste_set_key(ptep, pgste, entry); |
856 | pgste_set_pte(ptep, entry); | 872 | pgste_set_pte(ptep, entry); |
857 | pgste_set_unlock(ptep, pgste); | 873 | pgste_set_unlock(ptep, pgste); |
@@ -881,6 +897,12 @@ static inline int pte_young(pte_t pte) | |||
881 | return (pte_val(pte) & _PAGE_YOUNG) != 0; | 897 | return (pte_val(pte) & _PAGE_YOUNG) != 0; |
882 | } | 898 | } |
883 | 899 | ||
900 | #define __HAVE_ARCH_PTE_UNUSED | ||
901 | static inline int pte_unused(pte_t pte) | ||
902 | { | ||
903 | return pte_val(pte) & _PAGE_UNUSED; | ||
904 | } | ||
905 | |||
884 | /* | 906 | /* |
885 | * pgd/pmd/pte modification functions | 907 | * pgd/pmd/pte modification functions |
886 | */ | 908 | */ |
@@ -1034,30 +1056,41 @@ static inline int ptep_test_and_clear_user_young(struct mm_struct *mm, | |||
1034 | 1056 | ||
1035 | static inline void __ptep_ipte(unsigned long address, pte_t *ptep) | 1057 | static inline void __ptep_ipte(unsigned long address, pte_t *ptep) |
1036 | { | 1058 | { |
1037 | if (!(pte_val(*ptep) & _PAGE_INVALID)) { | 1059 | unsigned long pto = (unsigned long) ptep; |
1060 | |||
1038 | #ifndef CONFIG_64BIT | 1061 | #ifndef CONFIG_64BIT |
1039 | /* pto must point to the start of the segment table */ | 1062 | /* pto in ESA mode must point to the start of the segment table */ |
1040 | pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00); | 1063 | pto &= 0x7ffffc00; |
1041 | #else | ||
1042 | /* ipte in zarch mode can do the math */ | ||
1043 | pte_t *pto = ptep; | ||
1044 | #endif | 1064 | #endif |
1045 | asm volatile( | 1065 | /* Invalidation + global TLB flush for the pte */ |
1046 | " ipte %2,%3" | 1066 | asm volatile( |
1047 | : "=m" (*ptep) : "m" (*ptep), | 1067 | " ipte %2,%3" |
1048 | "a" (pto), "a" (address)); | 1068 | : "=m" (*ptep) : "m" (*ptep), "a" (pto), "a" (address)); |
1049 | } | 1069 | } |
1070 | |||
1071 | static inline void ptep_flush_direct(struct mm_struct *mm, | ||
1072 | unsigned long address, pte_t *ptep) | ||
1073 | { | ||
1074 | if (pte_val(*ptep) & _PAGE_INVALID) | ||
1075 | return; | ||
1076 | __ptep_ipte(address, ptep); | ||
1050 | } | 1077 | } |
1051 | 1078 | ||
1052 | static inline void ptep_flush_lazy(struct mm_struct *mm, | 1079 | static inline void ptep_flush_lazy(struct mm_struct *mm, |
1053 | unsigned long address, pte_t *ptep) | 1080 | unsigned long address, pte_t *ptep) |
1054 | { | 1081 | { |
1055 | int active = (mm == current->active_mm) ? 1 : 0; | 1082 | int active, count; |
1056 | 1083 | ||
1057 | if (atomic_read(&mm->context.attach_count) > active) | 1084 | if (pte_val(*ptep) & _PAGE_INVALID) |
1058 | __ptep_ipte(address, ptep); | 1085 | return; |
1059 | else | 1086 | active = (mm == current->active_mm) ? 1 : 0; |
1087 | count = atomic_add_return(0x10000, &mm->context.attach_count); | ||
1088 | if ((count & 0xffff) <= active) { | ||
1089 | pte_val(*ptep) |= _PAGE_INVALID; | ||
1060 | mm->context.flush_mm = 1; | 1090 | mm->context.flush_mm = 1; |
1091 | } else | ||
1092 | __ptep_ipte(address, ptep); | ||
1093 | atomic_sub(0x10000, &mm->context.attach_count); | ||
1061 | } | 1094 | } |
1062 | 1095 | ||
1063 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 1096 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
@@ -1070,11 +1103,11 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
1070 | 1103 | ||
1071 | if (mm_has_pgste(vma->vm_mm)) { | 1104 | if (mm_has_pgste(vma->vm_mm)) { |
1072 | pgste = pgste_get_lock(ptep); | 1105 | pgste = pgste_get_lock(ptep); |
1073 | pgste = pgste_ipte_notify(vma->vm_mm, addr, ptep, pgste); | 1106 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1074 | } | 1107 | } |
1075 | 1108 | ||
1076 | pte = *ptep; | 1109 | pte = *ptep; |
1077 | __ptep_ipte(addr, ptep); | 1110 | ptep_flush_direct(vma->vm_mm, addr, ptep); |
1078 | young = pte_young(pte); | 1111 | young = pte_young(pte); |
1079 | pte = pte_mkold(pte); | 1112 | pte = pte_mkold(pte); |
1080 | 1113 | ||
@@ -1116,7 +1149,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, | |||
1116 | 1149 | ||
1117 | if (mm_has_pgste(mm)) { | 1150 | if (mm_has_pgste(mm)) { |
1118 | pgste = pgste_get_lock(ptep); | 1151 | pgste = pgste_get_lock(ptep); |
1119 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1152 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1120 | } | 1153 | } |
1121 | 1154 | ||
1122 | pte = *ptep; | 1155 | pte = *ptep; |
@@ -1140,12 +1173,11 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm, | |||
1140 | 1173 | ||
1141 | if (mm_has_pgste(mm)) { | 1174 | if (mm_has_pgste(mm)) { |
1142 | pgste = pgste_get_lock(ptep); | 1175 | pgste = pgste_get_lock(ptep); |
1143 | pgste_ipte_notify(mm, address, ptep, pgste); | 1176 | pgste_ipte_notify(mm, ptep, pgste); |
1144 | } | 1177 | } |
1145 | 1178 | ||
1146 | pte = *ptep; | 1179 | pte = *ptep; |
1147 | ptep_flush_lazy(mm, address, ptep); | 1180 | ptep_flush_lazy(mm, address, ptep); |
1148 | pte_val(*ptep) |= _PAGE_INVALID; | ||
1149 | 1181 | ||
1150 | if (mm_has_pgste(mm)) { | 1182 | if (mm_has_pgste(mm)) { |
1151 | pgste = pgste_update_all(&pte, pgste); | 1183 | pgste = pgste_update_all(&pte, pgste); |
@@ -1178,14 +1210,17 @@ static inline pte_t ptep_clear_flush(struct vm_area_struct *vma, | |||
1178 | 1210 | ||
1179 | if (mm_has_pgste(vma->vm_mm)) { | 1211 | if (mm_has_pgste(vma->vm_mm)) { |
1180 | pgste = pgste_get_lock(ptep); | 1212 | pgste = pgste_get_lock(ptep); |
1181 | pgste = pgste_ipte_notify(vma->vm_mm, address, ptep, pgste); | 1213 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1182 | } | 1214 | } |
1183 | 1215 | ||
1184 | pte = *ptep; | 1216 | pte = *ptep; |
1185 | __ptep_ipte(address, ptep); | 1217 | ptep_flush_direct(vma->vm_mm, address, ptep); |
1186 | pte_val(*ptep) = _PAGE_INVALID; | 1218 | pte_val(*ptep) = _PAGE_INVALID; |
1187 | 1219 | ||
1188 | if (mm_has_pgste(vma->vm_mm)) { | 1220 | if (mm_has_pgste(vma->vm_mm)) { |
1221 | if ((pgste_val(pgste) & _PGSTE_GPS_USAGE_MASK) == | ||
1222 | _PGSTE_GPS_USAGE_UNUSED) | ||
1223 | pte_val(pte) |= _PAGE_UNUSED; | ||
1189 | pgste = pgste_update_all(&pte, pgste); | 1224 | pgste = pgste_update_all(&pte, pgste); |
1190 | pgste_set_unlock(ptep, pgste); | 1225 | pgste_set_unlock(ptep, pgste); |
1191 | } | 1226 | } |
@@ -1209,7 +1244,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, | |||
1209 | 1244 | ||
1210 | if (!full && mm_has_pgste(mm)) { | 1245 | if (!full && mm_has_pgste(mm)) { |
1211 | pgste = pgste_get_lock(ptep); | 1246 | pgste = pgste_get_lock(ptep); |
1212 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1247 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1213 | } | 1248 | } |
1214 | 1249 | ||
1215 | pte = *ptep; | 1250 | pte = *ptep; |
@@ -1234,7 +1269,7 @@ static inline pte_t ptep_set_wrprotect(struct mm_struct *mm, | |||
1234 | if (pte_write(pte)) { | 1269 | if (pte_write(pte)) { |
1235 | if (mm_has_pgste(mm)) { | 1270 | if (mm_has_pgste(mm)) { |
1236 | pgste = pgste_get_lock(ptep); | 1271 | pgste = pgste_get_lock(ptep); |
1237 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1272 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1238 | } | 1273 | } |
1239 | 1274 | ||
1240 | ptep_flush_lazy(mm, address, ptep); | 1275 | ptep_flush_lazy(mm, address, ptep); |
@@ -1260,10 +1295,10 @@ static inline int ptep_set_access_flags(struct vm_area_struct *vma, | |||
1260 | return 0; | 1295 | return 0; |
1261 | if (mm_has_pgste(vma->vm_mm)) { | 1296 | if (mm_has_pgste(vma->vm_mm)) { |
1262 | pgste = pgste_get_lock(ptep); | 1297 | pgste = pgste_get_lock(ptep); |
1263 | pgste = pgste_ipte_notify(vma->vm_mm, address, ptep, pgste); | 1298 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1264 | } | 1299 | } |
1265 | 1300 | ||
1266 | __ptep_ipte(address, ptep); | 1301 | ptep_flush_direct(vma->vm_mm, address, ptep); |
1267 | 1302 | ||
1268 | if (mm_has_pgste(vma->vm_mm)) { | 1303 | if (mm_has_pgste(vma->vm_mm)) { |
1269 | pgste_set_pte(ptep, entry); | 1304 | pgste_set_pte(ptep, entry); |
@@ -1447,12 +1482,16 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd) | |||
1447 | static inline void pmdp_flush_lazy(struct mm_struct *mm, | 1482 | static inline void pmdp_flush_lazy(struct mm_struct *mm, |
1448 | unsigned long address, pmd_t *pmdp) | 1483 | unsigned long address, pmd_t *pmdp) |
1449 | { | 1484 | { |
1450 | int active = (mm == current->active_mm) ? 1 : 0; | 1485 | int active, count; |
1451 | 1486 | ||
1452 | if ((atomic_read(&mm->context.attach_count) & 0xffff) > active) | 1487 | active = (mm == current->active_mm) ? 1 : 0; |
1453 | __pmd_idte(address, pmdp); | 1488 | count = atomic_add_return(0x10000, &mm->context.attach_count); |
1454 | else | 1489 | if ((count & 0xffff) <= active) { |
1490 | pmd_val(*pmdp) |= _SEGMENT_ENTRY_INVALID; | ||
1455 | mm->context.flush_mm = 1; | 1491 | mm->context.flush_mm = 1; |
1492 | } else | ||
1493 | __pmd_idte(address, pmdp); | ||
1494 | atomic_sub(0x10000, &mm->context.attach_count); | ||
1456 | } | 1495 | } |
1457 | 1496 | ||
1458 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 1497 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index 9c82cebddabd..f4783c0b7b43 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -83,6 +83,7 @@ struct per_struct_kernel { | |||
83 | * These are defined as per linux/ptrace.h, which see. | 83 | * These are defined as per linux/ptrace.h, which see. |
84 | */ | 84 | */ |
85 | #define arch_has_single_step() (1) | 85 | #define arch_has_single_step() (1) |
86 | #define arch_has_block_step() (1) | ||
86 | 87 | ||
87 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 88 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
88 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 89 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index abaca2275c7a..2f5e9932b4de 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -46,6 +46,7 @@ int sclp_cpu_configure(u8 cpu); | |||
46 | int sclp_cpu_deconfigure(u8 cpu); | 46 | int sclp_cpu_deconfigure(u8 cpu); |
47 | unsigned long long sclp_get_rnmax(void); | 47 | unsigned long long sclp_get_rnmax(void); |
48 | unsigned long long sclp_get_rzm(void); | 48 | unsigned long long sclp_get_rzm(void); |
49 | unsigned int sclp_get_max_cpu(void); | ||
49 | int sclp_sdias_blk_count(void); | 50 | int sclp_sdias_blk_count(void); |
50 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | 51 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
51 | int sclp_chp_configure(struct chp_id chpid); | 52 | int sclp_chp_configure(struct chp_id chpid); |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 94cfbe442f12..406f3a1e63ef 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -59,7 +59,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
59 | #define MACHINE_FLAG_DIAG44 (1UL << 4) | 59 | #define MACHINE_FLAG_DIAG44 (1UL << 4) |
60 | #define MACHINE_FLAG_IDTE (1UL << 5) | 60 | #define MACHINE_FLAG_IDTE (1UL << 5) |
61 | #define MACHINE_FLAG_DIAG9C (1UL << 6) | 61 | #define MACHINE_FLAG_DIAG9C (1UL << 6) |
62 | #define MACHINE_FLAG_MVCOS (1UL << 7) | ||
63 | #define MACHINE_FLAG_KVM (1UL << 8) | 62 | #define MACHINE_FLAG_KVM (1UL << 8) |
64 | #define MACHINE_FLAG_ESOP (1UL << 9) | 63 | #define MACHINE_FLAG_ESOP (1UL << 9) |
65 | #define MACHINE_FLAG_EDAT1 (1UL << 10) | 64 | #define MACHINE_FLAG_EDAT1 (1UL << 10) |
@@ -85,7 +84,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
85 | #define MACHINE_HAS_IDTE (0) | 84 | #define MACHINE_HAS_IDTE (0) |
86 | #define MACHINE_HAS_DIAG44 (1) | 85 | #define MACHINE_HAS_DIAG44 (1) |
87 | #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) | 86 | #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) |
88 | #define MACHINE_HAS_MVCOS (0) | ||
89 | #define MACHINE_HAS_EDAT1 (0) | 87 | #define MACHINE_HAS_EDAT1 (0) |
90 | #define MACHINE_HAS_EDAT2 (0) | 88 | #define MACHINE_HAS_EDAT2 (0) |
91 | #define MACHINE_HAS_LPP (0) | 89 | #define MACHINE_HAS_LPP (0) |
@@ -98,7 +96,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
98 | #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) | 96 | #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) |
99 | #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) | 97 | #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) |
100 | #define MACHINE_HAS_MVPG (1) | 98 | #define MACHINE_HAS_MVPG (1) |
101 | #define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS) | ||
102 | #define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1) | 99 | #define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1) |
103 | #define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2) | 100 | #define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2) |
104 | #define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP) | 101 | #define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP) |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 10e0fcd3633d..3ccd71b90345 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -81,6 +81,7 @@ static inline struct thread_info *current_thread_info(void) | |||
81 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | 81 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ |
82 | #define TIF_SIGPENDING 2 /* signal pending */ | 82 | #define TIF_SIGPENDING 2 /* signal pending */ |
83 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 83 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
84 | #define TIF_TLB_WAIT 4 /* wait for TLB flush completion */ | ||
84 | #define TIF_PER_TRAP 6 /* deliver sigtrap on return to user */ | 85 | #define TIF_PER_TRAP 6 /* deliver sigtrap on return to user */ |
85 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ | 86 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ |
86 | #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ | 87 | #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ |
@@ -91,11 +92,13 @@ static inline struct thread_info *current_thread_info(void) | |||
91 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 92 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
92 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ | 93 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
93 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ | 94 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ |
95 | #define TIF_BLOCK_STEP 21 /* This task is block stepped */ | ||
94 | 96 | ||
95 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) | 97 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) |
96 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 98 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
97 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 99 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
98 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 100 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
101 | #define _TIF_TLB_WAIT (1<<TIF_TLB_WAIT) | ||
99 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) | 102 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) |
100 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) | 103 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) |
101 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 79330af9a5f8..4133b3f72fb0 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
@@ -92,33 +92,58 @@ static inline unsigned long extable_fixup(const struct exception_table_entry *x) | |||
92 | #define ARCH_HAS_SORT_EXTABLE | 92 | #define ARCH_HAS_SORT_EXTABLE |
93 | #define ARCH_HAS_SEARCH_EXTABLE | 93 | #define ARCH_HAS_SEARCH_EXTABLE |
94 | 94 | ||
95 | struct uaccess_ops { | 95 | int __handle_fault(unsigned long, unsigned long, int); |
96 | size_t (*copy_from_user)(size_t, const void __user *, void *); | ||
97 | size_t (*copy_to_user)(size_t, void __user *, const void *); | ||
98 | size_t (*copy_in_user)(size_t, void __user *, const void __user *); | ||
99 | size_t (*clear_user)(size_t, void __user *); | ||
100 | size_t (*strnlen_user)(size_t, const char __user *); | ||
101 | size_t (*strncpy_from_user)(size_t, const char __user *, char *); | ||
102 | int (*futex_atomic_op)(int op, u32 __user *, int oparg, int *old); | ||
103 | int (*futex_atomic_cmpxchg)(u32 *, u32 __user *, u32 old, u32 new); | ||
104 | }; | ||
105 | 96 | ||
106 | extern struct uaccess_ops uaccess; | 97 | /** |
107 | extern struct uaccess_ops uaccess_mvcos; | 98 | * __copy_from_user: - Copy a block of data from user space, with less checking. |
108 | extern struct uaccess_ops uaccess_pt; | 99 | * @to: Destination address, in kernel space. |
100 | * @from: Source address, in user space. | ||
101 | * @n: Number of bytes to copy. | ||
102 | * | ||
103 | * Context: User context only. This function may sleep. | ||
104 | * | ||
105 | * Copy data from user space to kernel space. Caller must check | ||
106 | * the specified block with access_ok() before calling this function. | ||
107 | * | ||
108 | * Returns number of bytes that could not be copied. | ||
109 | * On success, this will be zero. | ||
110 | * | ||
111 | * If some data could not be copied, this function will pad the copied | ||
112 | * data to the requested size using zero bytes. | ||
113 | */ | ||
114 | unsigned long __must_check __copy_from_user(void *to, const void __user *from, | ||
115 | unsigned long n); | ||
116 | |||
117 | /** | ||
118 | * __copy_to_user: - Copy a block of data into user space, with less checking. | ||
119 | * @to: Destination address, in user space. | ||
120 | * @from: Source address, in kernel space. | ||
121 | * @n: Number of bytes to copy. | ||
122 | * | ||
123 | * Context: User context only. This function may sleep. | ||
124 | * | ||
125 | * Copy data from kernel space to user space. Caller must check | ||
126 | * the specified block with access_ok() before calling this function. | ||
127 | * | ||
128 | * Returns number of bytes that could not be copied. | ||
129 | * On success, this will be zero. | ||
130 | */ | ||
131 | unsigned long __must_check __copy_to_user(void __user *to, const void *from, | ||
132 | unsigned long n); | ||
109 | 133 | ||
110 | extern int __handle_fault(unsigned long, unsigned long, int); | 134 | #define __copy_to_user_inatomic __copy_to_user |
135 | #define __copy_from_user_inatomic __copy_from_user | ||
111 | 136 | ||
112 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) | 137 | static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size) |
113 | { | 138 | { |
114 | size = uaccess.copy_to_user(size, ptr, x); | 139 | size = __copy_to_user(ptr, x, size); |
115 | return size ? -EFAULT : size; | 140 | return size ? -EFAULT : 0; |
116 | } | 141 | } |
117 | 142 | ||
118 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | 143 | static inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size) |
119 | { | 144 | { |
120 | size = uaccess.copy_from_user(size, ptr, x); | 145 | size = __copy_from_user(x, ptr, size); |
121 | return size ? -EFAULT : size; | 146 | return size ? -EFAULT : 0; |
122 | } | 147 | } |
123 | 148 | ||
124 | /* | 149 | /* |
@@ -135,8 +160,8 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
135 | case 2: \ | 160 | case 2: \ |
136 | case 4: \ | 161 | case 4: \ |
137 | case 8: \ | 162 | case 8: \ |
138 | __pu_err = __put_user_fn(sizeof (*(ptr)), \ | 163 | __pu_err = __put_user_fn(&__x, ptr, \ |
139 | ptr, &__x); \ | 164 | sizeof(*(ptr))); \ |
140 | break; \ | 165 | break; \ |
141 | default: \ | 166 | default: \ |
142 | __put_user_bad(); \ | 167 | __put_user_bad(); \ |
@@ -152,7 +177,7 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
152 | }) | 177 | }) |
153 | 178 | ||
154 | 179 | ||
155 | extern int __put_user_bad(void) __attribute__((noreturn)); | 180 | int __put_user_bad(void) __attribute__((noreturn)); |
156 | 181 | ||
157 | #define __get_user(x, ptr) \ | 182 | #define __get_user(x, ptr) \ |
158 | ({ \ | 183 | ({ \ |
@@ -161,29 +186,29 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
161 | switch (sizeof(*(ptr))) { \ | 186 | switch (sizeof(*(ptr))) { \ |
162 | case 1: { \ | 187 | case 1: { \ |
163 | unsigned char __x; \ | 188 | unsigned char __x; \ |
164 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 189 | __gu_err = __get_user_fn(&__x, ptr, \ |
165 | ptr, &__x); \ | 190 | sizeof(*(ptr))); \ |
166 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 191 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
167 | break; \ | 192 | break; \ |
168 | }; \ | 193 | }; \ |
169 | case 2: { \ | 194 | case 2: { \ |
170 | unsigned short __x; \ | 195 | unsigned short __x; \ |
171 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 196 | __gu_err = __get_user_fn(&__x, ptr, \ |
172 | ptr, &__x); \ | 197 | sizeof(*(ptr))); \ |
173 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 198 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
174 | break; \ | 199 | break; \ |
175 | }; \ | 200 | }; \ |
176 | case 4: { \ | 201 | case 4: { \ |
177 | unsigned int __x; \ | 202 | unsigned int __x; \ |
178 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 203 | __gu_err = __get_user_fn(&__x, ptr, \ |
179 | ptr, &__x); \ | 204 | sizeof(*(ptr))); \ |
180 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 205 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
181 | break; \ | 206 | break; \ |
182 | }; \ | 207 | }; \ |
183 | case 8: { \ | 208 | case 8: { \ |
184 | unsigned long long __x; \ | 209 | unsigned long long __x; \ |
185 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 210 | __gu_err = __get_user_fn(&__x, ptr, \ |
186 | ptr, &__x); \ | 211 | sizeof(*(ptr))); \ |
187 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 212 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
188 | break; \ | 213 | break; \ |
189 | }; \ | 214 | }; \ |
@@ -200,35 +225,12 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
200 | __get_user(x, ptr); \ | 225 | __get_user(x, ptr); \ |
201 | }) | 226 | }) |
202 | 227 | ||
203 | extern int __get_user_bad(void) __attribute__((noreturn)); | 228 | int __get_user_bad(void) __attribute__((noreturn)); |
204 | 229 | ||
205 | #define __put_user_unaligned __put_user | 230 | #define __put_user_unaligned __put_user |
206 | #define __get_user_unaligned __get_user | 231 | #define __get_user_unaligned __get_user |
207 | 232 | ||
208 | /** | 233 | /** |
209 | * __copy_to_user: - Copy a block of data into user space, with less checking. | ||
210 | * @to: Destination address, in user space. | ||
211 | * @from: Source address, in kernel space. | ||
212 | * @n: Number of bytes to copy. | ||
213 | * | ||
214 | * Context: User context only. This function may sleep. | ||
215 | * | ||
216 | * Copy data from kernel space to user space. Caller must check | ||
217 | * the specified block with access_ok() before calling this function. | ||
218 | * | ||
219 | * Returns number of bytes that could not be copied. | ||
220 | * On success, this will be zero. | ||
221 | */ | ||
222 | static inline unsigned long __must_check | ||
223 | __copy_to_user(void __user *to, const void *from, unsigned long n) | ||
224 | { | ||
225 | return uaccess.copy_to_user(n, to, from); | ||
226 | } | ||
227 | |||
228 | #define __copy_to_user_inatomic __copy_to_user | ||
229 | #define __copy_from_user_inatomic __copy_from_user | ||
230 | |||
231 | /** | ||
232 | * copy_to_user: - Copy a block of data into user space. | 234 | * copy_to_user: - Copy a block of data into user space. |
233 | * @to: Destination address, in user space. | 235 | * @to: Destination address, in user space. |
234 | * @from: Source address, in kernel space. | 236 | * @from: Source address, in kernel space. |
@@ -248,30 +250,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) | |||
248 | return __copy_to_user(to, from, n); | 250 | return __copy_to_user(to, from, n); |
249 | } | 251 | } |
250 | 252 | ||
251 | /** | 253 | void copy_from_user_overflow(void) |
252 | * __copy_from_user: - Copy a block of data from user space, with less checking. | ||
253 | * @to: Destination address, in kernel space. | ||
254 | * @from: Source address, in user space. | ||
255 | * @n: Number of bytes to copy. | ||
256 | * | ||
257 | * Context: User context only. This function may sleep. | ||
258 | * | ||
259 | * Copy data from user space to kernel space. Caller must check | ||
260 | * the specified block with access_ok() before calling this function. | ||
261 | * | ||
262 | * Returns number of bytes that could not be copied. | ||
263 | * On success, this will be zero. | ||
264 | * | ||
265 | * If some data could not be copied, this function will pad the copied | ||
266 | * data to the requested size using zero bytes. | ||
267 | */ | ||
268 | static inline unsigned long __must_check | ||
269 | __copy_from_user(void *to, const void __user *from, unsigned long n) | ||
270 | { | ||
271 | return uaccess.copy_from_user(n, from, to); | ||
272 | } | ||
273 | |||
274 | extern void copy_from_user_overflow(void) | ||
275 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS | 254 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS |
276 | __compiletime_warning("copy_from_user() buffer size is not provably correct") | 255 | __compiletime_warning("copy_from_user() buffer size is not provably correct") |
277 | #endif | 256 | #endif |
@@ -306,11 +285,8 @@ copy_from_user(void *to, const void __user *from, unsigned long n) | |||
306 | return __copy_from_user(to, from, n); | 285 | return __copy_from_user(to, from, n); |
307 | } | 286 | } |
308 | 287 | ||
309 | static inline unsigned long __must_check | 288 | unsigned long __must_check |
310 | __copy_in_user(void __user *to, const void __user *from, unsigned long n) | 289 | __copy_in_user(void __user *to, const void __user *from, unsigned long n); |
311 | { | ||
312 | return uaccess.copy_in_user(n, to, from); | ||
313 | } | ||
314 | 290 | ||
315 | static inline unsigned long __must_check | 291 | static inline unsigned long __must_check |
316 | copy_in_user(void __user *to, const void __user *from, unsigned long n) | 292 | copy_in_user(void __user *to, const void __user *from, unsigned long n) |
@@ -322,18 +298,22 @@ copy_in_user(void __user *to, const void __user *from, unsigned long n) | |||
322 | /* | 298 | /* |
323 | * Copy a null terminated string from userspace. | 299 | * Copy a null terminated string from userspace. |
324 | */ | 300 | */ |
301 | |||
302 | long __strncpy_from_user(char *dst, const char __user *src, long count); | ||
303 | |||
325 | static inline long __must_check | 304 | static inline long __must_check |
326 | strncpy_from_user(char *dst, const char __user *src, long count) | 305 | strncpy_from_user(char *dst, const char __user *src, long count) |
327 | { | 306 | { |
328 | might_fault(); | 307 | might_fault(); |
329 | return uaccess.strncpy_from_user(count, src, dst); | 308 | return __strncpy_from_user(dst, src, count); |
330 | } | 309 | } |
331 | 310 | ||
332 | static inline unsigned long | 311 | unsigned long __must_check __strnlen_user(const char __user *src, unsigned long count); |
333 | strnlen_user(const char __user * src, unsigned long n) | 312 | |
313 | static inline unsigned long strnlen_user(const char __user *src, unsigned long n) | ||
334 | { | 314 | { |
335 | might_fault(); | 315 | might_fault(); |
336 | return uaccess.strnlen_user(n, src); | 316 | return __strnlen_user(src, n); |
337 | } | 317 | } |
338 | 318 | ||
339 | /** | 319 | /** |
@@ -355,21 +335,14 @@ strnlen_user(const char __user * src, unsigned long n) | |||
355 | /* | 335 | /* |
356 | * Zero Userspace | 336 | * Zero Userspace |
357 | */ | 337 | */ |
338 | unsigned long __must_check __clear_user(void __user *to, unsigned long size); | ||
358 | 339 | ||
359 | static inline unsigned long __must_check | 340 | static inline unsigned long __must_check clear_user(void __user *to, unsigned long n) |
360 | __clear_user(void __user *to, unsigned long n) | ||
361 | { | ||
362 | return uaccess.clear_user(n, to); | ||
363 | } | ||
364 | |||
365 | static inline unsigned long __must_check | ||
366 | clear_user(void __user *to, unsigned long n) | ||
367 | { | 341 | { |
368 | might_fault(); | 342 | might_fault(); |
369 | return uaccess.clear_user(n, to); | 343 | return __clear_user(to, n); |
370 | } | 344 | } |
371 | 345 | ||
372 | extern int copy_to_user_real(void __user *dest, void *src, size_t count); | 346 | int copy_to_user_real(void __user *dest, void *src, unsigned long count); |
373 | extern int copy_from_user_real(void *dest, void __user *src, size_t count); | ||
374 | 347 | ||
375 | #endif /* __S390_UACCESS_H */ | 348 | #endif /* __S390_UACCESS_H */ |
diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h index 7e0b498a2c2b..a150f4fabe43 100644 --- a/arch/s390/include/uapi/asm/ptrace.h +++ b/arch/s390/include/uapi/asm/ptrace.h | |||
@@ -403,6 +403,12 @@ typedef struct | |||
403 | #define PTRACE_TE_ABORT_RAND 0x5011 | 403 | #define PTRACE_TE_ABORT_RAND 0x5011 |
404 | 404 | ||
405 | /* | 405 | /* |
406 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
407 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
408 | */ | ||
409 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
410 | |||
411 | /* | ||
406 | * PT_PROT definition is loosely based on hppa bsd definition in | 412 | * PT_PROT definition is loosely based on hppa bsd definition in |
407 | * gdb/hppab-nat.c | 413 | * gdb/hppab-nat.c |
408 | */ | 414 | */ |
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 1b3ac09c11b6..a95c4ca99617 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -47,9 +47,8 @@ obj-$(CONFIG_SCHED_BOOK) += topology.o | |||
47 | obj-$(CONFIG_HIBERNATION) += suspend.o swsusp_asm64.o | 47 | obj-$(CONFIG_HIBERNATION) += suspend.o swsusp_asm64.o |
48 | obj-$(CONFIG_AUDIT) += audit.o | 48 | obj-$(CONFIG_AUDIT) += audit.o |
49 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o | 49 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o |
50 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ | 50 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o |
51 | compat_wrapper.o compat_exec_domain.o \ | 51 | obj-$(CONFIG_COMPAT) += compat_wrapper.o $(compat-obj-y) |
52 | $(compat-obj-y) | ||
53 | 52 | ||
54 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 53 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
55 | obj-$(CONFIG_KPROBES) += kprobes.o | 54 | obj-$(CONFIG_KPROBES) += kprobes.o |
diff --git a/arch/s390/kernel/compat_exec_domain.c b/arch/s390/kernel/compat_exec_domain.c deleted file mode 100644 index 765fabdada9f..000000000000 --- a/arch/s390/kernel/compat_exec_domain.c +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Support for 32-bit Linux for S390 personality. | ||
3 | * | ||
4 | * Copyright IBM Corp. 2000 | ||
5 | * Author(s): Gerhard Tonn (ton@de.ibm.com) | ||
6 | * | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/personality.h> | ||
13 | #include <linux/sched.h> | ||
14 | |||
15 | static struct exec_domain s390_exec_domain; | ||
16 | |||
17 | static int __init s390_init (void) | ||
18 | { | ||
19 | s390_exec_domain.name = "Linux/s390"; | ||
20 | s390_exec_domain.handler = NULL; | ||
21 | s390_exec_domain.pers_low = PER_LINUX32; | ||
22 | s390_exec_domain.pers_high = PER_LINUX32; | ||
23 | s390_exec_domain.signal_map = default_exec_domain.signal_map; | ||
24 | s390_exec_domain.signal_invmap = default_exec_domain.signal_invmap; | ||
25 | register_exec_domain(&s390_exec_domain); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | __initcall(s390_init); | ||
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index fca20b5fe79e..6b594439cca5 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -380,8 +380,6 @@ static __init void detect_machine_facilities(void) | |||
380 | S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT2; | 380 | S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT2; |
381 | if (test_facility(3)) | 381 | if (test_facility(3)) |
382 | S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE; | 382 | S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE; |
383 | if (test_facility(27)) | ||
384 | S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; | ||
385 | if (test_facility(40)) | 383 | if (test_facility(40)) |
386 | S390_lowcore.machine_flags |= MACHINE_FLAG_LPP; | 384 | S390_lowcore.machine_flags |= MACHINE_FLAG_LPP; |
387 | if (test_facility(50) && test_facility(73)) | 385 | if (test_facility(50) && test_facility(73)) |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 0dc2b6d0a1ec..526d3735ed29 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -43,6 +43,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
43 | _TIF_MCCK_PENDING) | 43 | _TIF_MCCK_PENDING) |
44 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ | 44 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ |
45 | _TIF_SYSCALL_TRACEPOINT) | 45 | _TIF_SYSCALL_TRACEPOINT) |
46 | _TIF_TRANSFER = (_TIF_MCCK_PENDING | _TIF_TLB_WAIT) | ||
46 | 47 | ||
47 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 48 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
48 | STACK_SIZE = 1 << STACK_SHIFT | 49 | STACK_SIZE = 1 << STACK_SHIFT |
@@ -159,10 +160,12 @@ ENTRY(__switch_to) | |||
159 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 | 160 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 |
160 | mvc __LC_CURRENT_PID(4,%r0),__TASK_pid(%r3) # store pid of next | 161 | mvc __LC_CURRENT_PID(4,%r0),__TASK_pid(%r3) # store pid of next |
161 | l %r15,__THREAD_ksp(%r3) # load kernel stack of next | 162 | l %r15,__THREAD_ksp(%r3) # load kernel stack of next |
162 | tm __TI_flags+3(%r4),_TIF_MCCK_PENDING # machine check pending? | 163 | lhi %r6,_TIF_TRANSFER # transfer TIF bits |
164 | n %r6,__TI_flags(%r4) # isolate TIF bits | ||
163 | jz 0f | 165 | jz 0f |
164 | ni __TI_flags+3(%r4),255-_TIF_MCCK_PENDING # clear flag in prev | 166 | o %r6,__TI_flags(%r5) # set TIF bits of next |
165 | oi __TI_flags+3(%r5),_TIF_MCCK_PENDING # set it in next | 167 | st %r6,__TI_flags(%r5) |
168 | ni __TI_flags+3(%r4),255-_TIF_TRANSFER # clear TIF bits of prev | ||
166 | 0: lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task | 169 | 0: lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task |
167 | br %r14 | 170 | br %r14 |
168 | 171 | ||
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 384e609b4711..e09dbe5f2901 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -48,6 +48,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
48 | _TIF_MCCK_PENDING) | 48 | _TIF_MCCK_PENDING) |
49 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ | 49 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ |
50 | _TIF_SYSCALL_TRACEPOINT) | 50 | _TIF_SYSCALL_TRACEPOINT) |
51 | _TIF_TRANSFER = (_TIF_MCCK_PENDING | _TIF_TLB_WAIT) | ||
51 | 52 | ||
52 | #define BASED(name) name-system_call(%r13) | 53 | #define BASED(name) name-system_call(%r13) |
53 | 54 | ||
@@ -189,10 +190,12 @@ ENTRY(__switch_to) | |||
189 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 | 190 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 |
190 | mvc __LC_CURRENT_PID+4(4,%r0),__TASK_pid(%r3) # store pid of next | 191 | mvc __LC_CURRENT_PID+4(4,%r0),__TASK_pid(%r3) # store pid of next |
191 | lg %r15,__THREAD_ksp(%r3) # load kernel stack of next | 192 | lg %r15,__THREAD_ksp(%r3) # load kernel stack of next |
192 | tm __TI_flags+7(%r4),_TIF_MCCK_PENDING # machine check pending? | 193 | llill %r6,_TIF_TRANSFER # transfer TIF bits |
194 | ng %r6,__TI_flags(%r4) # isolate TIF bits | ||
193 | jz 0f | 195 | jz 0f |
194 | ni __TI_flags+7(%r4),255-_TIF_MCCK_PENDING # clear flag in prev | 196 | og %r6,__TI_flags(%r5) # set TIF bits of next |
195 | oi __TI_flags+7(%r5),_TIF_MCCK_PENDING # set it in next | 197 | stg %r6,__TI_flags(%r5) |
198 | ni __TI_flags+7(%r4),255-_TIF_TRANSFER # clear TIF bits of prev | ||
196 | 0: lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task | 199 | 0: lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task |
197 | br %r14 | 200 | br %r14 |
198 | 201 | ||
diff --git a/arch/s390/kernel/perf_event.c b/arch/s390/kernel/perf_event.c index 5d2dfa31c4ef..61595c1f0a0f 100644 --- a/arch/s390/kernel/perf_event.c +++ b/arch/s390/kernel/perf_event.c | |||
@@ -121,7 +121,7 @@ unsigned long perf_misc_flags(struct pt_regs *regs) | |||
121 | : PERF_RECORD_MISC_KERNEL; | 121 | : PERF_RECORD_MISC_KERNEL; |
122 | } | 122 | } |
123 | 123 | ||
124 | void print_debug_cf(void) | 124 | static void print_debug_cf(void) |
125 | { | 125 | { |
126 | struct cpumf_ctr_info cf_info; | 126 | struct cpumf_ctr_info cf_info; |
127 | int cpu = smp_processor_id(); | 127 | int cpu = smp_processor_id(); |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index f6be6087a0e9..4ac8fafec95f 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -85,7 +85,10 @@ void update_cr_regs(struct task_struct *task) | |||
85 | 85 | ||
86 | /* merge TIF_SINGLE_STEP into user specified PER registers. */ | 86 | /* merge TIF_SINGLE_STEP into user specified PER registers. */ |
87 | if (test_tsk_thread_flag(task, TIF_SINGLE_STEP)) { | 87 | if (test_tsk_thread_flag(task, TIF_SINGLE_STEP)) { |
88 | new.control |= PER_EVENT_IFETCH; | 88 | if (test_tsk_thread_flag(task, TIF_BLOCK_STEP)) |
89 | new.control |= PER_EVENT_BRANCH; | ||
90 | else | ||
91 | new.control |= PER_EVENT_IFETCH; | ||
89 | #ifdef CONFIG_64BIT | 92 | #ifdef CONFIG_64BIT |
90 | new.control |= PER_CONTROL_SUSPENSION; | 93 | new.control |= PER_CONTROL_SUSPENSION; |
91 | new.control |= PER_EVENT_TRANSACTION_END; | 94 | new.control |= PER_EVENT_TRANSACTION_END; |
@@ -107,14 +110,22 @@ void update_cr_regs(struct task_struct *task) | |||
107 | 110 | ||
108 | void user_enable_single_step(struct task_struct *task) | 111 | void user_enable_single_step(struct task_struct *task) |
109 | { | 112 | { |
113 | clear_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
110 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); | 114 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); |
111 | } | 115 | } |
112 | 116 | ||
113 | void user_disable_single_step(struct task_struct *task) | 117 | void user_disable_single_step(struct task_struct *task) |
114 | { | 118 | { |
119 | clear_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
115 | clear_tsk_thread_flag(task, TIF_SINGLE_STEP); | 120 | clear_tsk_thread_flag(task, TIF_SINGLE_STEP); |
116 | } | 121 | } |
117 | 122 | ||
123 | void user_enable_block_step(struct task_struct *task) | ||
124 | { | ||
125 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); | ||
126 | set_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
127 | } | ||
128 | |||
118 | /* | 129 | /* |
119 | * Called by kernel/ptrace.c when detaching.. | 130 | * Called by kernel/ptrace.c when detaching.. |
120 | * | 131 | * |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 09e2f468f48b..f70f2489fa5f 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/compat.h> | 47 | #include <linux/compat.h> |
48 | 48 | ||
49 | #include <asm/ipl.h> | 49 | #include <asm/ipl.h> |
50 | #include <asm/uaccess.h> | ||
51 | #include <asm/facility.h> | 50 | #include <asm/facility.h> |
52 | #include <asm/smp.h> | 51 | #include <asm/smp.h> |
53 | #include <asm/mmu_context.h> | 52 | #include <asm/mmu_context.h> |
@@ -65,12 +64,6 @@ | |||
65 | #include "entry.h" | 64 | #include "entry.h" |
66 | 65 | ||
67 | /* | 66 | /* |
68 | * User copy operations. | ||
69 | */ | ||
70 | struct uaccess_ops uaccess; | ||
71 | EXPORT_SYMBOL(uaccess); | ||
72 | |||
73 | /* | ||
74 | * Machine setup.. | 67 | * Machine setup.. |
75 | */ | 68 | */ |
76 | unsigned int console_mode = 0; | 69 | unsigned int console_mode = 0; |
@@ -294,14 +287,6 @@ static int __init parse_vmalloc(char *arg) | |||
294 | } | 287 | } |
295 | early_param("vmalloc", parse_vmalloc); | 288 | early_param("vmalloc", parse_vmalloc); |
296 | 289 | ||
297 | static int __init early_parse_user_mode(char *p) | ||
298 | { | ||
299 | if (!p || strcmp(p, "primary") == 0) | ||
300 | return 0; | ||
301 | return 1; | ||
302 | } | ||
303 | early_param("user_mode", early_parse_user_mode); | ||
304 | |||
305 | void *restart_stack __attribute__((__section__(".data"))); | 290 | void *restart_stack __attribute__((__section__(".data"))); |
306 | 291 | ||
307 | static void __init setup_lowcore(void) | 292 | static void __init setup_lowcore(void) |
@@ -1009,8 +994,6 @@ void __init setup_arch(char **cmdline_p) | |||
1009 | init_mm.end_data = (unsigned long) &_edata; | 994 | init_mm.end_data = (unsigned long) &_edata; |
1010 | init_mm.brk = (unsigned long) &_end; | 995 | init_mm.brk = (unsigned long) &_end; |
1011 | 996 | ||
1012 | uaccess = MACHINE_HAS_MVCOS ? uaccess_mvcos : uaccess_pt; | ||
1013 | |||
1014 | parse_early_param(); | 997 | parse_early_param(); |
1015 | detect_memory_layout(memory_chunk, memory_end); | 998 | detect_memory_layout(memory_chunk, memory_end); |
1016 | os_info_init(); | 999 | os_info_init(); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a7125b62a9a6..8827883310dd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -773,11 +773,11 @@ void __noreturn cpu_die(void) | |||
773 | 773 | ||
774 | void __init smp_fill_possible_mask(void) | 774 | void __init smp_fill_possible_mask(void) |
775 | { | 775 | { |
776 | unsigned int possible, cpu; | 776 | unsigned int possible, sclp, cpu; |
777 | 777 | ||
778 | possible = setup_possible_cpus; | 778 | sclp = sclp_get_max_cpu() ?: nr_cpu_ids; |
779 | if (!possible) | 779 | possible = setup_possible_cpus ?: nr_cpu_ids; |
780 | possible = MACHINE_IS_VM ? 64 : nr_cpu_ids; | 780 | possible = min(possible, sclp); |
781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) | 781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) |
782 | set_cpu_possible(cpu, true); | 782 | set_cpu_possible(cpu, true); |
783 | } | 783 | } |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 4b2e3e317004..6298fed11ced 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -451,7 +451,6 @@ static int __init topology_init(void) | |||
451 | } | 451 | } |
452 | set_topology_timer(); | 452 | set_topology_timer(); |
453 | out: | 453 | out: |
454 | update_cpu_masks(); | ||
455 | return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching); | 454 | return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching); |
456 | } | 455 | } |
457 | device_initcall(topology_init); | 456 | device_initcall(topology_init); |
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 8216c0e0b2e2..6f9cfa500372 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kvm.h> | 14 | #include <linux/kvm.h> |
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <asm/pgalloc.h> | ||
16 | #include <asm/virtio-ccw.h> | 17 | #include <asm/virtio-ccw.h> |
17 | #include "kvm-s390.h" | 18 | #include "kvm-s390.h" |
18 | #include "trace.h" | 19 | #include "trace.h" |
@@ -86,9 +87,11 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
86 | switch (subcode) { | 87 | switch (subcode) { |
87 | case 3: | 88 | case 3: |
88 | vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR; | 89 | vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR; |
90 | page_table_reset_pgste(current->mm, 0, TASK_SIZE); | ||
89 | break; | 91 | break; |
90 | case 4: | 92 | case 4: |
91 | vcpu->run->s390_reset_flags = 0; | 93 | vcpu->run->s390_reset_flags = 0; |
94 | page_table_reset_pgste(current->mm, 0, TASK_SIZE); | ||
92 | break; | 95 | break; |
93 | default: | 96 | default: |
94 | return -EOPNOTSUPP; | 97 | return -EOPNOTSUPP; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index e0676f390d57..10b5db3c9bc4 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -68,6 +68,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
68 | { "instruction_storage_key", VCPU_STAT(instruction_storage_key) }, | 68 | { "instruction_storage_key", VCPU_STAT(instruction_storage_key) }, |
69 | { "instruction_stsch", VCPU_STAT(instruction_stsch) }, | 69 | { "instruction_stsch", VCPU_STAT(instruction_stsch) }, |
70 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, | 70 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, |
71 | { "instruction_essa", VCPU_STAT(instruction_essa) }, | ||
71 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, | 72 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, |
72 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, | 73 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, |
73 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, | 74 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, |
@@ -283,7 +284,11 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | |||
283 | if (kvm_is_ucontrol(vcpu->kvm)) | 284 | if (kvm_is_ucontrol(vcpu->kvm)) |
284 | gmap_free(vcpu->arch.gmap); | 285 | gmap_free(vcpu->arch.gmap); |
285 | 286 | ||
287 | if (vcpu->arch.sie_block->cbrlo) | ||
288 | __free_page(__pfn_to_page( | ||
289 | vcpu->arch.sie_block->cbrlo >> PAGE_SHIFT)); | ||
286 | free_page((unsigned long)(vcpu->arch.sie_block)); | 290 | free_page((unsigned long)(vcpu->arch.sie_block)); |
291 | |||
287 | kvm_vcpu_uninit(vcpu); | 292 | kvm_vcpu_uninit(vcpu); |
288 | kmem_cache_free(kvm_vcpu_cache, vcpu); | 293 | kmem_cache_free(kvm_vcpu_cache, vcpu); |
289 | } | 294 | } |
@@ -390,6 +395,8 @@ int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | |||
390 | 395 | ||
391 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | 396 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) |
392 | { | 397 | { |
398 | struct page *cbrl; | ||
399 | |||
393 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | | 400 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | |
394 | CPUSTAT_SM | | 401 | CPUSTAT_SM | |
395 | CPUSTAT_STOPPED | | 402 | CPUSTAT_STOPPED | |
@@ -401,6 +408,14 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
401 | vcpu->arch.sie_block->ecb2 = 8; | 408 | vcpu->arch.sie_block->ecb2 = 8; |
402 | vcpu->arch.sie_block->eca = 0xC1002001U; | 409 | vcpu->arch.sie_block->eca = 0xC1002001U; |
403 | vcpu->arch.sie_block->fac = (int) (long) vfacilities; | 410 | vcpu->arch.sie_block->fac = (int) (long) vfacilities; |
411 | if (kvm_enabled_cmma()) { | ||
412 | cbrl = alloc_page(GFP_KERNEL | __GFP_ZERO); | ||
413 | if (cbrl) { | ||
414 | vcpu->arch.sie_block->ecb2 |= 0x80; | ||
415 | vcpu->arch.sie_block->ecb2 &= ~0x08; | ||
416 | vcpu->arch.sie_block->cbrlo = page_to_phys(cbrl); | ||
417 | } | ||
418 | } | ||
404 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); | 419 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); |
405 | tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet, | 420 | tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet, |
406 | (unsigned long) vcpu); | 421 | (unsigned long) vcpu); |
@@ -761,6 +776,16 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason) | |||
761 | return rc; | 776 | return rc; |
762 | } | 777 | } |
763 | 778 | ||
779 | bool kvm_enabled_cmma(void) | ||
780 | { | ||
781 | if (!MACHINE_IS_LPAR) | ||
782 | return false; | ||
783 | /* only enable for z10 and later */ | ||
784 | if (!MACHINE_HAS_EDAT1) | ||
785 | return false; | ||
786 | return true; | ||
787 | } | ||
788 | |||
764 | static int __vcpu_run(struct kvm_vcpu *vcpu) | 789 | static int __vcpu_run(struct kvm_vcpu *vcpu) |
765 | { | 790 | { |
766 | int rc, exit_reason; | 791 | int rc, exit_reason; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index f9559b0bd620..564514f410f4 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -156,6 +156,8 @@ void s390_vcpu_block(struct kvm_vcpu *vcpu); | |||
156 | void s390_vcpu_unblock(struct kvm_vcpu *vcpu); | 156 | void s390_vcpu_unblock(struct kvm_vcpu *vcpu); |
157 | void exit_sie(struct kvm_vcpu *vcpu); | 157 | void exit_sie(struct kvm_vcpu *vcpu); |
158 | void exit_sie_sync(struct kvm_vcpu *vcpu); | 158 | void exit_sie_sync(struct kvm_vcpu *vcpu); |
159 | /* are we going to support cmma? */ | ||
160 | bool kvm_enabled_cmma(void); | ||
159 | /* implemented in diag.c */ | 161 | /* implemented in diag.c */ |
160 | int kvm_s390_handle_diag(struct kvm_vcpu *vcpu); | 162 | int kvm_s390_handle_diag(struct kvm_vcpu *vcpu); |
161 | 163 | ||
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 75beea632a10..aacb6b129914 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -636,8 +636,49 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) | |||
636 | return 0; | 636 | return 0; |
637 | } | 637 | } |
638 | 638 | ||
639 | static int handle_essa(struct kvm_vcpu *vcpu) | ||
640 | { | ||
641 | /* entries expected to be 1FF */ | ||
642 | int entries = (vcpu->arch.sie_block->cbrlo & ~PAGE_MASK) >> 3; | ||
643 | unsigned long *cbrlo, cbrle; | ||
644 | struct gmap *gmap; | ||
645 | int i; | ||
646 | |||
647 | VCPU_EVENT(vcpu, 5, "cmma release %d pages", entries); | ||
648 | gmap = vcpu->arch.gmap; | ||
649 | vcpu->stat.instruction_essa++; | ||
650 | if (!kvm_enabled_cmma() || !vcpu->arch.sie_block->cbrlo) | ||
651 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); | ||
652 | |||
653 | if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) | ||
654 | return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); | ||
655 | |||
656 | if (((vcpu->arch.sie_block->ipb & 0xf0000000) >> 28) > 6) | ||
657 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | ||
658 | |||
659 | /* Rewind PSW to repeat the ESSA instruction */ | ||
660 | vcpu->arch.sie_block->gpsw.addr = | ||
661 | __rewind_psw(vcpu->arch.sie_block->gpsw, 4); | ||
662 | vcpu->arch.sie_block->cbrlo &= PAGE_MASK; /* reset nceo */ | ||
663 | cbrlo = phys_to_virt(vcpu->arch.sie_block->cbrlo); | ||
664 | down_read(&gmap->mm->mmap_sem); | ||
665 | for (i = 0; i < entries; ++i) { | ||
666 | cbrle = cbrlo[i]; | ||
667 | if (unlikely(cbrle & ~PAGE_MASK || cbrle < 2 * PAGE_SIZE)) | ||
668 | /* invalid entry */ | ||
669 | break; | ||
670 | /* try to free backing */ | ||
671 | __gmap_zap(cbrle, gmap); | ||
672 | } | ||
673 | up_read(&gmap->mm->mmap_sem); | ||
674 | if (i < entries) | ||
675 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | ||
676 | return 0; | ||
677 | } | ||
678 | |||
639 | static const intercept_handler_t b9_handlers[256] = { | 679 | static const intercept_handler_t b9_handlers[256] = { |
640 | [0x8d] = handle_epsw, | 680 | [0x8d] = handle_epsw, |
681 | [0xab] = handle_essa, | ||
641 | [0xaf] = handle_pfmf, | 682 | [0xaf] = handle_pfmf, |
642 | }; | 683 | }; |
643 | 684 | ||
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index b068729e50ac..e3fffe1dff51 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -2,8 +2,7 @@ | |||
2 | # Makefile for s390-specific library files.. | 2 | # Makefile for s390-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += delay.o string.o uaccess_pt.o find.o | 5 | lib-y += delay.o string.o uaccess_pt.o uaccess_mvcos.o find.o |
6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o mem32.o | 6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o mem32.o |
7 | obj-$(CONFIG_64BIT) += mem64.o | 7 | obj-$(CONFIG_64BIT) += mem64.o |
8 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o | ||
9 | lib-$(CONFIG_SMP) += spinlock.o | 8 | lib-$(CONFIG_SMP) += spinlock.o |
diff --git a/arch/s390/lib/find.c b/arch/s390/lib/find.c index 620d34d6487e..922003c1b90d 100644 --- a/arch/s390/lib/find.c +++ b/arch/s390/lib/find.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * On s390x the bits are numbered: | 4 | * On s390x the bits are numbered: |
5 | * |0..............63|64............127|128...........191|192...........255| | 5 | * |0..............63|64............127|128...........191|192...........255| |
6 | * and on s390: | 6 | * and on s390: |
7 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 7 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
8 | * | 8 | * |
9 | * The reason for this bit numbering is the fact that the hardware sets bits | 9 | * The reason for this bit numbering is the fact that the hardware sets bits |
10 | * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap | 10 | * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap |
diff --git a/arch/s390/lib/uaccess.h b/arch/s390/lib/uaccess.h index b1a22173d027..c7e0e81f4b4e 100644 --- a/arch/s390/lib/uaccess.h +++ b/arch/s390/lib/uaccess.h | |||
@@ -6,7 +6,11 @@ | |||
6 | #ifndef __ARCH_S390_LIB_UACCESS_H | 6 | #ifndef __ARCH_S390_LIB_UACCESS_H |
7 | #define __ARCH_S390_LIB_UACCESS_H | 7 | #define __ARCH_S390_LIB_UACCESS_H |
8 | 8 | ||
9 | extern int futex_atomic_op_pt(int, u32 __user *, int, int *); | 9 | unsigned long copy_from_user_pt(void *to, const void __user *from, unsigned long n); |
10 | extern int futex_atomic_cmpxchg_pt(u32 *, u32 __user *, u32, u32); | 10 | unsigned long copy_to_user_pt(void __user *to, const void *from, unsigned long n); |
11 | unsigned long copy_in_user_pt(void __user *to, const void __user *from, unsigned long n); | ||
12 | unsigned long clear_user_pt(void __user *to, unsigned long n); | ||
13 | unsigned long strnlen_user_pt(const char __user *src, unsigned long count); | ||
14 | long strncpy_from_user_pt(char *dst, const char __user *src, long count); | ||
11 | 15 | ||
12 | #endif /* __ARCH_S390_LIB_UACCESS_H */ | 16 | #endif /* __ARCH_S390_LIB_UACCESS_H */ |
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c index 4b7993bf69b9..ae97b8df11aa 100644 --- a/arch/s390/lib/uaccess_mvcos.c +++ b/arch/s390/lib/uaccess_mvcos.c | |||
@@ -6,8 +6,11 @@ | |||
6 | * Gerald Schaefer (gerald.schaefer@de.ibm.com) | 6 | * Gerald Schaefer (gerald.schaefer@de.ibm.com) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/jump_label.h> | ||
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/init.h> | ||
10 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <asm/facility.h> | ||
11 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
12 | #include <asm/futex.h> | 15 | #include <asm/futex.h> |
13 | #include "uaccess.h" | 16 | #include "uaccess.h" |
@@ -26,7 +29,10 @@ | |||
26 | #define SLR "slgr" | 29 | #define SLR "slgr" |
27 | #endif | 30 | #endif |
28 | 31 | ||
29 | static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) | 32 | static struct static_key have_mvcos = STATIC_KEY_INIT_TRUE; |
33 | |||
34 | static inline unsigned long copy_from_user_mvcos(void *x, const void __user *ptr, | ||
35 | unsigned long size) | ||
30 | { | 36 | { |
31 | register unsigned long reg0 asm("0") = 0x81UL; | 37 | register unsigned long reg0 asm("0") = 0x81UL; |
32 | unsigned long tmp1, tmp2; | 38 | unsigned long tmp1, tmp2; |
@@ -65,7 +71,16 @@ static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) | |||
65 | return size; | 71 | return size; |
66 | } | 72 | } |
67 | 73 | ||
68 | static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) | 74 | unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) |
75 | { | ||
76 | if (static_key_true(&have_mvcos)) | ||
77 | return copy_from_user_mvcos(to, from, n); | ||
78 | return copy_from_user_pt(to, from, n); | ||
79 | } | ||
80 | EXPORT_SYMBOL(__copy_from_user); | ||
81 | |||
82 | static inline unsigned long copy_to_user_mvcos(void __user *ptr, const void *x, | ||
83 | unsigned long size) | ||
69 | { | 84 | { |
70 | register unsigned long reg0 asm("0") = 0x810000UL; | 85 | register unsigned long reg0 asm("0") = 0x810000UL; |
71 | unsigned long tmp1, tmp2; | 86 | unsigned long tmp1, tmp2; |
@@ -94,8 +109,16 @@ static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) | |||
94 | return size; | 109 | return size; |
95 | } | 110 | } |
96 | 111 | ||
97 | static size_t copy_in_user_mvcos(size_t size, void __user *to, | 112 | unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) |
98 | const void __user *from) | 113 | { |
114 | if (static_key_true(&have_mvcos)) | ||
115 | return copy_to_user_mvcos(to, from, n); | ||
116 | return copy_to_user_pt(to, from, n); | ||
117 | } | ||
118 | EXPORT_SYMBOL(__copy_to_user); | ||
119 | |||
120 | static inline unsigned long copy_in_user_mvcos(void __user *to, const void __user *from, | ||
121 | unsigned long size) | ||
99 | { | 122 | { |
100 | register unsigned long reg0 asm("0") = 0x810081UL; | 123 | register unsigned long reg0 asm("0") = 0x810081UL; |
101 | unsigned long tmp1, tmp2; | 124 | unsigned long tmp1, tmp2; |
@@ -117,7 +140,15 @@ static size_t copy_in_user_mvcos(size_t size, void __user *to, | |||
117 | return size; | 140 | return size; |
118 | } | 141 | } |
119 | 142 | ||
120 | static size_t clear_user_mvcos(size_t size, void __user *to) | 143 | unsigned long __copy_in_user(void __user *to, const void __user *from, unsigned long n) |
144 | { | ||
145 | if (static_key_true(&have_mvcos)) | ||
146 | return copy_in_user_mvcos(to, from, n); | ||
147 | return copy_in_user_pt(to, from, n); | ||
148 | } | ||
149 | EXPORT_SYMBOL(__copy_in_user); | ||
150 | |||
151 | static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size) | ||
121 | { | 152 | { |
122 | register unsigned long reg0 asm("0") = 0x810000UL; | 153 | register unsigned long reg0 asm("0") = 0x810000UL; |
123 | unsigned long tmp1, tmp2; | 154 | unsigned long tmp1, tmp2; |
@@ -145,17 +176,26 @@ static size_t clear_user_mvcos(size_t size, void __user *to) | |||
145 | return size; | 176 | return size; |
146 | } | 177 | } |
147 | 178 | ||
148 | static size_t strnlen_user_mvcos(size_t count, const char __user *src) | 179 | unsigned long __clear_user(void __user *to, unsigned long size) |
149 | { | 180 | { |
150 | size_t done, len, offset, len_str; | 181 | if (static_key_true(&have_mvcos)) |
182 | return clear_user_mvcos(to, size); | ||
183 | return clear_user_pt(to, size); | ||
184 | } | ||
185 | EXPORT_SYMBOL(__clear_user); | ||
186 | |||
187 | static inline unsigned long strnlen_user_mvcos(const char __user *src, | ||
188 | unsigned long count) | ||
189 | { | ||
190 | unsigned long done, len, offset, len_str; | ||
151 | char buf[256]; | 191 | char buf[256]; |
152 | 192 | ||
153 | done = 0; | 193 | done = 0; |
154 | do { | 194 | do { |
155 | offset = (size_t)src & ~PAGE_MASK; | 195 | offset = (unsigned long)src & ~PAGE_MASK; |
156 | len = min(256UL, PAGE_SIZE - offset); | 196 | len = min(256UL, PAGE_SIZE - offset); |
157 | len = min(count - done, len); | 197 | len = min(count - done, len); |
158 | if (copy_from_user_mvcos(len, src, buf)) | 198 | if (copy_from_user_mvcos(buf, src, len)) |
159 | return 0; | 199 | return 0; |
160 | len_str = strnlen(buf, len); | 200 | len_str = strnlen(buf, len); |
161 | done += len_str; | 201 | done += len_str; |
@@ -164,18 +204,26 @@ static size_t strnlen_user_mvcos(size_t count, const char __user *src) | |||
164 | return done + 1; | 204 | return done + 1; |
165 | } | 205 | } |
166 | 206 | ||
167 | static size_t strncpy_from_user_mvcos(size_t count, const char __user *src, | 207 | unsigned long __strnlen_user(const char __user *src, unsigned long count) |
168 | char *dst) | ||
169 | { | 208 | { |
170 | size_t done, len, offset, len_str; | 209 | if (static_key_true(&have_mvcos)) |
210 | return strnlen_user_mvcos(src, count); | ||
211 | return strnlen_user_pt(src, count); | ||
212 | } | ||
213 | EXPORT_SYMBOL(__strnlen_user); | ||
171 | 214 | ||
172 | if (unlikely(!count)) | 215 | static inline long strncpy_from_user_mvcos(char *dst, const char __user *src, |
216 | long count) | ||
217 | { | ||
218 | unsigned long done, len, offset, len_str; | ||
219 | |||
220 | if (unlikely(count <= 0)) | ||
173 | return 0; | 221 | return 0; |
174 | done = 0; | 222 | done = 0; |
175 | do { | 223 | do { |
176 | offset = (size_t)src & ~PAGE_MASK; | 224 | offset = (unsigned long)src & ~PAGE_MASK; |
177 | len = min(count - done, PAGE_SIZE - offset); | 225 | len = min(count - done, PAGE_SIZE - offset); |
178 | if (copy_from_user_mvcos(len, src, dst)) | 226 | if (copy_from_user_mvcos(dst, src, len)) |
179 | return -EFAULT; | 227 | return -EFAULT; |
180 | len_str = strnlen(dst, len); | 228 | len_str = strnlen(dst, len); |
181 | done += len_str; | 229 | done += len_str; |
@@ -185,13 +233,31 @@ static size_t strncpy_from_user_mvcos(size_t count, const char __user *src, | |||
185 | return done; | 233 | return done; |
186 | } | 234 | } |
187 | 235 | ||
188 | struct uaccess_ops uaccess_mvcos = { | 236 | long __strncpy_from_user(char *dst, const char __user *src, long count) |
189 | .copy_from_user = copy_from_user_mvcos, | 237 | { |
190 | .copy_to_user = copy_to_user_mvcos, | 238 | if (static_key_true(&have_mvcos)) |
191 | .copy_in_user = copy_in_user_mvcos, | 239 | return strncpy_from_user_mvcos(dst, src, count); |
192 | .clear_user = clear_user_mvcos, | 240 | return strncpy_from_user_pt(dst, src, count); |
193 | .strnlen_user = strnlen_user_mvcos, | 241 | } |
194 | .strncpy_from_user = strncpy_from_user_mvcos, | 242 | EXPORT_SYMBOL(__strncpy_from_user); |
195 | .futex_atomic_op = futex_atomic_op_pt, | 243 | |
196 | .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt, | 244 | /* |
197 | }; | 245 | * The uaccess page tabe walk variant can be enforced with the "uaccesspt" |
246 | * kernel parameter. This is mainly for debugging purposes. | ||
247 | */ | ||
248 | static int force_uaccess_pt __initdata; | ||
249 | |||
250 | static int __init parse_uaccess_pt(char *__unused) | ||
251 | { | ||
252 | force_uaccess_pt = 1; | ||
253 | return 0; | ||
254 | } | ||
255 | early_param("uaccesspt", parse_uaccess_pt); | ||
256 | |||
257 | static int __init uaccess_init(void) | ||
258 | { | ||
259 | if (IS_ENABLED(CONFIG_32BIT) || force_uaccess_pt || !test_facility(27)) | ||
260 | static_key_slow_dec(&have_mvcos); | ||
261 | return 0; | ||
262 | } | ||
263 | early_initcall(uaccess_init); | ||
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 61ebcc9ccb34..8d39760bae68 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #define SLR "slgr" | 22 | #define SLR "slgr" |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | static size_t strnlen_kernel(size_t count, const char __user *src) | 25 | static unsigned long strnlen_kernel(const char __user *src, unsigned long count) |
26 | { | 26 | { |
27 | register unsigned long reg0 asm("0") = 0UL; | 27 | register unsigned long reg0 asm("0") = 0UL; |
28 | unsigned long tmp1, tmp2; | 28 | unsigned long tmp1, tmp2; |
@@ -42,8 +42,8 @@ static size_t strnlen_kernel(size_t count, const char __user *src) | |||
42 | return count; | 42 | return count; |
43 | } | 43 | } |
44 | 44 | ||
45 | static size_t copy_in_kernel(size_t count, void __user *to, | 45 | static unsigned long copy_in_kernel(void __user *to, const void __user *from, |
46 | const void __user *from) | 46 | unsigned long count) |
47 | { | 47 | { |
48 | unsigned long tmp1; | 48 | unsigned long tmp1; |
49 | 49 | ||
@@ -146,8 +146,8 @@ static unsigned long follow_table(struct mm_struct *mm, | |||
146 | 146 | ||
147 | #endif /* CONFIG_64BIT */ | 147 | #endif /* CONFIG_64BIT */ |
148 | 148 | ||
149 | static __always_inline size_t __user_copy_pt(unsigned long uaddr, void *kptr, | 149 | static inline unsigned long __user_copy_pt(unsigned long uaddr, void *kptr, |
150 | size_t n, int write_user) | 150 | unsigned long n, int write_user) |
151 | { | 151 | { |
152 | struct mm_struct *mm = current->mm; | 152 | struct mm_struct *mm = current->mm; |
153 | unsigned long offset, done, size, kaddr; | 153 | unsigned long offset, done, size, kaddr; |
@@ -189,8 +189,7 @@ fault: | |||
189 | * Do DAT for user address by page table walk, return kernel address. | 189 | * Do DAT for user address by page table walk, return kernel address. |
190 | * This function needs to be called with current->mm->page_table_lock held. | 190 | * This function needs to be called with current->mm->page_table_lock held. |
191 | */ | 191 | */ |
192 | static __always_inline unsigned long __dat_user_addr(unsigned long uaddr, | 192 | static inline unsigned long __dat_user_addr(unsigned long uaddr, int write) |
193 | int write) | ||
194 | { | 193 | { |
195 | struct mm_struct *mm = current->mm; | 194 | struct mm_struct *mm = current->mm; |
196 | unsigned long kaddr; | 195 | unsigned long kaddr; |
@@ -211,29 +210,29 @@ fault: | |||
211 | return 0; | 210 | return 0; |
212 | } | 211 | } |
213 | 212 | ||
214 | static size_t copy_from_user_pt(size_t n, const void __user *from, void *to) | 213 | unsigned long copy_from_user_pt(void *to, const void __user *from, unsigned long n) |
215 | { | 214 | { |
216 | size_t rc; | 215 | unsigned long rc; |
217 | 216 | ||
218 | if (segment_eq(get_fs(), KERNEL_DS)) | 217 | if (segment_eq(get_fs(), KERNEL_DS)) |
219 | return copy_in_kernel(n, (void __user *) to, from); | 218 | return copy_in_kernel((void __user *) to, from, n); |
220 | rc = __user_copy_pt((unsigned long) from, to, n, 0); | 219 | rc = __user_copy_pt((unsigned long) from, to, n, 0); |
221 | if (unlikely(rc)) | 220 | if (unlikely(rc)) |
222 | memset(to + n - rc, 0, rc); | 221 | memset(to + n - rc, 0, rc); |
223 | return rc; | 222 | return rc; |
224 | } | 223 | } |
225 | 224 | ||
226 | static size_t copy_to_user_pt(size_t n, void __user *to, const void *from) | 225 | unsigned long copy_to_user_pt(void __user *to, const void *from, unsigned long n) |
227 | { | 226 | { |
228 | if (segment_eq(get_fs(), KERNEL_DS)) | 227 | if (segment_eq(get_fs(), KERNEL_DS)) |
229 | return copy_in_kernel(n, to, (void __user *) from); | 228 | return copy_in_kernel(to, (void __user *) from, n); |
230 | return __user_copy_pt((unsigned long) to, (void *) from, n, 1); | 229 | return __user_copy_pt((unsigned long) to, (void *) from, n, 1); |
231 | } | 230 | } |
232 | 231 | ||
233 | static size_t clear_user_pt(size_t n, void __user *to) | 232 | unsigned long clear_user_pt(void __user *to, unsigned long n) |
234 | { | 233 | { |
235 | void *zpage = (void *) empty_zero_page; | 234 | void *zpage = (void *) empty_zero_page; |
236 | long done, size, ret; | 235 | unsigned long done, size, ret; |
237 | 236 | ||
238 | done = 0; | 237 | done = 0; |
239 | do { | 238 | do { |
@@ -242,7 +241,7 @@ static size_t clear_user_pt(size_t n, void __user *to) | |||
242 | else | 241 | else |
243 | size = n - done; | 242 | size = n - done; |
244 | if (segment_eq(get_fs(), KERNEL_DS)) | 243 | if (segment_eq(get_fs(), KERNEL_DS)) |
245 | ret = copy_in_kernel(n, to, (void __user *) zpage); | 244 | ret = copy_in_kernel(to, (void __user *) zpage, n); |
246 | else | 245 | else |
247 | ret = __user_copy_pt((unsigned long) to, zpage, size, 1); | 246 | ret = __user_copy_pt((unsigned long) to, zpage, size, 1); |
248 | done += size; | 247 | done += size; |
@@ -253,17 +252,17 @@ static size_t clear_user_pt(size_t n, void __user *to) | |||
253 | return 0; | 252 | return 0; |
254 | } | 253 | } |
255 | 254 | ||
256 | static size_t strnlen_user_pt(size_t count, const char __user *src) | 255 | unsigned long strnlen_user_pt(const char __user *src, unsigned long count) |
257 | { | 256 | { |
258 | unsigned long uaddr = (unsigned long) src; | 257 | unsigned long uaddr = (unsigned long) src; |
259 | struct mm_struct *mm = current->mm; | 258 | struct mm_struct *mm = current->mm; |
260 | unsigned long offset, done, len, kaddr; | 259 | unsigned long offset, done, len, kaddr; |
261 | size_t len_str; | 260 | unsigned long len_str; |
262 | 261 | ||
263 | if (unlikely(!count)) | 262 | if (unlikely(!count)) |
264 | return 0; | 263 | return 0; |
265 | if (segment_eq(get_fs(), KERNEL_DS)) | 264 | if (segment_eq(get_fs(), KERNEL_DS)) |
266 | return strnlen_kernel(count, src); | 265 | return strnlen_kernel(src, count); |
267 | if (!mm) | 266 | if (!mm) |
268 | return 0; | 267 | return 0; |
269 | done = 0; | 268 | done = 0; |
@@ -289,19 +288,18 @@ fault: | |||
289 | goto retry; | 288 | goto retry; |
290 | } | 289 | } |
291 | 290 | ||
292 | static size_t strncpy_from_user_pt(size_t count, const char __user *src, | 291 | long strncpy_from_user_pt(char *dst, const char __user *src, long count) |
293 | char *dst) | ||
294 | { | 292 | { |
295 | size_t done, len, offset, len_str; | 293 | unsigned long done, len, offset, len_str; |
296 | 294 | ||
297 | if (unlikely(!count)) | 295 | if (unlikely(count <= 0)) |
298 | return 0; | 296 | return 0; |
299 | done = 0; | 297 | done = 0; |
300 | do { | 298 | do { |
301 | offset = (size_t)src & ~PAGE_MASK; | 299 | offset = (unsigned long)src & ~PAGE_MASK; |
302 | len = min(count - done, PAGE_SIZE - offset); | 300 | len = min(count - done, PAGE_SIZE - offset); |
303 | if (segment_eq(get_fs(), KERNEL_DS)) { | 301 | if (segment_eq(get_fs(), KERNEL_DS)) { |
304 | if (copy_in_kernel(len, (void __user *) dst, src)) | 302 | if (copy_in_kernel((void __user *) dst, src, len)) |
305 | return -EFAULT; | 303 | return -EFAULT; |
306 | } else { | 304 | } else { |
307 | if (__user_copy_pt((unsigned long) src, dst, len, 0)) | 305 | if (__user_copy_pt((unsigned long) src, dst, len, 0)) |
@@ -315,8 +313,8 @@ static size_t strncpy_from_user_pt(size_t count, const char __user *src, | |||
315 | return done; | 313 | return done; |
316 | } | 314 | } |
317 | 315 | ||
318 | static size_t copy_in_user_pt(size_t n, void __user *to, | 316 | unsigned long copy_in_user_pt(void __user *to, const void __user *from, |
319 | const void __user *from) | 317 | unsigned long n) |
320 | { | 318 | { |
321 | struct mm_struct *mm = current->mm; | 319 | struct mm_struct *mm = current->mm; |
322 | unsigned long offset_max, uaddr, done, size, error_code; | 320 | unsigned long offset_max, uaddr, done, size, error_code; |
@@ -326,7 +324,7 @@ static size_t copy_in_user_pt(size_t n, void __user *to, | |||
326 | int write_user; | 324 | int write_user; |
327 | 325 | ||
328 | if (segment_eq(get_fs(), KERNEL_DS)) | 326 | if (segment_eq(get_fs(), KERNEL_DS)) |
329 | return copy_in_kernel(n, to, from); | 327 | return copy_in_kernel(to, from, n); |
330 | if (!mm) | 328 | if (!mm) |
331 | return n; | 329 | return n; |
332 | done = 0; | 330 | done = 0; |
@@ -411,7 +409,7 @@ static int __futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old) | |||
411 | return ret; | 409 | return ret; |
412 | } | 410 | } |
413 | 411 | ||
414 | int futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old) | 412 | int __futex_atomic_op_inuser(int op, u32 __user *uaddr, int oparg, int *old) |
415 | { | 413 | { |
416 | int ret; | 414 | int ret; |
417 | 415 | ||
@@ -449,8 +447,8 @@ static int __futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | |||
449 | return ret; | 447 | return ret; |
450 | } | 448 | } |
451 | 449 | ||
452 | int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | 450 | int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, |
453 | u32 oldval, u32 newval) | 451 | u32 oldval, u32 newval) |
454 | { | 452 | { |
455 | int ret; | 453 | int ret; |
456 | 454 | ||
@@ -471,14 +469,3 @@ int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | |||
471 | put_page(virt_to_page(uaddr)); | 469 | put_page(virt_to_page(uaddr)); |
472 | return ret; | 470 | return ret; |
473 | } | 471 | } |
474 | |||
475 | struct uaccess_ops uaccess_pt = { | ||
476 | .copy_from_user = copy_from_user_pt, | ||
477 | .copy_to_user = copy_to_user_pt, | ||
478 | .copy_in_user = copy_in_user_pt, | ||
479 | .clear_user = clear_user_pt, | ||
480 | .strnlen_user = strnlen_user_pt, | ||
481 | .strncpy_from_user = strncpy_from_user_pt, | ||
482 | .futex_atomic_op = futex_atomic_op_pt, | ||
483 | .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt, | ||
484 | }; | ||
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index d1e0e0c7a7e2..2a2e35416d2f 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -128,7 +128,7 @@ void memcpy_absolute(void *dest, void *src, size_t count) | |||
128 | /* | 128 | /* |
129 | * Copy memory from kernel (real) to user (virtual) | 129 | * Copy memory from kernel (real) to user (virtual) |
130 | */ | 130 | */ |
131 | int copy_to_user_real(void __user *dest, void *src, size_t count) | 131 | int copy_to_user_real(void __user *dest, void *src, unsigned long count) |
132 | { | 132 | { |
133 | int offs = 0, size, rc; | 133 | int offs = 0, size, rc; |
134 | char *buf; | 134 | char *buf; |
@@ -152,32 +152,6 @@ out: | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * Copy memory from user (virtual) to kernel (real) | ||
156 | */ | ||
157 | int copy_from_user_real(void *dest, void __user *src, size_t count) | ||
158 | { | ||
159 | int offs = 0, size, rc; | ||
160 | char *buf; | ||
161 | |||
162 | buf = (char *) __get_free_page(GFP_KERNEL); | ||
163 | if (!buf) | ||
164 | return -ENOMEM; | ||
165 | rc = -EFAULT; | ||
166 | while (offs < count) { | ||
167 | size = min(PAGE_SIZE, count - offs); | ||
168 | if (copy_from_user(buf, src + offs, size)) | ||
169 | goto out; | ||
170 | if (memcpy_real(dest + offs, buf, size)) | ||
171 | goto out; | ||
172 | offs += size; | ||
173 | } | ||
174 | rc = 0; | ||
175 | out: | ||
176 | free_page((unsigned long) buf); | ||
177 | return rc; | ||
178 | } | ||
179 | |||
180 | /* | ||
181 | * Check if physical address is within prefix or zero page | 155 | * Check if physical address is within prefix or zero page |
182 | */ | 156 | */ |
183 | static int is_swapped(unsigned long addr) | 157 | static int is_swapped(unsigned long addr) |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 3584ed9b20a1..796c9320c709 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/quicklist.h> | 17 | #include <linux/quicklist.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/swapops.h> | ||
20 | 21 | ||
21 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
22 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
@@ -594,6 +595,82 @@ unsigned long gmap_fault(unsigned long address, struct gmap *gmap) | |||
594 | } | 595 | } |
595 | EXPORT_SYMBOL_GPL(gmap_fault); | 596 | EXPORT_SYMBOL_GPL(gmap_fault); |
596 | 597 | ||
598 | static void gmap_zap_swap_entry(swp_entry_t entry, struct mm_struct *mm) | ||
599 | { | ||
600 | if (!non_swap_entry(entry)) | ||
601 | dec_mm_counter(mm, MM_SWAPENTS); | ||
602 | else if (is_migration_entry(entry)) { | ||
603 | struct page *page = migration_entry_to_page(entry); | ||
604 | |||
605 | if (PageAnon(page)) | ||
606 | dec_mm_counter(mm, MM_ANONPAGES); | ||
607 | else | ||
608 | dec_mm_counter(mm, MM_FILEPAGES); | ||
609 | } | ||
610 | free_swap_and_cache(entry); | ||
611 | } | ||
612 | |||
613 | /** | ||
614 | * The mm->mmap_sem lock must be held | ||
615 | */ | ||
616 | static void gmap_zap_unused(struct mm_struct *mm, unsigned long address) | ||
617 | { | ||
618 | unsigned long ptev, pgstev; | ||
619 | spinlock_t *ptl; | ||
620 | pgste_t pgste; | ||
621 | pte_t *ptep, pte; | ||
622 | |||
623 | ptep = get_locked_pte(mm, address, &ptl); | ||
624 | if (unlikely(!ptep)) | ||
625 | return; | ||
626 | pte = *ptep; | ||
627 | if (!pte_swap(pte)) | ||
628 | goto out_pte; | ||
629 | /* Zap unused and logically-zero pages */ | ||
630 | pgste = pgste_get_lock(ptep); | ||
631 | pgstev = pgste_val(pgste); | ||
632 | ptev = pte_val(pte); | ||
633 | if (((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED) || | ||
634 | ((pgstev & _PGSTE_GPS_ZERO) && (ptev & _PAGE_INVALID))) { | ||
635 | gmap_zap_swap_entry(pte_to_swp_entry(pte), mm); | ||
636 | pte_clear(mm, address, ptep); | ||
637 | } | ||
638 | pgste_set_unlock(ptep, pgste); | ||
639 | out_pte: | ||
640 | pte_unmap_unlock(*ptep, ptl); | ||
641 | } | ||
642 | |||
643 | /* | ||
644 | * this function is assumed to be called with mmap_sem held | ||
645 | */ | ||
646 | void __gmap_zap(unsigned long address, struct gmap *gmap) | ||
647 | { | ||
648 | unsigned long *table, *segment_ptr; | ||
649 | unsigned long segment, pgstev, ptev; | ||
650 | struct gmap_pgtable *mp; | ||
651 | struct page *page; | ||
652 | |||
653 | segment_ptr = gmap_table_walk(address, gmap); | ||
654 | if (IS_ERR(segment_ptr)) | ||
655 | return; | ||
656 | segment = *segment_ptr; | ||
657 | if (segment & _SEGMENT_ENTRY_INVALID) | ||
658 | return; | ||
659 | page = pfn_to_page(segment >> PAGE_SHIFT); | ||
660 | mp = (struct gmap_pgtable *) page->index; | ||
661 | address = mp->vmaddr | (address & ~PMD_MASK); | ||
662 | /* Page table is present */ | ||
663 | table = (unsigned long *)(segment & _SEGMENT_ENTRY_ORIGIN); | ||
664 | table = table + ((address >> 12) & 0xff); | ||
665 | pgstev = table[PTRS_PER_PTE]; | ||
666 | ptev = table[0]; | ||
667 | /* quick check, checked again with locks held */ | ||
668 | if (((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED) || | ||
669 | ((pgstev & _PGSTE_GPS_ZERO) && (ptev & _PAGE_INVALID))) | ||
670 | gmap_zap_unused(gmap->mm, address); | ||
671 | } | ||
672 | EXPORT_SYMBOL_GPL(__gmap_zap); | ||
673 | |||
597 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *gmap) | 674 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *gmap) |
598 | { | 675 | { |
599 | 676 | ||
@@ -671,7 +748,7 @@ EXPORT_SYMBOL_GPL(gmap_unregister_ipte_notifier); | |||
671 | /** | 748 | /** |
672 | * gmap_ipte_notify - mark a range of ptes for invalidation notification | 749 | * gmap_ipte_notify - mark a range of ptes for invalidation notification |
673 | * @gmap: pointer to guest mapping meta data structure | 750 | * @gmap: pointer to guest mapping meta data structure |
674 | * @address: virtual address in the guest address space | 751 | * @start: virtual address in the guest address space |
675 | * @len: size of area | 752 | * @len: size of area |
676 | * | 753 | * |
677 | * Returns 0 if for each page in the given range a gmap mapping exists and | 754 | * Returns 0 if for each page in the given range a gmap mapping exists and |
@@ -725,13 +802,12 @@ EXPORT_SYMBOL_GPL(gmap_ipte_notify); | |||
725 | /** | 802 | /** |
726 | * gmap_do_ipte_notify - call all invalidation callbacks for a specific pte. | 803 | * gmap_do_ipte_notify - call all invalidation callbacks for a specific pte. |
727 | * @mm: pointer to the process mm_struct | 804 | * @mm: pointer to the process mm_struct |
728 | * @addr: virtual address in the process address space | ||
729 | * @pte: pointer to the page table entry | 805 | * @pte: pointer to the page table entry |
730 | * | 806 | * |
731 | * This function is assumed to be called with the page table lock held | 807 | * This function is assumed to be called with the page table lock held |
732 | * for the pte to notify. | 808 | * for the pte to notify. |
733 | */ | 809 | */ |
734 | void gmap_do_ipte_notify(struct mm_struct *mm, unsigned long addr, pte_t *pte) | 810 | void gmap_do_ipte_notify(struct mm_struct *mm, pte_t *pte) |
735 | { | 811 | { |
736 | unsigned long segment_offset; | 812 | unsigned long segment_offset; |
737 | struct gmap_notifier *nb; | 813 | struct gmap_notifier *nb; |
@@ -802,6 +878,78 @@ static inline void page_table_free_pgste(unsigned long *table) | |||
802 | __free_page(page); | 878 | __free_page(page); |
803 | } | 879 | } |
804 | 880 | ||
881 | static inline unsigned long page_table_reset_pte(struct mm_struct *mm, | ||
882 | pmd_t *pmd, unsigned long addr, unsigned long end) | ||
883 | { | ||
884 | pte_t *start_pte, *pte; | ||
885 | spinlock_t *ptl; | ||
886 | pgste_t pgste; | ||
887 | |||
888 | start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | ||
889 | pte = start_pte; | ||
890 | do { | ||
891 | pgste = pgste_get_lock(pte); | ||
892 | pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK; | ||
893 | pgste_set_unlock(pte, pgste); | ||
894 | } while (pte++, addr += PAGE_SIZE, addr != end); | ||
895 | pte_unmap_unlock(start_pte, ptl); | ||
896 | |||
897 | return addr; | ||
898 | } | ||
899 | |||
900 | static inline unsigned long page_table_reset_pmd(struct mm_struct *mm, | ||
901 | pud_t *pud, unsigned long addr, unsigned long end) | ||
902 | { | ||
903 | unsigned long next; | ||
904 | pmd_t *pmd; | ||
905 | |||
906 | pmd = pmd_offset(pud, addr); | ||
907 | do { | ||
908 | next = pmd_addr_end(addr, end); | ||
909 | if (pmd_none_or_clear_bad(pmd)) | ||
910 | continue; | ||
911 | next = page_table_reset_pte(mm, pmd, addr, next); | ||
912 | } while (pmd++, addr = next, addr != end); | ||
913 | |||
914 | return addr; | ||
915 | } | ||
916 | |||
917 | static inline unsigned long page_table_reset_pud(struct mm_struct *mm, | ||
918 | pgd_t *pgd, unsigned long addr, unsigned long end) | ||
919 | { | ||
920 | unsigned long next; | ||
921 | pud_t *pud; | ||
922 | |||
923 | pud = pud_offset(pgd, addr); | ||
924 | do { | ||
925 | next = pud_addr_end(addr, end); | ||
926 | if (pud_none_or_clear_bad(pud)) | ||
927 | continue; | ||
928 | next = page_table_reset_pmd(mm, pud, addr, next); | ||
929 | } while (pud++, addr = next, addr != end); | ||
930 | |||
931 | return addr; | ||
932 | } | ||
933 | |||
934 | void page_table_reset_pgste(struct mm_struct *mm, | ||
935 | unsigned long start, unsigned long end) | ||
936 | { | ||
937 | unsigned long addr, next; | ||
938 | pgd_t *pgd; | ||
939 | |||
940 | addr = start; | ||
941 | down_read(&mm->mmap_sem); | ||
942 | pgd = pgd_offset(mm, addr); | ||
943 | do { | ||
944 | next = pgd_addr_end(addr, end); | ||
945 | if (pgd_none_or_clear_bad(pgd)) | ||
946 | continue; | ||
947 | next = page_table_reset_pud(mm, pgd, addr, next); | ||
948 | } while (pgd++, addr = next, addr != end); | ||
949 | up_read(&mm->mmap_sem); | ||
950 | } | ||
951 | EXPORT_SYMBOL(page_table_reset_pgste); | ||
952 | |||
805 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, | 953 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, |
806 | unsigned long key, bool nq) | 954 | unsigned long key, bool nq) |
807 | { | 955 | { |
@@ -1248,7 +1396,7 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, | |||
1248 | { | 1396 | { |
1249 | struct list_head *lh = (struct list_head *) pgtable; | 1397 | struct list_head *lh = (struct list_head *) pgtable; |
1250 | 1398 | ||
1251 | assert_spin_locked(&mm->page_table_lock); | 1399 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1252 | 1400 | ||
1253 | /* FIFO */ | 1401 | /* FIFO */ |
1254 | if (!pmd_huge_pte(mm, pmdp)) | 1402 | if (!pmd_huge_pte(mm, pmdp)) |
@@ -1264,7 +1412,7 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp) | |||
1264 | pgtable_t pgtable; | 1412 | pgtable_t pgtable; |
1265 | pte_t *ptep; | 1413 | pte_t *ptep; |
1266 | 1414 | ||
1267 | assert_spin_locked(&mm->page_table_lock); | 1415 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1268 | 1416 | ||
1269 | /* FIFO */ | 1417 | /* FIFO */ |
1270 | pgtable = pmd_huge_pte(mm, pmdp); | 1418 | pgtable = pmd_huge_pte(mm, pmdp); |
diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c index 75c69b402e05..c5c66840ac00 100644 --- a/arch/s390/pci/pci_debug.c +++ b/arch/s390/pci/pci_debug.c | |||
@@ -139,7 +139,7 @@ void zpci_debug_exit_device(struct zpci_dev *zdev) | |||
139 | int __init zpci_debug_init(void) | 139 | int __init zpci_debug_init(void) |
140 | { | 140 | { |
141 | /* event trace buffer */ | 141 | /* event trace buffer */ |
142 | pci_debug_msg_id = debug_register("pci_msg", 16, 1, 16 * sizeof(long)); | 142 | pci_debug_msg_id = debug_register("pci_msg", 8, 1, 8 * sizeof(long)); |
143 | if (!pci_debug_msg_id) | 143 | if (!pci_debug_msg_id) |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | debug_register_view(pci_debug_msg_id, &debug_sprintf_view); | 145 | debug_register_view(pci_debug_msg_id, &debug_sprintf_view); |