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

Merge tag 'v5.11-rc2' into devel

Linux 5.11-rc2

+505 -283
+1 -1
MAINTAINERS
··· 4588 4588 T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 4589 4589 F: Documentation/admin-guide/pm/cpuidle.rst 4590 4590 F: Documentation/driver-api/pm/cpuidle.rst 4591 - F: drivers/cpuidle/* 4591 + F: drivers/cpuidle/ 4592 4592 F: include/linux/cpuidle.h 4593 4593 4594 4594 CPU POWER MONITORING SUBSYSTEM
+1 -1
Makefile
··· 2 2 VERSION = 5 3 3 PATCHLEVEL = 11 4 4 SUBLEVEL = 0 5 - EXTRAVERSION = -rc1 5 + EXTRAVERSION = -rc2 6 6 NAME = Kleptomaniac Octopus 7 7 8 8 # *DOCUMENTATION*
-1
arch/alpha/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
-1
arch/arc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += extable.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += parport.h 7 6 generic-y += user.h
-1
arch/arm/include/asm/Kbuild
··· 2 2 generic-y += early_ioremap.h 3 3 generic-y += extable.h 4 4 generic-y += flat.h 5 - generic-y += local64.h 6 5 generic-y += parport.h 7 6 8 7 generated-y += mach-types.h
-1
arch/arm64/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += early_ioremap.h 3 - generic-y += local64.h 4 3 generic-y += mcs_spinlock.h 5 4 generic-y += qrwlock.h 6 5 generic-y += qspinlock.h
-1
arch/csky/include/asm/Kbuild
··· 2 2 generic-y += asm-offsets.h 3 3 generic-y += gpio.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += qrwlock.h 7 6 generic-y += user.h 8 7 generic-y += vmlinux.lds.h
-1
arch/h8300/include/asm/Kbuild
··· 2 2 generic-y += asm-offsets.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += parport.h 8 7 generic-y += spinlock.h
-1
arch/hexagon/include/asm/Kbuild
··· 2 2 generic-y += extable.h 3 3 generic-y += iomap.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h
-1
arch/ia64/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
+2 -2
arch/ia64/mm/init.c
··· 536 536 537 537 if (map_start < map_end) 538 538 memmap_init_zone((unsigned long)(map_end - map_start), 539 - args->nid, args->zone, page_to_pfn(map_start), 539 + args->nid, args->zone, page_to_pfn(map_start), page_to_pfn(map_end), 540 540 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 541 541 return 0; 542 542 } ··· 546 546 unsigned long start_pfn) 547 547 { 548 548 if (!vmem_map) { 549 - memmap_init_zone(size, nid, zone, start_pfn, 549 + memmap_init_zone(size, nid, zone, start_pfn, start_pfn + size, 550 550 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 551 551 } else { 552 552 struct page *start;
-1
arch/m68k/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += spinlock.h
-1
arch/microblaze/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += parport.h 8 7 generic-y += syscalls.h
-1
arch/mips/include/asm/Kbuild
··· 6 6 generated-y += syscall_table_64_o32.h 7 7 generic-y += export.h 8 8 generic-y += kvm_para.h 9 - generic-y += local64.h 10 9 generic-y += mcs_spinlock.h 11 10 generic-y += parport.h 12 11 generic-y += qrwlock.h
-1
arch/nds32/include/asm/Kbuild
··· 4 4 generic-y += export.h 5 5 generic-y += gpio.h 6 6 generic-y += kvm_para.h 7 - generic-y += local64.h 8 7 generic-y += parport.h 9 8 generic-y += user.h
-1
arch/openrisc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += extable.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += qspinlock_types.h 7 6 generic-y += qspinlock.h
-1
arch/parisc/include/asm/Kbuild
··· 3 3 generated-y += syscall_table_64.h 4 4 generated-y += syscall_table_c32.h 5 5 generic-y += kvm_para.h 6 - generic-y += local64.h 7 6 generic-y += mcs_spinlock.h 8 7 generic-y += user.h
-1
arch/powerpc/include/asm/Kbuild
··· 5 5 generated-y += syscall_table_spu.h 6 6 generic-y += export.h 7 7 generic-y += kvm_types.h 8 - generic-y += local64.h 9 8 generic-y += mcs_spinlock.h 10 9 generic-y += qrwlock.h 11 10 generic-y += vtime.h
-1
arch/riscv/include/asm/Kbuild
··· 3 3 generic-y += extable.h 4 4 generic-y += flat.h 5 5 generic-y += kvm_para.h 6 - generic-y += local64.h 7 6 generic-y += user.h 8 7 generic-y += vmlinux.lds.h
+17 -14
arch/s390/Kconfig
··· 54 54 55 55 config S390 56 56 def_bool y 57 + # 58 + # Note: keep this list sorted alphabetically 59 + # 60 + imply IMA_SECURE_AND_OR_TRUSTED_BOOT 57 61 select ARCH_BINFMT_ELF_STATE 58 62 select ARCH_HAS_DEBUG_VM_PGTABLE 59 63 select ARCH_HAS_DEBUG_WX 60 64 select ARCH_HAS_DEVMEM_IS_ALLOWED 61 65 select ARCH_HAS_ELF_RANDOMIZE 66 + select ARCH_HAS_FORCE_DMA_UNENCRYPTED 62 67 select ARCH_HAS_FORTIFY_SOURCE 63 68 select ARCH_HAS_GCOV_PROFILE_ALL 64 69 select ARCH_HAS_GIGANTIC_PAGE 65 70 select ARCH_HAS_KCOV 66 71 select ARCH_HAS_MEM_ENCRYPT 67 72 select ARCH_HAS_PTE_SPECIAL 73 + select ARCH_HAS_SCALED_CPUTIME 68 74 select ARCH_HAS_SET_MEMORY 69 75 select ARCH_HAS_STRICT_KERNEL_RWX 70 76 select ARCH_HAS_STRICT_MODULE_RWX ··· 117 111 select ARCH_WANT_IPC_PARSE_VERSION 118 112 select BUILDTIME_TABLE_SORT 119 113 select CLONE_BACKWARDS2 114 + select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES 120 115 select DMA_OPS if PCI 121 116 select DYNAMIC_FTRACE if FUNCTION_TRACER 117 + select GENERIC_ALLOCATOR 122 118 select GENERIC_CPU_AUTOPROBE 123 119 select GENERIC_CPU_VULNERABILITIES 124 120 select GENERIC_FIND_FIRST_BIT ··· 134 126 select HAVE_ARCH_JUMP_LABEL_RELATIVE 135 127 select HAVE_ARCH_KASAN 136 128 select HAVE_ARCH_KASAN_VMALLOC 137 - select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES 138 129 select HAVE_ARCH_SECCOMP_FILTER 139 130 select HAVE_ARCH_SOFT_DIRTY 140 131 select HAVE_ARCH_TRACEHOOK 141 132 select HAVE_ARCH_TRANSPARENT_HUGEPAGE 142 133 select HAVE_ARCH_VMAP_STACK 143 134 select HAVE_ASM_MODVERSIONS 144 - select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES 145 135 select HAVE_CMPXCHG_DOUBLE 146 136 select HAVE_CMPXCHG_LOCAL 147 137 select HAVE_DEBUG_KMEMLEAK 148 138 select HAVE_DMA_CONTIGUOUS 149 139 select HAVE_DYNAMIC_FTRACE 150 140 select HAVE_DYNAMIC_FTRACE_WITH_REGS 151 - select HAVE_FAST_GUP 141 + select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES 152 142 select HAVE_EFFICIENT_UNALIGNED_ACCESS 143 + select HAVE_FAST_GUP 153 144 select HAVE_FENTRY 154 145 select HAVE_FTRACE_MCOUNT_RECORD 155 146 select HAVE_FUNCTION_ERROR_INJECTION ··· 170 163 select HAVE_KRETPROBES 171 164 select HAVE_KVM 172 165 select HAVE_LIVEPATCH 173 - select HAVE_PERF_REGS 174 - select HAVE_PERF_USER_STACK_DUMP 175 166 select HAVE_MEMBLOCK_PHYS_MAP 176 - select MMU_GATHER_NO_GATHER 177 167 select HAVE_MOD_ARCH_SPECIFIC 168 + select HAVE_NMI 178 169 select HAVE_NOP_MCOUNT 179 170 select HAVE_OPROFILE 180 171 select HAVE_PCI 181 172 select HAVE_PERF_EVENTS 182 - select MMU_GATHER_RCU_TABLE_FREE 173 + select HAVE_PERF_REGS 174 + select HAVE_PERF_USER_STACK_DUMP 183 175 select HAVE_REGS_AND_STACK_ACCESS_API 184 176 select HAVE_RELIABLE_STACKTRACE 185 177 select HAVE_RSEQ ··· 187 181 select HAVE_VIRT_CPU_ACCOUNTING_IDLE 188 182 select IOMMU_HELPER if PCI 189 183 select IOMMU_SUPPORT if PCI 184 + select MMU_GATHER_NO_GATHER 185 + select MMU_GATHER_RCU_TABLE_FREE 190 186 select MODULES_USE_ELF_RELA 191 187 select NEED_DMA_MAP_STATE if PCI 192 188 select NEED_SG_DMA_LENGTH if PCI ··· 198 190 select PCI_MSI if PCI 199 191 select PCI_MSI_ARCH_FALLBACKS if PCI_MSI 200 192 select SPARSE_IRQ 193 + select SWIOTLB 201 194 select SYSCTL_EXCEPTION_TRACE 202 195 select THREAD_INFO_IN_TASK 203 196 select TTY 204 197 select VIRT_CPU_ACCOUNTING 205 - select ARCH_HAS_SCALED_CPUTIME 206 - select HAVE_NMI 207 - select ARCH_HAS_FORCE_DMA_UNENCRYPTED 208 - select SWIOTLB 209 - select GENERIC_ALLOCATOR 210 - imply IMA_SECURE_AND_OR_TRUSTED_BOOT 211 - 198 + # Note: keep the above list sorted alphabetically 212 199 213 200 config SCHED_OMIT_FRAME_POINTER 214 201 def_bool y
+9 -3
arch/s390/configs/debug_defconfig
··· 61 61 CONFIG_KPROBES=y 62 62 CONFIG_JUMP_LABEL=y 63 63 CONFIG_STATIC_KEYS_SELFTEST=y 64 + CONFIG_SECCOMP_CACHE_DEBUG=y 64 65 CONFIG_LOCK_EVENT_COUNTS=y 66 + # CONFIG_GCC_PLUGINS is not set 65 67 CONFIG_MODULES=y 66 68 CONFIG_MODULE_FORCE_LOAD=y 67 69 CONFIG_MODULE_UNLOAD=y ··· 412 410 CONFIG_SCSI_CONSTANTS=y 413 411 CONFIG_SCSI_LOGGING=y 414 412 CONFIG_SCSI_SPI_ATTRS=m 415 - CONFIG_SCSI_FC_ATTRS=y 413 + CONFIG_SCSI_FC_ATTRS=m 416 414 CONFIG_SCSI_SAS_LIBSAS=m 417 415 CONFIG_SCSI_SRP_ATTRS=m 418 416 CONFIG_ISCSI_TCP=m 419 417 CONFIG_SCSI_DEBUG=m 420 - CONFIG_ZFCP=y 418 + CONFIG_ZFCP=m 421 419 CONFIG_SCSI_VIRTIO=m 422 420 CONFIG_SCSI_DH=y 423 421 CONFIG_SCSI_DH_RDAC=m ··· 446 444 CONFIG_DM_MULTIPATH_QL=m 447 445 CONFIG_DM_MULTIPATH_ST=m 448 446 CONFIG_DM_MULTIPATH_HST=m 447 + CONFIG_DM_MULTIPATH_IOA=m 449 448 CONFIG_DM_DELAY=m 450 449 CONFIG_DM_UEVENT=y 451 450 CONFIG_DM_FLAKEY=m ··· 545 542 # CONFIG_INPUT_MOUSE is not set 546 543 # CONFIG_SERIO is not set 547 544 CONFIG_LEGACY_PTY_COUNT=0 548 - CONFIG_NULL_TTY=m 549 545 CONFIG_VIRTIO_CONSOLE=y 550 546 CONFIG_HW_RANDOM_VIRTIO=m 551 547 CONFIG_RAW_DRIVER=m ··· 576 574 CONFIG_VIRTIO_INPUT=y 577 575 CONFIG_VHOST_NET=m 578 576 CONFIG_VHOST_VSOCK=m 577 + # CONFIG_SURFACE_PLATFORMS is not set 579 578 CONFIG_S390_CCW_IOMMU=y 580 579 CONFIG_S390_AP_IOMMU=y 581 580 CONFIG_EXT4_FS=y ··· 658 655 CONFIG_CIFS_POSIX=y 659 656 # CONFIG_CIFS_DEBUG is not set 660 657 CONFIG_CIFS_DFS_UPCALL=y 658 + CONFIG_CIFS_SWN_UPCALL=y 661 659 CONFIG_NLS_DEFAULT="utf8" 662 660 CONFIG_NLS_CODEPAGE_437=m 663 661 CONFIG_NLS_CODEPAGE_850=m ··· 830 826 CONFIG_BLK_DEV_IO_TRACE=y 831 827 CONFIG_BPF_KPROBE_OVERRIDE=y 832 828 CONFIG_HIST_TRIGGERS=y 829 + CONFIG_FTRACE_STARTUP_TEST=y 830 + # CONFIG_EVENT_TRACE_STARTUP_TEST is not set 833 831 CONFIG_DEBUG_USER_ASCE=y 834 832 CONFIG_NOTIFIER_ERROR_INJECTION=m 835 833 CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=m
+7 -4
arch/s390/configs/defconfig
··· 58 58 CONFIG_OPROFILE=m 59 59 CONFIG_KPROBES=y 60 60 CONFIG_JUMP_LABEL=y 61 + # CONFIG_GCC_PLUGINS is not set 61 62 CONFIG_MODULES=y 62 63 CONFIG_MODULE_FORCE_LOAD=y 63 64 CONFIG_MODULE_UNLOAD=y ··· 96 95 CONFIG_DEFERRED_STRUCT_PAGE_INIT=y 97 96 CONFIG_IDLE_PAGE_TRACKING=y 98 97 CONFIG_PERCPU_STATS=y 99 - CONFIG_GUP_TEST=y 100 98 CONFIG_NET=y 101 99 CONFIG_PACKET=y 102 100 CONFIG_PACKET_DIAG=m ··· 403 403 CONFIG_SCSI_CONSTANTS=y 404 404 CONFIG_SCSI_LOGGING=y 405 405 CONFIG_SCSI_SPI_ATTRS=m 406 - CONFIG_SCSI_FC_ATTRS=y 406 + CONFIG_SCSI_FC_ATTRS=m 407 407 CONFIG_SCSI_SAS_LIBSAS=m 408 408 CONFIG_SCSI_SRP_ATTRS=m 409 409 CONFIG_ISCSI_TCP=m 410 410 CONFIG_SCSI_DEBUG=m 411 - CONFIG_ZFCP=y 411 + CONFIG_ZFCP=m 412 412 CONFIG_SCSI_VIRTIO=m 413 413 CONFIG_SCSI_DH=y 414 414 CONFIG_SCSI_DH_RDAC=m ··· 437 437 CONFIG_DM_MULTIPATH_QL=m 438 438 CONFIG_DM_MULTIPATH_ST=m 439 439 CONFIG_DM_MULTIPATH_HST=m 440 + CONFIG_DM_MULTIPATH_IOA=m 440 441 CONFIG_DM_DELAY=m 441 442 CONFIG_DM_UEVENT=y 442 443 CONFIG_DM_FLAKEY=m ··· 537 536 # CONFIG_INPUT_MOUSE is not set 538 537 # CONFIG_SERIO is not set 539 538 CONFIG_LEGACY_PTY_COUNT=0 540 - CONFIG_NULL_TTY=m 541 539 CONFIG_VIRTIO_CONSOLE=y 542 540 CONFIG_HW_RANDOM_VIRTIO=m 543 541 CONFIG_RAW_DRIVER=m ··· 568 568 CONFIG_VIRTIO_INPUT=y 569 569 CONFIG_VHOST_NET=m 570 570 CONFIG_VHOST_VSOCK=m 571 + # CONFIG_SURFACE_PLATFORMS is not set 571 572 CONFIG_S390_CCW_IOMMU=y 572 573 CONFIG_S390_AP_IOMMU=y 573 574 CONFIG_EXT4_FS=y ··· 646 645 CONFIG_CIFS_POSIX=y 647 646 # CONFIG_CIFS_DEBUG is not set 648 647 CONFIG_CIFS_DFS_UPCALL=y 648 + CONFIG_CIFS_SWN_UPCALL=y 649 649 CONFIG_NLS_DEFAULT="utf8" 650 650 CONFIG_NLS_CODEPAGE_437=m 651 651 CONFIG_NLS_CODEPAGE_850=m ··· 780 778 CONFIG_BLK_DEV_IO_TRACE=y 781 779 CONFIG_BPF_KPROBE_OVERRIDE=y 782 780 CONFIG_HIST_TRIGGERS=y 781 + CONFIG_DEBUG_USER_ASCE=y 783 782 CONFIG_LKDTM=m 784 783 CONFIG_PERCPU_TEST=m 785 784 CONFIG_ATOMIC64_SELFTEST=y
+2
arch/s390/configs/zfcpdump_defconfig
··· 22 22 # CONFIG_VIRTUALIZATION is not set 23 23 # CONFIG_S390_GUEST is not set 24 24 # CONFIG_SECCOMP is not set 25 + # CONFIG_GCC_PLUGINS is not set 25 26 CONFIG_PARTITION_ADVANCED=y 26 27 CONFIG_IBM_PARTITION=y 27 28 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set ··· 59 58 # CONFIG_HID is not set 60 59 # CONFIG_VIRTIO_MENU is not set 61 60 # CONFIG_VHOST_MENU is not set 61 + # CONFIG_SURFACE_PLATFORMS is not set 62 62 # CONFIG_IOMMU_SUPPORT is not set 63 63 # CONFIG_DNOTIFY is not set 64 64 # CONFIG_INOTIFY_USER is not set
-1
arch/s390/include/asm/Kbuild
··· 7 7 generic-y += asm-offsets.h 8 8 generic-y += export.h 9 9 generic-y += kvm_types.h 10 - generic-y += local64.h 11 10 generic-y += mcs_spinlock.h
-1
arch/sh/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += parport.h
-1
arch/sparc/include/asm/Kbuild
··· 6 6 generated-y += syscall_table_c32.h 7 7 generic-y += export.h 8 8 generic-y += kvm_para.h 9 - generic-y += local64.h 10 9 generic-y += mcs_spinlock.h
-1
arch/x86/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
-1
arch/xtensa/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += param.h 8 7 generic-y += qrwlock.h
+7 -6
block/blk-core.c
··· 18 18 #include <linux/bio.h> 19 19 #include <linux/blkdev.h> 20 20 #include <linux/blk-mq.h> 21 + #include <linux/blk-pm.h> 21 22 #include <linux/highmem.h> 22 23 #include <linux/mm.h> 23 24 #include <linux/pagemap.h> ··· 425 424 /** 426 425 * blk_queue_enter() - try to increase q->q_usage_counter 427 426 * @q: request queue pointer 428 - * @flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PREEMPT 427 + * @flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PM 429 428 */ 430 429 int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags) 431 430 { 432 - const bool pm = flags & BLK_MQ_REQ_PREEMPT; 431 + const bool pm = flags & BLK_MQ_REQ_PM; 433 432 434 433 while (true) { 435 434 bool success = false; ··· 441 440 * responsible for ensuring that that counter is 442 441 * globally visible before the queue is unfrozen. 443 442 */ 444 - if (pm || !blk_queue_pm_only(q)) { 443 + if ((pm && queue_rpm_status(q) != RPM_SUSPENDED) || 444 + !blk_queue_pm_only(q)) { 445 445 success = true; 446 446 } else { 447 447 percpu_ref_put(&q->q_usage_counter); ··· 467 465 468 466 wait_event(q->mq_freeze_wq, 469 467 (!q->mq_freeze_depth && 470 - (pm || (blk_pm_request_resume(q), 471 - !blk_queue_pm_only(q)))) || 468 + blk_pm_resume_queue(pm, q)) || 472 469 blk_queue_dying(q)); 473 470 if (blk_queue_dying(q)) 474 471 return -ENODEV; ··· 631 630 struct request *req; 632 631 633 632 WARN_ON_ONCE(op & REQ_NOWAIT); 634 - WARN_ON_ONCE(flags & ~(BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_PREEMPT)); 633 + WARN_ON_ONCE(flags & ~(BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_PM)); 635 634 636 635 req = blk_mq_alloc_request(q, op, flags); 637 636 if (!IS_ERR(req) && q->mq_ops->initialize_rq_fn)
+1 -1
block/blk-mq-debugfs.c
··· 129 129 QUEUE_FLAG_NAME(PCI_P2PDMA), 130 130 QUEUE_FLAG_NAME(ZONE_RESETALL), 131 131 QUEUE_FLAG_NAME(RQ_ALLOC_TIME), 132 + QUEUE_FLAG_NAME(NOWAIT), 132 133 }; 133 134 #undef QUEUE_FLAG_NAME 134 135 ··· 298 297 RQF_NAME(MIXED_MERGE), 299 298 RQF_NAME(MQ_INFLIGHT), 300 299 RQF_NAME(DONTPREP), 301 - RQF_NAME(PREEMPT), 302 300 RQF_NAME(FAILED), 303 301 RQF_NAME(QUIET), 304 302 RQF_NAME(ELVPRIV),
+2 -2
block/blk-mq.c
··· 294 294 rq->mq_hctx = data->hctx; 295 295 rq->rq_flags = 0; 296 296 rq->cmd_flags = data->cmd_flags; 297 - if (data->flags & BLK_MQ_REQ_PREEMPT) 298 - rq->rq_flags |= RQF_PREEMPT; 297 + if (data->flags & BLK_MQ_REQ_PM) 298 + rq->rq_flags |= RQF_PM; 299 299 if (blk_queue_io_stat(data->q)) 300 300 rq->rq_flags |= RQF_IO_STAT; 301 301 INIT_LIST_HEAD(&rq->queuelist);
+9 -6
block/blk-pm.c
··· 67 67 68 68 WARN_ON_ONCE(q->rpm_status != RPM_ACTIVE); 69 69 70 + spin_lock_irq(&q->queue_lock); 71 + q->rpm_status = RPM_SUSPENDING; 72 + spin_unlock_irq(&q->queue_lock); 73 + 70 74 /* 71 75 * Increase the pm_only counter before checking whether any 72 76 * non-PM blk_queue_enter() calls are in progress to avoid that any ··· 93 89 /* Switch q_usage_counter back to per-cpu mode. */ 94 90 blk_mq_unfreeze_queue(q); 95 91 96 - spin_lock_irq(&q->queue_lock); 97 - if (ret < 0) 92 + if (ret < 0) { 93 + spin_lock_irq(&q->queue_lock); 94 + q->rpm_status = RPM_ACTIVE; 98 95 pm_runtime_mark_last_busy(q->dev); 99 - else 100 - q->rpm_status = RPM_SUSPENDING; 101 - spin_unlock_irq(&q->queue_lock); 96 + spin_unlock_irq(&q->queue_lock); 102 97 103 - if (ret) 104 98 blk_clear_pm_only(q); 99 + } 105 100 106 101 return ret; 107 102 }
+9 -5
block/blk-pm.h
··· 6 6 #include <linux/pm_runtime.h> 7 7 8 8 #ifdef CONFIG_PM 9 - static inline void blk_pm_request_resume(struct request_queue *q) 9 + static inline int blk_pm_resume_queue(const bool pm, struct request_queue *q) 10 10 { 11 - if (q->dev && (q->rpm_status == RPM_SUSPENDED || 12 - q->rpm_status == RPM_SUSPENDING)) 13 - pm_request_resume(q->dev); 11 + if (!q->dev || !blk_queue_pm_only(q)) 12 + return 1; /* Nothing to do */ 13 + if (pm && q->rpm_status != RPM_SUSPENDED) 14 + return 1; /* Request allowed */ 15 + pm_request_resume(q->dev); 16 + return 0; 14 17 } 15 18 16 19 static inline void blk_pm_mark_last_busy(struct request *rq) ··· 47 44 --rq->q->nr_pending; 48 45 } 49 46 #else 50 - static inline void blk_pm_request_resume(struct request_queue *q) 47 + static inline int blk_pm_resume_queue(const bool pm, struct request_queue *q) 51 48 { 49 + return 1; 52 50 } 53 51 54 52 static inline void blk_pm_mark_last_busy(struct request *rq)
-1
drivers/cpufreq/intel_pstate.c
··· 3086 3086 intel_pstate.attr = hwp_cpufreq_attrs; 3087 3087 intel_cpufreq.attr = hwp_cpufreq_attrs; 3088 3088 intel_cpufreq.flags |= CPUFREQ_NEED_UPDATE_LIMITS; 3089 - intel_cpufreq.fast_switch = NULL; 3090 3089 intel_cpufreq.adjust_perf = intel_cpufreq_adjust_perf; 3091 3090 if (!default_driver) 3092 3091 default_driver = &intel_pstate;
-1
drivers/ide/ide-atapi.c
··· 223 223 sense_rq->rq_disk = rq->rq_disk; 224 224 sense_rq->cmd_flags = REQ_OP_DRV_IN; 225 225 ide_req(sense_rq)->type = ATA_PRIV_SENSE; 226 - sense_rq->rq_flags |= RQF_PREEMPT; 227 226 228 227 req->cmd[0] = GPCMD_REQUEST_SENSE; 229 228 req->cmd[4] = cmd_len;
+1 -6
drivers/ide/ide-io.c
··· 515 515 * above to return us whatever is in the queue. Since we call 516 516 * ide_do_request() ourselves, we end up taking requests while 517 517 * the queue is blocked... 518 - * 519 - * We let requests forced at head of queue with ide-preempt 520 - * though. I hope that doesn't happen too much, hopefully not 521 - * unless the subdriver triggers such a thing in its own PM 522 - * state machine. 523 518 */ 524 519 if ((drive->dev_flags & IDE_DFLAG_BLOCKED) && 525 520 ata_pm_request(rq) == 0 && 526 - (rq->rq_flags & RQF_PREEMPT) == 0) { 521 + (rq->rq_flags & RQF_PM) == 0) { 527 522 /* there should be no pending command at this point */ 528 523 ide_unlock_port(hwif); 529 524 goto plug_device;
+1 -1
drivers/ide/ide-pm.c
··· 77 77 } 78 78 79 79 memset(&rqpm, 0, sizeof(rqpm)); 80 - rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PREEMPT); 80 + rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PM); 81 81 ide_req(rq)->type = ATA_PRIV_PM_RESUME; 82 82 ide_req(rq)->special = &rqpm; 83 83 rqpm.pm_step = IDE_PM_START_RESUME;
+40 -1
drivers/idle/intel_idle.c
··· 963 963 .enter = NULL } 964 964 }; 965 965 966 + /* 967 + * Note, depending on HW and FW revision, SnowRidge SoC may or may not support 968 + * C6, and this is indicated in the CPUID mwait leaf. 969 + */ 970 + static struct cpuidle_state snr_cstates[] __initdata = { 971 + { 972 + .name = "C1", 973 + .desc = "MWAIT 0x00", 974 + .flags = MWAIT2flg(0x00), 975 + .exit_latency = 2, 976 + .target_residency = 2, 977 + .enter = &intel_idle, 978 + .enter_s2idle = intel_idle_s2idle, }, 979 + { 980 + .name = "C1E", 981 + .desc = "MWAIT 0x01", 982 + .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, 983 + .exit_latency = 15, 984 + .target_residency = 25, 985 + .enter = &intel_idle, 986 + .enter_s2idle = intel_idle_s2idle, }, 987 + { 988 + .name = "C6", 989 + .desc = "MWAIT 0x20", 990 + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, 991 + .exit_latency = 130, 992 + .target_residency = 500, 993 + .enter = &intel_idle, 994 + .enter_s2idle = intel_idle_s2idle, }, 995 + { 996 + .enter = NULL } 997 + }; 998 + 966 999 static const struct idle_cpu idle_cpu_nehalem __initconst = { 967 1000 .state_table = nehalem_cstates, 968 1001 .auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE, ··· 1117 1084 .use_acpi = true, 1118 1085 }; 1119 1086 1087 + static const struct idle_cpu idle_cpu_snr __initconst = { 1088 + .state_table = snr_cstates, 1089 + .disable_promotion_to_c1e = true, 1090 + .use_acpi = true, 1091 + }; 1092 + 1120 1093 static const struct x86_cpu_id intel_idle_ids[] __initconst = { 1121 1094 X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_EP, &idle_cpu_nhx), 1122 1095 X86_MATCH_INTEL_FAM6_MODEL(NEHALEM, &idle_cpu_nehalem), ··· 1161 1122 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT, &idle_cpu_bxt), 1162 1123 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS, &idle_cpu_bxt), 1163 1124 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D, &idle_cpu_dnv), 1164 - X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &idle_cpu_dnv), 1125 + X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &idle_cpu_snr), 1165 1126 {} 1166 1127 }; 1167 1128
+3 -4
drivers/md/dm-crypt.c
··· 3166 3166 } 3167 3167 3168 3168 if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags)) 3169 - cc->crypt_queue = alloc_workqueue("kcryptd-%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 3169 + cc->crypt_queue = alloc_workqueue("kcryptd/%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 3170 3170 1, devname); 3171 3171 else 3172 - cc->crypt_queue = alloc_workqueue("kcryptd-%s", 3173 - WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | 3174 - WQ_UNBOUND | WQ_SYSFS, 3172 + cc->crypt_queue = alloc_workqueue("kcryptd/%s", 3173 + WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, 3175 3174 num_online_cpus(), devname); 3176 3175 if (!cc->crypt_queue) { 3177 3176 ti->error = "Couldn't create kcryptd queue";
+7 -2
drivers/opp/core.c
··· 1092 1092 if (IS_ERR(opp_table->clk)) { 1093 1093 ret = PTR_ERR(opp_table->clk); 1094 1094 if (ret == -EPROBE_DEFER) 1095 - goto err; 1095 + goto remove_opp_dev; 1096 1096 1097 1097 dev_dbg(dev, "%s: Couldn't find clock: %d\n", __func__, ret); 1098 1098 } ··· 1101 1101 ret = dev_pm_opp_of_find_icc_paths(dev, opp_table); 1102 1102 if (ret) { 1103 1103 if (ret == -EPROBE_DEFER) 1104 - goto err; 1104 + goto put_clk; 1105 1105 1106 1106 dev_warn(dev, "%s: Error finding interconnect paths: %d\n", 1107 1107 __func__, ret); ··· 1113 1113 1114 1114 return opp_table; 1115 1115 1116 + put_clk: 1117 + if (!IS_ERR(opp_table->clk)) 1118 + clk_put(opp_table->clk); 1119 + remove_opp_dev: 1120 + _remove_opp_dev(opp_dev, opp_table); 1116 1121 err: 1117 1122 kfree(opp_table); 1118 1123 return ERR_PTR(ret);
+1
drivers/scsi/cxgbi/cxgb4i/Kconfig
··· 4 4 depends on PCI && INET && (IPV6 || IPV6=n) 5 5 depends on THERMAL || !THERMAL 6 6 depends on ETHERNET 7 + depends on TLS || TLS=n 7 8 select NET_VENDOR_CHELSIO 8 9 select CHELSIO_T4 9 10 select CHELSIO_LIB
+1 -1
drivers/scsi/mpt3sas/mpt3sas_base.c
··· 5034 5034 static void 5035 5035 _base_get_diag_triggers(struct MPT3SAS_ADAPTER *ioc) 5036 5036 { 5037 - u16 trigger_flags; 5037 + int trigger_flags; 5038 5038 5039 5039 /* 5040 5040 * Default setting of master trigger.
+14 -13
drivers/scsi/scsi_lib.c
··· 249 249 250 250 req = blk_get_request(sdev->request_queue, 251 251 data_direction == DMA_TO_DEVICE ? 252 - REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT); 252 + REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 253 + rq_flags & RQF_PM ? BLK_MQ_REQ_PM : 0); 253 254 if (IS_ERR(req)) 254 255 return ret; 255 256 rq = scsi_req(req); ··· 1207 1206 scsi_device_state_check(struct scsi_device *sdev, struct request *req) 1208 1207 { 1209 1208 switch (sdev->sdev_state) { 1209 + case SDEV_CREATED: 1210 + return BLK_STS_OK; 1210 1211 case SDEV_OFFLINE: 1211 1212 case SDEV_TRANSPORT_OFFLINE: 1212 1213 /* ··· 1235 1232 return BLK_STS_RESOURCE; 1236 1233 case SDEV_QUIESCE: 1237 1234 /* 1238 - * If the devices is blocked we defer normal commands. 1235 + * If the device is blocked we only accept power management 1236 + * commands. 1239 1237 */ 1240 - if (req && !(req->rq_flags & RQF_PREEMPT)) 1238 + if (req && WARN_ON_ONCE(!(req->rq_flags & RQF_PM))) 1241 1239 return BLK_STS_RESOURCE; 1242 1240 return BLK_STS_OK; 1243 1241 default: 1244 1242 /* 1245 1243 * For any other not fully online state we only allow 1246 - * special commands. In particular any user initiated 1247 - * command is not allowed. 1244 + * power management commands. 1248 1245 */ 1249 - if (req && !(req->rq_flags & RQF_PREEMPT)) 1246 + if (req && !(req->rq_flags & RQF_PM)) 1250 1247 return BLK_STS_IOERR; 1251 1248 return BLK_STS_OK; 1252 1249 } ··· 2519 2516 EXPORT_SYMBOL_GPL(sdev_evt_send_simple); 2520 2517 2521 2518 /** 2522 - * scsi_device_quiesce - Block user issued commands. 2519 + * scsi_device_quiesce - Block all commands except power management. 2523 2520 * @sdev: scsi device to quiesce. 2524 2521 * 2525 2522 * This works by trying to transition to the SDEV_QUIESCE state 2526 2523 * (which must be a legal transition). When the device is in this 2527 - * state, only special requests will be accepted, all others will 2528 - * be deferred. Since special requests may also be requeued requests, 2529 - * a successful return doesn't guarantee the device will be 2530 - * totally quiescent. 2524 + * state, only power management requests will be accepted, all others will 2525 + * be deferred. 2531 2526 * 2532 2527 * Must be called with user context, may sleep. 2533 2528 * ··· 2587 2586 * device deleted during suspend) 2588 2587 */ 2589 2588 mutex_lock(&sdev->state_mutex); 2589 + if (sdev->sdev_state == SDEV_QUIESCE) 2590 + scsi_device_set_state(sdev, SDEV_RUNNING); 2590 2591 if (sdev->quiesced_by) { 2591 2592 sdev->quiesced_by = NULL; 2592 2593 blk_clear_pm_only(sdev->request_queue); 2593 2594 } 2594 - if (sdev->sdev_state == SDEV_QUIESCE) 2595 - scsi_device_set_state(sdev, SDEV_RUNNING); 2596 2595 mutex_unlock(&sdev->state_mutex); 2597 2596 } 2598 2597 EXPORT_SYMBOL(scsi_device_resume);
+19 -8
drivers/scsi/scsi_transport_spi.c
··· 117 117 sshdr = &sshdr_tmp; 118 118 119 119 for(i = 0; i < DV_RETRIES; i++) { 120 + /* 121 + * The purpose of the RQF_PM flag below is to bypass the 122 + * SDEV_QUIESCE state. 123 + */ 120 124 result = scsi_execute(sdev, cmd, dir, buffer, bufflen, sense, 121 125 sshdr, DV_TIMEOUT, /* retries */ 1, 122 126 REQ_FAILFAST_DEV | 123 127 REQ_FAILFAST_TRANSPORT | 124 128 REQ_FAILFAST_DRIVER, 125 - 0, NULL); 129 + RQF_PM, NULL); 126 130 if (driver_byte(result) != DRIVER_SENSE || 127 131 sshdr->sense_key != UNIT_ATTENTION) 128 132 break; ··· 1009 1005 */ 1010 1006 lock_system_sleep(); 1011 1007 1008 + if (scsi_autopm_get_device(sdev)) 1009 + goto unlock_system_sleep; 1010 + 1012 1011 if (unlikely(spi_dv_in_progress(starget))) 1013 - goto unlock; 1012 + goto put_autopm; 1014 1013 1015 1014 if (unlikely(scsi_device_get(sdev))) 1016 - goto unlock; 1015 + goto put_autopm; 1017 1016 1018 1017 spi_dv_in_progress(starget) = 1; 1019 1018 1020 1019 buffer = kzalloc(len, GFP_KERNEL); 1021 1020 1022 1021 if (unlikely(!buffer)) 1023 - goto out_put; 1022 + goto put_sdev; 1024 1023 1025 1024 /* We need to verify that the actual device will quiesce; the 1026 1025 * later target quiesce is just a nice to have */ 1027 1026 if (unlikely(scsi_device_quiesce(sdev))) 1028 - goto out_free; 1027 + goto free_buffer; 1029 1028 1030 1029 scsi_target_quiesce(starget); 1031 1030 ··· 1048 1041 1049 1042 spi_initial_dv(starget) = 1; 1050 1043 1051 - out_free: 1044 + free_buffer: 1052 1045 kfree(buffer); 1053 - out_put: 1046 + 1047 + put_sdev: 1054 1048 spi_dv_in_progress(starget) = 0; 1055 1049 scsi_device_put(sdev); 1056 - unlock: 1050 + put_autopm: 1051 + scsi_autopm_put_device(sdev); 1052 + 1053 + unlock_system_sleep: 1057 1054 unlock_system_sleep(); 1058 1055 } 1059 1056 EXPORT_SYMBOL(spi_dv_device);
+1 -1
drivers/scsi/ufs/ufs-mediatek-trace.h
··· 31 31 32 32 #undef TRACE_INCLUDE_PATH 33 33 #undef TRACE_INCLUDE_FILE 34 - #define TRACE_INCLUDE_PATH . 34 + #define TRACE_INCLUDE_PATH ../../drivers/scsi/ufs/ 35 35 #define TRACE_INCLUDE_FILE ufs-mediatek-trace 36 36 #include <trace/define_trace.h>
+21
drivers/scsi/ufs/ufs-mediatek.c
··· 70 70 return !!(host->caps & UFS_MTK_CAP_VA09_PWR_CTRL); 71 71 } 72 72 73 + static bool ufs_mtk_is_broken_vcc(struct ufs_hba *hba) 74 + { 75 + struct ufs_mtk_host *host = ufshcd_get_variant(hba); 76 + 77 + return !!(host->caps & UFS_MTK_CAP_BROKEN_VCC); 78 + } 79 + 73 80 static void ufs_mtk_cfg_unipro_cg(struct ufs_hba *hba, bool enable) 74 81 { 75 82 u32 tmp; ··· 520 513 521 514 if (of_property_read_bool(np, "mediatek,ufs-disable-ah8")) 522 515 host->caps |= UFS_MTK_CAP_DISABLE_AH8; 516 + 517 + if (of_property_read_bool(np, "mediatek,ufs-broken-vcc")) 518 + host->caps |= UFS_MTK_CAP_BROKEN_VCC; 523 519 524 520 dev_info(hba->dev, "caps: 0x%x", host->caps); 525 521 } ··· 1013 1003 static void ufs_mtk_fixup_dev_quirks(struct ufs_hba *hba) 1014 1004 { 1015 1005 ufshcd_fixup_dev_quirks(hba, ufs_mtk_dev_fixups); 1006 + 1007 + if (ufs_mtk_is_broken_vcc(hba) && hba->vreg_info.vcc && 1008 + (hba->dev_quirks & UFS_DEVICE_QUIRK_DELAY_AFTER_LPM)) { 1009 + hba->vreg_info.vcc->always_on = true; 1010 + /* 1011 + * VCC will be kept always-on thus we don't 1012 + * need any delay during regulator operations 1013 + */ 1014 + hba->dev_quirks &= ~(UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | 1015 + UFS_DEVICE_QUIRK_DELAY_AFTER_LPM); 1016 + } 1016 1017 } 1017 1018 1018 1019 static void ufs_mtk_event_notify(struct ufs_hba *hba,
+1
drivers/scsi/ufs/ufs-mediatek.h
··· 81 81 UFS_MTK_CAP_BOOST_CRYPT_ENGINE = 1 << 0, 82 82 UFS_MTK_CAP_VA09_PWR_CTRL = 1 << 1, 83 83 UFS_MTK_CAP_DISABLE_AH8 = 1 << 2, 84 + UFS_MTK_CAP_BROKEN_VCC = 1 << 3, 84 85 }; 85 86 86 87 struct ufs_mtk_crypt_cfg {
+1 -1
drivers/scsi/ufs/ufs.h
··· 330 330 UFS_DEV_WRITE_BOOSTER_SUP = BIT(8), 331 331 }; 332 332 333 - #define POWER_DESC_MAX_SIZE 0x62 334 333 #define POWER_DESC_MAX_ACTV_ICC_LVLS 16 335 334 336 335 /* Attribute bActiveICCLevel parameter bit masks definitions */ ··· 512 513 struct ufs_vreg { 513 514 struct regulator *reg; 514 515 const char *name; 516 + bool always_on; 515 517 bool enabled; 516 518 int min_uV; 517 519 int max_uV;
+71 -2
drivers/scsi/ufs/ufshcd-pci.c
··· 148 148 { 149 149 struct intel_host *host; 150 150 151 + hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND; 152 + 151 153 host = devm_kzalloc(hba->dev, sizeof(*host), GFP_KERNEL); 152 154 if (!host) 153 155 return -ENOMEM; ··· 165 163 intel_ltr_hide(hba->dev); 166 164 } 167 165 166 + static int ufs_intel_resume(struct ufs_hba *hba, enum ufs_pm_op op) 167 + { 168 + /* 169 + * To support S4 (suspend-to-disk) with spm_lvl other than 5, the base 170 + * address registers must be restored because the restore kernel can 171 + * have used different addresses. 172 + */ 173 + ufshcd_writel(hba, lower_32_bits(hba->utrdl_dma_addr), 174 + REG_UTP_TRANSFER_REQ_LIST_BASE_L); 175 + ufshcd_writel(hba, upper_32_bits(hba->utrdl_dma_addr), 176 + REG_UTP_TRANSFER_REQ_LIST_BASE_H); 177 + ufshcd_writel(hba, lower_32_bits(hba->utmrdl_dma_addr), 178 + REG_UTP_TASK_REQ_LIST_BASE_L); 179 + ufshcd_writel(hba, upper_32_bits(hba->utmrdl_dma_addr), 180 + REG_UTP_TASK_REQ_LIST_BASE_H); 181 + 182 + if (ufshcd_is_link_hibern8(hba)) { 183 + int ret = ufshcd_uic_hibern8_exit(hba); 184 + 185 + if (!ret) { 186 + ufshcd_set_link_active(hba); 187 + } else { 188 + dev_err(hba->dev, "%s: hibern8 exit failed %d\n", 189 + __func__, ret); 190 + /* 191 + * Force reset and restore. Any other actions can lead 192 + * to an unrecoverable state. 193 + */ 194 + ufshcd_set_link_off(hba); 195 + } 196 + } 197 + 198 + return 0; 199 + } 200 + 168 201 static int ufs_intel_ehl_init(struct ufs_hba *hba) 169 202 { 170 203 hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8; ··· 211 174 .init = ufs_intel_common_init, 212 175 .exit = ufs_intel_common_exit, 213 176 .link_startup_notify = ufs_intel_link_startup_notify, 177 + .resume = ufs_intel_resume, 214 178 }; 215 179 216 180 static struct ufs_hba_variant_ops ufs_intel_ehl_hba_vops = { ··· 219 181 .init = ufs_intel_ehl_init, 220 182 .exit = ufs_intel_common_exit, 221 183 .link_startup_notify = ufs_intel_link_startup_notify, 184 + .resume = ufs_intel_resume, 222 185 }; 223 186 224 187 #ifdef CONFIG_PM_SLEEP ··· 246 207 { 247 208 return ufshcd_system_resume(dev_get_drvdata(dev)); 248 209 } 210 + 211 + /** 212 + * ufshcd_pci_poweroff - suspend-to-disk poweroff function 213 + * @dev: pointer to PCI device handle 214 + * 215 + * Returns 0 if successful 216 + * Returns non-zero otherwise 217 + */ 218 + static int ufshcd_pci_poweroff(struct device *dev) 219 + { 220 + struct ufs_hba *hba = dev_get_drvdata(dev); 221 + int spm_lvl = hba->spm_lvl; 222 + int ret; 223 + 224 + /* 225 + * For poweroff we need to set the UFS device to PowerDown mode. 226 + * Force spm_lvl to ensure that. 227 + */ 228 + hba->spm_lvl = 5; 229 + ret = ufshcd_system_suspend(hba); 230 + hba->spm_lvl = spm_lvl; 231 + return ret; 232 + } 233 + 249 234 #endif /* !CONFIG_PM_SLEEP */ 250 235 251 236 #ifdef CONFIG_PM ··· 365 302 } 366 303 367 304 static const struct dev_pm_ops ufshcd_pci_pm_ops = { 368 - SET_SYSTEM_SLEEP_PM_OPS(ufshcd_pci_suspend, 369 - ufshcd_pci_resume) 305 + #ifdef CONFIG_PM_SLEEP 306 + .suspend = ufshcd_pci_suspend, 307 + .resume = ufshcd_pci_resume, 308 + .freeze = ufshcd_pci_suspend, 309 + .thaw = ufshcd_pci_resume, 310 + .poweroff = ufshcd_pci_poweroff, 311 + .restore = ufshcd_pci_resume, 312 + #endif 370 313 SET_RUNTIME_PM_OPS(ufshcd_pci_runtime_suspend, 371 314 ufshcd_pci_runtime_resume, 372 315 ufshcd_pci_runtime_idle)
+29 -16
drivers/scsi/ufs/ufshcd.c
··· 225 225 static int ufshcd_eh_host_reset_handler(struct scsi_cmnd *cmd); 226 226 static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag); 227 227 static void ufshcd_hba_exit(struct ufs_hba *hba); 228 + static int ufshcd_clear_ua_wluns(struct ufs_hba *hba); 228 229 static int ufshcd_probe_hba(struct ufs_hba *hba, bool async); 229 230 static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on); 230 231 static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba); ··· 579 578 names[hba->pwr_info.pwr_rx], 580 579 names[hba->pwr_info.pwr_tx], 581 580 hba->pwr_info.hs_rate); 581 + } 582 + 583 + static void ufshcd_device_reset(struct ufs_hba *hba) 584 + { 585 + int err; 586 + 587 + err = ufshcd_vops_device_reset(hba); 588 + 589 + if (!err) { 590 + ufshcd_set_ufs_dev_active(hba); 591 + if (ufshcd_is_wb_allowed(hba)) { 592 + hba->wb_enabled = false; 593 + hba->wb_buf_flush_enabled = false; 594 + } 595 + } 596 + if (err != -EOPNOTSUPP) 597 + ufshcd_update_evt_hist(hba, UFS_EVT_DEV_RESET, err); 582 598 } 583 599 584 600 void ufshcd_delay_us(unsigned long us, unsigned long tolerance) ··· 3683 3665 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); 3684 3666 if (ret) 3685 3667 dev_err(hba->dev, 3686 - "dme-reset: error code %d\n", ret); 3668 + "dme-enable: error code %d\n", ret); 3687 3669 3688 3670 return ret; 3689 3671 } ··· 3982 3964 spin_unlock_irqrestore(hba->host->host_lock, flags); 3983 3965 3984 3966 /* Reset the attached device */ 3985 - ufshcd_vops_device_reset(hba); 3967 + ufshcd_device_reset(hba); 3986 3968 3987 3969 ret = ufshcd_host_reset_and_restore(hba); 3988 3970 ··· 6948 6930 6949 6931 /* Establish the link again and restore the device */ 6950 6932 err = ufshcd_probe_hba(hba, false); 6951 - 6933 + if (!err) 6934 + ufshcd_clear_ua_wluns(hba); 6952 6935 out: 6953 6936 if (err) 6954 6937 dev_err(hba->dev, "%s: Host init failed %d\n", __func__, err); ··· 6987 6968 6988 6969 do { 6989 6970 /* Reset the attached device */ 6990 - ufshcd_vops_device_reset(hba); 6971 + ufshcd_device_reset(hba); 6991 6972 6992 6973 err = ufshcd_host_reset_and_restore(hba); 6993 6974 } while (err && --retries); ··· 8064 8045 { 8065 8046 int ret = 0; 8066 8047 8067 - if (!vreg || !vreg->enabled) 8048 + if (!vreg || !vreg->enabled || vreg->always_on) 8068 8049 goto out; 8069 8050 8070 8051 ret = regulator_disable(vreg->reg); ··· 8433 8414 * handling context. 8434 8415 */ 8435 8416 hba->host->eh_noresume = 1; 8436 - if (hba->wlun_dev_clr_ua) { 8437 - ret = ufshcd_send_request_sense(hba, sdp); 8438 - if (ret) 8439 - goto out; 8440 - /* Unit attention condition is cleared now */ 8441 - hba->wlun_dev_clr_ua = false; 8442 - } 8417 + ufshcd_clear_ua_wluns(hba); 8443 8418 8444 8419 cmd[4] = pwr_mode << 4; 8445 8420 ··· 8454 8441 8455 8442 if (!ret) 8456 8443 hba->curr_dev_pwr_mode = pwr_mode; 8457 - out: 8444 + 8458 8445 scsi_device_put(sdp); 8459 8446 hba->host->eh_noresume = 0; 8460 8447 return ret; ··· 8760 8747 * further below. 8761 8748 */ 8762 8749 if (ufshcd_is_ufs_dev_deepsleep(hba)) { 8763 - ufshcd_vops_device_reset(hba); 8750 + ufshcd_device_reset(hba); 8764 8751 WARN_ON(!ufshcd_is_link_off(hba)); 8765 8752 } 8766 8753 if (ufshcd_is_link_hibern8(hba) && !ufshcd_uic_hibern8_exit(hba)) ··· 8770 8757 set_dev_active: 8771 8758 /* Can also get here needing to exit DeepSleep */ 8772 8759 if (ufshcd_is_ufs_dev_deepsleep(hba)) { 8773 - ufshcd_vops_device_reset(hba); 8760 + ufshcd_device_reset(hba); 8774 8761 ufshcd_host_reset_and_restore(hba); 8775 8762 } 8776 8763 if (!ufshcd_set_dev_pwr_mode(hba, UFS_ACTIVE_PWR_MODE)) ··· 9366 9353 } 9367 9354 9368 9355 /* Reset the attached device */ 9369 - ufshcd_vops_device_reset(hba); 9356 + ufshcd_device_reset(hba); 9370 9357 9371 9358 ufshcd_init_crypto(hba); 9372 9359
+4 -8
drivers/scsi/ufs/ufshcd.h
··· 1218 1218 hba->vops->dbg_register_dump(hba); 1219 1219 } 1220 1220 1221 - static inline void ufshcd_vops_device_reset(struct ufs_hba *hba) 1221 + static inline int ufshcd_vops_device_reset(struct ufs_hba *hba) 1222 1222 { 1223 - if (hba->vops && hba->vops->device_reset) { 1224 - int err = hba->vops->device_reset(hba); 1223 + if (hba->vops && hba->vops->device_reset) 1224 + return hba->vops->device_reset(hba); 1225 1225 1226 - if (!err) 1227 - ufshcd_set_ufs_dev_active(hba); 1228 - if (err != -EOPNOTSUPP) 1229 - ufshcd_update_evt_hist(hba, UFS_EVT_DEV_RESET, err); 1230 - } 1226 + return -EOPNOTSUPP; 1231 1227 } 1232 1228 1233 1229 static inline void ufshcd_vops_config_scaling_param(struct ufs_hba *hba,
+1 -1
fs/block_dev.c
··· 1055 1055 /** 1056 1056 * bd_abort_claiming - abort claiming of a block device 1057 1057 * @bdev: block device of interest 1058 - * @whole: whole block device 1059 1058 * @holder: holder that has claimed @bdev 1060 1059 * 1061 1060 * Abort claiming of a block device when the exclusive open failed. This can be ··· 1827 1828 /** 1828 1829 * lookup_bdev - lookup a struct block_device by name 1829 1830 * @pathname: special file representing the block device 1831 + * @dev: return value of the block device's dev_t 1830 1832 * 1831 1833 * Get a reference to the blockdevice at @pathname in the current 1832 1834 * namespace if possible and return it. Return ERR_PTR(error)
+22 -31
fs/ceph/mds_client.c
··· 2475 2475 return r; 2476 2476 } 2477 2477 2478 + static void encode_timestamp_and_gids(void **p, 2479 + const struct ceph_mds_request *req) 2480 + { 2481 + struct ceph_timespec ts; 2482 + int i; 2483 + 2484 + ceph_encode_timespec64(&ts, &req->r_stamp); 2485 + ceph_encode_copy(p, &ts, sizeof(ts)); 2486 + 2487 + /* gid_list */ 2488 + ceph_encode_32(p, req->r_cred->group_info->ngroups); 2489 + for (i = 0; i < req->r_cred->group_info->ngroups; i++) 2490 + ceph_encode_64(p, from_kgid(&init_user_ns, 2491 + req->r_cred->group_info->gid[i])); 2492 + } 2493 + 2478 2494 /* 2479 2495 * called under mdsc->mutex 2480 2496 */ ··· 2507 2491 u64 ino1 = 0, ino2 = 0; 2508 2492 int pathlen1 = 0, pathlen2 = 0; 2509 2493 bool freepath1 = false, freepath2 = false; 2510 - int len, i; 2494 + int len; 2511 2495 u16 releases; 2512 2496 void *p, *end; 2513 2497 int ret; ··· 2533 2517 goto out_free1; 2534 2518 } 2535 2519 2536 - if (legacy) { 2537 - /* Old style */ 2538 - len = sizeof(*head); 2539 - } else { 2540 - /* New style: add gid_list and any later fields */ 2541 - len = sizeof(struct ceph_mds_request_head) + sizeof(u32) + 2542 - (sizeof(u64) * req->r_cred->group_info->ngroups); 2543 - } 2544 - 2520 + len = legacy ? sizeof(*head) : sizeof(struct ceph_mds_request_head); 2545 2521 len += pathlen1 + pathlen2 + 2*(1 + sizeof(u32) + sizeof(u64)) + 2546 2522 sizeof(struct ceph_timespec); 2523 + len += sizeof(u32) + (sizeof(u64) * req->r_cred->group_info->ngroups); 2547 2524 2548 2525 /* calculate (max) length for cap releases */ 2549 2526 len += sizeof(struct ceph_mds_request_release) * ··· 2557 2548 msg->hdr.tid = cpu_to_le64(req->r_tid); 2558 2549 2559 2550 /* 2560 - * The old ceph_mds_request_header didn't contain a version field, and 2551 + * The old ceph_mds_request_head didn't contain a version field, and 2561 2552 * one was added when we moved the message version from 3->4. 2562 2553 */ 2563 2554 if (legacy) { ··· 2618 2609 2619 2610 head->num_releases = cpu_to_le16(releases); 2620 2611 2621 - /* time stamp */ 2622 - { 2623 - struct ceph_timespec ts; 2624 - ceph_encode_timespec64(&ts, &req->r_stamp); 2625 - ceph_encode_copy(&p, &ts, sizeof(ts)); 2626 - } 2627 - 2628 - /* gid list */ 2629 - if (!legacy) { 2630 - ceph_encode_32(&p, req->r_cred->group_info->ngroups); 2631 - for (i = 0; i < req->r_cred->group_info->ngroups; i++) 2632 - ceph_encode_64(&p, from_kgid(&init_user_ns, 2633 - req->r_cred->group_info->gid[i])); 2634 - } 2612 + encode_timestamp_and_gids(&p, req); 2635 2613 2636 2614 if (WARN_ON_ONCE(p > end)) { 2637 2615 ceph_msg_put(msg); ··· 2726 2730 /* remove cap/dentry releases from message */ 2727 2731 rhead->num_releases = 0; 2728 2732 2729 - /* time stamp */ 2730 2733 p = msg->front.iov_base + req->r_request_release_offset; 2731 - { 2732 - struct ceph_timespec ts; 2733 - ceph_encode_timespec64(&ts, &req->r_stamp); 2734 - ceph_encode_copy(&p, &ts, sizeof(ts)); 2735 - } 2734 + encode_timestamp_and_gids(&p, req); 2736 2735 2737 2736 msg->front.iov_len = p - msg->front.iov_base; 2738 2737 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
-2
fs/file.c
··· 21 21 #include <linux/rcupdate.h> 22 22 #include <linux/close_range.h> 23 23 #include <net/sock.h> 24 - #include <linux/io_uring.h> 25 24 26 25 unsigned int sysctl_nr_open __read_mostly = 1024*1024; 27 26 unsigned int sysctl_nr_open_min = BITS_PER_LONG; ··· 427 428 struct files_struct * files = tsk->files; 428 429 429 430 if (files) { 430 - io_uring_files_cancel(files); 431 431 task_lock(tsk); 432 432 tsk->files = NULL; 433 433 task_unlock(tsk);
+41 -19
fs/io_uring.c
··· 992 992 ACCT_PINNED, 993 993 }; 994 994 995 + static void destroy_fixed_file_ref_node(struct fixed_file_ref_node *ref_node); 996 + static struct fixed_file_ref_node *alloc_fixed_file_ref_node( 997 + struct io_ring_ctx *ctx); 998 + 995 999 static void __io_complete_rw(struct io_kiocb *req, long res, long res2, 996 1000 struct io_comp_state *cs); 997 1001 static void io_cqring_fill_event(struct io_kiocb *req, long res); ··· 1505 1501 spin_unlock_irq(&ctx->inflight_lock); 1506 1502 req->work.flags |= IO_WQ_WORK_FILES; 1507 1503 } 1504 + if (!(req->work.flags & IO_WQ_WORK_MM) && 1505 + (def->work_flags & IO_WQ_WORK_MM)) { 1506 + if (id->mm != current->mm) 1507 + return false; 1508 + mmgrab(id->mm); 1509 + req->work.flags |= IO_WQ_WORK_MM; 1510 + } 1508 1511 1509 1512 return true; 1510 1513 } ··· 1534 1523 } else { 1535 1524 if (def->unbound_nonreg_file) 1536 1525 req->work.flags |= IO_WQ_WORK_UNBOUND; 1537 - } 1538 - 1539 - /* ->mm can never change on us */ 1540 - if (!(req->work.flags & IO_WQ_WORK_MM) && 1541 - (def->work_flags & IO_WQ_WORK_MM)) { 1542 - mmgrab(id->mm); 1543 - req->work.flags |= IO_WQ_WORK_MM; 1544 1526 } 1545 1527 1546 1528 /* if we fail grabbing identity, we must COW, regrab, and retry */ ··· 7235 7231 complete(&data->done); 7236 7232 } 7237 7233 7234 + static void io_sqe_files_set_node(struct fixed_file_data *file_data, 7235 + struct fixed_file_ref_node *ref_node) 7236 + { 7237 + spin_lock_bh(&file_data->lock); 7238 + file_data->node = ref_node; 7239 + list_add_tail(&ref_node->node, &file_data->ref_list); 7240 + spin_unlock_bh(&file_data->lock); 7241 + percpu_ref_get(&file_data->refs); 7242 + } 7243 + 7238 7244 static int io_sqe_files_unregister(struct io_ring_ctx *ctx) 7239 7245 { 7240 7246 struct fixed_file_data *data = ctx->file_data; 7241 - struct fixed_file_ref_node *ref_node = NULL; 7247 + struct fixed_file_ref_node *backup_node, *ref_node = NULL; 7242 7248 unsigned nr_tables, i; 7249 + int ret; 7243 7250 7244 7251 if (!data) 7245 7252 return -ENXIO; 7253 + backup_node = alloc_fixed_file_ref_node(ctx); 7254 + if (!backup_node) 7255 + return -ENOMEM; 7246 7256 7247 7257 spin_lock_bh(&data->lock); 7248 7258 ref_node = data->node; ··· 7268 7250 7269 7251 /* wait for all refs nodes to complete */ 7270 7252 flush_delayed_work(&ctx->file_put_work); 7271 - wait_for_completion(&data->done); 7253 + do { 7254 + ret = wait_for_completion_interruptible(&data->done); 7255 + if (!ret) 7256 + break; 7257 + ret = io_run_task_work_sig(); 7258 + if (ret < 0) { 7259 + percpu_ref_resurrect(&data->refs); 7260 + reinit_completion(&data->done); 7261 + io_sqe_files_set_node(data, backup_node); 7262 + return ret; 7263 + } 7264 + } while (1); 7272 7265 7273 7266 __io_sqe_files_unregister(ctx); 7274 7267 nr_tables = DIV_ROUND_UP(ctx->nr_user_files, IORING_MAX_FILES_TABLE); ··· 7290 7261 kfree(data); 7291 7262 ctx->file_data = NULL; 7292 7263 ctx->nr_user_files = 0; 7264 + destroy_fixed_file_ref_node(backup_node); 7293 7265 return 0; 7294 7266 } 7295 7267 ··· 7788 7758 return PTR_ERR(ref_node); 7789 7759 } 7790 7760 7791 - file_data->node = ref_node; 7792 - spin_lock_bh(&file_data->lock); 7793 - list_add_tail(&ref_node->node, &file_data->ref_list); 7794 - spin_unlock_bh(&file_data->lock); 7795 - percpu_ref_get(&file_data->refs); 7761 + io_sqe_files_set_node(file_data, ref_node); 7796 7762 return ret; 7797 7763 out_fput: 7798 7764 for (i = 0; i < ctx->nr_user_files; i++) { ··· 7944 7918 7945 7919 if (needs_switch) { 7946 7920 percpu_ref_kill(&data->node->refs); 7947 - spin_lock_bh(&data->lock); 7948 - list_add_tail(&ref_node->node, &data->ref_list); 7949 - data->node = ref_node; 7950 - spin_unlock_bh(&data->lock); 7951 - percpu_ref_get(&ctx->file_data->refs); 7921 + io_sqe_files_set_node(data, ref_node); 7952 7922 } else 7953 7923 destroy_fixed_file_ref_node(ref_node); 7954 7924
+1
include/asm-generic/Kbuild
··· 34 34 mandatory-y += kprobes.h 35 35 mandatory-y += linkage.h 36 36 mandatory-y += local.h 37 + mandatory-y += local64.h 37 38 mandatory-y += mm-arch-hooks.h 38 39 mandatory-y += mmiowb.h 39 40 mandatory-y += mmu.h
+2 -2
include/linux/blk-mq.h
··· 447 447 BLK_MQ_REQ_NOWAIT = (__force blk_mq_req_flags_t)(1 << 0), 448 448 /* allocate from reserved pool */ 449 449 BLK_MQ_REQ_RESERVED = (__force blk_mq_req_flags_t)(1 << 1), 450 - /* set RQF_PREEMPT */ 451 - BLK_MQ_REQ_PREEMPT = (__force blk_mq_req_flags_t)(1 << 3), 450 + /* set RQF_PM */ 451 + BLK_MQ_REQ_PM = (__force blk_mq_req_flags_t)(1 << 2), 452 452 }; 453 453 454 454 struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op,
+13 -5
include/linux/blkdev.h
··· 79 79 #define RQF_MQ_INFLIGHT ((__force req_flags_t)(1 << 6)) 80 80 /* don't call prep for this one */ 81 81 #define RQF_DONTPREP ((__force req_flags_t)(1 << 7)) 82 - /* set for "ide_preempt" requests and also for requests for which the SCSI 83 - "quiesce" state must be ignored. */ 84 - #define RQF_PREEMPT ((__force req_flags_t)(1 << 8)) 85 82 /* vaguely specified driver internal error. Ignored by the block layer */ 86 83 #define RQF_FAILED ((__force req_flags_t)(1 << 10)) 87 84 /* don't warn about errors */ ··· 427 430 unsigned long queue_flags; 428 431 /* 429 432 * Number of contexts that have called blk_set_pm_only(). If this 430 - * counter is above zero then only RQF_PM and RQF_PREEMPT requests are 431 - * processed. 433 + * counter is above zero then only RQF_PM requests are processed. 432 434 */ 433 435 atomic_t pm_only; 434 436 ··· 691 695 { 692 696 return q->mq_ops; 693 697 } 698 + 699 + #ifdef CONFIG_PM 700 + static inline enum rpm_status queue_rpm_status(struct request_queue *q) 701 + { 702 + return q->rpm_status; 703 + } 704 + #else 705 + static inline enum rpm_status queue_rpm_status(struct request_queue *q) 706 + { 707 + return RPM_ACTIVE; 708 + } 709 + #endif 694 710 695 711 static inline enum blk_zoned_model 696 712 blk_queue_zoned_model(struct request_queue *q)
-5
include/linux/build_bug.h
··· 77 77 #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) 78 78 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) 79 79 80 - #ifdef __GENKSYMS__ 81 - /* genksyms gets confused by _Static_assert */ 82 - #define _Static_assert(expr, ...) 83 - #endif 84 - 85 80 #endif /* _LINUX_BUILD_BUG_H */
+2 -2
include/linux/ceph/msgr.h
··· 33 33 #define CEPH_MSGR2_INCARNATION_1 (0ull) 34 34 35 35 #define DEFINE_MSGR2_FEATURE(bit, incarnation, name) \ 36 - static const uint64_t CEPH_MSGR2_FEATURE_##name = (1ULL << bit); \ 37 - static const uint64_t CEPH_MSGR2_FEATUREMASK_##name = \ 36 + static const uint64_t __maybe_unused CEPH_MSGR2_FEATURE_##name = (1ULL << bit); \ 37 + static const uint64_t __maybe_unused CEPH_MSGR2_FEATUREMASK_##name = \ 38 38 (1ULL << bit | CEPH_MSGR2_INCARNATION_##incarnation); 39 39 40 40 #define HAVE_MSGR2_FEATURE(x, name) \
+11 -11
include/linux/kdev_t.h
··· 21 21 }) 22 22 23 23 /* acceptable for old filesystems */ 24 - static inline bool old_valid_dev(dev_t dev) 24 + static __always_inline bool old_valid_dev(dev_t dev) 25 25 { 26 26 return MAJOR(dev) < 256 && MINOR(dev) < 256; 27 27 } 28 28 29 - static inline u16 old_encode_dev(dev_t dev) 29 + static __always_inline u16 old_encode_dev(dev_t dev) 30 30 { 31 31 return (MAJOR(dev) << 8) | MINOR(dev); 32 32 } 33 33 34 - static inline dev_t old_decode_dev(u16 val) 34 + static __always_inline dev_t old_decode_dev(u16 val) 35 35 { 36 36 return MKDEV((val >> 8) & 255, val & 255); 37 37 } 38 38 39 - static inline u32 new_encode_dev(dev_t dev) 39 + static __always_inline u32 new_encode_dev(dev_t dev) 40 40 { 41 41 unsigned major = MAJOR(dev); 42 42 unsigned minor = MINOR(dev); 43 43 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); 44 44 } 45 45 46 - static inline dev_t new_decode_dev(u32 dev) 46 + static __always_inline dev_t new_decode_dev(u32 dev) 47 47 { 48 48 unsigned major = (dev & 0xfff00) >> 8; 49 49 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); 50 50 return MKDEV(major, minor); 51 51 } 52 52 53 - static inline u64 huge_encode_dev(dev_t dev) 53 + static __always_inline u64 huge_encode_dev(dev_t dev) 54 54 { 55 55 return new_encode_dev(dev); 56 56 } 57 57 58 - static inline dev_t huge_decode_dev(u64 dev) 58 + static __always_inline dev_t huge_decode_dev(u64 dev) 59 59 { 60 60 return new_decode_dev(dev); 61 61 } 62 62 63 - static inline int sysv_valid_dev(dev_t dev) 63 + static __always_inline int sysv_valid_dev(dev_t dev) 64 64 { 65 65 return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18); 66 66 } 67 67 68 - static inline u32 sysv_encode_dev(dev_t dev) 68 + static __always_inline u32 sysv_encode_dev(dev_t dev) 69 69 { 70 70 return MINOR(dev) | (MAJOR(dev) << 18); 71 71 } 72 72 73 - static inline unsigned sysv_major(u32 dev) 73 + static __always_inline unsigned sysv_major(u32 dev) 74 74 { 75 75 return (dev >> 18) & 0x3fff; 76 76 } 77 77 78 - static inline unsigned sysv_minor(u32 dev) 78 + static __always_inline unsigned sysv_minor(u32 dev) 79 79 { 80 80 return dev & 0x3ffff; 81 81 }
+10 -2
include/linux/mm.h
··· 216 216 loff_t *); 217 217 int overcommit_policy_handler(struct ctl_table *, int, void *, size_t *, 218 218 loff_t *); 219 + /* 220 + * Any attempt to mark this function as static leads to build failure 221 + * when CONFIG_DEBUG_INFO_BTF is enabled because __add_to_page_cache_locked() 222 + * is referred to by BPF code. This must be visible for error injection. 223 + */ 224 + int __add_to_page_cache_locked(struct page *page, struct address_space *mapping, 225 + pgoff_t index, gfp_t gfp, void **shadowp); 219 226 220 227 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) 221 228 ··· 2439 2432 #endif 2440 2433 2441 2434 extern void set_dma_reserve(unsigned long new_dma_reserve); 2442 - extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long, 2443 - enum meminit_context, struct vmem_altmap *, int migratetype); 2435 + extern void memmap_init_zone(unsigned long, int, unsigned long, 2436 + unsigned long, unsigned long, enum meminit_context, 2437 + struct vmem_altmap *, int migratetype); 2444 2438 extern void setup_per_zone_wmarks(void); 2445 2439 extern int __meminit init_per_zone_wmark_min(void); 2446 2440 extern void mem_init(void);
+3
include/linux/sizes.h
··· 44 44 #define SZ_2G 0x80000000 45 45 46 46 #define SZ_4G _AC(0x100000000, ULL) 47 + #define SZ_8G _AC(0x200000000, ULL) 48 + #define SZ_16G _AC(0x400000000, ULL) 49 + #define SZ_32G _AC(0x800000000, ULL) 47 50 #define SZ_64T _AC(0x400000000000, ULL) 48 51 49 52 #endif /* __LINUX_SIZES_H__ */
+2
kernel/cgroup/cgroup-v1.c
··· 908 908 opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); 909 909 if (opt == -ENOPARAM) { 910 910 if (strcmp(param->key, "source") == 0) { 911 + if (fc->source) 912 + return invalf(fc, "Multiple sources not supported"); 911 913 fc->source = param->string; 912 914 param->string = NULL; 913 915 return 0;
+15 -15
kernel/cgroup/cgroup.c
··· 244 244 * 245 245 * The default hierarchy is the v2 interface of cgroup and this function 246 246 * can be used to test whether a cgroup is on the default hierarchy for 247 - * cases where a subsystem should behave differnetly depending on the 247 + * cases where a subsystem should behave differently depending on the 248 248 * interface version. 249 249 * 250 250 * List of changed behaviors: ··· 262 262 * "cgroup.procs" instead. 263 263 * 264 264 * - "cgroup.procs" is not sorted. pids will be unique unless they got 265 - * recycled inbetween reads. 265 + * recycled in-between reads. 266 266 * 267 267 * - "release_agent" and "notify_on_release" are removed. Replacement 268 268 * notification mechanism will be implemented. ··· 342 342 return !cgroup_parent(cgrp); 343 343 } 344 344 345 - /* can @cgrp become a thread root? should always be true for a thread root */ 345 + /* can @cgrp become a thread root? Should always be true for a thread root */ 346 346 static bool cgroup_can_be_thread_root(struct cgroup *cgrp) 347 347 { 348 348 /* mixables don't care */ ··· 527 527 * the root css is returned, so this function always returns a valid css. 528 528 * 529 529 * The returned css is not guaranteed to be online, and therefore it is the 530 - * callers responsiblity to tryget a reference for it. 530 + * callers responsibility to try get a reference for it. 531 531 */ 532 532 struct cgroup_subsys_state *cgroup_e_css(struct cgroup *cgrp, 533 533 struct cgroup_subsys *ss) ··· 699 699 ; \ 700 700 else 701 701 702 - /* walk live descendants in preorder */ 702 + /* walk live descendants in pre order */ 703 703 #define cgroup_for_each_live_descendant_pre(dsct, d_css, cgrp) \ 704 704 css_for_each_descendant_pre((d_css), cgroup_css((cgrp), NULL)) \ 705 705 if (({ lockdep_assert_held(&cgroup_mutex); \ ··· 933 933 934 934 WARN_ON_ONCE(!list_empty(&cset->threaded_csets)); 935 935 936 - /* This css_set is dead. unlink it and release cgroup and css refs */ 936 + /* This css_set is dead. Unlink it and release cgroup and css refs */ 937 937 for_each_subsys(ss, ssid) { 938 938 list_del(&cset->e_cset_node[ssid]); 939 939 css_put(cset->subsys[ssid]); ··· 1058 1058 1059 1059 /* 1060 1060 * Build the set of subsystem state objects that we want to see in the 1061 - * new css_set. while subsystems can change globally, the entries here 1061 + * new css_set. While subsystems can change globally, the entries here 1062 1062 * won't change, so no need for locking. 1063 1063 */ 1064 1064 for_each_subsys(ss, i) { ··· 1148 1148 1149 1149 /* 1150 1150 * Always add links to the tail of the lists so that the lists are 1151 - * in choronological order. 1151 + * in chronological order. 1152 1152 */ 1153 1153 list_move_tail(&link->cset_link, &cgrp->cset_links); 1154 1154 list_add_tail(&link->cgrp_link, &cset->cgrp_links); ··· 3654 3654 3655 3655 static int cgroup_file_open(struct kernfs_open_file *of) 3656 3656 { 3657 - struct cftype *cft = of->kn->priv; 3657 + struct cftype *cft = of_cft(of); 3658 3658 3659 3659 if (cft->open) 3660 3660 return cft->open(of); ··· 3663 3663 3664 3664 static void cgroup_file_release(struct kernfs_open_file *of) 3665 3665 { 3666 - struct cftype *cft = of->kn->priv; 3666 + struct cftype *cft = of_cft(of); 3667 3667 3668 3668 if (cft->release) 3669 3669 cft->release(of); ··· 3674 3674 { 3675 3675 struct cgroup_namespace *ns = current->nsproxy->cgroup_ns; 3676 3676 struct cgroup *cgrp = of->kn->parent->priv; 3677 - struct cftype *cft = of->kn->priv; 3677 + struct cftype *cft = of_cft(of); 3678 3678 struct cgroup_subsys_state *css; 3679 3679 int ret; 3680 3680 ··· 3724 3724 3725 3725 static __poll_t cgroup_file_poll(struct kernfs_open_file *of, poll_table *pt) 3726 3726 { 3727 - struct cftype *cft = of->kn->priv; 3727 + struct cftype *cft = of_cft(of); 3728 3728 3729 3729 if (cft->poll) 3730 3730 return cft->poll(of, pt); ··· 4134 4134 * implies that if we observe !CSS_RELEASED on @pos in this RCU 4135 4135 * critical section, the one pointed to by its next pointer is 4136 4136 * guaranteed to not have finished its RCU grace period even if we 4137 - * have dropped rcu_read_lock() inbetween iterations. 4137 + * have dropped rcu_read_lock() in-between iterations. 4138 4138 * 4139 4139 * If @pos has CSS_RELEASED set, its next pointer can't be 4140 4140 * dereferenced; however, as each css is given a monotonically ··· 4382 4382 } 4383 4383 4384 4384 /** 4385 - * css_task_iter_advance_css_set - advance a task itererator to the next css_set 4385 + * css_task_iter_advance_css_set - advance a task iterator to the next css_set 4386 4386 * @it: the iterator to advance 4387 4387 * 4388 4388 * Advance @it to the next css_set to walk. ··· 6308 6308 * 6309 6309 * Find the cgroup at @path on the default hierarchy, increment its 6310 6310 * reference count and return it. Returns pointer to the found cgroup on 6311 - * success, ERR_PTR(-ENOENT) if @path doens't exist and ERR_PTR(-ENOTDIR) 6311 + * success, ERR_PTR(-ENOENT) if @path doesn't exist and ERR_PTR(-ENOTDIR) 6312 6312 * if @path points to a non-directory. 6313 6313 */ 6314 6314 struct cgroup *cgroup_get_from_path(const char *path)
+2
kernel/exit.c
··· 63 63 #include <linux/random.h> 64 64 #include <linux/rcuwait.h> 65 65 #include <linux/compat.h> 66 + #include <linux/io_uring.h> 66 67 67 68 #include <linux/uaccess.h> 68 69 #include <asm/unistd.h> ··· 777 776 schedule(); 778 777 } 779 778 779 + io_uring_files_cancel(tsk->files); 780 780 exit_signals(tsk); /* sets PF_EXITING */ 781 781 782 782 /* sync mm's RSS info before statistics gathering */
+10 -3
kernel/workqueue.c
··· 3731 3731 * is updated and visible. 3732 3732 */ 3733 3733 if (!freezable || !workqueue_freezing) { 3734 + bool kick = false; 3735 + 3734 3736 pwq->max_active = wq->saved_max_active; 3735 3737 3736 3738 while (!list_empty(&pwq->delayed_works) && 3737 - pwq->nr_active < pwq->max_active) 3739 + pwq->nr_active < pwq->max_active) { 3738 3740 pwq_activate_first_delayed(pwq); 3741 + kick = true; 3742 + } 3739 3743 3740 3744 /* 3741 3745 * Need to kick a worker after thawed or an unbound wq's 3742 - * max_active is bumped. It's a slow path. Do it always. 3746 + * max_active is bumped. In realtime scenarios, always kicking a 3747 + * worker will cause interference on the isolated cpu cores, so 3748 + * let's kick iff work items were activated. 3743 3749 */ 3744 - wake_up_worker(pwq->pool); 3750 + if (kick) 3751 + wake_up_worker(pwq->pool); 3745 3752 } else { 3746 3753 pwq->max_active = 0; 3747 3754 }
+13 -12
lib/genalloc.c
··· 81 81 * users set the same bit, one user will return remain bits, otherwise 82 82 * return 0. 83 83 */ 84 - static int bitmap_set_ll(unsigned long *map, int start, int nr) 84 + static int bitmap_set_ll(unsigned long *map, unsigned long start, unsigned long nr) 85 85 { 86 86 unsigned long *p = map + BIT_WORD(start); 87 - const int size = start + nr; 87 + const unsigned long size = start + nr; 88 88 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); 89 89 unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start); 90 90 91 - while (nr - bits_to_set >= 0) { 91 + while (nr >= bits_to_set) { 92 92 if (set_bits_ll(p, mask_to_set)) 93 93 return nr; 94 94 nr -= bits_to_set; ··· 116 116 * users clear the same bit, one user will return remain bits, 117 117 * otherwise return 0. 118 118 */ 119 - static int bitmap_clear_ll(unsigned long *map, int start, int nr) 119 + static unsigned long 120 + bitmap_clear_ll(unsigned long *map, unsigned long start, unsigned long nr) 120 121 { 121 122 unsigned long *p = map + BIT_WORD(start); 122 - const int size = start + nr; 123 + const unsigned long size = start + nr; 123 124 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); 124 125 unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start); 125 126 126 - while (nr - bits_to_clear >= 0) { 127 + while (nr >= bits_to_clear) { 127 128 if (clear_bits_ll(p, mask_to_clear)) 128 129 return nr; 129 130 nr -= bits_to_clear; ··· 184 183 size_t size, int nid, void *owner) 185 184 { 186 185 struct gen_pool_chunk *chunk; 187 - int nbits = size >> pool->min_alloc_order; 188 - int nbytes = sizeof(struct gen_pool_chunk) + 186 + unsigned long nbits = size >> pool->min_alloc_order; 187 + unsigned long nbytes = sizeof(struct gen_pool_chunk) + 189 188 BITS_TO_LONGS(nbits) * sizeof(long); 190 189 191 190 chunk = vzalloc_node(nbytes, nid); ··· 243 242 struct list_head *_chunk, *_next_chunk; 244 243 struct gen_pool_chunk *chunk; 245 244 int order = pool->min_alloc_order; 246 - int bit, end_bit; 245 + unsigned long bit, end_bit; 247 246 248 247 list_for_each_safe(_chunk, _next_chunk, &pool->chunks) { 249 248 chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); ··· 279 278 struct gen_pool_chunk *chunk; 280 279 unsigned long addr = 0; 281 280 int order = pool->min_alloc_order; 282 - int nbits, start_bit, end_bit, remain; 281 + unsigned long nbits, start_bit, end_bit, remain; 283 282 284 283 #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 285 284 BUG_ON(in_nmi()); ··· 488 487 { 489 488 struct gen_pool_chunk *chunk; 490 489 int order = pool->min_alloc_order; 491 - int start_bit, nbits, remain; 490 + unsigned long start_bit, nbits, remain; 492 491 493 492 #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 494 493 BUG_ON(in_nmi()); ··· 756 755 index = bitmap_find_next_zero_area(map, size, start, nr, 0); 757 756 758 757 while (index < size) { 759 - int next_bit = find_next_bit(map, size, index + nr); 758 + unsigned long next_bit = find_next_bit(map, size, index + nr); 760 759 if ((next_bit - index) < len) { 761 760 len = next_bit - index; 762 761 start_bit = index;
+1 -1
lib/zlib_dfltcc/Makefile
··· 8 8 9 9 obj-$(CONFIG_ZLIB_DFLTCC) += zlib_dfltcc.o 10 10 11 - zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o dfltcc_syms.o 11 + zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o
+5 -1
lib/zlib_dfltcc/dfltcc.c
··· 1 1 // SPDX-License-Identifier: Zlib 2 2 /* dfltcc.c - SystemZ DEFLATE CONVERSION CALL support. */ 3 3 4 - #include <linux/zutil.h> 4 + #include <linux/export.h> 5 + #include <linux/module.h> 5 6 #include "dfltcc_util.h" 6 7 #include "dfltcc.h" 7 8 ··· 54 53 dfltcc_state->dht_threshold = DFLTCC_DHT_MIN_SAMPLE_SIZE; 55 54 dfltcc_state->param.ribm = DFLTCC_RIBM; 56 55 } 56 + EXPORT_SYMBOL(dfltcc_reset); 57 + 58 + MODULE_LICENSE("GPL");
+3
lib/zlib_dfltcc/dfltcc_deflate.c
··· 4 4 #include "dfltcc_util.h" 5 5 #include "dfltcc.h" 6 6 #include <asm/setup.h> 7 + #include <linux/export.h> 7 8 #include <linux/zutil.h> 8 9 9 10 /* ··· 35 34 36 35 return 1; 37 36 } 37 + EXPORT_SYMBOL(dfltcc_can_deflate); 38 38 39 39 static void dfltcc_gdht( 40 40 z_streamp strm ··· 279 277 goto again; /* deflate() must use all input or all output */ 280 278 return 1; 281 279 } 280 + EXPORT_SYMBOL(dfltcc_deflate);
+2 -2
lib/zlib_dfltcc/dfltcc_inflate.c
··· 125 125 param->ho = (state->write - state->whave) & ((1 << HB_BITS) - 1); 126 126 if (param->hl) 127 127 param->nt = 0; /* Honor history for the first block */ 128 - param->cv = state->flags ? REVERSE(state->check) : state->check; 128 + param->cv = state->check; 129 129 130 130 /* Inflate */ 131 131 do { ··· 138 138 state->bits = param->sbb; 139 139 state->whave = param->hl; 140 140 state->write = (param->ho + param->hl) & ((1 << HB_BITS) - 1); 141 - state->check = state->flags ? REVERSE(param->cv) : param->cv; 141 + state->check = param->cv; 142 142 if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { 143 143 /* Report an error if stream is corrupted */ 144 144 state->mode = BAD;
-17
lib/zlib_dfltcc/dfltcc_syms.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * linux/lib/zlib_dfltcc/dfltcc_syms.c 4 - * 5 - * Exported symbols for the s390 zlib dfltcc support. 6 - * 7 - */ 8 - 9 - #include <linux/init.h> 10 - #include <linux/module.h> 11 - #include <linux/zlib.h> 12 - #include "dfltcc.h" 13 - 14 - EXPORT_SYMBOL(dfltcc_can_deflate); 15 - EXPORT_SYMBOL(dfltcc_deflate); 16 - EXPORT_SYMBOL(dfltcc_reset); 17 - MODULE_LICENSE("GPL");
+21 -1
mm/hugetlb.c
··· 4105 4105 * may get SIGKILLed if it later faults. 4106 4106 */ 4107 4107 if (outside_reserve) { 4108 + struct address_space *mapping = vma->vm_file->f_mapping; 4109 + pgoff_t idx; 4110 + u32 hash; 4111 + 4108 4112 put_page(old_page); 4109 4113 BUG_ON(huge_pte_none(pte)); 4114 + /* 4115 + * Drop hugetlb_fault_mutex and i_mmap_rwsem before 4116 + * unmapping. unmapping needs to hold i_mmap_rwsem 4117 + * in write mode. Dropping i_mmap_rwsem in read mode 4118 + * here is OK as COW mappings do not interact with 4119 + * PMD sharing. 4120 + * 4121 + * Reacquire both after unmap operation. 4122 + */ 4123 + idx = vma_hugecache_offset(h, vma, haddr); 4124 + hash = hugetlb_fault_mutex_hash(mapping, idx); 4125 + mutex_unlock(&hugetlb_fault_mutex_table[hash]); 4126 + i_mmap_unlock_read(mapping); 4127 + 4110 4128 unmap_ref_private(mm, vma, old_page, haddr); 4111 - BUG_ON(huge_pte_none(pte)); 4129 + 4130 + i_mmap_lock_read(mapping); 4131 + mutex_lock(&hugetlb_fault_mutex_table[hash]); 4112 4132 spin_lock(ptl); 4113 4133 ptep = huge_pte_offset(mm, haddr, huge_page_size(h)); 4114 4134 if (likely(ptep &&
+2
mm/kasan/generic.c
··· 337 337 cache = page->slab_cache; 338 338 object = nearest_obj(cache, page, addr); 339 339 alloc_meta = kasan_get_alloc_meta(cache, object); 340 + if (!alloc_meta) 341 + return; 340 342 341 343 alloc_meta->aux_stack[1] = alloc_meta->aux_stack[0]; 342 344 alloc_meta->aux_stack[0] = kasan_save_stack(GFP_NOWAIT);
+5 -3
mm/memory.c
··· 2892 2892 entry = mk_pte(new_page, vma->vm_page_prot); 2893 2893 entry = pte_sw_mkyoung(entry); 2894 2894 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 2895 + 2895 2896 /* 2896 2897 * Clear the pte entry and flush it first, before updating the 2897 - * pte with the new entry. This will avoid a race condition 2898 - * seen in the presence of one thread doing SMC and another 2899 - * thread doing COW. 2898 + * pte with the new entry, to keep TLBs on different CPUs in 2899 + * sync. This code used to set the new PTE then flush TLBs, but 2900 + * that left a window where the new PTE could be loaded into 2901 + * some TLBs while the old PTE remains in others. 2900 2902 */ 2901 2903 ptep_clear_flush_notify(vma, vmf->address, vmf->pte); 2902 2904 page_add_new_anon_rmap(new_page, vma, vmf->address, false);
+1 -1
mm/memory_hotplug.c
··· 713 713 * expects the zone spans the pfn range. All the pages in the range 714 714 * are reserved so nobody should be touching them so we should be safe 715 715 */ 716 - memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, 716 + memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, 0, 717 717 MEMINIT_HOTPLUG, altmap, migratetype); 718 718 719 719 set_zone_contiguous(zone);
+3 -1
mm/mremap.c
··· 358 358 359 359 next = (old_addr + size) & mask; 360 360 /* even if next overflowed, extent below will be ok */ 361 - extent = (next > old_end) ? old_end - old_addr : next - old_addr; 361 + extent = next - old_addr; 362 + if (extent > old_end - old_addr) 363 + extent = old_end - old_addr; 362 364 next = (new_addr + size) & mask; 363 365 if (extent > next - new_addr) 364 366 extent = next - new_addr;
+5 -3
mm/page_alloc.c
··· 423 423 if (end_pfn < pgdat_end_pfn(NODE_DATA(nid))) 424 424 return false; 425 425 426 + if (NODE_DATA(nid)->first_deferred_pfn != ULONG_MAX) 427 + return true; 426 428 /* 427 429 * We start only with one section of pages, more pages are added as 428 430 * needed until the rest of deferred pages are initialized. ··· 6118 6116 * zone stats (e.g., nr_isolate_pageblock) are touched. 6119 6117 */ 6120 6118 void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, 6121 - unsigned long start_pfn, 6119 + unsigned long start_pfn, unsigned long zone_end_pfn, 6122 6120 enum meminit_context context, 6123 6121 struct vmem_altmap *altmap, int migratetype) 6124 6122 { ··· 6154 6152 if (context == MEMINIT_EARLY) { 6155 6153 if (overlap_memmap_init(zone, &pfn)) 6156 6154 continue; 6157 - if (defer_init(nid, pfn, end_pfn)) 6155 + if (defer_init(nid, pfn, zone_end_pfn)) 6158 6156 break; 6159 6157 } 6160 6158 ··· 6268 6266 6269 6267 if (end_pfn > start_pfn) { 6270 6268 size = end_pfn - start_pfn; 6271 - memmap_init_zone(size, nid, zone, start_pfn, 6269 + memmap_init_zone(size, nid, zone, start_pfn, range_end_pfn, 6272 6270 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 6273 6271 } 6274 6272 }
+2 -3
mm/slub.c
··· 1619 1619 else 1620 1620 page = __alloc_pages_node(node, flags, order); 1621 1621 1622 - if (page) 1623 - account_slab_page(page, order, s); 1624 - 1625 1622 return page; 1626 1623 } 1627 1624 ··· 1770 1773 } 1771 1774 1772 1775 page->objects = oo_objects(oo); 1776 + 1777 + account_slab_page(page, oo_order(oo), s); 1773 1778 1774 1779 page->slab_cache = s; 1775 1780 __SetPageSlab(page);
+12 -3
net/ceph/messenger_v2.c
··· 1333 1333 void *buf; 1334 1334 int ret; 1335 1335 1336 - buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE, false)); 1336 + buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE, 1337 + con_secure(con))); 1337 1338 if (!buf) 1338 1339 return -ENOMEM; 1339 1340 ··· 2033 2032 return -EINVAL; 2034 2033 } 2035 2034 2035 + /* 2036 + * Align session_key and con_secret to avoid GFP_ATOMIC allocation 2037 + * inside crypto_shash_setkey() and crypto_aead_setkey() called from 2038 + * setup_crypto(). __aligned(16) isn't guaranteed to work for stack 2039 + * objects, so do it by hand. 2040 + */ 2036 2041 static int process_auth_done(struct ceph_connection *con, void *p, void *end) 2037 2042 { 2038 - u8 session_key[CEPH_KEY_LEN]; 2039 - u8 con_secret[CEPH_MAX_CON_SECRET_LEN]; 2043 + u8 session_key_buf[CEPH_KEY_LEN + 16]; 2044 + u8 con_secret_buf[CEPH_MAX_CON_SECRET_LEN + 16]; 2045 + u8 *session_key = PTR_ALIGN(&session_key_buf[0], 16); 2046 + u8 *con_secret = PTR_ALIGN(&con_secret_buf[0], 16); 2040 2047 int session_key_len, con_secret_len; 2041 2048 int payload_len; 2042 2049 u64 global_id;
+6
scripts/checkpatch.pl
··· 6646 6646 # } 6647 6647 # } 6648 6648 6649 + # strlcpy uses that should likely be strscpy 6650 + if ($line =~ /\bstrlcpy\s*\(/) { 6651 + WARN("STRLCPY", 6652 + "Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@mail.gmail.com/\n" . $herecurr); 6653 + } 6654 + 6649 6655 # typecasts on min/max could be min_t/max_t 6650 6656 if ($perl_version_ok && 6651 6657 defined $stat &&
+2
scripts/depmod.sh
··· 15 15 exit 0 16 16 fi 17 17 18 + # legacy behavior: "depmod" in /sbin, no /sbin in PATH 19 + PATH="$PATH:/sbin" 18 20 if [ -z $(command -v $DEPMOD) ]; then 19 21 echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2 20 22 echo "This is probably in the kmod package." >&2
+5 -5
tools/testing/selftests/vm/Makefile
··· 4 4 include local_config.mk 5 5 6 6 uname_M := $(shell uname -m 2>/dev/null || echo not) 7 - MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') 7 + MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/') 8 8 9 9 # Without this, failed build products remain, with up-to-date timestamps, 10 10 # thus tricking Make (and you!) into believing that All Is Well, in subsequent ··· 43 43 TEST_GEN_FILES += transhuge-stress 44 44 TEST_GEN_FILES += userfaultfd 45 45 46 - ifeq ($(ARCH),x86_64) 46 + ifeq ($(MACHINE),x86_64) 47 47 CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32) 48 48 CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c) 49 49 CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie) ··· 65 65 endif 66 66 else 67 67 68 - ifneq (,$(findstring $(ARCH),powerpc)) 68 + ifneq (,$(findstring $(MACHINE),ppc64)) 69 69 TEST_GEN_FILES += protection_keys 70 70 endif 71 71 72 72 endif 73 73 74 - ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64)) 74 + ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64)) 75 75 TEST_GEN_FILES += va_128TBswitch 76 76 TEST_GEN_FILES += virtual_address_range 77 77 TEST_GEN_FILES += write_to_hugetlbfs ··· 84 84 KSFT_KHDR_INSTALL := 1 85 85 include ../lib.mk 86 86 87 - ifeq ($(ARCH),x86_64) 87 + ifeq ($(MACHINE),x86_64) 88 88 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) 89 89 BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) 90 90