Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:

- A fix for the pgtable_bytes misaccounting on s390. The patch changes
common code part in regard to page table folding and adds extra
checks to mm_[inc|dec]_nr_[pmds|puds].

- Add FORCE for all build targets using if_changed

- Use non-loadable phdr for the .vmlinux.info section to avoid a
segment overlap that confuses kexec

- Cleanup the attribute definition for the diagnostic sampling

- Increase stack size for CONFIG_KASAN=y builds

- Export __node_distance to fix a build error

- Correct return code of a PMU event init function

- An update for the default configs

* tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/perf: Change CPUM_CF return code in event init function
s390: update defconfigs
s390/mm: Fix ERROR: "__node_distance" undefined!
s390/kasan: increase instrumented stack size to 64k
s390/cpum_sf: Rework attribute definition for diagnostic sampling
s390/mm: fix mis-accounting of pgtable_bytes
mm: add mm_pxd_folded checks to pgtable_bytes accounting functions
mm: introduce mm_[p4d|pud|pmd]_folded
mm: make the __PAGETABLE_PxD_FOLDED defines non-empty
s390: avoid vmlinux segments overlap
s390/vdso: add missing FORCE to build targets
s390/decompressor: add missing FORCE to build targets

+175 -93
+1 -1
arch/arm/include/asm/pgtable-2level.h
··· 10 10 #ifndef _ASM_PGTABLE_2LEVEL_H 11 11 #define _ASM_PGTABLE_2LEVEL_H 12 12 13 - #define __PAGETABLE_PMD_FOLDED 13 + #define __PAGETABLE_PMD_FOLDED 1 14 14 15 15 /* 16 16 * Hardware-wise, we have a two level page table structure, where the first
+2 -2
arch/m68k/include/asm/pgtable_mm.h
··· 55 55 */ 56 56 #ifdef CONFIG_SUN3 57 57 #define PTRS_PER_PTE 16 58 - #define __PAGETABLE_PMD_FOLDED 58 + #define __PAGETABLE_PMD_FOLDED 1 59 59 #define PTRS_PER_PMD 1 60 60 #define PTRS_PER_PGD 2048 61 61 #elif defined(CONFIG_COLDFIRE) 62 62 #define PTRS_PER_PTE 512 63 - #define __PAGETABLE_PMD_FOLDED 63 + #define __PAGETABLE_PMD_FOLDED 1 64 64 #define PTRS_PER_PMD 1 65 65 #define PTRS_PER_PGD 1024 66 66 #else
+1 -1
arch/microblaze/include/asm/pgtable.h
··· 63 63 64 64 #include <asm-generic/4level-fixup.h> 65 65 66 - #define __PAGETABLE_PMD_FOLDED 66 + #define __PAGETABLE_PMD_FOLDED 1 67 67 68 68 #ifdef __KERNEL__ 69 69 #ifndef __ASSEMBLY__
+1 -1
arch/nds32/include/asm/pgtable.h
··· 4 4 #ifndef _ASMNDS32_PGTABLE_H 5 5 #define _ASMNDS32_PGTABLE_H 6 6 7 - #define __PAGETABLE_PMD_FOLDED 7 + #define __PAGETABLE_PMD_FOLDED 1 8 8 #include <asm-generic/4level-fixup.h> 9 9 #include <asm-generic/sizes.h> 10 10
+1 -1
arch/parisc/include/asm/pgtable.h
··· 111 111 #if CONFIG_PGTABLE_LEVELS == 3 112 112 #define BITS_PER_PMD (PAGE_SHIFT + PMD_ORDER - BITS_PER_PMD_ENTRY) 113 113 #else 114 - #define __PAGETABLE_PMD_FOLDED 114 + #define __PAGETABLE_PMD_FOLDED 1 115 115 #define BITS_PER_PMD 0 116 116 #endif 117 117 #define PTRS_PER_PMD (1UL << BITS_PER_PMD)
+1 -1
arch/s390/Makefile
··· 27 27 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) 28 28 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) 29 29 UTS_MACHINE := s390x 30 - STACK_SIZE := $(if $(CONFIG_KASAN),32768,16384) 30 + STACK_SIZE := $(if $(CONFIG_KASAN),65536,16384) 31 31 CHECKFLAGS += -D__s390__ -D__s390x__ 32 32 33 33 export LD_BFD
+8 -8
arch/s390/boot/compressed/Makefile
··· 22 22 OBJECTS := $(addprefix $(obj)/,$(obj-y)) 23 23 24 24 LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T 25 - $(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS) 25 + $(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS) FORCE 26 26 $(call if_changed,ld) 27 27 28 - OBJCOPYFLAGS_info.bin := -O binary --only-section=.vmlinux.info 28 + OBJCOPYFLAGS_info.bin := -O binary --only-section=.vmlinux.info --set-section-flags .vmlinux.info=load 29 29 $(obj)/info.bin: vmlinux FORCE 30 30 $(call if_changed,objcopy) 31 31 ··· 46 46 suffix-$(CONFIG_KERNEL_LZO) := .lzo 47 47 suffix-$(CONFIG_KERNEL_XZ) := .xz 48 48 49 - $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) 49 + $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE 50 50 $(call if_changed,gzip) 51 - $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) 51 + $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE 52 52 $(call if_changed,bzip2) 53 - $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) 53 + $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE 54 54 $(call if_changed,lz4) 55 - $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) 55 + $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE 56 56 $(call if_changed,lzma) 57 - $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) 57 + $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE 58 58 $(call if_changed,lzo) 59 - $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) 59 + $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE 60 60 $(call if_changed,xzkern) 61 61 62 62 OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed
+11 -3
arch/s390/configs/debug_defconfig
··· 64 64 CONFIG_PREEMPT=y 65 65 CONFIG_HZ_100=y 66 66 CONFIG_KEXEC_FILE=y 67 + CONFIG_EXPOLINE=y 68 + CONFIG_EXPOLINE_AUTO=y 67 69 CONFIG_MEMORY_HOTPLUG=y 68 70 CONFIG_MEMORY_HOTREMOVE=y 69 71 CONFIG_KSM=y ··· 86 84 CONFIG_HOTPLUG_PCI=y 87 85 CONFIG_HOTPLUG_PCI_S390=y 88 86 CONFIG_CHSC_SCH=y 87 + CONFIG_VFIO_AP=m 89 88 CONFIG_CRASH_DUMP=y 90 89 CONFIG_BINFMT_MISC=m 91 90 CONFIG_HIBERNATION=y 91 + CONFIG_PM_DEBUG=y 92 92 CONFIG_NET=y 93 93 CONFIG_PACKET=y 94 94 CONFIG_PACKET_DIAG=m ··· 165 161 CONFIG_NF_CT_NETLINK=m 166 162 CONFIG_NF_CT_NETLINK_TIMEOUT=m 167 163 CONFIG_NF_TABLES=m 168 - CONFIG_NFT_EXTHDR=m 169 - CONFIG_NFT_META=m 170 164 CONFIG_NFT_CT=m 171 165 CONFIG_NFT_COUNTER=m 172 166 CONFIG_NFT_LOG=m ··· 367 365 CONFIG_NET_ACT_CSUM=m 368 366 CONFIG_DNS_RESOLVER=y 369 367 CONFIG_OPENVSWITCH=m 368 + CONFIG_VSOCKETS=m 369 + CONFIG_VIRTIO_VSOCKETS=m 370 370 CONFIG_NETLINK_DIAG=m 371 371 CONFIG_CGROUP_NET_PRIO=y 372 372 CONFIG_BPF_JIT=y ··· 465 461 CONFIG_PPPOL2TP=m 466 462 CONFIG_PPP_ASYNC=m 467 463 CONFIG_PPP_SYNC_TTY=m 464 + CONFIG_ISM=m 468 465 CONFIG_INPUT_EVDEV=y 469 466 # CONFIG_INPUT_KEYBOARD is not set 470 467 # CONFIG_INPUT_MOUSE is not set ··· 491 486 CONFIG_MLX5_INFINIBAND=m 492 487 CONFIG_VFIO=m 493 488 CONFIG_VFIO_PCI=m 489 + CONFIG_VFIO_MDEV=m 490 + CONFIG_VFIO_MDEV_DEVICE=m 494 491 CONFIG_VIRTIO_PCI=m 495 492 CONFIG_VIRTIO_BALLOON=m 496 493 CONFIG_VIRTIO_INPUT=y 494 + CONFIG_S390_AP_IOMMU=y 497 495 CONFIG_EXT4_FS=y 498 496 CONFIG_EXT4_FS_POSIX_ACL=y 499 497 CONFIG_EXT4_FS_SECURITY=y ··· 623 615 CONFIG_RCU_TORTURE_TEST=m 624 616 CONFIG_RCU_CPU_STALL_TIMEOUT=300 625 617 CONFIG_NOTIFIER_ERROR_INJECTION=m 626 - CONFIG_PM_NOTIFIER_ERROR_INJECT=m 627 618 CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=m 628 619 CONFIG_FAULT_INJECTION=y 629 620 CONFIG_FAILSLAB=y ··· 734 727 CONFIG_KVM=m 735 728 CONFIG_KVM_S390_UCONTROL=y 736 729 CONFIG_VHOST_NET=m 730 + CONFIG_VHOST_VSOCK=m
+11 -2
arch/s390/configs/performance_defconfig
··· 65 65 CONFIG_NUMA=y 66 66 CONFIG_HZ_100=y 67 67 CONFIG_KEXEC_FILE=y 68 + CONFIG_EXPOLINE=y 69 + CONFIG_EXPOLINE_AUTO=y 68 70 CONFIG_MEMORY_HOTPLUG=y 69 71 CONFIG_MEMORY_HOTREMOVE=y 70 72 CONFIG_KSM=y ··· 84 82 CONFIG_HOTPLUG_PCI=y 85 83 CONFIG_HOTPLUG_PCI_S390=y 86 84 CONFIG_CHSC_SCH=y 85 + CONFIG_VFIO_AP=m 87 86 CONFIG_CRASH_DUMP=y 88 87 CONFIG_BINFMT_MISC=m 89 88 CONFIG_HIBERNATION=y 89 + CONFIG_PM_DEBUG=y 90 90 CONFIG_NET=y 91 91 CONFIG_PACKET=y 92 92 CONFIG_PACKET_DIAG=m ··· 163 159 CONFIG_NF_CT_NETLINK=m 164 160 CONFIG_NF_CT_NETLINK_TIMEOUT=m 165 161 CONFIG_NF_TABLES=m 166 - CONFIG_NFT_EXTHDR=m 167 - CONFIG_NFT_META=m 168 162 CONFIG_NFT_CT=m 169 163 CONFIG_NFT_COUNTER=m 170 164 CONFIG_NFT_LOG=m ··· 364 362 CONFIG_NET_ACT_CSUM=m 365 363 CONFIG_DNS_RESOLVER=y 366 364 CONFIG_OPENVSWITCH=m 365 + CONFIG_VSOCKETS=m 366 + CONFIG_VIRTIO_VSOCKETS=m 367 367 CONFIG_NETLINK_DIAG=m 368 368 CONFIG_CGROUP_NET_PRIO=y 369 369 CONFIG_BPF_JIT=y ··· 462 458 CONFIG_PPPOL2TP=m 463 459 CONFIG_PPP_ASYNC=m 464 460 CONFIG_PPP_SYNC_TTY=m 461 + CONFIG_ISM=m 465 462 CONFIG_INPUT_EVDEV=y 466 463 # CONFIG_INPUT_KEYBOARD is not set 467 464 # CONFIG_INPUT_MOUSE is not set ··· 488 483 CONFIG_MLX5_INFINIBAND=m 489 484 CONFIG_VFIO=m 490 485 CONFIG_VFIO_PCI=m 486 + CONFIG_VFIO_MDEV=m 487 + CONFIG_VFIO_MDEV_DEVICE=m 491 488 CONFIG_VIRTIO_PCI=m 492 489 CONFIG_VIRTIO_BALLOON=m 493 490 CONFIG_VIRTIO_INPUT=y 491 + CONFIG_S390_AP_IOMMU=y 494 492 CONFIG_EXT4_FS=y 495 493 CONFIG_EXT4_FS_POSIX_ACL=y 496 494 CONFIG_EXT4_FS_SECURITY=y ··· 674 666 CONFIG_KVM=m 675 667 CONFIG_KVM_S390_UCONTROL=y 676 668 CONFIG_VHOST_NET=m 669 + CONFIG_VHOST_VSOCK=m
+41 -38
arch/s390/defconfig
··· 26 26 CONFIG_CGROUP_PERF=y 27 27 CONFIG_NAMESPACES=y 28 28 CONFIG_USER_NS=y 29 + CONFIG_CHECKPOINT_RESTORE=y 29 30 CONFIG_BLK_DEV_INITRD=y 30 31 CONFIG_EXPERT=y 31 32 # CONFIG_SYSFS_SYSCALL is not set 32 - CONFIG_CHECKPOINT_RESTORE=y 33 33 CONFIG_BPF_SYSCALL=y 34 34 CONFIG_USERFAULTFD=y 35 35 # CONFIG_COMPAT_BRK is not set 36 36 CONFIG_PROFILING=y 37 + CONFIG_LIVEPATCH=y 38 + CONFIG_NR_CPUS=256 39 + CONFIG_NUMA=y 40 + CONFIG_HZ_100=y 41 + CONFIG_KEXEC_FILE=y 42 + CONFIG_CRASH_DUMP=y 43 + CONFIG_HIBERNATION=y 44 + CONFIG_PM_DEBUG=y 45 + CONFIG_CMM=m 37 46 CONFIG_OPROFILE=y 38 47 CONFIG_KPROBES=y 39 48 CONFIG_JUMP_LABEL=y ··· 53 44 CONFIG_PARTITION_ADVANCED=y 54 45 CONFIG_IBM_PARTITION=y 55 46 CONFIG_DEFAULT_DEADLINE=y 56 - CONFIG_LIVEPATCH=y 57 - CONFIG_NR_CPUS=256 58 - CONFIG_NUMA=y 59 - CONFIG_HZ_100=y 60 - CONFIG_KEXEC_FILE=y 47 + CONFIG_BINFMT_MISC=m 61 48 CONFIG_MEMORY_HOTPLUG=y 62 49 CONFIG_MEMORY_HOTREMOVE=y 63 50 CONFIG_KSM=y ··· 65 60 CONFIG_ZSMALLOC=m 66 61 CONFIG_ZSMALLOC_STAT=y 67 62 CONFIG_IDLE_PAGE_TRACKING=y 68 - CONFIG_CRASH_DUMP=y 69 - CONFIG_BINFMT_MISC=m 70 - CONFIG_HIBERNATION=y 71 63 CONFIG_NET=y 72 64 CONFIG_PACKET=y 73 65 CONFIG_UNIX=y ··· 100 98 CONFIG_BLK_DEV_RAM=y 101 99 CONFIG_VIRTIO_BLK=y 102 100 CONFIG_SCSI=y 101 + # CONFIG_SCSI_MQ_DEFAULT is not set 103 102 CONFIG_BLK_DEV_SD=y 104 103 CONFIG_CHR_DEV_ST=y 105 104 CONFIG_BLK_DEV_SR=y ··· 134 131 CONFIG_TUN=m 135 132 CONFIG_VIRTIO_NET=y 136 133 # CONFIG_NET_VENDOR_ALACRITECH is not set 134 + # CONFIG_NET_VENDOR_AURORA is not set 137 135 # CONFIG_NET_VENDOR_CORTINA is not set 138 136 # CONFIG_NET_VENDOR_SOLARFLARE is not set 139 137 # CONFIG_NET_VENDOR_SOCIONEXT is not set ··· 161 157 CONFIG_TMPFS_POSIX_ACL=y 162 158 CONFIG_HUGETLBFS=y 163 159 # CONFIG_NETWORK_FILESYSTEMS is not set 164 - CONFIG_DEBUG_INFO=y 165 - CONFIG_DEBUG_INFO_DWARF4=y 166 - CONFIG_GDB_SCRIPTS=y 167 - CONFIG_UNUSED_SYMBOLS=y 168 - CONFIG_DEBUG_SECTION_MISMATCH=y 169 - CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y 170 - CONFIG_MAGIC_SYSRQ=y 171 - CONFIG_DEBUG_PAGEALLOC=y 172 - CONFIG_DETECT_HUNG_TASK=y 173 - CONFIG_PANIC_ON_OOPS=y 174 - CONFIG_PROVE_LOCKING=y 175 - CONFIG_LOCK_STAT=y 176 - CONFIG_DEBUG_LOCKDEP=y 177 - CONFIG_DEBUG_ATOMIC_SLEEP=y 178 - CONFIG_DEBUG_LIST=y 179 - CONFIG_DEBUG_SG=y 180 - CONFIG_DEBUG_NOTIFIERS=y 181 - CONFIG_RCU_CPU_STALL_TIMEOUT=60 182 - CONFIG_LATENCYTOP=y 183 - CONFIG_SCHED_TRACER=y 184 - CONFIG_FTRACE_SYSCALLS=y 185 - CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y 186 - CONFIG_STACK_TRACER=y 187 - CONFIG_BLK_DEV_IO_TRACE=y 188 - CONFIG_FUNCTION_PROFILER=y 189 - # CONFIG_RUNTIME_TESTING_MENU is not set 190 - CONFIG_S390_PTDUMP=y 191 160 CONFIG_CRYPTO_CRYPTD=m 192 161 CONFIG_CRYPTO_AUTHENC=m 193 162 CONFIG_CRYPTO_TEST=m ··· 170 193 CONFIG_CRYPTO_CFB=m 171 194 CONFIG_CRYPTO_CTS=m 172 195 CONFIG_CRYPTO_LRW=m 196 + CONFIG_CRYPTO_OFB=m 173 197 CONFIG_CRYPTO_PCBC=m 174 198 CONFIG_CRYPTO_XTS=m 175 199 CONFIG_CRYPTO_CMAC=m ··· 209 231 CONFIG_CRYPTO_USER_API_SKCIPHER=m 210 232 CONFIG_CRYPTO_USER_API_RNG=m 211 233 CONFIG_ZCRYPT=m 212 - CONFIG_ZCRYPT_MULTIDEVNODES=y 213 234 CONFIG_PKEY=m 214 235 CONFIG_CRYPTO_PAES_S390=m 215 236 CONFIG_CRYPTO_SHA1_S390=m ··· 224 247 # CONFIG_XZ_DEC_ARM is not set 225 248 # CONFIG_XZ_DEC_ARMTHUMB is not set 226 249 # CONFIG_XZ_DEC_SPARC is not set 227 - CONFIG_CMM=m 250 + CONFIG_DEBUG_INFO=y 251 + CONFIG_DEBUG_INFO_DWARF4=y 252 + CONFIG_GDB_SCRIPTS=y 253 + CONFIG_UNUSED_SYMBOLS=y 254 + CONFIG_DEBUG_SECTION_MISMATCH=y 255 + CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y 256 + CONFIG_MAGIC_SYSRQ=y 257 + CONFIG_DEBUG_PAGEALLOC=y 258 + CONFIG_DETECT_HUNG_TASK=y 259 + CONFIG_PANIC_ON_OOPS=y 260 + CONFIG_PROVE_LOCKING=y 261 + CONFIG_LOCK_STAT=y 262 + CONFIG_DEBUG_LOCKDEP=y 263 + CONFIG_DEBUG_ATOMIC_SLEEP=y 264 + CONFIG_DEBUG_LIST=y 265 + CONFIG_DEBUG_SG=y 266 + CONFIG_DEBUG_NOTIFIERS=y 267 + CONFIG_RCU_CPU_STALL_TIMEOUT=60 268 + CONFIG_LATENCYTOP=y 269 + CONFIG_SCHED_TRACER=y 270 + CONFIG_FTRACE_SYSCALLS=y 271 + CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y 272 + CONFIG_STACK_TRACER=y 273 + CONFIG_BLK_DEV_IO_TRACE=y 274 + CONFIG_FUNCTION_PROFILER=y 275 + # CONFIG_RUNTIME_TESTING_MENU is not set 276 + CONFIG_S390_PTDUMP=y
-5
arch/s390/include/asm/mmu_context.h
··· 46 46 mm->context.asce_limit = STACK_TOP_MAX; 47 47 mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH | 48 48 _ASCE_USER_BITS | _ASCE_TYPE_REGION3; 49 - /* pgd_alloc() did not account this pud */ 50 - mm_inc_nr_puds(mm); 51 49 break; 52 50 case -PAGE_SIZE: 53 51 /* forked 5-level task, set new asce with new_mm->pgd */ ··· 61 63 /* forked 2-level compat task, set new asce with new mm->pgd */ 62 64 mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH | 63 65 _ASCE_USER_BITS | _ASCE_TYPE_SEGMENT; 64 - /* pgd_alloc() did not account this pmd */ 65 - mm_inc_nr_pmds(mm); 66 - mm_inc_nr_puds(mm); 67 66 } 68 67 crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm)); 69 68 return 0;
+3 -3
arch/s390/include/asm/pgalloc.h
··· 36 36 37 37 static inline unsigned long pgd_entry_type(struct mm_struct *mm) 38 38 { 39 - if (mm->context.asce_limit <= _REGION3_SIZE) 39 + if (mm_pmd_folded(mm)) 40 40 return _SEGMENT_ENTRY_EMPTY; 41 - if (mm->context.asce_limit <= _REGION2_SIZE) 41 + if (mm_pud_folded(mm)) 42 42 return _REGION3_ENTRY_EMPTY; 43 - if (mm->context.asce_limit <= _REGION1_SIZE) 43 + if (mm_p4d_folded(mm)) 44 44 return _REGION2_ENTRY_EMPTY; 45 45 return _REGION1_ENTRY_EMPTY; 46 46 }
+18
arch/s390/include/asm/pgtable.h
··· 493 493 _REGION_ENTRY_PROTECT | \ 494 494 _REGION_ENTRY_NOEXEC) 495 495 496 + static inline bool mm_p4d_folded(struct mm_struct *mm) 497 + { 498 + return mm->context.asce_limit <= _REGION1_SIZE; 499 + } 500 + #define mm_p4d_folded(mm) mm_p4d_folded(mm) 501 + 502 + static inline bool mm_pud_folded(struct mm_struct *mm) 503 + { 504 + return mm->context.asce_limit <= _REGION2_SIZE; 505 + } 506 + #define mm_pud_folded(mm) mm_pud_folded(mm) 507 + 508 + static inline bool mm_pmd_folded(struct mm_struct *mm) 509 + { 510 + return mm->context.asce_limit <= _REGION3_SIZE; 511 + } 512 + #define mm_pmd_folded(mm) mm_pmd_folded(mm) 513 + 496 514 static inline int mm_has_pgste(struct mm_struct *mm) 497 515 { 498 516 #ifdef CONFIG_PGSTE
+1 -1
arch/s390/include/asm/thread_info.h
··· 14 14 * General size of kernel stacks 15 15 */ 16 16 #ifdef CONFIG_KASAN 17 - #define THREAD_SIZE_ORDER 3 17 + #define THREAD_SIZE_ORDER 4 18 18 #else 19 19 #define THREAD_SIZE_ORDER 2 20 20 #endif
+3 -3
arch/s390/include/asm/tlb.h
··· 136 136 static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, 137 137 unsigned long address) 138 138 { 139 - if (tlb->mm->context.asce_limit <= _REGION3_SIZE) 139 + if (mm_pmd_folded(tlb->mm)) 140 140 return; 141 141 pgtable_pmd_page_dtor(virt_to_page(pmd)); 142 142 tlb_remove_table(tlb, pmd); ··· 152 152 static inline void p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d, 153 153 unsigned long address) 154 154 { 155 - if (tlb->mm->context.asce_limit <= _REGION1_SIZE) 155 + if (mm_p4d_folded(tlb->mm)) 156 156 return; 157 157 tlb_remove_table(tlb, p4d); 158 158 } ··· 167 167 static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud, 168 168 unsigned long address) 169 169 { 170 - if (tlb->mm->context.asce_limit <= _REGION2_SIZE) 170 + if (mm_pud_folded(tlb->mm)) 171 171 return; 172 172 tlb_remove_table(tlb, pud); 173 173 }
+3 -3
arch/s390/kernel/entry.S
··· 236 236 stmg %r6,%r15,__SF_GPRS(%r15) # store gprs of prev task 237 237 lghi %r4,__TASK_stack 238 238 lghi %r1,__TASK_thread 239 - lg %r5,0(%r4,%r3) # start of kernel stack of next 239 + llill %r5,STACK_INIT 240 240 stg %r15,__THREAD_ksp(%r1,%r2) # store kernel stack of prev 241 - lgr %r15,%r5 242 - aghi %r15,STACK_INIT # end of kernel stack of next 241 + lg %r15,0(%r4,%r3) # start of kernel stack of next 242 + agr %r15,%r5 # end of kernel stack of next 243 243 stg %r3,__LC_CURRENT # store task struct of next 244 244 stg %r15,__LC_KERNEL_STACK # store end of kernel stack 245 245 lg %r15,__THREAD_ksp(%r1,%r3) # load kernel stack of next
+1 -1
arch/s390/kernel/perf_cpum_cf.c
··· 373 373 return -ENOENT; 374 374 375 375 if (ev > PERF_CPUM_CF_MAX_CTR) 376 - return -EINVAL; 376 + return -ENOENT; 377 377 378 378 /* Obtain the counter set to which the specified counter belongs */ 379 379 set = get_counter_set(ev);
+28 -5
arch/s390/kernel/perf_cpum_sf.c
··· 1842 1842 CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC, PERF_EVENT_CPUM_SF); 1843 1843 CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC_DIAG, PERF_EVENT_CPUM_SF_DIAG); 1844 1844 1845 - static struct attribute *cpumsf_pmu_events_attr[] = { 1846 - CPUMF_EVENT_PTR(SF, SF_CYCLES_BASIC), 1847 - NULL, 1848 - NULL, 1845 + /* Attribute list for CPU_SF. 1846 + * 1847 + * The availablitiy depends on the CPU_MF sampling facility authorization 1848 + * for basic + diagnositic samples. This is determined at initialization 1849 + * time by the sampling facility device driver. 1850 + * If the authorization for basic samples is turned off, it should be 1851 + * also turned off for diagnostic sampling. 1852 + * 1853 + * During initialization of the device driver, check the authorization 1854 + * level for diagnostic sampling and installs the attribute 1855 + * file for diagnostic sampling if necessary. 1856 + * 1857 + * For now install a placeholder to reference all possible attributes: 1858 + * SF_CYCLES_BASIC and SF_CYCLES_BASIC_DIAG. 1859 + * Add another entry for the final NULL pointer. 1860 + */ 1861 + enum { 1862 + SF_CYCLES_BASIC_ATTR_IDX = 0, 1863 + SF_CYCLES_BASIC_DIAG_ATTR_IDX, 1864 + SF_CYCLES_ATTR_MAX 1865 + }; 1866 + 1867 + static struct attribute *cpumsf_pmu_events_attr[SF_CYCLES_ATTR_MAX + 1] = { 1868 + [SF_CYCLES_BASIC_ATTR_IDX] = CPUMF_EVENT_PTR(SF, SF_CYCLES_BASIC) 1849 1869 }; 1850 1870 1851 1871 PMU_FORMAT_ATTR(event, "config:0-63"); ··· 2060 2040 2061 2041 if (si.ad) { 2062 2042 sfb_set_limits(CPUM_SF_MIN_SDB, CPUM_SF_MAX_SDB); 2063 - cpumsf_pmu_events_attr[1] = 2043 + /* Sampling of diagnostic data authorized, 2044 + * install event into attribute list of PMU device. 2045 + */ 2046 + cpumsf_pmu_events_attr[SF_CYCLES_BASIC_DIAG_ATTR_IDX] = 2064 2047 CPUMF_EVENT_PTR(SF, SF_CYCLES_BASIC_DIAG); 2065 2048 } 2066 2049
+3 -3
arch/s390/kernel/vdso32/Makefile
··· 37 37 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so 38 38 39 39 # link rule for the .so file, .lds has to be first 40 - $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) 40 + $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE 41 41 $(call if_changed,vdso32ld) 42 42 43 43 # strip rule for the .so file ··· 46 46 $(call if_changed,objcopy) 47 47 48 48 # assembly rules for the .S files 49 - $(obj-vdso32): %.o: %.S 49 + $(obj-vdso32): %.o: %.S FORCE 50 50 $(call if_changed_dep,vdso32as) 51 51 52 52 # actual build commands 53 53 quiet_cmd_vdso32ld = VDSO32L $@ 54 - cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ 54 + cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@ 55 55 quiet_cmd_vdso32as = VDSO32A $@ 56 56 cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $< 57 57
+3 -3
arch/s390/kernel/vdso64/Makefile
··· 37 37 $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so 38 38 39 39 # link rule for the .so file, .lds has to be first 40 - $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) 40 + $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE 41 41 $(call if_changed,vdso64ld) 42 42 43 43 # strip rule for the .so file ··· 46 46 $(call if_changed,objcopy) 47 47 48 48 # assembly rules for the .S files 49 - $(obj-vdso64): %.o: %.S 49 + $(obj-vdso64): %.o: %.S FORCE 50 50 $(call if_changed_dep,vdso64as) 51 51 52 52 # actual build commands 53 53 quiet_cmd_vdso64ld = VDSO64L $@ 54 - cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ 54 + cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@ 55 55 quiet_cmd_vdso64as = VDSO64A $@ 56 56 cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< 57 57
+2 -2
arch/s390/kernel/vmlinux.lds.S
··· 154 154 * uncompressed image info used by the decompressor 155 155 * it should match struct vmlinux_info 156 156 */ 157 - .vmlinux.info 0 : { 157 + .vmlinux.info 0 (INFO) : { 158 158 QUAD(_stext) /* default_lma */ 159 159 QUAD(startup_continue) /* entry */ 160 160 QUAD(__bss_start - _stext) /* image_size */ 161 161 QUAD(__bss_stop - __bss_start) /* bss_size */ 162 162 QUAD(__boot_data_start) /* bootdata_off */ 163 163 QUAD(__boot_data_end - __boot_data_start) /* bootdata_size */ 164 - } 164 + } :NONE 165 165 166 166 /* Debugging sections. */ 167 167 STABS_DEBUG
+1
arch/s390/mm/pgalloc.c
··· 101 101 mm->context.asce_limit = _REGION1_SIZE; 102 102 mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH | 103 103 _ASCE_USER_BITS | _ASCE_TYPE_REGION2; 104 + mm_inc_nr_puds(mm); 104 105 } else { 105 106 crst_table_init(table, _REGION1_ENTRY_EMPTY); 106 107 pgd_populate(mm, (pgd_t *) table, (p4d_t *) pgd);
+1
arch/s390/numa/numa.c
··· 53 53 { 54 54 return mode->distance ? mode->distance(a, b) : 0; 55 55 } 56 + EXPORT_SYMBOL(__node_distance); 56 57 57 58 int numa_debug_enabled; 58 59
+1 -1
include/asm-generic/4level-fixup.h
··· 3 3 #define _4LEVEL_FIXUP_H 4 4 5 5 #define __ARCH_HAS_4LEVEL_HACK 6 - #define __PAGETABLE_PUD_FOLDED 6 + #define __PAGETABLE_PUD_FOLDED 1 7 7 8 8 #define PUD_SHIFT PGDIR_SHIFT 9 9 #define PUD_SIZE PGDIR_SIZE
+1 -1
include/asm-generic/5level-fixup.h
··· 3 3 #define _5LEVEL_FIXUP_H 4 4 5 5 #define __ARCH_HAS_5LEVEL_HACK 6 - #define __PAGETABLE_P4D_FOLDED 6 + #define __PAGETABLE_P4D_FOLDED 1 7 7 8 8 #define P4D_SHIFT PGDIR_SHIFT 9 9 #define P4D_SIZE PGDIR_SIZE
+1 -1
include/asm-generic/pgtable-nop4d-hack.h
··· 5 5 #ifndef __ASSEMBLY__ 6 6 #include <asm-generic/5level-fixup.h> 7 7 8 - #define __PAGETABLE_PUD_FOLDED 8 + #define __PAGETABLE_PUD_FOLDED 1 9 9 10 10 /* 11 11 * Having the pud type consist of a pgd gets the size right, and allows
+1 -1
include/asm-generic/pgtable-nop4d.h
··· 4 4 5 5 #ifndef __ASSEMBLY__ 6 6 7 - #define __PAGETABLE_P4D_FOLDED 7 + #define __PAGETABLE_P4D_FOLDED 1 8 8 9 9 typedef struct { pgd_t pgd; } p4d_t; 10 10
+1 -1
include/asm-generic/pgtable-nopmd.h
··· 8 8 9 9 struct mm_struct; 10 10 11 - #define __PAGETABLE_PMD_FOLDED 11 + #define __PAGETABLE_PMD_FOLDED 1 12 12 13 13 /* 14 14 * Having the pmd type consist of a pud gets the size right, and allows
+1 -1
include/asm-generic/pgtable-nopud.h
··· 9 9 #else 10 10 #include <asm-generic/pgtable-nop4d.h> 11 11 12 - #define __PAGETABLE_PUD_FOLDED 12 + #define __PAGETABLE_PUD_FOLDED 1 13 13 14 14 /* 15 15 * Having the pud type consist of a p4d gets the size right, and allows
+16
include/asm-generic/pgtable.h
··· 1127 1127 #endif 1128 1128 #endif 1129 1129 1130 + /* 1131 + * On some architectures it depends on the mm if the p4d/pud or pmd 1132 + * layer of the page table hierarchy is folded or not. 1133 + */ 1134 + #ifndef mm_p4d_folded 1135 + #define mm_p4d_folded(mm) __is_defined(__PAGETABLE_P4D_FOLDED) 1136 + #endif 1137 + 1138 + #ifndef mm_pud_folded 1139 + #define mm_pud_folded(mm) __is_defined(__PAGETABLE_PUD_FOLDED) 1140 + #endif 1141 + 1142 + #ifndef mm_pmd_folded 1143 + #define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED) 1144 + #endif 1145 + 1130 1146 #endif /* _ASM_GENERIC_PGTABLE_H */
+8
include/linux/mm.h
··· 1744 1744 1745 1745 static inline void mm_inc_nr_puds(struct mm_struct *mm) 1746 1746 { 1747 + if (mm_pud_folded(mm)) 1748 + return; 1747 1749 atomic_long_add(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); 1748 1750 } 1749 1751 1750 1752 static inline void mm_dec_nr_puds(struct mm_struct *mm) 1751 1753 { 1754 + if (mm_pud_folded(mm)) 1755 + return; 1752 1756 atomic_long_sub(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); 1753 1757 } 1754 1758 #endif ··· 1772 1768 1773 1769 static inline void mm_inc_nr_pmds(struct mm_struct *mm) 1774 1770 { 1771 + if (mm_pmd_folded(mm)) 1772 + return; 1775 1773 atomic_long_add(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); 1776 1774 } 1777 1775 1778 1776 static inline void mm_dec_nr_pmds(struct mm_struct *mm) 1779 1777 { 1778 + if (mm_pmd_folded(mm)) 1779 + return; 1780 1780 atomic_long_sub(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); 1781 1781 } 1782 1782 #endif