···77title: i.MX8M DDR Controller8899maintainers:1010- - Leonard Crestez <leonard.crestez@nxp.com>1010+ - Peng Fan <peng.fan@nxp.com>11111212description:1313 The DDRC block is integrated in i.MX8M for interfacing with DDR based
···148148You do not need to pass the address byte; instead, set it through149149ioctl I2C_SLAVE before you try to access the device.150150151151-You can do SMBus level transactions (see documentation file smbus-protocol151151+You can do SMBus level transactions (see documentation file smbus-protocol.rst152152for details) through the following functions::153153154154 __s32 i2c_smbus_write_quick(int file, __u8 value);
+3-3
Documentation/i2c/slave-interface.rst
···3232===========33333434I2C slave backends behave like standard I2C clients. So, you can instantiate3535-them as described in the document 'instantiating-devices'. The only difference3636-is that i2c slave backends have their own address space. So, you have to add3737-0x1000 to the address you would originally request. An example for3535+them as described in the document instantiating-devices.rst. The only3636+difference is that i2c slave backends have their own address space. So, you3737+have to add 0x1000 to the address you would originally request. An example for3838instantiating the slave-eeprom driver from userspace at the 7 bit address 0x643939on bus 1::4040
+2-2
Documentation/i2c/writing-clients.rst
···364364contains for each message the client address, the number of bytes of the365365message and the message data itself.366366367367-You can read the file ``i2c-protocol`` for more information about the367367+You can read the file i2c-protocol.rst for more information about the368368actual I2C protocol.369369370370···414414value, except for block transactions, which return the number of values415415read. The block buffers need not be longer than 32 bytes.416416417417-You can read the file ``smbus-protocol`` for more information about the417417+You can read the file smbus-protocol.rst for more information about the418418actual SMBus protocol.419419420420
+12-11
MAINTAINERS
···671671F: include/trace/events/afs.h672672673673AGPGART DRIVER674674-M: David Airlie <airlied@linux.ie>674674+M: David Airlie <airlied@redhat.com>675675+L: dri-devel@lists.freedesktop.org675676S: Maintained676677T: git git://anongit.freedesktop.org/drm/drm677678F: drivers/char/agp/···1018101710191018AMD MP2 I2C DRIVER10201019M: Elie Morisse <syniurge@gmail.com>10211021-M: Nehal Shah <nehal-bakulchandra.shah@amd.com>10221020M: Shyam Sundar S K <shyam-sundar.s-k@amd.com>10231021L: linux-i2c@vger.kernel.org10241022S: Maintained···2587258725882588ARM/QUALCOMM SUPPORT25892589M: Andy Gross <agross@kernel.org>25902590-M: Bjorn Andersson <bjorn.andersson@linaro.org>25902590+M: Bjorn Andersson <andersson@kernel.org>25912591R: Konrad Dybcio <konrad.dybcio@somainline.org>25922592L: linux-arm-msm@vger.kernel.org25932593S: Maintained···52535253F: include/linux/blk-cgroup.h5254525452555255CONTROL GROUP - CPUSET52565256+M: Waiman Long <longman@redhat.com>52565257M: Zefan Li <lizefan.x@bytedance.com>52575258L: cgroups@vger.kernel.org52585259S: Maintained···67556754F: drivers/gpu/drm/panel/panel-widechips-ws2401.c6756675567576756DRM DRIVERS67586758-M: David Airlie <airlied@linux.ie>67576757+M: David Airlie <airlied@gmail.com>67596758M: Daniel Vetter <daniel@ffwll.ch>67606759L: dri-devel@lists.freedesktop.org67616760S: Maintained···8945894489468945HARDWARE SPINLOCK CORE89478946M: Ohad Ben-Cohen <ohad@wizery.com>89488948-M: Bjorn Andersson <bjorn.andersson@linaro.org>89478947+M: Bjorn Andersson <andersson@kernel.org>89498948R: Baolin Wang <baolin.wang7@gmail.com>89508949L: linux-remoteproc@vger.kernel.org89518950S: Maintained···1613416133F: drivers/pinctrl/pinctrl-at91*16135161341613616135PIN CONTROLLER - QUALCOMM1613716137-M: Bjorn Andersson <bjorn.andersson@linaro.org>1613616136+M: Bjorn Andersson <andersson@kernel.org>1613816137L: linux-arm-msm@vger.kernel.org1613916138S: Maintained1614016139F: Documentation/devicetree/bindings/pinctrl/qcom,*.txt···1682716826F: drivers/media/platform/qcom/camss/16828168271682916828QUALCOMM CLOCK DRIVERS1683016830-M: Bjorn Andersson <bjorn.andersson@linaro.org>1682916829+M: Bjorn Andersson <andersson@kernel.org>1683116830L: linux-arm-msm@vger.kernel.org1683216831S: Supported1683316832T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git···1731717316F: fs/reiserfs/17318173171731917318REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM1732017320-M: Bjorn Andersson <bjorn.andersson@linaro.org>1731917319+M: Bjorn Andersson <andersson@kernel.org>1732117320M: Mathieu Poirier <mathieu.poirier@linaro.org>1732217321L: linux-remoteproc@vger.kernel.org1732317322S: Maintained···1733017329F: include/linux/remoteproc/17331173301733217331REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM1733317333-M: Bjorn Andersson <bjorn.andersson@linaro.org>1733217332+M: Bjorn Andersson <andersson@kernel.org>1733417333M: Mathieu Poirier <mathieu.poirier@linaro.org>1733517334L: linux-remoteproc@vger.kernel.org1733617335S: Maintained···1997419973F: drivers/net/team/1997519974F: include/linux/if_team.h1997619975F: include/uapi/linux/if_team.h1997719977-F: tools/testing/selftests/net/team/1997619976+F: tools/testing/selftests/drivers/net/team/19978199771997919978TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT1998019979M: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>···2158121580F: include/uapi/linux/virtio_gpio.h21582215812158321582VIRTIO GPU DRIVER2158421584-M: David Airlie <airlied@linux.ie>2158321583+M: David Airlie <airlied@redhat.com>2158521584M: Gerd Hoffmann <kraxel@redhat.com>2158621585R: Gurchetan Singh <gurchetansingh@chromium.org>2158721586R: Chia-I Wu <olvaffe@gmail.com>
···1818 select ARM_PSCI1919 select PINCTRL2020 select PINCTRL_SPPCTL2121- select SERIAL_SUNPLUS2222- select SERIAL_SUNPLUS_CONSOLE2121+ select SERIAL_SUNPLUS if TTY2222+ select SERIAL_SUNPLUS_CONSOLE if TTY2323 help2424 Support for Sunplus SP7021 SoC. It is based on ARM 4-core2525 Cortex-A7 with various peripherals (e.g.: I2C, SPI, SDIO,
···8888 };8989 };9090};9191+9292+&wlan_host_wake_l {9393+ /* Kevin has an external pull up, but Bob does not. */9494+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;9595+};
···244244&edp {245245 status = "okay";246246247247+ /*248248+ * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only249249+ * set this here, because rk3399-gru.dtsi ensures we can generate this250250+ * off GPLL=600MHz, whereas some other RK3399 boards may not.251251+ */252252+ assigned-clocks = <&cru PCLK_EDP>;253253+ assigned-clock-rates = <24000000>;254254+247255 ports {248256 edp_out: port@1 {249257 reg = <1>;···586578 };587579588580 wlan_host_wake_l: wlan-host-wake-l {581581+ /* Kevin has an external pull up, but Bob does not */589582 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;590583 };591584};
···21142114 * at, which would end badly once inaccessible.21152115 */21162116 kmemleak_free_part(__hyp_bss_start, __hyp_bss_end - __hyp_bss_start);21172117- kmemleak_free_part(__va(hyp_mem_base), hyp_mem_size);21172117+ kmemleak_free_part_phys(hyp_mem_base, hyp_mem_size);21182118 return pkvm_drop_host_privileges();21192119}21202120
+18-14
arch/arm64/mm/mmu.c
···331331 }332332 BUG_ON(p4d_bad(p4d));333333334334- /*335335- * No need for locking during early boot. And it doesn't work as336336- * expected with KASLR enabled.337337- */338338- if (system_state != SYSTEM_BOOTING)339339- mutex_lock(&fixmap_lock);340334 pudp = pud_set_fixmap_offset(p4dp, addr);341335 do {342336 pud_t old_pud = READ_ONCE(*pudp);···362368 } while (pudp++, addr = next, addr != end);363369364370 pud_clear_fixmap();365365- if (system_state != SYSTEM_BOOTING)366366- mutex_unlock(&fixmap_lock);367371}368372369369-static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,370370- unsigned long virt, phys_addr_t size,371371- pgprot_t prot,372372- phys_addr_t (*pgtable_alloc)(int),373373- int flags)373373+static void __create_pgd_mapping_locked(pgd_t *pgdir, phys_addr_t phys,374374+ unsigned long virt, phys_addr_t size,375375+ pgprot_t prot,376376+ phys_addr_t (*pgtable_alloc)(int),377377+ int flags)374378{375379 unsigned long addr, end, next;376380 pgd_t *pgdp = pgd_offset_pgd(pgdir, virt);···392400 } while (pgdp++, addr = next, addr != end);393401}394402403403+static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,404404+ unsigned long virt, phys_addr_t size,405405+ pgprot_t prot,406406+ phys_addr_t (*pgtable_alloc)(int),407407+ int flags)408408+{409409+ mutex_lock(&fixmap_lock);410410+ __create_pgd_mapping_locked(pgdir, phys, virt, size, prot,411411+ pgtable_alloc, flags);412412+ mutex_unlock(&fixmap_lock);413413+}414414+395415#ifdef CONFIG_UNMAP_KERNEL_AT_EL0396396-extern __alias(__create_pgd_mapping)416416+extern __alias(__create_pgd_mapping_locked)397417void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,398418 phys_addr_t size, pgprot_t prot,399419 phys_addr_t (*pgtable_alloc)(int), int flags);
···14141515 __REF16161717+ .align 121818+1719SYM_CODE_START(kernel_entry) # kernel entry point18201921 /* Config direct window and set PG */
+2-13
arch/loongarch/kernel/traps.c
···461461462462asmlinkage void noinstr do_ri(struct pt_regs *regs)463463{464464- int status = -1;464464+ int status = SIGILL;465465 unsigned int opcode = 0;466466 unsigned int __user *era = (unsigned int __user *)exception_era(regs);467467- unsigned long old_era = regs->csr_era;468468- unsigned long old_ra = regs->regs[1];469467 irqentry_state_t state = irqentry_enter(regs);470468471469 local_irq_enable();···475477476478 die_if_kernel("Reserved instruction in kernel code", regs);477479478478- compute_return_era(regs);479479-480480 if (unlikely(get_user(opcode, era) < 0)) {481481 status = SIGSEGV;482482 current->thread.error_code = 1;483483 }484484485485- if (status < 0)486486- status = SIGILL;487487-488488- if (unlikely(status > 0)) {489489- regs->csr_era = old_era; /* Undo skip-over. */490490- regs->regs[1] = old_ra;491491- force_sig(status);492492- }485485+ force_sig(status);493486494487out:495488 local_irq_disable();
-9
arch/powerpc/mm/book3s64/radix_pgtable.c
···937937 pmd = *pmdp;938938 pmd_clear(pmdp);939939940940- /*941941- * pmdp collapse_flush need to ensure that there are no parallel gup942942- * walk after this call. This is needed so that we can have stable943943- * page ref count when collapsing a page. We don't allow a collapse page944944- * if we have gup taken on the page. We can ensure that by sending IPI945945- * because gup walk happens with IRQ disabled.946946- */947947- serialize_against_pte_lookup(vma->vm_mm);948948-949940 radix__flush_tlb_collapsed_pmd(vma->vm_mm, address);950941951942 return pmd;
+1
arch/riscv/Kconfig
···386386config RISCV_ISA_SVPBMT387387 bool "SVPBMT extension support"388388 depends on 64BIT && MMU389389+ depends on !XIP_KERNEL389390 select RISCV_ALTERNATIVE390391 default y391392 help
+2-2
arch/riscv/Kconfig.erratas
···46464747config ERRATA_THEAD_PBMT4848 bool "Apply T-Head memory type errata"4949- depends on ERRATA_THEAD && 64BIT4949+ depends on ERRATA_THEAD && 64BIT && MMU5050 select RISCV_ALTERNATIVE_EARLY5151 default y5252 help···57575858config ERRATA_THEAD_CMO5959 bool "Apply T-Head cache management errata"6060- depends on ERRATA_THEAD6060+ depends on ERRATA_THEAD && MMU6161 select RISCV_DMA_NONCOHERENT6262 default y6363 help
···1212#include <linux/of_device.h>1313#include <asm/cacheflush.h>14141515-static unsigned int riscv_cbom_block_size = L1_CACHE_BYTES;1515+unsigned int riscv_cbom_block_size;1616static bool noncoherent_supported;17171818void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,···7979void riscv_init_cbom_blocksize(void)8080{8181 struct device_node *node;8282+ unsigned long cbom_hartid;8383+ u32 val, probed_block_size;8284 int ret;8383- u32 val;84858686+ probed_block_size = 0;8587 for_each_of_cpu_node(node) {8688 unsigned long hartid;8787- int cbom_hartid;88898990 ret = riscv_of_processor_hartid(node, &hartid);9091 if (ret)9191- continue;9292-9393- if (hartid < 0)9492 continue;95939694 /* set block-size for cbom extension if available */···9698 if (ret)9799 continue;981009999- if (!riscv_cbom_block_size) {100100- riscv_cbom_block_size = val;101101+ if (!probed_block_size) {102102+ probed_block_size = val;101103 cbom_hartid = hartid;102104 } else {103103- if (riscv_cbom_block_size != val)104104- pr_warn("cbom-block-size mismatched between harts %d and %lu\n",105105+ if (probed_block_size != val)106106+ pr_warn("cbom-block-size mismatched between harts %lu and %lu\n",105107 cbom_hartid, hartid);106108 }107109 }110110+111111+ if (probed_block_size)112112+ riscv_cbom_block_size = probed_block_size;108113}109114#endif110115111116void riscv_noncoherent_supported(void)112117{118118+ WARN(!riscv_cbom_block_size,119119+ "Non-coherent DMA support enabled without a block size\n");113120 noncoherent_supported = true;114121}
+13-3
arch/s390/kvm/gaccess.c
···489489 PROT_TYPE_ALC = 2,490490 PROT_TYPE_DAT = 3,491491 PROT_TYPE_IEP = 4,492492+ /* Dummy value for passing an initialized value when code != PGM_PROTECTION */493493+ PROT_NONE,492494};493495494496static int trans_exc_ending(struct kvm_vcpu *vcpu, int code, unsigned long gva, u8 ar,···506504 switch (code) {507505 case PGM_PROTECTION:508506 switch (prot) {507507+ case PROT_NONE:508508+ /* We should never get here, acts like termination */509509+ WARN_ON_ONCE(1);510510+ break;509511 case PROT_TYPE_IEP:510512 tec->b61 = 1;511513 fallthrough;···974968 return rc;975969 } else {976970 gpa = kvm_s390_real_to_abs(vcpu, ga);977977- if (kvm_is_error_gpa(vcpu->kvm, gpa))971971+ if (kvm_is_error_gpa(vcpu->kvm, gpa)) {978972 rc = PGM_ADDRESSING;973973+ prot = PROT_NONE;974974+ }979975 }980976 if (rc)981977 return trans_exc(vcpu, rc, ga, ar, mode, prot);···11201112 if (rc == PGM_PROTECTION && try_storage_prot_override)11211113 rc = access_guest_page_with_key(vcpu->kvm, mode, gpas[idx],11221114 data, fragment_len, PAGE_SPO_ACC);11231123- if (rc == PGM_PROTECTION)11241124- prot = PROT_TYPE_KEYC;11251115 if (rc)11261116 break;11271117 len -= fragment_len;···11291123 if (rc > 0) {11301124 bool terminate = (mode == GACC_STORE) && (idx > 0);1131112511261126+ if (rc == PGM_PROTECTION)11271127+ prot = PROT_TYPE_KEYC;11281128+ else11291129+ prot = PROT_NONE;11321130 rc = trans_exc_ending(vcpu, rc, ga, ar, mode, prot, terminate);11331131 }11341132out_unlock:
+1-1
arch/s390/kvm/interrupt.c
···33243324 if (gaite->count == 0)33253325 return;33263326 if (gaite->aisb != 0)33273327- set_bit_inv(gaite->aisbo, (unsigned long *)gaite->aisb);33273327+ set_bit_inv(gaite->aisbo, phys_to_virt(gaite->aisb));3328332833293329 kvm = kvm_s390_pci_si_to_kvm(aift, si);33303330 if (!kvm)
+2-2
arch/s390/kvm/kvm-s390.c
···505505 goto out;506506 }507507508508- if (kvm_s390_pci_interp_allowed()) {508508+ if (IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM)) {509509 rc = kvm_s390_pci_init();510510 if (rc) {511511 pr_err("Unable to allocate AIFT for PCI\n");···527527void kvm_arch_exit(void)528528{529529 kvm_s390_gib_destroy();530530- if (kvm_s390_pci_interp_allowed())530530+ if (IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM))531531 kvm_s390_pci_exit();532532 debug_unregister(kvm_s390_dbf);533533 debug_unregister(kvm_s390_dbf_uv);
···344344 }345345346346 va_page = sgx_encl_grow(encl, false);347347- if (IS_ERR(va_page))347347+ if (IS_ERR(va_page)) {348348+ if (PTR_ERR(va_page) == -EBUSY)349349+ vmret = VM_FAULT_NOPAGE;348350 goto err_out_epc;351351+ }349352350353 if (va_page)351354 list_add(&va_page->list, &encl->va_pages);
+9-6
arch/x86/kernel/cpu/sgx/main.c
···4949 * Reset post-kexec EPC pages to the uninitialized state. The pages are removed5050 * from the input list, and made available for the page allocator. SECS pages5151 * prepending their children in the input list are left intact.5252+ *5353+ * Return 0 when sanitization was successful or kthread was stopped, and the5454+ * number of unsanitized pages otherwise.5255 */5353-static void __sgx_sanitize_pages(struct list_head *dirty_page_list)5656+static unsigned long __sgx_sanitize_pages(struct list_head *dirty_page_list)5457{5858+ unsigned long left_dirty = 0;5559 struct sgx_epc_page *page;5660 LIST_HEAD(dirty);5761 int ret;···6359 /* dirty_page_list is thread-local, no need for a lock: */6460 while (!list_empty(dirty_page_list)) {6561 if (kthread_should_stop())6666- return;6262+ return 0;67636864 page = list_first_entry(dirty_page_list, struct sgx_epc_page, list);6965···9692 } else {9793 /* The page is not yet clean - move to the dirty list. */9894 list_move_tail(&page->list, &dirty);9595+ left_dirty++;9996 }1009710198 cond_resched();10299 }103100104101 list_splice(&dirty, dirty_page_list);102102+ return left_dirty;105103}106104107105static bool sgx_reclaimer_age(struct sgx_epc_page *epc_page)···401395 * required for SECS pages, whose child pages blocked EREMOVE.402396 */403397 __sgx_sanitize_pages(&sgx_dirty_page_list);404404- __sgx_sanitize_pages(&sgx_dirty_page_list);405405-406406- /* sanity check: */407407- WARN_ON(!list_empty(&sgx_dirty_page_list));398398+ WARN_ON(__sgx_sanitize_pages(&sgx_dirty_page_list));408399409400 while (!kthread_should_stop()) {410401 if (try_to_freeze())
+8-3
arch/x86/kvm/cpuid.c
···315315{316316 struct kvm_lapic *apic = vcpu->arch.apic;317317 struct kvm_cpuid_entry2 *best;318318- u64 guest_supported_xcr0;319318320319 best = kvm_find_cpuid_entry(vcpu, 1);321320 if (best && apic) {···326327 kvm_apic_set_version(vcpu);327328 }328329329329- guest_supported_xcr0 =330330+ vcpu->arch.guest_supported_xcr0 =330331 cpuid_get_supported_xcr0(vcpu->arch.cpuid_entries, vcpu->arch.cpuid_nent);331332332332- vcpu->arch.guest_fpu.fpstate->user_xfeatures = guest_supported_xcr0;333333+ /*334334+ * FP+SSE can always be saved/restored via KVM_{G,S}ET_XSAVE, even if335335+ * XSAVE/XCRO are not exposed to the guest, and even if XSAVE isn't336336+ * supported by the host.337337+ */338338+ vcpu->arch.guest_fpu.fpstate->user_xfeatures = vcpu->arch.guest_supported_xcr0 |339339+ XFEATURE_MASK_FPSSE;333340334341 kvm_update_pv_runtime(vcpu);335342
···10111011}10121012EXPORT_SYMBOL_GPL(kvm_load_host_xsave_state);1013101310141014-static inline u64 kvm_guest_supported_xcr0(struct kvm_vcpu *vcpu)10151015-{10161016- return vcpu->arch.guest_fpu.fpstate->user_xfeatures;10171017-}10181018-10191014#ifdef CONFIG_X86_6410201015static inline u64 kvm_guest_supported_xfd(struct kvm_vcpu *vcpu)10211016{10221022- return kvm_guest_supported_xcr0(vcpu) & XFEATURE_MASK_USER_DYNAMIC;10171017+ return vcpu->arch.guest_supported_xcr0 & XFEATURE_MASK_USER_DYNAMIC;10231018}10241019#endif10251020···10371042 * saving. However, xcr0 bit 0 is always set, even if the10381043 * emulated CPU does not support XSAVE (see kvm_vcpu_reset()).10391044 */10401040- valid_bits = kvm_guest_supported_xcr0(vcpu) | XFEATURE_MASK_FP;10451045+ valid_bits = vcpu->arch.guest_supported_xcr0 | XFEATURE_MASK_FP;10411046 if (xcr0 & ~valid_bits)10421047 return 1;10431048···1065107010661071int kvm_emulate_xsetbv(struct kvm_vcpu *vcpu)10671072{10731073+ /* Note, #UD due to CR4.OSXSAVE=0 has priority over the intercept. */10681074 if (static_call(kvm_x86_get_cpl)(vcpu) != 0 ||10691075 __kvm_set_xcr(vcpu, kvm_rcx_read(vcpu), kvm_read_edx_eax(vcpu))) {10701076 kvm_inject_gp(vcpu, 0);
+1-1
arch/x86/lib/usercopy.c
···4444 * called from other contexts.4545 */4646 pagefault_disable();4747- ret = __copy_from_user_inatomic(to, from, n);4747+ ret = raw_copy_from_user(to, from, n);4848 pagefault_enable();49495050 return ret;
+3
arch/x86/mm/Makefile
···44KCOV_INSTRUMENT_mem_encrypt.o := n55KCOV_INSTRUMENT_mem_encrypt_amd.o := n66KCOV_INSTRUMENT_mem_encrypt_identity.o := n77+KCOV_INSTRUMENT_pgprot.o := n7889KASAN_SANITIZE_mem_encrypt.o := n910KASAN_SANITIZE_mem_encrypt_amd.o := n1011KASAN_SANITIZE_mem_encrypt_identity.o := n1212+KASAN_SANITIZE_pgprot.o := n11131214# Disable KCSAN entirely, because otherwise we get warnings that some functions1315# reference __initdata sections.···1917CFLAGS_REMOVE_mem_encrypt.o = -pg2018CFLAGS_REMOVE_mem_encrypt_amd.o = -pg2119CFLAGS_REMOVE_mem_encrypt_identity.o = -pg2020+CFLAGS_REMOVE_pgprot.o = -pg2221endif23222423obj-y := init.o init_$(BITS).o fault.o ioremap.o extable.o mmap.o \
+2-1
block/genhd.c
···602602 * Prevent new I/O from crossing bio_queue_enter().603603 */604604 blk_queue_start_drain(q);605605- blk_mq_freeze_queue_wait(q);606605607606 if (!(disk->flags & GENHD_FL_HIDDEN)) {608607 sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");···624625 sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk)));625626 pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);626627 device_del(disk_to_dev(disk));628628+629629+ blk_mq_freeze_queue_wait(q);627630628631 blk_throtl_cancel_bios(disk->queue);629632
+1-1
certs/Kconfig
···4343 bool "Provide system-wide ring of trusted keys"4444 depends on KEYS4545 depends on ASYMMETRIC_KEY_TYPE4646- depends on X509_CERTIFICATE_PARSER4646+ depends on X509_CERTIFICATE_PARSER = y4747 help4848 Provide a system keyring to which trusted keys can be added. Keys in4949 the keyring are considered to be trusted. Keys may be added at will
+20-3
drivers/acpi/processor_idle.c
···531531 /* No delay is needed if we are in guest */532532 if (boot_cpu_has(X86_FEATURE_HYPERVISOR))533533 return;534534+ /*535535+ * Modern (>=Nehalem) Intel systems use ACPI via intel_idle,536536+ * not this code. Assume that any Intel systems using this537537+ * are ancient and may need the dummy wait. This also assumes538538+ * that the motivating chipset issue was Intel-only.539539+ */540540+ if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)541541+ return;534542#endif535535- /* Dummy wait op - must do something useless after P_LVL2 read536536- because chipsets cannot guarantee that STPCLK# signal537537- gets asserted in time to freeze execution properly. */543543+ /*544544+ * Dummy wait op - must do something useless after P_LVL2 read545545+ * because chipsets cannot guarantee that STPCLK# signal gets546546+ * asserted in time to freeze execution properly547547+ *548548+ * This workaround has been in place since the original ACPI549549+ * implementation was merged, circa 2002.550550+ *551551+ * If a profile is pointing to this instruction, please first552552+ * consider moving your system to a more modern idle553553+ * mechanism.554554+ */538555 inl(acpi_gbl_FADT.xpm_timer_block.address);539556}540557
···10181018EXPORT_SYMBOL_GPL(dev_attr_sw_activity);1019101910201020/**10211021- * __ata_change_queue_depth - helper for ata_scsi_change_queue_depth10221022- * @ap: ATA port to which the device change the queue depth10211021+ * ata_change_queue_depth - Set a device maximum queue depth10221022+ * @ap: ATA port of the target device10231023+ * @dev: target ATA device10231024 * @sdev: SCSI device to configure queue depth for10241025 * @queue_depth: new queue depth10251026 *10261026- * libsas and libata have different approaches for associating a sdev to10271027- * its ata_port.10271027+ * Helper to set a device maximum queue depth, usable with both libsas10281028+ * and libata.10281029 *10291030 */10301030-int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,10311031- int queue_depth)10311031+int ata_change_queue_depth(struct ata_port *ap, struct ata_device *dev,10321032+ struct scsi_device *sdev, int queue_depth)10321033{10331033- struct ata_device *dev;10341034 unsigned long flags;1035103510361036- if (queue_depth < 1 || queue_depth == sdev->queue_depth)10361036+ if (!dev || !ata_dev_enabled(dev))10371037 return sdev->queue_depth;1038103810391039- dev = ata_scsi_find_dev(ap, sdev);10401040- if (!dev || !ata_dev_enabled(dev))10391039+ if (queue_depth < 1 || queue_depth == sdev->queue_depth)10411040 return sdev->queue_depth;1042104110431042 /* NCQ enabled? */···1058105910591060 return scsi_change_queue_depth(sdev, queue_depth);10601061}10611061-EXPORT_SYMBOL_GPL(__ata_change_queue_depth);10621062+EXPORT_SYMBOL_GPL(ata_change_queue_depth);1062106310631064/**10641065 * ata_scsi_change_queue_depth - SCSI callback for queue depth config···10791080{10801081 struct ata_port *ap = ata_shost_to_port(sdev->host);1081108210821082- return __ata_change_queue_depth(ap, sdev, queue_depth);10831083+ return ata_change_queue_depth(ap, ata_scsi_find_dev(ap, sdev),10841084+ sdev, queue_depth);10831085}10841086EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);10851087
+4-6
drivers/ata/libata-scsi.c
···10551055int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev)10561056{10571057 struct request_queue *q = sdev->request_queue;10581058+ int depth = 1;1058105910591060 if (!ata_id_has_unload(dev->id))10601061 dev->flags |= ATA_DFLAG_NO_UNLOAD;···11011100 if (dev->flags & ATA_DFLAG_AN)11021101 set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);1103110211041104- if (dev->flags & ATA_DFLAG_NCQ) {11051105- int depth;11061106-11031103+ if (dev->flags & ATA_DFLAG_NCQ)11071104 depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));11081108- depth = min(ATA_MAX_QUEUE, depth);11091109- scsi_change_queue_depth(sdev, depth);11101110- }11051105+ depth = min(ATA_MAX_QUEUE, depth);11061106+ scsi_change_queue_depth(sdev, depth);1111110711121108 if (dev->flags & ATA_DFLAG_TRUSTED)11131109 sdev->security_supported = 1;
···449449 return -EINVAL;450450 }451451452452+ /* Enable IRQ line */453453+ irq_enabled |= BIT(event_node->channel);454454+452455 /* Skip configuration if it is the same as previously set */453456 if (priv->irq_trigger[event_node->channel] == next_irq_trigger)454457 continue;···465462 priv->irq_trigger[event_node->channel] << 3;466463 iowrite8(QUAD8_CTR_IOR | ior_cfg,467464 &priv->reg->channel[event_node->channel].control);468468-469469- /* Enable IRQ line */470470- irq_enabled |= BIT(event_node->channel);471465 }472466473467 iowrite8(irq_enabled, &priv->reg->index_interrupt);
···27582758 skip_video_pattern);2759275927602760 /* Transmit idle pattern once training successful. */27612761- if (status == LINK_TRAINING_SUCCESS && !is_link_bw_low)27612761+ if (status == LINK_TRAINING_SUCCESS && !is_link_bw_low) {27622762 dp_set_hw_test_pattern(link, &pipe_ctx->link_res, DP_TEST_PATTERN_VIDEO_MODE, NULL, 0);27632763+ /* Update verified link settings to current one27642764+ * Because DPIA LT might fallback to lower link setting.27652765+ */27662766+ link->verified_link_cap.link_rate = link->cur_link_settings.link_rate;27672767+ link->verified_link_cap.lane_count = link->cur_link_settings.lane_count;27682768+ }27632769 } else {27642770 status = dc_link_dp_perform_link_training(link,27652771 &pipe_ctx->link_res,···51265120 link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.raw =51275121 lttpr_dpcd_data[DP_PHY_REPEATER_128B132B_RATES -51285122 DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV];51235123+51245124+ /* If this chip cap is set, at least one retimer must exist in the chain51255125+ * Override count to 1 if we receive a known bad count (0 or an invalid value) */51265126+ if (link->chip_caps & EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN &&51275127+ (dp_convert_to_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt) == 0)) {51285128+ ASSERT(0);51295129+ link->dpcd_caps.lttpr_caps.phy_repeater_cnt = 0x80;51305130+ }5129513151305132 /* Attempt to train in LTTPR transparent mode if repeater count exceeds 8. */51315133 is_lttpr_present = (link->dpcd_caps.lttpr_caps.max_lane_count > 0 &&
+17
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
···35843584 }35853585}3586358635873587+void reset_sync_context_for_pipe(const struct dc *dc,35883588+ struct dc_state *context,35893589+ uint8_t pipe_idx)35903590+{35913591+ int i;35923592+ struct pipe_ctx *pipe_ctx_reset;35933593+35943594+ /* reset the otg sync context for the pipe and its slave pipes if any */35953595+ for (i = 0; i < dc->res_pool->pipe_count; i++) {35963596+ pipe_ctx_reset = &context->res_ctx.pipe_ctx[i];35973597+35983598+ if (((GET_PIPE_SYNCD_FROM_PIPE(pipe_ctx_reset) == pipe_idx) &&35993599+ IS_PIPE_SYNCD_VALID(pipe_ctx_reset)) || (i == pipe_idx))36003600+ SET_PIPE_SYNCD_TO_PIPE(pipe_ctx_reset, i);36013601+ }36023602+}36033603+35873604uint8_t resource_transmitter_to_phy_idx(const struct dc *dc, enum transmitter transmitter)35883605{35893606 /* TODO - get transmitter to phy idx mapping from DMUB */
···15651565 /* Any updates are handled in dc interface, just need15661566 * to apply existing for plane enable / opp change */15671567 if (pipe_ctx->update_flags.bits.enable || pipe_ctx->update_flags.bits.opp_changed15681568+ || pipe_ctx->update_flags.bits.plane_changed15681569 || pipe_ctx->stream->update_flags.bits.gamut_remap15691570 || pipe_ctx->stream->update_flags.bits.out_csc) {15701571 /* dpp/cm gamut remap*/
···244244}245245246246/**247247+ * Finds dummy_latency_index when MCLK switching using firmware based248248+ * vblank stretch is enabled. This function will iterate through the249249+ * table of dummy pstate latencies until the lowest value that allows250250+ * dm_allow_self_refresh_and_mclk_switch to happen is found251251+ */252252+int dcn32_find_dummy_latency_index_for_fw_based_mclk_switch(struct dc *dc,253253+ struct dc_state *context,254254+ display_e2e_pipe_params_st *pipes,255255+ int pipe_cnt,256256+ int vlevel)257257+{258258+ const int max_latency_table_entries = 4;259259+ const struct vba_vars_st *vba = &context->bw_ctx.dml.vba;260260+ int dummy_latency_index = 0;261261+262262+ dc_assert_fp_enabled();263263+264264+ while (dummy_latency_index < max_latency_table_entries) {265265+ context->bw_ctx.dml.soc.dram_clock_change_latency_us =266266+ dc->clk_mgr->bw_params->dummy_pstate_table[dummy_latency_index].dummy_pstate_latency_us;267267+ dcn32_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel, false);268268+269269+ if (vlevel < context->bw_ctx.dml.vba.soc.num_states &&270270+ vba->DRAMClockChangeSupport[vlevel][vba->maxMpcComb] != dm_dram_clock_change_unsupported)271271+ break;272272+273273+ dummy_latency_index++;274274+ }275275+276276+ if (dummy_latency_index == max_latency_table_entries) {277277+ ASSERT(dummy_latency_index != max_latency_table_entries);278278+ /* If the execution gets here, it means dummy p_states are279279+ * not possible. This should never happen and would mean280280+ * something is severely wrong.281281+ * Here we reset dummy_latency_index to 3, because it is282282+ * better to have underflows than system crashes.283283+ */284284+ dummy_latency_index = max_latency_table_entries - 1;285285+ }286286+287287+ return dummy_latency_index;288288+}289289+290290+/**247291 * dcn32_helper_populate_phantom_dlg_params - Get DLG params for phantom pipes248292 * and populate pipe_ctx with those params.249293 *···16901646 dcn30_can_support_mclk_switch_using_fw_based_vblank_stretch(dc, context);1691164716921648 if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {16931693- dummy_latency_index = dcn30_find_dummy_latency_index_for_fw_based_mclk_switch(dc,16491649+ dummy_latency_index = dcn32_find_dummy_latency_index_for_fw_based_mclk_switch(dc,16941650 context, pipes, pipe_cnt, vlevel);1695165116961652 /* After calling dcn30_find_dummy_latency_index_for_fw_based_mclk_switch
···71717272void dcn32_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_params);73737474+int dcn32_find_dummy_latency_index_for_fw_based_mclk_switch(struct dc *dc,7575+ struct dc_state *context,7676+ display_e2e_pipe_params_st *pipes,7777+ int pipe_cnt,7878+ int vlevel);7979+7480#endif
···209209 if (!adev->scpm_enabled)210210 return 0;211211212212- if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 7))212212+ if ((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 7)) ||213213+ (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 0)))213214 return 0;214215215216 /* override pptable_id from driver parameter */···219218 dev_info(adev->dev, "override pptable id %d\n", pptable_id);220219 } else {221220 pptable_id = smu->smu_table.boot_values.pp_table_id;222222-223223- /*224224- * Temporary solution for SMU V13.0.0 with SCPM enabled:225225- * - use vbios carried pptable when pptable_id is 3664, 3715 or 3795226226- * - use 36831 soft pptable when pptable_id is 3683227227- */228228- if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 0)) {229229- switch (pptable_id) {230230- case 3664:231231- case 3715:232232- case 3795:233233- pptable_id = 0;234234- break;235235- case 3683:236236- pptable_id = 36831;237237- break;238238- default:239239- dev_err(adev->dev, "Unsupported pptable id %d\n", pptable_id);240240- return -EINVAL;241241- }242242- }243221 }244222245223 /* "pptable_id == 0" means vbios carries the pptable. */···451471 } else {452472 pptable_id = smu->smu_table.boot_values.pp_table_id;453473454454- /*455455- * Temporary solution for SMU V13.0.0 with SCPM disabled:456456- * - use 3664, 3683 or 3715 on request457457- * - use 3664 when pptable_id is 0458458- * TODO: drop these when the pptable carried in vbios is ready.459459- */460460- if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 0)) {461461- switch (pptable_id) {462462- case 0:463463- pptable_id = 3664;464464- break;465465- case 3664:466466- case 3683:467467- case 3715:468468- break;469469- default:470470- dev_err(adev->dev, "Unsupported pptable id %d\n", pptable_id);471471- return -EINVAL;472472- }473473- }474474 }475475476476 /* force using vbios pptable in sriov mode */
···410410{411411 struct smu_table_context *smu_table = &smu->smu_table;412412 struct amdgpu_device *adev = smu->adev;413413- uint32_t pptable_id;414413 int ret = 0;415414416416- /*417417- * With SCPM enabled, the pptable used will be signed. It cannot418418- * be used directly by driver. To get the raw pptable, we need to419419- * rely on the combo pptable(and its revelant SMU message).420420- */421421- if (adev->scpm_enabled) {422422- ret = smu_v13_0_0_get_pptable_from_pmfw(smu,423423- &smu_table->power_play_table,424424- &smu_table->power_play_table_size);425425- } else {426426- /* override pptable_id from driver parameter */427427- if (amdgpu_smu_pptable_id >= 0) {428428- pptable_id = amdgpu_smu_pptable_id;429429- dev_info(adev->dev, "override pptable id %d\n", pptable_id);430430- } else {431431- pptable_id = smu_table->boot_values.pp_table_id;432432- }433433-434434- /*435435- * Temporary solution for SMU V13.0.0 with SCPM disabled:436436- * - use vbios carried pptable when pptable_id is 3664, 3715 or 3795437437- * - use soft pptable when pptable_id is 3683438438- */439439- if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 0)) {440440- switch (pptable_id) {441441- case 3664:442442- case 3715:443443- case 3795:444444- pptable_id = 0;445445- break;446446- case 3683:447447- break;448448- default:449449- dev_err(adev->dev, "Unsupported pptable id %d\n", pptable_id);450450- return -EINVAL;451451- }452452- }453453-454454- /* force using vbios pptable in sriov mode */455455- if ((amdgpu_sriov_vf(adev) || !pptable_id) && (amdgpu_emu_mode != 1))456456- ret = smu_v13_0_0_get_pptable_from_pmfw(smu,457457- &smu_table->power_play_table,458458- &smu_table->power_play_table_size);459459- else460460- ret = smu_v13_0_get_pptable_from_firmware(smu,461461- &smu_table->power_play_table,462462- &smu_table->power_play_table_size,463463- pptable_id);464464- }415415+ ret = smu_v13_0_0_get_pptable_from_pmfw(smu,416416+ &smu_table->power_play_table,417417+ &smu_table->power_play_table_size);465418 if (ret)466419 return ret;467420
+1
drivers/gpu/drm/hisilicon/hibmc/Kconfig
···22config DRM_HISI_HIBMC33 tristate "DRM Support for Hisilicon Hibmc"44 depends on DRM && PCI && (ARM64 || COMPILE_TEST)55+ depends on MMU56 select DRM_KMS_HELPER67 select DRM_VRAM_HELPER78 select DRM_TTM
···685685 if (--dsi->refcount != 0)686686 return;687687688688+ /*689689+ * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since690690+ * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),691691+ * which needs irq for vblank, and mtk_dsi_stop() will disable irq.692692+ * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),693693+ * after dsi is fully set.694694+ */695695+ mtk_dsi_stop(dsi);696696+697697+ mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500);688698 mtk_dsi_reset_engine(dsi);689699 mtk_dsi_lane0_ulp_mode_enter(dsi);690700 mtk_dsi_clk_ulp_mode_enter(dsi);···744734{745735 if (!dsi->enabled)746736 return;747747-748748- /*749749- * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since750750- * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),751751- * which needs irq for vblank, and mtk_dsi_stop() will disable irq.752752- * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),753753- * after dsi is fully set.754754- */755755- mtk_dsi_stop(dsi);756756-757757- mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500);758737759738 dsi->enabled = false;760739}···807808808809static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = {809810 .attach = mtk_dsi_bridge_attach,811811+ .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,810812 .atomic_disable = mtk_dsi_bridge_atomic_disable,813813+ .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,811814 .atomic_enable = mtk_dsi_bridge_atomic_enable,812815 .atomic_pre_enable = mtk_dsi_bridge_atomic_pre_enable,813816 .atomic_post_disable = mtk_dsi_bridge_atomic_post_disable,817817+ .atomic_reset = drm_atomic_helper_bridge_reset,814818 .mode_set = mtk_dsi_bridge_mode_set,815819};816820
+5-1
drivers/gpu/drm/mgag200/mgag200_drv.c
···262262 if (ret)263263 return ret;264264265265- drm_fbdev_generic_setup(dev, 0);265265+ /*266266+ * FIXME: A 24-bit color depth does not work with 24 bpp on267267+ * G200ER. Force 32 bpp.268268+ */269269+ drm_fbdev_generic_setup(dev, 32);266270267271 return 0;268272}
···186186 "LEN2044", /* L470 */187187 "LEN2054", /* E480 */188188 "LEN2055", /* E580 */189189- "LEN2064", /* T14 Gen 1 AMD / P14s Gen 1 AMD */190189 "LEN2068", /* T14 Gen 1 */191190 "SYN3052", /* HP EliteBook 840 G4 */192191 "SYN3221", /* HP 15-ay000 */
+1-1
drivers/input/touchscreen/melfas_mip4.c
···14531453 "ce", GPIOD_OUT_LOW);14541454 if (IS_ERR(ts->gpio_ce)) {14551455 error = PTR_ERR(ts->gpio_ce);14561456- if (error != EPROBE_DEFER)14561456+ if (error != -EPROBE_DEFER)14571457 dev_err(&client->dev,14581458 "Failed to get gpio: %d\n", error);14591459 return error;
+7-1
drivers/irqchip/Kconfig
···561561 select GENERIC_IRQ_CHIP562562 select IRQ_DOMAIN563563 select GENERIC_IRQ_EFFECTIVE_AFF_MASK564564+ select LOONGSON_LIOINTC565565+ select LOONGSON_EIOINTC566566+ select LOONGSON_PCH_PIC567567+ select LOONGSON_PCH_MSI568568+ select LOONGSON_PCH_LPC564569 help565570 Support for the LoongArch CPU Interrupt Controller. For details of566571 irq chip hierarchy on LoongArch platforms please read the document···628623629624config LOONGSON_PCH_LPC630625 bool "Loongson PCH LPC Controller"626626+ depends on LOONGARCH631627 depends on MACH_LOONGSON64632632- default (MACH_LOONGSON64 && LOONGARCH)628628+ default MACH_LOONGSON64633629 select IRQ_DOMAIN_HIERARCHY634630 help635631 Support for the Loongson PCH LPC Controller.
+8-6
drivers/irqchip/irq-gic-v3-its.c
···15741574 const struct cpumask *aff_mask)15751575{15761576 struct its_device *its_dev = irq_data_get_irq_chip_data(d);15771577- cpumask_var_t tmpmask;15771577+ static DEFINE_RAW_SPINLOCK(tmpmask_lock);15781578+ static struct cpumask __tmpmask;15791579+ struct cpumask *tmpmask;15801580+ unsigned long flags;15781581 int cpu, node;15791579-15801580- if (!alloc_cpumask_var(&tmpmask, GFP_ATOMIC))15811581- return -ENOMEM;15821582-15831582 node = its_dev->its->numa_node;15831583+ tmpmask = &__tmpmask;15841584+15851585+ raw_spin_lock_irqsave(&tmpmask_lock, flags);1584158615851587 if (!irqd_affinity_is_managed(d)) {15861588 /* First try the NUMA node */···16361634 cpu = cpumask_pick_least_loaded(d, tmpmask);16371635 }16381636out:16391639- free_cpumask_var(tmpmask);16371637+ raw_spin_unlock_irqrestore(&tmpmask_lock, flags);1640163816411639 pr_debug("IRQ%d -> %*pbl CPU%d\n", d->irq, cpumask_pr_args(aff_mask), cpu);16421640 return cpu;
+1-1
drivers/irqchip/irq-stm32-exti.c
···716716717717 irq_domain_set_hwirq_and_chip(dm, virq, hwirq, chip, chip_data);718718719719- if (!host_data->drv_data || !host_data->drv_data->desc_irqs)719719+ if (!host_data->drv_data->desc_irqs)720720 return -EINVAL;721721722722 desc_irq = host_data->drv_data->desc_irqs[hwirq];
+1-1
drivers/media/usb/b2c2/flexcop-usb.c
···511511512512 if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1)513513 return -ENODEV;514514- if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[1].desc))514514+ if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[0].desc))515515 return -ENODEV;516516517517 switch (fc_usb->udev->speed) {
+2-1
drivers/mmc/core/sd.c
···870870 * the CCS bit is set as well. We deliberately deviate from the spec in871871 * regards to this, which allows UHS-I to be supported for SDSC cards.872872 */873873- if (!mmc_host_is_spi(host) && rocr && (*rocr & SD_ROCR_S18A)) {873873+ if (!mmc_host_is_spi(host) && (ocr & SD_OCR_S18R) &&874874+ rocr && (*rocr & SD_ROCR_S18A)) {874875 err = mmc_set_uhs_voltage(host, pocr);875876 if (err == -EAGAIN) {876877 retries--;
+1-1
drivers/mmc/host/mmc_hsq.c
···3434 spin_lock_irqsave(&hsq->lock, flags);35353636 /* Make sure we are not already running a request now */3737- if (hsq->mrq) {3737+ if (hsq->mrq || hsq->recovery_halt) {3838 spin_unlock_irqrestore(&hsq->lock, flags);3939 return;4040 }
···246246 }247247248248 priv->clk_io = devm_ioremap(dev, res->start, resource_size(res));249249- if (IS_ERR(priv->clk_io))250250- return PTR_ERR(priv->clk_io);249249+ if (!priv->clk_io)250250+ return -ENOMEM;251251252252 mlxbf_gige_mdio_cfg(priv);253253
+7
drivers/net/ethernet/mscc/ocelot.c
···289289 if (!(vlan->portmask & BIT(port)))290290 continue;291291292292+ /* Ignore the VLAN added by ocelot_add_vlan_unaware_pvid(),293293+ * because this is never active in hardware at the same time as294294+ * the bridge VLANs, which only matter in VLAN-aware mode.295295+ */296296+ if (vlan->vid >= OCELOT_RSV_VLAN_RANGE_START)297297+ continue;298298+292299 if (vlan->untagged & BIT(port))293300 num_untagged++;294301 }
···3801380138023802 stmmac_reset_queues_param(priv);3803380338043804+ if (priv->plat->serdes_powerup) {38053805+ ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);38063806+ if (ret < 0) {38073807+ netdev_err(priv->dev, "%s: Serdes powerup failed\n",38083808+ __func__);38093809+ goto init_error;38103810+ }38113811+ }38123812+38043813 ret = stmmac_hw_setup(dev, true);38053814 if (ret < 0) {38063815 netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);···3912390339133904 /* Disable the MAC Rx/Tx */39143905 stmmac_mac_set(priv, priv->ioaddr, false);39063906+39073907+ /* Powerdown Serdes if there is */39083908+ if (priv->plat->serdes_powerdown)39093909+ priv->plat->serdes_powerdown(dev, priv->plat->bsp_priv);3915391039163911 netif_carrier_off(dev);39173912···72887275 goto error_netdev_register;72897276 }7290727772917291- if (priv->plat->serdes_powerup) {72927292- ret = priv->plat->serdes_powerup(ndev,72937293- priv->plat->bsp_priv);72947294-72957295- if (ret < 0)72967296- goto error_serdes_powerup;72977297- }72987298-72997278#ifdef CONFIG_DEBUG_FS73007279 stmmac_init_fs(ndev);73017280#endif···7302729773037298 return ret;7304729973057305-error_serdes_powerup:73067306- unregister_netdev(ndev);73077300error_netdev_register:73087301 phylink_destroy(priv->phylink);73097302error_xpcs_setup:
+1
drivers/net/hippi/rrunner.c
···213213 pci_iounmap(pdev, rrpriv->regs);214214 if (pdev)215215 pci_release_regions(pdev);216216+ pci_disable_device(pdev);216217 out2:217218 free_netdev(dev);218219 out3:
+6-4
drivers/net/phy/phy_device.c
···316316317317 phydev->suspended_by_mdio_bus = 0;318318319319- /* If we manged to get here with the PHY state machine in a state neither320320- * PHY_HALTED nor PHY_READY this is an indication that something went wrong321321- * and we should most likely be using MAC managed PM and we are not.319319+ /* If we managed to get here with the PHY state machine in a state320320+ * neither PHY_HALTED, PHY_READY nor PHY_UP, this is an indication321321+ * that something went wrong and we should most likely be using322322+ * MAC managed PM, but we are not.322323 */323323- WARN_ON(phydev->state != PHY_HALTED && phydev->state != PHY_READY);324324+ WARN_ON(phydev->state != PHY_HALTED && phydev->state != PHY_READY &&325325+ phydev->state != PHY_UP);324326325327 ret = phy_init_hw(phydev);326328 if (ret < 0)
+6-3
drivers/net/tun.c
···28282828 rcu_assign_pointer(tfile->tun, tun);28292829 }2830283028312831- netif_carrier_on(tun->dev);28312831+ if (ifr->ifr_flags & IFF_NO_CARRIER)28322832+ netif_carrier_off(tun->dev);28332833+ else28342834+ netif_carrier_on(tun->dev);2832283528332836 /* Make sure persistent devices do not get stuck in28342837 * xoff state.···30593056 * This is needed because we never checked for invalid flags on30603057 * TUNSETIFF.30613058 */30623062- return put_user(IFF_TUN | IFF_TAP | TUN_FEATURES,30633063- (unsigned int __user*)argp);30593059+ return put_user(IFF_TUN | IFF_TAP | IFF_NO_CARRIER |30603060+ TUN_FEATURES, (unsigned int __user*)argp);30643061 } else if (cmd == TUNSETQUEUE) {30653062 return tun_set_queue(file, &ifr);30663063 } else if (cmd == SIOCGSKNS) {
···274274 int submode;275275 bool invert_tx;276276 bool invert_rx;277277- bool needs_reset;278277};279278280279struct gbe_phy_init_data_fix {···10961097 0x0, PU_PLL_BIT | PU_RX_BIT | PU_TX_BIT);10971098}1098109910991099-static int mvebu_a3700_comphy_reset(struct phy *phy)11001100+static void mvebu_a3700_comphy_usb3_power_off(struct mvebu_a3700_comphy_lane *lane)11001101{11011101- struct mvebu_a3700_comphy_lane *lane = phy_get_drvdata(phy);11021102- u16 mask, data;11031103-11041104- dev_dbg(lane->dev, "resetting lane %d\n", lane->id);11051105-11061106- /* COMPHY reset for internal logic */11071107- comphy_lane_reg_set(lane, COMPHY_SFT_RESET,11081108- SFT_RST_NO_REG, SFT_RST_NO_REG);11091109-11101110- /* COMPHY register reset (cleared automatically) */11111111- comphy_lane_reg_set(lane, COMPHY_SFT_RESET, SFT_RST, SFT_RST);11121112-11131113- /* PIPE soft and register reset */11141114- data = PIPE_SOFT_RESET | PIPE_REG_RESET;11151115- mask = data;11161116- comphy_lane_reg_set(lane, COMPHY_PIPE_RST_CLK_CTRL, data, mask);11171117-11181118- /* Release PIPE register reset */11191119- comphy_lane_reg_set(lane, COMPHY_PIPE_RST_CLK_CTRL,11201120- 0x0, PIPE_REG_RESET);11211121-11221122- /* Reset SB configuration register (only for lanes 0 and 1) */11231123- if (lane->id == 0 || lane->id == 1) {11241124- u32 mask, data;11251125-11261126- data = PIN_RESET_CORE_BIT | PIN_RESET_COMPHY_BIT |11271127- PIN_PU_PLL_BIT | PIN_PU_RX_BIT | PIN_PU_TX_BIT;11281128- mask = data | PIN_PU_IVREF_BIT | PIN_TX_IDLE_BIT;11291129- comphy_periph_reg_set(lane, COMPHY_PHY_CFG1, data, mask);11301130- }11311131-11321132- return 0;11021102+ /*11031103+ * The USB3 MAC sets the USB3 PHY to low state, so we do not11041104+ * need to power off USB3 PHY again.11051105+ */11331106}1134110711351108static bool mvebu_a3700_comphy_check_mode(int lane,···11421171 (lane->mode != mode || lane->submode != submode))11431172 return -EBUSY;1144117311451145- /* If changing mode, ensure reset is called */11461146- if (lane->mode != PHY_MODE_INVALID && lane->mode != mode)11471147- lane->needs_reset = true;11481148-11491174 /* Just remember the mode, ->power_on() will do the real setup */11501175 lane->mode = mode;11511176 lane->submode = submode;···11521185static int mvebu_a3700_comphy_power_on(struct phy *phy)11531186{11541187 struct mvebu_a3700_comphy_lane *lane = phy_get_drvdata(phy);11551155- int ret;1156118811571189 if (!mvebu_a3700_comphy_check_mode(lane->id, lane->mode,11581190 lane->submode)) {11591191 dev_err(lane->dev, "invalid COMPHY mode\n");11601192 return -EINVAL;11611161- }11621162-11631163- if (lane->needs_reset) {11641164- ret = mvebu_a3700_comphy_reset(phy);11651165- if (ret)11661166- return ret;11671167-11681168- lane->needs_reset = false;11691193 }1170119411711195 switch (lane->mode) {···11821224{11831225 struct mvebu_a3700_comphy_lane *lane = phy_get_drvdata(phy);1184122611851185- switch (lane->mode) {11861186- case PHY_MODE_USB_HOST_SS:11871187- /*11881188- * The USB3 MAC sets the USB3 PHY to low state, so we do not11891189- * need to power off USB3 PHY again.11901190- */11911191- break;11921192-11931193- case PHY_MODE_SATA:11941194- mvebu_a3700_comphy_sata_power_off(lane);11951195- break;11961196-11971197- case PHY_MODE_ETHERNET:12271227+ switch (lane->id) {12281228+ case 0:12291229+ mvebu_a3700_comphy_usb3_power_off(lane);11981230 mvebu_a3700_comphy_ethernet_power_off(lane);11991199- break;12001200-12011201- case PHY_MODE_PCIE:12311231+ return 0;12321232+ case 1:12021233 mvebu_a3700_comphy_pcie_power_off(lane);12031203- break;12041204-12341234+ mvebu_a3700_comphy_ethernet_power_off(lane);12351235+ return 0;12361236+ case 2:12371237+ mvebu_a3700_comphy_usb3_power_off(lane);12381238+ mvebu_a3700_comphy_sata_power_off(lane);12391239+ return 0;12051240 default:12061241 dev_err(lane->dev, "invalid COMPHY mode\n");12071242 return -EINVAL;12081243 }12091209-12101210- return 0;12111244}1212124512131246static const struct phy_ops mvebu_a3700_comphy_ops = {12141247 .power_on = mvebu_a3700_comphy_power_on,12151248 .power_off = mvebu_a3700_comphy_power_off,12161216- .reset = mvebu_a3700_comphy_reset,12171249 .set_mode = mvebu_a3700_comphy_set_mode,12181250 .owner = THIS_MODULE,12191251};···13411393 * To avoid relying on the bootloader/firmware configuration,13421394 * power off all comphys.13431395 */13441344- mvebu_a3700_comphy_reset(phy);13451345- lane->needs_reset = false;13961396+ mvebu_a3700_comphy_power_off(phy);13461397 }1347139813481399 provider = devm_of_phy_provider_register(&pdev->dev,
+1
drivers/reset/reset-imx7.c
···329329 break;330330331331 case IMX8MP_RESET_PCIE_CTRL_APPS_EN:332332+ case IMX8MP_RESET_PCIEPHY_PERST:332333 value = assert ? 0 : bit;333334 break;334335 }
+17-5
drivers/reset/reset-microchip-sparx5.c
···3333 .reg_stride = 4,3434};35353636-static int sparx5_switch_reset(struct reset_controller_dev *rcdev,3737- unsigned long id)3636+static int sparx5_switch_reset(struct mchp_reset_context *ctx)3837{3939- struct mchp_reset_context *ctx =4040- container_of(rcdev, struct mchp_reset_context, rcdev);4138 u32 val;42394340 /* Make sure the core is PROTECTED from reset */···5154 1, 100);5255}53565757+static int sparx5_reset_noop(struct reset_controller_dev *rcdev,5858+ unsigned long id)5959+{6060+ return 0;6161+}6262+5463static const struct reset_control_ops sparx5_reset_ops = {5555- .reset = sparx5_switch_reset,6464+ .reset = sparx5_reset_noop,5665};57665867static int mchp_sparx5_map_syscon(struct platform_device *pdev, char *name,···125122 ctx->rcdev.of_node = dn;126123 ctx->props = device_get_match_data(&pdev->dev);127124125125+ /* Issue the reset very early, our actual reset callback is a noop. */126126+ err = sparx5_switch_reset(ctx);127127+ if (err)128128+ return err;129129+128130 return devm_reset_controller_register(&pdev->dev, &ctx->rcdev);129131}130132···171163 return platform_driver_register(&mchp_sparx5_reset_driver);172164}173165166166+/*167167+ * Because this is a global reset, keep this postcore_initcall() to issue the168168+ * reset as early as possible during the kernel startup.169169+ */174170postcore_initcall(mchp_sparx5_reset_init);175171176172MODULE_DESCRIPTION("Microchip Sparx5 switch reset driver");
···25292529 tb->cm_ops = &icm_icl_ops;25302530 break;2531253125322532+ case PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_2C_NHI:25322533 case PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_4C_NHI:25332534 icm->is_supported = icm_tgl_is_supported;25342535 icm->get_mode = icm_ar_get_mode;
+1
drivers/thunderbolt/nhi.h
···5555 * need for the PCI quirk anymore as we will use ICM also on Apple5656 * hardware.5757 */5858+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_2C_NHI 0x11345859#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_4C_NHI 0x11375960#define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_NHI 0x157d6061#define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_BRIDGE 0x157e
···60396039 *60406040 * Return: The same as for usb_reset_and_verify_device().60416041 * However, if a reset is already in progress (for instance, if a60426042- * driver doesn't have pre_ or post_reset() callbacks, and while60426042+ * driver doesn't have pre_reset() or post_reset() callbacks, and while60436043 * being unbound or re-bound during the ongoing reset its disconnect()60446044 * or probe() routine tries to perform a second, nested reset), the60456045 * routine returns -EINPROGRESS.
+7-6
drivers/usb/dwc3/core.c
···1752175217531753 dwc3_get_properties(dwc);1754175417551755- if (!dwc->sysdev_is_parent) {17561756- ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64));17571757- if (ret)17581758- return ret;17591759- }17601760-17611755 dwc->reset = devm_reset_control_array_get_optional_shared(dev);17621756 if (IS_ERR(dwc->reset))17631757 return PTR_ERR(dwc->reset);···1816182218171823 platform_set_drvdata(pdev, dwc);18181824 dwc3_cache_hwparams(dwc);18251825+18261826+ if (!dwc->sysdev_is_parent &&18271827+ DWC3_GHWPARAMS0_AWIDTH(dwc->hwparams.hwparams0) == 64) {18281828+ ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64));18291829+ if (ret)18301830+ goto disable_clks;18311831+ }1819183218201833 spin_lock_init(&dwc->lock);18211834 mutex_init(&dwc->mutex);
···5656 tristate "Analogix ANX7411 Type-C DRP Port controller driver"5757 depends on I2C5858 depends on USB_ROLE_SWITCH5959+ depends on POWER_SUPPLY5960 help6061 Say Y or M here if your system has Analogix ANX7411 Type-C DRP Port6162 controller driver.
+6-3
drivers/xen/xenbus/xenbus_client.c
···382382 unsigned long ring_size = nr_pages * XEN_PAGE_SIZE;383383 grant_ref_t gref_head;384384 unsigned int i;385385+ void *addr;385386 int ret;386387387387- *vaddr = alloc_pages_exact(ring_size, gfp | __GFP_ZERO);388388+ addr = *vaddr = alloc_pages_exact(ring_size, gfp | __GFP_ZERO);388389 if (!*vaddr) {389390 ret = -ENOMEM;390391 goto err;···402401 unsigned long gfn;403402404403 if (is_vmalloc_addr(*vaddr))405405- gfn = pfn_to_gfn(vmalloc_to_pfn(vaddr[i]));404404+ gfn = pfn_to_gfn(vmalloc_to_pfn(addr));406405 else407407- gfn = virt_to_gfn(vaddr[i]);406406+ gfn = virt_to_gfn(addr);408407409408 grefs[i] = gnttab_claim_grant_reference(&gref_head);410409 gnttab_grant_foreign_access_ref(grefs[i], dev->otherend_id,411410 gfn, 0);411411+412412+ addr += XEN_PAGE_SIZE;412413 }413414414415 return 0;
···167167#define EXT4_MB_CR0_OPTIMIZED 0x8000168168/* Avg fragment size rb tree lookup succeeded at least once for cr = 1 */169169#define EXT4_MB_CR1_OPTIMIZED 0x00010000170170-/* Perform linear traversal for one group */171171-#define EXT4_MB_SEARCH_NEXT_LINEAR 0x00020000172170struct ext4_allocation_request {173171 /* target inode for block we're allocating */174172 struct inode *inode;···15981600 struct list_head s_discard_list;15991601 struct work_struct s_discard_work;16001602 atomic_t s_retry_alloc_pending;16011601- struct rb_root s_mb_avg_fragment_size_root;16021602- rwlock_t s_mb_rb_lock;16031603+ struct list_head *s_mb_avg_fragment_size;16041604+ rwlock_t *s_mb_avg_fragment_size_locks;16031605 struct list_head *s_mb_largest_free_orders;16041606 rwlock_t *s_mb_largest_free_orders_locks;16051607···34113413 ext4_grpblk_t bb_first_free; /* first free block */34123414 ext4_grpblk_t bb_free; /* total free blocks */34133415 ext4_grpblk_t bb_fragments; /* nr of freespace fragments */34163416+ int bb_avg_fragment_size_order; /* order of average34173417+ fragment in BG */34143418 ext4_grpblk_t bb_largest_free_order;/* order of largest frag in BG */34153419 ext4_group_t bb_group; /* Group number */34163420 struct list_head bb_prealloc_list;···34203420 void *bb_bitmap;34213421#endif34223422 struct rw_semaphore alloc_sem;34233423- struct rb_node bb_avg_fragment_size_rb;34233423+ struct list_head bb_avg_fragment_size_node;34243424 struct list_head bb_largest_free_order_node;34253425 ext4_grpblk_t bb_counters[]; /* Nr of free power-of-two-block34263426 * regions, index is order.
+4
fs/ext4/extents.c
···460460 error_msg = "invalid eh_entries";461461 goto corrupted;462462 }463463+ if (unlikely((eh->eh_entries == 0) && (depth > 0))) {464464+ error_msg = "eh_entries is 0 but eh_depth is > 0";465465+ goto corrupted;466466+ }463467 if (!ext4_valid_extent_entries(inode, eh, lblk, &pblk, depth)) {464468 error_msg = "invalid extent entries";465469 goto corrupted;
···140140 * number of buddy bitmap orders possible) number of lists. Group-infos are141141 * placed in appropriate lists.142142 *143143- * 2) Average fragment size rb tree (sbi->s_mb_avg_fragment_size_root)143143+ * 2) Average fragment size lists (sbi->s_mb_avg_fragment_size)144144 *145145- * Locking: sbi->s_mb_rb_lock (rwlock)145145+ * Locking: sbi->s_mb_avg_fragment_size_locks(array of rw locks)146146 *147147- * This is a red black tree consisting of group infos and the tree is sorted148148- * by average fragment sizes (which is calculated as ext4_group_info->bb_free149149- * / ext4_group_info->bb_fragments).147147+ * This is an array of lists where in the i-th list there are groups with148148+ * average fragment size >= 2^i and < 2^(i+1). The average fragment size149149+ * is computed as ext4_group_info->bb_free / ext4_group_info->bb_fragments.150150+ * Note that we don't bother with a special list for completely empty groups151151+ * so we only have MB_NUM_ORDERS(sb) lists.150152 *151153 * When "mb_optimize_scan" mount option is set, mballoc consults the above data152154 * structures to decide the order in which groups are to be traversed for···162160 *163161 * At CR = 1, we only consider groups where average fragment size > request164162 * size. So, we lookup a group which has average fragment size just above or165165- * equal to request size using our rb tree (data structure 2) in O(log N) time.163163+ * equal to request size using our average fragment size group lists (data164164+ * structure 2) in O(1) time.166165 *167166 * If "mb_optimize_scan" mount option is not set, mballoc traverses groups in168167 * linear order which requires O(N) search time for each CR 0 and CR 1 phase.···805802 }806803}807804808808-static void ext4_mb_rb_insert(struct rb_root *root, struct rb_node *new,809809- int (*cmp)(struct rb_node *, struct rb_node *))805805+static int mb_avg_fragment_size_order(struct super_block *sb, ext4_grpblk_t len)810806{811811- struct rb_node **iter = &root->rb_node, *parent = NULL;807807+ int order;812808813813- while (*iter) {814814- parent = *iter;815815- if (cmp(new, *iter) > 0)816816- iter = &((*iter)->rb_left);817817- else818818- iter = &((*iter)->rb_right);819819- }820820-821821- rb_link_node(new, parent, iter);822822- rb_insert_color(new, root);809809+ /*810810+ * We don't bother with a special lists groups with only 1 block free811811+ * extents and for completely empty groups.812812+ */813813+ order = fls(len) - 2;814814+ if (order < 0)815815+ return 0;816816+ if (order == MB_NUM_ORDERS(sb))817817+ order--;818818+ return order;823819}824820825825-static int826826-ext4_mb_avg_fragment_size_cmp(struct rb_node *rb1, struct rb_node *rb2)827827-{828828- struct ext4_group_info *grp1 = rb_entry(rb1,829829- struct ext4_group_info,830830- bb_avg_fragment_size_rb);831831- struct ext4_group_info *grp2 = rb_entry(rb2,832832- struct ext4_group_info,833833- bb_avg_fragment_size_rb);834834- int num_frags_1, num_frags_2;835835-836836- num_frags_1 = grp1->bb_fragments ?837837- grp1->bb_free / grp1->bb_fragments : 0;838838- num_frags_2 = grp2->bb_fragments ?839839- grp2->bb_free / grp2->bb_fragments : 0;840840-841841- return (num_frags_2 - num_frags_1);842842-}843843-844844-/*845845- * Reinsert grpinfo into the avg_fragment_size tree with new average846846- * fragment size.847847- */821821+/* Move group to appropriate avg_fragment_size list */848822static void849823mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp)850824{851825 struct ext4_sb_info *sbi = EXT4_SB(sb);826826+ int new_order;852827853828 if (!test_opt2(sb, MB_OPTIMIZE_SCAN) || grp->bb_free == 0)854829 return;855830856856- write_lock(&sbi->s_mb_rb_lock);857857- if (!RB_EMPTY_NODE(&grp->bb_avg_fragment_size_rb)) {858858- rb_erase(&grp->bb_avg_fragment_size_rb,859859- &sbi->s_mb_avg_fragment_size_root);860860- RB_CLEAR_NODE(&grp->bb_avg_fragment_size_rb);861861- }831831+ new_order = mb_avg_fragment_size_order(sb,832832+ grp->bb_free / grp->bb_fragments);833833+ if (new_order == grp->bb_avg_fragment_size_order)834834+ return;862835863863- ext4_mb_rb_insert(&sbi->s_mb_avg_fragment_size_root,864864- &grp->bb_avg_fragment_size_rb,865865- ext4_mb_avg_fragment_size_cmp);866866- write_unlock(&sbi->s_mb_rb_lock);836836+ if (grp->bb_avg_fragment_size_order != -1) {837837+ write_lock(&sbi->s_mb_avg_fragment_size_locks[838838+ grp->bb_avg_fragment_size_order]);839839+ list_del(&grp->bb_avg_fragment_size_node);840840+ write_unlock(&sbi->s_mb_avg_fragment_size_locks[841841+ grp->bb_avg_fragment_size_order]);842842+ }843843+ grp->bb_avg_fragment_size_order = new_order;844844+ write_lock(&sbi->s_mb_avg_fragment_size_locks[845845+ grp->bb_avg_fragment_size_order]);846846+ list_add_tail(&grp->bb_avg_fragment_size_node,847847+ &sbi->s_mb_avg_fragment_size[grp->bb_avg_fragment_size_order]);848848+ write_unlock(&sbi->s_mb_avg_fragment_size_locks[849849+ grp->bb_avg_fragment_size_order]);867850}868851869852/*···898909 *new_cr = 1;899910 } else {900911 *group = grp->bb_group;901901- ac->ac_last_optimal_group = *group;902912 ac->ac_flags |= EXT4_MB_CR0_OPTIMIZED;903913 }904914}905915906916/*907907- * Choose next group by traversing average fragment size tree. Updates *new_cr908908- * if cr lvel needs an update. Sets EXT4_MB_SEARCH_NEXT_LINEAR to indicate that909909- * the linear search should continue for one iteration since there's lock910910- * contention on the rb tree lock.917917+ * Choose next group by traversing average fragment size list of suitable918918+ * order. Updates *new_cr if cr level needs an update.911919 */912920static void ext4_mb_choose_next_group_cr1(struct ext4_allocation_context *ac,913921 int *new_cr, ext4_group_t *group, ext4_group_t ngroups)914922{915923 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);916916- int avg_fragment_size, best_so_far;917917- struct rb_node *node, *found;918918- struct ext4_group_info *grp;919919-920920- /*921921- * If there is contention on the lock, instead of waiting for the lock922922- * to become available, just continue searching lineraly. We'll resume923923- * our rb tree search later starting at ac->ac_last_optimal_group.924924- */925925- if (!read_trylock(&sbi->s_mb_rb_lock)) {926926- ac->ac_flags |= EXT4_MB_SEARCH_NEXT_LINEAR;927927- return;928928- }924924+ struct ext4_group_info *grp = NULL, *iter;925925+ int i;929926930927 if (unlikely(ac->ac_flags & EXT4_MB_CR1_OPTIMIZED)) {931928 if (sbi->s_mb_stats)932929 atomic_inc(&sbi->s_bal_cr1_bad_suggestions);933933- /* We have found something at CR 1 in the past */934934- grp = ext4_get_group_info(ac->ac_sb, ac->ac_last_optimal_group);935935- for (found = rb_next(&grp->bb_avg_fragment_size_rb); found != NULL;936936- found = rb_next(found)) {937937- grp = rb_entry(found, struct ext4_group_info,938938- bb_avg_fragment_size_rb);930930+ }931931+932932+ for (i = mb_avg_fragment_size_order(ac->ac_sb, ac->ac_g_ex.fe_len);933933+ i < MB_NUM_ORDERS(ac->ac_sb); i++) {934934+ if (list_empty(&sbi->s_mb_avg_fragment_size[i]))935935+ continue;936936+ read_lock(&sbi->s_mb_avg_fragment_size_locks[i]);937937+ if (list_empty(&sbi->s_mb_avg_fragment_size[i])) {938938+ read_unlock(&sbi->s_mb_avg_fragment_size_locks[i]);939939+ continue;940940+ }941941+ list_for_each_entry(iter, &sbi->s_mb_avg_fragment_size[i],942942+ bb_avg_fragment_size_node) {939943 if (sbi->s_mb_stats)940944 atomic64_inc(&sbi->s_bal_cX_groups_considered[1]);941941- if (likely(ext4_mb_good_group(ac, grp->bb_group, 1)))945945+ if (likely(ext4_mb_good_group(ac, iter->bb_group, 1))) {946946+ grp = iter;942947 break;943943- }944944- goto done;945945- }946946-947947- node = sbi->s_mb_avg_fragment_size_root.rb_node;948948- best_so_far = 0;949949- found = NULL;950950-951951- while (node) {952952- grp = rb_entry(node, struct ext4_group_info,953953- bb_avg_fragment_size_rb);954954- avg_fragment_size = 0;955955- if (ext4_mb_good_group(ac, grp->bb_group, 1)) {956956- avg_fragment_size = grp->bb_fragments ?957957- grp->bb_free / grp->bb_fragments : 0;958958- if (!best_so_far || avg_fragment_size < best_so_far) {959959- best_so_far = avg_fragment_size;960960- found = node;961948 }962949 }963963- if (avg_fragment_size > ac->ac_g_ex.fe_len)964964- node = node->rb_right;965965- else966966- node = node->rb_left;950950+ read_unlock(&sbi->s_mb_avg_fragment_size_locks[i]);951951+ if (grp)952952+ break;967953 }968954969969-done:970970- if (found) {971971- grp = rb_entry(found, struct ext4_group_info,972972- bb_avg_fragment_size_rb);955955+ if (grp) {973956 *group = grp->bb_group;974957 ac->ac_flags |= EXT4_MB_CR1_OPTIMIZED;975958 } else {976959 *new_cr = 2;977960 }978978-979979- read_unlock(&sbi->s_mb_rb_lock);980980- ac->ac_last_optimal_group = *group;981961}982962983963static inline int should_optimize_scan(struct ext4_allocation_context *ac)···97210149731015 if (ac->ac_groups_linear_remaining) {9741016 ac->ac_groups_linear_remaining--;975975- goto inc_and_return;976976- }977977-978978- if (ac->ac_flags & EXT4_MB_SEARCH_NEXT_LINEAR) {979979- ac->ac_flags &= ~EXT4_MB_SEARCH_NEXT_LINEAR;9801017 goto inc_and_return;9811018 }9821019···10021049{10031050 *new_cr = ac->ac_criteria;1004105110051005- if (!should_optimize_scan(ac) || ac->ac_groups_linear_remaining)10521052+ if (!should_optimize_scan(ac) || ac->ac_groups_linear_remaining) {10531053+ *group = next_linear_group(ac, *group, ngroups);10061054 return;10551055+ }1007105610081057 if (*new_cr == 0) {10091058 ext4_mb_choose_next_group_cr0(ac, new_cr, group, ngroups);···10301075 struct ext4_sb_info *sbi = EXT4_SB(sb);10311076 int i;1032107710331033- if (test_opt2(sb, MB_OPTIMIZE_SCAN) && grp->bb_largest_free_order >= 0) {10781078+ for (i = MB_NUM_ORDERS(sb) - 1; i >= 0; i--)10791079+ if (grp->bb_counters[i] > 0)10801080+ break;10811081+ /* No need to move between order lists? */10821082+ if (!test_opt2(sb, MB_OPTIMIZE_SCAN) ||10831083+ i == grp->bb_largest_free_order) {10841084+ grp->bb_largest_free_order = i;10851085+ return;10861086+ }10871087+10881088+ if (grp->bb_largest_free_order >= 0) {10341089 write_lock(&sbi->s_mb_largest_free_orders_locks[10351090 grp->bb_largest_free_order]);10361091 list_del_init(&grp->bb_largest_free_order_node);10371092 write_unlock(&sbi->s_mb_largest_free_orders_locks[10381093 grp->bb_largest_free_order]);10391094 }10401040- grp->bb_largest_free_order = -1; /* uninit */10411041-10421042- for (i = MB_NUM_ORDERS(sb) - 1; i >= 0; i--) {10431043- if (grp->bb_counters[i] > 0) {10441044- grp->bb_largest_free_order = i;10451045- break;10461046- }10471047- }10481048- if (test_opt2(sb, MB_OPTIMIZE_SCAN) &&10491049- grp->bb_largest_free_order >= 0 && grp->bb_free) {10951095+ grp->bb_largest_free_order = i;10961096+ if (grp->bb_largest_free_order >= 0 && grp->bb_free) {10501097 write_lock(&sbi->s_mb_largest_free_orders_locks[10511098 grp->bb_largest_free_order]);10521099 list_add_tail(&grp->bb_largest_free_order_node,···11051148 EXT4_GROUP_INFO_BBITMAP_CORRUPT);11061149 }11071150 mb_set_largest_free_order(sb, grp);11511151+ mb_update_avg_fragment_size(sb, grp);1108115211091153 clear_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &(grp->bb_state));1110115411111155 period = get_cycles() - period;11121156 atomic_inc(&sbi->s_mb_buddies_generated);11131157 atomic64_add(period, &sbi->s_mb_generation_time);11141114- mb_update_avg_fragment_size(sb, grp);11151158}1116115911171160/* The buddy information is attached the buddy cache inode···25932636ext4_mb_regular_allocator(struct ext4_allocation_context *ac)25942637{25952638 ext4_group_t prefetch_grp = 0, ngroups, group, i;25962596- int cr = -1;26392639+ int cr = -1, new_cr;25972640 int err = 0, first_err = 0;25982641 unsigned int nr = 0, prefetch_ios = 0;25992642 struct ext4_sb_info *sbi;···26642707 * from the goal value specified26652708 */26662709 group = ac->ac_g_ex.fe_group;26672667- ac->ac_last_optimal_group = group;26682710 ac->ac_groups_linear_remaining = sbi->s_mb_max_linear_groups;26692711 prefetch_grp = group;2670271226712671- for (i = 0; i < ngroups; group = next_linear_group(ac, group, ngroups),26722672- i++) {26732673- int ret = 0, new_cr;27132713+ for (i = 0, new_cr = cr; i < ngroups; i++,27142714+ ext4_mb_choose_next_group(ac, &new_cr, &group, ngroups)) {27152715+ int ret = 0;2674271626752717 cond_resched();26762676-26772677- ext4_mb_choose_next_group(ac, &new_cr, &group, ngroups);26782718 if (new_cr != cr) {26792719 cr = new_cr;26802720 goto repeat;···29452991 struct super_block *sb = pde_data(file_inode(seq->file));29462992 unsigned long position;2947299329482948- read_lock(&EXT4_SB(sb)->s_mb_rb_lock);29492949-29502950- if (*pos < 0 || *pos >= MB_NUM_ORDERS(sb) + 1)29942994+ if (*pos < 0 || *pos >= 2*MB_NUM_ORDERS(sb))29512995 return NULL;29522996 position = *pos + 1;29532997 return (void *) ((unsigned long) position);···29573005 unsigned long position;2958300629593007 ++*pos;29602960- if (*pos < 0 || *pos >= MB_NUM_ORDERS(sb) + 1)30083008+ if (*pos < 0 || *pos >= 2*MB_NUM_ORDERS(sb))29613009 return NULL;29623010 position = *pos + 1;29633011 return (void *) ((unsigned long) position);···29693017 struct ext4_sb_info *sbi = EXT4_SB(sb);29703018 unsigned long position = ((unsigned long) v);29713019 struct ext4_group_info *grp;29722972- struct rb_node *n;29732973- unsigned int count, min, max;30203020+ unsigned int count;2974302129753022 position--;29763023 if (position >= MB_NUM_ORDERS(sb)) {29772977- seq_puts(seq, "fragment_size_tree:\n");29782978- n = rb_first(&sbi->s_mb_avg_fragment_size_root);29792979- if (!n) {29802980- seq_puts(seq, "\ttree_min: 0\n\ttree_max: 0\n\ttree_nodes: 0\n");29812981- return 0;29822982- }29832983- grp = rb_entry(n, struct ext4_group_info, bb_avg_fragment_size_rb);29842984- min = grp->bb_fragments ? grp->bb_free / grp->bb_fragments : 0;29852985- count = 1;29862986- while (rb_next(n)) {29872987- count++;29882988- n = rb_next(n);29892989- }29902990- grp = rb_entry(n, struct ext4_group_info, bb_avg_fragment_size_rb);29912991- max = grp->bb_fragments ? grp->bb_free / grp->bb_fragments : 0;30243024+ position -= MB_NUM_ORDERS(sb);30253025+ if (position == 0)30263026+ seq_puts(seq, "avg_fragment_size_lists:\n");2992302729932993- seq_printf(seq, "\ttree_min: %u\n\ttree_max: %u\n\ttree_nodes: %u\n",29942994- min, max, count);30283028+ count = 0;30293029+ read_lock(&sbi->s_mb_avg_fragment_size_locks[position]);30303030+ list_for_each_entry(grp, &sbi->s_mb_avg_fragment_size[position],30313031+ bb_avg_fragment_size_node)30323032+ count++;30333033+ read_unlock(&sbi->s_mb_avg_fragment_size_locks[position]);30343034+ seq_printf(seq, "\tlist_order_%u_groups: %u\n",30353035+ (unsigned int)position, count);29953036 return 0;29963037 }29973038···29943049 seq_puts(seq, "max_free_order_lists:\n");29953050 }29963051 count = 0;30523052+ read_lock(&sbi->s_mb_largest_free_orders_locks[position]);29973053 list_for_each_entry(grp, &sbi->s_mb_largest_free_orders[position],29983054 bb_largest_free_order_node)29993055 count++;30563056+ read_unlock(&sbi->s_mb_largest_free_orders_locks[position]);30003057 seq_printf(seq, "\tlist_order_%u_groups: %u\n",30013058 (unsigned int)position, count);30023059···30063059}3007306030083061static void ext4_mb_seq_structs_summary_stop(struct seq_file *seq, void *v)30093009-__releases(&EXT4_SB(sb)->s_mb_rb_lock)30103062{30113011- struct super_block *sb = pde_data(file_inode(seq->file));30123012-30133013- read_unlock(&EXT4_SB(sb)->s_mb_rb_lock);30143063}3015306430163065const struct seq_operations ext4_mb_seq_structs_summary_ops = {···31193176 init_rwsem(&meta_group_info[i]->alloc_sem);31203177 meta_group_info[i]->bb_free_root = RB_ROOT;31213178 INIT_LIST_HEAD(&meta_group_info[i]->bb_largest_free_order_node);31223122- RB_CLEAR_NODE(&meta_group_info[i]->bb_avg_fragment_size_rb);31793179+ INIT_LIST_HEAD(&meta_group_info[i]->bb_avg_fragment_size_node);31233180 meta_group_info[i]->bb_largest_free_order = -1; /* uninit */31813181+ meta_group_info[i]->bb_avg_fragment_size_order = -1; /* uninit */31243182 meta_group_info[i]->bb_group = group;3125318331263184 mb_group_bb_bitmap_alloc(sb, meta_group_info[i], group);···33703426 i++;33713427 } while (i < MB_NUM_ORDERS(sb));3372342833733373- sbi->s_mb_avg_fragment_size_root = RB_ROOT;34293429+ sbi->s_mb_avg_fragment_size =34303430+ kmalloc_array(MB_NUM_ORDERS(sb), sizeof(struct list_head),34313431+ GFP_KERNEL);34323432+ if (!sbi->s_mb_avg_fragment_size) {34333433+ ret = -ENOMEM;34343434+ goto out;34353435+ }34363436+ sbi->s_mb_avg_fragment_size_locks =34373437+ kmalloc_array(MB_NUM_ORDERS(sb), sizeof(rwlock_t),34383438+ GFP_KERNEL);34393439+ if (!sbi->s_mb_avg_fragment_size_locks) {34403440+ ret = -ENOMEM;34413441+ goto out;34423442+ }34433443+ for (i = 0; i < MB_NUM_ORDERS(sb); i++) {34443444+ INIT_LIST_HEAD(&sbi->s_mb_avg_fragment_size[i]);34453445+ rwlock_init(&sbi->s_mb_avg_fragment_size_locks[i]);34463446+ }33743447 sbi->s_mb_largest_free_orders =33753448 kmalloc_array(MB_NUM_ORDERS(sb), sizeof(struct list_head),33763449 GFP_KERNEL);···34063445 INIT_LIST_HEAD(&sbi->s_mb_largest_free_orders[i]);34073446 rwlock_init(&sbi->s_mb_largest_free_orders_locks[i]);34083447 }34093409- rwlock_init(&sbi->s_mb_rb_lock);3410344834113449 spin_lock_init(&sbi->s_md_lock);34123450 sbi->s_mb_free_pending = 0;···34763516 free_percpu(sbi->s_locality_groups);34773517 sbi->s_locality_groups = NULL;34783518out:35193519+ kfree(sbi->s_mb_avg_fragment_size);35203520+ kfree(sbi->s_mb_avg_fragment_size_locks);34793521 kfree(sbi->s_mb_largest_free_orders);34803522 kfree(sbi->s_mb_largest_free_orders_locks);34813523 kfree(sbi->s_mb_offsets);···35443582 kvfree(group_info);35453583 rcu_read_unlock();35463584 }35853585+ kfree(sbi->s_mb_avg_fragment_size);35863586+ kfree(sbi->s_mb_avg_fragment_size_locks);35473587 kfree(sbi->s_mb_largest_free_orders);35483588 kfree(sbi->s_mb_largest_free_orders_locks);35493589 kfree(sbi->s_mb_offsets);···51575193 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);51585194 int bsbits = ac->ac_sb->s_blocksize_bits;51595195 loff_t size, isize;51965196+ bool inode_pa_eligible, group_pa_eligible;5160519751615198 if (!(ac->ac_flags & EXT4_MB_HINT_DATA))51625199 return;···51655200 if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))51665201 return;5167520252035203+ group_pa_eligible = sbi->s_mb_group_prealloc > 0;52045204+ inode_pa_eligible = true;51685205 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);51695206 isize = (i_size_read(ac->ac_inode) + ac->ac_sb->s_blocksize - 1)51705207 >> bsbits;5171520852095209+ /* No point in using inode preallocation for closed files */51725210 if ((size == isize) && !ext4_fs_is_busy(sbi) &&51735173- !inode_is_open_for_write(ac->ac_inode)) {51745174- ac->ac_flags |= EXT4_MB_HINT_NOPREALLOC;51755175- return;51765176- }52115211+ !inode_is_open_for_write(ac->ac_inode))52125212+ inode_pa_eligible = false;5177521351785178- if (sbi->s_mb_group_prealloc <= 0) {51795179- ac->ac_flags |= EXT4_MB_STREAM_ALLOC;51805180- return;51815181- }51825182-51835183- /* don't use group allocation for large files */51845214 size = max(size, isize);51855185- if (size > sbi->s_mb_stream_request) {51865186- ac->ac_flags |= EXT4_MB_STREAM_ALLOC;52155215+ /* Don't use group allocation for large files */52165216+ if (size > sbi->s_mb_stream_request)52175217+ group_pa_eligible = false;52185218+52195219+ if (!group_pa_eligible) {52205220+ if (inode_pa_eligible)52215221+ ac->ac_flags |= EXT4_MB_STREAM_ALLOC;52225222+ else52235223+ ac->ac_flags |= EXT4_MB_HINT_NOPREALLOC;51875224 return;51885225 }51895226···55325565 ext4_fsblk_t block = 0;55335566 unsigned int inquota = 0;55345567 unsigned int reserv_clstrs = 0;55685568+ int retries = 0;55355569 u64 seq;5536557055375571 might_sleep();···56355667 ar->len = ac->ac_b_ex.fe_len;56365668 }56375669 } else {56385638- if (ext4_mb_discard_preallocations_should_retry(sb, ac, &seq))56705670+ if (++retries < 3 &&56715671+ ext4_mb_discard_preallocations_should_retry(sb, ac, &seq))56395672 goto repeat;56405673 /*56415674 * If block allocation fails then the pa allocated above
-1
fs/ext4/mballoc.h
···178178 /* copy of the best found extent taken before preallocation efforts */179179 struct ext4_free_extent ac_f_ex;180180181181- ext4_group_t ac_last_optimal_group;182181 __u32 ac_groups_considered;183182 __u32 ac_flags; /* allocation hints */184183 __u16 ac_groups_scanned;
+2-1
fs/ntfs/super.c
···20922092 // TODO: Initialize security.20932093 /* Get the extended system files' directory inode. */20942094 vol->extend_ino = ntfs_iget(sb, FILE_Extend);20952095- if (IS_ERR(vol->extend_ino) || is_bad_inode(vol->extend_ino)) {20952095+ if (IS_ERR(vol->extend_ino) || is_bad_inode(vol->extend_ino) ||20962096+ !S_ISDIR(vol->extend_ino->i_mode)) {20962097 if (!IS_ERR(vol->extend_ino))20972098 iput(vol->extend_ino);20982099 ntfs_error(sb, "Failed to load $Extend.");
+3-3
fs/xfs/xfs_notify_failure.c
···175175 u64 ddev_start;176176 u64 ddev_end;177177178178- if (!(mp->m_sb.sb_flags & SB_BORN)) {178178+ if (!(mp->m_super->s_flags & SB_BORN)) {179179 xfs_warn(mp, "filesystem is not ready for notify_failure()!");180180 return -EIO;181181 }182182183183 if (mp->m_rtdev_targp && mp->m_rtdev_targp->bt_daxdev == dax_dev) {184184- xfs_warn(mp,184184+ xfs_debug(mp,185185 "notify_failure() not supported on realtime device!");186186 return -EOPNOTSUPP;187187 }···194194 }195195196196 if (!xfs_has_rmapbt(mp)) {197197- xfs_warn(mp, "notify_failure() needs rmapbt enabled!");197197+ xfs_debug(mp, "notify_failure() needs rmapbt enabled!");198198 return -EOPNOTSUPP;199199 }200200
···11271127 * cover a worst-case of every other cpu being on one of two nodes for a11281128 * very large NR_CPUS.11291129 *11301130- * Use PAGE_SIZE as a minimum for smaller configurations.11301130+ * Use PAGE_SIZE as a minimum for smaller configurations while avoiding11311131+ * unsigned comparison to -1.11311132 */11321132-#define CPUMAP_FILE_MAX_BYTES ((((NR_CPUS * 9)/32 - 1) > PAGE_SIZE) \11331133+#define CPUMAP_FILE_MAX_BYTES (((NR_CPUS * 9)/32 > PAGE_SIZE) \11331134 ? (NR_CPUS * 9)/32 - 1 : PAGE_SIZE)11341135#define CPULIST_FILE_MAX_BYTES (((NR_CPUS * 7)/2 > PAGE_SIZE) ? (NR_CPUS * 7)/2 : PAGE_SIZE)11351136
+2-2
include/linux/libata.h
···11361136extern void ata_scsi_slave_destroy(struct scsi_device *sdev);11371137extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,11381138 int queue_depth);11391139-extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,11401140- int queue_depth);11391139+extern int ata_change_queue_depth(struct ata_port *ap, struct ata_device *dev,11401140+ struct scsi_device *sdev, int queue_depth);11411141extern struct ata_device *ata_dev_pair(struct ata_device *adev);11421142extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);11431143extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
-45
include/linux/memcontrol.h
···17881788 rcu_read_unlock();17891789}1790179017911791-/**17921792- * get_mem_cgroup_from_obj - get a memcg associated with passed kernel object.17931793- * @p: pointer to object from which memcg should be extracted. It can be NULL.17941794- *17951795- * Retrieves the memory group into which the memory of the pointed kernel17961796- * object is accounted. If memcg is found, its reference is taken.17971797- * If a passed kernel object is uncharged, or if proper memcg cannot be found,17981798- * as well as if mem_cgroup is disabled, NULL is returned.17991799- *18001800- * Return: valid memcg pointer with taken reference or NULL.18011801- */18021802-static inline struct mem_cgroup *get_mem_cgroup_from_obj(void *p)18031803-{18041804- struct mem_cgroup *memcg;18051805-18061806- rcu_read_lock();18071807- do {18081808- memcg = mem_cgroup_from_obj(p);18091809- } while (memcg && !css_tryget(&memcg->css));18101810- rcu_read_unlock();18111811- return memcg;18121812-}18131813-18141814-/**18151815- * mem_cgroup_or_root - always returns a pointer to a valid memory cgroup.18161816- * @memcg: pointer to a valid memory cgroup or NULL.18171817- *18181818- * If passed argument is not NULL, returns it without any additional checks18191819- * and changes. Otherwise, root_mem_cgroup is returned.18201820- *18211821- * NOTE: root_mem_cgroup can be NULL during early boot.18221822- */18231823-static inline struct mem_cgroup *mem_cgroup_or_root(struct mem_cgroup *memcg)18241824-{18251825- return memcg ? memcg : root_mem_cgroup;18261826-}18271791#else18281792static inline bool mem_cgroup_kmem_disabled(void)18291793{···18441880{18451881}1846188218471847-static inline struct mem_cgroup *get_mem_cgroup_from_obj(void *p)18481848-{18491849- return NULL;18501850-}18511851-18521852-static inline struct mem_cgroup *mem_cgroup_or_root(struct mem_cgroup *memcg)18531853-{18541854- return NULL;18551855-}18561883#endif /* CONFIG_MEMCG_KMEM */1857188418581885#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_ZSWAP)
···624624/* number of characters left in xmit buffer before we ask for more */625625#define WAKEUP_CHARS 256626626627627+/**628628+ * uart_xmit_advance - Advance xmit buffer and account Tx'ed chars629629+ * @up: uart_port structure describing the port630630+ * @chars: number of characters sent631631+ *632632+ * This function advances the tail of circular xmit buffer by the number of633633+ * @chars transmitted and handles accounting of transmitted bytes (into634634+ * @up's icount.tx).635635+ */636636+static inline void uart_xmit_advance(struct uart_port *up, unsigned int chars)637637+{638638+ struct circ_buf *xmit = &up->state->xmit;639639+640640+ xmit->tail = (xmit->tail + chars) & (UART_XMIT_SIZE - 1);641641+ up->icount.tx += chars;642642+}643643+627644struct module;628645struct tty_driver;629646
···6767#define IFF_TAP 0x00026868#define IFF_NAPI 0x00106969#define IFF_NAPI_FRAGS 0x00207070+/* Used in TUNSETIFF to bring up tun/tap without carrier */7171+#define IFF_NO_CARRIER 0x00407072#define IFF_NO_PI 0x10007173/* This flag has no real effect */7274#define IFF_ONE_QUEUE 0x2000
+3
io_uring/io_uring.c
···26482648 io_kill_timeouts(ctx, NULL, true);26492649 /* if we failed setting up the ctx, we might not have any rings */26502650 io_iopoll_try_reap_events(ctx);26512651+ /* drop cached put refs after potentially doing completions */26522652+ if (current->io_uring)26532653+ io_uring_drop_tctx_refs(current);26512654 }2652265526532656 INIT_WORK(&ctx->exit_work, io_ring_exit_work);
···30663066 if (WARN_ON(!work->func))30673067 return false;3068306830693069- if (!from_cancel) {30703070- lock_map_acquire(&work->lockdep_map);30713071- lock_map_release(&work->lockdep_map);30723072- }30693069+ lock_map_acquire(&work->lockdep_map);30703070+ lock_map_release(&work->lockdep_map);3073307130743072 if (start_flush_work(work, &barr, from_cancel)) {30753073 wait_for_completion(&barr.done);
+3-1
lib/Kconfig.debug
···264264config DEBUG_INFO_DWARF4265265 bool "Generate DWARF Version 4 debuginfo"266266 select DEBUG_INFO267267+ depends on !CC_IS_CLANG || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))267268 help268268- Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+.269269+ Generate DWARF v4 debug info. This requires gcc 4.5+, binutils 2.35.2270270+ if using clang without clang's integrated assembler, and gdb 7.0+.269271270272 If you have consumers of DWARF debug info that are not ready for271273 newer revisions of DWARF, you may wish to choose this or have your
+14-5
mm/damon/dbgfs.c
···884884 struct dentry *root, *dir, **new_dirs;885885 struct damon_ctx **new_ctxs;886886 int i, j;887887+ int ret = 0;887888888889 if (damon_nr_running_ctxs())889890 return -EBUSY;···899898900899 new_dirs = kmalloc_array(dbgfs_nr_ctxs - 1, sizeof(*dbgfs_dirs),901900 GFP_KERNEL);902902- if (!new_dirs)903903- return -ENOMEM;901901+ if (!new_dirs) {902902+ ret = -ENOMEM;903903+ goto out_dput;904904+ }904905905906 new_ctxs = kmalloc_array(dbgfs_nr_ctxs - 1, sizeof(*dbgfs_ctxs),906907 GFP_KERNEL);907908 if (!new_ctxs) {908908- kfree(new_dirs);909909- return -ENOMEM;909909+ ret = -ENOMEM;910910+ goto out_new_dirs;910911 }911912912913 for (i = 0, j = 0; i < dbgfs_nr_ctxs; i++) {···928925 dbgfs_ctxs = new_ctxs;929926 dbgfs_nr_ctxs--;930927931931- return 0;928928+ goto out_dput;929929+930930+out_new_dirs:931931+ kfree(new_dirs);932932+out_dput:933933+ dput(dir);934934+ return ret;932935}933936934937static ssize_t dbgfs_rm_context_write(struct file *file,
+3
mm/frontswap.c
···125125 * p->frontswap set to something valid to work properly.126126 */127127 frontswap_map_set(sis, map);128128+129129+ if (!frontswap_enabled())130130+ return;128131 frontswap_ops->init(type);129132}130133
+28-6
mm/gup.c
···23452345}2346234623472347#ifdef CONFIG_ARCH_HAS_PTE_SPECIAL23482348-static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,23492349- unsigned int flags, struct page **pages, int *nr)23482348+/*23492349+ * Fast-gup relies on pte change detection to avoid concurrent pgtable23502350+ * operations.23512351+ *23522352+ * To pin the page, fast-gup needs to do below in order:23532353+ * (1) pin the page (by prefetching pte), then (2) check pte not changed.23542354+ *23552355+ * For the rest of pgtable operations where pgtable updates can be racy23562356+ * with fast-gup, we need to do (1) clear pte, then (2) check whether page23572357+ * is pinned.23582358+ *23592359+ * Above will work for all pte-level operations, including THP split.23602360+ *23612361+ * For THP collapse, it's a bit more complicated because fast-gup may be23622362+ * walking a pgtable page that is being freed (pte is still valid but pmd23632363+ * can be cleared already). To avoid race in such condition, we need to23642364+ * also check pmd here to make sure pmd doesn't change (corresponds to23652365+ * pmdp_collapse_flush() in the THP collapse code path).23662366+ */23672367+static int gup_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr,23682368+ unsigned long end, unsigned int flags,23692369+ struct page **pages, int *nr)23502370{23512371 struct dev_pagemap *pgmap = NULL;23522372 int nr_start = *nr, ret = 0;···24122392 goto pte_unmap;24132393 }2414239424152415- if (unlikely(pte_val(pte) != pte_val(*ptep))) {23952395+ if (unlikely(pmd_val(pmd) != pmd_val(*pmdp)) ||23962396+ unlikely(pte_val(pte) != pte_val(*ptep))) {24162397 gup_put_folio(folio, 1, flags);24172398 goto pte_unmap;24182399 }···24602439 * get_user_pages_fast_only implementation that can pin pages. Thus it's still24612440 * useful to have gup_huge_pmd even if we can't operate on ptes.24622441 */24632463-static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,24642464- unsigned int flags, struct page **pages, int *nr)24422442+static int gup_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr,24432443+ unsigned long end, unsigned int flags,24442444+ struct page **pages, int *nr)24652445{24662446 return 0;24672447}···27862764 if (!gup_huge_pd(__hugepd(pmd_val(pmd)), addr,27872765 PMD_SHIFT, next, flags, pages, nr))27882766 return 0;27892789- } else if (!gup_pte_range(pmd, addr, next, flags, pages, nr))27672767+ } else if (!gup_pte_range(pmd, pmdp, addr, next, flags, pages, nr))27902768 return 0;27912769 } while (pmdp++, addr = next, addr != end);27922770
+2-4
mm/huge_memory.c
···28942894 max_zone_pfn = zone_end_pfn(zone);28952895 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) {28962896 int nr_pages;28972897- if (!pfn_valid(pfn))28982898- continue;2899289729002900- page = pfn_to_page(pfn);29012901- if (!get_page_unless_zero(page))28982898+ page = pfn_to_online_page(pfn);28992899+ if (!page || !get_page_unless_zero(page))29022900 continue;2903290129042902 if (zone != page_zone(page))
+8-6
mm/hugetlb.c
···34203420{34213421 int i, nid = page_to_nid(page);34223422 struct hstate *target_hstate;34233423+ struct page *subpage;34233424 int rc = 0;3424342534253426 target_hstate = size_to_hstate(PAGE_SIZE << h->demote_order);···34543453 mutex_lock(&target_hstate->resize_lock);34553454 for (i = 0; i < pages_per_huge_page(h);34563455 i += pages_per_huge_page(target_hstate)) {34563456+ subpage = nth_page(page, i);34573457 if (hstate_is_gigantic(target_hstate))34583458- prep_compound_gigantic_page_for_demote(page + i,34583458+ prep_compound_gigantic_page_for_demote(subpage,34593459 target_hstate->order);34603460 else34613461- prep_compound_page(page + i, target_hstate->order);34623462- set_page_private(page + i, 0);34633463- set_page_refcounted(page + i);34643464- prep_new_huge_page(target_hstate, page + i, nid);34653465- put_page(page + i);34613461+ prep_compound_page(subpage, target_hstate->order);34623462+ set_page_private(subpage, 0);34633463+ set_page_refcounted(subpage);34643464+ prep_new_huge_page(target_hstate, subpage, nid);34653465+ put_page(subpage);34663466 }34673467 mutex_unlock(&target_hstate->resize_lock);34683468
+6-4
mm/khugepaged.c
···1083108310841084 pmd_ptl = pmd_lock(mm, pmd); /* probably unnecessary */10851085 /*10861086- * After this gup_fast can't run anymore. This also removes10871087- * any huge TLB entry from the CPU so we won't allow10881088- * huge and small TLB entries for the same virtual address10891089- * to avoid the risk of CPU bugs in that area.10861086+ * This removes any huge TLB entry from the CPU so we won't allow10871087+ * huge and small TLB entries for the same virtual address to10881088+ * avoid the risk of CPU bugs in that area.10891089+ *10901090+ * Parallel fast GUP is fine since fast GUP will back off when10911091+ * it detects PMD is changed.10901092 */10911093 _pmd = pmdp_collapse_flush(vma, address, pmd);10921094 spin_unlock(pmd_ptl);
+5-2
mm/madvise.c
···451451 continue;452452 }453453454454- /* Do not interfere with other mappings of this page */455455- if (page_mapcount(page) != 1)454454+ /*455455+ * Do not interfere with other mappings of this page and456456+ * non-LRU page.457457+ */458458+ if (!PageLRU(page) || page_mapcount(page) != 1)456459 continue;457460458461 VM_BUG_ON_PAGE(PageTransCompound(page), page);
+16-11
mm/memory-failure.c
···345345 * not much we can do. We just print a message and ignore otherwise.346346 */347347348348+#define FSDAX_INVALID_PGOFF ULONG_MAX349349+348350/*349351 * Schedule a process for later kill.350352 * Uses GFP_ATOMIC allocations to avoid potential recursions in the VM.351353 *352352- * Notice: @fsdax_pgoff is used only when @p is a fsdax page.353353- * In other cases, such as anonymous and file-backend page, the address to be354354- * killed can be caculated by @p itself.354354+ * Note: @fsdax_pgoff is used only when @p is a fsdax page and a355355+ * filesystem with a memory failure handler has claimed the356356+ * memory_failure event. In all other cases, page->index and357357+ * page->mapping are sufficient for mapping the page back to its358358+ * corresponding user virtual address.355359 */356360static void add_to_kill(struct task_struct *tsk, struct page *p,357361 pgoff_t fsdax_pgoff, struct vm_area_struct *vma,···371367372368 tk->addr = page_address_in_vma(p, vma);373369 if (is_zone_device_page(p)) {374374- /*375375- * Since page->mapping is not used for fsdax, we need376376- * calculate the address based on the vma.377377- */378378- if (p->pgmap->type == MEMORY_DEVICE_FS_DAX)370370+ if (fsdax_pgoff != FSDAX_INVALID_PGOFF)379371 tk->addr = vma_pgoff_address(fsdax_pgoff, 1, vma);380372 tk->size_shift = dev_pagemap_mapping_shift(vma, tk->addr);381373 } else···523523 if (!page_mapped_in_vma(page, vma))524524 continue;525525 if (vma->vm_mm == t->mm)526526- add_to_kill(t, page, 0, vma, to_kill);526526+ add_to_kill(t, page, FSDAX_INVALID_PGOFF, vma,527527+ to_kill);527528 }528529 }529530 read_unlock(&tasklist_lock);···560559 * to be informed of all such data corruptions.561560 */562561 if (vma->vm_mm == t->mm)563563- add_to_kill(t, page, 0, vma, to_kill);562562+ add_to_kill(t, page, FSDAX_INVALID_PGOFF, vma,563563+ to_kill);564564 }565565 }566566 read_unlock(&tasklist_lock);···744742 .pfn = pfn,745743 };746744 priv.tk.tsk = p;745745+746746+ if (!p->mm)747747+ return -EFAULT;747748748749 mmap_read_lock(p->mm);749750 ret = walk_page_range(p->mm, 0, TASK_SIZE, &hwp_walk_ops,···19331928 * Call driver's implementation to handle the memory failure, otherwise19341929 * fall back to generic handler.19351930 */19361936- if (pgmap->ops->memory_failure) {19311931+ if (pgmap_has_memory_failure(pgmap)) {19371932 rc = pgmap->ops->memory_failure(pgmap, pfn, 1, flags);19381933 /*19391934 * Fall back to generic handler too if operation is not
+13-7
mm/memory.c
···4386438643874387 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,43884388 vmf->address, &vmf->ptl);43894389- ret = 0;43904390- /* Re-check under ptl */43914391- if (likely(!vmf_pte_changed(vmf)))43924392- do_set_pte(vmf, page, vmf->address);43934393- else43944394- ret = VM_FAULT_NOPAGE;4395438943964396- update_mmu_tlb(vma, vmf->address, vmf->pte);43904390+ /* Re-check under ptl */43914391+ if (likely(!vmf_pte_changed(vmf))) {43924392+ do_set_pte(vmf, page, vmf->address);43934393+43944394+ /* no need to invalidate: a not-present page won't be cached */43954395+ update_mmu_cache(vma, vmf->address, vmf->pte);43964396+43974397+ ret = 0;43984398+ } else {43994399+ update_mmu_tlb(vma, vmf->address, vmf->pte);44004400+ ret = VM_FAULT_NOPAGE;44014401+ }44024402+43974403 pte_unmap_unlock(vmf->pte, vmf->ptl);43984404 return ret;43994405}
+11-5
mm/migrate_device.c
···77#include <linux/export.h>88#include <linux/memremap.h>99#include <linux/migrate.h>1010+#include <linux/mm.h>1011#include <linux/mm_inline.h>1112#include <linux/mmu_notifier.h>1213#include <linux/oom.h>···194193 bool anon_exclusive;195194 pte_t swp_pte;196195196196+ flush_cache_page(vma, addr, pte_pfn(*ptep));197197 anon_exclusive = PageAnon(page) && PageAnonExclusive(page);198198 if (anon_exclusive) {199199- flush_cache_page(vma, addr, pte_pfn(*ptep));200200- ptep_clear_flush(vma, addr, ptep);199199+ pte = ptep_clear_flush(vma, addr, ptep);201200202201 if (page_try_share_anon_rmap(page)) {203202 set_pte_at(mm, addr, ptep, pte);···207206 goto next;208207 }209208 } else {210210- ptep_get_and_clear(mm, addr, ptep);209209+ pte = ptep_get_and_clear(mm, addr, ptep);211210 }212211213212 migrate->cpages++;213213+214214+ /* Set the dirty flag on the folio now the pte is gone. */215215+ if (pte_dirty(pte))216216+ folio_mark_dirty(page_folio(page));214217215218 /* Setup special migration page table entry */216219 if (mpfn & MIGRATE_PFN_WRITE)···259254 migrate->dst[migrate->npages] = 0;260255 migrate->src[migrate->npages++] = mpfn;261256 }262262- arch_leave_lazy_mmu_mode();263263- pte_unmap_unlock(ptep - 1, ptl);264257265258 /* Only flush the TLB if we actually modified any entries */266259 if (unmapped)267260 flush_tlb_range(walk->vma, start, end);261261+262262+ arch_leave_lazy_mmu_mode();263263+ pte_unmap_unlock(ptep - 1, ptl);268264269265 return 0;270266}
+55-10
mm/page_alloc.c
···47084708EXPORT_SYMBOL_GPL(fs_reclaim_release);47094709#endif4710471047114711+/*47124712+ * Zonelists may change due to hotplug during allocation. Detect when zonelists47134713+ * have been rebuilt so allocation retries. Reader side does not lock and47144714+ * retries the allocation if zonelist changes. Writer side is protected by the47154715+ * embedded spin_lock.47164716+ */47174717+static DEFINE_SEQLOCK(zonelist_update_seq);47184718+47194719+static unsigned int zonelist_iter_begin(void)47204720+{47214721+ if (IS_ENABLED(CONFIG_MEMORY_HOTREMOVE))47224722+ return read_seqbegin(&zonelist_update_seq);47234723+47244724+ return 0;47254725+}47264726+47274727+static unsigned int check_retry_zonelist(unsigned int seq)47284728+{47294729+ if (IS_ENABLED(CONFIG_MEMORY_HOTREMOVE))47304730+ return read_seqretry(&zonelist_update_seq, seq);47314731+47324732+ return seq;47334733+}47344734+47114735/* Perform direct synchronous page reclaim */47124736static unsigned long47134737__perform_reclaim(gfp_t gfp_mask, unsigned int order,···50255001 int compaction_retries;50265002 int no_progress_loops;50275003 unsigned int cpuset_mems_cookie;50045004+ unsigned int zonelist_iter_cookie;50285005 int reserve_flags;5029500650305007 /*···50365011 (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)))50375012 gfp_mask &= ~__GFP_ATOMIC;5038501350395039-retry_cpuset:50145014+restart:50405015 compaction_retries = 0;50415016 no_progress_loops = 0;50425017 compact_priority = DEF_COMPACT_PRIORITY;50435018 cpuset_mems_cookie = read_mems_allowed_begin();50195019+ zonelist_iter_cookie = zonelist_iter_begin();5044502050455021 /*50465022 * The fast path uses conservative alloc_flags to succeed only until···52135187 goto retry;521451885215518952165216- /* Deal with possible cpuset update races before we start OOM killing */52175217- if (check_retry_cpuset(cpuset_mems_cookie, ac))52185218- goto retry_cpuset;51905190+ /*51915191+ * Deal with possible cpuset update races or zonelist updates to avoid51925192+ * a unnecessary OOM kill.51935193+ */51945194+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||51955195+ check_retry_zonelist(zonelist_iter_cookie))51965196+ goto restart;5219519752205198 /* Reclaim has failed us, start killing things */52215199 page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress);···52395209 }5240521052415211nopage:52425242- /* Deal with possible cpuset update races before we fail */52435243- if (check_retry_cpuset(cpuset_mems_cookie, ac))52445244- goto retry_cpuset;52125212+ /*52135213+ * Deal with possible cpuset update races or zonelist updates to avoid52145214+ * a unnecessary OOM kill.52155215+ */52165216+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||52175217+ check_retry_zonelist(zonelist_iter_cookie))52185218+ goto restart;5245521952465220 /*52475221 * Make sure that __GFP_NOFAIL request doesn't leak out and make sure···57405706 /* reset page count bias and offset to start of new frag */57415707 nc->pagecnt_bias = PAGE_FRAG_CACHE_MAX_SIZE + 1;57425708 offset = size - fragsz;57095709+ if (unlikely(offset < 0)) {57105710+ /*57115711+ * The caller is trying to allocate a fragment57125712+ * with fragsz > PAGE_SIZE but the cache isn't big57135713+ * enough to satisfy the request, this may57145714+ * happen in low memory conditions.57155715+ * We don't release the cache page because57165716+ * it could make memory pressure worse57175717+ * so we simply return NULL here.57185718+ */57195719+ return NULL;57205720+ }57435721 }5744572257455723 nc->pagecnt_bias--;···65606514 int nid;65616515 int __maybe_unused cpu;65626516 pg_data_t *self = data;65636563- static DEFINE_SPINLOCK(lock);6564651765656565- spin_lock(&lock);65186518+ write_seqlock(&zonelist_update_seq);6566651965676520#ifdef CONFIG_NUMA65686521 memset(node_load, 0, sizeof(node_load));···65986553#endif65996554 }6600655566016601- spin_unlock(&lock);65566556+ write_sequnlock(&zonelist_update_seq);66026557}6603655866046559static noinline void __init
+14-11
mm/page_isolation.c
···288288 * @isolate_before: isolate the pageblock before the boundary_pfn289289 * @skip_isolation: the flag to skip the pageblock isolation in second290290 * isolate_single_pageblock()291291+ * @migratetype: migrate type to set in error recovery.291292 *292293 * Free and in-use pages can be as big as MAX_ORDER-1 and contain more than one293294 * pageblock. When not all pageblocks within a page are isolated at the same···303302 * the in-use page then splitting the free page.304303 */305304static int isolate_single_pageblock(unsigned long boundary_pfn, int flags,306306- gfp_t gfp_flags, bool isolate_before, bool skip_isolation)305305+ gfp_t gfp_flags, bool isolate_before, bool skip_isolation,306306+ int migratetype)307307{308308- unsigned char saved_mt;309308 unsigned long start_pfn;310309 unsigned long isolate_pageblock;311310 unsigned long pfn;···329328 start_pfn = max(ALIGN_DOWN(isolate_pageblock, MAX_ORDER_NR_PAGES),330329 zone->zone_start_pfn);331330332332- saved_mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));331331+ if (skip_isolation) {332332+ int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));333333334334- if (skip_isolation)335335- VM_BUG_ON(!is_migrate_isolate(saved_mt));336336- else {337337- ret = set_migratetype_isolate(pfn_to_page(isolate_pageblock), saved_mt, flags,338338- isolate_pageblock, isolate_pageblock + pageblock_nr_pages);334334+ VM_BUG_ON(!is_migrate_isolate(mt));335335+ } else {336336+ ret = set_migratetype_isolate(pfn_to_page(isolate_pageblock), migratetype,337337+ flags, isolate_pageblock, isolate_pageblock + pageblock_nr_pages);339338340339 if (ret)341340 return ret;···476475failed:477476 /* restore the original migratetype */478477 if (!skip_isolation)479479- unset_migratetype_isolate(pfn_to_page(isolate_pageblock), saved_mt);478478+ unset_migratetype_isolate(pfn_to_page(isolate_pageblock), migratetype);480479 return -EBUSY;481480}482481···538537 bool skip_isolation = false;539538540539 /* isolate [isolate_start, isolate_start + pageblock_nr_pages) pageblock */541541- ret = isolate_single_pageblock(isolate_start, flags, gfp_flags, false, skip_isolation);540540+ ret = isolate_single_pageblock(isolate_start, flags, gfp_flags, false,541541+ skip_isolation, migratetype);542542 if (ret)543543 return ret;544544···547545 skip_isolation = true;548546549547 /* isolate [isolate_end - pageblock_nr_pages, isolate_end) pageblock */550550- ret = isolate_single_pageblock(isolate_end, flags, gfp_flags, true, skip_isolation);548548+ ret = isolate_single_pageblock(isolate_end, flags, gfp_flags, true,549549+ skip_isolation, migratetype);551550 if (ret) {552551 unset_migratetype_isolate(pfn_to_page(isolate_start), migratetype);553552 return ret;
+1-1
mm/secretmem.c
···285285286286 secretmem_mnt = kern_mount(&secretmem_fs);287287 if (IS_ERR(secretmem_mnt))288288- ret = PTR_ERR(secretmem_mnt);288288+ return PTR_ERR(secretmem_mnt);289289290290 /* prevent secretmem mappings from ever getting PROT_EXEC */291291 secretmem_mnt->mnt_flags |= MNT_NOEXEC;
+4-1
mm/slab_common.c
···475475void kmem_cache_destroy(struct kmem_cache *s)476476{477477 int refcnt;478478+ bool rcu_set;478479479480 if (unlikely(!s) || !kasan_check_byte(s))480481 return;481482482483 cpus_read_lock();483484 mutex_lock(&slab_mutex);485485+486486+ rcu_set = s->flags & SLAB_TYPESAFE_BY_RCU;484487485488 refcnt = --s->refcount;486489 if (refcnt)···495492out_unlock:496493 mutex_unlock(&slab_mutex);497494 cpus_read_unlock();498498- if (!refcnt && !(s->flags & SLAB_TYPESAFE_BY_RCU))495495+ if (!refcnt && !rcu_set)499496 kmem_cache_release(s);500497}501498EXPORT_SYMBOL(kmem_cache_destroy);
+16-2
mm/slub.c
···310310 */311311static nodemask_t slab_nodes;312312313313+/*314314+ * Workqueue used for flush_cpu_slab().315315+ */316316+static struct workqueue_struct *flushwq;317317+313318/********************************************************************314319 * Core slab cache functions315320 *******************************************************************/···27352730 INIT_WORK(&sfw->work, flush_cpu_slab);27362731 sfw->skip = false;27372732 sfw->s = s;27382738- schedule_work_on(cpu, &sfw->work);27332733+ queue_work_on(cpu, flushwq, &sfw->work);27392734 }2740273527412736 for_each_online_cpu(cpu) {···4863485848644859void __init kmem_cache_init_late(void)48654860{48614861+ flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM, 0);48624862+ WARN_ON(!flushwq);48664863}4867486448684865struct kmem_cache *···49334926 /* Honor the call site pointer we received. */49344927 trace_kmalloc(caller, ret, s, size, s->size, gfpflags);4935492849294929+ ret = kasan_kmalloc(s, ret, size, gfpflags);49304930+49364931 return ret;49374932}49384933EXPORT_SYMBOL(__kmalloc_track_caller);···4965495649664957 /* Honor the call site pointer we received. */49674958 trace_kmalloc_node(caller, ret, s, size, s->size, gfpflags, node);49594959+49604960+ ret = kasan_kmalloc(s, ret, size, gfpflags);4968496149694962 return ret;49704963}···59015890 char *name = kmalloc(ID_STR_LENGTH, GFP_KERNEL);59025891 char *p = name;5903589259045904- BUG_ON(!name);58935893+ if (!name)58945894+ return ERR_PTR(-ENOMEM);5905589559065896 *p++ = ':';59075897 /*···59605948 * for the symlinks.59615949 */59625950 name = create_unique_id(s);59515951+ if (IS_ERR(name))59525952+ return PTR_ERR(name);59635953 }5964595459655955 s->kobj.kset = kset;
+1-1
mm/swap_state.c
···151151152152 for (i = 0; i < nr; i++) {153153 void *entry = xas_store(&xas, shadow);154154- VM_BUG_ON_FOLIO(entry != folio, folio);154154+ VM_BUG_ON_PAGE(entry != folio, entry);155155 set_page_private(folio_page(folio, i), 0);156156 xas_next(&xas);157157 }
+2-2
mm/vmscan.c
···25502550 }2551255125522552 if (unlikely(buffer_heads_over_limit)) {25532553- if (folio_get_private(folio) && folio_trylock(folio)) {25542554- if (folio_get_private(folio))25532553+ if (folio_test_private(folio) && folio_trylock(folio)) {25542554+ if (folio_test_private(folio))25552555 filemap_release_folio(folio, 0);25562556 folio_unlock(folio);25572557 }
-7
net/core/net_namespace.c
···1818#include <linux/user_namespace.h>1919#include <linux/net_namespace.h>2020#include <linux/sched/task.h>2121-#include <linux/sched/mm.h>2221#include <linux/uidgid.h>2322#include <linux/cookie.h>2423···11431144 * setup_net() and cleanup_net() are not possible.11441145 */11451146 for_each_net(net) {11461146- struct mem_cgroup *old, *memcg;11471147-11481148- memcg = mem_cgroup_or_root(get_mem_cgroup_from_obj(net));11491149- old = set_active_memcg(memcg);11501147 error = ops_init(ops, net);11511151- set_active_memcg(old);11521152- mem_cgroup_put(memcg);11531148 if (error)11541149 goto out_undo;11551150 list_add_tail(&net->exit_list, &net_exit_list);
+6-3
net/mac80211/mlme.c
···4064406440654065 if (!(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_HE) &&40664066 (!elems->he_cap || !elems->he_operation)) {40674067- mutex_unlock(&sdata->local->sta_mtx);40684067 sdata_info(sdata,40694068 "HE AP is missing HE capability/operation\n");40704069 ret = false;···5634563556355636 mutex_lock(&local->sta_mtx);56365637 sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);56375637- if (WARN_ON(!sta))56385638+ if (WARN_ON(!sta)) {56395639+ mutex_unlock(&local->sta_mtx);56385640 goto free;56415641+ }56395642 link_sta = rcu_dereference_protected(sta->link[link->link_id],56405643 lockdep_is_held(&local->sta_mtx));56415641- if (WARN_ON(!link_sta))56445644+ if (WARN_ON(!link_sta)) {56455645+ mutex_unlock(&local->sta_mtx);56425646 goto free;56475647+ }5643564856445649 changed |= ieee80211_recalc_twt_req(link, link_sta, elems);56455650
+4-2
net/mac80211/rc80211_minstrel_ht.c
···1010#include <linux/random.h>1111#include <linux/moduleparam.h>1212#include <linux/ieee80211.h>1313+#include <linux/minmax.h>1314#include <net/mac80211.h>1415#include "rate.h"1516#include "sta_info.h"···15511550{15521551 struct ieee80211_sta_rates *rates;15531552 int i = 0;15531553+ int max_rates = min_t(int, mp->hw->max_rates, IEEE80211_TX_RATE_TABLE_SIZE);1554155415551555 rates = kzalloc(sizeof(*rates), GFP_ATOMIC);15561556 if (!rates)···15611559 minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_tp_rate[0]);1562156015631561 /* Fill up remaining, keep one entry for max_probe_rate */15641564- for (; i < (mp->hw->max_rates - 1); i++)15621562+ for (; i < (max_rates - 1); i++)15651563 minstrel_ht_set_rate(mp, mi, rates, i, mi->max_tp_rate[i]);1566156415671567- if (i < mp->hw->max_rates)15651565+ if (i < max_rates)15681566 minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate);1569156715701568 if (i < IEEE80211_TX_RATE_TABLE_SIZE)
+1-1
net/mac80211/status.c
···729729730730 if (!sdata) {731731 skb->dev = NULL;732732- } else {732732+ } else if (!dropped) {733733 unsigned int hdr_size =734734 ieee80211_hdrlen(hdr->frame_control);735735
+4
net/mac80211/tx.c
···59175917 skb_reset_network_header(skb);59185918 skb_reset_mac_header(skb);5919591959205920+ if (local->hw.queues < IEEE80211_NUM_ACS)59215921+ goto start_xmit;59225922+59205923 /* update QoS header to prioritize control port frames if possible,59215924 * priorization also happens for control port frames send over59225925 * AF_PACKET···59475944 }59485945 rcu_read_unlock();5949594659475947+start_xmit:59505948 /* mutex lock is only needed for incrementing the cookie counter */59515949 mutex_lock(&local->mtx);59525950
+2-2
net/mac80211/util.c
···301301 local_bh_disable();302302 spin_lock(&fq->lock);303303304304+ sdata->vif.txqs_stopped[ac] = false;305305+304306 if (!test_bit(SDATA_STATE_RUNNING, &sdata->state))305307 goto out;306308307309 if (sdata->vif.type == NL80211_IFTYPE_AP)308310 ps = &sdata->bss->ps;309309-310310- sdata->vif.txqs_stopped[ac] = false;311311312312 list_for_each_entry_rcu(sta, &local->sta_list, list) {313313 if (sdata != sta->sdata)
···602602 return !crypto_memneq(hmac, mp_opt->hmac, MPTCPOPT_HMAC_LEN);603603}604604605605-static void mptcp_sock_destruct(struct sock *sk)606606-{607607- /* if new mptcp socket isn't accepted, it is free'd608608- * from the tcp listener sockets request queue, linked609609- * from req->sk. The tcp socket is released.610610- * This calls the ULP release function which will611611- * also remove the mptcp socket, via612612- * sock_put(ctx->conn).613613- *614614- * Problem is that the mptcp socket will be in615615- * ESTABLISHED state and will not have the SOCK_DEAD flag.616616- * Both result in warnings from inet_sock_destruct.617617- */618618- if ((1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) {619619- sk->sk_state = TCP_CLOSE;620620- WARN_ON_ONCE(sk->sk_socket);621621- sock_orphan(sk);622622- }623623-624624- /* We don't need to clear msk->subflow, as it's still NULL at this point */625625- mptcp_destroy_common(mptcp_sk(sk), 0);626626- inet_sock_destruct(sk);627627-}628628-629605static void mptcp_force_close(struct sock *sk)630606{631607 /* the msk is not yet exposed to user-space */···744768 /* new mpc subflow takes ownership of the newly745769 * created mptcp socket746770 */747747- new_msk->sk_destruct = mptcp_sock_destruct;748771 mptcp_sk(new_msk)->setsockopt_seq = ctx->setsockopt_seq;749772 mptcp_pm_new_connection(mptcp_sk(new_msk), child, 1);750773 mptcp_token_accept(subflow_req, mptcp_sk(new_msk));···1738176317391764 for (msk = head; msk; msk = next) {17401765 struct sock *sk = (struct sock *)msk;17411741- bool slow;17661766+ bool slow, do_cancel_work;1742176717681768+ sock_hold(sk);17431769 slow = lock_sock_fast_nested(sk);17441770 next = msk->dl_next;17451771 msk->first = NULL;17461772 msk->dl_next = NULL;17731773+17741774+ do_cancel_work = __mptcp_close(sk, 0);17471775 unlock_sock_fast(sk, slow);17761776+ if (do_cancel_work)17771777+ mptcp_cancel_work(sk);17781778+ sock_put(sk);17481779 }1749178017501781 /* we are still under the listener msk socket lock */
···9898bool menu_is_visible(struct menu *menu);9999bool menu_has_prompt(struct menu *menu);100100const char *menu_get_prompt(struct menu *menu);101101-struct menu *menu_get_root_menu(struct menu *menu);102101struct menu *menu_get_parent_menu(struct menu *menu);103102bool menu_has_help(struct menu *menu);104103const char *menu_get_help(struct menu *menu);
-5
scripts/kconfig/menu.c
···661661 return NULL;662662}663663664664-struct menu *menu_get_root_menu(struct menu *menu)665665-{666666- return &rootmenu;667667-}668668-669664struct menu *menu_get_parent_menu(struct menu *menu)670665{671666 enum prop_type type;
···901901 NAU8824_IRQ_KEY_RELEASE_DIS |902902 NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0);903903904904- nau8824_sema_release(nau8824);904904+ if (nau8824->resume_lock) {905905+ nau8824_sema_release(nau8824);906906+ nau8824->resume_lock = false;907907+ }905908}906909907910static void nau8824_setup_auto_irq(struct nau8824 *nau8824)···969966 /* release semaphore held after resume,970967 * and cancel jack detection971968 */972972- nau8824_sema_release(nau8824);969969+ if (nau8824->resume_lock) {970970+ nau8824_sema_release(nau8824);971971+ nau8824->resume_lock = false;972972+ }973973 cancel_work_sync(&nau8824->jdet_work);974974 } else if (active_irq & NAU8824_KEY_SHORT_PRESS_IRQ) {975975 int key_status, button_pressed;···15301524static int __maybe_unused nau8824_resume(struct snd_soc_component *component)15311525{15321526 struct nau8824 *nau8824 = snd_soc_component_get_drvdata(component);15271527+ int ret;1533152815341529 regcache_cache_only(nau8824->regmap, false);15351530 regcache_sync(nau8824->regmap);···15381531 /* Hold semaphore to postpone playback happening15391532 * until jack detection done.15401533 */15411541- nau8824_sema_acquire(nau8824, 0);15341534+ nau8824->resume_lock = true;15351535+ ret = nau8824_sema_acquire(nau8824, 0);15361536+ if (ret)15371537+ nau8824->resume_lock = false;15421538 enable_irq(nau8824->irq);15431539 }15441540···19501940 nau8824->regmap = devm_regmap_init_i2c(i2c, &nau8824_regmap_config);19511941 if (IS_ERR(nau8824->regmap))19521942 return PTR_ERR(nau8824->regmap);19431943+ nau8824->resume_lock = false;19531944 nau8824->dev = dev;19541945 nau8824->irq = i2c->irq;19551946 sema_init(&nau8824->jd_sem, 1);
+1
sound/soc/codecs/nau8824.h
···436436 struct semaphore jd_sem;437437 int fs;438438 int irq;439439+ int resume_lock;439440 int micbias_voltage;440441 int vref_impedance;441442 int jkdet_polarity;
+45-19
sound/soc/codecs/rt5640.c
···2494249424952495 /* Select JD-source */24962496 snd_soc_component_update_bits(component, RT5640_JD_CTRL,24972497- RT5640_JD_MASK, rt5640->jd_src);24972497+ RT5640_JD_MASK, rt5640->jd_src << RT5640_JD_SFT);2498249824992499 /* Selecting GPIO01 as an interrupt */25002500 snd_soc_component_update_bits(component, RT5640_GPIO_CTRL1,···25042504 snd_soc_component_update_bits(component, RT5640_GPIO_CTRL3,25052505 RT5640_GP1_PF_MASK, RT5640_GP1_PF_OUT);2506250625072507- /* Enabling jd2 in general control 1 */25082507 snd_soc_component_write(component, RT5640_DUMMY1, 0x3f41);25092509-25102510- /* Enabling jd2 in general control 2 */25112511- snd_soc_component_write(component, RT5640_DUMMY2, 0x4001);2512250825132509 rt5640_set_ovcd_params(component);25142510···25142518 * pin 0/1 instead of it being stuck to 1. So we invert the JD polarity25152519 * on systems where the hardware does not already do this.25162520 */25172517- if (rt5640->jd_inverted)25182518- snd_soc_component_write(component, RT5640_IRQ_CTRL1,25192519- RT5640_IRQ_JD_NOR);25202520- else25212521- snd_soc_component_write(component, RT5640_IRQ_CTRL1,25222522- RT5640_IRQ_JD_NOR | RT5640_JD_P_INV);25212521+ if (rt5640->jd_inverted) {25222522+ if (rt5640->jd_src == RT5640_JD_SRC_JD1_IN4P)25232523+ snd_soc_component_write(component, RT5640_IRQ_CTRL1,25242524+ RT5640_IRQ_JD_NOR);25252525+ else if (rt5640->jd_src == RT5640_JD_SRC_JD2_IN4N)25262526+ snd_soc_component_update_bits(component, RT5640_DUMMY2,25272527+ RT5640_IRQ_JD2_MASK | RT5640_JD2_MASK,25282528+ RT5640_IRQ_JD2_NOR | RT5640_JD2_EN);25292529+ } else {25302530+ if (rt5640->jd_src == RT5640_JD_SRC_JD1_IN4P)25312531+ snd_soc_component_write(component, RT5640_IRQ_CTRL1,25322532+ RT5640_IRQ_JD_NOR | RT5640_JD_P_INV);25332533+ else if (rt5640->jd_src == RT5640_JD_SRC_JD2_IN4N)25342534+ snd_soc_component_update_bits(component, RT5640_DUMMY2,25352535+ RT5640_IRQ_JD2_MASK | RT5640_JD2_P_MASK |25362536+ RT5640_JD2_MASK,25372537+ RT5640_IRQ_JD2_NOR | RT5640_JD2_P_INV |25382538+ RT5640_JD2_EN);25392539+ }2523254025242541 rt5640->jack = jack;25252542 if (rt5640->jack->status & SND_JACK_MICROPHONE) {···2734272527352726 if (device_property_read_u32(component->dev,27362727 "realtek,jack-detect-source", &val) == 0) {27372737- if (val <= RT5640_JD_SRC_GPIO4)27382738- rt5640->jd_src = val << RT5640_JD_SFT;27392739- else if (val == RT5640_JD_SRC_HDA_HEADER)27402740- rt5640->jd_src = RT5640_JD_SRC_HDA_HEADER;27282728+ if (val <= RT5640_JD_SRC_HDA_HEADER)27292729+ rt5640->jd_src = val;27412730 else27422731 dev_warn(component->dev, "Warning: Invalid jack-detect-source value: %d, leaving jack-detect disabled\n",27432732 val);···28162809 regcache_sync(rt5640->regmap);2817281028182811 if (rt5640->jack) {28192819- if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER)28122812+ if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER) {28202813 snd_soc_component_update_bits(component,28212814 RT5640_DUMMY2, 0x1100, 0x1100);28222822- else28232823- snd_soc_component_write(component, RT5640_DUMMY2,28242824- 0x4001);28152815+ } else {28162816+ if (rt5640->jd_inverted) {28172817+ if (rt5640->jd_src == RT5640_JD_SRC_JD2_IN4N)28182818+ snd_soc_component_update_bits(28192819+ component, RT5640_DUMMY2,28202820+ RT5640_IRQ_JD2_MASK |28212821+ RT5640_JD2_MASK,28222822+ RT5640_IRQ_JD2_NOR |28232823+ RT5640_JD2_EN);28242824+28252825+ } else {28262826+ if (rt5640->jd_src == RT5640_JD_SRC_JD2_IN4N)28272827+ snd_soc_component_update_bits(28282828+ component, RT5640_DUMMY2,28292829+ RT5640_IRQ_JD2_MASK |28302830+ RT5640_JD2_P_MASK |28312831+ RT5640_JD2_MASK,28322832+ RT5640_IRQ_JD2_NOR |28332833+ RT5640_JD2_P_INV |28342834+ RT5640_JD2_EN);28352835+ }28362836+ }2825283728262838 queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);28272839 }
···4242selfdir = $(realpath $(dir $(filter %/lib.mk,$(MAKEFILE_LIST))))4343top_srcdir = $(selfdir)/../../..44444545+ifeq ($(KHDR_INCLUDES),)4646+KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include4747+endif4848+4549# The following are built by lib.mk common compile rules.4650# TEST_CUSTOM_PROGS should be used by tests that require4751# custom build rule and prevent common build rule use.
+1-1
tools/testing/selftests/net/reuseport_bpf.c
···328328 if (bind(fd1, addr, sockaddr_size()))329329 error(1, errno, "failed to bind recv socket 1");330330331331- if (!bind(fd2, addr, sockaddr_size()) && errno != EADDRINUSE)331331+ if (!bind(fd2, addr, sockaddr_size()) || errno != EADDRINUSE)332332 error(1, errno, "bind socket 2 should fail with EADDRINUSE");333333334334 free(addr);