Linux 5.19.14
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.19.14 kernel.
All users of the 5.19 kernel series must upgrade.
The updated 5.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/am33xx-l4.dtsi | 3 arch/arm/boot/dts/am5748.dtsi | 4 arch/arm/boot/dts/integratorap.dts | 1 arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 arch/powerpc/mm/book3s64/radix_pgtable.c | 9 arch/riscv/Kconfig.erratas | 2 arch/x86/include/asm/smp.h | 25 arch/x86/kernel/alternative.c | 45 arch/x86/kernel/cpu/sgx/main.c | 15 arch/x86/kvm/cpuid.c | 2 arch/x86/lib/usercopy.c | 2 drivers/ata/libata-core.c | 4 drivers/block/virtio_blk.c | 11 drivers/clk/bcm/clk-iproc-pll.c | 12 drivers/clk/imx/clk-imx6sx.c | 4 drivers/clk/imx/clk-imx93.c | 2 drivers/clk/ingenic/tcu.c | 15 drivers/clk/microchip/clk-mpfs.c | 11 drivers/counter/104-quad-8.c | 209 +-- drivers/firmware/arm_scmi/scmi_pm_domain.c | 26 drivers/gpio/gpio-mvebu.c | 15 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 13 drivers/gpu/drm/bridge/lontium-lt8912b.c | 13 drivers/gpu/drm/i915/gt/intel_engine_types.h | 15 drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 21 drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 drivers/input/keyboard/snvs_pwrkey.c | 2 drivers/input/touchscreen/melfas_mip4.c | 2 drivers/media/dvb-core/dvb_vb2.c | 11 drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 9 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 2 drivers/mmc/host/mmc_hsq.c | 2 drivers/mmc/host/moxart-mmc.c | 17 drivers/net/can/c_can/c_can.h | 17 drivers/net/can/c_can/c_can_main.c | 11 drivers/net/dsa/mt7530.c | 15 drivers/net/ethernet/cadence/macb_main.c | 4 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 28 drivers/net/ethernet/intel/ice/ice_txrx.c | 2 drivers/net/ethernet/intel/ice/ice_xsk.c | 163 +- drivers/net/ethernet/intel/ice/ice_xsk.h | 7 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 4 drivers/net/ethernet/mscc/ocelot.c | 7 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 23 drivers/net/phy/phy_device.c | 10 drivers/net/usb/qmi_wwan.c | 1 drivers/net/usb/usbnet.c | 7 drivers/nvme/host/core.c | 6 drivers/reset/reset-imx7.c | 1 drivers/soc/sunxi/sunxi_sram.c | 23 drivers/staging/media/rkvdec/rkvdec-h264.c | 4 drivers/thunderbolt/switch.c | 1 drivers/usb/storage/unusual_uas.h | 21 drivers/usb/typec/ucsi/ucsi.c | 2 drivers/vdpa/ifcvf/ifcvf_base.c | 4 drivers/vdpa/mlx5/net/mlx5_vnet.c | 17 drivers/vdpa/vdpa_user/vduse_dev.c | 9 fs/ntfs/super.c | 3 mm/damon/dbgfs.c | 19 mm/damon/sysfs.c | 2 mm/frontswap.c | 3 mm/gup.c | 34 mm/hugetlb.c | 14 mm/khugepaged.c | 10 mm/madvise.c | 7 mm/memory-failure.c | 3 mm/memory.c | 14 mm/migrate_device.c | 16 mm/page_alloc.c | 65 - mm/page_isolation.c | 25 mm/secretmem.c | 2 mm/util.c | 4 net/mac80211/rc80211_minstrel_ht.c | 6 net/mac80211/tx.c | 4 net/mac80211/util.c | 4 net/mptcp/protocol.c | 16 net/mptcp/protocol.h | 2 net/mptcp/subflow.c | 33 net/sched/act_ct.c | 5 net/wireless/util.c | 4 sound/soc/codecs/tas2770.c | 3 sound/soc/fsl/imx-card.c | 4 tools/perf/builtin-list.c | 2 tools/perf/builtin-lock.c | 1 tools/perf/builtin-record.c | 28 tools/perf/builtin-timechart.c | 1 tools/perf/builtin-trace.c | 1 tools/perf/tests/perf-record.c | 2 tools/perf/tests/shell/record.sh | 2 tools/perf/util/Build | 2 tools/perf/util/parse-events-hybrid.c | 21 tools/perf/util/parse-events.c | 734 ------------ tools/perf/util/parse-events.h | 32 tools/perf/util/print-events.c | 533 ++++++++ tools/perf/util/print-events.h | 22 tools/perf/util/trace-event-info.c | 96 + tools/perf/util/tracepoint.c | 63 + tools/perf/util/tracepoint.h | 25 tools/testing/selftests/net/reuseport_bpf.c | 2 103 files changed, 1577 insertions(+), 1257 deletions(-)
Adrian Hunter (1):
perf record: Fix cpu mask bit setting for mixed mmaps
Aidan MacDonald (1):
clk: ingenic-tcu: Properly enable registers before accessing timers
Alexander Couzens (1):
net: mt7531: only do PLL once after the reset
Alexander Wetzel (1):
wifi: mac80211: ensure vif queues are operational after start
Alistair Popple (3):
mm/migrate_device.c: flush TLB while holding PTL mm/migrate_device.c: add missing flush_cache_page() mm/migrate_device.c: copy pte dirty bit to page
Angus Chen (1):
vdpa/ifcvf: fix the calculation of queuepair
Arnaldo Carvalho de Melo (1):
perf tests record: Fail the test if the 'errs' counter is not zero
Ashutosh Dixit (1):
drm/i915/gt: Perf_limit_reasons are only available for Gen11+
Athira Rajeev (1):
tools/perf: Fix out of bound access to cpu mask array
Binyi Han (1):
mm: fix dereferencing possible ERR_PTR
Bokun Zhang (1):
drm/amdgpu: Add amdgpu suspend-resume code path under SRIOV
Borislav Petkov (1):
x86/cacheinfo: Add a cpu_llc_shared_mask() UP variant
Brian Norris (1):
Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"
ChenXiaoSong (1):
ntfs: fix BUG_ON in ntfs_lookup_inode_by_name()
Chris Wilson (1):
drm/i915/gt: Restrict forced preemption to the active context
Christoph Hellwig (1):
frontswap: don't call ->init if no ops are registered
Conor Dooley (2):
clk: microchip: mpfs: fix clk_cfg array bounds violation
clk: microchip: mpfs: make the rtc's ahb clock critical
Daniel Golle (1):
net: ethernet: mtk_eth_soc: fix mask of RX_DMA_GET_SPORT{,_V2}Doug Berger (1):
mm/hugetlb: correct demote page offset logic
Eli Cohen (1):
vdpa/mlx5: Fix MQ to support non power of two num queues
Florian Fainelli (1):
clk: iproc: Do not rely on node name for correct PLL setup
Florian Westphal (1):
mm: fix BUG splat with kvmalloc + GFP_ATOMIC
Francesco Dolcini (1):
drm/bridge: lt8912b: fix corrupted image output
Frank Wunderlich (1):
net: usb: qmi_wwan: Add new usb-id for Dell branded EM7455
Greg Kroah-Hartman (2):
mm/damon/dbgfs: fix memory leak when using debugfs_lookup() Linux 5.19.14
Han Xu (1):
clk: imx: imx6sx: remove the SET_RATE_PARENT flag for QSPI clocks
Hangyu Hua (2):
media: dvb_vb2: fix possible out of bound access
net: sched: act_ct: fix possible refcount leak in tcf_ct_init()
Hans Verkuil (1):
media: v4l2-compat-ioctl32.c: zero buffer passed to v4l2_compat_get_array_args()
Hans de Goede (1):
wifi: mac80211: fix regression with non-QoS drivers
Heikki Krogerus (1):
usb: typec: ucsi: Remove incorrect warning
Heiko Stuebner (1):
riscv: make t-head erratas depend on MMU
Hongling Zeng (3):
uas: add no-uas quirk for Hiksemi usb_disk
usb-storage: Add Hiksemi USB3-FW to IGNORE_UAS
uas: ignore UAS for Thinkplus chips
Ian Rogers (1):
perf parse-events: Break out tracepoint and printing
Jarkko Sakkinen (1):
x86/sgx: Do not fail on incomplete sanitization on premature stop of ksgxd
Jim Mattson (1):
KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest
Johan Hovold (1):
arm64: dts: qcom: sm8350: fix UFS PHY serdes size
Junxiao Chang (1):
net: stmmac: power up/down serdes in stmmac_open/release
Kees Cook (1):
x86/uaccess: avoid check_object_size() in copy_from_user_nmi()
Levi Yun (1):
damon/sysfs: fix possible memleak on damon_sysfs_add_target
Linus Walleij (1):
ARM: dts: integrator: Tag PCI host with device_type
Lukas Wunner (1):
net: phy: Don't WARN for PHY_UP state in mdio_bus_phy_resume()
Maciej Fijalkowski (2):
ice: xsk: change batched Tx descriptor cleaning
ice: xsk: drop power of 2 ring size restriction for AF_XDP
Marc Kleine-Budde (1):
can: c_can: don't cache TX messages for C_CAN cores
Mario Limonciello (1):
thunderbolt: Explicitly reset plug events delay back to USB4 spec value
Martin Povišer (1):
ASoC: tas2770: Reinit regcache on reset
Maurizio Lombardi (1):
mm: prevent page_frag_alloc() from corrupting the memory
Maxime Coquelin (1):
vduse: prevent uninitialized memory accesses
Mel Gorman (1):
mm/page_alloc: fix race condition between build_all_zonelists and page allocation
Menglong Dong (2):
mptcp: factor out __mptcp_close() without socket lock
mptcp: fix unreleased socket in accept queue
Michael Kelley (1):
nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices
Minchan Kim (1):
mm: fix madivse_pageout mishandling on non-LRU page
Nadav Amit (1):
x86/alternative: Fix race in try_get_desc()
Nicolas Dufresne (1):
media: rkvdec: Disable H.264 error detection
Niklas Cassel (1):
libata: add ATA_HORKAGE_NOLPM for Pioneer BDR-207M and BDR-205
Nícolas F. R. A. Prado (1):
media: mediatek: vcodec: Drop platform_get_resource(IORESOURCE_IRQ)
Pali Rohár (1):
gpio: mvebu: Fix check for pwm support on non-A8K platforms
Paweł Lenkow (1):
wifi: mac80211: fix memory corruption in minstrel_ht_update_rates()
Peilin Ye (1):
usbnet: Fix memory leak in usbnet_disconnect()
Peng Fan (1):
clk: imx93: drop of_match_ptr
Peng Wu (1):
net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe
Philippe Schenker (2):
drm/bridge: lt8912b: add vsync hsync
drm/bridge: lt8912b: set hdmi or dvi mode
Radhey Shyam Pandey (1):
net: macb: Fix ZynqMP SGMII non-wakeup source resume failure
Rafael Mendonca (1):
cxgb4: fix missing unlock on ETHOFLD desc collect fail path
Richard Zhu (1):
reset: imx7: Fix the iMX8MP PCIe PHY PERST support
Romain Naour (1):
ARM: dts: am5748: keep usb4_tm disabled
Samuel Holland (4):
soc: sunxi: sram: Actually claim SRAM regions
soc: sunxi: sram: Prevent the driver from being unbound
soc: sunxi: sram: Fix probe function ordering issues
soc: sunxi: sram: Fix debugfs info for A64 SRAM C
Sebastian Krzyszkowiak (1):
Input: snvs_pwrkey - fix SNVS_HPVIDR1 register address
Sergei Antonov (2):
mmc: moxart: fix 4-bit bus width and remove 8-bit bus width
mm: bring back update_mmu_cache() to finish_fault()
Shengjiu Wang (1):
ASoC: imx-card: Fix refcount issue with of_node_put
Shuai Xue (1):
mm,hwpoison: check mm when killing accessing process
Suwan Kim (1):
virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()
Tamizh Chelvam Raja (1):
wifi: cfg80211: fix MCS divisor value
Ulf Hansson (1):
Revert "firmware: arm_scmi: Add clock management to the SCMI power domain"
Vladimir Oltean (1):
net: mscc: ocelot: fix tagged VLAN refusal while under a VLAN-unaware bridge
Wang Yufen (1):
selftests: Fix the if conditions of in test_extra_filter()
Wenchao Chen (1):
mmc: hsq: Fix data stomping during mmc recovery
William Breathitt Gray (3):
counter: 104-quad-8: Utilize iomap interface
counter: 104-quad-8: Implement and utilize register structures
counter: 104-quad-8: Fix skipped IRQ lines during events configuration
Yang Shi (2):
powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush
mm: gup: fix the fast GUP race against THP collapse
Yang Yingliang (1):
Input: melfas_mip4 - fix return value check in mip4_probe()
YuTong Chang (1):
ARM: dts: am33xx: Fix MMCHS0 dma properties
Zhengjun Xing (3):
perf print-events: Fix "perf list" can not display the PMU prefix for some hybrid cache events perf parse-events: Remove "not supported" hybrid cache events
perf test: Fix test case 87 ("perf record tests") for hybrid systems
Zi Yan (1):
mm/page_isolation: fix isolate_single_pageblock() isolation behavior
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 19 -SUBLEVEL = 13 +SUBLEVEL = 14 EXTRAVERSION = NAME = Superb Owl
arch/arm/boot/dts/am33xx-l4.dtsi +1 -2
@@ -1502,8 +1502,7 @@ SYSC_OMAP2_SOFTRESET | mmc1: mmc@0 { compatible = "ti,am335-sdhci"; ti,needs-special-reset; - dmas = <&edma_xbar 24 0 0 - &edma_xbar 25 0 0>; + dmas = <&edma 24 0>, <&edma 25 0>; dma-names = "tx", "rx"; interrupts = <64>; reg = <0x0 0x1000>;
arch/arm/boot/dts/am5748.dtsi +4 -0
@@ -25,6 +25,10 @@ &usb3_tm { status = "disabled"; }; +&usb4_tm { + status = "disabled"; +}; + &atl_tm { status = "disabled"; };
arch/arm/boot/dts/integratorap.dts +1 -0
@@ -160,6 +160,7 @@ pic: pic@14000000 { pci: pciv3@62000000 { compatible = "arm,integrator-ap-pci", "v3,v360epc-pci"; + device_type = "pci"; #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>;
arch/arm64/boot/dts/qcom/sm8350.dtsi +1 -1
@@ -2128,7 +2128,7 @@ ufs_mem_hc: ufshc@1d84000 { ufs_mem_phy: phy@1d87000 { compatible = "qcom,sm8350-qmp-ufs-phy"; - reg = <0 0x01d87000 0 0xe10>; + reg = <0 0x01d87000 0 0x1c4>; #address-cells = <2>; #size-cells = <2>; ranges;
arch/powerpc/mm/book3s64/radix_pgtable.c +0 -9
@@ -937,15 +937,6 @@ pmd_t radix__pmdp_collapse_flush(struct vm_area_struct *vma, unsigned long addre pmd = *pmdp;pmd_clear (pmdp); -/* -* pmdp collapse_flush need to ensure that there are no parallel gup -* walk after this call. This is needed so that we can have stable -* page ref count when collapsing a page. We don't allow a collapse page -* if we have gup taken on the page. We can ensure that by sending IPI -* because gup walk happens with IRQ disabled. -*/ -serialize_against_pte_lookup (vma->vm_mm); -radix__flush_tlb_collapsed_pmd (vma->vm_mm, address);return pmd;
arch/riscv/Kconfig.erratas +1 -1
@@ -46,7 +46,7 @@ config ERRATA_THEAD config ERRATA_THEAD_PBMT bool "Apply T-Head memory type errata" - depends on ERRATA_THEAD && 64BIT + depends on ERRATA_THEAD && 64BIT && MMU select RISCV_ALTERNATIVE_EARLY default y help
arch/x86/include/asm/smp.h +15 -10
@@ -21,16 +21,6 @@ DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id);DECLARE_PER_CPU_READ_MOSTLY (u16, cpu_l2c_id);DECLARE_PER_CPU_READ_MOSTLY (int, cpu_number); -static inline struct cpumask *cpu_llc_shared_mask (int cpu) -{ -return per_cpu (cpu_llc_shared_map, cpu); -} - -static inline struct cpumask *cpu_l2c_shared_mask (int cpu) -{ -return per_cpu (cpu_l2c_shared_map, cpu); -} -DECLARE_EARLY_PER_CPU_READ_MOSTLY (u16, x86_cpu_to_apicid);DECLARE_EARLY_PER_CPU_READ_MOSTLY (u32, x86_cpu_to_acpiid);DECLARE_EARLY_PER_CPU_READ_MOSTLY (u16, x86_bios_cpu_apicid);
@@ -172,6 +162,16 @@ extern int safe_smp_processor_id(void);# define safe_smp_processor_id () smp_processor_id()#endif +static inline struct cpumask *cpu_llc_shared_mask (int cpu) +{ +return per_cpu (cpu_llc_shared_map, cpu); +} + +static inline struct cpumask *cpu_l2c_shared_mask (int cpu) +{ +return per_cpu (cpu_l2c_shared_map, cpu); +} +#else /* !CONFIG_SMP */ #define wbinvd_on_cpu (cpu) wbinvd()static inline int wbinvd_on_all_cpus (void )
@@ -179,6 +179,11 @@ static inline int wbinvd_on_all_cpus(void)wbinvd (); return 0; } + +static inline struct cpumask *cpu_llc_shared_mask (int cpu) +{ +return (struct cpumask *)cpumask_of (0 ); +}#endif /* CONFIG_SMP */ extern unsigned disabled_cpus;
arch/x86/kernel/alternative.c +23 -22
97 lines not on this page · raw message
arch/x86/kernel/cpu/sgx/main.c +9 -6
@@ -49,9 +49,13 @@ static LIST_HEAD(sgx_dirty_page_list);* Reset post-kexec EPC pages to the uninitialized state. The pages are removed * from the input list, and made available for the page allocator. SECS pages * prepending their children in the input list are left intact. +* +* Return 0 when sanitization was successful or kthread was stopped, and the +* number of unsanitized pages otherwise. */ -static void __sgx_sanitize_pages (struct list_head *dirty_page_list) +static unsigned long __sgx_sanitize_pages (struct list_head *dirty_page_list) { +unsigned long left_dirty =0 ;struct sgx_epc_page *page;LIST_HEAD (dirty);int ret;
@@ -59,7 +63,7 @@ static void __sgx_sanitize_pages(struct list_head *dirty_page_list)/* dirty_page_list is thread-local, no need for a lock: */ while (!list_empty (dirty_page_list)) {if (kthread_should_stop ()) -return ; +return 0 ; page = list_first_entry(dirty_page_list, struct sgx_epc_page, list);
@@ -92,12 +96,14 @@ static void __sgx_sanitize_pages(struct list_head *dirty_page_list) }else {/* The page is not yet clean - move to the dirty list. */ list_move_tail (&page->list, &dirty); + left_dirty++; }cond_resched (); }list_splice (&dirty, dirty_page_list); +return left_dirty; }static bool sgx_reclaimer_age (struct sgx_epc_page *epc_page)
@@ -440,10 +446,7 @@ static int ksgxd(void *p)* required for SECS pages, whose child pages blocked EREMOVE. */ __sgx_sanitize_pages (&sgx_dirty_page_list); -__sgx_sanitize_pages (&sgx_dirty_page_list); - -/* sanity check: */ -WARN_ON (!list_empty (&sgx_dirty_page_list)); +WARN_ON (__sgx_sanitize_pages (&sgx_dirty_page_list));while (!kthread_should_stop ()) {if (try_to_freeze ())
arch/x86/kvm/cpuid.c +0 -2
@@ -870,8 +870,6 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) entry->edx =0 ; }break ; -case 9 : -break ;case 0xa : {/* Architectural Performance Monitoring */ struct x86_pmu_capability cap;union cpuid10_eax eax;
arch/x86/lib/usercopy.c +1 -1
@@ -44,7 +44,7 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)* called from other contexts. */ pagefault_disable (); - ret =__copy_from_user_inatomic (to, from, n); + ret =raw_copy_from_user (to, from, n);pagefault_enable ();return ret;
drivers/ata/libata-core.c +4 -0
@@ -3988,6 +3988,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, +/* These specific Pioneer models have LPM issues */ + { "PIONEER BD-RW BDR-207M", NULL, ATA_HORKAGE_NOLPM }, + { "PIONEER BD-RW BDR-205", NULL, ATA_HORKAGE_NOLPM }, +/* Crucial BX100 SSD 500GB has broken LPM support */ { "CT500BX100SSD1", NULL, ATA_HORKAGE_NOLPM },
drivers/block/virtio_blk.c +5 -6
@@ -322,14 +322,14 @@ static blk_status_t virtblk_prep_rq(struct blk_mq_hw_ctx *hctx,if (unlikely (status))return status; -blk_mq_start_request (req); - vbr->sg_table.nents =virtblk_map_data (hctx, req, vbr);if (unlikely (vbr->sg_table.nents <0 )) {virtblk_cleanup_cmd (req);return BLK_STS_RESOURCE ; } +blk_mq_start_request (req); +return BLK_STS_OK ; }
@@ -391,8 +391,7 @@ static bool virtblk_prep_rq_batch(struct request *req) }static bool virtblk_add_req_batch (struct virtio_blk_vq *vq, -struct request **rqlist, -struct request **requeue_list) +struct request **rqlist) {unsigned long flags;int err;
@@ -408,7 +407,7 @@ static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,if (err) {virtblk_unmap_data (req, vbr);virtblk_cleanup_cmd (req); -rq_list_add (requeue_list, req); +blk_mq_requeue_request (req, true); } }
@@ -436,7 +435,7 @@ static void virtio_queue_rqs(struct request **rqlist)if (!next || req->mq_hctx != next->mq_hctx) { req->rq_next =NULL ; - kick =virtblk_add_req_batch (vq, rqlist, &requeue_list); + kick =virtblk_add_req_batch (vq, rqlist);if (kick)virtqueue_notify (vq->vq);
drivers/clk/bcm/clk-iproc-pll.c +8 -4
@@ -736,6 +736,7 @@ void iproc_pll_clk_setup(struct device_node *node,const char *parent_name;struct iproc_clk *iclk_array;struct clk_hw_onecell_data *clk_data; +const char *clk_name;if (WARN_ON (!pll_ctrl) ||WARN_ON (!clk_ctrl))return ;
@@ -783,7 +784,12 @@ void iproc_pll_clk_setup(struct device_node *node, iclk = &iclk_array[0 ]; iclk->pll = pll; - init.name = node->name; + ret =of_property_read_string_index (node,"clock-output-names" , +0 , &clk_name); +if (WARN_ON (ret)) + goto err_pll_register; + + init.name = clk_name; init.ops = &iproc_pll_ops; init.flags =0 ; parent_name =of_clk_get_parent_name (node,0 );
@@ -803,13 +809,11 @@ void iproc_pll_clk_setup(struct device_node *node, goto err_pll_register; clk_data->hws[0 ] = &iclk->hw; + parent_name = clk_name;/* now initialize and register all leaf clocks */ for (i =1 ; i < num_clks; i++) { -const char *clk_name; -memset (&init,0 ,sizeof (init)); - parent_name = node->name; ret =of_property_read_string_index (node,"clock-output-names" , i, &clk_name);
drivers/clk/imx/clk-imx6sx.c +2 -2
@@ -280,13 +280,13 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) hws[IMX6SX_CLK_SSI3_SEL ] =imx_clk_hw_mux ("ssi3_sel" , base +0x1c ,14 ,2 , ssi_sels,ARRAY_SIZE (ssi_sels)); hws[IMX6SX_CLK_SSI2_SEL ] =imx_clk_hw_mux ("ssi2_sel" , base +0x1c ,12 ,2 , ssi_sels,ARRAY_SIZE (ssi_sels)); hws[IMX6SX_CLK_SSI1_SEL ] =imx_clk_hw_mux ("ssi1_sel" , base +0x1c ,10 ,2 , ssi_sels,ARRAY_SIZE (ssi_sels)); - hws[IMX6SX_CLK_QSPI1_SEL ] =imx_clk_hw_mux_flags ("qspi1_sel" , base +0x1c ,7 ,3 , qspi1_sels,ARRAY_SIZE (qspi1_sels),CLK_SET_RATE_PARENT ); + hws[IMX6SX_CLK_QSPI1_SEL ] =imx_clk_hw_mux ("qspi1_sel" , base +0x1c ,7 ,3 , qspi1_sels,ARRAY_SIZE (qspi1_sels)); hws[IMX6SX_CLK_PERCLK_SEL ] =imx_clk_hw_mux ("perclk_sel" , base +0x1c ,6 ,1 , perclk_sels,ARRAY_SIZE (perclk_sels)); hws[IMX6SX_CLK_VID_SEL ] =imx_clk_hw_mux ("vid_sel" , base +0x20 ,21 ,3 , vid_sels,ARRAY_SIZE (vid_sels)); hws[IMX6SX_CLK_ESAI_SEL ] =imx_clk_hw_mux ("esai_sel" , base +0x20 ,19 ,2 , audio_sels,ARRAY_SIZE (audio_sels)); hws[IMX6SX_CLK_CAN_SEL ] =imx_clk_hw_mux ("can_sel" , base +0x20 ,8 ,2 , can_sels,ARRAY_SIZE (can_sels)); hws[IMX6SX_CLK_UART_SEL ] =imx_clk_hw_mux ("uart_sel" , base +0x24 ,6 ,1 , uart_sels,ARRAY_SIZE (uart_sels)); - hws[IMX6SX_CLK_QSPI2_SEL ] =imx_clk_hw_mux_flags ("qspi2_sel" , base +0x2c ,15 ,3 , qspi2_sels,ARRAY_SIZE (qspi2_sels),CLK_SET_RATE_PARENT ); + hws[IMX6SX_CLK_QSPI2_SEL ] =imx_clk_hw_mux ("qspi2_sel" , base +0x2c ,15 ,3 , qspi2_sels,ARRAY_SIZE (qspi2_sels)); hws[IMX6SX_CLK_SPDIF_SEL ] =imx_clk_hw_mux ("spdif_sel" , base +0x30 ,20 ,2 , audio_sels,ARRAY_SIZE (audio_sels)); hws[IMX6SX_CLK_AUDIO_SEL ] =imx_clk_hw_mux ("audio_sel" , base +0x30 ,7 ,2 , audio_sels,ARRAY_SIZE (audio_sels)); hws[IMX6SX_CLK_ENET_PRE_SEL ] =imx_clk_hw_mux ("enet_pre_sel" , base +0x34 ,15 ,3 , enet_pre_sels,ARRAY_SIZE (enet_pre_sels));
drivers/clk/imx/clk-imx93.c +1 -1
@@ -332,7 +332,7 @@ static struct platform_driver imx93_clk_driver = { .driver = { .name = "imx93-ccm", .suppress_bind_attrs = true, - .of_match_table = of_match_ptr(imx93_clk_of_match), + .of_match_table = imx93_clk_of_match, }, };module_platform_driver (imx93_clk_driver);
drivers/clk/ingenic/tcu.c +5 -10
@@ -101,15 +101,11 @@ static bool ingenic_tcu_enable_regs(struct clk_hw *hw)bool enabled = false;/* -* If the SoC has no global TCU clock, we must ungate the channel's -* clock to be able to access its registers. -* If we have a TCU clock, it will be enabled automatically as it has -* been attached to the regmap. +* According to the programming manual, a timer channel's registers can +* only be accessed when the channel's stop bit is clear. */ -if (!tcu->clk) { - enabled = !!ingenic_tcu_is_enabled (hw); -regmap_write (tcu->map,TCU_REG_TSCR ,BIT (info->gate_bit)); - } + enabled = !!ingenic_tcu_is_enabled (hw); +regmap_write (tcu->map,TCU_REG_TSCR ,BIT (info->gate_bit));return enabled; }
@@ -120,8 +116,7 @@ static void ingenic_tcu_disable_regs(struct clk_hw *hw)const struct ingenic_tcu_clk_info *info = tcu_clk->info;struct ingenic_tcu *tcu = tcu_clk->tcu; -if (!tcu->clk) -regmap_write (tcu->map,TCU_REG_TSSR ,BIT (info->gate_bit)); +regmap_write (tcu->map,TCU_REG_TSSR ,BIT (info->gate_bit)); }static u8 ingenic_tcu_get_parent (struct clk_hw *hw)
drivers/clk/microchip/clk-mpfs.c +9 -2
@@ -239,6 +239,11 @@ static const struct clk_ops mpfs_clk_cfg_ops = { .hw.init = CLK_HW_INIT(_name, _parent, &mpfs_clk_cfg_ops, 0), \ } +#define CLK_CPU_OFFSET 0u +#define CLK_AXI_OFFSET 1u +#define CLK_AHB_OFFSET 2u +#define CLK_RTCREF_OFFSET 3u +static struct mpfs_cfg_hw_clock mpfs_cfg_clks[] = {CLK_CFG (CLK_CPU ,"clk_cpu" ,"clk_msspll" ,0 ,2 , mpfs_div_cpu_axi_table,0 ,REG_CLOCK_CONFIG_CR ),
@@ -362,7 +367,7 @@ static const struct clk_ops mpfs_periph_clk_ops = { _flags), \ } -#define PARENT_CLK (PARENT ) (&mpfs_cfg_clks[CLK_##PARENT].hw) +#define PARENT_CLK (PARENT ) (&mpfs_cfg_clks[CLK_##PARENT##_OFFSET].hw)/* * Critical clocks:
@@ -370,6 +375,8 @@ static const struct clk_ops mpfs_periph_clk_ops = {* trap handler * - CLK_MMUART0: reserved by the hss * - CLK_DDRC: provides clock to the ddr subsystem +* - CLK_RTC: the onboard RTC's AHB bus clock must be kept running as the rtc will stop +* if the AHB interface clock is disabled * - CLK_FICx: these provide the processor side clocks to the "FIC" (Fabric InterConnect) * clock domain crossers which provide the interface to the FPGA fabric. Disabling them * causes the FPGA fabric to go into reset.
@@ -394,7 +401,7 @@ static struct mpfs_periph_hw_clock mpfs_periph_clks[] = {CLK_PERIPH (CLK_CAN0 ,"clk_periph_can0" ,PARENT_CLK (AHB ),14 ,0 ),CLK_PERIPH (CLK_CAN1 ,"clk_periph_can1" ,PARENT_CLK (AHB ),15 ,0 ),CLK_PERIPH (CLK_USB ,"clk_periph_usb" ,PARENT_CLK (AHB ),16 ,0 ), -CLK_PERIPH (CLK_RTC ,"clk_periph_rtc" ,PARENT_CLK (AHB ),18 ,0 ), +CLK_PERIPH (CLK_RTC ,"clk_periph_rtc" ,PARENT_CLK (AHB ),18 ,CLK_IS_CRITICAL ),CLK_PERIPH (CLK_QSPI ,"clk_periph_qspi" ,PARENT_CLK (AHB ),19 ,0 ),CLK_PERIPH (CLK_GPIO0 ,"clk_periph_gpio0" ,PARENT_CLK (AHB ),20 ,0 ), CLK_PERIPH(CLK_GPIO1, "clk_periph_gpio1", PARENT_CLK(AHB), 21, 0),
drivers/counter/104-quad-8.c +119 -90
478 lines not on this page · raw message
drivers/firmware/arm_scmi/scmi_pm_domain.c +0 -26
@@ -8,7 +8,6 @@#include <linux/err.h> #include <linux/io.h> #include <linux/module.h> -#include <linux/pm_clock.h> #include <linux/pm_domain.h> #include <linux/scmi_protocol.h>
@@ -53,27 +52,6 @@ static int scmi_pd_power_off(struct generic_pm_domain *domain)return scmi_pd_power (domain, false); } -static int scmi_pd_attach_dev (struct generic_pm_domain *pd,struct device *dev) -{ -int ret; - - ret =pm_clk_create (dev); -if (ret) -return ret; - - ret =of_pm_clk_add_clks (dev); -if (ret >=0 ) -return 0 ; - -pm_clk_destroy (dev); -return ret; -} - -static void scmi_pd_detach_dev (struct generic_pm_domain *pd,struct device *dev) -{ -pm_clk_destroy (dev); -} -static int scmi_pm_domain_probe (struct scmi_device *sdev) {int num_domains, i;
@@ -124,10 +102,6 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd->genpd.name = scmi_pd->name; scmi_pd->genpd.power_off = scmi_pd_power_off; scmi_pd->genpd.power_on = scmi_pd_power_on; - scmi_pd->genpd.attach_dev = scmi_pd_attach_dev; - scmi_pd->genpd.detach_dev = scmi_pd_detach_dev; - scmi_pd->genpd.flags =GENPD_FLAG_PM_CLK | -GENPD_FLAG_ACTIVE_WAKEUP ;pm_genpd_init (&scmi_pd->genpd,NULL , state ==SCMI_POWER_STATE_GENERIC_OFF );
drivers/gpio/gpio-mvebu.c +6 -9
@@ -793,8 +793,12 @@ static int mvebu_pwm_probe(struct platform_device *pdev,u32 offset;u32 set; -if (of_device_is_compatible (mvchip->chip.of_node, -"marvell,armada-370-gpio" )) { +if (mvchip->soc_variant ==MVEBU_GPIO_SOC_VARIANT_A8K ) { +int ret =of_property_read_u32 (dev->of_node, +"marvell,pwm-offset" , &offset); +if (ret <0 ) +return 0 ; + }else {/* * There are only two sets of PWM configuration registers for * all the GPIO lines on those SoCs which this driver reserves
@@ -804,13 +808,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,if (!platform_get_resource_byname (pdev,IORESOURCE_MEM ,"pwm" ))return 0 ; offset =0 ; - }else if (mvchip->soc_variant ==MVEBU_GPIO_SOC_VARIANT_A8K ) { -int ret =of_property_read_u32 (dev->of_node, -"marvell,pwm-offset" , &offset); -if (ret <0 ) -return 0 ; - }else { -return 0 ; }if (IS_ERR (mvchip->clk))
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +4 -0
@@ -1056,6 +1056,10 @@ bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) {if (adev->flags &AMD_IS_APU )return false; + +if (amdgpu_sriov_vf (adev)) +return false; +return pm_suspend_target_state !=PM_SUSPEND_TO_IDLE ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +26 -1
@@ -3178,7 +3178,8 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)continue ;if (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_COMMON || adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GMC || - adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_IH ) { + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_IH || + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_PSP &&amdgpu_sriov_vf (adev))) { r = adev->ip_blocks[i].version->funcs->resume (adev);if (r) {
@@ -4124,12 +4125,20 @@ static void amdgpu_device_evict_resources(struct amdgpu_device *adev)int amdgpu_device_suspend (struct drm_device *dev,bool fbcon) {struct amdgpu_device *adev =drm_to_adev (dev); +int r =0 ;if (dev->switch_power_state ==DRM_SWITCH_POWER_OFF )return 0 ; adev->in_suspend = true; +if (amdgpu_sriov_vf (adev)) { +amdgpu_virt_fini_data_exchange (adev); + r =amdgpu_virt_request_full_gpu (adev, false); +if (r) +return r; + } +if (amdgpu_acpi_smart_shift_update (dev,AMDGPU_SS_DEV_D3 ))DRM_WARN ("smart shift update failed\n" );
@@ -4153,6 +4162,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)amdgpu_device_ip_suspend_phase2 (adev); +if (amdgpu_sriov_vf (adev)) +amdgpu_virt_release_full_gpu (adev, false); +return 0 ; }
@@ -4171,6 +4183,12 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)struct amdgpu_device *adev =drm_to_adev (dev);int r =0 ; +if (amdgpu_sriov_vf (adev)) { + r =amdgpu_virt_request_full_gpu (adev, true); +if (r) +return r; + } +if (dev->switch_power_state ==DRM_SWITCH_POWER_OFF )return 0 ;
@@ -4185,6 +4203,13 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) } r =amdgpu_device_ip_resume (adev); + +/* no matter what r is, always need to properly release full GPU */ +if (amdgpu_sriov_vf (adev)) { +amdgpu_virt_init_data_exchange (adev); +amdgpu_virt_release_full_gpu (adev, true); + } +if (r) {dev_err (adev->dev,"amdgpu_device_ip_resume failed (%d).\n" , r);return r;
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +0 -13
@@ -1863,12 +1863,6 @@ EXPORT_SYMBOL_GPL(analogix_dp_remove);int analogix_dp_suspend (struct analogix_dp_device *dp) {clk_disable_unprepare (dp->clock); - -if (dp->plat_data->panel) { -if (drm_panel_unprepare (dp->plat_data->panel)) -DRM_ERROR ("failed to turnoff the panel\n" ); - } -return 0 ; }EXPORT_SYMBOL_GPL (analogix_dp_suspend);
@@ -1883,13 +1877,6 @@ int analogix_dp_resume(struct analogix_dp_device *dp)return ret; } -if (dp->plat_data->panel) { -if (drm_panel_prepare (dp->plat_data->panel)) { -DRM_ERROR ("failed to setup the panel\n" ); -return -EBUSY ; - } - } -return 0 ; }EXPORT_SYMBOL_GPL (analogix_dp_resume);
drivers/gpu/drm/bridge/lontium-lt8912b.c +11 -2
@@ -186,7 +186,7 @@ static int lt8912_write_lvds_config(struct lt8912 *lt) {0x03, 0xff}, }; -return regmap_multi_reg_write (lt->regmap[I2C_CEC_DSI ], seq,ARRAY_SIZE (seq)); +return regmap_multi_reg_write (lt->regmap[I2C_MAIN ], seq,ARRAY_SIZE (seq)); };static inline struct lt8912 *bridge_to_lt8912 (struct drm_bridge *b)
@@ -266,7 +266,7 @@ static int lt8912_video_setup(struct lt8912 *lt)u32 hactive, h_total, hpw, hfp, hbp;u32 vactive, v_total, vpw, vfp, vbp;u8 settle =0x08 ; -int ret; +int ret, hsync_activehigh, vsync_activehigh;if (!lt)return -EINVAL ;
@@ -276,12 +276,14 @@ static int lt8912_video_setup(struct lt8912 *lt) hpw = lt->mode.hsync_len; hbp = lt->mode.hback_porch; h_total = hactive + hfp + hpw + hbp; + hsync_activehigh = lt->mode.flags &DISPLAY_FLAGS_HSYNC_HIGH ; vactive = lt->mode.vactive; vfp = lt->mode.vfront_porch; vpw = lt->mode.vsync_len; vbp = lt->mode.vback_porch; v_total = vactive + vfp + vpw + vbp; + vsync_activehigh = lt->mode.flags &DISPLAY_FLAGS_VSYNC_HIGH ;if (vactive <=600 ) settle =0x04 ;
@@ -315,6 +317,13 @@ static int lt8912_video_setup(struct lt8912 *lt) ret |=regmap_write (lt->regmap[I2C_CEC_DSI ],0x3e , hfp &0xff ); ret |=regmap_write (lt->regmap[I2C_CEC_DSI ],0x3f , hfp >>8 ); + ret |=regmap_update_bits (lt->regmap[I2C_MAIN ],0xab ,BIT (0 ), + vsync_activehigh ?BIT (0 ) :0 ); + ret |=regmap_update_bits (lt->regmap[I2C_MAIN ],0xab ,BIT (1 ), + hsync_activehigh ?BIT (1 ) :0 ); + ret |=regmap_update_bits (lt->regmap[I2C_MAIN ],0xb2 ,BIT (0 ), + lt->connector.display_info.is_hdmi ?BIT (0 ) :0 ); +return ret; }
drivers/gpu/drm/i915/gt/intel_engine_types.h +15 -0
@@ -155,6 +155,21 @@ struct intel_engine_execlists {*/ struct timer_list preempt; +/** +* @preempt_target: active request at the time of the preemption request +* +* We force a preemption to occur if the pending contexts have not +* been promoted to active upon receipt of the CS ack event within +* the timeout. This timeout maybe chosen based on the target, +* using a very short timeout if the context is no longer schedulable. +* That short timeout may not be applicable to other contexts, so +* if a context switch should happen within before the preemption +* timeout, we may shoot early at an innocent context. To prevent this, +* we record which context was active at the time of the preemption +* request and only reset that context upon the timeout. +*/ +const struct i915_request *preempt_target; +/** * @ccid: identifier for contexts submitted to this engine */
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +20 -1
@@ -1241,6 +1241,9 @@ static unsigned long active_preempt_timeout(struct intel_engine_cs *engine,if (!rq)return 0 ; +/* Only allow ourselves to force reset the currently active context */ + engine->execlists.preempt_target = rq; +/* Force a fast reset for terminated contexts (ignoring sysfs!) */ if (unlikely (intel_context_is_banned (rq->context) ||bad_request (rq)))return 1 ;
@@ -2427,8 +2430,24 @@ static void execlists_submission_tasklet(struct tasklet_struct *t)GEM_BUG_ON (inactive - post >ARRAY_SIZE (post));if (unlikely (preempt_timeout (engine))) { +const struct i915_request *rq = *engine->execlists.active; + +/* +* If after the preempt-timeout expired, we are still on the +* same active request/context as before we initiated the +* preemption, reset the engine. +* +* However, if we have processed a CS event to switch contexts, +* but not yet processed the CS event for the pending +* preemption, reset the timer allowing the new context to +* gracefully exit. +*/ cancel_timer (&engine->execlists.preempt); - engine->execlists.error_interrupt |=ERROR_PREEMPT ; +if (rq == engine->execlists.preempt_target) + engine->execlists.error_interrupt |=ERROR_PREEMPT ; +else +set_timer_ms (&engine->execlists.preempt, +active_preempt_timeout (engine, rq)); }if (unlikely (READ_ONCE (engine->execlists.error_interrupt))) {
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c +11 -4
@@ -544,8 +544,7 @@ static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_ratl, RATL_MASK); static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_thermalert, VR_THERMALERT_MASK); static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_tdc, VR_TDC_MASK); -static const struct attribute *freq_attrs[] = { - &dev_attr_punit_req_freq_mhz.attr, +static const struct attribute *throttle_reason_attrs[] = { &attr_throttle_reason_status.attr, &attr_throttle_reason_pl1.attr, &attr_throttle_reason_pl2.attr,
@@ -594,9 +593,17 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj)if (!is_object_gt (kobj))return ; - ret =sysfs_create_files (kobj, freq_attrs); + ret =sysfs_create_file (kobj, &dev_attr_punit_req_freq_mhz.attr);if (ret)drm_warn (>->i915->drm, -"failed to create gt%u throttle sysfs files (%pe)" , +"failed to create gt%u punit_req_freq_mhz sysfs (%pe)" , gt->info.id,ERR_PTR (ret)); + +if (GRAPHICS_VER (gt->i915) >=11 ) { + ret =sysfs_create_files (kobj, throttle_reason_attrs); +if (ret) +drm_warn (>->i915->drm, +"failed to create gt%u throttle sysfs files (%pe)" , + gt->info.id,ERR_PTR (ret)); + } }
drivers/input/keyboard/snvs_pwrkey.c +1 -1
@@ -20,7 +20,7 @@#include <linux/mfd/syscon.h> #include <linux/regmap.h> -#define SNVS_HPVIDR1_REG 0xF8 +#define SNVS_HPVIDR1_REG 0xBF8#define SNVS_LPSR_REG 0x4C/* LP Status Register */ #define SNVS_LPCR_REG 0x38/* LP Control Register */ #define SNVS_HPSR_REG 0x14
drivers/input/touchscreen/melfas_mip4.c +1 -1
@@ -1453,7 +1453,7 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id) "ce", GPIOD_OUT_LOW);if (IS_ERR (ts->gpio_ce)) { error =PTR_ERR (ts->gpio_ce); -if (error !=EPROBE_DEFER ) +if (error != -EPROBE_DEFER )dev_err (&client->dev,"Failed to get gpio: %d\n" , error);return error;
drivers/media/dvb-core/dvb_vb2.c +11 -0
@@ -354,6 +354,12 @@ int dvb_vb2_reqbufs(struct dvb_vb2_ctx *ctx, struct dmx_requestbuffers *req)int dvb_vb2_querybuf (struct dvb_vb2_ctx *ctx,struct dmx_buffer *b) { +struct vb2_queue *q = &ctx->vb_q; + +if (b->index >= q->num_buffers) { +dprintk (1 ,"[%s] buffer index out of range\n" , ctx->name); +return -EINVAL ; + }vb2_core_querybuf (&ctx->vb_q, b->index, b);dprintk (3 ,"[%s] index=%d\n" , ctx->name, b->index);return 0 ;
@@ -378,8 +384,13 @@ int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp)int dvb_vb2_qbuf (struct dvb_vb2_ctx *ctx,struct dmx_buffer *b) { +struct vb2_queue *q = &ctx->vb_q;int ret; +if (b->index >= q->num_buffers) { +dprintk (1 ,"[%s] buffer index out of range\n" , ctx->name); +return -EINVAL ; + } ret =vb2_core_qbuf (&ctx->vb_q, b->index, b,NULL );if (ret) { dprintk(1, "[%s] index=%d errno=%d\n", ctx->name,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c +3 -6
@@ -228,7 +228,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev) {struct mtk_vcodec_dev *dev;struct video_device *vfd_enc; -struct resource *res;phandle rproc_phandle;enum mtk_vcodec_fw_type fw_type;int ret;
@@ -272,14 +271,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev) goto err_res; } - res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); -if (res ==NULL ) { -dev_err (&pdev->dev,"failed to get irq resource" ); - ret = -ENOENT ; + dev->enc_irq =platform_get_irq (pdev,0 ); +if (dev->enc_irq <0 ) { + ret = dev->enc_irq; goto err_res; } - dev->enc_irq =platform_get_irq (pdev,0 );irq_set_status_flags (dev->enc_irq,IRQ_NOAUTOEN ); ret = devm_request_irq(&pdev->dev, dev->enc_irq, mtk_vcodec_enc_irq_handler,
drivers/media/v4l2-core/v4l2-compat-ioctl32.c +2 -0
@@ -1040,6 +1040,8 @@ int v4l2_compat_get_array_args(struct file *file, void *mbuf, {int err =0 ; +memset (mbuf,0 , array_size); +switch (cmd) {case VIDIOC_G_FMT32 :case VIDIOC_S_FMT32 :
drivers/mmc/host/mmc_hsq.c +1 -1
@@ -34,7 +34,7 @@ static void mmc_hsq_pump_requests(struct mmc_hsq *hsq)spin_lock_irqsave (&hsq->lock, flags);/* Make sure we are not already running a request now */ -if (hsq->mrq) { +if (hsq->mrq || hsq->recovery_halt) {spin_unlock_irqrestore (&hsq->lock, flags);return ; }
drivers/mmc/host/moxart-mmc.c +3 -14
@@ -111,8 +111,8 @@#define CLK_DIV_MASK 0x7f/* REG_BUS_WIDTH */ -#define BUS_WIDTH_8 BIT(2) -#define BUS_WIDTH_4 BIT(1) +#define BUS_WIDTH_4_SUPPORT BIT(3) +#define BUS_WIDTH_4 BIT(2)#define BUS_WIDTH_1 BIT(0)#define MMC_VDD_360 23
@@ -524,9 +524,6 @@ static void moxart_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)case MMC_BUS_WIDTH_4 :writel (BUS_WIDTH_4 , host->base +REG_BUS_WIDTH );break ; -case MMC_BUS_WIDTH_8 : -writel (BUS_WIDTH_8 , host->base +REG_BUS_WIDTH ); -break ;default :writel (BUS_WIDTH_1 , host->base +REG_BUS_WIDTH );break ;
@@ -651,16 +648,8 @@ static int moxart_probe(struct platform_device *pdev)dmaengine_slave_config (host->dma_chan_rx, &cfg); } -switch ((readl (host->base +REG_BUS_WIDTH ) >>3 ) &3 ) { -case 1 : +if (readl (host->base +REG_BUS_WIDTH ) &BUS_WIDTH_4_SUPPORT ) mmc->caps |=MMC_CAP_4_BIT_DATA ; -break ; -case 2 : - mmc->caps |=MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA ; -break ; -default : -break ; - }writel (0 , host->base +REG_INTERRUPT_MASK );
drivers/net/can/c_can/c_can.h +15 -2
@@ -235,9 +235,22 @@ static inline u8 c_can_get_tx_tail(const struct c_can_tx_ring *ring) return ring->tail & (ring->obj_num - 1); } -static inline u8 c_can_get_tx_free (const struct c_can_tx_ring *ring) +static inline u8 c_can_get_tx_free (const struct c_can_priv *priv, +const struct c_can_tx_ring *ring) { -return ring->obj_num - (ring->head - ring->tail); +u8 head =c_can_get_tx_head (ring); +u8 tail =c_can_get_tx_tail (ring); + +if (priv->type ==BOSCH_D_CAN ) +return ring->obj_num - (ring->head - ring->tail); + +/* This is not a FIFO. C/D_CAN sends out the buffers +* prioritized. The lowest buffer number wins. +*/ +if (head < tail) +return 0 ; + +return ring->obj_num - head; }#endif /* C_CAN_H */
drivers/net/can/c_can/c_can_main.c +5 -6
@@ -429,7 +429,7 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,static bool c_can_tx_busy (const struct c_can_priv *priv,const struct c_can_tx_ring *tx_ring) { -if (c_can_get_tx_free (tx_ring) >0 ) +if (c_can_get_tx_free (priv, tx_ring) >0 )return false;netif_stop_queue (priv->dev);
@@ -437,7 +437,7 @@ static bool c_can_tx_busy(const struct c_can_priv *priv,/* Memory barrier before checking tx_free (head and tail) */ smp_mb (); -if (c_can_get_tx_free (tx_ring) ==0 ) { +if (c_can_get_tx_free (priv, tx_ring) ==0 ) { netdev_dbg(priv->dev, "Stopping tx-queue (tx_head=0x%08x, tx_tail=0x%08x, len=%d).\n", tx_ring->head, tx_ring->tail,
@@ -465,7 +465,7 @@ static netdev_tx_t c_can_start_xmit(struct sk_buff *skb, idx =c_can_get_tx_head (tx_ring); tx_ring->head++; -if (c_can_get_tx_free (tx_ring) ==0 ) +if (c_can_get_tx_free (priv, tx_ring) ==0 )netif_stop_queue (dev);if (idx <c_can_get_tx_tail (tx_ring))
@@ -748,7 +748,7 @@ static void c_can_do_tx(struct net_device *dev)return ; tx_ring->tail += pkts; -if (c_can_get_tx_free (tx_ring)) { +if (c_can_get_tx_free (priv, tx_ring)) {/* Make sure that anybody stopping the queue after * this sees the new tx_ring->tail. */
@@ -760,8 +760,7 @@ static void c_can_do_tx(struct net_device *dev) stats->tx_packets += pkts; tail =c_can_get_tx_tail (tx_ring); - -if (tail ==0 ) { +if (priv->type ==BOSCH_D_CAN && tail ==0 ) {u8 head =c_can_get_tx_head (tx_ring);/* Start transmission for all cached messages */
drivers/net/dsa/mt7530.c +9 -6
@@ -506,14 +506,19 @@ static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv)static int mt7531_pad_setup (struct dsa_switch *ds,phy_interface_t interface) { -struct mt7530_priv *priv = ds->priv; +return 0 ; +} + +static void +mt7531_pll_setup (struct mt7530_priv *priv) +{u32 top_sig;u32 hwstrap;u32 xtal;u32 val;if (mt7531_dual_sgmii_supported (priv)) -return 0 ; +return ; val =mt7530_read (priv,MT7531_CREV ); top_sig =mt7530_read (priv,MT7531_TOP_SIG_SR );
@@ -592,8 +597,6 @@ mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface) val |=EN_COREPLL ;mt7530_write (priv,MT7531_PLLGP_EN , val);usleep_range (25 ,35 ); - -return 0 ; } static void
@@ -2310,6 +2313,8 @@ mt7531_setup(struct dsa_switch *ds)SYS_CTRL_PHY_RST |SYS_CTRL_SW_RST | SYS_CTRL_REG_RST); +mt7531_pll_setup (priv); +if (mt7531_dual_sgmii_supported (priv)) { priv->p5_intf_sel =P5_INTF_SEL_GMAC5_SGMII ;
@@ -2863,8 +2868,6 @@ mt7531_cpu_port_config(struct dsa_switch *ds, int port)case 6 : interface =PHY_INTERFACE_MODE_2500BASEX ; -mt7531_pad_setup (ds, interface); - priv->p6_interface = interface;break ;default :
drivers/net/ethernet/cadence/macb_main.c +4 -0
@@ -5092,6 +5092,7 @@ static int __maybe_unused macb_suspend(struct device *dev)if (!(bp->wol &MACB_WOL_ENABLED )) {rtnl_lock ();phylink_stop (bp->phylink); +phy_exit (bp->sgmii_phy);rtnl_unlock ();spin_lock_irqsave (&bp->lock, flags);macb_reset_hw (bp);
@@ -5181,6 +5182,9 @@ static int __maybe_unused macb_resume(struct device *dev)macb_set_rx_mode (netdev);macb_restore_features (bp);rtnl_lock (); +if (!device_may_wakeup (&bp->dev->dev)) +phy_init (bp->sgmii_phy); +phylink_start (bp->phylink);rtnl_unlock ();
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +19 -9
@@ -14,6 +14,7 @@#include "cudbg_entity.h" #include "cudbg_lib.h" #include "cudbg_zlib.h" +#include "cxgb4_tc_mqprio.h" static const u32 t6_tp_pio_array[][IREG_NUM_ELEM ] = { {0x7e40 ,0x7e44 ,0x020 ,28 },/* t6_tp_pio_regs_20_to_3b */
@@ -3458,7 +3459,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,for (i =0 ; i < utxq->ntxq; i++)QDESC_GET_TXQ (&utxq->uldtxq[i].q,cudbg_uld_txq_to_qtype (j), - out_unlock); + out_unlock_uld); } }
@@ -3475,7 +3476,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,for (i =0 ; i < urxq->nrxq; i++)QDESC_GET_RXQ (&urxq->uldrxq[i].rspq,cudbg_uld_rxq_to_qtype (j), - out_unlock); + out_unlock_uld); }/* ULD FLQ */
@@ -3487,7 +3488,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,for (i =0 ; i < urxq->nrxq; i++)QDESC_GET_FLQ (&urxq->uldrxq[i].fl,cudbg_uld_flq_to_qtype (j), - out_unlock); + out_unlock_uld); }/* ULD CIQ */
@@ -3500,29 +3501,34 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,for (i =0 ; i < urxq->nciq; i++)QDESC_GET_RXQ (&urxq->uldrxq[base + i].rspq,cudbg_uld_ciq_to_qtype (j), - out_unlock); + out_unlock_uld); } } +mutex_unlock (&uld_mutex); + +if (!padap->tc_mqprio) + goto out; +mutex_lock (&padap->tc_mqprio->mqprio_mutex);/* ETHOFLD TXQ */ if (s->eohw_txq)for (i =0 ; i < s->eoqsets; i++)QDESC_GET_TXQ (&s->eohw_txq[i].q, -CUDBG_QTYPE_ETHOFLD_TXQ , out); +CUDBG_QTYPE_ETHOFLD_TXQ , out_unlock_mqprio);/* ETHOFLD RXQ and FLQ */ if (s->eohw_rxq) {for (i =0 ; i < s->eoqsets; i++)QDESC_GET_RXQ (&s->eohw_rxq[i].rspq, -CUDBG_QTYPE_ETHOFLD_RXQ , out); +CUDBG_QTYPE_ETHOFLD_RXQ , out_unlock_mqprio);for (i =0 ; i < s->eoqsets; i++)QDESC_GET_FLQ (&s->eohw_rxq[i].fl, -CUDBG_QTYPE_ETHOFLD_FLQ , out); +CUDBG_QTYPE_ETHOFLD_FLQ , out_unlock_mqprio); } -out_unlock: -mutex_unlock (&uld_mutex); +out_unlock_mqprio: +mutex_unlock (&padap->tc_mqprio->mqprio_mutex); out: qdesc_info->qdesc_entry_size =sizeof (*qdesc_entry);
@@ -3559,6 +3565,10 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,#undef QDESC_GETreturn rc; + +out_unlock_uld: +mutex_unlock (&uld_mutex); + goto out; } int cudbg_collect_flash(struct cudbg_init *pdbg_init,
drivers/net/ethernet/intel/ice/ice_txrx.c +1 -1
@@ -1467,7 +1467,7 @@ int ice_napi_poll(struct napi_struct *napi, int budget)bool wd;if (tx_ring->xsk_pool) - wd =ice_xmit_zc (tx_ring,ICE_DESC_UNUSED (tx_ring), budget); + wd =ice_xmit_zc (tx_ring);else if (ice_ring_is_xdp (tx_ring)) wd = true;else
drivers/net/ethernet/intel/ice/ice_xsk.c +68 -95
256 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_xsk.h +2 -5
@@ -26,13 +26,10 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count);bool ice_xsk_any_rx_ring_ena (struct ice_vsi *vsi);void ice_xsk_clean_rx_ring (struct ice_rx_ring *rx_ring);void ice_xsk_clean_xdp_ring (struct ice_tx_ring *xdp_ring); -bool ice_xmit_zc (struct ice_tx_ring *xdp_ring,u32 budget,int napi_budget); +bool ice_xmit_zc (struct ice_tx_ring *xdp_ring);int ice_realloc_zc_buf (struct ice_vsi *vsi,bool zc);#else -static inline bool -ice_xmit_zc (struct ice_tx_ring __always_unused *xdp_ring, -u32 __always_unused budget, -int __always_unused napi_budget) +static inline bool ice_xmit_zc (struct ice_tx_ring __always_unused *xdp_ring) {return false; }
drivers/net/ethernet/mediatek/mtk_eth_soc.h +2 -2
@@ -312,8 +312,8 @@#define MTK_RXD5_PPE_CPU_REASON GENMASK(22, 18)#define MTK_RXD5_SRC_PORT GENMASK(29, 26) -#define RX_DMA_GET_SPORT (x) (((x) >> 19) & 0xf) -#define RX_DMA_GET_SPORT_V2 (x) (((x) >> 26) & 0x7) +#define RX_DMA_GET_SPORT (x) (((x) >> 19) & 0x7) +#define RX_DMA_GET_SPORT_V2 (x) (((x) >> 26) & 0xf)/* PDMA V2 descriptor rxd3 */ #define RX_DMA_VTAG_V2 BIT(0)
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c +2 -2
@@ -246,8 +246,8 @@ int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv) } priv->clk_io =devm_ioremap (dev, res->start,resource_size (res)); -if (IS_ERR (priv->clk_io)) -return PTR_ERR (priv->clk_io); +if (!priv->clk_io) +return -ENOMEM ;mlxbf_gige_mdio_cfg (priv);
drivers/net/ethernet/mscc/ocelot.c +7 -0
@@ -290,6 +290,13 @@ static int ocelot_port_num_untagged_vlans(struct ocelot *ocelot, int port)if (!(vlan->portmask &BIT (port)))continue ; +/* Ignore the VLAN added by ocelot_add_vlan_unaware_pvid(), +* because this is never active in hardware at the same time as +* the bridge VLANs, which only matter in VLAN-aware mode. +*/ +if (vlan->vid >=OCELOT_RSV_VLAN_RANGE_START ) +continue ; +if (vlan->untagged &BIT (port)) num_untagged++; }
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +13 -10
@@ -3704,6 +3704,15 @@ static int stmmac_open(struct net_device *dev) goto init_error; } +if (priv->plat->serdes_powerup) { + ret = priv->plat->serdes_powerup (dev, priv->plat->bsp_priv); +if (ret <0 ) { +netdev_err (priv->dev,"%s: Serdes powerup failed\n" , + __func__); + goto init_error; + } + } + ret =stmmac_hw_setup (dev, true);if (ret <0 ) {netdev_err (priv->dev,"%s: Hw setup failed\n" , __func__);
@@ -3793,6 +3802,10 @@ static int stmmac_release(struct net_device *dev)/* Disable the MAC Rx/Tx */ stmmac_mac_set (priv, priv->ioaddr, false); +/* Powerdown Serdes if there is */ +if (priv->plat->serdes_powerdown) + priv->plat->serdes_powerdown (dev, priv->plat->bsp_priv); +netif_carrier_off (dev);stmmac_release_ptp (priv);
@@ -7158,14 +7171,6 @@ int stmmac_dvr_probe(struct device *device, goto error_netdev_register; } -if (priv->plat->serdes_powerup) { - ret = priv->plat->serdes_powerup (ndev, - priv->plat->bsp_priv); - -if (ret <0 ) - goto error_serdes_powerup; - } -#ifdef CONFIG_DEBUG_FS stmmac_init_fs (ndev);#endif
@@ -7180,8 +7185,6 @@ int stmmac_dvr_probe(struct device *device,return ret; -error_serdes_powerup: -unregister_netdev (ndev); error_netdev_register:phylink_destroy (priv->phylink); error_xpcs_setup:
drivers/net/phy/phy_device.c +6 -4
@@ -316,11 +316,13 @@ static __maybe_unused int mdio_bus_phy_resume(struct device *dev) phydev->suspended_by_mdio_bus =0 ; -/* If we manged to get here with the PHY state machine in a state neither -* PHY_HALTED nor PHY_READY this is an indication that something went wrong -* and we should most likely be using MAC managed PM and we are not. +/* If we managed to get here with the PHY state machine in a state +* neither PHY_HALTED, PHY_READY nor PHY_UP, this is an indication +* that something went wrong and we should most likely be using +* MAC managed PM, but we are not. */ -WARN_ON (phydev->state !=PHY_HALTED && phydev->state !=PHY_READY ); +WARN_ON (phydev->state !=PHY_HALTED && phydev->state !=PHY_READY && + phydev->state !=PHY_UP ); ret =phy_init_hw (phydev);if (ret <0 )
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1399,6 +1399,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ {QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */ {QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */ + {QMI_FIXED_INTF(0x413c, 0x81c2, 8)}, /* Dell Wireless 5811e */ {QMI_FIXED_INTF(0x413c, 0x81cc, 8)}, /* Dell Wireless 5816e */ {QMI_FIXED_INTF(0x413c, 0x81d7, 0)}, /* Dell Wireless 5821e */ {QMI_FIXED_INTF(0x413c, 0x81d7, 1)}, /* Dell Wireless 5821e preproduction config */
drivers/net/usb/usbnet.c +6 -1
@@ -1601,6 +1601,7 @@ void usbnet_disconnect (struct usb_interface *intf)struct usbnet *dev;struct usb_device *xdev;struct net_device *net; +struct urb *urb; dev =usb_get_intfdata (intf);usb_set_intfdata (intf,NULL );
@@ -1617,7 +1618,11 @@ void usbnet_disconnect (struct usb_interface *intf) net = dev->net;unregister_netdev (net); -usb_scuttle_anchored_urbs (&dev->deferred); +while ((urb =usb_get_from_anchor (&dev->deferred))) { +dev_kfree_skb (urb->context); +kfree (urb->sg); +usb_free_urb (urb); + }if (dev->driver_info->unbind) dev->driver_info->unbind (dev, intf);
drivers/nvme/host/core.c +3 -3
@@ -2069,14 +2069,14 @@ static int nvme_pr_preempt(struct block_device *bdev, u64 old, u64 new,static int nvme_pr_clear (struct block_device *bdev,u64 key) { -u32 cdw10 =1 | (key ?1 <<3 :0 ); +u32 cdw10 =1 | (key ?0 :1 <<3 ); -return nvme_pr_command (bdev, cdw10, key,0 , nvme_cmd_resv_register); +return nvme_pr_command (bdev, cdw10, key,0 , nvme_cmd_resv_release); }static int nvme_pr_release (struct block_device *bdev,u64 key,enum pr_type type) { -u32 cdw10 =nvme_pr_type (type) <<8 | (key ?1 <<3 :0 ); +u32 cdw10 =nvme_pr_type (type) <<8 | (key ?0 :1 <<3 );return nvme_pr_command (bdev, cdw10, key,0 , nvme_cmd_resv_release); }
drivers/reset/reset-imx7.c +1 -0
@@ -329,6 +329,7 @@ static int imx8mp_reset_set(struct reset_controller_dev *rcdev,break ;case IMX8MP_RESET_PCIE_CTRL_APPS_EN : +case IMX8MP_RESET_PCIEPHY_PERST : value = assert ?0 : bit;break ; }
drivers/soc/sunxi/sunxi_sram.c +10 -13
@@ -78,8 +78,8 @@ static struct sunxi_sram_desc sun4i_a10_sram_d = {static struct sunxi_sram_desc sun50i_a64_sram_c = { .data =SUNXI_SRAM_DATA ("C" ,0x4 ,24 ,1 , -SUNXI_SRAM_MAP (0 ,1 ,"cpu" ), -SUNXI_SRAM_MAP (1 ,0 ,"de2" )), +SUNXI_SRAM_MAP (1 ,0 ,"cpu" ), +SUNXI_SRAM_MAP (0 ,1 ,"de2" )), };static const struct of_device_id sunxi_sram_dt_ids[] = {
@@ -254,6 +254,7 @@ int sunxi_sram_claim(struct device *dev)writel (val | ((device << sram_data->offset) & mask), base + sram_data->reg); + sram_desc->claimed = true;spin_unlock (&sram_lock);return 0 ;
@@ -329,11 +330,11 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = { .writeable_reg = sunxi_sram_regmap_accessible_reg, }; -static int sunxi_sram_probe (struct platform_device *pdev) +static int __init sunxi_sram_probe (struct platform_device *pdev) { -struct dentry *d;struct regmap *emac_clock;const struct sunxi_sramc_variant *variant; +struct device *dev = &pdev->dev; sram_dev = &pdev->dev;
@@ -345,13 +346,6 @@ static int sunxi_sram_probe(struct platform_device *pdev)if (IS_ERR (base))return PTR_ERR (base); -of_platform_populate (pdev->dev.of_node,NULL ,NULL , &pdev->dev); - - d =debugfs_create_file ("sram" ,S_IRUGO ,NULL ,NULL , - &sunxi_sram_fops); -if (!d) -return -ENOMEM ; -if (variant->num_emac_clocks >0 ) { emac_clock =devm_regmap_init_mmio (&pdev->dev, base, &sunxi_sram_emac_clock_regmap);
@@ -360,6 +354,10 @@ static int sunxi_sram_probe(struct platform_device *pdev)return PTR_ERR (emac_clock); } +of_platform_populate (dev->of_node,NULL ,NULL , dev); + +debugfs_create_file ("sram" ,0444 ,NULL ,NULL , &sunxi_sram_fops); +return 0 ; }
@@ -409,9 +407,8 @@ static struct platform_driver sunxi_sram_driver = { .name = "sunxi-sram", .of_match_table = sunxi_sram_dt_match, }, - .probe = sunxi_sram_probe, }; -module_platform_driver (sunxi_sram_driver); +builtin_platform_driver_probe (sunxi_sram_driver, sunxi_sram_probe);MODULE_AUTHOR ("Maxime Ripard <[email protected]>" );MODULE_DESCRIPTION ("Allwinner sunXi SRAM Controller Driver" );
drivers/staging/media/rkvdec/rkvdec-h264.c +2 -2
@@ -1175,8 +1175,8 @@ static int rkvdec_h264_run(struct rkvdec_ctx *ctx)schedule_delayed_work (&rkvdec->watchdog_work,msecs_to_jiffies (2000 )); -writel (0xffffffff , rkvdec->regs +RKVDEC_REG_STRMD_ERR_EN ); -writel (0xffffffff , rkvdec->regs +RKVDEC_REG_H264_ERR_E ); +writel (0 , rkvdec->regs +RKVDEC_REG_STRMD_ERR_EN ); +writel (0 , rkvdec->regs +RKVDEC_REG_H264_ERR_E );writel (1 , rkvdec->regs +RKVDEC_REG_PREF_LUMA_CACHE_COMMAND );writel (1 , rkvdec->regs +RKVDEC_REG_PREF_CHR_CACHE_COMMAND );
drivers/thunderbolt/switch.c +1 -0
@@ -2413,6 +2413,7 @@ int tb_switch_configure(struct tb_switch *sw)* additional capabilities. */ sw->config.cmuv =USB4_VERSION_1_0 ; + sw->config.plug_events_delay =0xa ;/* Enumerate the switch */ ret = tb_sw_write(sw, (u32 *)&sw->config + 1, TB_CFG_SWITCH,
drivers/usb/storage/unusual_uas.h +21 -0
@@ -52,6 +52,13 @@ UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME), +/* Reported-by: Hongling Zeng <[email protected]> */ +UNUSUAL_DEV (0x090c ,0x2000 ,0x0000 ,0x9999 , +"Hiksemi" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_IGNORE_UAS), +/* * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI * commands in UAS mode. Observed with the 1.28 firmware; are there others?
@@ -76,6 +83,13 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_LUNS), +/* Reported-by: Hongling Zeng <[email protected]> */ +UNUSUAL_DEV (0x0bda ,0x9210 ,0x0000 ,0x9999 , +"Hiksemi" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_IGNORE_UAS ), +/* Reported-by: Benjamin Tissoires <[email protected]> */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation",
@@ -118,6 +132,13 @@ UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), +/* Reported-by: Hongling Zeng <[email protected]> */ +UNUSUAL_DEV (0x17ef ,0x3899 ,0x0000 ,0x9999 , +"Thinkplus" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_IGNORE_UAS ), +/* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, "VIA",
drivers/usb/typec/ucsi/ucsi.c +0 -2
@@ -588,8 +588,6 @@ static int ucsi_get_pdos(struct ucsi_connector *con, int is_partner, num_pdos * sizeof(u32));if (ret <0 && ret != -ETIMEDOUT )dev_err (ucsi->dev,"UCSI_GET_PDOS failed (%d)\n" , ret); -if (ret ==0 && offset ==0 ) -dev_warn (ucsi->dev,"UCSI_GET_PDOS returned 0 bytes\n" );return ret; }
drivers/vdpa/ifcvf/ifcvf_base.c +2 -2
@@ -315,7 +315,7 @@ u16 ifcvf_get_vq_state(struct ifcvf_hw *hw, u16 qid)u32 q_pair_id; ifcvf_lm = (struct ifcvf_lm_cfg __iomem *)hw->lm_cfg; - q_pair_id = qid / hw->nr_vring; + q_pair_id = qid /2 ; avail_idx_addr = &ifcvf_lm->vring_lm_cfg[q_pair_id].idx_addr[qid %2 ]; last_avail_idx =vp_ioread16 (avail_idx_addr);
@@ -329,7 +329,7 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u16 num)u32 q_pair_id; ifcvf_lm = (struct ifcvf_lm_cfg __iomem *)hw->lm_cfg; - q_pair_id = qid / hw->nr_vring; + q_pair_id = qid /2 ; avail_idx_addr = &ifcvf_lm->vring_lm_cfg[q_pair_id].idx_addr[qid %2 ]; hw->vring[qid].last_avail_idx = num;vp_iowrite16 (num, avail_idx_addr);
drivers/vdpa/mlx5/net/mlx5_vnet.c +10 -7
@@ -1297,6 +1297,8 @@ static void teardown_vq(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *static int create_rqt (struct mlx5_vdpa_net *ndev) { +int rqt_table_size =roundup_pow_of_two (ndev->rqt_size); +int act_sz =roundup_pow_of_two (ndev->cur_num_vqs /2 );__be32 *list;void *rqtc;int inlen;
@@ -1304,7 +1306,7 @@ static int create_rqt(struct mlx5_vdpa_net *ndev)int i, j;int err; - inlen =MLX5_ST_SZ_BYTES (create_rqt_in) + ndev->rqt_size *MLX5_ST_SZ_BYTES (rq_num); + inlen =MLX5_ST_SZ_BYTES (create_rqt_in) + rqt_table_size *MLX5_ST_SZ_BYTES (rq_num); in =kzalloc (inlen,GFP_KERNEL );if (!in)return -ENOMEM ;
@@ -1313,12 +1315,12 @@ static int create_rqt(struct mlx5_vdpa_net *ndev) rqtc =MLX5_ADDR_OF (create_rqt_in, in, rqt_context);MLX5_SET (rqtc, rqtc, list_q_type,MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q ); -MLX5_SET (rqtc, rqtc, rqt_max_size, ndev->rqt_size); +MLX5_SET (rqtc, rqtc, rqt_max_size, rqt_table_size); list =MLX5_ADDR_OF (rqtc, rqtc, rq_num[0 ]); -for (i =0 , j =0 ; i < ndev->rqt_size; i++, j +=2 ) +for (i =0 , j =0 ; i < act_sz; i++, j +=2 ) list[i] =cpu_to_be32 (ndev->vqs[j % ndev->cur_num_vqs].virtq_id); -MLX5_SET (rqtc, rqtc, rqt_actual_size, ndev->rqt_size); +MLX5_SET (rqtc, rqtc, rqt_actual_size, act_sz); err =mlx5_vdpa_create_rqt (&ndev->mvdev, in, inlen, &ndev->res.rqtn);kfree (in);if (err)
@@ -1331,6 +1333,7 @@ static int create_rqt(struct mlx5_vdpa_net *ndev)static int modify_rqt (struct mlx5_vdpa_net *ndev,int num) { +int act_sz =roundup_pow_of_two (num /2 );__be32 *list;void *rqtc;int inlen;
@@ -1338,7 +1341,7 @@ static int modify_rqt(struct mlx5_vdpa_net *ndev, int num)int i, j;int err; - inlen =MLX5_ST_SZ_BYTES (modify_rqt_in) + ndev->rqt_size *MLX5_ST_SZ_BYTES (rq_num); + inlen =MLX5_ST_SZ_BYTES (modify_rqt_in) + act_sz *MLX5_ST_SZ_BYTES (rq_num); in =kzalloc (inlen,GFP_KERNEL );if (!in)return -ENOMEM ;
@@ -1349,10 +1352,10 @@ static int modify_rqt(struct mlx5_vdpa_net *ndev, int num)MLX5_SET (rqtc, rqtc, list_q_type,MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q ); list =MLX5_ADDR_OF (rqtc, rqtc, rq_num[0 ]); -for (i =0 , j =0 ; i < ndev->rqt_size; i++, j +=2 ) +for (i =0 , j =0 ; i < act_sz; i++, j = j +2 ) list[i] =cpu_to_be32 (ndev->vqs[j % num].virtq_id); -MLX5_SET (rqtc, rqtc, rqt_actual_size, ndev->rqt_size); +MLX5_SET (rqtc, rqtc, rqt_actual_size, act_sz); err =mlx5_vdpa_modify_rqt (&ndev->mvdev, in, inlen, ndev->res.rqtn);kfree (in);if (err)
drivers/vdpa/vdpa_user/vduse_dev.c +7 -2
@@ -662,10 +662,15 @@ static void vduse_vdpa_get_config(struct vdpa_device *vdpa, unsigned int offset, {struct vduse_dev *dev =vdpa_to_vduse (vdpa); -if (offset > dev->config_size || - len > dev->config_size - offset) +/* Initialize the buffer in case of partial copy. */ +memset (buf,0 , len); + +if (offset > dev->config_size)return ; +if (len > dev->config_size - offset) + len = dev->config_size - offset; +memcpy (buf, dev->config + offset, len); }
fs/ntfs/super.c +2 -1
@@ -2092,7 +2092,8 @@ static bool load_system_files(ntfs_volume *vol)// TODO: Initialize security. /* Get the extended system files' directory inode. */ vol->extend_ino =ntfs_iget (sb, FILE_Extend); -if (IS_ERR (vol->extend_ino) ||is_bad_inode (vol->extend_ino)) { +if (IS_ERR (vol->extend_ino) ||is_bad_inode (vol->extend_ino) || + !S_ISDIR (vol->extend_ino->i_mode)) {if (!IS_ERR (vol->extend_ino))iput (vol->extend_ino);ntfs_error (sb,"Failed to load $Extend." );
mm/damon/dbgfs.c +14 -5
@@ -853,6 +853,7 @@ static int dbgfs_rm_context(char *name)struct dentry *root, *dir, **new_dirs;struct damon_ctx **new_ctxs;int i, j; +int ret =0 ;if (damon_nr_running_ctxs ())return -EBUSY ;
@@ -867,14 +868,16 @@ static int dbgfs_rm_context(char *name) new_dirs =kmalloc_array (dbgfs_nr_ctxs -1 ,sizeof (*dbgfs_dirs),GFP_KERNEL ); -if (!new_dirs) -return -ENOMEM ; +if (!new_dirs) { + ret = -ENOMEM ; + goto out_dput; + } new_ctxs =kmalloc_array (dbgfs_nr_ctxs -1 ,sizeof (*dbgfs_ctxs),GFP_KERNEL );if (!new_ctxs) { -kfree (new_dirs); -return -ENOMEM ; + ret = -ENOMEM ; + goto out_new_dirs; }for (i =0 , j =0 ; i < dbgfs_nr_ctxs; i++) {
@@ -894,7 +897,13 @@ static int dbgfs_rm_context(char *name) dbgfs_ctxs = new_ctxs; dbgfs_nr_ctxs--; -return 0 ; + goto out_dput; + +out_new_dirs: +kfree (new_dirs); +out_dput: +dput (dir); +return ret; } static ssize_t dbgfs_rm_context_write(struct file *file,
mm/damon/sysfs.c +1 -1
@@ -2181,13 +2181,13 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target,if (!t)return -ENOMEM ; +damon_add_target (ctx, t);if (ctx->ops.id ==DAMON_OPS_VADDR || ctx->ops.id ==DAMON_OPS_FVADDR ) { t->pid =find_get_pid (sys_target->pid);if (!t->pid) goto destroy_targets_out; } -damon_add_target (ctx, t); err =damon_sysfs_set_regions (t, sys_target->regions);if (err) goto destroy_targets_out;
mm/frontswap.c +3 -0
@@ -125,6 +125,9 @@ void frontswap_init(unsigned type, unsigned long *map)* p->frontswap set to something valid to work properly. */ frontswap_map_set (sis, map); + +if (!frontswap_enabled ()) +return ; frontswap_ops->init (type); }
mm/gup.c +28 -6
@@ -2278,8 +2278,28 @@ static void __maybe_unused undo_dev_pagemap(int *nr, int nr_start, }#ifdef CONFIG_ARCH_HAS_PTE_SPECIAL -static int gup_pte_range (pmd_t pmd,unsigned long addr,unsigned long end, -unsigned int flags,struct page **pages,int *nr) +/* +* Fast-gup relies on pte change detection to avoid concurrent pgtable +* operations. +* +* To pin the page, fast-gup needs to do below in order: +* (1) pin the page (by prefetching pte), then (2) check pte not changed. +* +* For the rest of pgtable operations where pgtable updates can be racy +* with fast-gup, we need to do (1) clear pte, then (2) check whether page +* is pinned. +* +* Above will work for all pte-level operations, including THP split. +* +* For THP collapse, it's a bit more complicated because fast-gup may be +* walking a pgtable page that is being freed (pte is still valid but pmd +* can be cleared already). To avoid race in such condition, we need to +* also check pmd here to make sure pmd doesn't change (corresponds to +* pmdp_collapse_flush() in the THP collapse code path). +*/ +static int gup_pte_range (pmd_t pmd,pmd_t *pmdp,unsigned long addr, +unsigned long end,unsigned int flags, +struct page **pages,int *nr) {struct dev_pagemap *pgmap =NULL ;int nr_start = *nr, ret =0 ;
@@ -2325,7 +2345,8 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end, goto pte_unmap; } -if (unlikely (pte_val (pte) !=pte_val (*ptep))) { +if (unlikely (pmd_val (pmd) !=pmd_val (*pmdp)) || +unlikely (pte_val (pte) !=pte_val (*ptep))) {gup_put_folio (folio,1 , flags); goto pte_unmap; }
@@ -2372,8 +2393,9 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,* get_user_pages_fast_only implementation that can pin pages. Thus it's still * useful to have gup_huge_pmd even if we can't operate on ptes. */ -static int gup_pte_range (pmd_t pmd,unsigned long addr,unsigned long end, -unsigned int flags,struct page **pages,int *nr) +static int gup_pte_range (pmd_t pmd,pmd_t *pmdp,unsigned long addr, +unsigned long end,unsigned int flags, +struct page **pages,int *nr) {return 0 ; }
@@ -2697,7 +2719,7 @@ static int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, unsigned loif (!gup_huge_pd (__hugepd (pmd_val (pmd)), addr,PMD_SHIFT , next, flags, pages, nr))return 0 ; - }else if (!gup_pte_range (pmd, addr, next, flags, pages, nr)) + }else if (!gup_pte_range (pmd, pmdp, addr, next, flags, pages, nr))return 0 ; }while (pmdp++, addr = next, addr != end);
mm/hugetlb.c +8 -6
@@ -3418,6 +3418,7 @@ static int demote_free_huge_page(struct hstate *h, struct page *page) {int i, nid =page_to_nid (page);struct hstate *target_hstate; +struct page *subpage;int rc =0 ; target_hstate =size_to_hstate (PAGE_SIZE << h->demote_order);
@@ -3451,15 +3452,16 @@ static int demote_free_huge_page(struct hstate *h, struct page *page)mutex_lock (&target_hstate->resize_lock);for (i =0 ; i <pages_per_huge_page (h); i +=pages_per_huge_page (target_hstate)) { + subpage =nth_page (page, i);if (hstate_is_gigantic (target_hstate)) -prep_compound_gigantic_page_for_demote (page + i, +prep_compound_gigantic_page_for_demote (subpage, target_hstate->order);else -prep_compound_page (page + i, target_hstate->order); -set_page_private (page + i,0 ); -set_page_refcounted (page + i); -prep_new_huge_page (target_hstate, page + i, nid); -put_page (page + i); +prep_compound_page (subpage, target_hstate->order); +set_page_private (subpage,0 ); +set_page_refcounted (subpage); +prep_new_huge_page (target_hstate, subpage, nid); +put_page (subpage); }mutex_unlock (&target_hstate->resize_lock);
mm/khugepaged.c +6 -4
@@ -1121,10 +1121,12 @@ static void collapse_huge_page(struct mm_struct *mm, pmd_ptl =pmd_lock (mm, pmd);/* probably unnecessary */ /* -* After this gup_fast can't run anymore. This also removes -* any huge TLB entry from the CPU so we won't allow -* huge and small TLB entries for the same virtual address -* to avoid the risk of CPU bugs in that area. +* This removes any huge TLB entry from the CPU so we won't allow +* huge and small TLB entries for the same virtual address to +* avoid the risk of CPU bugs in that area. +* +* Parallel fast GUP is fine since fast GUP will back off when +* it detects PMD is changed. */ _pmd =pmdp_collapse_flush (vma, address, pmd);spin_unlock (pmd_ptl);
mm/madvise.c +5 -2
@@ -451,8 +451,11 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,continue ; } -/* Do not interfere with other mappings of this page */ -if (page_mapcount (page) !=1 ) +/* +* Do not interfere with other mappings of this page and +* non-LRU page. +*/ +if (!PageLRU (page) ||page_mapcount (page) !=1 )continue ;VM_BUG_ON_PAGE (PageTransCompound (page), page);
mm/memory-failure.c +3 -0
@@ -697,6 +697,9 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn, }; priv.tk.tsk = p; +if (!p->mm) +return -EFAULT ; +mmap_read_lock (p->mm); ret =walk_page_range (p->mm,0 ,TASK_SIZE , &hwp_walk_ops, (void *)&priv);
mm/memory.c +10 -4
@@ -4378,14 +4378,20 @@ vm_fault_t finish_fault(struct vm_fault *vmf) vmf->pte =pte_offset_map_lock (vma->vm_mm, vmf->pmd, vmf->address, &vmf->ptl); - ret =0 ; +/* Re-check under ptl */ -if (likely (!vmf_pte_changed (vmf))) +if (likely (!vmf_pte_changed (vmf))) {do_set_pte (vmf, page, vmf->address); -else + +/* no need to invalidate: a not-present page won't be cached */ +update_mmu_cache (vma, vmf->address, vmf->pte); + + ret =0 ; + }else { +update_mmu_tlb (vma, vmf->address, vmf->pte); ret =VM_FAULT_NOPAGE ; + } -update_mmu_tlb (vma, vmf->address, vmf->pte);pte_unmap_unlock (vmf->pte, vmf->ptl);return ret; }
mm/migrate_device.c +11 -5
@@ -7,6 +7,7 @@#include <linux/export.h> #include <linux/memremap.h> #include <linux/migrate.h> +#include <linux/mm.h> #include <linux/mm_inline.h> #include <linux/mmu_notifier.h> #include <linux/oom.h>
@@ -187,10 +188,10 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,bool anon_exclusive;pte_t swp_pte; +flush_cache_page (vma, addr,pte_pfn (*ptep)); anon_exclusive =PageAnon (page) &&PageAnonExclusive (page);if (anon_exclusive) { -flush_cache_page (vma, addr,pte_pfn (*ptep)); -ptep_clear_flush (vma, addr, ptep); + pte =ptep_clear_flush (vma, addr, ptep);if (page_try_share_anon_rmap (page)) {set_pte_at (mm, addr, ptep, pte);
@@ -200,11 +201,15 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, goto next; } }else { -ptep_get_and_clear (mm, addr, ptep); + pte =ptep_get_and_clear (mm, addr, ptep); } migrate->cpages++; +/* Set the dirty flag on the folio now the pte is gone. */ +if (pte_dirty (pte)) +folio_mark_dirty (page_folio (page)); +/* Setup special migration page table entry */ if (mpfn &MIGRATE_PFN_WRITE ) entry = make_writable_migration_entry(
@@ -248,13 +253,14 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, migrate->dst[migrate->npages] =0 ; migrate->src[migrate->npages++] = mpfn; } -arch_leave_lazy_mmu_mode (); -pte_unmap_unlock (ptep -1 , ptl);/* Only flush the TLB if we actually modified any entries */ if (unmapped)flush_tlb_range (walk->vma, start, end); +arch_leave_lazy_mmu_mode (); +pte_unmap_unlock (ptep -1 , ptl); +return 0 ; }
mm/page_alloc.c +55 -10
118 lines not on this page · raw message
mm/page_isolation.c +14 -11
@@ -288,6 +288,7 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages)* @isolate_before: isolate the pageblock before the boundary_pfn * @skip_isolation: the flag to skip the pageblock isolation in second * isolate_single_pageblock() +* @migratetype: migrate type to set in error recovery. * * Free and in-use pages can be as big as MAX_ORDER-1 and contain more than one * pageblock. When not all pageblocks within a page are isolated at the same
@@ -302,9 +303,9 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages)* the in-use page then splitting the free page. */ static int isolate_single_pageblock (unsigned long boundary_pfn,int flags, -gfp_t gfp_flags,bool isolate_before,bool skip_isolation) +gfp_t gfp_flags,bool isolate_before,bool skip_isolation, +int migratetype) { -unsigned char saved_mt;unsigned long start_pfn;unsigned long isolate_pageblock;unsigned long pfn;
@@ -328,13 +329,13 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags, start_pfn =max (ALIGN_DOWN (isolate_pageblock,MAX_ORDER_NR_PAGES ), zone->zone_start_pfn); - saved_mt =get_pageblock_migratetype (pfn_to_page (isolate_pageblock)); +if (skip_isolation) { +int mt =get_pageblock_migratetype (pfn_to_page (isolate_pageblock)); -if (skip_isolation) -VM_BUG_ON (!is_migrate_isolate (saved_mt)); -else { - ret =set_migratetype_isolate (pfn_to_page (isolate_pageblock), saved_mt, flags, - isolate_pageblock, isolate_pageblock + pageblock_nr_pages); +VM_BUG_ON (!is_migrate_isolate (mt)); + }else { + ret =set_migratetype_isolate (pfn_to_page (isolate_pageblock), migratetype, + flags, isolate_pageblock, isolate_pageblock + pageblock_nr_pages);if (ret)return ret;
@@ -475,7 +476,7 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags, failed:/* restore the original migratetype */ if (!skip_isolation) -unset_migratetype_isolate (pfn_to_page (isolate_pageblock), saved_mt); +unset_migratetype_isolate (pfn_to_page (isolate_pageblock), migratetype);return -EBUSY ; }
@@ -537,7 +538,8 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,bool skip_isolation = false;/* isolate [isolate_start, isolate_start + pageblock_nr_pages) pageblock */ - ret =isolate_single_pageblock (isolate_start, flags, gfp_flags, false, skip_isolation); + ret =isolate_single_pageblock (isolate_start, flags, gfp_flags, false, + skip_isolation, migratetype);if (ret)return ret;
@@ -545,7 +547,8 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, skip_isolation = true;/* isolate [isolate_end - pageblock_nr_pages, isolate_end) pageblock */ - ret =isolate_single_pageblock (isolate_end, flags, gfp_flags, true, skip_isolation); + ret =isolate_single_pageblock (isolate_end, flags, gfp_flags, true, + skip_isolation, migratetype);if (ret) {unset_migratetype_isolate (pfn_to_page (isolate_start), migratetype);return ret;
mm/secretmem.c +1 -1
@@ -283,7 +283,7 @@ static int secretmem_init(void) secretmem_mnt =kern_mount (&secretmem_fs);if (IS_ERR (secretmem_mnt)) - ret =PTR_ERR (secretmem_mnt); +return PTR_ERR (secretmem_mnt);/* prevent secretmem mappings from ever getting PROT_EXEC */ secretmem_mnt->mnt_flags |=MNT_NOEXEC ;
mm/util.c +4 -0
@@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)if (ret || size <=PAGE_SIZE )return ret; +/* non-sleeping allocations are not supported by vmalloc */ +if (!gfpflags_allow_blocking (flags)) +return NULL ; +/* Don't even allow crazy sizes */ if (unlikely (size >INT_MAX )) {WARN_ON_ONCE (!(flags & __GFP_NOWARN));
net/mac80211/rc80211_minstrel_ht.c +4 -2
@@ -10,6 +10,7 @@#include <linux/random.h> #include <linux/moduleparam.h> #include <linux/ieee80211.h> +#include <linux/minmax.h> #include <net/mac80211.h> #include "rate.h" #include "sta_info.h"
@@ -1550,6 +1551,7 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) {struct ieee80211_sta_rates *rates;int i =0 ; +int max_rates =min_t (int, mp->hw->max_rates,IEEE80211_TX_RATE_TABLE_SIZE ); rates =kzalloc (sizeof (*rates),GFP_ATOMIC );if (!rates)
@@ -1559,10 +1561,10 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)minstrel_ht_set_rate (mp, mi, rates, i++, mi->max_tp_rate[0 ]);/* Fill up remaining, keep one entry for max_probe_rate */ -for (; i < (mp->hw->max_rates -1 ); i++) +for (; i < (max_rates -1 ); i++)minstrel_ht_set_rate (mp, mi, rates, i, mi->max_tp_rate[i]); -if (i < mp->hw->max_rates) +if (i < max_rates)minstrel_ht_set_rate (mp, mi, rates, i++, mi->max_prob_rate);if (i <IEEE80211_TX_RATE_TABLE_SIZE )
net/mac80211/tx.c +4 -0
@@ -5761,6 +5761,9 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,skb_reset_network_header (skb);skb_reset_mac_header (skb); +if (local->hw.queues <IEEE80211_NUM_ACS ) + goto start_xmit; +/* update QoS header to prioritize control port frames if possible, * priorization also happens for control port frames send over * AF_PACKET
@@ -5776,6 +5779,7 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,rcu_read_unlock (); +start_xmit:/* mutex lock is only needed for incrementing the cookie counter */ mutex_lock (&local->mtx);
net/mac80211/util.c +2 -2
@@ -301,14 +301,14 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)local_bh_disable ();spin_lock (&fq->lock); + sdata->vif.txqs_stopped[ac] = false; +if (!test_bit (SDATA_STATE_RUNNING , &sdata->state)) goto out;if (sdata->vif.type ==NL80211_IFTYPE_AP ) ps = &sdata->bss->ps; - sdata->vif.txqs_stopped[ac] = false; -list_for_each_entry_rcu (sta, &local->sta_list, list) {if (sdata != sta->sdata)continue ;
net/mptcp/protocol.c +13 -3
@@ -2692,7 +2692,7 @@ static void __mptcp_clear_xmit(struct sock *sk)dfrag_clear (sk, dfrag); } -static void mptcp_cancel_work (struct sock *sk) +void mptcp_cancel_work (struct sock *sk) {struct mptcp_sock *msk =mptcp_sk (sk);
@@ -2832,13 +2832,12 @@ static void __mptcp_destroy_sock(struct sock *sk)sock_put (sk); } -static void mptcp_close (struct sock *sk,long timeout) +bool __mptcp_close (struct sock *sk,long timeout) {struct mptcp_subflow_context *subflow;struct mptcp_sock *msk =mptcp_sk (sk);bool do_cancel_work = false; -lock_sock (sk); sk->sk_shutdown =SHUTDOWN_MASK ;if ((1 << sk->sk_state) & (TCPF_LISTEN |TCPF_CLOSE )) {
@@ -2880,6 +2879,17 @@ static void mptcp_close(struct sock *sk, long timeout) }else {mptcp_reset_timeout (msk,0 ); } + +return do_cancel_work; +} + +static void mptcp_close (struct sock *sk,long timeout) +{ +bool do_cancel_work; + +lock_sock (sk); + + do_cancel_work =__mptcp_close (sk, timeout);release_sock (sk);if (do_cancel_work)mptcp_cancel_work (sk);
net/mptcp/protocol.h +2 -0
@@ -613,6 +613,8 @@ void mptcp_subflow_reset(struct sock *ssk);void mptcp_subflow_queue_clean (struct sock *ssk);void mptcp_sock_graft (struct sock *sk,struct socket *parent);struct socket *__mptcp_nmpc_socket (const struct mptcp_sock *msk); +bool __mptcp_close (struct sock *sk,long timeout); +void mptcp_cancel_work (struct sock *sk);bool mptcp_addresses_equal (const struct mptcp_addr_info *a,const struct mptcp_addr_info *b,bool use_port);
net/mptcp/subflow.c +7 -26
@@ -602,30 +602,6 @@ static bool subflow_hmac_valid(const struct request_sock *req,return !crypto_memneq (hmac, mp_opt->hmac,MPTCPOPT_HMAC_LEN ); } -static void mptcp_sock_destruct (struct sock *sk) -{ -/* if new mptcp socket isn't accepted, it is free'd -* from the tcp listener sockets request queue, linked -* from req->sk. The tcp socket is released. -* This calls the ULP release function which will -* also remove the mptcp socket, via -* sock_put(ctx->conn). -* -* Problem is that the mptcp socket will be in -* ESTABLISHED state and will not have the SOCK_DEAD flag. -* Both result in warnings from inet_sock_destruct. -*/ -if ((1 << sk->sk_state) & (TCPF_ESTABLISHED |TCPF_CLOSE_WAIT )) { - sk->sk_state =TCP_CLOSE ; -WARN_ON_ONCE (sk->sk_socket); -sock_orphan (sk); - } - -/* We don't need to clear msk->subflow, as it's still NULL at this point */ -mptcp_destroy_common (mptcp_sk (sk),0 ); -inet_sock_destruct (sk); -} -static void mptcp_force_close (struct sock *sk) {/* the msk is not yet exposed to user-space */
@@ -768,7 +744,6 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,/* new mpc subflow takes ownership of the newly * created mptcp socket */ - new_msk->sk_destruct = mptcp_sock_destruct;mptcp_sk (new_msk)->setsockopt_seq = ctx->setsockopt_seq;mptcp_pm_new_connection (mptcp_sk (new_msk), child,1 );mptcp_token_accept (subflow_req,mptcp_sk (new_msk));
@@ -1763,13 +1738,19 @@ void mptcp_subflow_queue_clean(struct sock *listener_ssk)for (msk = head; msk; msk = next) {struct sock *sk = (struct sock *)msk; -bool slow; +bool slow, do_cancel_work; +sock_hold (sk); slow =lock_sock_fast_nested (sk); next = msk->dl_next; msk->first =NULL ; msk->dl_next =NULL ; + + do_cancel_work =__mptcp_close (sk,0 );unlock_sock_fast (sk, slow); +if (do_cancel_work) +mptcp_cancel_work (sk); +sock_put (sk); }/* we are still under the listener msk socket lock */
net/sched/act_ct.c +4 -1
@@ -1393,7 +1393,7 @@ static int tcf_ct_init(struct net *net, struct nlattr *nla, err =tcf_ct_flow_table_get (params);if (err) - goto cleanup; + goto cleanup_params;spin_lock_bh (&c->tcf_lock); goto_ch =tcf_action_set_ctrlact (*a, parm->action, goto_ch);
@@ -1408,6 +1408,9 @@ static int tcf_ct_init(struct net *net, struct nlattr *nla,return res; +cleanup_params: +if (params->tmpl) +nf_ct_put (params->tmpl); cleanup:if (goto_ch)tcf_chain_put_by_act (goto_ch);
net/wireless/util.c +2 -2
@@ -1361,7 +1361,7 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)25599 ,/* 4.166666... */ 17067 ,/* 2.777777... */ 12801 ,/* 2.083333... */ -11769 ,/* 1.851851... */ +11377 ,/* 1.851725... */ 10239 ,/* 1.666666... */ 8532 ,/* 1.388888... */ 7680, /* 1.250000... */
@@ -1444,7 +1444,7 @@ static u32 cfg80211_calculate_bitrate_eht(struct rate_info *rate)25599 ,/* 4.166666... */ 17067 ,/* 2.777777... */ 12801 ,/* 2.083333... */ -11769 ,/* 1.851851... */ +11377 ,/* 1.851725... */ 10239 ,/* 1.666666... */ 8532 ,/* 1.388888... */ 7680, /* 1.250000... */
sound/soc/codecs/tas2770.c +3 -0
@@ -495,6 +495,8 @@ static struct snd_soc_dai_driver tas2770_dai_driver[] = { }, }; +static const struct regmap_config tas2770_i2c_regmap; +static int tas2770_codec_probe (struct snd_soc_component *component) { struct tas2770_priv *tas2770 =
@@ -508,6 +510,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component) }tas2770_reset (tas2770); +regmap_reinit_cache (tas2770->regmap, &tas2770_i2c_regmap);return 0 ; }
sound/soc/fsl/imx-card.c +4 -0
@@ -698,6 +698,10 @@ static int imx_card_parse_of(struct imx_card_data *data)of_node_put (cpu);of_node_put (codec);of_node_put (platform); + + cpu =NULL ; + codec =NULL ; + platform =NULL ; }return 0 ;
tools/perf/builtin-list.c +1 -1
@@ -10,7 +10,7 @@*/ #include "builtin.h" -#include "util/parse-events.h" +#include "util/print-events.h" #include "util/pmu.h" #include "util/pmu-hybrid.h" #include "util/debug.h"
tools/perf/builtin-lock.c +1 -0
@@ -13,6 +13,7 @@#include <subcmd/pager.h> #include <subcmd/parse-options.h> #include "util/trace-event.h" +#include "util/tracepoint.h" #include "util/debug.h" #include "util/session.h"
tools/perf/builtin-record.c +22 -6
@@ -3335,16 +3335,24 @@ static struct option __record_options[] = {struct option *record_options = __record_options; -static void record__mmap_cpu_mask_init (struct mmap_cpu_mask *mask,struct perf_cpu_map *cpus) +static int record__mmap_cpu_mask_init (struct mmap_cpu_mask *mask,struct perf_cpu_map *cpus) {struct perf_cpu cpu;int idx;if (cpu_map__is_dummy (cpus)) -return ; +return 0 ; -perf_cpu_map__for_each_cpu (cpu, idx, cpus) +perf_cpu_map__for_each_cpu (cpu, idx, cpus) { +if (cpu.cpu ==-1 ) +continue ; +/* Return ENODEV is input cpu is greater than max cpu */ +if ((unsigned long )cpu.cpu > mask->nbits) +return -ENODEV ;set_bit (cpu.cpu, mask->bits); + } + +return 0 ; }static int record__mmap_cpu_mask_init_spec (struct mmap_cpu_mask *mask,const char *mask_spec)
@@ -3356,7 +3364,9 @@ static int record__mmap_cpu_mask_init_spec(struct mmap_cpu_mask *mask, const chareturn -ENOMEM ;bitmap_zero (mask->bits, mask->nbits); -record__mmap_cpu_mask_init (mask, cpus); +if (record__mmap_cpu_mask_init (mask, cpus)) +return -ENODEV ; +perf_cpu_map__put (cpus);return 0 ;
@@ -3438,7 +3448,12 @@ static int record__init_thread_masks_spec(struct record *rec, struct perf_cpu_mapr_err ("Failed to allocate CPUs mask\n" );return ret; } -record__mmap_cpu_mask_init (&cpus_mask, cpus); + + ret =record__mmap_cpu_mask_init (&cpus_mask, cpus); +if (ret) { +pr_err ("Failed to init cpu mask\n" ); + goto out_free_cpu_mask; + } ret =record__thread_mask_alloc (&full_mask,cpu__max_cpu ().cpu);if (ret) {
@@ -3679,7 +3694,8 @@ static int record__init_thread_default_masks(struct record *rec, struct perf_cpuif (ret)return ret; -record__mmap_cpu_mask_init (&rec->thread_masks->maps, cpus); +if (record__mmap_cpu_mask_init (&rec->thread_masks->maps, cpus)) +return -ENODEV ; rec->nr_threads =1 ;
tools/perf/builtin-timechart.c +1 -0
@@ -36,6 +36,7 @@#include "util/data.h" #include "util/debug.h" #include "util/string2.h" +#include "util/tracepoint.h" #include <linux/err.h> #ifdef LACKS_OPEN_MEMSTREAM_PROTOTYPE
tools/perf/builtin-trace.c +1 -0
@@ -53,6 +53,7 @@#include "trace-event.h" #include "util/parse-events.h" #include "util/bpf-loader.h" +#include "util/tracepoint.h" #include "callchain.h" #include "print_binary.h" #include "string2.h"
tools/perf/tests/perf-record.c +1 -1
@@ -332,7 +332,7 @@ static int test__PERF_RECORD(struct test_suite *test __maybe_unused, int subtest out:if (err == -EACCES )return TEST_SKIP ; -if (err <0 ) +if (err <0 || errs !=0 )return TEST_FAIL ;return TEST_OK ; }
tools/perf/tests/shell/record.sh +1 -1
@@ -61,7 +61,7 @@ test_register_capture() { echo "Register capture test [Skipped missing registers]" return fi - if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \ + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ -c 1000 --per-thread true 2> /dev/null \ | perf script -F ip,sym,iregs -i - 2> /dev/null \ | egrep -q "DI:"
tools/perf/util/Build +2 -0
@@ -26,6 +26,8 @@ perf-y += mmap.o perf-y += memswap.o perf-y += parse-events.o perf-y += parse-events-hybrid.o +perf-y += print-events.o +perf-y += tracepoint.o perf-y += perf_regs.o perf-y += path.o perf-y += print_binary.o
tools/perf/util/parse-events-hybrid.c +17 -4
@@ -33,7 +33,8 @@ static void config_hybrid_attr(struct perf_event_attr *attr,* If the PMU type ID is 0, the PERF_TYPE_RAW will be applied. */ attr->type = type; - attr->config = attr->config | ((__u64 )pmu_type <<PERF_PMU_TYPE_SHIFT ); + attr->config = (attr->config &PERF_HW_EVENT_MASK ) | + ((__u64 )pmu_type <<PERF_PMU_TYPE_SHIFT ); } static int create_event_hybrid(__u32 config_type, int *idx,
@@ -48,13 +49,25 @@ static int create_event_hybrid(__u32 config_type, int *idx,__u64 config = attr->config;config_hybrid_attr (attr, config_type, pmu->type); + +/* +* Some hybrid hardware cache events are only available on one CPU +* PMU. For example, the 'L1-dcache-load-misses' is only available
Lines of this file are not shown. View the raw message.
tools/perf/util/parse-events.c +37 -697
734 lines not on this page · raw message
tools/perf/util/print-events.c new file +533 -0
533 lines not on this page · raw message
tools/perf/util/print-events.h new file +22 -0
Lines of this file are not shown. View the raw message.
tools/perf/util/trace-event-info.c +96 -0
96 lines not on this page · raw message
tools/perf/util/tracepoint.c new file +63 -0
63 lines not on this page · raw message
tools/testing/selftests/net/reuseport_bpf.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.