···22*.example.dts33/processed-schema*.yaml44/processed-schema*.json55+66+#77+# We don't want to ignore the following even if they are dot-files88+#99+!.yamllint
···108108109109 msi-controller:110110 description:111111- Only present if the Message Based Interrupt functionnality is111111+ Only present if the Message Based Interrupt functionality is112112 being exposed by the HW, and the mbi-ranges property present.113113114114 mbi-ranges:
···16161717Support1818=======1919-If you got any problem, contact Wangxun support team via support@trustnetic.com1919+If you got any problem, contact Wangxun support team via nic-support@net-swift.com2020and Cc: netdev.
+7-6
MAINTAINERS
···16120161201612116121PCI ENDPOINT SUBSYSTEM1612216122M: Lorenzo Pieralisi <lpieralisi@kernel.org>1612316123-R: Krzysztof Wilczyński <kw@linux.com>1612316123+M: Krzysztof Wilczyński <kw@linux.com>1612416124R: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>1612516125R: Kishon Vijay Abraham I <kishon@kernel.org>1612616126L: linux-pci@vger.kernel.org···1612816128Q: https://patchwork.kernel.org/project/linux-pci/list/1612916129B: https://bugzilla.kernel.org1613016130C: irc://irc.oftc.net/linux-pci1613116131-T: git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git1613116131+T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git1613216132F: Documentation/PCI/endpoint/*1613316133F: Documentation/misc-devices/pci-endpoint-test.rst1613416134F: drivers/misc/pci_endpoint_test.c···1616316163Q: https://patchwork.kernel.org/project/linux-pci/list/1616416164B: https://bugzilla.kernel.org1616516165C: irc://irc.oftc.net/linux-pci1616616166-T: git git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git1616616166+T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git1616716167F: Documentation/driver-api/pci/p2pdma.rst1616816168F: drivers/pci/p2pdma.c1616916169F: include/linux/pci-p2pdma.h···16185161851618616186PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS1618716187M: Lorenzo Pieralisi <lpieralisi@kernel.org>1618816188+M: Krzysztof Wilczyński <kw@linux.com>1618816189R: Rob Herring <robh@kernel.org>1618916189-R: Krzysztof Wilczyński <kw@linux.com>1619016190L: linux-pci@vger.kernel.org1619116191S: Supported1619216192Q: https://patchwork.kernel.org/project/linux-pci/list/1619316193B: https://bugzilla.kernel.org1619416194C: irc://irc.oftc.net/linux-pci1619516195-T: git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git1619516195+T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git1619616196F: Documentation/devicetree/bindings/pci/1619716197F: drivers/pci/controller/1619816198F: drivers/pci/pci-bridge-emul.c···1620516205Q: https://patchwork.kernel.org/project/linux-pci/list/1620616206B: https://bugzilla.kernel.org1620716207C: irc://irc.oftc.net/linux-pci1620816208-T: git git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git1620816208+T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git1620916209F: Documentation/PCI/1621016210F: Documentation/devicetree/bindings/pci/1621116211F: arch/x86/kernel/early-quirks.c···2009820098SUPERH2009920099M: Yoshinori Sato <ysato@users.sourceforge.jp>2010020100M: Rich Felker <dalias@libc.org>2010120101+M: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2010120102L: linux-sh@vger.kernel.org2010220103S: Maintained2010320104Q: http://patchwork.kernel.org/project/linux-sh/list/
···5050 */5151static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable)5252{5353+ bool must_hard_disable = (exit_must_hard_disable() || !restartable);5454+5355 /* This must be done with RI=1 because tracing may touch vmaps */5456 trace_hardirqs_on();55575656- if (exit_must_hard_disable() || !restartable)5858+ if (must_hard_disable)5759 __hard_EE_RI_disable();58605961#ifdef CONFIG_PPC646062 /* This pattern matches prep_irq_for_idle */6163 if (unlikely(lazy_irq_pending_nocheck())) {6262- if (exit_must_hard_disable() || !restartable) {6464+ if (must_hard_disable) {6365 local_paca->irq_happened |= PACA_IRQ_HARD_DIS;6466 __hard_RI_enable();6567 }
···9090 if (PageHuge(page))9191 page = compound_head(page);92929393- if (!test_and_set_bit(PG_dcache_clean, &page->flags))9393+ if (!test_bit(PG_dcache_clean, &page->flags)) {9494 flush_icache_all();9595+ set_bit(PG_dcache_clean, &page->flags);9696+ }9597}9698#endif /* CONFIG_MMU */9799
+20
arch/riscv/mm/pgtable.c
···8181}82828383#endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */8484+#ifdef CONFIG_TRANSPARENT_HUGEPAGE8585+pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,8686+ unsigned long address, pmd_t *pmdp)8787+{8888+ pmd_t pmd = pmdp_huge_get_and_clear(vma->vm_mm, address, pmdp);8989+9090+ VM_BUG_ON(address & ~HPAGE_PMD_MASK);9191+ VM_BUG_ON(pmd_trans_huge(*pmdp));9292+ /*9393+ * When leaf PTE entries (regular pages) are collapsed into a leaf9494+ * PMD entry (huge page), a valid non-leaf PTE is converted into a9595+ * valid leaf PTE at the level 1 page table. Since the sfence.vma9696+ * forms that specify an address only apply to leaf PTEs, we need a9797+ * global flush here. collapse_huge_page() assumes these flushes are9898+ * eager, so just do the fence here.9999+ */100100+ flush_tlb_mm(vma->vm_mm);101101+ return pmd;102102+}103103+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
···3297329732983298 mutex_lock(&acpi_desc->init_mutex);32993299 set_bit(ARS_CANCEL, &acpi_desc->scrub_flags);33003300- cancel_delayed_work_sync(&acpi_desc->dwork);33013300 mutex_unlock(&acpi_desc->init_mutex);33013301+ cancel_delayed_work_sync(&acpi_desc->dwork);3302330233033303 /*33043304 * Bounce the nvdimm bus lock to make sure any in-flight
+8-10
drivers/clk/ingenic/jz4760-cgu.c
···5858 unsigned long rate, unsigned long parent_rate,5959 unsigned int *pm, unsigned int *pn, unsigned int *pod)6060{6161- unsigned int m, n, od, m_max = (1 << pll_info->m_bits) - 2;6161+ unsigned int m, n, od, m_max = (1 << pll_info->m_bits) - 1;62626363 /* The frequency after the N divider must be between 1 and 50 MHz. */6464 n = parent_rate / (1 * MHZ);···6666 /* The N divider must be >= 2. */6767 n = clamp_val(n, 2, 1 << pll_info->n_bits);68686969- for (;; n >>= 1) {7070- od = (unsigned int)-1;6969+ rate /= MHZ;7070+ parent_rate /= MHZ;71717272- do {7373- m = (rate / MHZ) * (1 << ++od) * n / (parent_rate / MHZ);7474- } while ((m > m_max || m & 1) && (od < 4));7575-7676- if (od < 4 && m >= 4 && m <= m_max)7777- break;7272+ for (m = m_max; m >= m_max && n >= 2; n--) {7373+ m = rate * n / parent_rate;7474+ od = m & 1;7575+ m <<= od;7876 }79778078 *pm = m;8181- *pn = n;7979+ *pn = n + 1;8280 *pod = 1 << od;8381}8482
+4-6
drivers/clk/microchip/clk-mpfs-ccc.c
···164164165165 for (unsigned int i = 0; i < num_clks; i++) {166166 struct mpfs_ccc_out_hw_clock *out_hw = &out_hws[i];167167- char *name = devm_kzalloc(dev, 23, GFP_KERNEL);167167+ char *name = devm_kasprintf(dev, GFP_KERNEL, "%s_out%u", parent->name, i);168168169169 if (!name)170170 return -ENOMEM;171171172172- snprintf(name, 23, "%s_out%u", parent->name, i);173172 out_hw->divider.hw.init = CLK_HW_INIT_HW(name, &parent->hw, &clk_divider_ops, 0);174173 out_hw->divider.reg = data->pll_base[i / MPFS_CCC_OUTPUTS_PER_PLL] +175174 out_hw->reg_offset;···200201201202 for (unsigned int i = 0; i < num_clks; i++) {202203 struct mpfs_ccc_pll_hw_clock *pll_hw = &pll_hws[i];203203- char *name = devm_kzalloc(dev, 18, GFP_KERNEL);204204205205- if (!name)205205+ pll_hw->name = devm_kasprintf(dev, GFP_KERNEL, "ccc%s_pll%u",206206+ strchrnul(dev->of_node->full_name, '@'), i);207207+ if (!pll_hw->name)206208 return -ENOMEM;207209208210 pll_hw->base = data->pll_base[i];209209- snprintf(name, 18, "ccc%s_pll%u", strchrnul(dev->of_node->full_name, '@'), i);210210- pll_hw->name = (const char *)name;211211 pll_hw->hw.init = CLK_HW_INIT_PARENTS_DATA_FIXED_SIZE(pll_hw->name,212212 pll_hw->parents,213213 &mpfs_ccc_pll_ops, 0);
+17-15
drivers/cpufreq/qcom-cpufreq-hw.c
···143143 return lval * xo_rate;144144}145145146146-/* Get the current frequency of the CPU (after throttling) */147147-static unsigned int qcom_cpufreq_hw_get(unsigned int cpu)148148-{149149- struct qcom_cpufreq_data *data;150150- struct cpufreq_policy *policy;151151-152152- policy = cpufreq_cpu_get_raw(cpu);153153- if (!policy)154154- return 0;155155-156156- data = policy->driver_data;157157-158158- return qcom_lmh_get_throttle_freq(data) / HZ_PER_KHZ;159159-}160160-161146/* Get the frequency requested by the cpufreq core for the CPU */162147static unsigned int qcom_cpufreq_get_freq(unsigned int cpu)163148{···162177 index = min(index, LUT_MAX_ENTRIES - 1);163178164179 return policy->freq_table[index].frequency;180180+}181181+182182+static unsigned int qcom_cpufreq_hw_get(unsigned int cpu)183183+{184184+ struct qcom_cpufreq_data *data;185185+ struct cpufreq_policy *policy;186186+187187+ policy = cpufreq_cpu_get_raw(cpu);188188+ if (!policy)189189+ return 0;190190+191191+ data = policy->driver_data;192192+193193+ if (data->throttle_irq >= 0)194194+ return qcom_lmh_get_throttle_freq(data) / HZ_PER_KHZ;195195+196196+ return qcom_cpufreq_get_freq(cpu);165197}166198167199static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
+7-5
drivers/cxl/core/region.c
···131131 struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);132132 struct cxl_port *iter = cxled_to_port(cxled);133133 struct cxl_ep *ep;134134- int rc;134134+ int rc = 0;135135136136 while (!is_cxl_root(to_cxl_port(iter->dev.parent)))137137 iter = to_cxl_port(iter->dev.parent);···143143144144 cxl_rr = cxl_rr_load(iter, cxlr);145145 cxld = cxl_rr->decoder;146146- rc = cxld->reset(cxld);146146+ if (cxld->reset)147147+ rc = cxld->reset(cxld);147148 if (rc)148149 return rc;149150 }···187186 iter = ep->next, ep = cxl_ep_load(iter, cxlmd)) {188187 cxl_rr = cxl_rr_load(iter, cxlr);189188 cxld = cxl_rr->decoder;190190- cxld->reset(cxld);189189+ if (cxld->reset)190190+ cxld->reset(cxld);191191 }192192193193 cxled->cxld.reset(&cxled->cxld);···993991 int i, distance;994992995993 /*996996- * Passthrough ports impose no distance requirements between994994+ * Passthrough decoders impose no distance requirements between997995 * peers998996 */999999- if (port->nr_dports == 1)997997+ if (cxl_rr->nr_targets == 1)1000998 distance = 0;1001999 else10021000 distance = p->nr_targets / cxl_rr->nr_targets;
+1-1
drivers/dax/super.c
···475475/**476476 * dax_holder() - obtain the holder of a dax device477477 * @dax_dev: a dax_device instance478478-478478+ *479479 * Return: the holder's data which represents the holder if registered,480480 * otherwize NULL.481481 */
+6-3
drivers/firmware/efi/libstub/arm64.c
···1919 const u8 *type1_family = efi_get_smbios_string(1, family);20202121 /*2222- * Ampere Altra machines crash in SetTime() if SetVirtualAddressMap()2323- * has not been called prior.2222+ * Ampere eMAG, Altra, and Altra Max machines crash in SetTime() if2323+ * SetVirtualAddressMap() has not been called prior.2424 */2525- if (!type1_family || strcmp(type1_family, "Altra"))2525+ if (!type1_family || (2626+ strcmp(type1_family, "eMAG") &&2727+ strcmp(type1_family, "Altra") &&2828+ strcmp(type1_family, "Altra Max")))2629 return false;27302831 efi_warn("Working around broken SetVirtualAddressMap()\n");
+1
drivers/gpu/drm/amd/amdgpu/amdgpu.h
···243243244244#define AMDGPU_VCNFW_LOG_SIZE (32 * 1024)245245extern int amdgpu_vcnfw_log;246246+extern int amdgpu_sg_display;246247247248#define AMDGPU_VM_MAX_NUM_CTX 4096248249#define AMDGPU_SG_THRESHOLD (256*1024*1024)
+4-1
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
···12201220 * next job actually sees the results from the previous one12211221 * before we start executing on the same scheduler ring.12221222 */12231223- if (!s_fence || s_fence->sched != sched)12231223+ if (!s_fence || s_fence->sched != sched) {12241224+ dma_fence_put(fence);12241225 continue;12261226+ }1225122712261228 r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence);12291229+ dma_fence_put(fence);12271230 if (r)12281231 return r;12291232 }
+11
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
···186186int amdgpu_smartshift_bias;187187int amdgpu_use_xgmi_p2p = 1;188188int amdgpu_vcnfw_log;189189+int amdgpu_sg_display = -1; /* auto */189190190191static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work);191192···931930 */932931MODULE_PARM_DESC(vcnfw_log, "Enable vcnfw log(0 = disable (default value), 1 = enable)");933932module_param_named(vcnfw_log, amdgpu_vcnfw_log, int, 0444);933933+934934+/**935935+ * DOC: sg_display (int)936936+ * Disable S/G (scatter/gather) display (i.e., display from system memory).937937+ * This option is only relevant on APUs. Set this option to 0 to disable938938+ * S/G display if you experience flickering or other issues under memory939939+ * pressure and report the issue.940940+ */941941+MODULE_PARM_DESC(sg_display, "S/G Display (-1 = auto (default), 0 = disable)");942942+module_param_named(sg_display, amdgpu_sg_display, int, 0444);934943935944/**936945 * DOC: smu_pptable_id (int)
+7-1
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
···618618 if (!ring || !ring->fence_drv.initialized)619619 continue;620620621621- if (!ring->no_scheduler)621621+ /*622622+ * Notice we check for sched.ops since there's some623623+ * override on the meaning of sched.ready by amdgpu.624624+ * The natural check would be sched.ready, which is625625+ * set as drm_sched_init() finishes...626626+ */627627+ if (ring->sched.ops)622628 drm_sched_fini(&ring->sched);623629624630 for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
···1184118411851185 memset(pa_config, 0, sizeof(*pa_config));1186118611871187- logical_addr_low = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;11881188- pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);11891189-11901190- if (adev->apu_flags & AMD_APU_IS_RAVEN2)11911191- /*11921192- * Raven2 has a HW issue that it is unable to use the vram which11931193- * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the11941194- * workaround that increase system aperture high address (add 1)11951195- * to get rid of the VM fault and hardware hang.11961196- */11971197- logical_addr_high = max((adev->gmc.fb_end >> 18) + 0x1, adev->gmc.agp_end >> 18);11981198- else11991199- logical_addr_high = max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18;12001200-12011187 agp_base = 0;12021188 agp_bot = adev->gmc.agp_start >> 24;12031189 agp_top = adev->gmc.agp_end >> 24;1204119011911191+ /* AGP aperture is disabled */11921192+ if (agp_bot == agp_top) {11931193+ logical_addr_low = adev->gmc.vram_start >> 18;11941194+ if (adev->apu_flags & AMD_APU_IS_RAVEN2)11951195+ /*11961196+ * Raven2 has a HW issue that it is unable to use the vram which11971197+ * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the11981198+ * workaround that increase system aperture high address (add 1)11991199+ * to get rid of the VM fault and hardware hang.12001200+ */12011201+ logical_addr_high = (adev->gmc.fb_end >> 18) + 0x1;12021202+ else12031203+ logical_addr_high = adev->gmc.vram_end >> 18;12041204+ } else {12051205+ logical_addr_low = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;12061206+ if (adev->apu_flags & AMD_APU_IS_RAVEN2)12071207+ /*12081208+ * Raven2 has a HW issue that it is unable to use the vram which12091209+ * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the12101210+ * workaround that increase system aperture high address (add 1)12111211+ * to get rid of the VM fault and hardware hang.12121212+ */12131213+ logical_addr_high = max((adev->gmc.fb_end >> 18) + 0x1, adev->gmc.agp_end >> 18);12141214+ else12151215+ logical_addr_high = max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18;12161216+ }12171217+12181218+ pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);1205121912061220 page_table_start.high_part = (u32)(adev->gmc.gart_start >> 44) & 0xF;12071221 page_table_start.low_part = (u32)(adev->gmc.gart_start >> 12);···15171503 case IP_VERSION(3, 0, 1):15181504 case IP_VERSION(3, 1, 2):15191505 case IP_VERSION(3, 1, 3):15061506+ case IP_VERSION(3, 1, 4):15071507+ case IP_VERSION(3, 1, 5):15201508 case IP_VERSION(3, 1, 6):15211509 init_data.flags.gpu_vm_support = true;15221510 break;···15271511 }15281512 break;15291513 }15141514+ if (init_data.flags.gpu_vm_support &&15151515+ (amdgpu_sg_display == 0))15161516+ init_data.flags.gpu_vm_support = false;1530151715311518 if (init_data.flags.gpu_vm_support)15321519 adev->mode_info.gpu_vm_support = true;
···39783978 }3979397939803980 hidpp_initialize_battery(hidpp);39813981- hidpp_initialize_hires_scroll(hidpp);39813981+ if (!hid_is_usb(hidpp->hid_dev))39823982+ hidpp_initialize_hires_scroll(hidpp);3982398339833984 /* forward current battery state */39843985 if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP10_BATTERY) {
···13181318 addr = arg + offsetof(struct hfi1_tid_info, tidcnt);13191319 if (copy_to_user((void __user *)addr, &tinfo.tidcnt,13201320 sizeof(tinfo.tidcnt)))13211321- return -EFAULT;13211321+ ret = -EFAULT;1322132213231323 addr = arg + offsetof(struct hfi1_tid_info, length);13241324- if (copy_to_user((void __user *)addr, &tinfo.length,13241324+ if (!ret && copy_to_user((void __user *)addr, &tinfo.length,13251325 sizeof(tinfo.length)))13261326 ret = -EFAULT;13271327+13281328+ if (ret)13291329+ hfi1_user_exp_rcv_invalid(fd, &tinfo);13271330 }1328133113291332 return ret;
+2-7
drivers/infiniband/hw/hfi1/user_exp_rcv.c
···160160static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)161161{162162 int pinned;163163- unsigned int npages;163163+ unsigned int npages = tidbuf->npages;164164 unsigned long vaddr = tidbuf->vaddr;165165 struct page **pages = NULL;166166 struct hfi1_devdata *dd = fd->uctxt->dd;167167-168168- /* Get the number of pages the user buffer spans */169169- npages = num_user_pages(vaddr, tidbuf->length);170170- if (!npages)171171- return -EINVAL;172167173168 if (npages > fd->uctxt->expected_count) {174169 dd_dev_err(dd, "Expected buffer too big\n");···191196 return pinned;192197 }193198 tidbuf->pages = pages;194194- tidbuf->npages = npages;195199 fd->tid_n_pinned += pinned;196200 return pinned;197201}···268274 mutex_init(&tidbuf->cover_mutex);269275 tidbuf->vaddr = tinfo->vaddr;270276 tidbuf->length = tinfo->length;277277+ tidbuf->npages = num_user_pages(tidbuf->vaddr, tidbuf->length);271278 tidbuf->psets = kcalloc(uctxt->expected_count, sizeof(*tidbuf->psets),272279 GFP_KERNEL);273280 if (!tidbuf->psets) {
+3
drivers/infiniband/hw/irdma/cm.c
···17221722 continue;1723172317241724 idev = in_dev_get(ip_dev);17251725+ if (!idev)17261726+ continue;17271727+17251728 in_dev_for_each_ifa_rtnl(ifa, idev) {17261729 ibdev_dbg(&iwdev->ibdev,17271730 "CM: Allocating child CM Listener forIP=%pI4, vlan_id=%d, MAC=%pM\n",
+1-1
drivers/infiniband/hw/mana/qp.c
···289289290290 /* IB ports start with 1, MANA Ethernet ports start with 0 */291291 port = ucmd.port;292292- if (ucmd.port > mc->num_ports)292292+ if (port < 1 || port > mc->num_ports)293293 return -EINVAL;294294295295 if (attr->cap.max_send_wr > MAX_SEND_BUFFERS_PER_QUEUE) {
+4-4
drivers/infiniband/hw/usnic/usnic_uiom.c
···276276 size = pa_end - pa_start + PAGE_SIZE;277277 usnic_dbg("va 0x%lx pa %pa size 0x%zx flags 0x%x",278278 va_start, &pa_start, size, flags);279279- err = iommu_map(pd->domain, va_start, pa_start,280280- size, flags);279279+ err = iommu_map_atomic(pd->domain, va_start,280280+ pa_start, size, flags);281281 if (err) {282282 usnic_err("Failed to map va 0x%lx pa %pa size 0x%zx with err %d\n",283283 va_start, &pa_start, size, err);···293293 size = pa - pa_start + PAGE_SIZE;294294 usnic_dbg("va 0x%lx pa %pa size 0x%zx flags 0x%x\n",295295 va_start, &pa_start, size, flags);296296- err = iommu_map(pd->domain, va_start, pa_start,297297- size, flags);296296+ err = iommu_map_atomic(pd->domain, va_start,297297+ pa_start, size, flags);298298 if (err) {299299 usnic_err("Failed to map va 0x%lx pa %pa size 0x%zx with err %d\n",300300 va_start, &pa_start, size, err);
···76767777 d = debugfs_rename(bonding_debug_root, bond->debug_dir,7878 bonding_debug_root, bond->dev->name);7979- if (d) {7979+ if (!IS_ERR(d)) {8080 bond->debug_dir = d;8181 } else {8282 netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n");
+19-7
drivers/net/dsa/mt7530.c
···13091309 if (!priv->ports[port].pvid)13101310 mt7530_rmw(priv, MT7530_PVC_P(port), ACC_FRM_MASK,13111311 MT7530_VLAN_ACC_TAGGED);13121312- }1313131213141314- /* Set the port as a user port which is to be able to recognize VID13151315- * from incoming packets before fetching entry within the VLAN table.13161316- */13171317- mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK | PVC_EG_TAG_MASK,13181318- VLAN_ATTR(MT7530_VLAN_USER) |13191319- PVC_EG_TAG(MT7530_VLAN_EG_DISABLED));13131313+ /* Set the port as a user port which is to be able to recognize13141314+ * VID from incoming packets before fetching entry within the13151315+ * VLAN table.13161316+ */13171317+ mt7530_rmw(priv, MT7530_PVC_P(port),13181318+ VLAN_ATTR_MASK | PVC_EG_TAG_MASK,13191319+ VLAN_ATTR(MT7530_VLAN_USER) |13201320+ PVC_EG_TAG(MT7530_VLAN_EG_DISABLED));13211321+ } else {13221322+ /* Also set CPU ports to the "user" VLAN port attribute, to13231323+ * allow VLAN classification, but keep the EG_TAG attribute as13241324+ * "consistent" (i.o.w. don't change its value) for packets13251325+ * received by the switch from the CPU, so that tagged packets13261326+ * are forwarded to user ports as tagged, and untagged as13271327+ * untagged.13281328+ */13291329+ mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK,13301330+ VLAN_ATTR(MT7530_VLAN_USER));13311331+ }13201332}1321133313221334static void
+16-15
drivers/net/ethernet/cadence/macb_main.c
···46274627 if (ret)46284628 return dev_err_probe(&pdev->dev, ret,46294629 "failed to init SGMII PHY\n");46304630- }4631463046324632- ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);46334633- if (!ret) {46344634- u32 pm_info[2];46314631+ ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);46324632+ if (!ret) {46334633+ u32 pm_info[2];4635463446364636- ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",46374637- pm_info, ARRAY_SIZE(pm_info));46384638- if (ret) {46394639- dev_err(&pdev->dev, "Failed to read power management information\n");46404640- goto err_out_phy_exit;46354635+ ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",46364636+ pm_info, ARRAY_SIZE(pm_info));46374637+ if (ret) {46384638+ dev_err(&pdev->dev, "Failed to read power management information\n");46394639+ goto err_out_phy_exit;46404640+ }46414641+ ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);46424642+ if (ret)46434643+ goto err_out_phy_exit;46444644+46454645+ ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);46464646+ if (ret)46474647+ goto err_out_phy_exit;46414648 }46424642- ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);46434643- if (ret)46444644- goto err_out_phy_exit;4645464946464646- ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);46474647- if (ret)46484648- goto err_out_phy_exit;46494650 }4650465146514652 /* Fully reset controller at hardware level if mapped in device tree */
···54205420 */54215421 status = ice_add_special_words(rinfo, lkup_exts, ice_is_dvm_ena(hw));54225422 if (status)54235423- goto err_free_lkup_exts;54235423+ goto err_unroll;5424542454255425 /* Group match words into recipes using preferred recipe grouping54265426 * criteria.
+1-1
drivers/net/ethernet/intel/ice/ice_tc_lib.c
···16811681 struct ice_vsi *ch_vsi = NULL;16821682 u16 queue = act->rx_queue;1683168316841684- if (queue > vsi->num_rxq) {16841684+ if (queue >= vsi->num_rxq) {16851685 NL_SET_ERR_MSG_MOD(fltr->extack,16861686 "Unable to add filter because specified queue is invalid");16871687 return -EINVAL;
+8-13
drivers/net/ethernet/intel/ice/ice_vf_mbx.c
···3939 return ice_sq_send_cmd(hw, &hw->mailboxq, &desc, msg, msglen, cd);4040}41414242-static const u32 ice_legacy_aq_to_vc_speed[15] = {4242+static const u32 ice_legacy_aq_to_vc_speed[] = {4343 VIRTCHNL_LINK_SPEED_100MB, /* BIT(0) */4444 VIRTCHNL_LINK_SPEED_100MB,4545 VIRTCHNL_LINK_SPEED_1GB,···5151 VIRTCHNL_LINK_SPEED_40GB,5252 VIRTCHNL_LINK_SPEED_40GB,5353 VIRTCHNL_LINK_SPEED_40GB,5454- VIRTCHNL_LINK_SPEED_UNKNOWN,5555- VIRTCHNL_LINK_SPEED_UNKNOWN,5656- VIRTCHNL_LINK_SPEED_UNKNOWN,5757- VIRTCHNL_LINK_SPEED_UNKNOWN /* BIT(14) */5854};59556056/**···6771 */6872u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed)6973{7070- u32 speed;7474+ /* convert a BIT() value into an array index */7575+ u32 index = fls(link_speed) - 1;71767272- if (adv_link_support) {7373- /* convert a BIT() value into an array index */7474- speed = ice_get_link_speed(fls(link_speed) - 1);7575- } else {7777+ if (adv_link_support)7878+ return ice_get_link_speed(index);7979+ else if (index < ARRAY_SIZE(ice_legacy_aq_to_vc_speed))7680 /* Virtchnl speeds are not defined for every speed supported in7781 * the hardware. To maintain compatibility with older AVF7882 * drivers, while reporting the speed the new speed values are7983 * resolved to the closest known virtchnl speeds8084 */8181- speed = ice_legacy_aq_to_vc_speed[fls(link_speed) - 1];8282- }8585+ return ice_legacy_aq_to_vc_speed[index];83868484- return speed;8787+ return VIRTCHNL_LINK_SPEED_UNKNOWN;8588}86898790/* The mailbox overflow detection algorithm helps to check if there
···44444545 /* outer VLAN ops regardless of port VLAN config */4646 vlan_ops->add_vlan = ice_vsi_add_vlan;4747- vlan_ops->dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering;4847 vlan_ops->ena_tx_filtering = ice_vsi_ena_tx_vlan_filtering;4948 vlan_ops->dis_tx_filtering = ice_vsi_dis_tx_vlan_filtering;50495150 if (ice_vf_is_port_vlan_ena(vf)) {5251 /* setup outer VLAN ops */5352 vlan_ops->set_port_vlan = ice_vsi_set_outer_port_vlan;5353+ /* all Rx traffic should be in the domain of the5454+ * assigned port VLAN, so prevent disabling Rx VLAN5555+ * filtering5656+ */5757+ vlan_ops->dis_rx_filtering = noop_vlan;5458 vlan_ops->ena_rx_filtering =5559 ice_vsi_ena_rx_vlan_filtering;5660···6763 vlan_ops->ena_insertion = ice_vsi_ena_inner_insertion;6864 vlan_ops->dis_insertion = ice_vsi_dis_inner_insertion;6965 } else {6666+ vlan_ops->dis_rx_filtering =6767+ ice_vsi_dis_rx_vlan_filtering;6868+7069 if (!test_bit(ICE_FLAG_VF_VLAN_PRUNING, pf->flags))7170 vlan_ops->ena_rx_filtering = noop_vlan;7271 else···10396 vlan_ops->set_port_vlan = ice_vsi_set_inner_port_vlan;10497 vlan_ops->ena_rx_filtering =10598 ice_vsi_ena_rx_vlan_filtering;9999+ /* all Rx traffic should be in the domain of the100100+ * assigned port VLAN, so prevent disabling Rx VLAN101101+ * filtering102102+ */103103+ vlan_ops->dis_rx_filtering = noop_vlan;106104 } else {105105+ vlan_ops->dis_rx_filtering =106106+ ice_vsi_dis_rx_vlan_filtering;107107 if (!test_bit(ICE_FLAG_VF_VLAN_PRUNING, pf->flags))108108 vlan_ops->ena_rx_filtering = noop_vlan;109109 else
+23-2
drivers/net/ethernet/intel/igc/igc_main.c
···29422942 if (tx_buffer->next_to_watch &&29432943 time_after(jiffies, tx_buffer->time_stamp +29442944 (adapter->tx_timeout_factor * HZ)) &&29452945- !(rd32(IGC_STATUS) & IGC_STATUS_TXOFF)) {29452945+ !(rd32(IGC_STATUS) & IGC_STATUS_TXOFF) &&29462946+ (rd32(IGC_TDH(tx_ring->reg_idx)) !=29472947+ readl(tx_ring->tail))) {29462948 /* detected Tx unit hang */29472949 netdev_err(tx_ring->netdev,29482950 "Detected Tx Unit Hang\n"···50715069}5072507050735071/**50725072+ * igc_tx_timeout - Respond to a Tx Hang50735073+ * @netdev: network interface device structure50745074+ * @txqueue: queue number that timed out50755075+ **/50765076+static void igc_tx_timeout(struct net_device *netdev,50775077+ unsigned int __always_unused txqueue)50785078+{50795079+ struct igc_adapter *adapter = netdev_priv(netdev);50805080+ struct igc_hw *hw = &adapter->hw;50815081+50825082+ /* Do the reset outside of interrupt context */50835083+ adapter->tx_timeout_count++;50845084+ schedule_work(&adapter->reset_task);50855085+ wr32(IGC_EICS,50865086+ (adapter->eims_enable_mask & ~adapter->eims_other));50875087+}50885088+50895089+/**50745090 * igc_get_stats64 - Get System Network Statistics50755091 * @netdev: network interface device structure50765092 * @stats: rtnl_link_stats64 pointer···55155495 case SPEED_100:55165496 case SPEED_1000:55175497 case SPEED_2500:55185518- adapter->tx_timeout_factor = 7;54985498+ adapter->tx_timeout_factor = 1;55195499 break;55205500 }55215501···63406320 .ndo_set_rx_mode = igc_set_rx_mode,63416321 .ndo_set_mac_address = igc_set_mac,63426322 .ndo_change_mtu = igc_change_mtu,63236323+ .ndo_tx_timeout = igc_tx_timeout,63436324 .ndo_get_stats64 = igc_get_stats64,63446325 .ndo_fix_features = igc_fix_features,63456326 .ndo_set_features = igc_set_features,
+19-17
drivers/net/ethernet/mediatek/mtk_eth_soc.c
···15701570 if (IS_ERR(pp))15711571 return pp;1572157215731573- err = __xdp_rxq_info_reg(xdp_q, ð->dummy_dev, eth->rx_napi.napi_id,15741574- id, PAGE_SIZE);15731573+ err = __xdp_rxq_info_reg(xdp_q, ð->dummy_dev, id,15741574+ eth->rx_napi.napi_id, PAGE_SIZE);15751575 if (err < 0)15761576 goto err_free_pp;15771577···1870187018711871 while (done < budget) {18721872 unsigned int pktlen, *rxdcsum;18731873+ bool has_hwaccel_tag = false;18731874 struct net_device *netdev;18751875+ u16 vlan_proto, vlan_tci;18741876 dma_addr_t dma_addr;18751877 u32 hash, reason;18761878 int mac = 0;···2012201020132011 if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {20142012 if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {20152015- if (trxd.rxd3 & RX_DMA_VTAG_V2)20162016- __vlan_hwaccel_put_tag(skb,20172017- htons(RX_DMA_VPID(trxd.rxd4)),20182018- RX_DMA_VID(trxd.rxd4));20132013+ if (trxd.rxd3 & RX_DMA_VTAG_V2) {20142014+ vlan_proto = RX_DMA_VPID(trxd.rxd4);20152015+ vlan_tci = RX_DMA_VID(trxd.rxd4);20162016+ has_hwaccel_tag = true;20172017+ }20192018 } else if (trxd.rxd2 & RX_DMA_VTAG) {20202020- __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)),20212021- RX_DMA_VID(trxd.rxd3));20192019+ vlan_proto = RX_DMA_VPID(trxd.rxd3);20202020+ vlan_tci = RX_DMA_VID(trxd.rxd3);20212021+ has_hwaccel_tag = true;20222022 }20232023 }2024202420252025 /* When using VLAN untagging in combination with DSA, the20262026 * hardware treats the MTK special tag as a VLAN and untags it.20272027 */20282028- if (skb_vlan_tag_present(skb) && netdev_uses_dsa(netdev)) {20292029- unsigned int port = ntohs(skb->vlan_proto) & GENMASK(2, 0);20282028+ if (has_hwaccel_tag && netdev_uses_dsa(netdev)) {20292029+ unsigned int port = vlan_proto & GENMASK(2, 0);2030203020312031 if (port < ARRAY_SIZE(eth->dsa_meta) &&20322032 eth->dsa_meta[port])20332033 skb_dst_set_noref(skb, ð->dsa_meta[port]->dst);20342034-20352035- __vlan_hwaccel_clear_tag(skb);20342034+ } else if (has_hwaccel_tag) {20352035+ __vlan_hwaccel_put_tag(skb, htons(vlan_proto), vlan_tci);20362036 }2037203720382038 skb_record_rx_queue(skb, 0);···3115311131163112 val |= config;3117311331183118- if (!i && eth->netdev[0] && netdev_uses_dsa(eth->netdev[0]))31143114+ if (eth->netdev[i] && netdev_uses_dsa(eth->netdev[i]))31193115 val |= MTK_GDMA_SPECIAL_TAG;3120311631213117 mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));···31813177 struct mtk_eth *eth = mac->hw;31823178 int i, err;3183317931843184- if ((mtk_uses_dsa(dev) && !eth->prog) &&31853185- !(mac->id == 1 && MTK_HAS_CAPS(eth->soc->caps, MTK_GMAC1_TRGMII))) {31803180+ if (mtk_uses_dsa(dev) && !eth->prog) {31863181 for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {31873182 struct metadata_dst *md_dst = eth->dsa_meta[i];31883183···31983195 }31993196 } else {32003197 /* Hardware special tag parsing needs to be disabled if at least32013201- * one MAC does not use DSA, or the second MAC of the MT7621 and32023202- * MT7623 SoCs is being used.31983198+ * one MAC does not use DSA.32033199 */32043200 u32 val = mtk_r32(eth, MTK_CDMP_IG_CTRL);32053201 val &= ~MTK_CDMP_STAG_EN;
···438438439439 switch (event) {440440 case SWITCHDEV_FDB_ADD_TO_BRIDGE:441441- /* only handle the event on native eswtich of representor */442442- if (!mlx5_esw_bridge_is_local(dev, rep, esw))443443- break;444444-445441 fdb_info = container_of(info,446442 struct switchdev_notifier_fdb_info,447443 info);
+1-1
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
···443443444444void mlx5e_disable_cvlan_filter(struct mlx5e_flow_steering *fs, bool promisc)445445{446446- if (fs->vlan->cvlan_filter_disabled)446446+ if (!fs->vlan || fs->vlan->cvlan_filter_disabled)447447 return;448448449449 fs->vlan->cvlan_filter_disabled = true;
+19-71
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
···591591 rq->ix = c->ix;592592 rq->channel = c;593593 rq->mdev = mdev;594594- rq->hw_mtu = MLX5E_SW2HW_MTU(params, params->sw_mtu);594594+ rq->hw_mtu =595595+ MLX5E_SW2HW_MTU(params, params->sw_mtu) - ETH_FCS_LEN * !params->scatter_fcs_en;595596 rq->xdpsq = &c->rq_xdpsq;596597 rq->stats = &c->priv->channel_stats[c->ix]->rq;597598 rq->ptp_cyc2time = mlx5_rq_ts_translator(mdev);···10131012 mlx5e_free_rx_descs(rq);1014101310151014 return mlx5e_rq_to_ready(rq, curr_state);10161016-}10171017-10181018-static int mlx5e_modify_rq_scatter_fcs(struct mlx5e_rq *rq, bool enable)10191019-{10201020- struct mlx5_core_dev *mdev = rq->mdev;10211021-10221022- void *in;10231023- void *rqc;10241024- int inlen;10251025- int err;10261026-10271027- inlen = MLX5_ST_SZ_BYTES(modify_rq_in);10281028- in = kvzalloc(inlen, GFP_KERNEL);10291029- if (!in)10301030- return -ENOMEM;10311031-10321032- rqc = MLX5_ADDR_OF(modify_rq_in, in, ctx);10331033-10341034- MLX5_SET(modify_rq_in, in, rq_state, MLX5_RQC_STATE_RDY);10351035- MLX5_SET64(modify_rq_in, in, modify_bitmask,10361036- MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_SCATTER_FCS);10371037- MLX5_SET(rqc, rqc, scatter_fcs, enable);10381038- MLX5_SET(rqc, rqc, state, MLX5_RQC_STATE_RDY);10391039-10401040- err = mlx5_core_modify_rq(mdev, rq->rqn, in);10411041-10421042- kvfree(in);10431043-10441044- return err;10451015}1046101610471017static int mlx5e_modify_rq_vsd(struct mlx5e_rq *rq, bool vsd)···32863314 mlx5e_destroy_tises(priv);32873315}3288331632893289-static int mlx5e_modify_channels_scatter_fcs(struct mlx5e_channels *chs, bool enable)32903290-{32913291- int err = 0;32923292- int i;32933293-32943294- for (i = 0; i < chs->num; i++) {32953295- err = mlx5e_modify_rq_scatter_fcs(&chs->c[i]->rq, enable);32963296- if (err)32973297- return err;32983298- }32993299-33003300- return 0;33013301-}33023302-33033317static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd)33043318{33053319 int err;···38613903 return mlx5_set_ports_check(mdev, in, sizeof(in));38623904}3863390539063906+static int mlx5e_set_rx_port_ts_wrap(struct mlx5e_priv *priv, void *ctx)39073907+{39083908+ struct mlx5_core_dev *mdev = priv->mdev;39093909+ bool enable = *(bool *)ctx;39103910+39113911+ return mlx5e_set_rx_port_ts(mdev, enable);39123912+}39133913+38643914static int set_feature_rx_fcs(struct net_device *netdev, bool enable)38653915{38663916 struct mlx5e_priv *priv = netdev_priv(netdev);38673917 struct mlx5e_channels *chs = &priv->channels;38683868- struct mlx5_core_dev *mdev = priv->mdev;39183918+ struct mlx5e_params new_params;38693919 int err;3870392038713921 mutex_lock(&priv->state_lock);3872392238733873- if (enable) {38743874- err = mlx5e_set_rx_port_ts(mdev, false);38753875- if (err)38763876- goto out;38773877-38783878- chs->params.scatter_fcs_en = true;38793879- err = mlx5e_modify_channels_scatter_fcs(chs, true);38803880- if (err) {38813881- chs->params.scatter_fcs_en = false;38823882- mlx5e_set_rx_port_ts(mdev, true);38833883- }38843884- } else {38853885- chs->params.scatter_fcs_en = false;38863886- err = mlx5e_modify_channels_scatter_fcs(chs, false);38873887- if (err) {38883888- chs->params.scatter_fcs_en = true;38893889- goto out;38903890- }38913891- err = mlx5e_set_rx_port_ts(mdev, true);38923892- if (err) {38933893- mlx5_core_warn(mdev, "Failed to set RX port timestamp %d\n", err);38943894- err = 0;38953895- }38963896- }38973897-38983898-out:39233923+ new_params = chs->params;39243924+ new_params.scatter_fcs_en = enable;39253925+ err = mlx5e_safe_switch_params(priv, &new_params, mlx5e_set_rx_port_ts_wrap,39263926+ &new_params.scatter_fcs_en, true);38993927 mutex_unlock(&priv->state_lock);39003928 return err;39013929}···40174073 features &= ~NETIF_F_GRO_HW;40184074 if (netdev->features & NETIF_F_GRO_HW)40194075 netdev_warn(netdev, "Disabling HW_GRO, not supported in switchdev mode\n");40764076+40774077+ features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;40784078+ if (netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER)40794079+ netdev_warn(netdev, "Disabling HW_VLAN CTAG FILTERING, not supported in switchdev mode\n");4020408040214081 return features;40224082}
···633633 /* Enable master counters */634634 spx5_wr(PTP_PTP_DOM_CFG_PTP_ENA_SET(0x7), sparx5, PTP_PTP_DOM_CFG);635635636636- for (i = 0; i < sparx5->port_count; i++) {636636+ for (i = 0; i < SPX5_PORTS; i++) {637637 port = sparx5->ports[i];638638 if (!port)639639 continue;···649649 struct sparx5_port *port;650650 int i;651651652652- for (i = 0; i < sparx5->port_count; i++) {652652+ for (i = 0; i < SPX5_PORTS; i++) {653653 port = sparx5->ports[i];654654 if (!port)655655 continue;
+11-26
drivers/net/ethernet/microsoft/mana/gdma_main.c
···12171217 unsigned int max_queues_per_port = num_online_cpus();12181218 struct gdma_context *gc = pci_get_drvdata(pdev);12191219 struct gdma_irq_context *gic;12201220- unsigned int max_irqs;12211221- u16 *cpus;12221222- cpumask_var_t req_mask;12201220+ unsigned int max_irqs, cpu;12231221 int nvec, irq;12241222 int err, i = 0, j;12251223···12381240 goto free_irq_vector;12391241 }1240124212411241- if (!zalloc_cpumask_var(&req_mask, GFP_KERNEL)) {12421242- err = -ENOMEM;12431243- goto free_irq;12441244- }12451245-12461246- cpus = kcalloc(nvec, sizeof(*cpus), GFP_KERNEL);12471247- if (!cpus) {12481248- err = -ENOMEM;12491249- goto free_mask;12501250- }12511251- for (i = 0; i < nvec; i++)12521252- cpus[i] = cpumask_local_spread(i, gc->numa_node);12531253-12541243 for (i = 0; i < nvec; i++) {12551255- cpumask_set_cpu(cpus[i], req_mask);12561244 gic = &gc->irq_contexts[i];12571245 gic->handler = NULL;12581246 gic->arg = NULL;···12531269 irq = pci_irq_vector(pdev, i);12541270 if (irq < 0) {12551271 err = irq;12561256- goto free_mask;12721272+ goto free_irq;12571273 }1258127412591275 err = request_irq(irq, mana_gd_intr, 0, gic->name, gic);12601276 if (err)12611261- goto free_mask;12621262- irq_set_affinity_and_hint(irq, req_mask);12631263- cpumask_clear(req_mask);12771277+ goto free_irq;12781278+12791279+ cpu = cpumask_local_spread(i, gc->numa_node);12801280+ irq_set_affinity_and_hint(irq, cpumask_of(cpu));12641281 }12651265- free_cpumask_var(req_mask);12661266- kfree(cpus);1267128212681283 err = mana_gd_alloc_res_map(nvec, &gc->msix_resource);12691284 if (err)···1273129012741291 return 0;1275129212761276-free_mask:12771277- free_cpumask_var(req_mask);12781278- kfree(cpus);12791293free_irq:12801294 for (j = i - 1; j >= 0; j--) {12811295 irq = pci_irq_vector(pdev, j);12821296 gic = &gc->irq_contexts[j];12971297+12981298+ irq_update_affinity_hint(irq, NULL);12831299 free_irq(irq, gic);12841300 }12851301···13061324 continue;1307132513081326 gic = &gc->irq_contexts[i];13271327+13281328+ /* Need to clear the hint before free_irq */13291329+ irq_update_affinity_hint(irq, NULL);13091330 free_irq(irq, gic);13101331 }13111332
···3838 NFP_PORT_CHANGED = 0,3939};40404141+enum {4242+ NFP_SPEED_1G,4343+ NFP_SPEED_10G,4444+ NFP_SPEED_25G,4545+ NFP_SPEED_40G,4646+ NFP_SPEED_50G,4747+ NFP_SPEED_100G,4848+ NFP_SUP_SPEED_NUMBER4949+};5050+4151/**4252 * struct nfp_port - structure representing NFP port4353 * @netdev: backpointer to associated netdev···6252 * @eth_forced: for %NFP_PORT_PHYS_PORT port is forced UP or DOWN, don't change6353 * @eth_port: for %NFP_PORT_PHYS_PORT translated ETH Table port entry6454 * @eth_stats: for %NFP_PORT_PHYS_PORT MAC stats if available5555+ * @speed_bitmap: for %NFP_PORT_PHYS_PORT supported speed bitmap6556 * @pf_id: for %NFP_PORT_PF_PORT, %NFP_PORT_VF_PORT ID of the PCI PF (0-3)6657 * @vf_id: for %NFP_PORT_VF_PORT ID of the PCI VF within @pf_id6758 * @pf_split: for %NFP_PORT_PF_PORT %true if PCI PF has more than one vNIC···8978 bool eth_forced;9079 struct nfp_eth_table_port *eth_port;9180 u8 __iomem *eth_stats;8181+ DECLARE_BITMAP(speed_bitmap, NFP_SUP_SPEED_NUMBER);9282 };9383 /* NFP_PORT_PF_PORT, NFP_PORT_VF_PORT */9484 struct {
+8-1
drivers/net/ethernet/pensando/ionic/ionic_dev.c
···708708 q->lif->index, q->name, q->hw_type, q->hw_index,709709 q->head_idx, ring_doorbell);710710711711- if (ring_doorbell)711711+ if (ring_doorbell) {712712 ionic_dbell_ring(lif->kern_dbpage, q->hw_type,713713 q->dbval | q->head_idx);714714+715715+ q->dbell_jiffies = jiffies;716716+717717+ if (q_to_qcq(q)->napi_qcq)718718+ mod_timer(&q_to_qcq(q)->napi_qcq->napi_deadline,719719+ jiffies + IONIC_NAPI_DEADLINE);720720+ }714721}715722716723static bool ionic_q_is_posted(struct ionic_queue *q, unsigned int pos)
···1812181218131813 ret = phy_attach_direct(pl->netdev, phy_dev, flags,18141814 pl->link_interface);18151815- if (ret) {18161816- phy_device_free(phy_dev);18151815+ phy_device_free(phy_dev);18161816+ if (ret)18171817 return ret;18181818- }1819181818201819 ret = phylink_bringup_phy(pl, phy_dev, pl->link_config.interface);18211820 if (ret)
+19
drivers/nvdimm/Kconfig
···102102 depends on ENCRYPTED_KEYS103103 depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m104104105105+config NVDIMM_KMSAN106106+ bool107107+ depends on KMSAN108108+ help109109+ KMSAN, and other memory debug facilities, increase the size of110110+ 'struct page' to contain extra metadata. This collides with111111+ the NVDIMM capability to store a potentially112112+ larger-than-"System RAM" size 'struct page' array in a113113+ reservation of persistent memory rather than limited /114114+ precious DRAM. However, that reservation needs to persist for115115+ the life of the given NVDIMM namespace. If you are using KMSAN116116+ to debug an issue unrelated to NVDIMMs or DAX then say N to this117117+ option. Otherwise, say Y but understand that any namespaces118118+ (with the page array stored pmem) created with this build of119119+ the kernel will permanently reserve and strand excess120120+ capacity compared to the CONFIG_KMSAN=n case.121121+122122+ Select N if unsure.123123+105124config NVDIMM_TEST_BUILD106125 tristate "Build the unit test core"107126 depends on m
+1-1
drivers/nvdimm/nd.h
···652652 struct nd_namespace_common *ndns);653653#if IS_ENABLED(CONFIG_ND_CLAIM)654654/* max struct page size independent of kernel config */655655-#define MAX_STRUCT_PAGE_SIZE 128655655+#define MAX_STRUCT_PAGE_SIZE 64656656int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap);657657#else658658static inline int nvdimm_setup_pfn(struct nd_pfn *nd_pfn,
+27-15
drivers/nvdimm/pfn_devs.c
···1313#include "pfn.h"1414#include "nd.h"15151616+static const bool page_struct_override = IS_ENABLED(CONFIG_NVDIMM_KMSAN);1717+1618static void nd_pfn_release(struct device *dev)1719{1820 struct nd_region *nd_region = to_nd_region(dev->parent);···760758 return -ENXIO;761759 }762760763763- /*764764- * Note, we use 64 here for the standard size of struct page,765765- * debugging options may cause it to be larger in which case the766766- * implementation will limit the pfns advertised through767767- * ->direct_access() to those that are included in the memmap.768768- */769761 start = nsio->res.start;770762 size = resource_size(&nsio->res);771763 npfns = PHYS_PFN(size - SZ_8K);···778782 }779783 end_trunc = start + size - ALIGN_DOWN(start + size, align);780784 if (nd_pfn->mode == PFN_MODE_PMEM) {785785+ unsigned long page_map_size = MAX_STRUCT_PAGE_SIZE * npfns;786786+781787 /*782788 * The altmap should be padded out to the block size used783789 * when populating the vmemmap. This *should* be equal to784790 * PMD_SIZE for most architectures.785791 *786786- * Also make sure size of struct page is less than 128. We787787- * want to make sure we use large enough size here so that788788- * we don't have a dynamic reserve space depending on789789- * struct page size. But we also want to make sure we notice790790- * when we end up adding new elements to struct page.792792+ * Also make sure size of struct page is less than793793+ * MAX_STRUCT_PAGE_SIZE. The goal here is compatibility in the794794+ * face of production kernel configurations that reduce the795795+ * 'struct page' size below MAX_STRUCT_PAGE_SIZE. For debug796796+ * kernel configurations that increase the 'struct page' size797797+ * above MAX_STRUCT_PAGE_SIZE, the page_struct_override allows798798+ * for continuing with the capacity that will be wasted when799799+ * reverting to a production kernel configuration. Otherwise,800800+ * those configurations are blocked by default.791801 */792792- BUILD_BUG_ON(sizeof(struct page) > MAX_STRUCT_PAGE_SIZE);793793- offset = ALIGN(start + SZ_8K + MAX_STRUCT_PAGE_SIZE * npfns, align)794794- - start;802802+ if (sizeof(struct page) > MAX_STRUCT_PAGE_SIZE) {803803+ if (page_struct_override)804804+ page_map_size = sizeof(struct page) * npfns;805805+ else {806806+ dev_err(&nd_pfn->dev,807807+ "Memory debug options prevent using pmem for the page map\n");808808+ return -EINVAL;809809+ }810810+ }811811+ offset = ALIGN(start + SZ_8K + page_map_size, align) - start;795812 } else if (nd_pfn->mode == PFN_MODE_RAM)796813 offset = ALIGN(start + SZ_8K, align) - start;797814 else···827818 pfn_sb->version_minor = cpu_to_le16(4);828819 pfn_sb->end_trunc = cpu_to_le32(end_trunc);829820 pfn_sb->align = cpu_to_le32(nd_pfn->align);830830- pfn_sb->page_struct_size = cpu_to_le16(MAX_STRUCT_PAGE_SIZE);821821+ if (sizeof(struct page) > MAX_STRUCT_PAGE_SIZE && page_struct_override)822822+ pfn_sb->page_struct_size = cpu_to_le16(sizeof(struct page));823823+ else824824+ pfn_sb->page_struct_size = cpu_to_le16(MAX_STRUCT_PAGE_SIZE);831825 pfn_sb->page_size = cpu_to_le32(PAGE_SIZE);832826 checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb);833827 pfn_sb->checksum = cpu_to_le64(checksum);
···965965 }966966967967 of_dma_range_parser_init(&parser, node);968968- for_each_of_range(&parser, &range)968968+ for_each_of_range(&parser, &range) {969969+ if (range.cpu_addr == OF_BAD_ADDR) {970970+ pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n",971971+ range.bus_addr, node);972972+ continue;973973+ }969974 num_ranges++;975975+ }976976+977977+ if (!num_ranges) {978978+ ret = -EINVAL;979979+ goto out;980980+ }970981971982 r = kcalloc(num_ranges + 1, sizeof(*r), GFP_KERNEL);972983 if (!r) {···986975 }987976988977 /*989989- * Record all info in the generic DMA ranges array for struct device.978978+ * Record all info in the generic DMA ranges array for struct device,979979+ * returning an error if we don't find any parsable ranges.990980 */991981 *map = r;992982 of_dma_range_parser_init(&parser, node);993983 for_each_of_range(&parser, &range) {994984 pr_debug("dma_addr(%llx) cpu_addr(%llx) size(%llx)\n",995985 range.bus_addr, range.cpu_addr, range.size);996996- if (range.cpu_addr == OF_BAD_ADDR) {997997- pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n",998998- range.bus_addr, node);986986+ if (range.cpu_addr == OF_BAD_ADDR)999987 continue;10001000- }1001988 r->cpu_start = range.cpu_addr;1002989 r->dma_start = range.bus_addr;1003990 r->size = range.size;
+10-2
drivers/of/platform.c
···525525 if (IS_ENABLED(CONFIG_PPC)) {526526 struct device_node *boot_display = NULL;527527 struct platform_device *dev;528528+ int display_number = 0;528529 int ret;529530530531 /* Check if we have a MacOS display without a node spec */···556555 if (!of_get_property(node, "linux,opened", NULL) ||557556 !of_get_property(node, "linux,boot-display", NULL))558557 continue;559559- dev = of_platform_device_create(node, "of-display", NULL);558558+ dev = of_platform_device_create(node, "of-display.0", NULL);559559+ of_node_put(node);560560 if (WARN_ON(!dev))561561 return -ENOMEM;562562 boot_display = node;563563+ display_number++;563564 break;564565 }565566 for_each_node_by_type(node, "display") {567567+ char buf[14];568568+ const char *of_display_format = "of-display.%d";569569+566570 if (!of_get_property(node, "linux,opened", NULL) || node == boot_display)567571 continue;568568- of_platform_device_create(node, "of-display", NULL);572572+ ret = snprintf(buf, sizeof(buf), of_display_format, display_number++);573573+ if (ret < sizeof(buf))574574+ of_platform_device_create(node, buf, NULL);569575 }570576571577 } else {
-7
drivers/pci/pci.c
···16651665 return i;1666166616671667 pci_save_ltr_state(dev);16681668- pci_save_aspm_l1ss_state(dev);16691668 pci_save_dpc_state(dev);16701669 pci_save_aer_state(dev);16711670 pci_save_ptm_state(dev);···17711772 * LTR itself (in the PCIe capability).17721773 */17731774 pci_restore_ltr_state(dev);17741774- pci_restore_aspm_l1ss_state(dev);1775177517761776 pci_restore_pcie_state(dev);17771777 pci_restore_pasid_state(dev);···34623464 2 * sizeof(u16));34633465 if (error)34643466 pci_err(dev, "unable to allocate suspend buffer for LTR\n");34653465-34663466- error = pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_L1SS,34673467- 2 * sizeof(u32));34683468- if (error)34693469- pci_err(dev, "unable to allocate suspend buffer for ASPM-L1SS\n");3470346734713468 pci_allocate_vc_save_buffers(dev);34723469}
···9393static int aspeed_sig_expr_disable(struct aspeed_pinmux_data *ctx,9494 const struct aspeed_sig_expr *expr)9595{9696+ int ret;9797+9698 pr_debug("Disabling signal %s for %s\n", expr->signal,9799 expr->function);981009999- return aspeed_sig_expr_set(ctx, expr, false);101101+ ret = aspeed_sig_expr_eval(ctx, expr, true);102102+ if (ret < 0)103103+ return ret;104104+105105+ if (ret)106106+ return aspeed_sig_expr_set(ctx, expr, false);107107+108108+ return 0;100109}101110102111/**···123114 int ret = 0;124115125116 if (!exprs)126126- return true;117117+ return -EINVAL;127118128119 while (*exprs && !ret) {129120 ret = aspeed_sig_expr_disable(ctx, *exprs);
+13-3
drivers/pinctrl/intel/pinctrl-intel.c
···17091709EXPORT_SYMBOL_GPL(intel_pinctrl_get_soc_data);1710171017111711#ifdef CONFIG_PM_SLEEP17121712+static bool __intel_gpio_is_direct_irq(u32 value)17131713+{17141714+ return (value & PADCFG0_GPIROUTIOXAPIC) && (value & PADCFG0_GPIOTXDIS) &&17151715+ (__intel_gpio_get_gpio_mode(value) == PADCFG0_PMODE_GPIO);17161716+}17171717+17121718static bool intel_pinctrl_should_save(struct intel_pinctrl *pctrl, unsigned int pin)17131719{17141720 const struct pin_desc *pd = pin_desc_get(pctrl->pctldev, pin);···17481742 * See https://bugzilla.kernel.org/show_bug.cgi?id=214749.17491743 */17501744 value = readl(intel_get_padcfg(pctrl, pin, PADCFG0));17511751- if ((value & PADCFG0_GPIROUTIOXAPIC) && (value & PADCFG0_GPIOTXDIS) &&17521752- (__intel_gpio_get_gpio_mode(value) == PADCFG0_PMODE_GPIO))17451745+ if (__intel_gpio_is_direct_irq(value))17531746 return true;1754174717551748 return false;···18781873 for (i = 0; i < pctrl->soc->npins; i++) {18791874 const struct pinctrl_pin_desc *desc = &pctrl->soc->pins[i];1880187518811881- if (!intel_pinctrl_should_save(pctrl, desc->number))18761876+ if (!(intel_pinctrl_should_save(pctrl, desc->number) ||18771877+ /*18781878+ * If the firmware mangled the register contents too much,18791879+ * check the saved value for the Direct IRQ mode.18801880+ */18811881+ __intel_gpio_is_direct_irq(pads[i].padcfg0)))18821882 continue;1883188318841884 intel_restore_padcfg(pctrl, desc->number, PADCFG0, pads[i].padcfg0);
···372372 if (!pcs->fmask)373373 return 0;374374 function = pinmux_generic_get_function(pctldev, fselector);375375+ if (!function)376376+ return -EINVAL;375377 func = function->data;376378 if (!func)377379 return -EINVAL;
···366366 * will be adjusted at the final stage of the IRQ-based SPI transfer367367 * execution so not to lose the leftover of the incoming data.368368 */369369- level = min_t(u16, dws->fifo_len / 2, dws->tx_len);369369+ level = min_t(unsigned int, dws->fifo_len / 2, dws->tx_len);370370 dw_writel(dws, DW_SPI_TXFTLR, level);371371 dw_writel(dws, DW_SPI_RXFTLR, level - 1);372372
+16-6
drivers/spi/spidev.c
···9090/*-------------------------------------------------------------------------*/91919292static ssize_t9393+spidev_sync_unlocked(struct spi_device *spi, struct spi_message *message)9494+{9595+ ssize_t status;9696+9797+ status = spi_sync(spi, message);9898+ if (status == 0)9999+ status = message->actual_length;100100+101101+ return status;102102+}103103+104104+static ssize_t93105spidev_sync(struct spidev_data *spidev, struct spi_message *message)94106{9595- int status;107107+ ssize_t status;96108 struct spi_device *spi;9710998110 mutex_lock(&spidev->spi_lock);···113101 if (spi == NULL)114102 status = -ESHUTDOWN;115103 else116116- status = spi_sync(spi, message);117117-118118- if (status == 0)119119- status = message->actual_length;104104+ status = spidev_sync_unlocked(spi, message);120105121106 mutex_unlock(&spidev->spi_lock);107107+122108 return status;123109}124110···304294 spi_message_add_tail(k_tmp, &msg);305295 }306296307307- status = spidev_sync(spidev, &msg);297297+ status = spidev_sync_unlocked(spidev->spi, &msg);308298 if (status < 0)309299 goto done;310300
···798798 net->max_mtu = GETHER_MAX_MTU_SIZE;799799800800 dev->gadget = g;801801+ SET_NETDEV_DEV(net, &g->dev);801802 SET_NETDEV_DEVTYPE(net, &gadget_type);802803803804 status = register_netdev(net);···873872 struct usb_gadget *g;874873 int status;875874875875+ if (!net->dev.parent)876876+ return -EINVAL;876877 dev = netdev_priv(net);877878 g = dev->gadget;878879···905902906903 dev = netdev_priv(net);907904 dev->gadget = g;905905+ SET_NETDEV_DEV(net, &g->dev);908906}909907EXPORT_SYMBOL_GPL(gether_set_gadget);910908
+4-4
drivers/usb/typec/altmodes/displayport.c
···547547 /* FIXME: Port can only be DFP_U. */548548549549 /* Make sure we have compatiple pin configurations */550550- if (!(DP_CAP_DFP_D_PIN_ASSIGN(port->vdo) &551551- DP_CAP_UFP_D_PIN_ASSIGN(alt->vdo)) &&552552- !(DP_CAP_UFP_D_PIN_ASSIGN(port->vdo) &553553- DP_CAP_DFP_D_PIN_ASSIGN(alt->vdo)))550550+ if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &551551+ DP_CAP_PIN_ASSIGN_UFP_D(alt->vdo)) &&552552+ !(DP_CAP_PIN_ASSIGN_UFP_D(port->vdo) &553553+ DP_CAP_PIN_ASSIGN_DFP_D(alt->vdo)))554554 return -ENODEV;555555556556 ret = sysfs_create_group(&alt->dev.kobj, &dp_altmode_group);
···14261426 u32 bio_size = 0;14271427 struct bio_vec *bvec;14281428 struct bvec_iter_all iter_all;14291429+ int i;1429143014301431 bio_for_each_segment_all(bvec, bio, iter_all)14311432 bio_size += bvec->bv_len;1432143314331433- bitmap_set(rbio->error_bitmap, total_sector_nr,14341434- bio_size >> rbio->bioc->fs_info->sectorsize_bits);14341434+ /*14351435+ * Since we can have multiple bios touching the error_bitmap, we cannot14361436+ * call bitmap_set() without protection.14371437+ *14381438+ * Instead use set_bit() for each bit, as set_bit() itself is atomic.14391439+ */14401440+ for (i = total_sector_nr; i < total_sector_nr +14411441+ (bio_size >> rbio->bioc->fs_info->sectorsize_bits); i++)14421442+ set_bit(i, rbio->error_bitmap);14351443}1436144414371445/* Verify the data sectors at read time. */···18941886 sector->uptodate = 1;18951887 }18961888 if (failb >= 0) {18971897- ret = verify_one_sector(rbio, faila, sector_nr);18891889+ ret = verify_one_sector(rbio, failb, sector_nr);18981890 if (ret < 0)18991891 goto cleanup;19001892
+3-3
fs/btrfs/send.c
···80738073 /*80748074 * Check that we don't overflow at later allocations, we request80758075 * clone_sources_count + 1 items, and compare to unsigned long inside80768076- * access_ok.80768076+ * access_ok. Also set an upper limit for allocation size so this can't80778077+ * easily exhaust memory. Max number of clone sources is about 200K.80778078 */80788078- if (arg->clone_sources_count >80798079- ULONG_MAX / sizeof(struct clone_root) - 1) {80798079+ if (arg->clone_sources_count > SZ_8M / sizeof(struct clone_root)) {80808080 ret = -EINVAL;80818081 goto out;80828082 }
+17-6
fs/btrfs/tree-log.c
···35763576}3577357735783578static int flush_dir_items_batch(struct btrfs_trans_handle *trans,35793579- struct btrfs_root *log,35793579+ struct btrfs_inode *inode,35803580 struct extent_buffer *src,35813581 struct btrfs_path *dst_path,35823582 int start_slot,35833583 int count)35843584{35853585+ struct btrfs_root *log = inode->root->log_root;35853586 char *ins_data = NULL;35863587 struct btrfs_item_batch batch;35873588 struct extent_buffer *dst;35883589 unsigned long src_offset;35893590 unsigned long dst_offset;35913591+ u64 last_index;35903592 struct btrfs_key key;35913593 u32 item_size;35923594 int ret;···36463644 src_offset = btrfs_item_ptr_offset(src, start_slot + count - 1);36473645 copy_extent_buffer(dst, src, dst_offset, src_offset, batch.total_data_size);36483646 btrfs_release_path(dst_path);36473647+36483648+ last_index = batch.keys[count - 1].offset;36493649+ ASSERT(last_index > inode->last_dir_index_offset);36503650+36513651+ /*36523652+ * If for some unexpected reason the last item's index is not greater36533653+ * than the last index we logged, warn and return an error to fallback36543654+ * to a transaction commit.36553655+ */36563656+ if (WARN_ON(last_index <= inode->last_dir_index_offset))36573657+ ret = -EUCLEAN;36583658+ else36593659+ inode->last_dir_index_offset = last_index;36493660out:36503661 kfree(ins_data);36513662···37083693 }3709369437103695 di = btrfs_item_ptr(src, i, struct btrfs_dir_item);37113711- ctx->last_dir_item_offset = key.offset;3712369637133697 /*37143698 * Skip ranges of items that consist only of dir item keys created···37703756 if (batch_size > 0) {37713757 int ret;3772375837733773- ret = flush_dir_items_batch(trans, log, src, dst_path,37593759+ ret = flush_dir_items_batch(trans, inode, src, dst_path,37743760 batch_start, batch_size);37753761 if (ret < 0)37763762 return ret;···4058404440594045 min_key = BTRFS_DIR_START_INDEX;40604046 max_key = 0;40614061- ctx->last_dir_item_offset = inode->last_dir_index_offset;4062404740634048 while (1) {40644049 ret = log_dir_items(trans, inode, path, dst_path,···40684055 break;40694056 min_key = max_key + 1;40704057 }40714071-40724072- inode->last_dir_index_offset = ctx->last_dir_item_offset;4073405840744059 return 0;40754060}
-2
fs/btrfs/tree-log.h
···2424 bool logging_new_delayed_dentries;2525 /* Indicate if the inode being logged was logged before. */2626 bool logged_before;2727- /* Tracks the last logged dir item/index key offset. */2828- u64 last_dir_item_offset;2927 struct inode *inode;3028 struct list_head list;3129 /* Only used for fast fsyncs. */
+20-2
fs/btrfs/volumes.c
···403403static void free_fs_devices(struct btrfs_fs_devices *fs_devices)404404{405405 struct btrfs_device *device;406406+406407 WARN_ON(fs_devices->opened);407408 while (!list_empty(&fs_devices->devices)) {408409 device = list_entry(fs_devices->devices.next,···1182118111831182 mutex_lock(&uuid_mutex);11841183 close_fs_devices(fs_devices);11851185- if (!fs_devices->opened)11841184+ if (!fs_devices->opened) {11861185 list_splice_init(&fs_devices->seed_list, &list);11861186+11871187+ /*11881188+ * If the struct btrfs_fs_devices is not assembled with any11891189+ * other device, it can be re-initialized during the next mount11901190+ * without the needing device-scan step. Therefore, it can be11911191+ * fully freed.11921192+ */11931193+ if (fs_devices->num_devices == 1) {11941194+ list_del(&fs_devices->fs_list);11951195+ free_fs_devices(fs_devices);11961196+ }11971197+ }11981198+1187119911881200 list_for_each_entry_safe(fs_devices, tmp, &list, seed_list) {11891201 close_fs_devices(fs_devices);···16141600 if (ret < 0)16151601 goto out;1616160216171617- while (1) {16031603+ while (search_start < search_end) {16181604 l = path->nodes[0];16191605 slot = path->slots[0];16201606 if (slot >= btrfs_header_nritems(l)) {···1636162216371623 if (key.type != BTRFS_DEV_EXTENT_KEY)16381624 goto next;16251625+16261626+ if (key.offset > search_end)16271627+ break;1639162816401629 if (key.offset > search_start) {16411630 hole_size = key.offset - search_start;···17001683 else17011684 ret = 0;1702168516861686+ ASSERT(max_hole_start + max_hole_size <= search_end);17031687out:17041688 btrfs_free_path(path);17051689 *start = max_hole_start;
···270270 const int align;271271 const int is_signed;272272 const int filter_type;273273+ const int len;273274 };274275 int (*define_fields)(struct trace_event_call *);275276 };
···6464 __u32 pad;6565};66666767+/* fence_fd is modified on success if VIRTGPU_EXECBUF_FENCE_FD_OUT flag is set. */6768struct drm_virtgpu_execbuffer {6869 __u32 flags;6970 __u32 size;
···12051205/**12061206 * update_tasks_cpumask - Update the cpumasks of tasks in the cpuset.12071207 * @cs: the cpuset in which each task's cpus_allowed mask needs to be changed12081208+ * @new_cpus: the temp variable for the new effective_cpus mask12081209 *12091210 * Iterate through each task of @cs updating its cpus_allowed to the12101211 * effective cpuset's. As this function is called with cpuset_rwsem held,12111212 * cpuset membership stays stable.12121213 */12131213-static void update_tasks_cpumask(struct cpuset *cs)12141214+static void update_tasks_cpumask(struct cpuset *cs, struct cpumask *new_cpus)12141215{12151216 struct css_task_iter it;12161217 struct task_struct *task;···12251224 if (top_cs && (task->flags & PF_KTHREAD) &&12261225 kthread_is_per_cpu(task))12271226 continue;12281228- set_cpus_allowed_ptr(task, cs->effective_cpus);12271227+12281228+ cpumask_and(new_cpus, cs->effective_cpus,12291229+ task_cpu_possible_mask(task));12301230+ set_cpus_allowed_ptr(task, new_cpus);12291231 }12301232 css_task_iter_end(&it);12311233}···15131509 spin_unlock_irq(&callback_lock);1514151015151511 if (adding || deleting)15161516- update_tasks_cpumask(parent);15121512+ update_tasks_cpumask(parent, tmp->new_cpus);1517151315181514 /*15191515 * Set or clear CS_SCHED_LOAD_BALANCE when partcmd_update, if necessary.···16651661 WARN_ON(!is_in_v2_mode() &&16661662 !cpumask_equal(cp->cpus_allowed, cp->effective_cpus));1667166316681668- update_tasks_cpumask(cp);16641664+ update_tasks_cpumask(cp, tmp->new_cpus);1669166516701666 /*16711667 * On legacy hierarchy, if the effective cpumask of any non-···23132309 }23142310 }2315231123162316- update_tasks_cpumask(parent);23122312+ update_tasks_cpumask(parent, tmpmask.new_cpus);2317231323182314 if (parent->child_ecpus_count)23192315 update_sibling_cpumasks(parent, cs, &tmpmask);···33523348 * as the tasks will be migrated to an ancestor.33533349 */33543350 if (cpus_updated && !cpumask_empty(cs->cpus_allowed))33553355- update_tasks_cpumask(cs);33513351+ update_tasks_cpumask(cs, new_cpus);33563352 if (mems_updated && !nodes_empty(cs->mems_allowed))33573353 update_tasks_nodemask(cs);33583354···33893385 spin_unlock_irq(&callback_lock);3390338633913387 if (cpus_updated)33923392- update_tasks_cpumask(cs);33883388+ update_tasks_cpumask(cs, new_cpus);33933389 if (mems_updated)33943390 update_tasks_nodemask(cs);33953391}···36963692 * Description: Returns the cpumask_var_t cpus_allowed of the cpuset36973693 * attached to the specified @tsk. Guaranteed to return some non-empty36983694 * subset of cpu_online_mask, even if this means going outside the36993699- * tasks cpuset.36953695+ * tasks cpuset, except when the task is in the top cpuset.37003696 **/3701369737023698void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)37033699{37043700 unsigned long flags;37013701+ struct cpuset *cs;3705370237063703 spin_lock_irqsave(&callback_lock, flags);37073707- guarantee_online_cpus(tsk, pmask);37043704+ rcu_read_lock();37053705+37063706+ cs = task_cs(tsk);37073707+ if (cs != &top_cpuset)37083708+ guarantee_online_cpus(tsk, pmask);37093709+ /*37103710+ * Tasks in the top cpuset won't get update to their cpumasks37113711+ * when a hotplug online/offline event happens. So we include all37123712+ * offline cpus in the allowed cpu list.37133713+ */37143714+ if ((cs == &top_cpuset) || cpumask_empty(pmask)) {37153715+ const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);37163716+37173717+ /*37183718+ * We first exclude cpus allocated to partitions. If there is no37193719+ * allowable online cpu left, we fall back to all possible cpus.37203720+ */37213721+ cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);37223722+ if (!cpumask_intersects(pmask, cpu_online_mask))37233723+ cpumask_copy(pmask, possible_mask);37243724+ }37253725+37263726+ rcu_read_unlock();37083727 spin_unlock_irqrestore(&callback_lock, flags);37093728}37103729
+3-2
kernel/locking/rtmutex.c
···901901 * then we need to wake the new top waiter up to try902902 * to get the lock.903903 */904904- if (prerequeue_top_waiter != rt_mutex_top_waiter(lock))905905- wake_up_state(waiter->task, waiter->wake_state);904904+ top_waiter = rt_mutex_top_waiter(lock);905905+ if (prerequeue_top_waiter != top_waiter)906906+ wake_up_state(top_waiter->task, top_waiter->wake_state);906907 raw_spin_unlock_irq(&lock->wait_lock);907908 return 0;908909 }
···16401640 end = PFN_DOWN(base + size);1641164116421642 for (; cursor < end; cursor++) {16431643- /*16441644- * Reserved pages are always initialized by the end of16451645- * memblock_free_all() (by memmap_init() and, if deferred16461646- * initialization is enabled, memmap_init_reserved_pages()), so16471647- * these pages can be released directly to the buddy allocator.16481648- */16491649- __free_pages_core(pfn_to_page(cursor), 0);16431643+ memblock_free_pages(pfn_to_page(cursor), cursor, 0);16501644 totalram_pages_inc();16511645 }16521646}
+4-1
mm/page_alloc.c
···56315631 */56325632void __free_pages(struct page *page, unsigned int order)56335633{56345634+ /* get PageHead before we drop reference */56355635+ int head = PageHead(page);56365636+56345637 if (put_page_testzero(page))56355638 free_the_page(page, order);56365636- else if (!PageHead(page))56395639+ else if (!head)56375640 while (order-- > 0)56385641 free_the_page(page + (1 << order), order);56395642}
+40
net/can/j1939/address-claim.c
···165165 * leaving this function.166166 */167167 ecu = j1939_ecu_get_by_name_locked(priv, name);168168+169169+ if (ecu && ecu->addr == skcb->addr.sa) {170170+ /* The ISO 11783-5 standard, in "4.5.2 - Address claim171171+ * requirements", states:172172+ * d) No CF shall begin, or resume, transmission on the173173+ * network until 250 ms after it has successfully claimed174174+ * an address except when responding to a request for175175+ * address-claimed.176176+ *177177+ * But "Figure 6" and "Figure 7" in "4.5.4.2 - Address-claim178178+ * prioritization" show that the CF begins the transmission179179+ * after 250 ms from the first AC (address-claimed) message180180+ * even if it sends another AC message during that time window181181+ * to resolve the address contention with another CF.182182+ *183183+ * As stated in "4.4.2.3 - Address-claimed message":184184+ * In order to successfully claim an address, the CF sending185185+ * an address claimed message shall not receive a contending186186+ * claim from another CF for at least 250 ms.187187+ *188188+ * As stated in "4.4.3.2 - NAME management (NM) message":189189+ * 1) A commanding CF can190190+ * d) request that a CF with a specified NAME transmit191191+ * the address-claimed message with its current NAME.192192+ * 2) A target CF shall193193+ * d) send an address-claimed message in response to a194194+ * request for a matching NAME195195+ *196196+ * Taking the above arguments into account, the 250 ms wait is197197+ * requested only during network initialization.198198+ *199199+ * Do not restart the timer on AC message if both the NAME and200200+ * the address match and so if the address has already been201201+ * claimed (timer has expired) or the AC message has been sent202202+ * to resolve the contention with another CF (timer is still203203+ * running).204204+ */205205+ goto out_ecu_put;206206+ }207207+168208 if (!ecu && j1939_address_is_unicast(skcb->addr.sa))169209 ecu = j1939_ecu_create_locked(priv, name);170210
+6-3
net/core/devlink.c
···99799979 goto err_xa_alloc;9980998099819981 devlink->netdevice_nb.notifier_call = devlink_netdevice_event;99829982- ret = register_netdevice_notifier_net(net, &devlink->netdevice_nb);99829982+ ret = register_netdevice_notifier(&devlink->netdevice_nb);99839983 if (ret)99849984 goto err_register_netdevice_notifier;99859985···1017110171 xa_destroy(&devlink->snapshot_ids);1017210172 xa_destroy(&devlink->ports);10173101731017410174- WARN_ON_ONCE(unregister_netdevice_notifier_net(devlink_net(devlink),1017510175- &devlink->netdevice_nb));1017410174+ WARN_ON_ONCE(unregister_netdevice_notifier(&devlink->netdevice_nb));10176101751017710176 xa_erase(&devlinks, devlink->index);1017810177···1050210503 break;1050310504 case NETDEV_REGISTER:1050410505 case NETDEV_CHANGENAME:1050610506+ if (devlink_net(devlink) != dev_net(netdev))1050710507+ return NOTIFY_OK;1050510508 /* Set the netdev on top of previously set type. Note this1050610509 * event happens also during net namespace change so here1050710510 * we take into account netdev pointer appearing in this···1051310512 netdev);1051410513 break;1051510514 case NETDEV_UNREGISTER:1051510515+ if (devlink_net(devlink) != dev_net(netdev))1051610516+ return NOTIFY_OK;1051610517 /* Clear netdev pointer, but not the type. This event happens1051710518 * also during net namespace change so we need to clear1051810519 * pointer to netdev that is going to another net namespace.
+15-3
net/core/neighbour.c
···269269 (n->nud_state == NUD_NOARP) ||270270 (tbl->is_multicast &&271271 tbl->is_multicast(n->primary_key)) ||272272- time_after(tref, n->updated))272272+ !time_in_range(n->updated, tref, jiffies))273273 remove = true;274274 write_unlock(&n->lock);275275···289289290290static void neigh_add_timer(struct neighbour *n, unsigned long when)291291{292292+ /* Use safe distance from the jiffies - LONG_MAX point while timer293293+ * is running in DELAY/PROBE state but still show to user space294294+ * large times in the past.295295+ */296296+ unsigned long mint = jiffies - (LONG_MAX - 86400 * HZ);297297+292298 neigh_hold(n);299299+ if (!time_in_range(n->confirmed, mint, jiffies))300300+ n->confirmed = mint;301301+ if (time_before(n->used, n->confirmed))302302+ n->used = n->confirmed;293303 if (unlikely(mod_timer(&n->timer, when))) {294304 printk("NEIGH: BUG, double timer add, state is %x\n",295305 n->nud_state);···10111001 goto next_elt;10121002 }1013100310141014- if (time_before(n->used, n->confirmed))10041004+ if (time_before(n->used, n->confirmed) &&10051005+ time_is_before_eq_jiffies(n->confirmed))10151006 n->used = n->confirmed;1016100710171008 if (refcount_read(&n->refcnt) == 1 &&10181009 (state == NUD_FAILED ||10191019- time_after(jiffies, n->used + NEIGH_VAR(n->parms, GC_STALETIME)))) {10101010+ !time_in_range_open(jiffies, n->used,10111011+ n->used + NEIGH_VAR(n->parms, GC_STALETIME)))) {10201012 *np = n->next;10211013 neigh_mark_dead(n);10221014 write_unlock(&n->lock);
+2-1
net/core/sock.c
···15311531 ret = -EINVAL;15321532 break;15331533 }15341534+ if ((u8)val == SOCK_TXREHASH_DEFAULT)15351535+ val = READ_ONCE(sock_net(sk)->core.sysctl_txrehash);15341536 /* Paired with READ_ONCE() in tcp_rtx_synack() */15351537 WRITE_ONCE(sk->sk_txrehash, (u8)val);15361538 break;···34533451 sk->sk_pacing_rate = ~0UL;34543452 WRITE_ONCE(sk->sk_pacing_shift, 10);34553453 sk->sk_incoming_cpu = -1;34563456- sk->sk_txrehash = SOCK_TXREHASH_DEFAULT;3457345434583455 sk_rx_queue_clear(sk);34593456 /*
···12251225 sk->sk_ack_backlog = 0;12261226 inet_csk_delack_init(sk);1227122712281228- if (sk->sk_txrehash == SOCK_TXREHASH_DEFAULT)12291229- sk->sk_txrehash = READ_ONCE(sock_net(sk)->core.sysctl_txrehash);12301230-12311228 /* There is race window here: we announce ourselves listening,12321229 * but this transition is still not validated by get_port().12331230 * It is OK, because this socket enters to hash table only
+1
net/ipv6/af_inet6.c
···222222 np->pmtudisc = IPV6_PMTUDISC_WANT;223223 np->repflow = net->ipv6.sysctl.flowlabel_reflect & FLOWLABEL_REFLECT_ESTABLISHED;224224 sk->sk_ipv6only = net->ipv6.sysctl.bindv6only;225225+ sk->sk_txrehash = READ_ONCE(net->core.sysctl_txrehash);225226226227 /* Init the ipv4 part of the socket since we can have sockets227228 * using v6 API for ipv4.
+6-4
net/mptcp/pm_netlink.c
···998998{999999 int addrlen = sizeof(struct sockaddr_in);10001000 struct sockaddr_storage addr;10011001- struct mptcp_sock *msk;10021001 struct socket *ssock;10021002+ struct sock *newsk;10031003 int backlog = 1024;10041004 int err;10051005···10081008 if (err)10091009 return err;1010101010111011- msk = mptcp_sk(entry->lsk->sk);10121012- if (!msk)10111011+ newsk = entry->lsk->sk;10121012+ if (!newsk)10131013 return -EINVAL;1014101410151015- ssock = __mptcp_nmpc_socket(msk);10151015+ lock_sock(newsk);10161016+ ssock = __mptcp_nmpc_socket(mptcp_sk(newsk));10171017+ release_sock(newsk);10161018 if (!ssock)10171019 return -EINVAL;10181020
+9
net/mptcp/protocol.c
···28972897 struct mptcp_subflow_context *subflow;28982898 struct mptcp_sock *msk = mptcp_sk(sk);28992899 bool do_cancel_work = false;29002900+ int subflows_alive = 0;2900290129012902 sk->sk_shutdown = SHUTDOWN_MASK;29022903···29232922 struct sock *ssk = mptcp_subflow_tcp_sock(subflow);29242923 bool slow = lock_sock_fast_nested(ssk);2925292429252925+ subflows_alive += ssk->sk_state != TCP_CLOSE;29262926+29262927 /* since the close timeout takes precedence on the fail one,29272928 * cancel the latter29282929 */···29392936 unlock_sock_fast(ssk, slow);29402937 }29412938 sock_orphan(sk);29392939+29402940+ /* all the subflows are closed, only timeout can change the msk29412941+ * state, let's not keep resources busy for no reasons29422942+ */29432943+ if (subflows_alive == 0)29442944+ inet_sk_state_store(sk, TCP_CLOSE);2942294529432946 sock_hold(sk);29442947 pr_debug("msk=%p state=%d", sk, sk->sk_state);
+9-2
net/mptcp/sockopt.c
···760760static int mptcp_setsockopt_first_sf_only(struct mptcp_sock *msk, int level, int optname,761761 sockptr_t optval, unsigned int optlen)762762{763763+ struct sock *sk = (struct sock *)msk;763764 struct socket *sock;765765+ int ret = -EINVAL;764766765767 /* Limit to first subflow, before the connection establishment */768768+ lock_sock(sk);766769 sock = __mptcp_nmpc_socket(msk);767770 if (!sock)768768- return -EINVAL;771771+ goto unlock;769772770770- return tcp_setsockopt(sock->sk, level, optname, optval, optlen);773773+ ret = tcp_setsockopt(sock->sk, level, optname, optval, optlen);774774+775775+unlock:776776+ release_sock(sk);777777+ return ret;771778}772779773780static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
+10-2
net/mptcp/subflow.c
···13991399 mptcp_for_each_subflow(msk, subflow) {14001400 struct sock *ssk = mptcp_subflow_tcp_sock(subflow);14011401 int err = sock_error(ssk);14021402+ int ssk_state;1402140314031404 if (!err)14041405 continue;···14101409 if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(msk))14111410 continue;1412141114131413- inet_sk_state_store(sk, inet_sk_state_load(ssk));14121412+ /* We need to propagate only transition to CLOSE state.14131413+ * Orphaned socket will see such state change via14141414+ * subflow_sched_work_if_closed() and that path will properly14151415+ * destroy the msk as needed.14161416+ */14171417+ ssk_state = inet_sk_state_load(ssk);14181418+ if (ssk_state == TCP_CLOSE && !sock_flag(sk, SOCK_DEAD))14191419+ inet_sk_state_store(sk, ssk_state);14141420 sk->sk_err = -err;1415142114161422 /* This barrier is coupled with smp_rmb() in mptcp_poll() */···16871679 if (err)16881680 return err;1689168116901690- lock_sock(sf->sk);16821682+ lock_sock_nested(sf->sk, SINGLE_DEPTH_NESTING);1691168316921684 /* the newly created socket has to be in the same cgroup as its parent */16931685 mptcp_attach_cgroup(sk, sf->sk);
+3-3
net/rds/message.c
···104104 spin_lock_irqsave(&q->lock, flags);105105 head = &q->zcookie_head;106106 if (!list_empty(head)) {107107- info = list_entry(head, struct rds_msg_zcopy_info,108108- rs_zcookie_next);109109- if (info && rds_zcookie_add(info, cookie)) {107107+ info = list_first_entry(head, struct rds_msg_zcopy_info,108108+ rs_zcookie_next);109109+ if (rds_zcookie_add(info, cookie)) {110110 spin_unlock_irqrestore(&q->lock, flags);111111 kfree(rds_info_from_znotifier(znotif));112112 /* caller invokes rds_wake_sk_sleep() */
+1-1
net/sched/sch_htb.c
···433433 while (m) {434434 unsigned int prio = ffz(~m);435435436436- if (WARN_ON_ONCE(prio > ARRAY_SIZE(p->inner.clprio)))436436+ if (WARN_ON_ONCE(prio >= ARRAY_SIZE(p->inner.clprio)))437437 break;438438 m &= ~(1 << prio);439439
+3-1
net/xfrm/xfrm_compat.c
···55 * Based on code and translator idea by: Florian Westphal <fw@strlen.de>66 */77#include <linux/compat.h>88+#include <linux/nospec.h>89#include <linux/xfrm.h>910#include <net/xfrm.h>1011···303302 nla_for_each_attr(nla, attrs, len, remaining) {304303 int err;305304306306- switch (type) {305305+ switch (nlh_src->nlmsg_type) {307306 case XFRM_MSG_NEWSPDINFO:308307 err = xfrm_nla_cpy(dst, nla, nla_len(nla));309308 break;···438437 NL_SET_ERR_MSG(extack, "Bad attribute");439438 return -EOPNOTSUPP;440439 }440440+ type = array_index_nospec(type, XFRMA_MAX + 1);441441 if (nla_len(nla) < compat_policy[type].len) {442442 NL_SET_ERR_MSG(extack, "Attribute bad length");443443 return -EOPNOTSUPP;
+1-2
net/xfrm/xfrm_input.c
···279279 goto out;280280281281 if (x->props.flags & XFRM_STATE_DECAP_DSCP)282282- ipv6_copy_dscp(ipv6_get_dsfield(ipv6_hdr(skb)),283283- ipipv6_hdr(skb));282282+ ipv6_copy_dscp(XFRM_MODE_SKB_CB(skb)->tos, ipipv6_hdr(skb));284283 if (!(x->props.flags & XFRM_STATE_NOECN))285284 ipip6_ecn_decapsulate(skb);286285