···25412541S: Victoria 316325422542S: Australia2543254325442544+N: Eric Miao25452545+E: eric.y.miao@gmail.com25462546+D: MMP support25472547+25442548N: Pauline Middelink25452549E: middelin@polyware.nl25462550D: General low-level bug fixes, /proc fixes, identd support···41184114S: 1507 145th Place SE #B541194115S: Bellevue, Washington 9800741204116S: USA41174117+41184118+N: Haojian Zhuang41194119+E: haojian.zhuang@gmail.com41204120+D: MMP support4121412141224122N: Richard Zidlicky41234123E: rz@linux-m68k.org, rdzidlic@geocities.com
+4-1
Documentation/core-api/xarray.rst
···187187 * :c:func:`xa_erase_bh`188188 * :c:func:`xa_erase_irq`189189 * :c:func:`xa_cmpxchg`190190+ * :c:func:`xa_cmpxchg_bh`191191+ * :c:func:`xa_cmpxchg_irq`190192 * :c:func:`xa_store_range`191193 * :c:func:`xa_alloc`192194 * :c:func:`xa_alloc_bh`···265263context, or :c:func:`xa_lock_irq` in process context and :c:func:`xa_lock`266264in the interrupt handler. Some of the more common patterns have helper267265functions such as :c:func:`xa_store_bh`, :c:func:`xa_store_irq`,268268-:c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`.266266+:c:func:`xa_erase_bh`, :c:func:`xa_erase_irq`, :c:func:`xa_cmpxchg_bh`267267+and :c:func:`xa_cmpxchg_irq`.269268270269Sometimes you need to protect access to the XArray with a mutex because271270that lock sits above another mutex in the locking hierarchy. That does
···15051505 configuring a stateless hardware decoding pipeline for MPEG-2.15061506 The bitstream parameters are defined according to :ref:`mpeg2part2`.1507150715081508+ .. note::15091509+15101510+ This compound control is not yet part of the public kernel API and15111511+ it is expected to change.15121512+15081513.. c:type:: v4l2_ctrl_mpeg2_slice_params1509151415101515.. cssclass:: longtable···16291624``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``16301625 Specifies quantization matrices (as extracted from the bitstream) for the16311626 associated MPEG-2 slice data.16271627+16281628+ .. note::16291629+16301630+ This compound control is not yet part of the public kernel API and16311631+ it is expected to change.1632163216331633.. c:type:: v4l2_ctrl_mpeg2_quantization16341634
+16-7
MAINTAINERS
···17391739M: Matthias Brugger <matthias.bgg@gmail.com>17401740L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)17411741L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)17421742+W: https://mtk.bcnfs.org/17431743+C: irc://chat.freenode.net/linux-mediatek17421744S: Maintained17431745F: arch/arm/boot/dts/mt6*17441746F: arch/arm/boot/dts/mt7*17451747F: arch/arm/boot/dts/mt8*17461748F: arch/arm/mach-mediatek/17471749F: arch/arm64/boot/dts/mediatek/17501750+F: drivers/soc/mediatek/17481751N: mtk17521752+N: mt[678]17491753K: mediatek1750175417511755ARM/Mediatek USB3 PHY DRIVER···4847484348484844DRM DRIVERS48494845M: David Airlie <airlied@linux.ie>48464846+M: Daniel Vetter <daniel@ffwll.ch>48504847L: dri-devel@lists.freedesktop.org48514848T: git git://anongit.freedesktop.org/drm/drm48524849B: https://bugs.freedesktop.org/···8944893989458940MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER89468941M: Andrew Lunn <andrew@lunn.ch>89478947-M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>89428942+M: Vivien Didelot <vivien.didelot@gmail.com>89488943L: netdev@vger.kernel.org89498944S: Maintained89508945F: drivers/net/dsa/mv88e6xxx/···94489443F: drivers/media/platform/mtk-vpu/94499444F: Documentation/devicetree/bindings/media/mediatek-vcodec.txt94509445F: Documentation/devicetree/bindings/media/mediatek-vpu.txt94469446+94479447+MEDIATEK MT76 WIRELESS LAN DRIVER94489448+M: Felix Fietkau <nbd@nbd.name>94499449+M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>94509450+L: linux-wireless@vger.kernel.org94519451+S: Maintained94529452+F: drivers/net/wireless/mediatek/mt76/9451945394529454MEDIATEK MT7601U WIRELESS LAN DRIVER94539455M: Jakub Kicinski <kubakici@wp.pl>···1001810006F: drivers/media/radio/radio-miropcm20*10019100071002010008MMP SUPPORT1002110021-M: Eric Miao <eric.y.miao@gmail.com>1002210022-M: Haojian Zhuang <haojian.zhuang@gmail.com>1000910009+R: Lubomir Rintel <lkundrak@v3.sk>1002310010L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)1002410024-T: git git://github.com/hzhuang1/linux.git1002510025-T: git git://git.linaro.org/people/ycmiao/pxa-linux.git1002610026-S: Maintained1001110011+S: Odd Fixes1002710012F: arch/arm/boot/dts/mmp*1002810013F: arch/arm/mach-mmp/1002910014···10426104171042710418NETWORKING [DSA]1042810419M: Andrew Lunn <andrew@lunn.ch>1042910429-M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>1042010420+M: Vivien Didelot <vivien.didelot@gmail.com>1043010421M: Florian Fainelli <f.fainelli@gmail.com>1043110422S: Maintained1043210423F: Documentation/devicetree/bindings/net/dsa/
···634634635635 /* Find our memory. */636636 setup_memory(kernel_end);637637+ memblock_set_bottom_up(true);637638638639 /* First guess at cpu cache sizes. Do this before init_arch. */639640 determine_cpu_caches(cpu->type);
+3-3
arch/alpha/mm/numa.c
···144144 if (!nid && (node_max_pfn < end_kernel_pfn || node_min_pfn > start_kernel_pfn))145145 panic("kernel loaded out of ram");146146147147+ memblock_add(PFN_PHYS(node_min_pfn),148148+ (node_max_pfn - node_min_pfn) << PAGE_SHIFT);149149+147150 /* Zone start phys-addr must be 2^(MAX_ORDER-1) aligned.148151 Note that we round this down, not up - node memory149152 has much larger alignment than 8Mb, so it's safe. */150153 node_min_pfn &= ~((1UL << (MAX_ORDER-1))-1);151151-152152- memblock_add(PFN_PHYS(node_min_pfn),153153- (node_max_pfn - node_min_pfn) << PAGE_SHIFT);154154155155 NODE_DATA(nid)->node_start_pfn = node_min_pfn;156156 NODE_DATA(nid)->node_present_pages = node_max_pfn - node_min_pfn;
+2-2
arch/arm/boot/dts/arm-realview-pb1176.dts
···4545 };46464747 /* The voltage to the MMC card is hardwired at 3.3V */4848- vmmc: fixedregulator@0 {4848+ vmmc: regulator-vmmc {4949 compatible = "regulator-fixed";5050 regulator-name = "vmmc";5151 regulator-min-microvolt = <3300000>;···5353 regulator-boot-on;5454 };55555656- veth: fixedregulator@0 {5656+ veth: regulator-veth {5757 compatible = "regulator-fixed";5858 regulator-name = "veth";5959 regulator-min-microvolt = <3300000>;
+2-2
arch/arm/boot/dts/arm-realview-pb11mp.dts
···145145 };146146147147 /* The voltage to the MMC card is hardwired at 3.3V */148148- vmmc: fixedregulator@0 {148148+ vmmc: regulator-vmmc {149149 compatible = "regulator-fixed";150150 regulator-name = "vmmc";151151 regulator-min-microvolt = <3300000>;···153153 regulator-boot-on;154154 };155155156156- veth: fixedregulator@0 {156156+ veth: regulator-veth {157157 compatible = "regulator-fixed";158158 regulator-name = "veth";159159 regulator-min-microvolt = <3300000>;
···110110 * except for power up sw2iso which need to be111111 * larger than LDO ramp up time.112112 */113113- imx_gpc_set_arm_power_up_timing(2, 1);113113+ imx_gpc_set_arm_power_up_timing(0xf, 1);114114 imx_gpc_set_arm_power_down_timing(1, 1);115115116116 return cpuidle_register(&imx6sx_cpuidle_driver, NULL);
···3535#define PCI_IO_SIZE SZ_16M36363737/*3838- * Log2 of the upper bound of the size of a struct page. Used for sizing3939- * the vmemmap region only, does not affect actual memory footprint.4040- * We don't use sizeof(struct page) directly since taking its size here4141- * requires its definition to be available at this point in the inclusion4242- * chain, and it may not be a power of 2 in the first place.4343- */4444-#define STRUCT_PAGE_MAX_SHIFT 64545-4646-/*4738 * VMEMMAP_SIZE - allows the whole linear region to be covered by4839 * a struct page array4940 */
···1515RELA = 71616RELACOUNT = 0x6ffffff917171818- .text1818+ .data1919 /* A procedure descriptor used when booting this as a COFF file.2020 * When making COFF, this comes first in the link and we're2121 * linked at 0x500000.···2323 .globl _zimage_start_opd2424_zimage_start_opd:2525 .long 0x500000, 0, 0, 02626+ .text2727+ b _zimage_start26282729#ifdef __powerpc64__2830.balign 8
+2
arch/powerpc/include/asm/perf_event.h
···2626#include <asm/ptrace.h>2727#include <asm/reg.h>28282929+#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs3030+2931/*3032 * Overload regs->result to specify whether we should use the MSR (result3133 * is zero) or the SIAR (result is non zero).
···372372373373 /* Now find out if one of these is out firmware console */374374 path = of_get_property(of_chosen, "linux,stdout-path", NULL);375375+ if (path == NULL)376376+ path = of_get_property(of_chosen, "stdout-path", NULL);375377 if (path != NULL) {376378 stdout = of_find_node_by_path(path);377379 if (stdout)···597595 /* We are getting a weird phandle from OF ... */598596 /* ... So use the full path instead */599597 name = of_get_property(of_chosen, "linux,stdout-path", NULL);598598+ if (name == NULL)599599+ name = of_get_property(of_chosen, "stdout-path", NULL);600600 if (name == NULL) {601601- DBG(" no linux,stdout-path !\n");601601+ DBG(" no stdout-path !\n");602602 return -ENODEV;603603 }604604 prom_stdout = of_find_node_by_path(name);
+6-1
arch/powerpc/kernel/msi.c
···3434{3535 struct pci_controller *phb = pci_bus_to_host(dev->bus);36363737- phb->controller_ops.teardown_msi_irqs(dev);3737+ /*3838+ * We can be called even when arch_setup_msi_irqs() returns -ENOSYS,3939+ * so check the pointer again.4040+ */4141+ if (phb->controller_ops.teardown_msi_irqs)4242+ phb->controller_ops.teardown_msi_irqs(dev);3843}
+6-1
arch/powerpc/kernel/ptrace.c
···32663266 user_exit();3267326732683268 if (test_thread_flag(TIF_SYSCALL_EMU)) {32693269- ptrace_report_syscall(regs);32703269 /*32703270+ * A nonzero return code from tracehook_report_syscall_entry()32713271+ * tells us to prevent the syscall execution, but we are not32723272+ * going to execute it anyway.32733273+ *32713274 * Returning -1 will skip the syscall execution. We want to32723275 * avoid clobbering any register also, thus, not 'gotoing'32733276 * skip label.32743277 */32783278+ if (tracehook_report_syscall_entry(regs))32793279+ ;32753280 return -1;32763281 }32773282
···188188 pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node);189189190190 for (; start < end; start += page_size) {191191- void *p;191191+ void *p = NULL;192192 int rc;193193194194 if (vmemmap_populated(start, page_size))195195 continue;196196197197+ /*198198+ * Allocate from the altmap first if we have one. This may199199+ * fail due to alignment issues when using 16MB hugepages, so200200+ * fall back to system memory if the altmap allocation fail.201201+ */197202 if (altmap)198203 p = altmap_alloc_block_buf(page_size, altmap);199199- else204204+ if (!p)200205 p = vmemmap_alloc_block_buf(page_size, node);201206 if (!p)202207 return -ENOMEM;···260255{261256 unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;262257 unsigned long page_order = get_order(page_size);258258+ unsigned long alt_start = ~0, alt_end = ~0;259259+ unsigned long base_pfn;263260264261 start = _ALIGN_DOWN(start, page_size);262262+ if (altmap) {263263+ alt_start = altmap->base_pfn;264264+ alt_end = altmap->base_pfn + altmap->reserve +265265+ altmap->free + altmap->alloc + altmap->align;266266+ }265267266268 pr_debug("vmemmap_free %lx...%lx\n", start, end);267269···292280 page = pfn_to_page(addr >> PAGE_SHIFT);293281 section_base = pfn_to_page(vmemmap_section_start(start));294282 nr_pages = 1 << page_order;283283+ base_pfn = PHYS_PFN(addr);295284296296- if (altmap) {285285+ if (base_pfn >= alt_start && base_pfn < alt_end) {297286 vmem_altmap_free(altmap, nr_pages);298287 } else if (PageReserved(page)) {299288 /* allocated from bootmem */
+1-2
arch/powerpc/platforms/pseries/Kconfig
···140140 Bus device driver for GX bus based adapters.141141142142config PAPR_SCM143143- depends on PPC_PSERIES && MEMORY_HOTPLUG144144- select LIBNVDIMM143143+ depends on PPC_PSERIES && MEMORY_HOTPLUG && LIBNVDIMM145144 tristate "Support for the PAPR Storage Class Memory interface"146145 help147146 Enable access to hypervisor provided storage class memory.
+30-9
arch/powerpc/platforms/pseries/papr_scm.c
···5555 do {5656 rc = plpar_hcall(H_SCM_BIND_MEM, ret, p->drc_index, 0,5757 p->blocks, BIND_ANY_ADDR, token);5858- token = be64_to_cpu(ret[0]);5858+ token = ret[0];5959 cond_resched();6060 } while (rc == H_BUSY);6161···6464 return -ENXIO;6565 }66666767- p->bound_addr = be64_to_cpu(ret[1]);6767+ p->bound_addr = ret[1];68686969 dev_dbg(&p->pdev->dev, "bound drc %x to %pR\n", p->drc_index, &p->res);7070···8282 do {8383 rc = plpar_hcall(H_SCM_UNBIND_MEM, ret, p->drc_index,8484 p->bound_addr, p->blocks, token);8585- token = be64_to_cpu(ret);8585+ token = ret[0];8686 cond_resched();8787 } while (rc == H_BUSY);8888···223223 goto err;224224 }225225226226+ if (nvdimm_bus_check_dimm_count(p->bus, 1))227227+ goto err;228228+226229 /* now add the region */227230228231 memset(&mapping, 0, sizeof(mapping));···260257261258static int papr_scm_probe(struct platform_device *pdev)262259{263263- uint32_t drc_index, metadata_size, unit_cap[2];264260 struct device_node *dn = pdev->dev.of_node;261261+ u32 drc_index, metadata_size;262262+ u64 blocks, block_size;265263 struct papr_scm_priv *p;264264+ const char *uuid_str;265265+ u64 uuid[2];266266 int rc;267267268268 /* check we have all the required DT properties */···274268 return -ENODEV;275269 }276270277277- if (of_property_read_u32_array(dn, "ibm,unit-capacity", unit_cap, 2)) {278278- dev_err(&pdev->dev, "%pOF: missing unit-capacity!\n", dn);271271+ if (of_property_read_u64(dn, "ibm,block-size", &block_size)) {272272+ dev_err(&pdev->dev, "%pOF: missing block-size!\n", dn);273273+ return -ENODEV;274274+ }275275+276276+ if (of_property_read_u64(dn, "ibm,number-of-blocks", &blocks)) {277277+ dev_err(&pdev->dev, "%pOF: missing number-of-blocks!\n", dn);278278+ return -ENODEV;279279+ }280280+281281+ if (of_property_read_string(dn, "ibm,unit-guid", &uuid_str)) {282282+ dev_err(&pdev->dev, "%pOF: missing unit-guid!\n", dn);279283 return -ENODEV;280284 }281285···298282299283 p->dn = dn;300284 p->drc_index = drc_index;301301- p->block_size = unit_cap[0];302302- p->blocks = unit_cap[1];285285+ p->block_size = block_size;286286+ p->blocks = blocks;287287+288288+ /* We just need to ensure that set cookies are unique across */289289+ uuid_parse(uuid_str, (uuid_t *) uuid);290290+ p->nd_set.cookie1 = uuid[0];291291+ p->nd_set.cookie2 = uuid[1];303292304293 /* might be zero */305294 p->metadata_size = metadata_size;···317296318297 /* setup the resource for the newly bound range */319298 p->res.start = p->bound_addr;320320- p->res.end = p->bound_addr + p->blocks * p->block_size;299299+ p->res.end = p->bound_addr + p->blocks * p->block_size - 1;321300 p->res.name = pdev->name;322301 p->res.flags = IORESOURCE_MEM;323302
···24262426 case MSR_AMD64_PATCH_LOADER:24272427 case MSR_AMD64_BU_CFG2:24282428 case MSR_AMD64_DC_CFG:24292429+ case MSR_F15H_EX_CFG:24292430 break;2430243124312432 case MSR_IA32_UCODE_REV:···27222721 case MSR_AMD64_BU_CFG2:27232722 case MSR_IA32_PERF_CTL:27242723 case MSR_AMD64_DC_CFG:27242724+ case MSR_F15H_EX_CFG:27252725 msr_info->data = 0;27262726 break;27272727 case MSR_F15H_PERF_CTL0 ... MSR_F15H_PERF_CTR5:···7448744674497447static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu)74507448{74517451- if (!kvm_apic_hw_enabled(vcpu->arch.apic))74497449+ if (!kvm_apic_present(vcpu))74527450 return;7453745174547452 bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256);
···1985198519861986 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_EnableAvfs);1987198719881988+ /* Apply avfs cks-off voltages to avoid the overshoot19891989+ * when switching to the highest sclk frequency19901990+ */19911991+ if (data->apply_avfs_cks_off_voltage)19921992+ smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ApplyAvfsCksOffVoltage);19931993+19881994 return 0;19891995}19901996
···1444144414451445 intel_uncore_sanitize(dev_priv);1446144614471447+ intel_gt_init_workarounds(dev_priv);14471448 i915_gem_load_init_fences(dev_priv);1448144914491450 /* On the 945G/GM, the chipset reports the MSI capability on the
···490490 intel_engine_init_cmd_parser(engine);491491}492492493493-int intel_engine_create_scratch(struct intel_engine_cs *engine,494494- unsigned int size)495495-{496496- struct drm_i915_gem_object *obj;497497- struct i915_vma *vma;498498- int ret;499499-500500- WARN_ON(engine->scratch);501501-502502- obj = i915_gem_object_create_stolen(engine->i915, size);503503- if (!obj)504504- obj = i915_gem_object_create_internal(engine->i915, size);505505- if (IS_ERR(obj)) {506506- DRM_ERROR("Failed to allocate scratch page\n");507507- return PTR_ERR(obj);508508- }509509-510510- vma = i915_vma_instance(obj, &engine->i915->ggtt.vm, NULL);511511- if (IS_ERR(vma)) {512512- ret = PTR_ERR(vma);513513- goto err_unref;514514- }515515-516516- ret = i915_vma_pin(vma, 0, 0, PIN_GLOBAL | PIN_HIGH);517517- if (ret)518518- goto err_unref;519519-520520- engine->scratch = vma;521521- return 0;522522-523523-err_unref:524524- i915_gem_object_put(obj);525525- return ret;526526-}527527-528528-void intel_engine_cleanup_scratch(struct intel_engine_cs *engine)529529-{530530- i915_vma_unpin_and_release(&engine->scratch, 0);531531-}532532-533493static void cleanup_status_page(struct intel_engine_cs *engine)534494{535495 if (HWS_NEEDS_PHYSICAL(engine->i915)) {···664704{665705 struct drm_i915_private *i915 = engine->i915;666706667667- intel_engine_cleanup_scratch(engine);668668-669707 cleanup_status_page(engine);670708671709 intel_engine_fini_breadcrumbs(engine);···678720 __intel_context_unpin(i915->kernel_context, engine);679721680722 i915_timeline_fini(&engine->timeline);723723+724724+ intel_wa_list_free(&engine->wa_list);681725}682726683727u64 intel_engine_get_active_head(const struct intel_engine_cs *engine)
+16-14
drivers/gpu/drm/i915/intel_lrc.c
···442442 * may not be visible to the HW prior to the completion of the UC443443 * register write and that we may begin execution from the context444444 * before its image is complete leading to invalid PD chasing.445445+ *446446+ * Furthermore, Braswell, at least, wants a full mb to be sure that447447+ * the writes are coherent in memory (visible to the GPU) prior to448448+ * execution, and not just visible to other CPUs (as is the result of449449+ * wmb).445450 */446446- wmb();451451+ mb();447452 return ce->lrc_desc;448453}449454···14481443static u32 *14491444gen8_emit_flush_coherentl3_wa(struct intel_engine_cs *engine, u32 *batch)14501445{14461446+ /* NB no one else is allowed to scribble over scratch + 256! */14511447 *batch++ = MI_STORE_REGISTER_MEM_GEN8 | MI_SRM_LRM_GLOBAL_GTT;14521448 *batch++ = i915_mmio_reg_offset(GEN8_L3SQCREG4);14531453- *batch++ = i915_ggtt_offset(engine->scratch) + 256;14491449+ *batch++ = i915_scratch_offset(engine->i915) + 256;14541450 *batch++ = 0;1455145114561452 *batch++ = MI_LOAD_REGISTER_IMM(1);···1465145914661460 *batch++ = MI_LOAD_REGISTER_MEM_GEN8 | MI_SRM_LRM_GLOBAL_GTT;14671461 *batch++ = i915_mmio_reg_offset(GEN8_L3SQCREG4);14681468- *batch++ = i915_ggtt_offset(engine->scratch) + 256;14621462+ *batch++ = i915_scratch_offset(engine->i915) + 256;14691463 *batch++ = 0;1470146414711465 return batch;···15021496 PIPE_CONTROL_GLOBAL_GTT_IVB |15031497 PIPE_CONTROL_CS_STALL |15041498 PIPE_CONTROL_QW_WRITE,15051505- i915_ggtt_offset(engine->scratch) +14991499+ i915_scratch_offset(engine->i915) +15061500 2 * CACHELINE_BYTES);1507150115081502 *batch++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;···15791573 PIPE_CONTROL_GLOBAL_GTT_IVB |15801574 PIPE_CONTROL_CS_STALL |15811575 PIPE_CONTROL_QW_WRITE,15821582- i915_ggtt_offset(engine->scratch)15761576+ i915_scratch_offset(engine->i915)15831577 + 2 * CACHELINE_BYTES);15841578 }15851579···1799179318001794static int gen8_init_common_ring(struct intel_engine_cs *engine)18011795{17961796+ intel_engine_apply_workarounds(engine);17971797+18021798 intel_mocs_init_engine(engine);1803179918041800 intel_engine_reset_breadcrumbs(engine);···21472139{21482140 struct intel_engine_cs *engine = request->engine;21492141 u32 scratch_addr =21502150- i915_ggtt_offset(engine->scratch) + 2 * CACHELINE_BYTES;21422142+ i915_scratch_offset(engine->i915) + 2 * CACHELINE_BYTES;21512143 bool vf_flush_wa = false, dc_flush_wa = false;21522144 u32 *cs, flags = 0;21532145 int len;···24842476 if (ret)24852477 return ret;2486247824872487- ret = intel_engine_create_scratch(engine, PAGE_SIZE);24882488- if (ret)24892489- goto err_cleanup_common;24902490-24912479 ret = intel_init_workaround_bb(engine);24922480 if (ret) {24932481 /*···24952491 ret);24962492 }2497249324982498- return 0;24942494+ intel_engine_init_workarounds(engine);2499249525002500-err_cleanup_common:25012501- intel_engine_cleanup_common(engine);25022502- return ret;24962496+ return 0;25032497}2504249825052499int logical_xcs_ring_init(struct intel_engine_cs *engine)
···818818 dsi->encoder.possible_crtcs = 1;819819820820 /* If there's a bridge, attach to it and let it create the connector */821821- ret = drm_bridge_attach(&dsi->encoder, dsi->bridge, NULL);822822- if (ret) {823823- DRM_ERROR("Failed to attach bridge to drm\n");824824-821821+ if (dsi->bridge) {822822+ ret = drm_bridge_attach(&dsi->encoder, dsi->bridge, NULL);823823+ if (ret) {824824+ DRM_ERROR("Failed to attach bridge to drm\n");825825+ goto err_encoder_cleanup;826826+ }827827+ } else {825828 /* Otherwise create our own connector and attach to a panel */826829 ret = mtk_dsi_create_connector(drm, dsi);827830 if (ret)
+19-11
drivers/gpu/drm/nouveau/dispnv50/disp.c
···198198/******************************************************************************199199 * EVO channel helpers200200 *****************************************************************************/201201+static void202202+evo_flush(struct nv50_dmac *dmac)203203+{204204+ /* Push buffer fetches are not coherent with BAR1, we need to ensure205205+ * writes have been flushed right through to VRAM before writing PUT.206206+ */207207+ if (dmac->push.type & NVIF_MEM_VRAM) {208208+ struct nvif_device *device = dmac->base.device;209209+ nvif_wr32(&device->object, 0x070000, 0x00000001);210210+ nvif_msec(device, 2000,211211+ if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))212212+ break;213213+ );214214+ }215215+}216216+201217u32 *202218evo_wait(struct nv50_dmac *evoc, int nr)203219{···224208 mutex_lock(&dmac->lock);225209 if (put + nr >= (PAGE_SIZE / 4) - 8) {226210 dmac->ptr[put] = 0x20000000;211211+ evo_flush(dmac);227212228213 nvif_wr32(&dmac->base.user, 0x0000, 0x00000000);229214 if (nvif_msec(device, 2000,···247230{248231 struct nv50_dmac *dmac = evoc;249232250250- /* Push buffer fetches are not coherent with BAR1, we need to ensure251251- * writes have been flushed right through to VRAM before writing PUT.252252- */253253- if (dmac->push.type & NVIF_MEM_VRAM) {254254- struct nvif_device *device = dmac->base.device;255255- nvif_wr32(&device->object, 0x070000, 0x00000001);256256- nvif_msec(device, 2000,257257- if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))258258- break;259259- );260260- }233233+ evo_flush(dmac);261234262235 nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2);263236 mutex_unlock(&dmac->lock);···12711264{12721265 struct nv50_mstm *mstm = *pmstm;12731266 if (mstm) {12671267+ drm_dp_mst_topology_mgr_destroy(&mstm->mgr);12741268 kfree(*pmstm);12751269 *pmstm = NULL;12761270 }
···9696 drm_global_item_unref(&dev_priv->bo_global_ref.ref);9797 drm_global_item_unref(&dev_priv->mem_global_ref);9898}9999+100100+/* struct vmw_validation_mem callback */101101+static int vmw_vmt_reserve(struct vmw_validation_mem *m, size_t size)102102+{103103+ static struct ttm_operation_ctx ctx = {.interruptible = false,104104+ .no_wait_gpu = false};105105+ struct vmw_private *dev_priv = container_of(m, struct vmw_private, vvm);106106+107107+ return ttm_mem_global_alloc(vmw_mem_glob(dev_priv), size, &ctx);108108+}109109+110110+/* struct vmw_validation_mem callback */111111+static void vmw_vmt_unreserve(struct vmw_validation_mem *m, size_t size)112112+{113113+ struct vmw_private *dev_priv = container_of(m, struct vmw_private, vvm);114114+115115+ return ttm_mem_global_free(vmw_mem_glob(dev_priv), size);116116+}117117+118118+/**119119+ * vmw_validation_mem_init_ttm - Interface the validation memory tracker120120+ * to ttm.121121+ * @dev_priv: Pointer to struct vmw_private. The reason we choose a vmw private122122+ * rather than a struct vmw_validation_mem is to make sure assumption in the123123+ * callbacks that struct vmw_private derives from struct vmw_validation_mem124124+ * holds true.125125+ * @gran: The recommended allocation granularity126126+ */127127+void vmw_validation_mem_init_ttm(struct vmw_private *dev_priv, size_t gran)128128+{129129+ struct vmw_validation_mem *vvm = &dev_priv->vvm;130130+131131+ vvm->reserve_mem = vmw_vmt_reserve;132132+ vvm->unreserve_mem = vmw_vmt_unreserve;133133+ vvm->gran = gran;134134+}
+20-1
drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
···104104 return NULL;105105106106 if (ctx->mem_size_left < size) {107107- struct page *page = alloc_page(GFP_KERNEL | __GFP_ZERO);107107+ struct page *page;108108109109+ if (ctx->vm && ctx->vm_size_left < PAGE_SIZE) {110110+ int ret = ctx->vm->reserve_mem(ctx->vm, ctx->vm->gran);111111+112112+ if (ret)113113+ return NULL;114114+115115+ ctx->vm_size_left += ctx->vm->gran;116116+ ctx->total_mem += ctx->vm->gran;117117+ }118118+119119+ page = alloc_page(GFP_KERNEL | __GFP_ZERO);109120 if (!page)110121 return NULL;122122+123123+ if (ctx->vm)124124+ ctx->vm_size_left -= PAGE_SIZE;111125112126 list_add_tail(&page->lru, &ctx->page_list);113127 ctx->page_address = page_address(page);···152138 }153139154140 ctx->mem_size_left = 0;141141+ if (ctx->vm && ctx->total_mem) {142142+ ctx->vm->unreserve_mem(ctx->vm, ctx->total_mem);143143+ ctx->total_mem = 0;144144+ ctx->vm_size_left = 0;145145+ }155146}156147157148/**
+37
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h
···3434#include <drm/ttm/ttm_execbuf_util.h>35353636/**3737+ * struct vmw_validation_mem - Custom interface to provide memory reservations3838+ * for the validation code.3939+ * @reserve_mem: Callback to reserve memory4040+ * @unreserve_mem: Callback to unreserve memory4141+ * @gran: Reservation granularity. Contains a hint how much memory should4242+ * be reserved in each call to @reserve_mem(). A slow implementation may want4343+ * reservation to be done in large batches.4444+ */4545+struct vmw_validation_mem {4646+ int (*reserve_mem)(struct vmw_validation_mem *m, size_t size);4747+ void (*unreserve_mem)(struct vmw_validation_mem *m, size_t size);4848+ size_t gran;4949+};5050+5151+/**3752 * struct vmw_validation_context - Per command submission validation context3853 * @ht: Hash table used to find resource- or buffer object duplicates3954 * @resource_list: List head for resource validation metadata···6247 * buffer objects6348 * @mem_size_left: Free memory left in the last page in @page_list6449 * @page_address: Kernel virtual address of the last page in @page_list5050+ * @vm: A pointer to the memory reservation interface or NULL if no5151+ * memory reservation is needed.5252+ * @vm_size_left: Amount of reserved memory that so far has not been allocated.5353+ * @total_mem: Amount of reserved memory.6554 */6655struct vmw_validation_context {6756 struct drm_open_hash *ht;···7859 unsigned int merge_dups;7960 unsigned int mem_size_left;8061 u8 *page_address;6262+ struct vmw_validation_mem *vm;6363+ size_t vm_size_left;6464+ size_t total_mem;8165};82668367struct vmw_buffer_object;···12199vmw_validation_has_bos(struct vmw_validation_context *ctx)122100{123101 return !list_empty(&ctx->bo_list);102102+}103103+104104+/**105105+ * vmw_validation_set_val_mem - Register a validation mem object for106106+ * validation memory reservation107107+ * @ctx: The validation context108108+ * @vm: Pointer to a struct vmw_validation_mem109109+ *110110+ * Must be set before the first attempt to allocate validation memory.111111+ */112112+static inline void113113+vmw_validation_set_val_mem(struct vmw_validation_context *ctx,114114+ struct vmw_validation_mem *vm)115115+{116116+ ctx->vm = vm;124117}125118126119/**
···267267 struct net_device *cookie_ndev = cookie;268268 bool match = false;269269270270+ if (!rdma_ndev)271271+ return false;272272+270273 rcu_read_lock();271274 if (netif_is_bond_master(cookie_ndev) &&272275 rdma_is_upper_dev_rcu(rdma_ndev, cookie_ndev))
+2-1
drivers/infiniband/hw/hfi1/chip.c
···1250012500 }12501125011250212502 /* allocate space for the counter values */1250312503- dd->cntrs = kcalloc(dd->ndevcntrs, sizeof(u64), GFP_KERNEL);1250312503+ dd->cntrs = kcalloc(dd->ndevcntrs + num_driver_cntrs, sizeof(u64),1250412504+ GFP_KERNEL);1250412505 if (!dd->cntrs)1250512506 goto bail;1250612507
+2
drivers/infiniband/hw/hfi1/hfi.h
···155155extern struct hfi1_ib_stats hfi1_stats;156156extern const struct pci_error_handlers hfi1_pci_err_handler;157157158158+extern int num_driver_cntrs;159159+158160/*159161 * First-cut criterion for "device is active" is160162 * two thousand dwords combined Tx, Rx traffic per
+7
drivers/infiniband/hw/hfi1/qp.c
···340340 default:341341 break;342342 }343343+344344+ /*345345+ * System latency between send and schedule is large enough that346346+ * forcing call_send to true for piothreshold packets is necessary.347347+ */348348+ if (wqe->length <= piothreshold)349349+ *call_send = true;343350 return 0;344351}345352
+1-1
drivers/infiniband/hw/hfi1/verbs.c
···14791479static DEFINE_MUTEX(cntr_names_lock); /* protects the *_cntr_names bufers */14801480static const char **dev_cntr_names;14811481static const char **port_cntr_names;14821482-static int num_driver_cntrs = ARRAY_SIZE(driver_cntr_names);14821482+int num_driver_cntrs = ARRAY_SIZE(driver_cntr_names);14831483static int num_dev_cntrs;14841484static int num_port_cntrs;14851485static int cntr_names_initialized;
···110110111111 This is currently experimental.112112113113+config MEDIA_CONTROLLER_REQUEST_API114114+ bool "Enable Media controller Request API (EXPERIMENTAL)"115115+ depends on MEDIA_CONTROLLER && STAGING_MEDIA116116+ default n117117+ ---help---118118+ DO NOT ENABLE THIS OPTION UNLESS YOU KNOW WHAT YOU'RE DOING.119119+120120+ This option enables the Request API for the Media controller and V4L2121121+ interfaces. It is currently needed by a few stateless codec drivers.122122+123123+ There is currently no intention to provide API or ABI stability for124124+ this new API as of yet.125125+113126#114127# Video4Linux support115128# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
+35-9
drivers/media/common/videobuf2/videobuf2-core.c
···947947 }948948 atomic_dec(&q->owned_by_drv_count);949949950950- if (vb->req_obj.req) {950950+ if (state != VB2_BUF_STATE_QUEUED && vb->req_obj.req) {951951 /* This is not supported at the moment */952952 WARN_ON(state == VB2_BUF_STATE_REQUEUEING);953953 media_request_object_unbind(&vb->req_obj);···13591359{13601360 struct vb2_buffer *vb = container_of(obj, struct vb2_buffer, req_obj);1361136113621362- if (vb->state == VB2_BUF_STATE_IN_REQUEST)13621362+ if (vb->state == VB2_BUF_STATE_IN_REQUEST) {13631363 vb->state = VB2_BUF_STATE_DEQUEUED;13641364+ if (vb->request)13651365+ media_request_put(vb->request);13661366+ vb->request = NULL;13671367+ }13641368}1365136913661370static const struct media_request_object_ops vb2_core_req_ops = {···15321528 return ret;1533152915341530 vb->state = VB2_BUF_STATE_IN_REQUEST;15311531+15321532+ /*15331533+ * Increment the refcount and store the request.15341534+ * The request refcount is decremented again when the15351535+ * buffer is dequeued. This is to prevent vb2_buffer_done()15361536+ * from freeing the request from interrupt context, which can15371537+ * happen if the application closed the request fd after15381538+ * queueing the request.15391539+ */15401540+ media_request_get(req);15411541+ vb->request = req;15421542+15351543 /* Fill buffer information for the userspace */15361544 if (pb) {15371545 call_void_bufop(q, copy_timestamp, vb, pb);···17651749 call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv);17661750 vb->planes[i].dbuf_mapped = 0;17671751 }17681768- if (vb->req_obj.req) {17691769- media_request_object_unbind(&vb->req_obj);17701770- media_request_object_put(&vb->req_obj);17711771- }17721752 call_void_bufop(q, init_buffer, vb);17731753}17741754···1808179618091797 /* go back to dequeued state */18101798 __vb2_dqbuf(vb);17991799+18001800+ if (WARN_ON(vb->req_obj.req)) {18011801+ media_request_object_unbind(&vb->req_obj);18021802+ media_request_object_put(&vb->req_obj);18031803+ }18041804+ if (vb->request)18051805+ media_request_put(vb->request);18061806+ vb->request = NULL;1811180718121808 dprintk(2, "dqbuf of buffer %d, with state %d\n",18131809 vb->index, vb->state);···19231903 vb->prepared = false;19241904 }19251905 __vb2_dqbuf(vb);19061906+19071907+ if (vb->req_obj.req) {19081908+ media_request_object_unbind(&vb->req_obj);19091909+ media_request_object_put(&vb->req_obj);19101910+ }19111911+ if (vb->request)19121912+ media_request_put(vb->request);19131913+ vb->request = NULL;19261914 }19271915}19281916···19681940 if (ret)19691941 return ret;19701942 ret = vb2_start_streaming(q);19711971- if (ret) {19721972- __vb2_queue_cancel(q);19431943+ if (ret)19731944 return ret;19741974- }19751945 }1976194619771947 q->streaming = 1;
+9-4
drivers/media/common/videobuf2/videobuf2-v4l2.c
···333333}334334335335static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct media_device *mdev,336336- struct v4l2_buffer *b,337337- const char *opname,336336+ struct v4l2_buffer *b, bool is_prepare,338337 struct media_request **p_req)339338{339339+ const char *opname = is_prepare ? "prepare_buf" : "qbuf";340340 struct media_request *req;341341 struct vb2_v4l2_buffer *vbuf;342342 struct vb2_buffer *vb;···377377 if (ret)378378 return ret;379379 }380380+381381+ if (is_prepare)382382+ return 0;380383381384 if (!(b->flags & V4L2_BUF_FLAG_REQUEST_FD)) {382385 if (q->uses_requests) {···634631 *caps |= V4L2_BUF_CAP_SUPPORTS_USERPTR;635632 if (q->io_modes & VB2_DMABUF)636633 *caps |= V4L2_BUF_CAP_SUPPORTS_DMABUF;634634+#ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API637635 if (q->supports_requests)638636 *caps |= V4L2_BUF_CAP_SUPPORTS_REQUESTS;637637+#endif639638}640639641640int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)···662657 if (b->flags & V4L2_BUF_FLAG_REQUEST_FD)663658 return -EINVAL;664659665665- ret = vb2_queue_or_prepare_buf(q, mdev, b, "prepare_buf", NULL);660660+ ret = vb2_queue_or_prepare_buf(q, mdev, b, true, NULL);666661667662 return ret ? ret : vb2_core_prepare_buf(q, b->index, b);668663}···734729 return -EBUSY;735730 }736731737737- ret = vb2_queue_or_prepare_buf(q, mdev, b, "qbuf", &req);732732+ ret = vb2_queue_or_prepare_buf(q, mdev, b, false, &req);738733 if (ret)739734 return ret;740735 ret = vb2_core_qbuf(q, b->index, b, req);
+4
drivers/media/media-device.c
···381381static long media_device_request_alloc(struct media_device *mdev,382382 int *alloc_fd)383383{384384+#ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API384385 if (!mdev->ops || !mdev->ops->req_validate || !mdev->ops->req_queue)385386 return -ENOTTY;386387387388 return media_request_alloc(mdev, alloc_fd);389389+#else390390+ return -ENOTTY;391391+#endif388392}389393390394static long copy_arg_from_user(void *karg, void __user *uarg, unsigned int cmd)
···9595 format = vsp1_entity_get_pad_format(&lif->entity, lif->entity.config,9696 LIF_PAD_SOURCE);97979898- switch (entity->vsp1->version & VI6_IP_VERSION_SOC_MASK) {9898+ switch (entity->vsp1->version & VI6_IP_VERSION_MODEL_MASK) {9999 case VI6_IP_VERSION_MODEL_VSPD_GEN2:100100 case VI6_IP_VERSION_MODEL_VSPD_V2H:101101 hbth = 1536;
+2-2
drivers/media/v4l2-core/v4l2-ctrls.c
···15631563 u64 offset;15641564 s64 val;1565156515661566- switch (ctrl->type) {15661566+ switch ((u32)ctrl->type) {15671567 case V4L2_CTRL_TYPE_INTEGER:15681568 return ROUND_TO_RANGE(ptr.p_s32[idx], u32, ctrl);15691569 case V4L2_CTRL_TYPE_INTEGER64:···22322232 is_array = nr_of_dims > 0;2233223322342234 /* Prefill elem_size for all types handled by std_type_ops */22352235- switch (type) {22352235+ switch ((u32)type) {22362236 case V4L2_CTRL_TYPE_INTEGER64:22372237 elem_size = sizeof(s64);22382238 break;
+10-5
drivers/mmc/core/block.c
···472472static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,473473 struct mmc_blk_ioc_data *idata)474474{475475- struct mmc_command cmd = {};475475+ struct mmc_command cmd = {}, sbc = {};476476 struct mmc_data data = {};477477 struct mmc_request mrq = {};478478 struct scatterlist sg;···550550 }551551552552 if (idata->rpmb) {553553- err = mmc_set_blockcount(card, data.blocks,554554- idata->ic.write_flag & (1 << 31));555555- if (err)556556- return err;553553+ sbc.opcode = MMC_SET_BLOCK_COUNT;554554+ /*555555+ * We don't do any blockcount validation because the max size556556+ * may be increased by a future standard. We just copy the557557+ * 'Reliable Write' bit here.558558+ */559559+ sbc.arg = data.blocks | (idata->ic.write_flag & BIT(31));560560+ sbc.flags = MMC_RSP_R1 | MMC_CMD_AC;561561+ mrq.sbc = &sbc;557562 }558563559564 if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_SANITIZE_START) &&
+15-9
drivers/mmc/core/mmc.c
···3030#include "pwrseq.h"31313232#define DEFAULT_CMD6_TIMEOUT_MS 5003333+#define MIN_CACHE_EN_TIMEOUT_MS 160033343435static const unsigned int tran_exp[] = {3536 10000, 100000, 1000000, 10000000,···527526 card->cid.year += 16;528527529528 /* check whether the eMMC card supports BKOPS */530530- if (!mmc_card_broken_hpi(card) &&531531- ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) {529529+ if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) {532530 card->ext_csd.bkops = 1;533531 card->ext_csd.man_bkops_en =534532 (ext_csd[EXT_CSD_BKOPS_EN] &···17821782 if (err) {17831783 pr_warn("%s: Enabling HPI failed\n",17841784 mmc_hostname(card->host));17851785+ card->ext_csd.hpi_en = 0;17851786 err = 0;17861786- } else17871787+ } else {17871788 card->ext_csd.hpi_en = 1;17891789+ }17881790 }1789179117901792 /*17911791- * If cache size is higher than 0, this indicates17921792- * the existence of cache and it can be turned on.17931793+ * If cache size is higher than 0, this indicates the existence of cache17941794+ * and it can be turned on. Note that some eMMCs from Micron has been17951795+ * reported to need ~800 ms timeout, while enabling the cache after17961796+ * sudden power failure tests. Let's extend the timeout to a minimum of17971797+ * DEFAULT_CACHE_EN_TIMEOUT_MS and do it for all cards.17931798 */17941794- if (!mmc_card_broken_hpi(card) &&17951795- card->ext_csd.cache_size > 0) {17991799+ if (card->ext_csd.cache_size > 0) {18001800+ unsigned int timeout_ms = MIN_CACHE_EN_TIMEOUT_MS;18011801+18021802+ timeout_ms = max(card->ext_csd.generic_cmd6_time, timeout_ms);17961803 err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,17971797- EXT_CSD_CACHE_CTRL, 1,17981798- card->ext_csd.generic_cmd6_time);18041804+ EXT_CSD_CACHE_CTRL, 1, timeout_ms);17991805 if (err && err != -EBADMSG)18001806 goto free_card;18011807
+9-2
drivers/mmc/host/omap.c
···104104 unsigned int vdd;105105 u16 saved_con;106106 u16 bus_mode;107107+ u16 power_mode;107108 unsigned int fclk_freq;108109109110 struct tasklet_struct cover_tasklet;···11581157 struct mmc_omap_slot *slot = mmc_priv(mmc);11591158 struct mmc_omap_host *host = slot->host;11601159 int i, dsor;11611161- int clk_enabled;11601160+ int clk_enabled, init_stream;1162116111631162 mmc_omap_select_slot(slot, 0);11641163···11681167 slot->vdd = ios->vdd;1169116811701169 clk_enabled = 0;11701170+ init_stream = 0;11711171 switch (ios->power_mode) {11721172 case MMC_POWER_OFF:11731173 mmc_omap_set_power(slot, 0, ios->vdd);···11761174 case MMC_POWER_UP:11771175 /* Cannot touch dsor yet, just power up MMC */11781176 mmc_omap_set_power(slot, 1, ios->vdd);11771177+ slot->power_mode = ios->power_mode;11791178 goto exit;11801179 case MMC_POWER_ON:11811180 mmc_omap_fclk_enable(host, 1);11821181 clk_enabled = 1;11831182 dsor |= 1 << 11;11831183+ if (slot->power_mode != MMC_POWER_ON)11841184+ init_stream = 1;11841185 break;11851186 }11871187+ slot->power_mode = ios->power_mode;1186118811871189 if (slot->bus_mode != ios->bus_mode) {11881190 if (slot->pdata->set_bus_mode != NULL)···12021196 for (i = 0; i < 2; i++)12031197 OMAP_MMC_WRITE(host, CON, dsor);12041198 slot->saved_con = dsor;12051205- if (ios->power_mode == MMC_POWER_ON) {11991199+ if (init_stream) {12061200 /* worst case at 400kHz, 80 cycles makes 200 microsecs */12071201 int usecs = 250;12081202···12401234 slot->host = host;12411235 slot->mmc = mmc;12421236 slot->id = id;12371237+ slot->power_mode = MMC_POWER_UNDEFINED;12431238 slot->pdata = &host->pdata->slots[id];1244123912451240 host->slots[id] = slot;
+11-1
drivers/mmc/host/omap_hsmmc.c
···19091909 mmc->max_blk_size = 512; /* Block Length at max can be 1024 */19101910 mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */19111911 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;19121912- mmc->max_seg_size = mmc->max_req_size;1913191219141913 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |19151914 MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE | MMC_CAP_CMD23;···19371938 ret = PTR_ERR(host->tx_chan);19381939 goto err_irq;19391940 }19411941+19421942+ /*19431943+ * Limit the maximum segment size to the lower of the request size19441944+ * and the DMA engine device segment size limits. In reality, with19451945+ * 32-bit transfers, the DMA engine can do longer segments than this19461946+ * but there is no way to represent that in the DMA model - if we19471947+ * increase this figure here, we get warnings from the DMA API debug.19481948+ */19491949+ mmc->max_seg_size = min3(mmc->max_req_size,19501950+ dma_get_max_seg_size(host->rx_chan->device->dev),19511951+ dma_get_max_seg_size(host->tx_chan->device->dev));1940195219411953 /* Request IRQ for MMC operations */19421954 ret = devm_request_irq(&pdev->dev, host->irq, omap_hsmmc_irq, 0,
···15431543 netdev_info(netdev, "set new mac address %pM\n", addr->sa_data);1544154415451545 /* Copy the address first, so that we avoid a possible race with15461546- * .set_rx_mode(). If we copy after changing the address in the filter15471547- * list, we might open ourselves to a narrow race window where15481548- * .set_rx_mode could delete our dev_addr filter and prevent traffic15491549- * from passing.15461546+ * .set_rx_mode().15471547+ * - Remove old address from MAC filter15481548+ * - Copy new address15491549+ * - Add new address to MAC filter15501550 */15511551- ether_addr_copy(netdev->dev_addr, addr->sa_data);15521552-15531551 spin_lock_bh(&vsi->mac_filter_hash_lock);15541552 i40e_del_mac_filter(vsi, netdev->dev_addr);15551555- i40e_add_mac_filter(vsi, addr->sa_data);15531553+ ether_addr_copy(netdev->dev_addr, addr->sa_data);15541554+ i40e_add_mac_filter(vsi, netdev->dev_addr);15561555 spin_unlock_bh(&vsi->mac_filter_hash_lock);15561556+15571557 if (vsi->type == I40E_VSI_MAIN) {15581558 i40e_status ret;15591559
+12-31
drivers/net/ethernet/intel/i40e/i40e_txrx.c
···15591559}1560156015611561/**15621562- * i40e_receive_skb - Send a completed packet up the stack15631563- * @rx_ring: rx ring in play15641564- * @skb: packet to send up15651565- * @vlan_tag: vlan tag for packet15661566- **/15671567-void i40e_receive_skb(struct i40e_ring *rx_ring,15681568- struct sk_buff *skb, u16 vlan_tag)15691569-{15701570- struct i40e_q_vector *q_vector = rx_ring->q_vector;15711571-15721572- if ((rx_ring->netdev->features & NETIF_F_HW_VLAN_CTAG_RX) &&15731573- (vlan_tag & VLAN_VID_MASK))15741574- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);15751575-15761576- napi_gro_receive(&q_vector->napi, skb);15771577-}15781578-15791579-/**15801562 * i40e_alloc_rx_buffers - Replace used receive buffers15811563 * @rx_ring: ring to place buffers on15821564 * @cleaned_count: number of buffers to replace···17751793 * other fields within the skb.17761794 **/17771795void i40e_process_skb_fields(struct i40e_ring *rx_ring,17781778- union i40e_rx_desc *rx_desc, struct sk_buff *skb,17791779- u8 rx_ptype)17961796+ union i40e_rx_desc *rx_desc, struct sk_buff *skb)17801797{17811798 u64 qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);17821799 u32 rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >>···17831802 u32 tsynvalid = rx_status & I40E_RXD_QW1_STATUS_TSYNVALID_MASK;17841803 u32 tsyn = (rx_status & I40E_RXD_QW1_STATUS_TSYNINDX_MASK) >>17851804 I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT;18051805+ u8 rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>18061806+ I40E_RXD_QW1_PTYPE_SHIFT;1786180717871808 if (unlikely(tsynvalid))17881809 i40e_ptp_rx_hwtstamp(rx_ring->vsi->back, skb, tsyn);···17941811 i40e_rx_checksum(rx_ring->vsi, skb, rx_desc);1795181217961813 skb_record_rx_queue(skb, rx_ring->queue_index);18141814+18151815+ if (qword & BIT(I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)) {18161816+ u16 vlan_tag = rx_desc->wb.qword0.lo_dword.l2tag1;18171817+18181818+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),18191819+ le16_to_cpu(vlan_tag));18201820+ }1797182117981822 /* modifies the skb - consumes the enet header */17991823 skb->protocol = eth_type_trans(skb, rx_ring->netdev);···23402350 struct i40e_rx_buffer *rx_buffer;23412351 union i40e_rx_desc *rx_desc;23422352 unsigned int size;23432343- u16 vlan_tag;23442344- u8 rx_ptype;23452353 u64 qword;2346235423472355 /* return some buffers to hardware, one at a time is too slow */···24322444 /* probably a little skewed due to removing CRC */24332445 total_rx_bytes += skb->len;2434244624352435- qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);24362436- rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>24372437- I40E_RXD_QW1_PTYPE_SHIFT;24382438-24392447 /* populate checksum, VLAN, and protocol */24402440- i40e_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype);24412441-24422442- vlan_tag = (qword & BIT(I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)) ?24432443- le16_to_cpu(rx_desc->wb.qword0.lo_dword.l2tag1) : 0;24482448+ i40e_process_skb_fields(rx_ring, rx_desc, skb);2444244924452450 i40e_trace(clean_rx_irq_rx, rx_ring, rx_desc, skb);24462446- i40e_receive_skb(rx_ring, skb, vlan_tag);24512451+ napi_gro_receive(&rx_ring->q_vector->napi, skb);24472452 skb = NULL;2448245324492454 /* update budget accounting */
···345345 !(tcp_flags & (TCPHDR_FIN | TCPHDR_SYN | TCPHDR_RST)))346346 return -EOPNOTSUPP;347347348348- /* We need to store TCP flags in the IPv4 key space, thus349349- * we need to ensure we include a IPv4 key layer if we have350350- * not done so already.348348+ /* We need to store TCP flags in the either the IPv4 or IPv6 key349349+ * space, thus we need to ensure we include a IPv4/IPv6 key350350+ * layer if we have not done so already.351351 */352352- if (!(key_layer & NFP_FLOWER_LAYER_IPV4)) {353353- key_layer |= NFP_FLOWER_LAYER_IPV4;354354- key_size += sizeof(struct nfp_flower_ipv4);352352+ if (!key_basic)353353+ return -EOPNOTSUPP;354354+355355+ if (!(key_layer & NFP_FLOWER_LAYER_IPV4) &&356356+ !(key_layer & NFP_FLOWER_LAYER_IPV6)) {357357+ switch (key_basic->n_proto) {358358+ case cpu_to_be16(ETH_P_IP):359359+ key_layer |= NFP_FLOWER_LAYER_IPV4;360360+ key_size += sizeof(struct nfp_flower_ipv4);361361+ break;362362+363363+ case cpu_to_be16(ETH_P_IPV6):364364+ key_layer |= NFP_FLOWER_LAYER_IPV6;365365+ key_size += sizeof(struct nfp_flower_ipv6);366366+ break;367367+368368+ default:369369+ return -EOPNOTSUPP;370370+ }355371 }356372 }357373
···492492 !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])493493 return -EINVAL;494494495495- if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX + 1,495495+ if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX,496496 info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],497497 hwsim_edge_policy, NULL))498498 return -EINVAL;···542542 !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])543543 return -EINVAL;544544545545- if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX + 1,545545+ if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX,546546 info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],547547 hwsim_edge_policy, NULL))548548 return -EINVAL;
+2-5
drivers/net/phy/phy_device.c
···308308 if (ret < 0)309309 return ret;310310311311- /* The PHY needs to renegotiate. */312312- phydev->link = 0;313313- phydev->state = PHY_UP;314314-315315- phy_start_machine(phydev);311311+ if (phydev->attached_dev && phydev->adjust_link)312312+ phy_start_machine(phydev);316313317314 return 0;318315}
+16-2
drivers/net/usb/hso.c
···28072807 return -EIO;28082808 }2809280928102810+ /* check if we have a valid interface */28112811+ if (if_num > 16) {28122812+ kfree(config_data);28132813+ return -EINVAL;28142814+ }28152815+28102816 switch (config_data[if_num]) {28112817 case 0x0:28122818 result = 0;···2883287728842878 /* Get the interface/port specification from either driver_info or from28852879 * the device itself */28862886- if (id->driver_info)28802880+ if (id->driver_info) {28812881+ /* if_num is controlled by the device, driver_info is a 0 terminated28822882+ * array. Make sure, the access is in bounds! */28832883+ for (i = 0; i <= if_num; ++i)28842884+ if (((u32 *)(id->driver_info))[i] == 0)28852885+ goto exit;28872886 port_spec = ((u32 *)(id->driver_info))[if_num];28882888- else28872887+ } else {28892888 port_spec = hso_get_config_data(interface);28892889+ if (port_spec < 0)28902890+ goto exit;28912891+ }2890289228912893 /* Check if we need to switch to alt interfaces prior to port28922894 * configuration */
+4
drivers/net/usb/lan78xx.c
···23202320 ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);23212321 ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);2322232223232323+ /* Added to support MAC address changes */23242324+ ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);23252325+ ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);23262326+23232327 return 0;23242328}23252329
···129129#define USB_UPS_CTRL 0xd800130130#define USB_POWER_CUT 0xd80a131131#define USB_MISC_0 0xd81a132132+#define USB_MISC_1 0xd81f132133#define USB_AFE_CTRL2 0xd824133134#define USB_UPS_CFG 0xd842134135#define USB_UPS_FLAGS 0xd848···556555557556/* MAC PASSTHRU */558557#define AD_MASK 0xfee0558558+#define BND_MASK 0x0004559559#define EFUSE 0xcfdb560560#define PASS_THRU_MASK 0x1561561···11521150 return ret;11531151}1154115211551155-/* Devices containing RTL8153-AD can support a persistent11531153+/* Devices containing proper chips can support a persistent11561154 * host system provided MAC address.11571155 * Examples of this are Dell TB15 and Dell WD15 docks11581156 */···1167116511681166 /* test for -AD variant of RTL8153 */11691167 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0);11701170- if ((ocp_data & AD_MASK) != 0x1000)11711171- return -ENODEV;11721172-11731173- /* test for MAC address pass-through bit */11741174- ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, EFUSE);11751175- if ((ocp_data & PASS_THRU_MASK) != 1)11761176- return -ENODEV;11681168+ if ((ocp_data & AD_MASK) == 0x1000) {11691169+ /* test for MAC address pass-through bit */11701170+ ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, EFUSE);11711171+ if ((ocp_data & PASS_THRU_MASK) != 1) {11721172+ netif_dbg(tp, probe, tp->netdev,11731173+ "No efuse for RTL8153-AD MAC pass through\n");11741174+ return -ENODEV;11751175+ }11761176+ } else {11771177+ /* test for RTL8153-BND */11781178+ ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1);11791179+ if ((ocp_data & BND_MASK) == 0) {11801180+ netif_dbg(tp, probe, tp->netdev,11811181+ "Invalid variant for MAC pass through\n");11821182+ return -ENODEV;11831183+ }11841184+ }1177118511781186 /* returns _AUXMAC_#AABBCCDDEEFF# */11791187 status = acpi_evaluate_object(NULL, "\\_SB.AMAC", NULL, &buffer);···12291217 if (tp->version == RTL_VER_01) {12301218 ret = pla_ocp_read(tp, PLA_IDR, 8, sa.sa_data);12311219 } else {12321232- /* if this is not an RTL8153-AD, no eFuse mac pass thru set,12331233- * or system doesn't provide valid _SB.AMAC this will be12341234- * be expected to non-zero12201220+ /* if device doesn't support MAC pass through this will12211221+ * be expected to be non-zero12351222 */12361223 ret = vendor_mac_passthru_addr_read(tp, &sa);12371224 if (ret < 0)
+14-7
drivers/net/vxlan.c
···568568 rd->remote_port = port;569569 rd->remote_vni = vni;570570 rd->remote_ifindex = ifindex;571571+ rd->offloaded = false;571572 return 1;572573}573574···32593258 struct vxlan_net *vn = net_generic(net, vxlan_net_id);32603259 struct vxlan_dev *vxlan = netdev_priv(dev);32613260 struct vxlan_fdb *f = NULL;32613261+ bool unregister = false;32623262 int err;3263326332643264 err = vxlan_dev_configure(net, dev, conf, false, extack);···32853283 err = register_netdevice(dev);32863284 if (err)32873285 goto errout;32863286+ unregister = true;3288328732893288 err = rtnl_configure_link(dev, NULL);32903290- if (err) {32913291- unregister_netdevice(dev);32893289+ if (err)32923290 goto errout;32933293- }3294329132953292 /* notify default fdb entry */32963293 if (f)···3297329632983297 list_add(&vxlan->next, &vn->vxlan_list);32993298 return 0;32993299+33003300errout:33013301+ /* unregister_netdevice() destroys the default FDB entry with deletion33023302+ * notification. But the addition notification was not sent yet, so33033303+ * destroy the entry by hand here.33043304+ */33013305 if (f)33023306 vxlan_fdb_destroy(vxlan, f, false);33073307+ if (unregister)33083308+ unregister_netdevice(dev);33033309 return err;33043310}33053311···35423534 struct vxlan_rdst *dst = &vxlan->default_dst;35433535 struct vxlan_rdst old_dst;35443536 struct vxlan_config conf;35453545- struct vxlan_fdb *f = NULL;35463537 int err;3547353835483539 err = vxlan_nl2conf(tb, data,···35673560 old_dst.remote_ifindex, 0);3568356135693562 if (!vxlan_addr_any(&dst->remote_ip)) {35703570- err = vxlan_fdb_create(vxlan, all_zeros_mac,35633563+ err = vxlan_fdb_update(vxlan, all_zeros_mac,35713564 &dst->remote_ip,35723565 NUD_REACHABLE | NUD_PERMANENT,35663566+ NLM_F_APPEND | NLM_F_CREATE,35733567 vxlan->cfg.dst_port,35743568 dst->remote_vni,35753569 dst->remote_vni,35763570 dst->remote_ifindex,35773577- NTF_SELF, &f);35713571+ NTF_SELF);35783572 if (err) {35793573 spin_unlock_bh(&vxlan->hash_lock);35803574 return err;35813575 }35823582- vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_NEWNEIGH);35833576 }35843577 spin_unlock_bh(&vxlan->hash_lock);35853578 }
+28
drivers/net/wireless/ath/ath10k/core.c
···24182418 return 0;24192419}2420242024212421+static int ath10k_core_compat_services(struct ath10k *ar)24222422+{24232423+ struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file;24242424+24252425+ /* all 10.x firmware versions support thermal throttling but don't24262426+ * advertise the support via service flags so we have to hardcode24272427+ * it here24282428+ */24292429+ switch (fw_file->wmi_op_version) {24302430+ case ATH10K_FW_WMI_OP_VERSION_10_1:24312431+ case ATH10K_FW_WMI_OP_VERSION_10_2:24322432+ case ATH10K_FW_WMI_OP_VERSION_10_2_4:24332433+ case ATH10K_FW_WMI_OP_VERSION_10_4:24342434+ set_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map);24352435+ break;24362436+ default:24372437+ break;24382438+ }24392439+24402440+ return 0;24412441+}24422442+24212443int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,24222444 const struct ath10k_fw_components *fw)24232445{···26362614 status = ath10k_wmi_wait_for_unified_ready(ar);26372615 if (status) {26382616 ath10k_err(ar, "wmi unified ready event not received\n");26172617+ goto err_hif_stop;26182618+ }26192619+26202620+ status = ath10k_core_compat_services(ar);26212621+ if (status) {26222622+ ath10k_err(ar, "compat services failed: %d\n", status);26392623 goto err_hif_stop;26402624 }26412625
···205205 WMI_SERVICE_SPOOF_MAC_SUPPORT,206206 WMI_SERVICE_TX_DATA_ACK_RSSI,207207 WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,208208+ WMI_SERVICE_THERM_THROT,208209209210 /* keep last */210211 WMI_SERVICE_MAX,
+9
drivers/net/wireless/intel/iwlwifi/mvm/fw.c
···881881 int ret, i, j;882882 u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);883883884884+ /*885885+ * This command is not supported on earlier firmware versions.886886+ * Unfortunately, we don't have a TLV API flag to rely on, so887887+ * rely on the major version which is in the first byte of888888+ * ucode_ver.889889+ */890890+ if (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) < 41)891891+ return 0;892892+884893 ret = iwl_mvm_sar_get_wgds_table(mvm);885894 if (ret < 0) {886895 IWL_DEBUG_RADIO(mvm,
···48864886 fcport->d_id = e->u.new_sess.id;48874887 fcport->flags |= FCF_FABRIC_DEVICE;48884888 fcport->fw_login_state = DSC_LS_PLOGI_PEND;48894889- if (e->u.new_sess.fc4_type & FS_FC4TYPE_FCP)48894889+ if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)48904890 fcport->fc4_type = FC4_TYPE_FCP_SCSI;4891489148924892- if (e->u.new_sess.fc4_type & FS_FC4TYPE_NVME) {48924892+ if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {48934893 fcport->fc4_type = FC4_TYPE_OTHER;48944894 fcport->fc4f_nvme = FC4_TYPE_NVME;48954895 }
+1
drivers/staging/media/sunxi/cedrus/Kconfig
···33 depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER44 depends on HAS_DMA55 depends on OF66+ depends on MEDIA_CONTROLLER_REQUEST_API67 select SUNXI_SRAM78 select VIDEOBUF2_DMA_CONTIG89 select V4L2_MEM2MEM_DEV
+2-2
drivers/staging/media/sunxi/cedrus/cedrus_hw.c
···255255256256 res = platform_get_resource(dev->pdev, IORESOURCE_MEM, 0);257257 dev->base = devm_ioremap_resource(dev->dev, res);258258- if (!dev->base) {258258+ if (IS_ERR(dev->base)) {259259 v4l2_err(&dev->v4l2_dev, "Failed to map registers\n");260260261261- ret = -ENOMEM;261261+ ret = PTR_ERR(dev->base);262262 goto err_sram;263263 }264264
···241241 sensor->t0 = TS1_T0_VAL1;242242243243 /* Retrieve fmt0 and put it on Hz */244244- sensor->fmt0 = ADJUST * readl_relaxed(sensor->base + DTS_T0VALR1_OFFSET)245245- & TS1_FMT0_MASK;244244+ sensor->fmt0 = ADJUST * (readl_relaxed(sensor->base +245245+ DTS_T0VALR1_OFFSET) & TS1_FMT0_MASK);246246247247 /* Retrieve ramp coefficient */248248 sensor->ramp_coeff = readl_relaxed(sensor->base + DTS_RAMPVALR_OFFSET) &···532532 if (ret)533533 return ret;534534535535+ ret = stm_thermal_read_factory_settings(sensor);536536+ if (ret)537537+ goto thermal_unprepare;538538+535539 ret = stm_thermal_calibration(sensor);536540 if (ret)537541 goto thermal_unprepare;···639635640636 /* Populate sensor */641637 sensor->base = base;642642-643643- ret = stm_thermal_read_factory_settings(sensor);644644- if (ret)645645- return ret;646638647639 sensor->clk = devm_clk_get(&pdev->dev, "pclk");648640 if (IS_ERR(sensor->clk)) {
+2-1
drivers/usb/host/xhci-hub.c
···15511551 portsc_buf[port_index] = 0;1552155215531553 /* Bail out if a USB3 port has a new device in link training */15541554- if ((t1 & PORT_PLS_MASK) == XDEV_POLLING) {15541554+ if ((hcd->speed >= HCD_USB3) &&15551555+ (t1 & PORT_PLS_MASK) == XDEV_POLLING) {15551556 bus_state->bus_suspended = 0;15561557 spin_unlock_irqrestore(&xhci->lock, flags);15571558 xhci_dbg(xhci, "Bus suspend bailout, port in polling\n");
+2-2
drivers/usb/host/xhci.h
···18541854 struct xhci_hub usb3_rhub;18551855 /* support xHCI 1.0 spec USB2 hardware LPM */18561856 unsigned hw_lpm_support:1;18571857+ /* Broken Suspend flag for SNPS Suspend resume issue */18581858+ unsigned broken_suspend:1;18571859 /* cached usb2 extened protocol capabilites */18581860 u32 *ext_caps;18591861 unsigned int num_ext_caps;···18731871 void *dbc;18741872 /* platform-specific data -- must come last */18751873 unsigned long priv[0] __aligned(sizeof(s64));18761876- /* Broken Suspend flag for SNPS Suspend resume issue */18771877- u8 broken_suspend;18781874};1879187518801876/* Platform specific overrides to generic XHCI hc_driver ops */
···513513 struct socket *sock;514514 struct vhost_virtqueue *vq = poll_rx ? tvq : rvq;515515516516- mutex_lock_nested(&vq->mutex, poll_rx ? VHOST_NET_VQ_TX: VHOST_NET_VQ_RX);516516+ /* Try to hold the vq mutex of the paired virtqueue. We can't517517+ * use mutex_lock() here since we could not guarantee a518518+ * consistenet lock ordering.519519+ */520520+ if (!mutex_trylock(&vq->mutex))521521+ return;522522+517523 vhost_disable_notify(&net->dev, vq);518524 sock = rvq->private_data;519525
+19-4
drivers/vhost/vhost.c
···295295{296296 int i;297297298298- for (i = 0; i < d->nvqs; ++i) {299299- mutex_lock(&d->vqs[i]->mutex);298298+ for (i = 0; i < d->nvqs; ++i)300299 __vhost_vq_meta_reset(d->vqs[i]);301301- mutex_unlock(&d->vqs[i]->mutex);302302- }303300}304301305302static void vhost_vq_reset(struct vhost_dev *dev,···892895#define vhost_get_used(vq, x, ptr) \893896 vhost_get_user(vq, x, ptr, VHOST_ADDR_USED)894897898898+static void vhost_dev_lock_vqs(struct vhost_dev *d)899899+{900900+ int i = 0;901901+ for (i = 0; i < d->nvqs; ++i)902902+ mutex_lock_nested(&d->vqs[i]->mutex, i);903903+}904904+905905+static void vhost_dev_unlock_vqs(struct vhost_dev *d)906906+{907907+ int i = 0;908908+ for (i = 0; i < d->nvqs; ++i)909909+ mutex_unlock(&d->vqs[i]->mutex);910910+}911911+895912static int vhost_new_umem_range(struct vhost_umem *umem,896913 u64 start, u64 size, u64 end,897914 u64 userspace_addr, int perm)···987976 int ret = 0;988977989978 mutex_lock(&dev->mutex);979979+ vhost_dev_lock_vqs(dev);990980 switch (msg->type) {991981 case VHOST_IOTLB_UPDATE:992982 if (!dev->iotlb) {···10211009 break;10221010 }1023101110121012+ vhost_dev_unlock_vqs(dev);10241013 mutex_unlock(&dev->mutex);1025101410261015 return ret;···22332220 return -EFAULT;22342221 }22352222 if (unlikely(vq->log_used)) {22232223+ /* Make sure used idx is seen before log. */22242224+ smp_wmb();22362225 /* Log used index update. */22372226 log_write(vq->log_base,22382227 vq->log_addr + offsetof(struct vring_used, idx),
+35-6
drivers/video/backlight/pwm_bl.c
···562562 goto err_alloc;563563 }564564565565- if (!data->levels) {565565+ if (data->levels) {566566+ /*567567+ * For the DT case, only when brightness levels is defined568568+ * data->levels is filled. For the non-DT case, data->levels569569+ * can come from platform data, however is not usual.570570+ */571571+ for (i = 0; i <= data->max_brightness; i++) {572572+ if (data->levels[i] > pb->scale)573573+ pb->scale = data->levels[i];574574+575575+ pb->levels = data->levels;576576+ }577577+ } else if (!data->max_brightness) {578578+ /*579579+ * If no brightness levels are provided and max_brightness is580580+ * not set, use the default brightness table. For the DT case,581581+ * max_brightness is set to 0 when brightness levels is not582582+ * specified. For the non-DT case, max_brightness is usually583583+ * set to some value.584584+ */585585+586586+ /* Get the PWM period (in nanoseconds) */587587+ pwm_get_state(pb->pwm, &state);588588+566589 ret = pwm_backlight_brightness_default(&pdev->dev, data,567590 state.period);568591 if (ret < 0) {···593570 "failed to setup default brightness table\n");594571 goto err_alloc;595572 }596596- }597573598598- for (i = 0; i <= data->max_brightness; i++) {599599- if (data->levels[i] > pb->scale)600600- pb->scale = data->levels[i];574574+ for (i = 0; i <= data->max_brightness; i++) {575575+ if (data->levels[i] > pb->scale)576576+ pb->scale = data->levels[i];601577602602- pb->levels = data->levels;578578+ pb->levels = data->levels;579579+ }580580+ } else {581581+ /*582582+ * That only happens for the non-DT case, where platform data583583+ * sets the max_brightness value.584584+ */585585+ pb->scale = data->max_brightness;603586 }604587605588 pb->lth_brightness = data->lth_brightness * (state.period / pb->scale);
+2
fs/aio.c
···45454646#include <asm/kmap_types.h>4747#include <linux/uaccess.h>4848+#include <linux/nospec.h>48494950#include "internal.h"5051···10391038 if (!table || id >= table->nr)10401039 goto out;1041104010411041+ id = array_index_nospec(id, table->nr);10421042 ctx = rcu_dereference(table->table[id]);10431043 if (ctx && ctx->user_id == ctx_id) {10441044 if (percpu_ref_tryget_live(&ctx->users))
+2-2
fs/ceph/super.c
···563563 seq_puts(m, ",noacl");564564#endif565565566566- if (fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM)567567- seq_puts(m, ",nocopyfrom");566566+ if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0)567567+ seq_puts(m, ",copyfrom");568568569569 if (fsopt->mds_namespace)570570 seq_show_option(m, "mds_namespace", fsopt->mds_namespace);
+3-1
fs/ceph/super.h
···4242#define CEPH_MOUNT_OPT_NOQUOTADF (1<<13) /* no root dir quota in statfs */4343#define CEPH_MOUNT_OPT_NOCOPYFROM (1<<14) /* don't use RADOS 'copy-from' op */44444545-#define CEPH_MOUNT_OPT_DEFAULT CEPH_MOUNT_OPT_DCACHE4545+#define CEPH_MOUNT_OPT_DEFAULT \4646+ (CEPH_MOUNT_OPT_DCACHE | \4747+ CEPH_MOUNT_OPT_NOCOPYFROM)46484749#define ceph_set_mount_opt(fsc, opt) \4850 (fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt;
···754754 goto out;755755 }756756757757- /* Otherwise, get a connected non-upper dir or disconnected non-dir */758758- if (d_is_dir(origin.dentry) &&759759- (origin.dentry->d_flags & DCACHE_DISCONNECTED)) {757757+ /* Find origin.dentry again with ovl_acceptable() layer check */758758+ if (d_is_dir(origin.dentry)) {760759 dput(origin.dentry);761760 origin.dentry = NULL;762761 err = ovl_check_origin_fh(ofs, fh, true, NULL, &stack);···768769 goto out_err;769770 }770771772772+ /* Get a connected non-upper dir or disconnected non-dir */771773 dentry = ovl_get_dentry(sb, NULL, &origin, index);772774773775out:
+4-13
fs/overlayfs/inode.c
···286286 if (err)287287 return err;288288289289- /* No need to do any access on underlying for special files */290290- if (special_file(realinode->i_mode))291291- return 0;292292-293293- /* No need to access underlying for execute */294294- mask &= ~MAY_EXEC;295295- if ((mask & (MAY_READ | MAY_WRITE)) == 0)296296- return 0;297297-298298- /* Lower files get copied up, so turn write access into read */299299- if (!upperinode && mask & MAY_WRITE) {289289+ old_cred = ovl_override_creds(inode->i_sb);290290+ if (!upperinode &&291291+ !special_file(realinode->i_mode) && mask & MAY_WRITE) {300292 mask &= ~(MAY_WRITE | MAY_APPEND);293293+ /* Make sure mounter can read file for copy up later */301294 mask |= MAY_READ;302295 }303303-304304- old_cred = ovl_override_creds(inode->i_sb);305296 err = inode_permission(realinode, mask);306297 revert_creds(old_cred);307298
···861861extern int bpf_jit_enable;862862extern int bpf_jit_harden;863863extern int bpf_jit_kallsyms;864864-extern int bpf_jit_limit;864864+extern long bpf_jit_limit;865865866866typedef void (*bpf_jit_fill_hole_t)(void *area, unsigned int size);867867
···206206#endif207207} _struct_page_alignment;208208209209+/*210210+ * Used for sizing the vmemmap region on some architectures211211+ */212212+#define STRUCT_PAGE_MAX_SHIFT (order_base_2(sizeof(struct page)))213213+209214#define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK)210215#define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE)211216
···565565/**566566 * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus567567 * @phy_id: The result of568568- * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask568568+ * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&MII_PHYSID2)) & @phy_id_mask569569 * for this PHY type570570 * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0571571 * is used to terminate an array of struct mdio_device_id.
-12
include/linux/netfilter/nfnetlink.h
···6262}6363#endif /* CONFIG_PROVE_LOCKING */64646565-/*6666- * nfnl_dereference - fetch RCU pointer when updates are prevented by subsys mutex6767- *6868- * @p: The pointer to read, prior to dereferencing6969- * @ss: The nfnetlink subsystem ID7070- *7171- * Return the value of the specified RCU-protected pointer, but omit7272- * the READ_ONCE(), because caller holds the NFNL subsystem mutex.7373- */7474-#define nfnl_dereference(p, ss) \7575- rcu_dereference_protected(p, lockdep_nfnl_is_held(ss))7676-7765#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \7866 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))7967
···554554}555555556556/**557557+ * xa_cmpxchg_bh() - Conditionally replace an entry in the XArray.558558+ * @xa: XArray.559559+ * @index: Index into array.560560+ * @old: Old value to test against.561561+ * @entry: New value to place in array.562562+ * @gfp: Memory allocation flags.563563+ *564564+ * This function is like calling xa_cmpxchg() except it disables softirqs565565+ * while holding the array lock.566566+ *567567+ * Context: Any context. Takes and releases the xa_lock while568568+ * disabling softirqs. May sleep if the @gfp flags permit.569569+ * Return: The old value at this index or xa_err() if an error happened.570570+ */571571+static inline void *xa_cmpxchg_bh(struct xarray *xa, unsigned long index,572572+ void *old, void *entry, gfp_t gfp)573573+{574574+ void *curr;575575+576576+ xa_lock_bh(xa);577577+ curr = __xa_cmpxchg(xa, index, old, entry, gfp);578578+ xa_unlock_bh(xa);579579+580580+ return curr;581581+}582582+583583+/**584584+ * xa_cmpxchg_irq() - Conditionally replace an entry in the XArray.585585+ * @xa: XArray.586586+ * @index: Index into array.587587+ * @old: Old value to test against.588588+ * @entry: New value to place in array.589589+ * @gfp: Memory allocation flags.590590+ *591591+ * This function is like calling xa_cmpxchg() except it disables interrupts592592+ * while holding the array lock.593593+ *594594+ * Context: Process context. Takes and releases the xa_lock while595595+ * disabling interrupts. May sleep if the @gfp flags permit.596596+ * Return: The old value at this index or xa_err() if an error happened.597597+ */598598+static inline void *xa_cmpxchg_irq(struct xarray *xa, unsigned long index,599599+ void *old, void *entry, gfp_t gfp)600600+{601601+ void *curr;602602+603603+ xa_lock_irq(xa);604604+ curr = __xa_cmpxchg(xa, index, old, entry, gfp);605605+ xa_unlock_irq(xa);606606+607607+ return curr;608608+}609609+610610+/**557611 * xa_insert() - Store this entry in the XArray unless another entry is558612 * already present.559613 * @xa: XArray.
+86
include/media/mpeg2-ctrls.h
···11+/* SPDX-License-Identifier: GPL-2.0 */22+/*33+ * These are the MPEG2 state controls for use with stateless MPEG-244+ * codec drivers.55+ *66+ * It turns out that these structs are not stable yet and will undergo77+ * more changes. So keep them private until they are stable and ready to88+ * become part of the official public API.99+ */1010+1111+#ifndef _MPEG2_CTRLS_H_1212+#define _MPEG2_CTRLS_H_1313+1414+#define V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (V4L2_CID_MPEG_BASE+250)1515+#define V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (V4L2_CID_MPEG_BASE+251)1616+1717+/* enum v4l2_ctrl_type type values */1818+#define V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS 0x01031919+#define V4L2_CTRL_TYPE_MPEG2_QUANTIZATION 0x01042020+2121+#define V4L2_MPEG2_PICTURE_CODING_TYPE_I 12222+#define V4L2_MPEG2_PICTURE_CODING_TYPE_P 22323+#define V4L2_MPEG2_PICTURE_CODING_TYPE_B 32424+#define V4L2_MPEG2_PICTURE_CODING_TYPE_D 42525+2626+struct v4l2_mpeg2_sequence {2727+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence header */2828+ __u16 horizontal_size;2929+ __u16 vertical_size;3030+ __u32 vbv_buffer_size;3131+3232+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence extension */3333+ __u8 profile_and_level_indication;3434+ __u8 progressive_sequence;3535+ __u8 chroma_format;3636+ __u8 pad;3737+};3838+3939+struct v4l2_mpeg2_picture {4040+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture header */4141+ __u8 picture_coding_type;4242+4343+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture coding extension */4444+ __u8 f_code[2][2];4545+ __u8 intra_dc_precision;4646+ __u8 picture_structure;4747+ __u8 top_field_first;4848+ __u8 frame_pred_frame_dct;4949+ __u8 concealment_motion_vectors;5050+ __u8 q_scale_type;5151+ __u8 intra_vlc_format;5252+ __u8 alternate_scan;5353+ __u8 repeat_first_field;5454+ __u8 progressive_frame;5555+ __u8 pad;5656+};5757+5858+struct v4l2_ctrl_mpeg2_slice_params {5959+ __u32 bit_size;6060+ __u32 data_bit_offset;6161+6262+ struct v4l2_mpeg2_sequence sequence;6363+ struct v4l2_mpeg2_picture picture;6464+6565+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Slice */6666+ __u8 quantiser_scale_code;6767+6868+ __u8 backward_ref_index;6969+ __u8 forward_ref_index;7070+ __u8 pad;7171+};7272+7373+struct v4l2_ctrl_mpeg2_quantization {7474+ /* ISO/IEC 13818-2, ITU-T Rec. H.262: Quant matrix extension */7575+ __u8 load_intra_quantiser_matrix;7676+ __u8 load_non_intra_quantiser_matrix;7777+ __u8 load_chroma_intra_quantiser_matrix;7878+ __u8 load_chroma_non_intra_quantiser_matrix;7979+8080+ __u8 intra_quantiser_matrix[64];8181+ __u8 non_intra_quantiser_matrix[64];8282+ __u8 chroma_intra_quantiser_matrix[64];8383+ __u8 chroma_non_intra_quantiser_matrix[64];8484+};8585+8686+#endif
+6
include/media/v4l2-ctrls.h
···2222#include <linux/videodev2.h>2323#include <media/media-request.h>24242525+/*2626+ * Include the mpeg2 stateless codec compound control definitions.2727+ * This will move to the public headers once this API is fully stable.2828+ */2929+#include <media/mpeg2-ctrls.h>3030+2531/* forward references */2632struct file;2733struct v4l2_ctrl_handler;
+2
include/media/videobuf2-core.h
···239239 * @num_planes: number of planes in the buffer240240 * on an internal driver queue.241241 * @timestamp: frame timestamp in ns.242242+ * @request: the request this buffer is associated with.242243 * @req_obj: used to bind this buffer to a request. This243244 * request object has a refcount.244245 */···250249 unsigned int memory;251250 unsigned int num_planes;252251 u64 timestamp;252252+ struct media_request *request;253253 struct media_request_object req_obj;254254255255 /* private: internal use only
···752752753753#define ABS_MISC 0x28754754755755+/*756756+ * 0x2e is reserved and should not be used in input drivers.757757+ * It was used by HID as ABS_MISC+6 and userspace needs to detect if758758+ * the next ABS_* event is correct or is just ABS_MISC + n.759759+ * We define here ABS_RESERVED so userspace can rely on it and detect760760+ * the situation described above.761761+ */762762+#define ABS_RESERVED 0x2e763763+755764#define ABS_MT_SLOT 0x2f /* MT slot being modified */756765#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */757766#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
+2-2
include/uapi/linux/net_tstamp.h
···155155};156156157157struct sock_txtime {158158- clockid_t clockid; /* reference clockid */159159- __u32 flags; /* as defined by enum txtime_flags */158158+ __kernel_clockid_t clockid;/* reference clockid */159159+ __u32 flags; /* as defined by enum txtime_flags */160160};161161162162#endif /* _NET_TIMESTAMPING_H */
···515515 depends on PSI516516 help517517 If set, pressure stall information tracking will be disabled518518- per default but can be enabled through passing psi_enable=1519519- on the kernel commandline during boot.518518+ per default but can be enabled through passing psi=1 on the519519+ kernel commandline during boot.520520521521endmenu # "CPU/Task time and stats accounting"522522
+15-6
kernel/bpf/core.c
···365365}366366367367#ifdef CONFIG_BPF_JIT368368-# define BPF_JIT_LIMIT_DEFAULT (PAGE_SIZE * 40000)369369-370368/* All BPF JIT sysctl knobs here. */371369int bpf_jit_enable __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_ALWAYS_ON);372370int bpf_jit_harden __read_mostly;373371int bpf_jit_kallsyms __read_mostly;374374-int bpf_jit_limit __read_mostly = BPF_JIT_LIMIT_DEFAULT;372372+long bpf_jit_limit __read_mostly;375373376374static __always_inline void377375bpf_get_prog_addr_region(const struct bpf_prog *prog,···578580579581static atomic_long_t bpf_jit_current;580582583583+/* Can be overridden by an arch's JIT compiler if it has a custom,584584+ * dedicated BPF backend memory area, or if neither of the two585585+ * below apply.586586+ */587587+u64 __weak bpf_jit_alloc_exec_limit(void)588588+{581589#if defined(MODULES_VADDR)590590+ return MODULES_END - MODULES_VADDR;591591+#else592592+ return VMALLOC_END - VMALLOC_START;593593+#endif594594+}595595+582596static int __init bpf_jit_charge_init(void)583597{584598 /* Only used as heuristic here to derive limit. */585585- bpf_jit_limit = min_t(u64, round_up((MODULES_END - MODULES_VADDR) >> 2,586586- PAGE_SIZE), INT_MAX);599599+ bpf_jit_limit = min_t(u64, round_up(bpf_jit_alloc_exec_limit() >> 2,600600+ PAGE_SIZE), LONG_MAX);587601 return 0;588602}589603pure_initcall(bpf_jit_charge_init);590590-#endif591604592605static int bpf_jit_charge_modmem(u32 pages)593606{
+10-3
kernel/bpf/verifier.c
···51025102 }51035103 new_sl->next = env->explored_states[insn_idx];51045104 env->explored_states[insn_idx] = new_sl;51055105- /* connect new state to parentage chain */51065106- for (i = 0; i < BPF_REG_FP; i++)51075107- cur_regs(env)[i].parent = &new->frame[new->curframe]->regs[i];51055105+ /* connect new state to parentage chain. Current frame needs all51065106+ * registers connected. Only r6 - r9 of the callers are alive (pushed51075107+ * to the stack implicitly by JITs) so in callers' frames connect just51085108+ * r6 - r9 as an optimization. Callers will have r1 - r5 connected to51095109+ * the state of the call instruction (with WRITTEN set), and r0 comes51105110+ * from callee with its full parentage chain, anyway.51115111+ */51125112+ for (j = 0; j <= cur->curframe; j++)51135113+ for (i = j < cur->curframe ? BPF_REG_6 : 0; i < BPF_REG_FP; i++)51145114+ cur->frame[j]->regs[i].parent = &new->frame[j]->regs[i];51085115 /* clear write marks in current state: the writes we did are not writes51095116 * our child did, so they don't screen off its reads from us.51105117 * (There are no read marks in current state, because reads always mark
+6-1
kernel/dma/direct.c
···309309310310 min_mask = min_t(u64, min_mask, (max_pfn - 1) << PAGE_SHIFT);311311312312- return mask >= phys_to_dma(dev, min_mask);312312+ /*313313+ * This check needs to be against the actual bit mask value, so314314+ * use __phys_to_dma() here so that the SME encryption mask isn't315315+ * part of the check.316316+ */317317+ return mask >= __phys_to_dma(dev, min_mask);313318}314319315320int dma_direct_mapping_error(struct device *dev, dma_addr_t dma_addr)
···732732733733 /* The filter is for the 'trigger' event, not the triggered event */734734 ret = create_event_filter(file->event_call, filter_str, false, &filter);735735- if (ret)736736- goto out;735735+ /*736736+ * If create_event_filter() fails, filter still needs to be freed.737737+ * Which the calling code will do with data->filter.738738+ */737739 assign:738740 tmp = rcu_access_pointer(data->filter);739741
+2-2
lib/radix-tree.c
···784784 while (radix_tree_is_internal_node(node)) {785785 unsigned offset;786786787787- if (node == RADIX_TREE_RETRY)788788- goto restart;789787 parent = entry_to_node(node);790788 offset = radix_tree_descend(parent, &node, index);791789 slot = parent->slots + offset;790790+ if (node == RADIX_TREE_RETRY)791791+ goto restart;792792 if (parent->shift == 0)793793 break;794794 }
···661661{662662 void *old;663663664664- xa_lock_irq(&mapping->i_pages);665665- old = __xa_cmpxchg(&mapping->i_pages, index, radswap, NULL, 0);666666- xa_unlock_irq(&mapping->i_pages);664664+ old = xa_cmpxchg_irq(&mapping->i_pages, index, radswap, NULL, 0);667665 if (old != radswap)668666 return -ENOENT;669667 free_swap_and_cache(radix_to_swp_entry(radswap));
+16
mm/sparse.c
···240240}241241242242/*243243+ * Mark all memblocks as present using memory_present(). This is a244244+ * convienence function that is useful for a number of arches245245+ * to mark all of the systems memory as present during initialization.246246+ */247247+void __init memblocks_present(void)248248+{249249+ struct memblock_region *reg;250250+251251+ for_each_memblock(memory, reg) {252252+ memory_present(memblock_get_region_node(reg),253253+ memblock_region_memory_base_pfn(reg),254254+ memblock_region_memory_end_pfn(reg));255255+ }256256+}257257+258258+/*243259 * Subtle, we encode the real pfn into the mem_map such that244260 * the identity pfn - section_mem_map will return the actual245261 * physical page frame number.
···346346 struct net *net = container_of(qp->q.net, struct net, ipv4.frags);347347 struct rb_node **rbn, *parent;348348 struct sk_buff *skb1, *prev_tail;349349+ int ihl, end, skb1_run_end;349350 struct net_device *dev;350351 unsigned int fragsize;351352 int flags, offset;352352- int ihl, end;353353 int err = -ENOENT;354354 u8 ecn;355355···419419 * overlapping fragment, the entire datagram (and any constituent420420 * fragments) MUST be silently discarded.421421 *422422- * We do the same here for IPv4 (and increment an snmp counter).422422+ * We do the same here for IPv4 (and increment an snmp counter) but423423+ * we do not want to drop the whole queue in response to a duplicate424424+ * fragment.423425 */424426425427 err = -EINVAL;···446444 do {447445 parent = *rbn;448446 skb1 = rb_to_skb(parent);447447+ skb1_run_end = skb1->ip_defrag_offset +448448+ FRAG_CB(skb1)->frag_run_len;449449 if (end <= skb1->ip_defrag_offset)450450 rbn = &parent->rb_left;451451- else if (offset >= skb1->ip_defrag_offset +452452- FRAG_CB(skb1)->frag_run_len)451451+ else if (offset >= skb1_run_end)453452 rbn = &parent->rb_right;454454- else /* Found an overlap with skb1. */455455- goto overlap;453453+ else if (offset >= skb1->ip_defrag_offset &&454454+ end <= skb1_run_end)455455+ goto err; /* No new data, potential duplicate */456456+ else457457+ goto overlap; /* Found an overlap */456458 } while (*rbn);457459 /* Here we have parent properly set, and rbn pointing to458460 * one of its NULL left/right children. Insert skb.
+2
net/ipv4/ipconfig.c
···429429 ic_netmask = htonl(IN_CLASSB_NET);430430 else if (IN_CLASSC(ntohl(ic_myaddr)))431431 ic_netmask = htonl(IN_CLASSC_NET);432432+ else if (IN_CLASSE(ntohl(ic_myaddr)))433433+ ic_netmask = htonl(IN_CLASSE_NET);432434 else {433435 pr_err("IP-Config: Unable to guess netmask for address %pI4\n",434436 &ic_myaddr);
···77 * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>88 * Copyright 2013-2014 Intel Mobile Communications GmbH99 * Copyright (c) 2016 Intel Deutschland GmbH1010+ * Copyright (C) 2018 Intel Corporation1011 *1112 * This program is free software; you can redistribute it and/or modify1213 * it under the terms of the GNU General Public License version 2 as···1951195019521951 WARN(local->open_count, "%s: open count remains %d\n",19531952 wiphy_name(local->hw.wiphy), local->open_count);19531953+19541954+ ieee80211_txq_teardown_flows(local);1954195519551956 mutex_lock(&local->iflist_mtx);19561957 list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
···876876 * rds_message is getting to be quite complicated, and we'd like to allocate877877 * it all in one go. This figures out how big it needs to be up front.878878 */879879-static int rds_rm_size(struct msghdr *msg, int num_sgs)879879+static int rds_rm_size(struct msghdr *msg, int num_sgs,880880+ struct rds_iov_vector_arr *vct)880881{881882 struct cmsghdr *cmsg;882883 int size = 0;883884 int cmsg_groups = 0;884885 int retval;885886 bool zcopy_cookie = false;887887+ struct rds_iov_vector *iov, *tmp_iov;888888+889889+ if (num_sgs < 0)890890+ return -EINVAL;886891887892 for_each_cmsghdr(cmsg, msg) {888893 if (!CMSG_OK(msg, cmsg))···898893899894 switch (cmsg->cmsg_type) {900895 case RDS_CMSG_RDMA_ARGS:896896+ if (vct->indx >= vct->len) {897897+ vct->len += vct->incr;898898+ tmp_iov =899899+ krealloc(vct->vec,900900+ vct->len *901901+ sizeof(struct rds_iov_vector),902902+ GFP_KERNEL);903903+ if (!tmp_iov) {904904+ vct->len -= vct->incr;905905+ return -ENOMEM;906906+ }907907+ vct->vec = tmp_iov;908908+ }909909+ iov = &vct->vec[vct->indx];910910+ memset(iov, 0, sizeof(struct rds_iov_vector));911911+ vct->indx++;901912 cmsg_groups |= 1;902902- retval = rds_rdma_extra_size(CMSG_DATA(cmsg));913913+ retval = rds_rdma_extra_size(CMSG_DATA(cmsg), iov);903914 if (retval < 0)904915 return retval;905916 size += retval;···972951}973952974953static int rds_cmsg_send(struct rds_sock *rs, struct rds_message *rm,975975- struct msghdr *msg, int *allocated_mr)954954+ struct msghdr *msg, int *allocated_mr,955955+ struct rds_iov_vector_arr *vct)976956{977957 struct cmsghdr *cmsg;978978- int ret = 0;958958+ int ret = 0, ind = 0;979959980960 for_each_cmsghdr(cmsg, msg) {981961 if (!CMSG_OK(msg, cmsg))···990968 */991969 switch (cmsg->cmsg_type) {992970 case RDS_CMSG_RDMA_ARGS:993993- ret = rds_cmsg_rdma_args(rs, rm, cmsg);971971+ if (ind >= vct->indx)972972+ return -ENOMEM;973973+ ret = rds_cmsg_rdma_args(rs, rm, cmsg, &vct->vec[ind]);974974+ ind++;994975 break;995976996977 case RDS_CMSG_RDMA_DEST:···11091084 sock_flag(rds_rs_to_sk(rs), SOCK_ZEROCOPY));11101085 int num_sgs = ceil(payload_len, PAGE_SIZE);11111086 int namelen;10871087+ struct rds_iov_vector_arr vct;10881088+ int ind;10891089+10901090+ memset(&vct, 0, sizeof(vct));10911091+10921092+ /* expect 1 RDMA CMSG per rds_sendmsg. can still grow if more needed. */10931093+ vct.incr = 1;1112109411131095 /* Mirror Linux UDP mirror of BSD error message compatibility */11141096 /* XXX: Perhaps MSG_MORE someday */···12521220 num_sgs = iov_iter_npages(&msg->msg_iter, INT_MAX);12531221 }12541222 /* size of rm including all sgs */12551255- ret = rds_rm_size(msg, num_sgs);12231223+ ret = rds_rm_size(msg, num_sgs, &vct);12561224 if (ret < 0)12571225 goto out;12581226···1264123212651233 /* Attach data to the rm */12661234 if (payload_len) {12671267- rm->data.op_sg = rds_message_alloc_sgs(rm, num_sgs);12681268- if (!rm->data.op_sg) {12691269- ret = -ENOMEM;12351235+ rm->data.op_sg = rds_message_alloc_sgs(rm, num_sgs, &ret);12361236+ if (!rm->data.op_sg)12701237 goto out;12711271- }12721238 ret = rds_message_copy_from_user(rm, &msg->msg_iter, zcopy);12731239 if (ret)12741240 goto out;···13001270 rm->m_conn_path = cpath;1301127113021272 /* Parse any control messages the user may have included. */13031303- ret = rds_cmsg_send(rs, rm, msg, &allocated_mr);12731273+ ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct);13041274 if (ret) {13051275 /* Trigger connection so that its ready for the next retry */13061276 if (ret == -EAGAIN)···13781348 if (ret)13791349 goto out;13801350 rds_message_put(rm);13511351+13521352+ for (ind = 0; ind < vct.indx; ind++)13531353+ kfree(vct.vec[ind].iov);13541354+ kfree(vct.vec);13551355+13811356 return payload_len;1382135713831358out:13591359+ for (ind = 0; ind < vct.indx; ind++)13601360+ kfree(vct.vec[ind].iov);13611361+ kfree(vct.vec);13621362+13841363 /* If the user included a RDMA_MAP cmsg, we allocated a MR on the fly.13851364 * If the sendmsg goes through, we keep the MR. If it fails with EAGAIN13861365 * or in any other way, we need to destroy the MR again */
+3-4
net/sched/cls_flower.c
···12581258 fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;1259125912601260 if (fold) {12611261- if (!tc_skip_sw(fold->flags))12621262- rhashtable_remove_fast(&fold->mask->ht,12631263- &fold->ht_node,12641264- fold->mask->filter_ht_params);12611261+ rhashtable_remove_fast(&fold->mask->ht,12621262+ &fold->ht_node,12631263+ fold->mask->filter_ht_params);12651264 if (!tc_skip_hw(fold->flags))12661265 fl_hw_destroy_filter(tp, fold, NULL);12671266 }
···219219 * started, waiting for unsent220220 * data to be sent221221 */222222+ struct mutex clcsock_release_lock;223223+ /* protects clcsock of a listen224224+ * socket225225+ * */222226};223227224228static inline struct smc_sock *smc_sk(const struct sock *sk)
+1
net/sunrpc/clnt.c
···19521952 /* retry with existing socket, after a delay */19531953 rpc_delay(task, 3*HZ);19541954 /* fall through */19551955+ case -ENOTCONN:19551956 case -EAGAIN:19561957 /* Check for timeouts before looping back to call_bind */19571958 case -ETIMEDOUT:
+4-31
net/sunrpc/xprt.c
···6767 */6868static void xprt_init(struct rpc_xprt *xprt, struct net *net);6969static __be32 xprt_alloc_xid(struct rpc_xprt *xprt);7070-static void xprt_connect_status(struct rpc_task *task);7170static void xprt_destroy(struct rpc_xprt *xprt);72717372static DEFINE_SPINLOCK(xprt_list_lock);···679680 /* Try to schedule an autoclose RPC call */680681 if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)681682 queue_work(xprtiod_workqueue, &xprt->task_cleanup);682682- xprt_wake_pending_tasks(xprt, -EAGAIN);683683+ else if (xprt->snd_task)684684+ rpc_wake_up_queued_task_set_status(&xprt->pending,685685+ xprt->snd_task, -ENOTCONN);683686 spin_unlock_bh(&xprt->transport_lock);684687}685688EXPORT_SYMBOL_GPL(xprt_force_disconnect);···821820 if (!xprt_connected(xprt)) {822821 task->tk_timeout = task->tk_rqstp->rq_timeout;823822 task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;824824- rpc_sleep_on(&xprt->pending, task, xprt_connect_status);823823+ rpc_sleep_on(&xprt->pending, task, NULL);825824826825 if (test_bit(XPRT_CLOSING, &xprt->state))827826 return;···838837 }839838 }840839 xprt_release_write(xprt, task);841841-}842842-843843-static void xprt_connect_status(struct rpc_task *task)844844-{845845- switch (task->tk_status) {846846- case 0:847847- dprintk("RPC: %5u xprt_connect_status: connection established\n",848848- task->tk_pid);849849- break;850850- case -ECONNREFUSED:851851- case -ECONNRESET:852852- case -ECONNABORTED:853853- case -ENETUNREACH:854854- case -EHOSTUNREACH:855855- case -EPIPE:856856- case -EAGAIN:857857- dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);858858- break;859859- case -ETIMEDOUT:860860- dprintk("RPC: %5u xprt_connect_status: connect attempt timed "861861- "out\n", task->tk_pid);862862- break;863863- default:864864- dprintk("RPC: %5u xprt_connect_status: error %d connecting to "865865- "server %s\n", task->tk_pid, -task->tk_status,866866- task->tk_rqstp->rq_xprt->servername);867867- task->tk_status = -EIO;868868- }869840}870841871842enum xprt_xid_rb_cmp {
···168168 self.curline = 0169169 try:170170 for line in fd:171171+ line = line.decode(locale.getpreferredencoding(False), errors='ignore')171172 self.curline += 1172173 if self.curline > maxlines:173174 break···250249251250 try:252251 if len(args.path) and args.path[0] == '-':253253- parser.parse_lines(sys.stdin, args.maxlines, '-')252252+ stdin = os.fdopen(sys.stdin.fileno(), 'rb')253253+ parser.parse_lines(stdin, args.maxlines, '-')254254 else:255255 if args.path:256256 for p in args.path:257257 if os.path.isfile(p):258258- parser.parse_lines(open(p), args.maxlines, p)258258+ parser.parse_lines(open(p, 'rb'), args.maxlines, p)259259 elif os.path.isdir(p):260260 scan_git_subtree(repo.head.reference.commit.tree, p)261261 else:
···11+#!/bin/bash22+# SPDX-License-Identifier: GPL-2.033+44+# Check FDB default-remote handling across "ip link set".55+66+check_remotes()77+{88+ local what=$1; shift99+ local N=$(bridge fdb sh dev vx | grep 00:00:00:00:00:00 | wc -l)1010+1111+ echo -ne "expected two remotes after $what\t"1212+ if [[ $N != 2 ]]; then1313+ echo "[FAIL]"1414+ EXIT_STATUS=11515+ else1616+ echo "[ OK ]"1717+ fi1818+}1919+2020+ip link add name vx up type vxlan id 2000 dstport 47892121+bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent2222+bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent2323+check_remotes "fdb append"2424+2525+ip link set dev vx type vxlan remote 192.0.2.302626+check_remotes "link set"2727+2828+ip link del dev vx2929+exit $EXIT_STATUS
+7-2
tools/testing/selftests/seccomp/seccomp_bpf.c
···27312731 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0));27322732 ASSERT_EQ(true, WIFSTOPPED(status));27332733 ASSERT_EQ(SIGSTOP, WSTOPSIG(status));27342734- /* Verify signal delivery came from parent now. */27352734 ASSERT_EQ(0, ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &info));27362736- EXPECT_EQ(getpid(), info.si_pid);27352735+ /*27362736+ * There is no siginfo on SIGSTOP any more, so we can't verify27372737+ * signal delivery came from parent now (getpid() == info.si_pid).27382738+ * https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com27392739+ * At least verify the SIGSTOP via PTRACE_GETSIGINFO.27402740+ */27412741+ EXPECT_EQ(SIGSTOP, info.si_signo);2737274227382743 /* Restart nanosleep with SIGCONT, which triggers restart_syscall. */27392744 ASSERT_EQ(0, kill(child_pid, SIGCONT));
+4
tools/virtio/linux/kernel.h
···2323#define PAGE_MASK (~(PAGE_SIZE-1))2424#define PAGE_ALIGN(x) ((x + PAGE_SIZE - 1) & PAGE_MASK)25252626+/* generic data direction definitions */2727+#define READ 02828+#define WRITE 12929+2630typedef unsigned long long phys_addr_t;2731typedef unsigned long long dma_addr_t;2832typedef size_t __kernel_size_t;