Linux 6.5.10
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.5.10 kernel.
All users of the 6.5 kernel series must upgrade.
The updated 6.5.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.5.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/rockchip/rk3128.dtsi | 18 +- arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi | 6 arch/arm/boot/dts/ti/omap/omap4-l4.dtsi | 2 arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi | 6 arch/arm/mach-omap1/board-ams-delta.c | 60 +----- arch/arm/mach-omap1/timer32k.c | 14 - arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 32 +-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 32 +-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 18 -- arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 2 arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts | 10 - arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 + arch/sparc/lib/checksum_32.S | 2 arch/x86/include/asm/i8259.h | 2 arch/x86/include/asm/intel-family.h | 2 arch/x86/kernel/acpi/boot.c | 3 arch/x86/kernel/i8259.c | 38 +++- arch/x86/kernel/tsc_sync.c | 10 + block/blk-throttle.c | 6 drivers/accel/ivpu/ivpu_drv.c | 11 - drivers/accel/ivpu/ivpu_drv.h | 1 drivers/accel/ivpu/ivpu_hw.h | 8 drivers/accel/ivpu/ivpu_hw_mtl.c | 12 - drivers/accel/ivpu/ivpu_pm.c | 3 drivers/ata/libata-scsi.c | 5 drivers/clk/clk.c | 21 +- drivers/clk/socfpga/clk-gate.c | 27 ++- drivers/clk/stm32/clk-stm32-core.c | 2 drivers/clk/ti/clk-44xx.c | 5 drivers/clk/ti/clk-54xx.c | 4 drivers/crypto/virtio/virtio_crypto_common.h | 3 drivers/crypto/virtio/virtio_crypto_core.c | 14 + drivers/firewire/sbp2.c | 1 drivers/firmware/imx/imx-dsp.c | 2 drivers/gpu/drm/amd/amdgpu/vi.c | 2 drivers/gpu/drm/display/drm_dp_mst_topology.c | 6 drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 24 ++ drivers/gpu/drm/i915/i915_perf.c | 4 drivers/gpu/drm/i915/i915_pmu.c | 9 + drivers/gpu/drm/logicvc/Kconfig | 2 drivers/i2c/busses/i2c-aspeed.c | 3 drivers/i2c/busses/i2c-stm32f7.c | 9 - drivers/i2c/muxes/i2c-demux-pinctrl.c | 2 drivers/i2c/muxes/i2c-mux-gpmux.c | 2 drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 drivers/iio/adc/exynos_adc.c | 24 +- drivers/iio/adc/xilinx-xadc-core.c | 39 +--- drivers/iio/adc/xilinx-xadc.h | 2 drivers/iio/afe/iio-rescale.c | 19 +- drivers/misc/fastrpc.c | 34 +-- drivers/net/ethernet/adi/adin1110.c | 2 drivers/net/ethernet/intel/i40e/i40e.h | 2 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 + drivers/net/ethernet/intel/iavf/iavf_main.c | 7 drivers/net/ethernet/intel/igb/igb_ethtool.c | 6 drivers/net/ethernet/intel/igc/igc_ethtool.c | 35 ++-- drivers/net/ethernet/realtek/r8169_main.c | 6 drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 drivers/net/gtp.c | 5 drivers/net/ieee802154/adf7242.c | 5 drivers/net/usb/r8152.c | 11 - drivers/net/usb/smsc95xx.c | 4 drivers/nvmem/imx-ocotp.c | 6 drivers/platform/x86/amd/pmc-quirks.c | 73 ++++++++ drivers/scsi/sd.c | 39 ++++ drivers/vdpa/mlx5/net/debug.c | 5 drivers/vdpa/mlx5/net/mlx5_vnet.c | 70 ++++++-- drivers/vdpa/mlx5/net/mlx5_vnet.h | 11 + drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 5 drivers/vhost/vhost.c | 4 drivers/virtio/virtio_balloon.c | 6 drivers/virtio/virtio_mmio.c | 19 +- drivers/virtio/virtio_pci_modern_dev.c | 2 fs/btrfs/backref.c | 39 ++-- fs/btrfs/backref.h | 3 fs/btrfs/ctree.c | 21 +- fs/btrfs/ctree.h | 3 fs/btrfs/extent-tree.c | 35 ++-- fs/btrfs/messages.c | 6 fs/btrfs/messages.h | 2 fs/btrfs/print-tree.c | 10 - fs/btrfs/relocation.c | 18 +- fs/nfsd/vfs.c | 12 - fs/smb/client/cached_dir.c | 156 +++++++++--------- fs/smb/client/cached_dir.h | 4 fs/smb/client/cifsfs.c | 12 + fs/smb/client/cifsglob.h | 4 fs/smb/client/cifsproto.h | 2 fs/smb/client/connect.c | 19 +- fs/smb/client/fs_context.c | 11 + fs/smb/client/fs_context.h | 4 fs/smb/client/misc.c | 14 + fs/smb/client/smb2pdu.c | 2 include/linux/hugetlb.h | 6 include/linux/ieee80211.h | 29 +++ include/linux/kasan.h | 6 include/net/netfilter/nf_flow_table.h | 1 include/scsi/scsi_device.h | 20 ++ include/trace/events/btrfs.h | 1 include/uapi/linux/btrfs_tree.h | 6 include/uapi/linux/gtp.h | 2 io_uring/fdinfo.c | 18 +- kernel/events/core.c | 3 kernel/trace/trace_kprobe.c | 28 ++- lib/maple_tree.c | 2 lib/test_maple_tree.c | 35 ++-- mm/damon/sysfs.c | 7 mm/hugetlb.c | 48 ++++- mm/kasan/report.c | 4 mm/mempolicy.c | 4 mm/migrate.c | 14 + mm/mmap.c | 6 mm/page_alloc.c | 2 net/core/neighbour.c | 67 ++++--- net/handshake/netlink.c | 30 --- net/ipv4/tcp.c | 8 net/ipv4/tcp_input.c | 9 - net/mac80211/rx.c | 3 net/netfilter/nf_flow_table_core.c | 14 - net/sched/act_ct.c | 9 + net/vmw_vsock/virtio_transport.c | 18 +- net/wireless/mlme.c | 3 net/wireless/scan.c | 2 tools/include/linux/rwsem.h | 40 ++++ tools/testing/selftests/mm/mremap_dontunmap.c | 1 127 files changed, 1161 insertions(+), 576 deletions(-)
Al Viro (2):
nfsd: lock_rename() needs both directories to live on the same fs
sparc32: fix a braino in fault handling in csum_and_copy_..._user()
Alain Volmat (1):
i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
Alessandro Carminati (1):
clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name
Alex Bee (4):
ARM: dts: rockchip: Fix i2c0 register address for RK3128
ARM: dts: rockchip: Add missing arm timer interrupt for RK3128
ARM: dts: rockchip: Add missing quirk for RK3128's dma engine
ARM: dts: rockchip: Fix timer clocks for RK3128
Alexandru Matei (1):
vsock/virtio: initialize the_virtio_vsock before using VQs
Andrii Nakryiko (1):
tracing/kprobes: Fix symbol counting logic by looking at modules as well
Avraham Stern (1):
wifi: mac80211: don't drop all unprotected public action frames
Ben Greear (1):
wifi: cfg80211: pass correct pointer to rdev_inform_bss()
Christophe JAILLET (1):
net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()
Christopher Obbard (2):
arm64: dts: rockchip: Add i2s0-2ch-bus-bclk-off pins to RK3399
arm64: dts: rockchip: Fix i2s0 pin conflict on ROCK Pi 4 boards
Damien Le Moal (1):
scsi: sd: Introduce manage_shutdown device flag
Dan Carpenter (1):
clk: stm32: Fix a signedness issue in clk_stm32_composite_determine_rate()
David Lazar (1):
platform/x86: Add s2idle quirk for more Lenovo laptops
Dell Jin (1):
net: ethernet: adi: adin1110: Fix uninitialized variable
Douglas Anderson (4):
r8152: Increase USB control msg timeout to 5000ms as per spec
r8152: Run the unload routine if we have errors during probe
r8152: Cancel hw_phy_work if we have an error in probe
r8152: Release firmware if we have an error in probe
Dragos Tatulea (2):
vdpa/mlx5: Fix firmware error on creation of 1k VQs vdpa/mlx5: Fix double release of debugfs entry
Ekansh Gupta (4):
misc: fastrpc: Reset metadata buffer to avoid incorrect free
misc: fastrpc: Free DMA handles for RPC calls with no arguments
misc: fastrpc: Clean buffers on remote invocation failures
misc: fastrpc: Unmap only if buffer is unmapped from DSP
Eric Auger (1):
vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE
Eric Dumazet (2):
net: do not leave an empty skb in write queue
neighbour: fix various data-races
Ermin Sunj (1):
arm64: dts: rockchip: use codec as clock master on px30-ringneck-haikou
Filipe Manana (1):
btrfs: fix unwritten extent buffer after snapshotting a new subvolume
Fred Chen (1):
tcp: fix wrong RTO timeout when received SACK reneging
Gavin Shan (1):
virtio_balloon: Fix endless deflation and inflation on arm64
Greg Kroah-Hartman (1):
Linux 6.5.10
Gregory Price (1):
mm/migrate: fix do_pages_move for compat pointers
Haibo Li (1):
kasan: print the original fault addr when access invalid shadow
Hao Ge (1):
firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels()
Herve Codina (3):
i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
Ivan Vecera (2):
i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
Jacek Lawrynowicz (1):
accel/ivpu: Don't enter d0i3 during FLR
Jakob Unterwurzacher (1):
arm64: dts: rockchip: set codec system-clock-fixed on px30-ringneck-haikou
Janusz Krzysztofik (1):
ARM: OMAP1: ams-delta: Fix MODEM initialization failure
Jens Axboe (1):
io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid
Jian Zhang (1):
i2c: aspeed: Fix i2c bus hang in slave read
Johannes Berg (1):
wifi: cfg80211: fix assoc response warning on failed links
Karol Wachowski (1):
accel/ivpu/37xx: Fix missing VPUIP interrupts
Kemeng Shi (1):
mm/page_alloc: correct start page when guard page debug is enabled
Khazhismel Kumykov (1):
blk-throttle: check for overflow in calculate_bytes_allowed
Krzysztof Kozlowski (3):
arm64: dts: qcom: apq8096-db820c: fix missing clock populate
arm64: dts: qcom: msm8996-xiaomi: fix missing clock populate
arm64: dts: qcom: sa8775p: correct PMIC GPIO label in gpio-ranges
Kunwu Chan (1):
treewide: Spelling fix in comment
Liam R. Howlett (2):
mm/mempolicy: fix set_mempolicy_home_node() previous VMA pointer
maple_tree: add GFP_KERNEL to allocations in mas_expected_entries()
Linus Walleij (1):
iio: afe: rescale: Accept only offset channels
Lukasz Majczak (1):
drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
Marek Szyprowski (1):
iio: exynos-adc: request second interupt only when touchscreen mode is used
Mario Limonciello (1):
drm/amd: Disable ASPM for VI w/ all Intel systems
Mateusz Palczewski (1):
igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
Matt Roper (1):
drm/i915/mcr: Hold GT forcewake during steering operations
Maxime Ripard (1):
clk: socfpga: gate: Account for the divider in determine_rate
Maximilian Heyne (1):
virtio-mmio: fix memory leak of vm_dev
Michal Schmidt (2):
iavf: initialize waitqueues before starting watchdog_task
iavf: in iavf_down, disable queues when removing the driver
Mirsad Goran Todorovac (3):
r8169: fix the KCSAN reported data-race in rtl_tx() while reading tp->cur_tx
r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1Moritz Wanzenböck (1):
net/handshake: fix file ref count in handshake_nl_accept_doit()
Pablo Neira Ayuso (3):
gtp: uapi: fix GTPA_MAX
gtp: fix fragmentation needed check with gso
netfilter: flowtable: GC pushes back packets to classic path
Paulo Alcantara (3):
smb: client: do not start laundromat thread on nohandlecache
smb: client: make laundromat a delayed worker
smb: client: prevent new fids from being removed by laundromat
Peng Fan (3):
nvmem: imx: correct nregs for i.MX6ULL
nvmem: imx: correct nregs for i.MX6SLL
nvmem: imx: correct nregs for i.MX6UL
Peter Zijlstra (1):
perf/core: Fix potential NULL deref
Qu Wenruo (1):
btrfs: remove v0 extent handling
Randy Dunlap (1):
ARM: OMAP: timer32K: fix all kernel-doc warnings
Rik van Riel (2):
hugetlbfs: clear resv_map pointer if mmap fails
hugetlbfs: extend hugetlb_vma_lock to private VMAs
Robert Hancock (2):
iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale
Samasth Norway Ananda (1):
selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier
Sasha Neftin (1):
igc: Fix ambiguity in the ethtool advertising
Sebastian Ott (1):
mm: fix vm_brk_flags() to not bail out while holding lock
SeongJae Park (1):
mm/damon/sysfs: check DAMOS regions update progress from before_terminate()
Shawn.Shao (1):
vdpa_sim_blk: Fix the potential leak of mgmt_dev
Shigeru Yoshida (1):
net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg
Steve French (3):
smb3: allow controlling length of time directory entries are cached with dir leases
smb3: allow controlling maximum number of cached directories
smb3: do not start laundromat thread when dir leases disabled
Sui Jingfeng (1):
drm/logicvc: Kconfig: select REGMAP and REGMAP_MMIO
Thomas Gleixner (2):
x86/tsc: Defer marking TSC unstable to a worker x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
Tirthendu Sarkar (1):
i40e: sync next_to_clean and next_to_process for programming status desc
Tony Lindgren (2):
clk: ti: Fix missing omap4 mcbsp functional clock and aliases
clk: ti: Fix missing omap5 mcbsp functional clock and aliases
Tony Luck (1):
x86/cpu: Add model number for Intel Arrow Lake mobile processor
Umesh Nerlige Ramappa (2):
drm/i915/pmu: Check if pmu is closed before stopping event drm/i915/perf: Determine context valid in OA reports
Vlad Buslov (1):
net/sched: act_ct: additional checks for outdated flows
Xuan Zhuo (1):
virtio_pci: fix the common cfg map size
Yujie Liu (1):
tracing/kprobes: Fix the description of variable length arguments
zhenwei pi (1):
virtio-crypto: handle config changed by work queue
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 5 -SUBLEVEL = 9 +SUBLEVEL = 10 EXTRAVERSION = NAME = Hurr durr I'ma ninja sloth
arch/arm/boot/dts/rockchip/rk3128.dtsi +10 -8
@@ -64,7 +64,8 @@ timer { compatible = "arm,armv7-timer"; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, - <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; arm,cpu-registers-not-fw-configured; clock-frequency = <24000000>; };
@@ -233,7 +234,7 @@ timer0: timer@20044000 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044000 0x20>; interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER0>; clock-names = "pclk", "timer"; };
@@ -241,7 +242,7 @@ timer1: timer@20044020 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044020 0x20>; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER1>; clock-names = "pclk", "timer"; };
@@ -249,7 +250,7 @@ timer2: timer@20044040 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044040 0x20>; interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER2>; clock-names = "pclk", "timer"; };
@@ -257,7 +258,7 @@ timer3: timer@20044060 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044060 0x20>; interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER3>; clock-names = "pclk", "timer"; };
@@ -265,7 +266,7 @@ timer4: timer@20044080 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044080 0x20>; interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER4>; clock-names = "pclk", "timer"; };
@@ -273,7 +274,7 @@ timer5: timer@200440a0 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x200440a0 0x20>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER5>; clock-names = "pclk", "timer"; };
@@ -426,7 +427,7 @@ saradc: saradc@2006c000 { i2c0: i2c@20072000 { compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c"; - reg = <20072000 0x1000>; + reg = <0x20072000 0x1000>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; clock-names = "i2c"; clocks = <&cru PCLK_I2C0>;
@@ -458,6 +459,7 @@ pdma: dma-controller@20078000 { interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; arm,pl330-broken-no-flushp; + arm,pl330-periph-burst; clocks = <&cru ACLK_DMAC>; clock-names = "apb_pclk"; #dma-cells = <1>;
arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi +6 -0
@@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49022000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP1_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
@@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49024000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
@@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49026000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP3_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
arch/arm/boot/dts/ti/omap/omap4-l4.dtsi +2 -0
@@ -2043,6 +2043,8 @@ mcbsp4: mcbsp@0 { compatible = "ti,omap4-mcbsp"; reg = <0x0 0xff>; /* L4 Interconnect */ reg-names = "mpu"; + clocks = <&l4_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi +6 -0
@@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49022000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP5_MCBSP1_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
@@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49024000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP5_MCBSP2_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
@@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49026000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP5_MCBSP3_CLKCTRL 24>; + clock-names = "fck"; interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>;
arch/arm/mach-omap1/board-ams-delta.c +16 -44
92 lines not on this page · raw message
arch/arm/mach-omap1/timer32k.c +7 -7
@@ -176,17 +176,18 @@ static u64 notrace omap_32k_read_sched_clock(void)return sync32k_cnt_reg ?readl_relaxed (sync32k_cnt_reg) :0 ; } +static struct timespec64 persistent_ts; +static cycles_t cycles; +static unsigned int persistent_mult, persistent_shift; +/** * omap_read_persistent_clock64 - Return time from a persistent clock. +* @ts: &struct timespec64 for the returned time * * Reads the time from a source which isn't disabled during PM, the * 32k sync timer. Convert the cycles elapsed since last read into * nsecs and adds to a monotonically increasing timespec64. */ -static struct timespec64 persistent_ts; -static cycles_t cycles; -static unsigned int persistent_mult, persistent_shift; -static void omap_read_persistent_clock64 (struct timespec64 *ts) {unsigned long long nsecs;
@@ -206,10 +207,9 @@ static void omap_read_persistent_clock64(struct timespec64 *ts)/** * omap_init_clocksource_32k - setup and register counter 32k as a * kernel clocksource -* @pbase: base addr of counter_32k module -* @size: size of counter_32k to map +* @vbase: base addr of counter_32k module * -* Returns 0 upon success or negative error code upon failure. +* Returns: %0 upon success or negative error code upon failure. * */ static int __init omap_init_clocksource_32k (void __iomem *vbase)
arch/arm64/boot/dts/qcom/apq8096-db820c.dts +15 -17
@@ -62,25 +62,23 @@ chosen { stdout-path = "serial0:115200n8"; }; - clocks { - divclk4: divclk4 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - clock-output-names = "divclk4"; + div1_mclk: divclk1 { + compatible = "gpio-gate-clock"; + pinctrl-0 = <&audio_mclk>; + pinctrl-names = "default"; + clocks = <&rpmcc RPM_SMD_DIV_CLK1>; + #clock-cells = <0>; + enable-gpios = <&pm8994_gpios 15 0>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&divclk4_pin_a>; - }; + divclk4: divclk4 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "divclk4"; - div1_mclk: divclk1 { - compatible = "gpio-gate-clock"; - pinctrl-0 = <&audio_mclk>; - pinctrl-names = "default"; - clocks = <&rpmcc RPM_SMD_DIV_CLK1>; - #clock-cells = <0>; - enable-gpios = <&pm8994_gpios 15 0>; - }; + pinctrl-names = "default"; + pinctrl-0 = <&divclk4_pin_a>; }; gpio-keys {
arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi +15 -17
@@ -11,26 +11,24 @@ #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> / { - clocks { - divclk1_cdc: divclk1 { - compatible = "gpio-gate-clock"; - clocks = <&rpmcc RPM_SMD_DIV_CLK1>; - #clock-cells = <0>; - enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>; + divclk1_cdc: divclk1 { + compatible = "gpio-gate-clock"; + clocks = <&rpmcc RPM_SMD_DIV_CLK1>; + #clock-cells = <0>; + enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&divclk1_default>; - }; + pinctrl-names = "default"; + pinctrl-0 = <&divclk1_default>; + }; - divclk4: divclk4 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - clock-output-names = "divclk4"; + divclk4: divclk4 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "divclk4"; - pinctrl-names = "default"; - pinctrl-0 = <&divclk4_pin_a>; - }; + pinctrl-names = "default"; + pinctrl-0 = <&divclk4_pin_a>; }; gpio-keys {
arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts +8 -10
@@ -20,16 +20,14 @@ / { qcom,pmic-id = <0x20009 0x2000a 0x00 0x00>; qcom,board-id = <31 0>; - clocks { - divclk2_haptics: divclk2 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - clock-output-names = "divclk2"; - - pinctrl-names = "default"; - pinctrl-0 = <&divclk2_pin_a>; - }; + divclk2_haptics: divclk2 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "divclk2"; + + pinctrl-names = "default"; + pinctrl-0 = <&divclk2_pin_a>; }; };
arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi +1 -1
@@ -173,7 +173,7 @@ pmm8654au_1_gpios: gpio@8800 { compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio"; reg = <0x8800>; gpio-controller; - gpio-ranges = <&pmm8654au_2_gpios 0 0 12>; + gpio-ranges = <&pmm8654au_1_gpios 0 0 12>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>;
arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts +6 -4
@@ -68,15 +68,17 @@ i2s0-sound { simple-audio-card,format = "i2s"; simple-audio-card,name = "Haikou,I2S-codec"; simple-audio-card,mclk-fs = <512>; + simple-audio-card,frame-master = <&sgtl5000_codec>; + simple-audio-card,bitclock-master = <&sgtl5000_codec>; - simple-audio-card,codec { - clocks = <&sgtl5000_clk>; + sgtl5000_codec: simple-audio-card,codec { sound-dai = <&sgtl5000>; + // Prevent the dai subsystem from overwriting the clock + // frequency. We are using a fixed-frequency oscillator. + system-clock-fixed; }; simple-audio-card,cpu { - bitclock-master; - frame-master; sound-dai = <&i2s0_8ch>; }; };
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1 -0
@@ -493,6 +493,7 @@ &i2c4 { &i2s0 { pinctrl-0 = <&i2s0_2ch_bus>; + pinctrl-1 = <&i2s0_2ch_bus_bclk_off>; rockchip,capture-channels = <2>; rockchip,playback-channels = <2>; status = "okay";
arch/arm64/boot/dts/rockchip/rk3399.dtsi +10 -0
@@ -2430,6 +2430,16 @@ i2s0_2ch_bus: i2s0-2ch-bus { <4 RK_PA0 1 &pcfg_pull_none>; }; + i2s0_2ch_bus_bclk_off: i2s0-2ch-bus-bclk-off { + rockchip,pins = + <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>, + <3 RK_PD1 1 &pcfg_pull_none>, + <3 RK_PD2 1 &pcfg_pull_none>, + <3 RK_PD3 1 &pcfg_pull_none>, + <3 RK_PD7 1 &pcfg_pull_none>, + <4 RK_PA0 1 &pcfg_pull_none>; + }; + i2s0_8ch_bus: i2s0-8ch-bus { rockchip,pins = <3 RK_PD0 1 &pcfg_pull_none>,
arch/sparc/lib/checksum_32.S +1 -1
@@ -453,5 +453,5 @@ ccslow: cmp %g1, 0 * we only bother with faults on loads... */ cc_fault: - ret + retl clr %o0
arch/x86/include/asm/i8259.h +2 -0
@@ -69,6 +69,8 @@ struct legacy_pic {void (*make_irq)(unsigned int irq); }; +void legacy_pic_pcat_compat (void ); +extern struct legacy_pic *legacy_pic;extern struct legacy_pic null_legacy_pic;
arch/x86/include/asm/intel-family.h +2 -0
@@ -27,6 +27,7 @@* _X - regular server parts * _D - micro server parts * _N,_P - other mobile parts +* _H - premium mobile parts * _S - other client parts * * Historical OPTDIFFs:
@@ -125,6 +126,7 @@#define INTEL_FAM6_LUNARLAKE_M 0xBD +#define INTEL_FAM6_ARROWLAKE_H 0xC5#define INTEL_FAM6_ARROWLAKE 0xC6/* "Small Core" Processors (Atom/E-Core) */
arch/x86/kernel/acpi/boot.c +3 -0
@@ -148,6 +148,9 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)pr_debug ("Local APIC address 0x%08x\n" , madt->address); } +if (madt->flags &ACPI_MADT_PCAT_COMPAT ) +legacy_pic_pcat_compat (); +/* ACPI 6.3 and newer support the online capable bit. */ if (acpi_gbl_FADT.header.revision > 6 || (acpi_gbl_FADT.header.revision == 6 &&
arch/x86/kernel/i8259.c +30 -8
@@ -32,6 +32,7 @@*/ static void init_8259A (int auto_eoi); +static bool pcat_compat__ro_after_init ;static int i8259A_auto_eoi;DEFINE_RAW_SPINLOCK (i8259A_lock);
@@ -301,15 +302,32 @@ static void unmask_8259A(void)static int probe_8259A (void ) { +unsigned char new_val, probe_val = ~(1 <<PIC_CASCADE_IR );unsigned long flags; -unsigned char probe_val = ~(1 <<PIC_CASCADE_IR ); -unsigned char new_val; + +/* +* If MADT has the PCAT_COMPAT flag set, then do not bother probing +* for the PIC. Some BIOSes leave the PIC uninitialized and probing +* fails. +* +* Right now this causes problems as quite some code depends on +* nr_legacy_irqs() > 0 or has_legacy_pic() == true. This is silly +* when the system has an IO/APIC because then PIC is not required +* at all, except for really old machines where the timer interrupt +* must be routed through the PIC. So just pretend that the PIC is +* there and let legacy_pic->init() initialize it for nothing. +* +* Alternatively this could just try to initialize the PIC and +* repeat the probe, but for cases where there is no PIC that's +* just pointless. +*/ +if (pcat_compat) +return nr_legacy_irqs (); +/* -* Check to see if we have a PIC. -* Mask all except the cascade and read -* back the value we just wrote. If we don't -* have a PIC, we will read 0xff as opposed to the -* value we wrote. +* Check to see if we have a PIC. Mask all except the cascade and +* read back the value we just wrote. If we don't have a PIC, we +* will read 0xff as opposed to the value we wrote. */ raw_spin_lock_irqsave (&i8259A_lock, flags);
@@ -431,5 +449,9 @@ static int __init i8259A_init_ops(void)return 0 ; } -device_initcall (i8259A_init_ops); + +void __init legacy_pic_pcat_compat (void ) +{ + pcat_compat = true; +}
arch/x86/kernel/tsc_sync.c +9 -1
@@ -15,6 +15,7 @@* ( The serial nature of the boot logic and the CPU hotplug lock * protects against more than 2 CPUs entering this code. ) */ +#include <linux/workqueue.h> #include <linux/topology.h> #include <linux/spinlock.h> #include <linux/kernel.h>
@@ -342,6 +343,13 @@ static inline unsigned int loop_timeout(int cpu)return (cpumask_weight (topology_core_cpumask (cpu)) >1 ) ?2 :20 ; } +static void tsc_sync_mark_tsc_unstable (struct work_struct *work) +{ +mark_tsc_unstable ("check_tsc_sync_source failed" ); +} + +static DECLARE_WORK(tsc_sync_work, tsc_sync_mark_tsc_unstable); +/* * The freshly booted CPU initiates this via an async SMP function call. */
@@ -395,7 +403,7 @@ static void check_tsc_sync_source(void *__cpu) "turning off TSC clock.\n", max_warp);if (random_warps)pr_warn ("TSC warped randomly between CPUs\n" ); -mark_tsc_unstable ("check_tsc_sync_source failed" ); +schedule_work (&tsc_sync_work); }/*
block/blk-throttle.c +6 -0
@@ -723,6 +723,12 @@ static unsigned int calculate_io_allowed(u32 iops_limit,static u64 calculate_bytes_allowed (u64 bps_limit,unsigned long jiffy_elapsed) { +/* +* Can result be wider than 64 bits? +* We check against 62, not 64, due to ilog2 truncation. +*/ +if (ilog2 (bps_limit) +ilog2 (jiffy_elapsed) -ilog2 (HZ ) >62 ) +return U64_MAX ;return mul_u64_u64_div_u64 (bps_limit, (u64 )jiffy_elapsed, (u64 )HZ ); }
drivers/accel/ivpu/ivpu_drv.c +8 -3
@@ -343,14 +343,19 @@ int ivpu_boot(struct ivpu_device *vdev)return 0 ; } -int ivpu_shutdown (struct ivpu_device *vdev) +void ivpu_prepare_for_reset (struct ivpu_device *vdev) { -int ret; -ivpu_hw_irq_disable (vdev);disable_irq (vdev->irq);ivpu_ipc_disable (vdev);ivpu_mmu_disable (vdev); +} + +int ivpu_shutdown (struct ivpu_device *vdev) +{ +int ret; + +ivpu_prepare_for_reset (vdev); ret =ivpu_hw_power_down (vdev);if (ret)
drivers/accel/ivpu/ivpu_drv.h +1 -0
@@ -144,6 +144,7 @@ void ivpu_file_priv_put(struct ivpu_file_priv **link);int ivpu_boot (struct ivpu_device *vdev);int ivpu_shutdown (struct ivpu_device *vdev); +void ivpu_prepare_for_reset (struct ivpu_device *vdev);static inline bool ivpu_is_mtl (struct ivpu_device *vdev) {
drivers/accel/ivpu/ivpu_hw.h +8 -0
@@ -13,6 +13,7 @@ struct ivpu_hw_ops {int (*power_up)(struct ivpu_device *vdev);int (*boot_fw)(struct ivpu_device *vdev);int (*power_down)(struct ivpu_device *vdev); +int (*reset)(struct ivpu_device *vdev);bool (*is_idle)(struct ivpu_device *vdev);void (*wdt_disable)(struct ivpu_device *vdev);void (*diagnose_failure)(struct ivpu_device *vdev);
@@ -90,6 +91,13 @@ static inline int ivpu_hw_power_down(struct ivpu_device *vdev)return vdev->hw->ops->power_down (vdev); }; +static inline int ivpu_hw_reset (struct ivpu_device *vdev) +{ +ivpu_dbg (vdev,PM ,"HW reset\n" ); + +return vdev->hw->ops->reset (vdev); +}; +static inline void ivpu_hw_wdt_disable (struct ivpu_device *vdev) { vdev->hw->ops->wdt_disable (vdev);
drivers/accel/ivpu/ivpu_hw_mtl.c +6 -6
@@ -953,9 +953,6 @@ static u32 ivpu_hw_mtl_irqb_handler(struct ivpu_device *vdev, int irq)if (status ==0 )return 0 ; -/* Disable global interrupt before handling local buttress interrupts */ -REGB_WR32 (MTL_BUTTRESS_GLOBAL_INT_MASK ,0x1 ); -if (REG_TEST_FLD (MTL_BUTTRESS_INTERRUPT_STAT ,FREQ_CHANGE , status))ivpu_dbg (vdev,IRQ ,"FREQ_CHANGE irq: %08x" ,REGB_RD32 (MTL_BUTTRESS_CURRENT_PLL ));
@@ -986,9 +983,6 @@ static u32 ivpu_hw_mtl_irqb_handler(struct ivpu_device *vdev, int irq)else REGB_WR32 (MTL_BUTTRESS_INTERRUPT_STAT , status); -/* Re-enable global interrupt */ -REGB_WR32 (MTL_BUTTRESS_GLOBAL_INT_MASK ,0x0 ); -if (schedule_recovery)ivpu_pm_schedule_recovery (vdev);
@@ -1000,9 +994,14 @@ static irqreturn_t ivpu_hw_mtl_irq_handler(int irq, void *ptr)struct ivpu_device *vdev = ptr;u32 ret_irqv, ret_irqb; +REGB_WR32 (MTL_BUTTRESS_GLOBAL_INT_MASK ,0x1 ); + ret_irqv =ivpu_hw_mtl_irqv_handler (vdev, irq); ret_irqb =ivpu_hw_mtl_irqb_handler (vdev, irq); +/* Re-enable global interrupts to re-trigger MSI for pending interrupts */ +REGB_WR32 (MTL_BUTTRESS_GLOBAL_INT_MASK ,0x0 ); +return IRQ_RETVAL (ret_irqb | ret_irqv); }
@@ -1041,6 +1040,7 @@ const struct ivpu_hw_ops ivpu_hw_mtl_ops = { .power_up = ivpu_hw_mtl_power_up, .is_idle = ivpu_hw_mtl_is_idle, .power_down = ivpu_hw_mtl_power_down, + .reset = ivpu_hw_mtl_reset, .boot_fw = ivpu_hw_mtl_boot_fw, .wdt_disable = ivpu_hw_mtl_wdt_disable, .diagnose_failure = ivpu_hw_mtl_diagnose_failure,
drivers/accel/ivpu/ivpu_pm.c +2 -1
@@ -260,7 +260,8 @@ void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)ivpu_dbg (vdev,PM ,"Pre-reset..\n" );atomic_set (&vdev->pm->in_reset,1 ); -ivpu_shutdown (vdev); +ivpu_prepare_for_reset (vdev); +ivpu_hw_reset (vdev);ivpu_pm_prepare_cold_boot (vdev);ivpu_jobs_abort_all (vdev);ivpu_dbg (vdev,PM ,"Pre-reset done.\n" );
drivers/ata/libata-scsi.c +3 -2
@@ -1103,10 +1103,11 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev)/* * Ask the sd driver to issue START STOP UNIT on runtime suspend -* and resume only. For system level suspend/resume, devices -* power state is handled directly by libata EH. +* and resume and shutdown only. For system level suspend/resume, +* devices power state is handled directly by libata EH. */ sdev->manage_runtime_start_stop = true; + sdev->manage_shutdown = true; }/*
drivers/clk/clk.c +12 -9
@@ -3416,6 +3416,7 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core, unsigned int i, char terminator) {struct clk_core *parent; +const char *name =NULL ;/* * Go through the following options to fetch a parent's name.
@@ -3430,18 +3431,20 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,* registered (yet). */ parent =clk_core_get_parent_by_index (core, i); -if (parent) +if (parent) {seq_puts (s, parent->name); -else if (core->parents[i].name) + }else if (core->parents[i].name) {seq_puts (s, core->parents[i].name); -else if (core->parents[i].fw_name) + }else if (core->parents[i].fw_name) {seq_printf (s,"<%s>(fw)" , core->parents[i].fw_name); -else if (core->parents[i].index >=0 ) -seq_puts (s, -of_clk_get_parent_name (core->of_node, - core->parents[i].index)); -else -seq_puts (s,"(missing)" ); + }else { +if (core->parents[i].index >=0 ) + name =of_clk_get_parent_name (core->of_node, core->parents[i].index); +if (!name) + name ="(missing)" ; + +seq_puts (s, name); + }seq_putc (s, terminator); }
drivers/clk/socfpga/clk-gate.c +23 -4
@@ -87,10 +87,8 @@ static int socfpga_clk_set_parent(struct clk_hw *hwclk, u8 parent)return 0 ; } -static unsigned long socfpga_clk_recalc_rate (struct clk_hw *hwclk, -unsigned long parent_rate) +static u32 socfpga_clk_get_div (struct socfpga_gate_clk *socfpgaclk) { -struct socfpga_gate_clk *socfpgaclk =to_socfpga_gate_clk (hwclk);u32 div =1 , val;if (socfpgaclk->fixed_div)
@@ -105,12 +103,33 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk, div = (1 << val); } +return div; +} + +static unsigned long socfpga_clk_recalc_rate (struct clk_hw *hwclk, +unsigned long parent_rate) +{ +struct socfpga_gate_clk *socfpgaclk =to_socfpga_gate_clk (hwclk); +u32 div =socfpga_clk_get_div (socfpgaclk); +return parent_rate / div; } + +static int socfpga_clk_determine_rate (struct clk_hw *hwclk, +struct clk_rate_request *req) +{ +struct socfpga_gate_clk *socfpgaclk =to_socfpga_gate_clk (hwclk); +u32 div =socfpga_clk_get_div (socfpgaclk); + + req->rate = req->best_parent_rate / div; + +return 0 ; +} +static struct clk_ops gateclk_ops = { .recalc_rate = socfpga_clk_recalc_rate, - .determine_rate = clk_hw_determine_rate_no_reparent, + .determine_rate = socfpga_clk_determine_rate, .get_parent = socfpga_clk_get_parent, .set_parent = socfpga_clk_set_parent, };
drivers/clk/stm32/clk-stm32-core.c +1 -1
@@ -431,7 +431,7 @@ static int clk_stm32_composite_determine_rate(struct clk_hw *hw, {struct clk_stm32_composite *composite =to_clk_stm32_composite (hw);const struct stm32_div_cfg *divider; -unsigned long rate; +long rate;if (composite->div_id ==NO_STM32_DIV )return 0 ;
drivers/clk/ti/clk-44xx.c +5 -0
@@ -749,9 +749,14 @@ static struct ti_dt_clk omap44xx_clks[] = {DT_CLK (NULL ,"mcbsp1_sync_mux_ck" ,"abe-clkctrl:0028:26" ),DT_CLK (NULL ,"mcbsp2_sync_mux_ck" ,"abe-clkctrl:0030:26" ),DT_CLK (NULL ,"mcbsp3_sync_mux_ck" ,"abe-clkctrl:0038:26" ), +DT_CLK ("40122000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0028:26" ), +DT_CLK ("40124000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0030:26" ), +DT_CLK ("40126000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0038:26" ),DT_CLK (NULL ,"mcbsp4_sync_mux_ck" ,"l4-per-clkctrl:00c0:26" ), +DT_CLK ("48096000.mcbsp" ,"prcm_fck" ,"l4-per-clkctrl:00c0:26" ),DT_CLK (NULL ,"ocp2scp_usb_phy_phy_48m" ,"l3-init-clkctrl:00c0:8" ),DT_CLK (NULL ,"otg_60m_gfclk" ,"l3-init-clkctrl:0040:24" ), +DT_CLK (NULL ,"pad_fck" ,"pad_clks_ck" ),DT_CLK (NULL ,"per_mcbsp4_gfclk" ,"l4-per-clkctrl:00c0:24" ),DT_CLK (NULL ,"pmd_stm_clock_mux_ck" ,"emu-sys-clkctrl:0000:20" ), DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"),
drivers/clk/ti/clk-54xx.c +4 -0
@@ -565,15 +565,19 @@ static struct ti_dt_clk omap54xx_clks[] = {DT_CLK (NULL ,"gpio8_dbclk" ,"l4per-clkctrl:00f8:8" ),DT_CLK (NULL ,"mcbsp1_gfclk" ,"abe-clkctrl:0028:24" ),DT_CLK (NULL ,"mcbsp1_sync_mux_ck" ,"abe-clkctrl:0028:26" ), +DT_CLK ("40122000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0028:26" ),DT_CLK (NULL ,"mcbsp2_gfclk" ,"abe-clkctrl:0030:24" ),DT_CLK (NULL ,"mcbsp2_sync_mux_ck" ,"abe-clkctrl:0030:26" ), +DT_CLK ("40124000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0030:26" ),DT_CLK (NULL ,"mcbsp3_gfclk" ,"abe-clkctrl:0038:24" ),DT_CLK (NULL ,"mcbsp3_sync_mux_ck" ,"abe-clkctrl:0038:26" ), +DT_CLK ("40126000.mcbsp" ,"prcm_fck" ,"abe-clkctrl:0038:26" ),DT_CLK (NULL ,"mmc1_32khz_clk" ,"l3init-clkctrl:0008:8" ),DT_CLK (NULL ,"mmc1_fclk" ,"l3init-clkctrl:0008:25" ),DT_CLK (NULL ,"mmc1_fclk_mux" ,"l3init-clkctrl:0008:24" ),DT_CLK (NULL ,"mmc2_fclk" ,"l3init-clkctrl:0010:25" ),DT_CLK (NULL ,"mmc2_fclk_mux" ,"l3init-clkctrl:0010:24" ), +DT_CLK (NULL ,"pad_fck" ,"pad_clks_ck" ),DT_CLK (NULL ,"sata_ref_clk" ,"l3init-clkctrl:0068:8" ),DT_CLK (NULL ,"timer10_gfclk_mux" ,"l4per-clkctrl:0008:24" ), DT_CLK(NULL, "timer11_gfclk_mux", "l4per-clkctrl:0010:24"),
drivers/crypto/virtio/virtio_crypto_common.h +3 -0
@@ -35,6 +35,9 @@ struct virtio_crypto {struct virtqueue *ctrl_vq;struct data_queue *data_vq; +/* Work struct for config space updates */ +struct work_struct config_work; +/* To protect the vq operations for the controlq */ spinlock_t ctrl_lock;
drivers/crypto/virtio/virtio_crypto_core.c +13 -1
@@ -335,6 +335,14 @@ static void virtcrypto_del_vqs(struct virtio_crypto *vcrypto)virtcrypto_free_queues (vcrypto); } +static void vcrypto_config_changed_work (struct work_struct *work) +{ +struct virtio_crypto *vcrypto = + container_of(work, struct virtio_crypto, config_work); + +virtcrypto_update_status (vcrypto); +} +static int virtcrypto_probe (struct virtio_device *vdev) {int err = -EFAULT ;
@@ -454,6 +462,8 @@ static int virtcrypto_probe(struct virtio_device *vdev)if (err) goto free_engines; +INIT_WORK (&vcrypto->config_work, vcrypto_config_changed_work); +return 0 ; free_engines:
@@ -490,6 +500,7 @@ static void virtcrypto_remove(struct virtio_device *vdev)dev_info (&vdev->dev,"Start virtcrypto_remove.\n" ); +flush_work (&vcrypto->config_work);if (virtcrypto_dev_started (vcrypto))virtcrypto_dev_stop (vcrypto);virtio_reset_device (vdev);
@@ -504,7 +515,7 @@ static void virtcrypto_config_changed(struct virtio_device *vdev) {struct virtio_crypto *vcrypto = vdev->priv; -virtcrypto_update_status (vcrypto); +schedule_work (&vcrypto->config_work); }#ifdef CONFIG_PM_SLEEP
@@ -512,6 +523,7 @@ static int virtcrypto_freeze(struct virtio_device *vdev) {struct virtio_crypto *vcrypto = vdev->priv; +flush_work (&vcrypto->config_work);virtio_reset_device (vdev);virtcrypto_free_unused_reqs (vcrypto);if (virtcrypto_dev_started (vcrypto))
drivers/firewire/sbp2.c +1 -0
@@ -1521,6 +1521,7 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)if (sbp2_param_exclusive_login) { sdev->manage_system_start_stop = true; sdev->manage_runtime_start_stop = true; + sdev->manage_shutdown = true; }if (sdev->type ==TYPE_ROM )
drivers/firmware/imx/imx-dsp.c +1 -1
@@ -115,11 +115,11 @@ static int imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc) dsp_chan->idx = i %2 ; dsp_chan->ch =mbox_request_channel_byname (cl, chan_name);if (IS_ERR (dsp_chan->ch)) { -kfree (dsp_chan->name); ret =PTR_ERR (dsp_chan->ch);if (ret != -EPROBE_DEFER )dev_err (dev,"Failed to request mbox chan %s ret %d\n" , chan_name, ret); +kfree (dsp_chan->name); goto out; }
drivers/gpu/drm/amd/amdgpu/vi.c +1 -1
@@ -1124,7 +1124,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)bool bL1SS = false;bool bClkReqSupport = true; -if (!amdgpu_device_should_use_aspm (adev) || !amdgpu_device_aspm_support_quirk ()) +if (!amdgpu_device_should_use_aspm (adev) || !amdgpu_device_pcie_dynamic_switching_supported ())return ; if (adev->flags & AMD_IS_APU ||
drivers/gpu/drm/display/drm_dp_mst_topology.c +3 -3
@@ -2574,14 +2574,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(struct drm_dp_mst_branch *found_mstb;struct drm_dp_mst_port *port; +if (!mstb) +return NULL ; +if (memcmp (mstb->guid, guid,16 ) ==0 )return mstb;list_for_each_entry (port, &mstb->ports, next) { -if (!port->mstb) -continue ; - found_mstb =get_mst_branch_device_by_guid_helper (port->mstb, guid);if (found_mstb)
drivers/gpu/drm/i915/gt/intel_gt_mcr.c +22 -2
@@ -376,9 +376,26 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags)* driver threads, but also with hardware/firmware agents. A dedicated * locking register is used. */ -if (GRAPHICS_VER_FULL (gt->i915) >=IP_VER (12 ,70 )) +if (GRAPHICS_VER_FULL (gt->i915) >=IP_VER (12 ,70 )) { +/* +* The steering control and semaphore registers are inside an +* "always on" power domain with respect to RC6. However there +* are some issues if higher-level platform sleep states are +* entering/exiting at the same time these registers are +* accessed. Grabbing GT forcewake and holding it over the +* entire lock/steer/unlock cycle ensures that those sleep +* states have been fully exited before we access these +* registers. This wakeref will be released in the unlock +* routine. +* +* This is expected to become a formally documented/numbered +* workaround soon. +*/ +intel_uncore_forcewake_get (gt->uncore,FORCEWAKE_GT ); + err =wait_for (intel_uncore_read_fw (gt->uncore,MTL_STEER_SEMAPHORE ) ==0x1 ,100 ); + }/* * Even on platforms with a hardware lock, we'll continue to grab
@@ -415,8 +432,11 @@ void intel_gt_mcr_unlock(struct intel_gt *gt, unsigned long flags) {spin_unlock_irqrestore (>->mcr_lock, flags); -if (GRAPHICS_VER_FULL (gt->i915) >=IP_VER (12 ,70 )) +if (GRAPHICS_VER_FULL (gt->i915) >=IP_VER (12 ,70 )) {intel_uncore_write_fw (gt->uncore,MTL_STEER_SEMAPHORE ,0x1 ); + +intel_uncore_forcewake_put (gt->uncore,FORCEWAKE_GT ); + } }/**
drivers/gpu/drm/i915/i915_perf.c +2 -2
@@ -482,8 +482,7 @@ static void oa_report_id_clear(struct i915_perf_stream *stream, u32 *report)static bool oa_report_ctx_invalid (struct i915_perf_stream *stream,void *report) {return !(oa_report_id (stream, report) & - stream->perf->gen8_valid_ctx_bit) && -GRAPHICS_VER (stream->perf->i915) <=11 ; + stream->perf->gen8_valid_ctx_bit); }static u64 oa_timestamp (struct i915_perf_stream *stream,void *report)
@@ -5106,6 +5105,7 @@ static void i915_perf_init_info(struct drm_i915_private *i915) perf->gen8_valid_ctx_bit =BIT (16 );break ;case 12 : + perf->gen8_valid_ctx_bit =BIT (16 );/* * Calculate offset at runtime in oa_pin_context for gen12 and * cache the value in perf->ctx_oactxctrl_offset.
drivers/gpu/drm/i915/i915_pmu.c +9 -0
@@ -832,9 +832,18 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)static void i915_pmu_event_stop (struct perf_event *event,int flags) { +struct drm_i915_private *i915 = +container_of (event->pmu,typeof (*i915), pmu.base); +struct i915_pmu *pmu = &i915->pmu; + +if (pmu->closed) + goto out; +if (flags &PERF_EF_UPDATE )i915_pmu_event_read (event);i915_pmu_disable (event); + +out: event->hw.state =PERF_HES_STOPPED ; }
drivers/gpu/drm/logicvc/Kconfig +2 -0
@@ -5,5 +5,7 @@ config DRM_LOGICVC select DRM_KMS_HELPER select DRM_KMS_DMA_HELPER select DRM_GEM_DMA_HELPER + select REGMAP + select REGMAP_MMIO help DRM display driver for the logiCVC programmable logic block from Xylon
drivers/i2c/busses/i2c-aspeed.c +2 -1
@@ -749,6 +749,8 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr) func_ctrl_reg_val =readl (bus->base +ASPEED_I2C_FUN_CTRL_REG ); func_ctrl_reg_val |=ASPEED_I2CD_SLAVE_EN ;writel (func_ctrl_reg_val, bus->base +ASPEED_I2C_FUN_CTRL_REG ); + + bus->slave_state =ASPEED_I2C_SLAVE_INACTIVE ; }static int aspeed_i2c_reg_slave (struct i2c_client *client)
@@ -765,7 +767,6 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client)__aspeed_i2c_reg_slave (bus, client->addr); bus->slave = client; - bus->slave_state =ASPEED_I2C_SLAVE_INACTIVE ;spin_unlock_irqrestore (&bus->lock, flags);return 0 ;
drivers/i2c/busses/i2c-stm32f7.c +6 -3
@@ -1059,9 +1059,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,/* Configure PEC */ if ((flags &I2C_CLIENT_PEC ) && f7_msg->size !=I2C_SMBUS_QUICK ) { cr1 |=STM32F7_I2C_CR1_PECEN ; - cr2 |=STM32F7_I2C_CR2_PECBYTE ; -if (!f7_msg->read_write) +if (!f7_msg->read_write) { + cr2 |=STM32F7_I2C_CR2_PECBYTE ; f7_msg->count++; + } }else { cr1 &= ~STM32F7_I2C_CR1_PECEN ; cr2 &= ~STM32F7_I2C_CR2_PECBYTE ;
@@ -1149,8 +1150,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev) f7_msg->stop = true;/* Add one byte for PEC if needed */ -if (cr1 &STM32F7_I2C_CR1_PECEN ) +if (cr1 &STM32F7_I2C_CR1_PECEN ) { + cr2 |=STM32F7_I2C_CR2_PECBYTE ; f7_msg->count++; + }/* Set number of bytes to be transferred */ cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK );
drivers/i2c/muxes/i2c-demux-pinctrl.c +1 -1
@@ -61,7 +61,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 neif (ret) goto err; - adap =of_find_i2c_adapter_by_node (priv->chan[new_chan].parent_np); + adap =of_get_i2c_adapter_by_node (priv->chan[new_chan].parent_np);if (!adap) { ret = -ENODEV ; goto err_with_revert;
drivers/i2c/muxes/i2c-mux-gpmux.c +1 -1
@@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)dev_err (dev,"Cannot parse i2c-parent\n" );return ERR_PTR (-ENODEV ); } - parent =of_find_i2c_adapter_by_node (parent_np); + parent =of_get_i2c_adapter_by_node (parent_np);of_node_put (parent_np);if (!parent)return ERR_PTR (-EPROBE_DEFER );
drivers/i2c/muxes/i2c-mux-pinctrl.c +1 -1
@@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)dev_err (dev,"Cannot parse i2c-parent\n" );return ERR_PTR (-ENODEV ); } - parent =of_find_i2c_adapter_by_node (parent_np); + parent =of_get_i2c_adapter_by_node (parent_np);of_node_put (parent_np);if (!parent)return ERR_PTR (-EPROBE_DEFER );
drivers/iio/adc/exynos_adc.c +14 -10
@@ -826,16 +826,26 @@ static int exynos_adc_probe(struct platform_device *pdev) } } +/* leave out any TS related code if unreachable */ +if (IS_REACHABLE (CONFIG_INPUT )) { + has_ts =of_property_read_bool (pdev->dev.of_node, +"has-touchscreen" ) || pdata; + } + irq =platform_get_irq (pdev,0 );if (irq <0 )return irq; info->irq = irq; - irq =platform_get_irq (pdev,1 ); -if (irq == -EPROBE_DEFER ) -return irq; +if (has_ts) { + irq =platform_get_irq (pdev,1 ); +if (irq == -EPROBE_DEFER ) +return irq; - info->tsirq = irq; + info->tsirq = irq; + }else { + info->tsirq =-1 ; + } info->dev = &pdev->dev;
@@ -900,12 +910,6 @@ static int exynos_adc_probe(struct platform_device *pdev)if (info->data->init_hw) info->data->init_hw (info); -/* leave out any TS related code if unreachable */ -if (IS_REACHABLE (CONFIG_INPUT )) { - has_ts =of_property_read_bool (pdev->dev.of_node, -"has-touchscreen" ) || pdata; - } -if (pdata) info->delay = pdata->delay;else
drivers/iio/adc/xilinx-xadc-core.c +14 -25
@@ -456,6 +456,9 @@ static const struct xadc_ops xadc_zynq_ops = { .interrupt_handler = xadc_zynq_interrupt_handler, .update_alarm = xadc_zynq_update_alarm, .type = XADC_TYPE_S7, + /* Temp in C = (val * 503.975) / 2**bits - 273.15 */ + .temp_scale = 503975, + .temp_offset = 273150, };static const unsigned int xadc_axi_reg_offsets[] = {
@@ -566,6 +569,9 @@ static const struct xadc_ops xadc_7s_axi_ops = { .interrupt_handler = xadc_axi_interrupt_handler, .flags = XADC_FLAGS_BUFFERED | XADC_FLAGS_IRQ_OPTIONAL, .type = XADC_TYPE_S7, + /* Temp in C = (val * 503.975) / 2**bits - 273.15 */ + .temp_scale = 503975, + .temp_offset = 273150, };static const struct xadc_ops xadc_us_axi_ops = {
@@ -577,6 +583,12 @@ static const struct xadc_ops xadc_us_axi_ops = { .interrupt_handler = xadc_axi_interrupt_handler, .flags = XADC_FLAGS_BUFFERED | XADC_FLAGS_IRQ_OPTIONAL, .type = XADC_TYPE_US, +/** +* Values below are for UltraScale+ (SYSMONE4) using internal reference. +* See https://docs.xilinx.com/v/u/en-US/ug580-ultrascale-sysmon +*/ + .temp_scale = 509314, + .temp_offset = 280231, }; static int _xadc_update_adc_reg(struct xadc *xadc, unsigned int reg,
@@ -945,8 +957,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev, *val2 = bits;return IIO_VAL_FRACTIONAL_LOG2 ;case IIO_TEMP : -/* Temp in C = (val * 503.975) / 2**bits - 273.15 */ - *val =503975 ; + *val = xadc->ops->temp_scale; *val2 = bits;return IIO_VAL_FRACTIONAL_LOG2 ;default :
@@ -954,7 +965,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev, }case IIO_CHAN_INFO_OFFSET :/* Only the temperature channel has an offset */ - *val = -((273150 << bits) /503975 ); + *val = -((xadc->ops->temp_offset << bits) / xadc->ops->temp_scale);return IIO_VAL_INT ;case IIO_CHAN_INFO_SAMP_FREQ : ret =xadc_read_samplerate (xadc);
@@ -1423,28 +1434,6 @@ static int xadc_probe(struct platform_device *pdev)if (ret)return ret; -/* Disable all alarms */ - ret =xadc_update_adc_reg (xadc,XADC_REG_CONF1 ,XADC_CONF1_ALARM_MASK , -XADC_CONF1_ALARM_MASK ); -if (ret) -return ret; - -/* Set thresholds to min/max */ -for (i =0 ; i <16 ; i++) { -/* -* Set max voltage threshold and both temperature thresholds to -* 0xffff, min voltage threshold to 0. -*/ -if (i %8 <4 || i ==7 ) - xadc->threshold[i] =0xffff ; -else - xadc->threshold[i] =0 ; - ret =xadc_write_adc_reg (xadc,XADC_REG_THRESHOLD (i), - xadc->threshold[i]); -if (ret) -return ret; - } -/* Go to non-buffered mode */ xadc_postdisable (indio_dev);
drivers/iio/adc/xilinx-xadc.h +2 -0
@@ -85,6 +85,8 @@ struct xadc_ops {unsigned int flags;enum xadc_type type; +int temp_scale; +int temp_offset; }; static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg,
drivers/iio/afe/iio-rescale.c +15 -4
@@ -214,8 +214,18 @@ static int rescale_read_raw(struct iio_dev *indio_dev,return ret <0 ? ret : -EOPNOTSUPP ; } - ret =iio_read_channel_scale (rescale->source, &scale, &scale2); -return rescale_process_offset (rescale, ret, scale, scale2, +if (iio_channel_has_info (rescale->source->channel, +IIO_CHAN_INFO_SCALE )) { + ret =iio_read_channel_scale (rescale->source, &scale, &scale2); +return rescale_process_offset (rescale, ret, scale, scale2, + schan_off, val, val2); + } + +/* +* If we get here we have no scale so scale 1:1 but apply +* rescaler and offset, if any. +*/ +return rescale_process_offset (rescale,IIO_VAL_FRACTIONAL ,1 ,1 , schan_off, val, val2);default :return -EINVAL ;
@@ -280,8 +290,9 @@ static int rescale_configure_channel(struct device *dev, chan->type = rescale->cfg->type;if (iio_channel_has_info (schan,IIO_CHAN_INFO_RAW ) && -iio_channel_has_info (schan,IIO_CHAN_INFO_SCALE )) { -dev_info (dev,"using raw+scale source channel\n" ); + (iio_channel_has_info (schan,IIO_CHAN_INFO_SCALE ) || +iio_channel_has_info (schan,IIO_CHAN_INFO_OFFSET ))) { +dev_info (dev,"using raw+scale/offset source channel\n" ); }else if (iio_channel_has_info (schan,IIO_CHAN_INFO_PROCESSED )) {dev_info (dev,"using processed channel\n" ); rescale->chan_processed = true;
drivers/misc/fastrpc.c +17 -17
@@ -957,6 +957,7 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx)if (err)return err; +memset (ctx->buf->virt,0 , pkt_size); rpra = ctx->buf->virt; list =fastrpc_invoke_buf_start (rpra, ctx->nscalars); pages =fastrpc_phy_page_start (list, ctx->nscalars);
@@ -1089,6 +1090,7 @@ static int fastrpc_put_args(struct fastrpc_invoke_ctx *ctx, } } +/* Clean up fdlist which is updated by DSP */ for (i =0 ; i <FASTRPC_MAX_FDLIST ; i++) {if (!fdlist[i])break ;
@@ -1155,11 +1157,9 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,if (IS_ERR (ctx))return PTR_ERR (ctx); -if (ctx->nscalars) { - err =fastrpc_get_args (kernel, ctx); -if (err) - goto bail; - } + err =fastrpc_get_args (kernel, ctx); +if (err) + goto bail;/* make sure that all CPU memory writes are seen by DSP */ dma_wmb ();
@@ -1175,6 +1175,13 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, err =wait_for_completion_interruptible (&ctx->work); } +if (err) + goto bail; + +/* make sure that all memory writes by DSP are seen by CPU */ +dma_rmb (); +/* populate all the output buffers with results */ + err =fastrpc_put_args (ctx, kernel);if (err) goto bail;
@@ -1183,15 +1190,6 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,if (err) goto bail; -if (ctx->nscalars) { -/* make sure that all memory writes by DSP are seen by CPU */ -dma_rmb (); -/* populate all the output buffers with results */ - err =fastrpc_put_args (ctx, kernel); -if (err) - goto bail; - } - bail:if (err != -ERESTARTSYS && err != -ETIMEDOUT ) {/* We are done with this compute context */
@@ -1982,11 +1980,13 @@ static int fastrpc_req_mem_unmap_impl(struct fastrpc_user *fl, struct fastrpc_me sc =FASTRPC_SCALARS (FASTRPC_RMID_INIT_MEM_UNMAP ,1 ,0 ); err =fastrpc_internal_invoke (fl, true,FASTRPC_INIT_HANDLE , sc, &args[0 ]); -fastrpc_map_put (map); -if (err) +if (err) {dev_err (dev,"unmmap\tpt fd = %d, 0x%09llx error\n" , map->fd, map->raddr); +return err; + } +fastrpc_map_put (map); -return err; +return 0 ; }static int fastrpc_req_mem_unmap (struct fastrpc_user *fl,char __user *argp)
drivers/net/ethernet/adi/adin1110.c +1 -1
@@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv) {struct adin1110_priv *priv = port_priv->priv;u32 header_len =ADIN1110_RD_HEADER_LEN ; -struct spi_transfer t; +struct spi_transfer t = {0 };u32 frame_size_no_fcs;struct sk_buff *rxb;u32 frame_size;
drivers/net/ethernet/intel/i40e/i40e.h +1 -1
@@ -580,7 +580,6 @@ struct i40e_pf {#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)#define I40E_FLAG_RS_FEC BIT(25)#define I40E_FLAG_BASE_R_FEC BIT(26) -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)/* TOTAL_PORT_SHUTDOWN * Allows to physically disable the link on the NIC's port. * If enabled, (after link down request from the OS)
@@ -603,6 +602,7 @@ struct i40e_pf {* in abilities field of i40e_aq_set_phy_config structure */ #define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27) +#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)struct i40e_client_instance *cinst;bool stat_offsets_loaded;
drivers/net/ethernet/intel/i40e/i40e_txrx.c +9 -2
@@ -2544,7 +2544,14 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget, rx_buffer =i40e_rx_bi (rx_ring, ntp);i40e_inc_ntp (rx_ring);i40e_reuse_rx_page (rx_ring, rx_buffer); - cleaned_count++; +/* Update ntc and bump cleaned count if not in the +* middle of mb packet. +*/ +if (rx_ring->next_to_clean == ntp) { + rx_ring->next_to_clean = + rx_ring->next_to_process; + cleaned_count++; + }continue ; }
@@ -2847,7 +2854,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)return budget; } -if (vsi->back->flags &I40E_TXR_FLAGS_WB_ON_ITR ) +if (q_vector->tx.ring[0 ].flags &I40E_TXR_FLAGS_WB_ON_ITR ) q_vector->arm_wb_state = false;/* Exit the polling mode, but don't re-enable interrupts if stack might
drivers/net/ethernet/intel/iavf/iavf_main.c +4 -3
@@ -1437,9 +1437,9 @@ void iavf_down(struct iavf_adapter *adapter) adapter->aq_required |=IAVF_FLAG_AQ_DEL_FDIR_FILTER ;if (!list_empty (&adapter->adv_rss_list_head)) adapter->aq_required |=IAVF_FLAG_AQ_DEL_ADV_RSS_CFG ; - adapter->aq_required |=IAVF_FLAG_AQ_DISABLE_QUEUES ; } + adapter->aq_required |=IAVF_FLAG_AQ_DISABLE_QUEUES ;mod_delayed_work (adapter->wq, &adapter->watchdog_task,0 ); }
@@ -4982,8 +4982,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)INIT_WORK (&adapter->finish_config, iavf_finish_config);INIT_DELAYED_WORK (&adapter->watchdog_task, iavf_watchdog_task);INIT_DELAYED_WORK (&adapter->client_task, iavf_client_task); -queue_delayed_work (adapter->wq, &adapter->watchdog_task, -msecs_to_jiffies (5 * (pdev->devfn &0x07 )));/* Setup the wait queue for indicating transition to down status */ init_waitqueue_head (&adapter->down_waitqueue);
@@ -4994,6 +4992,9 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)/* Setup the wait queue for indicating virtchannel events */ init_waitqueue_head (&adapter->vc_waitqueue); +queue_delayed_work (adapter->wq, &adapter->watchdog_task, +msecs_to_jiffies (5 * (pdev->devfn &0x07 ))); +/* Initialization goes on in the work. Do not add more of it below. */ return 0 ; err_ioremap:
drivers/net/ethernet/intel/igb/igb_ethtool.c +5 -1
@@ -2978,11 +2978,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,if (err) goto err_out_w_lock; -igb_update_ethtool_nfc_entry (adapter, input, input->sw_idx); + err =igb_update_ethtool_nfc_entry (adapter, input, input->sw_idx); +if (err) + goto err_out_input_filter;spin_unlock (&adapter->nfc_lock);return 0 ; +err_out_input_filter: +igb_erase_filter (adapter, input); err_out_w_lock:spin_unlock (&adapter->nfc_lock); err_out:
drivers/net/ethernet/intel/igc/igc_ethtool.c +25 -10
@@ -1817,7 +1817,7 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,struct igc_adapter *adapter =netdev_priv (netdev);struct net_device *dev = adapter->netdev;struct igc_hw *hw = &adapter->hw; -u32 advertising; +u16 advertised =0 ;/* When adapter in resetting mode, autoneg/speed/duplex * cannot be changed
@@ -1842,18 +1842,33 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,while (test_and_set_bit (__IGC_RESETTING, &adapter->state))usleep_range (1000 ,2000 ); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); -/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT. -* We have to check this and convert it to ADVERTISE_2500_FULL -* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly. -*/ - if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full)) - advertising |=ADVERTISE_2500_FULL ; +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 2500baseT_Full)) + advertised |=ADVERTISE_2500_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 1000baseT_Full)) + advertised |=ADVERTISE_1000_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 100baseT_Full)) + advertised |=ADVERTISE_100_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 100baseT_Half)) + advertised |=ADVERTISE_100_HALF ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 10baseT_Full)) + advertised |=ADVERTISE_10_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 10baseT_Half)) + advertised |=ADVERTISE_10_HALF ;if (cmd->base.autoneg ==AUTONEG_ENABLE ) { hw->mac.autoneg =1 ; - hw->phy.autoneg_advertised = advertising; + hw->phy.autoneg_advertised = advertised;if (adapter->fc_autoneg) hw->fc.requested_mode = igc_fc_default; }else {
drivers/net/ethernet/realtek/r8169_main.c +3 -3
@@ -4364,7 +4364,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,unsigned int entry = dirty_tx %NUM_TX_DESC ;u32 status; - status =le32_to_cpu (tp->TxDescArray[entry].opts1); + status =le32_to_cpu (READ_ONCE (tp->TxDescArray[entry].opts1));if (status & DescOwn)break ;
@@ -4394,7 +4394,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,* If skb is NULL then we come here again once a tx irq is * triggered after the last fragment is marked transmitted. */ -if (tp->cur_tx != dirty_tx && skb) +if (READ_ONCE (tp->cur_tx) != dirty_tx && skb)rtl8169_doorbell (tp); } }
@@ -4427,7 +4427,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, int budgetdma_addr_t addr;u32 status; - status =le32_to_cpu (desc->opts1); + status =le32_to_cpu (READ_ONCE (desc->opts1));if (status & DescOwn)break ;
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c +1 -1
@@ -1217,7 +1217,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev, key_index = wl->current_key;if (!enc->length && (ext->ext_flags &IW_ENCODE_EXT_SET_TX_KEY )) { -/* reques to change default key index */ +/* request to change default key index */ pr_debug ("%s: request to change default key to %d\n" , __func__, key_index); wl->current_key = key_index;
drivers/net/gtp.c +3 -2
@@ -871,8 +871,9 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,skb_dst_update_pmtu_no_confirm (skb, mtu); -if (!skb_is_gso (skb) && (iph->frag_off &htons (IP_DF )) && - mtu <ntohs (iph->tot_len)) { +if (iph->frag_off &htons (IP_DF ) && + ((!skb_is_gso (skb) && skb->len > mtu) || + (skb_is_gso (skb) && !skb_gso_validate_network_len (skb, mtu)))) {netdev_dbg (dev,"packet too big, fragmentation needed\n" );icmp_ndo_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED ,htonl (mtu));
drivers/net/ieee802154/adf7242.c +3 -2
@@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file, void *offset)static void adf7242_debugfs_init (struct adf7242_local *lp) { -char debugfs_dir_name[DNAME_INLINE_LEN +1 ] ="adf7242-" ; +char debugfs_dir_name[DNAME_INLINE_LEN +1 ]; -strncat (debugfs_dir_name,dev_name (&lp->spi->dev),DNAME_INLINE_LEN ); +snprintf (debugfs_dir_name,sizeof (debugfs_dir_name), +"adf7242-%s" ,dev_name (&lp->spi->dev)); lp->debugfs_root =debugfs_create_dir (debugfs_dir_name,NULL );
drivers/net/usb/r8152.c +8 -3
@@ -1212,7 +1212,7 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) ret =usb_control_msg (tp->udev, tp->pipe_ctrl_in,RTL8152_REQ_GET_REGS ,RTL8152_REQT_READ , - value, index, tmp, size,500 ); + value, index, tmp, size,USB_CTRL_GET_TIMEOUT );if (ret <0 )memset (data,0xff , size);else
@@ -1235,7 +1235,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) ret =usb_control_msg (tp->udev, tp->pipe_ctrl_out,RTL8152_REQ_SET_REGS ,RTL8152_REQT_WRITE , - value, index, tmp, size,500 ); + value, index, tmp, size,USB_CTRL_SET_TIMEOUT );kfree (tmp);
@@ -9512,7 +9512,8 @@ static u8 __rtl_get_hw_ver(struct usb_device *udev) ret =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8152_REQ_GET_REGS ,RTL8152_REQT_READ , -PLA_TCR0 ,MCU_TYPE_PLA , tmp,sizeof (*tmp),500 ); +PLA_TCR0 ,MCU_TYPE_PLA , tmp,sizeof (*tmp), +USB_CTRL_GET_TIMEOUT );if (ret >0 ) ocp_data = (__le32_to_cpu (*tmp) >>16 ) &VERSION_MASK ;
@@ -9801,6 +9802,10 @@ static int rtl8152_probe(struct usb_interface *intf, out1:tasklet_kill (&tp->tx_tl); +cancel_delayed_work_sync (&tp->hw_phy_work); +if (tp->rtl_ops.unload) + tp->rtl_ops.unload (tp); +rtl8152_release_firmware (tp);usb_set_intfdata (intf,NULL ); out:free_netdev (netdev);
drivers/net/usb/smsc95xx.c +3 -1
@@ -95,7 +95,9 @@ static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index, ret =fn (dev,USB_VENDOR_REQUEST_READ_REGISTER ,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,0 , index, &buf,4 ); -if (ret <0 ) { +if (ret <4 ) { + ret = ret <0 ? ret : -ENODATA ; +if (ret != -ENODEV )netdev_warn (dev->net,"Failed to read reg index 0x%08x: %d\n" , index, ret);
drivers/nvmem/imx-ocotp.c +3 -3
@@ -499,7 +499,7 @@ static const struct ocotp_params imx6sl_params = { };static const struct ocotp_params imx6sll_params = { - .nregs =128 , + .nregs =80 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT ,
@@ -513,14 +513,14 @@ static const struct ocotp_params imx6sx_params = { };static const struct ocotp_params imx6ul_params = { - .nregs =128 , + .nregs =144 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT , };static const struct ocotp_params imx6ull_params = { - .nregs =64 , + .nregs =80 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT ,
drivers/platform/x86/amd/pmc-quirks.c +73 -0
79 lines not on this page · raw message
drivers/scsi/sd.c +36 -3
@@ -221,7 +221,8 @@ manage_start_stop_show(struct device *dev,return sysfs_emit (buf,"%u\n" , sdp->manage_system_start_stop && - sdp->manage_runtime_start_stop); + sdp->manage_runtime_start_stop && + sdp->manage_shutdown); }static DEVICE_ATTR_RO (manage_start_stop);
@@ -287,6 +288,35 @@ manage_runtime_start_stop_store(struct device *dev, }static DEVICE_ATTR_RW (manage_runtime_start_stop); +static ssize_t manage_shutdown_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +struct scsi_disk *sdkp =to_scsi_disk (dev); +struct scsi_device *sdp = sdkp->device; + +return sysfs_emit (buf,"%u\n" , sdp->manage_shutdown); +} + +static ssize_t manage_shutdown_store (struct device *dev, +struct device_attribute *attr, +const char *buf,size_t count) +{ +struct scsi_disk *sdkp =to_scsi_disk (dev); +struct scsi_device *sdp = sdkp->device; +bool v; + +if (!capable (CAP_SYS_ADMIN )) +return -EACCES ; + +if (kstrtobool (buf, &v)) +return -EINVAL ; + + sdp->manage_shutdown = v; + +return count; +} +static DEVICE_ATTR_RW (manage_shutdown); +static ssize_t allow_restart_show (struct device *dev,struct device_attribute *attr,char *buf) {
@@ -619,6 +649,7 @@ static struct attribute *sd_disk_attrs[] = { &dev_attr_manage_start_stop.attr, &dev_attr_manage_system_start_stop.attr, &dev_attr_manage_runtime_start_stop.attr, + &dev_attr_manage_shutdown.attr, &dev_attr_protection_type.attr, &dev_attr_protection_mode.attr, &dev_attr_app_tag_own.attr,
@@ -3858,8 +3889,10 @@ static void sd_shutdown(struct device *dev)sd_sync_cache (sdkp,NULL ); } -if (system_state !=SYSTEM_RESTART && - sdkp->device->manage_system_start_stop) { +if ((system_state !=SYSTEM_RESTART && + sdkp->device->manage_system_start_stop) || + (system_state ==SYSTEM_POWER_OFF && + sdkp->device->manage_shutdown)) {sd_printk (KERN_NOTICE , sdkp,"Stopping disk\n" );sd_start_stop_device (sdkp,0 ); }
drivers/vdpa/mlx5/net/debug.c +3 -2
@@ -146,7 +146,8 @@ void mlx5_vdpa_add_debugfs(struct mlx5_vdpa_net *ndev) ndev->rx_dent =debugfs_create_dir ("rx" , ndev->debugfs); } -void mlx5_vdpa_remove_debugfs (struct dentry *dbg) +void mlx5_vdpa_remove_debugfs (struct mlx5_vdpa_net *ndev) { -debugfs_remove_recursive (dbg); +debugfs_remove_recursive (ndev->debugfs); + ndev->debugfs =NULL ; }
drivers/vdpa/mlx5/net/mlx5_vnet.c +56 -14
115 lines not on this page · raw message
drivers/vdpa/mlx5/net/mlx5_vnet.h +10 -1
@@ -65,6 +65,15 @@ struct mlx5_vdpa_net {struct hlist_head macvlan_hash[MLX5V_MACVLAN_SIZE ];struct mlx5_vdpa_irq_pool irqp;struct dentry *debugfs; + +u32 umem_1_buffer_param_a; +u32 umem_1_buffer_param_b; + +u32 umem_2_buffer_param_a; +u32 umem_2_buffer_param_b; + +u32 umem_3_buffer_param_a; +u32 umem_3_buffer_param_b; };struct mlx5_vdpa_counter {
@@ -88,7 +97,7 @@ struct macvlan_node { };void mlx5_vdpa_add_debugfs (struct mlx5_vdpa_net *ndev); -void mlx5_vdpa_remove_debugfs (struct dentry *dbg); +void mlx5_vdpa_remove_debugfs (struct mlx5_vdpa_net *ndev);void mlx5_vdpa_add_rx_flow_table (struct mlx5_vdpa_net *ndev);void mlx5_vdpa_remove_rx_flow_table (struct mlx5_vdpa_net *ndev);void mlx5_vdpa_add_tirn (struct mlx5_vdpa_net *ndev);
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c +3 -2
@@ -499,12 +499,13 @@ static int __init vdpasim_blk_init(void) GFP_KERNEL);if (!shared_buffer) { ret = -ENOMEM ; - goto parent_err; + goto mgmt_dev_err; } }return 0 ; - +mgmt_dev_err: +vdpa_mgmtdev_unregister (&mgmt_dev); parent_err:device_unregister (&vdpasim_blk_mgmtdev);return ret;
drivers/vhost/vhost.c +1 -3
@@ -1458,9 +1458,7 @@ ssize_t vhost_chr_write_iter(struct vhost_dev *dev, goto done; } -if ((msg.type ==VHOST_IOTLB_UPDATE || - msg.type ==VHOST_IOTLB_INVALIDATE ) && - msg.size ==0 ) { +if (msg.type ==VHOST_IOTLB_UPDATE && msg.size ==0 ) { ret = -EINVAL ; goto done; }
drivers/virtio/virtio_balloon.c +5 -1
@@ -395,7 +395,11 @@ static inline s64 towards_target(struct virtio_balloon *vb) virtio_cread_le(vb->vdev, struct virtio_balloon_config, num_pages, &num_pages); - target = num_pages; +/* +* Aligned up to guest page size to avoid inflating and deflating +* balloon endlessly. +*/ + target =ALIGN (num_pages,VIRTIO_BALLOON_PAGES_PER_PAGE );return target - vb->num_pages; }
drivers/virtio/virtio_mmio.c +14 -5
@@ -631,14 +631,17 @@ static int virtio_mmio_probe(struct platform_device *pdev)spin_lock_init (&vm_dev->lock); vm_dev->base =devm_platform_ioremap_resource (pdev,0 ); -if (IS_ERR (vm_dev->base)) -return PTR_ERR (vm_dev->base); +if (IS_ERR (vm_dev->base)) { + rc =PTR_ERR (vm_dev->base); + goto free_vm_dev; + }/* Check magic value */ magic =readl (vm_dev->base +VIRTIO_MMIO_MAGIC_VALUE );if (magic != ('v' |'i' <<8 |'r' <<16 |'t' <<24 )) {dev_warn (&pdev->dev,"Wrong magic value 0x%08lx!\n" , magic); -return -ENODEV ; + rc = -ENODEV ; + goto free_vm_dev; }/* Check device version */
@@ -646,7 +649,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)if (vm_dev->version <1 || vm_dev->version >2 ) {dev_err (&pdev->dev,"Version %ld not supported!\n" , vm_dev->version); -return -ENXIO ; + rc = -ENXIO ; + goto free_vm_dev; } vm_dev->vdev.id.device =readl (vm_dev->base +VIRTIO_MMIO_DEVICE_ID );
@@ -655,7 +659,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)* virtio-mmio device with an ID 0 is a (dummy) placeholder * with no function. End probing now with no error reported. */ -return -ENODEV ; + rc = -ENODEV ; + goto free_vm_dev; } vm_dev->vdev.id.vendor =readl (vm_dev->base +VIRTIO_MMIO_VENDOR_ID );
@@ -685,6 +690,10 @@ static int virtio_mmio_probe(struct platform_device *pdev)put_device (&vm_dev->vdev.dev);return rc; + +free_vm_dev: +kfree (vm_dev); +return rc; }static int virtio_mmio_remove (struct platform_device *pdev)
drivers/virtio/virtio_pci_modern_dev.c +1 -1
@@ -291,7 +291,7 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev) err = -EINVAL ; mdev->common =vp_modern_map_capability (mdev, common,sizeof (struct virtio_pci_common_cfg ),4 , -0 ,sizeof (struct virtio_pci_common_cfg ), +0 ,sizeof (struct virtio_pci_modern_common_cfg ),NULL ,NULL );if (!mdev->common) goto err_map_common;
fs/btrfs/backref.c +19 -20
@@ -3196,12 +3196,14 @@ static int handle_direct_tree_backref(struct btrfs_backref_cache *cache,* We still need to do a tree search to find out the parents. This is for * TREE_BLOCK_REF backref (keyed or inlined). * +* @trans: Transaction handle. * @ref_key: The same as @ref_key in handle_direct_tree_backref() * @tree_key: The first key of this tree block. * @path: A clean (released) path, to avoid allocating path every time * the function get called. */ -static int handle_indirect_tree_backref(struct btrfs_backref_cache *cache, +static int handle_indirect_tree_backref(struct btrfs_trans_handle *trans, + struct btrfs_backref_cache *cache, struct btrfs_path *path, struct btrfs_key *ref_key, struct btrfs_key *tree_key,
@@ -3315,7 +3317,7 @@ static int handle_indirect_tree_backref(struct btrfs_backref_cache *cache,* If we know the block isn't shared we can avoid * checking its backrefs. */ -if (btrfs_block_can_be_shared (root, eb)) +if (btrfs_block_can_be_shared (trans, root, eb)) upper->checked =0 ;else upper->checked =1 ;
@@ -3363,17 +3365,18 @@ static int handle_indirect_tree_backref(struct btrfs_backref_cache *cache,* links aren't yet bi-directional. Needs to finish such links. * Use btrfs_backref_finish_upper_links() to finish such linkage. * +* @trans: Transaction handle. * @path: Released path for indirect tree backref lookup * @iter: Released backref iter for extent tree search * @node_key: The first key of the tree block */ -int btrfs_backref_add_tree_node (struct btrfs_backref_cache *cache, +int btrfs_backref_add_tree_node (struct btrfs_trans_handle *trans, +struct btrfs_backref_cache *cache,struct btrfs_path *path,struct btrfs_backref_iter *iter,struct btrfs_key *node_key,struct btrfs_backref_node *cur) { -struct btrfs_fs_info *fs_info = cache->fs_info;struct btrfs_backref_edge *edge;struct btrfs_backref_node *exist;int ret;
@@ -3462,25 +3465,21 @@ int btrfs_backref_add_tree_node(struct btrfs_backref_cache *cache, ret =handle_direct_tree_backref (cache, &key, cur);if (ret <0 ) goto out; -continue ; - }else if (unlikely (key.type ==BTRFS_EXTENT_REF_V0_KEY )) { - ret = -EINVAL ; -btrfs_print_v0_err (fs_info); -btrfs_handle_fs_error (fs_info, ret,NULL ); - goto out; - }else if (key.type !=BTRFS_TREE_BLOCK_REF_KEY ) { -continue ; + }else if (key.type ==BTRFS_TREE_BLOCK_REF_KEY ) { +/* +* key.type == BTRFS_TREE_BLOCK_REF_KEY, inline ref +* offset means the root objectid. We need to search +* the tree to get its parent bytenr. +*/ + ret =handle_indirect_tree_backref (trans, cache, path, + &key, node_key, cur); +if (ret <0 ) + goto out; } -/* -* key.type == BTRFS_TREE_BLOCK_REF_KEY, inline ref offset -* means the root objectid. We need to search the tree to get -* its parent bytenr. +* Unrecognized tree backref items (if it can pass tree-checker) +* would be ignored. */ - ret =handle_indirect_tree_backref (cache, path, &key, node_key, - cur); -if (ret <0 ) - goto out; } ret =0 ; cur->checked =1 ;
fs/btrfs/backref.h +2 -1
@@ -540,7 +540,8 @@ static inline void btrfs_backref_panic(struct btrfs_fs_info *fs_info, bytenr); } -int btrfs_backref_add_tree_node(struct btrfs_backref_cache *cache, +int btrfs_backref_add_tree_node(struct btrfs_trans_handle *trans, + struct btrfs_backref_cache *cache, struct btrfs_path *path, struct btrfs_backref_iter *iter, struct btrfs_key *node_key,
fs/btrfs/ctree.c +16 -5
@@ -367,7 +367,8 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,/* * check if the tree block can be shared by multiple trees */ -int btrfs_block_can_be_shared (struct btrfs_root *root, +int btrfs_block_can_be_shared (struct btrfs_trans_handle *trans, +struct btrfs_root *root,struct extent_buffer *buf) {/*
@@ -376,11 +377,21 @@ int btrfs_block_can_be_shared(struct btrfs_root *root,* not allocated by tree relocation, we know the block is not shared. */ if (test_bit (BTRFS_ROOT_SHAREABLE , &root->state) && - buf != root->node && buf != root->commit_root && + buf != root->node && (btrfs_header_generation (buf) <=btrfs_root_last_snapshot (&root->root_item) || -btrfs_header_flag (buf,BTRFS_HEADER_FLAG_RELOC ))) -return 1 ; +btrfs_header_flag (buf,BTRFS_HEADER_FLAG_RELOC ))) { +if (buf != root->commit_root) +return 1 ; +/* +* An extent buffer that used to be the commit root may still be +* shared because the tree height may have increased and it +* became a child of a higher level root. This can happen when +* snapshotting a subvolume created in the current transaction. +*/ +if (btrfs_header_generation (buf) == trans->transid) +return 1 ; + }return 0 ; }
@@ -415,7 +426,7 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,* are only allowed for blocks use full backrefs. */ -if (btrfs_block_can_be_shared (root, buf)) { +if (btrfs_block_can_be_shared (trans, root, buf)) { ret =btrfs_lookup_extent_info (trans, fs_info, buf->start,btrfs_header_level (buf),1 , &refs, &flags);
fs/btrfs/ctree.h +2 -1
@@ -540,7 +540,8 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer **cow_ret, u64 new_root_objectid); -int btrfs_block_can_be_shared (struct btrfs_root *root, +int btrfs_block_can_be_shared (struct btrfs_trans_handle *trans, +struct btrfs_root *root,struct extent_buffer *buf);int btrfs_del_ptr (struct btrfs_trans_handle *trans,struct btrfs_root *root,struct btrfs_path *path,int level,int slot);
fs/btrfs/extent-tree.c +21 -14
@@ -187,8 +187,10 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans, num_refs =btrfs_extent_refs (leaf, ei); extent_flags =btrfs_extent_flags (leaf, ei); }else { - ret = -EINVAL ; -btrfs_print_v0_err (fs_info); + ret = -EUCLEAN ; +btrfs_err (fs_info, +"unexpected extent item size, has %u expect >= %zu" , + item_size,sizeof (*ei));if (trans)btrfs_abort_transaction (trans, ret);else
@@ -624,12 +626,12 @@ static noinline int remove_extent_data_ref(struct btrfs_trans_handle *trans, ref2 =btrfs_item_ptr (leaf, path->slots[0 ], struct btrfs_shared_data_ref); num_refs =btrfs_shared_data_ref_count (leaf, ref2); - }else if (unlikely (key.type ==BTRFS_EXTENT_REF_V0_KEY )) { -btrfs_print_v0_err (trans->fs_info); -btrfs_abort_transaction (trans, -EINVAL ); -return -EINVAL ; }else { -BUG (); +btrfs_err (trans->fs_info, +"unrecognized backref key (%llu %u %llu)" , + key.objectid, key.type, key.offset); +btrfs_abort_transaction (trans, -EUCLEAN ); +return -EUCLEAN ; }BUG_ON (num_refs < refs_to_drop);
@@ -660,7 +662,6 @@ static noinline u32 extent_data_ref_count(struct btrfs_path *path, leaf = path->nodes[0 ];btrfs_item_key_to_cpu (leaf, &key, path->slots[0 ]); -BUG_ON (key.type ==BTRFS_EXTENT_REF_V0_KEY );if (iref) {/* * If type is invalid, we should have bailed out earlier than
@@ -881,8 +882,10 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans, leaf = path->nodes[0 ]; item_size =btrfs_item_size (leaf, path->slots[0 ]);if (unlikely (item_size <sizeof (*ei))) { - err = -EINVAL ; -btrfs_print_v0_err (fs_info); + err = -EUCLEAN ; +btrfs_err (fs_info, +"unexpected extent item size, has %llu expect >= %zu" , + item_size,sizeof (*ei));btrfs_abort_transaction (trans, err); goto out; }
@@ -1683,8 +1686,10 @@ static int run_delayed_extent_op(struct btrfs_trans_handle *trans, item_size =btrfs_item_size (leaf, path->slots[0 ]);if (unlikely (item_size <sizeof (*ei))) { - err = -EINVAL ; -btrfs_print_v0_err (fs_info); + err = -EUCLEAN ; +btrfs_err (fs_info, +"unexpected extent item size, has %u expect >= %zu" , + item_size,sizeof (*ei));btrfs_abort_transaction (trans, err); goto out; }
@@ -3113,8 +3118,10 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, leaf = path->nodes[0 ]; item_size =btrfs_item_size (leaf, extent_slot);if (unlikely (item_size <sizeof (*ei))) { - ret = -EINVAL ; -btrfs_print_v0_err (info); + ret = -EUCLEAN ; +btrfs_err (trans->fs_info, +"unexpected extent item size, has %u expect >= %zu" , + item_size,sizeof (*ei));btrfs_abort_transaction (trans, ret); goto out; }
fs/btrfs/messages.c +0 -6
@@ -252,12 +252,6 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, }#endif -void __cold btrfs_print_v0_err (struct btrfs_fs_info *fs_info) -{ -btrfs_err (fs_info, -"Unsupported V0 extent filesystem detected. Aborting. Please re-create your filesystem with a newer kernel" ); -} -#if BITS_PER_LONG ==32 void __cold btrfs_warn_32bit_limit (struct btrfs_fs_info *fs_info) {
fs/btrfs/messages.h +0 -2
@@ -181,8 +181,6 @@ do { \#define ASSERT (expr) (void)(expr)#endif -void __cold btrfs_print_v0_err (struct btrfs_fs_info *fs_info); - __printf(5, 6)__cold void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function,
fs/btrfs/print-tree.c +4 -6
@@ -95,8 +95,10 @@ static void print_extent_item(const struct extent_buffer *eb, int slot, int typeint ref_index =0 ;if (unlikely (item_size <sizeof (*ei))) { -btrfs_print_v0_err (eb->fs_info); -btrfs_handle_fs_error (eb->fs_info, -EINVAL ,NULL ); +btrfs_err (eb->fs_info, +"unexpected extent item size, has %u expect >= %zu" , + item_size,sizeof (*ei)); +btrfs_handle_fs_error (eb->fs_info, -EUCLEAN ,NULL ); } ei = btrfs_item_ptr(eb, slot, struct btrfs_extent_item);
@@ -291,10 +293,6 @@ void btrfs_print_leaf(const struct extent_buffer *l)btrfs_file_extent_num_bytes (l, fi), btrfs_file_extent_ram_bytes(l, fi));break ; -case BTRFS_EXTENT_REF_V0_KEY : -btrfs_print_v0_err (fs_info); -btrfs_handle_fs_error (fs_info, -EINVAL ,NULL ); -break ;case BTRFS_BLOCK_GROUP_ITEM_KEY : bi =btrfs_item_ptr (l, i, struct btrfs_block_group_item);
fs/btrfs/relocation.c +10 -8
@@ -466,6 +466,7 @@ static bool handle_useless_nodes(struct reloc_control *rc,* cached. */ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( +struct btrfs_trans_handle *trans,struct reloc_control *rc,struct btrfs_key *node_key,int level,u64 bytenr) {
@@ -499,8 +500,8 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(/* Breadth-first search to build backref cache */ do { - ret = btrfs_backref_add_tree_node(cache, path, iter, node_key, - cur); + ret = btrfs_backref_add_tree_node(trans, cache, path, iter, + node_key, cur); if (ret < 0) { err = ret; goto out;
@@ -2803,7 +2804,7 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans,/* Do tree relocation */ rbtree_postorder_for_each_entry_safe (block, next, blocks, rb_node) { - node =build_backref_tree (rc, &block->key, + node =build_backref_tree (trans, rc, &block->key, block->level, block->bytenr);if (IS_ERR (node)) { err =PTR_ERR (node);
@@ -3256,12 +3257,13 @@ static int add_tree_block(struct reloc_control *rc,if (type ==BTRFS_TREE_BLOCK_REF_KEY ) owner =btrfs_extent_inline_ref_offset (eb, iref); } - }else if (unlikely (item_size ==sizeof (struct btrfs_extent_item_v0 ))) { -btrfs_print_v0_err (eb->fs_info); -btrfs_handle_fs_error (eb->fs_info, -EINVAL ,NULL ); -return -EINVAL ; }else { -BUG (); +btrfs_print_leaf (eb); +btrfs_err (rc->block_group->fs_info, +"unrecognized tree backref at tree block %llu slot %u" , + eb->start, path->slots[0 ]); +btrfs_release_path (path); +return -EUCLEAN ; }btrfs_release_path (path);
fs/nfsd/vfs.c +6 -6
@@ -1781,6 +1781,12 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,if (!flen ||isdotent (fname, flen) || !tlen ||isdotent (tname, tlen)) goto out; + err = (rqstp->rq_vers ==2 ) ? nfserr_acces : nfserr_xdev; +if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt) + goto out; +if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry) + goto out; + retry: host_err =fh_want_write (ffhp);if (host_err) {
@@ -1812,12 +1818,6 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,if (ndentry == trap) goto out_dput_new; - host_err = -EXDEV ; -if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt) - goto out_dput_new; -if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry) - goto out_dput_new; -if ((ndentry->d_sb->s_export_op->flags &EXPORT_OP_CLOSE_BEFORE_UNLINK ) &&nfsd_has_cached_files (ndentry)) { close_cached = true;
fs/smb/client/cached_dir.c +79 -77
253 lines not on this page · raw message
fs/smb/client/cached_dir.h +2 -2
@@ -49,7 +49,7 @@ struct cached_fid {struct cached_dirents dirents; }; -#define MAX_CACHED_FIDS 16 +/* default MAX_CACHED_FIDS is 16 */ struct cached_fids {/* Must be held when: * - accessing the cfids->entries list
@@ -57,7 +57,7 @@ struct cached_fids {spinlock_t cfid_list_lock;int num_entries;struct list_head entries; -struct task_struct *laundromat; +struct delayed_work laundromat_work; };extern struct cached_fids *init_cached_dirs (void );
fs/smb/client/cifsfs.c +12 -0
@@ -117,6 +117,10 @@ module_param(cifs_max_pending, uint, 0444);MODULE_PARM_DESC (cifs_max_pending,"Simultaneous requests to server for " "CIFS/SMB1 dialect (N/A for SMB3) " "Default: 32767 Range: 2 to 32767." ); +unsigned int dir_cache_timeout =30 ; +module_param (dir_cache_timeout, uint,0644 ); +MODULE_PARM_DESC (dir_cache_timeout,"Number of seconds to cache directory contents for which we have a lease. Default: 30 " +"Range: 1 to 65000 seconds, 0 to disable caching dir contents" );#ifdef CONFIG_CIFS_STATS2 unsigned int slow_rsp_threshold =1 ;module_param (slow_rsp_threshold, uint,0644 );
@@ -695,6 +699,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)seq_printf (s,",snapshot=%llu" , tcon->snapshot_time);if (tcon->handle_timeout)seq_printf (s,",handletimeout=%u" , tcon->handle_timeout); +if (tcon->max_cached_dirs !=MAX_CACHED_FIDS ) +seq_printf (s,",max_cached_dirs=%u" , tcon->max_cached_dirs);/* * Display file and directory attribute timeout in seconds.
@@ -1679,6 +1685,12 @@ init_cifs(void) CIFS_MAX_REQ); } +/* Limit max to about 18 hours, and setting to zero disables directory entry caching */ +if (dir_cache_timeout >65000 ) { + dir_cache_timeout =65000 ; +cifs_dbg (VFS ,"dir_cache_timeout set to max of 65000 seconds\n" ); + } + cifsiod_wq =alloc_workqueue ("cifsiod" ,WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 );if (!cifsiod_wq) { rc = -ENOMEM ;
fs/smb/client/cifsglob.h +3 -1
@@ -1192,6 +1192,7 @@ struct cifs_tcon {__u32 max_chunks;__u32 max_bytes_chunk;__u32 max_bytes_copy; +__u32 max_cached_dirs;#ifdef CONFIG_CIFS_FSCACHE u64 resource_id;/* server resource id */ struct fscache_volume *fscache;/* cookie for share */
@@ -1913,7 +1914,7 @@ require use of the stronger protocol */* cifsInodeInfo->lock_sem cifsInodeInfo->llist cifs_init_once * ->can_cache_brlcks * cifsInodeInfo->deferred_lock cifsInodeInfo->deferred_closes cifsInodeInfo_alloc -* cached_fid->fid_mutex cifs_tcon->crfid tconInfoAlloc +* cached_fid->fid_mutex cifs_tcon->crfid tcon_info_alloc * cifsFileInfo->fh_mutex cifsFileInfo cifs_new_fileinfo * cifsFileInfo->file_info_lock cifsFileInfo->count cifs_new_fileinfo * ->invalidHandle initiate_cifs_search
@@ -1987,6 +1988,7 @@ extern unsigned int CIFSMaxBufSize; /* max size not including hdr */extern unsigned int cifs_min_rcv;/* min size of big ntwrk buf pool */ extern unsigned int cifs_min_small;/* min size of small buf pool */ extern unsigned int cifs_max_pending;/* MAX requests at once to server*/ +extern unsigned int dir_cache_timeout;/* max time for directory lease caching of dir */ extern bool disable_legacy_dialects;/* forbid vers=1.0 and vers=2.0 mounts */ extern atomic_t mid_count;
fs/smb/client/cifsproto.h +1 -1
@@ -513,7 +513,7 @@ extern int CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses);extern struct cifs_ses *sesInfoAlloc (void );extern void sesInfoFree (struct cifs_ses *); -extern struct cifs_tcon *tconInfoAlloc (void ); +extern struct cifs_tcon *tcon_info_alloc (bool dir_leases_enabled);extern void tconInfoFree (struct cifs_tcon *); extern int cifs_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *server,
fs/smb/client/connect.c +12 -7
@@ -1882,7 +1882,8 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx) } } - tcon =tconInfoAlloc (); +/* no need to setup directory caching on IPC share, so pass in false */ + tcon =tcon_info_alloc (false);if (tcon ==NULL )return -ENOMEM ;
@@ -2473,8 +2474,9 @@ cifs_put_tcon(struct cifs_tcon *tcon)static struct cifs_tcon *cifs_get_tcon (struct cifs_ses *ses,struct smb3_fs_context *ctx) { -int rc, xid;struct cifs_tcon *tcon; +bool nohandlecache; +int rc, xid; tcon =cifs_find_tcon (ses, ctx);if (tcon) {
@@ -2492,11 +2494,17 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) goto out_fail; } - tcon =tconInfoAlloc (); +if (ses->server->dialect >=SMB20_PROT_ID && + (ses->server->capabilities &SMB2_GLOBAL_CAP_DIRECTORY_LEASING )) + nohandlecache = ctx->nohandlecache; +else + nohandlecache = true; + tcon =tcon_info_alloc (!nohandlecache);if (tcon ==NULL ) { rc = -ENOMEM ; goto out_fail; } + tcon->nohandlecache = nohandlecache;if (ctx->snapshot_time) {if (ses->server->vals->protocol_id ==0 ) {
@@ -2657,10 +2665,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) tcon->retry = ctx->retry; tcon->nocase = ctx->nocase; tcon->broken_sparse_sup = ctx->no_sparse; -if (ses->server->capabilities &SMB2_GLOBAL_CAP_DIRECTORY_LEASING ) - tcon->nohandlecache = ctx->nohandlecache; -else - tcon->nohandlecache = true; + tcon->max_cached_dirs = ctx->max_cached_dirs; tcon->nodelete = ctx->nodelete; tcon->local_lease = ctx->local_lease;INIT_LIST_HEAD (&tcon->pending_opens);
fs/smb/client/fs_context.c +10 -1
@@ -150,6 +150,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {fsparam_u32 ("closetimeo" , Opt_closetimeo),fsparam_u32 ("echo_interval" , Opt_echo_interval),fsparam_u32 ("max_credits" , Opt_max_credits), +fsparam_u32 ("max_cached_dirs" , Opt_max_cached_dirs),fsparam_u32 ("handletimeout" , Opt_handletimeout),fsparam_u64 ("snapshot" , Opt_snapshot), fsparam_u32("max_channels", Opt_max_channels),
@@ -1165,6 +1166,14 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,if (result.uint_32 >1 ) ctx->multichannel = true;break ; +case Opt_max_cached_dirs: +if (result.uint_32 <1 ) { +cifs_errorf (fc,"%s: Invalid max_cached_dirs, needs to be 1 or more\n" , + __func__); + goto cifs_parse_mount_err; + } + ctx->max_cached_dirs = result.uint_32; +break ;case Opt_handletimeout: ctx->handle_timeout = result.uint_32;if (ctx->handle_timeout >SMB3_MAX_HANDLE_TIMEOUT ) {
@@ -1593,7 +1602,7 @@ int smb3_init_fs_context(struct fs_context *fc) ctx->acregmax =CIFS_DEF_ACTIMEO ; ctx->acdirmax =CIFS_DEF_ACTIMEO ; ctx->closetimeo =SMB3_DEF_DCLOSETIMEO ; - + ctx->max_cached_dirs =MAX_CACHED_FIDS ;/* Most clients set timeout to 0, allows server to use its default */ ctx->handle_timeout =0 ;/* See MS-SMB2 spec section 2.2.14.2.12 */
fs/smb/client/fs_context.h +3 -1
@@ -128,6 +128,7 @@ enum cifs_param { Opt_closetimeo, Opt_echo_interval, Opt_max_credits, + Opt_max_cached_dirs, Opt_snapshot, Opt_max_channels, Opt_handletimeout,
@@ -261,6 +262,7 @@ struct smb3_fs_context {__u32 handle_timeout;/* persistent and durable handle timeout in ms */ unsigned int max_credits;/* smb3 max_credits 10 < credits < 60000 */ unsigned int max_channels; +unsigned int max_cached_dirs;__u16 compression;/* compression algorithm 0xFFFF default 0=disabled */ bool rootfs:1; /* if it's a SMB root file system */ bool witness:1; /* use witness protocol */
@@ -287,7 +289,7 @@ extern void smb3_update_mnt_flags(struct cifs_sb_info *cifs_sb);*/ #define SMB3_MAX_DCLOSETIMEO (1 << 30)#define SMB3_DEF_DCLOSETIMEO (1 * HZ)/* even 1 sec enough to help eg open/write/close/open/read */ - +#define MAX_CACHED_FIDS 16extern char *cifs_sanitize_prepath (char *prepath,gfp_t gfp);#endif
fs/smb/client/misc.c +9 -5
@@ -113,18 +113,22 @@ sesInfoFree(struct cifs_ses *buf_to_free) }struct cifs_tcon * -tconInfoAlloc (void ) +tcon_info_alloc (bool dir_leases_enabled) {struct cifs_tcon *ret_buf; ret_buf =kzalloc (sizeof (*ret_buf),GFP_KERNEL );if (!ret_buf)return NULL ; - ret_buf->cfids =init_cached_dirs (); -if (!ret_buf->cfids) { -kfree (ret_buf); -return NULL ; + +if (dir_leases_enabled == true) { + ret_buf->cfids =init_cached_dirs (); +if (!ret_buf->cfids) { +kfree (ret_buf); +return NULL ; + } } +/* else ret_buf->cfids is already set to NULL above */ atomic_inc (&tconInfoAllocCount); ret_buf->status =TID_NEW ;
fs/smb/client/smb2pdu.c +1 -1
@@ -3871,7 +3871,7 @@ void smb2_reconnect_server(struct work_struct *work) goto done;/* allocate a dummy tcon struct used for reconnect */ - tcon =tconInfoAlloc (); + tcon =tcon_info_alloc (false);if (!tcon) { resched = true;list_for_each_entry_safe (ses, ses2, &tmp_ses_list, rlist) {
include/linux/hugetlb.h +6 -0
@@ -58,6 +58,7 @@ struct resv_map {long adds_in_progress;struct list_head region_cache;long region_cache_count; +struct rw_semaphore rw_sema;#ifdef CONFIG_CGROUP_HUGETLB /* * On private mappings, the counter to uncharge reservations is stored
@@ -1245,6 +1246,11 @@ static inline bool __vma_shareable_lock(struct vm_area_struct *vma)return (vma->vm_flags &VM_MAYSHARE ) && vma->vm_private_data; } +static inline bool __vma_private_lock (struct vm_area_struct *vma) +{ +return (!(vma->vm_flags &VM_MAYSHARE )) && vma->vm_private_data; +} +/* * Safe version of huge_pte_offset() to check the locks. See comments * above huge_pte_offset().
include/linux/ieee80211.h +29 -0
@@ -4236,6 +4236,35 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,return mgmt->u.action.category ==WLAN_CATEGORY_PUBLIC ; } +/** +* ieee80211_is_protected_dual_of_public_action - check if skb contains a +* protected dual of public action management frame +* @skb: the skb containing the frame, length will be checked +* +* Return: true if the skb contains a protected dual of public action +* management frame, false otherwise. +*/ +static inline bool +ieee80211_is_protected_dual_of_public_action (struct sk_buff *skb) +{ +u8 action; + +if (!ieee80211_is_public_action ((void *)skb->data, skb->len) || + skb->len <IEEE80211_MIN_ACTION_SIZE +1 ) +return false; + + action = *(u8 *)(skb->data +IEEE80211_MIN_ACTION_SIZE ); + +return action !=WLAN_PUB_ACTION_20_40_BSS_COEX && + action !=WLAN_PUB_ACTION_DSE_REG_LOC_ANN && + action !=WLAN_PUB_ACTION_MSMT_PILOT && + action !=WLAN_PUB_ACTION_TDLS_DISCOVER_RES && + action !=WLAN_PUB_ACTION_LOC_TRACK_NOTI && + action !=WLAN_PUB_ACTION_FTM_REQUEST && + action !=WLAN_PUB_ACTION_FTM_RESPONSE && + action !=WLAN_PUB_ACTION_FILS_DISCOVERY ; +} +/** * _ieee80211_is_group_privacy_action - check if frame is a group addressed * privacy action frame
include/linux/kasan.h +3 -3
@@ -464,10 +464,10 @@ static inline void kasan_free_module_shadow(const struct vm_struct *vm) {}#endif /* (CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS) && !CONFIG_KASAN_VMALLOC */ -#ifdef CONFIG_KASAN_INLINE +#ifdef CONFIG_KASAN void kasan_non_canonical_hook (unsigned long addr); -#else /* CONFIG_KASAN_INLINE */ +#else /* CONFIG_KASAN */ static inline void kasan_non_canonical_hook (unsigned long addr) { } -#endif /* CONFIG_KASAN_INLINE */ +#endif /* CONFIG_KASAN */ #endif /* LINUX_KASAN_H */
include/net/netfilter/nf_flow_table.h +1 -0
@@ -53,6 +53,7 @@ struct nf_flowtable_type {struct list_head list;int family;int (*init)(struct nf_flowtable *ft); +bool (*gc)(const struct flow_offload *flow);int (*setup)(struct nf_flowtable *ft,struct net_device *dev,enum flow_block_command cmd);
include/scsi/scsi_device.h +18 -2
@@ -162,8 +162,24 @@ struct scsi_device {* core. */ unsigned int eh_timeout;/* Error handling timeout */ -bool manage_system_start_stop;/* Let HLD (sd) manage system start/stop */ -bool manage_runtime_start_stop;/* Let HLD (sd) manage runtime start/stop */ +/* +* If true, let the high-level device driver (sd) manage the device +* power state for system suspend/resume (suspend to RAM and +* hibernation) operations. +*/ +bool manage_system_start_stop; + +/* +* If true, let the high-level device driver (sd) manage the device +* power state for runtime device suspand and resume operations. +*/ +bool manage_runtime_start_stop; + +/* +* If true, let the high-level device driver (sd) manage the device +* power state for system shutdown (power off) operations. +*/ +bool manage_shutdown; unsigned removable:1; unsigned changed:1; /* Data invalid due to media change */
include/trace/events/btrfs.h +0 -1
@@ -38,7 +38,6 @@ struct find_free_extent_ctl;__print_symbolic (type, \ { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \ { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \ - { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \ { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \ { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" })
include/uapi/linux/btrfs_tree.h +5 -1
@@ -220,7 +220,11 @@#define BTRFS_EXTENT_DATA_REF_KEY 178 -#define BTRFS_EXTENT_REF_V0_KEY 180 +/* +* Obsolete key. Defintion removed in 6.6, value may be reused in the future. +* +* #define BTRFS_EXTENT_REF_V0_KEY 180 +*/ #define BTRFS_SHARED_BLOCK_REF_KEY 182
include/uapi/linux/gtp.h +1 -1
@@ -33,6 +33,6 @@ enum gtp_attrs {GTPA_PAD , __GTPA_MAX, }; -#define GTPA_MAX (__GTPA_MAX + 1) +#define GTPA_MAX (__GTPA_MAX - 1)#endif /* _UAPI_LINUX_GTP_H_ */
io_uring/fdinfo.c +12 -6
@@ -49,7 +49,6 @@ static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,static __cold void __io_uring_show_fdinfo (struct io_ring_ctx *ctx,struct seq_file *m) { -struct io_sq_data *sq =NULL ;struct io_overflow_cqe *ocqe;struct io_rings *r = ctx->rings;unsigned int sq_mask = ctx->sq_entries -1 , cq_mask = ctx->cq_entries -1 ;
@@ -60,6 +59,7 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,unsigned int cq_shift =0 ;unsigned int sq_shift =0 ;unsigned int sq_entries, cq_entries; +int sq_pid =-1 , sq_cpu =-1 ;bool has_lock;unsigned int i;
@@ -137,13 +137,19 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, has_lock =mutex_trylock (&ctx->uring_lock);if (has_lock && (ctx->flags &IORING_SETUP_SQPOLL )) { - sq = ctx->sq_data; -if (!sq->thread) - sq =NULL ; +struct io_sq_data *sq = ctx->sq_data; + +if (mutex_trylock (&sq->lock)) { +if (sq->thread) { + sq_pid =task_pid_nr (sq->thread); + sq_cpu =task_cpu (sq->thread); + } +mutex_unlock (&sq->lock); + } } -seq_printf (m,"SqThread:\t%d\n" , sq ?task_pid_nr (sq->thread) :-1 ); -seq_printf (m,"SqThreadCpu:\t%d\n" , sq ?task_cpu (sq->thread) :-1 ); +seq_printf (m,"SqThread:\t%d\n" , sq_pid); +seq_printf (m,"SqThreadCpu:\t%d\n" , sq_cpu);seq_printf (m,"UserFiles:\t%u\n" , ctx->nr_user_files);for (i =0 ; has_lock && i < ctx->nr_user_files; i++) {struct file *f =io_file_from_index (&ctx->file_table, i);
kernel/events/core.c +2 -1
@@ -13383,7 +13383,8 @@ static int inherit_group(struct perf_event *parent_event, !perf_get_aux_event(child_ctr, leader))return -EINVAL ; } - leader->group_generation = parent_event->group_generation; +if (leader) + leader->group_generation = parent_event->group_generation;return 0 ; }
kernel/trace/trace_kprobe.c +22 -6
@@ -714,14 +714,30 @@ static int count_symbols(void *data, unsigned long unused)return 0 ; } +struct sym_count_ctx { +unsigned int count; +const char *name; +}; + +static int count_mod_symbols (void *data,const char *name,unsigned long unused) +{ +struct sym_count_ctx *ctx = data; + +if (strcmp (name, ctx->name) ==0 ) + ctx->count++; + +return 0 ; +} +static unsigned int number_of_same_symbols (char *func_name) { -unsigned int count; +struct sym_count_ctx ctx = { .count =0 , .name = func_name }; + +kallsyms_on_each_match_symbol (count_symbols, func_name, &ctx.count); - count =0 ; -kallsyms_on_each_match_symbol (count_symbols, func_name, &count); +module_kallsyms_on_each_symbol (NULL , count_mod_symbols, &ctx); -return count; +return ctx.count; }static int __trace_kprobe_create (int argc,const char *argv[])
@@ -1006,7 +1022,7 @@ EXPORT_SYMBOL_GPL(kprobe_event_cmd_init);* @name: The name of the kprobe event * @loc: The location of the kprobe event * @kretprobe: Is this a return probe? -* @args: Variable number of arg (pairs), one pair for each field +* @...: Variable number of arg (pairs), one pair for each field * * NOTE: Users normally won't want to call this function directly, but * rather use the kprobe_event_gen_cmd_start() wrapper, which automatically
@@ -1079,7 +1095,7 @@ EXPORT_SYMBOL_GPL(__kprobe_event_gen_cmd_start);/** * __kprobe_event_add_fields - Add probe fields to a kprobe command from arg list * @cmd: A pointer to the dynevent_cmd struct representing the new event -* @args: Variable number of arg (pairs), one pair for each field +* @...: Variable number of arg (pairs), one pair for each field * * NOTE: Users normally won't want to call this function directly, but * rather use the kprobe_event_add_fields() wrapper, which
lib/maple_tree.c +1 -1
@@ -5729,7 +5729,7 @@ int mas_expected_entries(struct ma_state *mas, unsigned long nr_entries)/* Internal nodes */ nr_nodes +=DIV_ROUND_UP (nr_nodes, nonleaf_cap);/* Add working room for split (2 nodes) + new parents */ -mas_node_count (mas, nr_nodes +3 ); +mas_node_count_gfp (mas, nr_nodes +3 ,GFP_KERNEL );/* Detect if allocations run out */ mas->mas_flags |=MA_STATE_PREALLOC ;
lib/test_maple_tree.c +24 -11
@@ -9,6 +9,7 @@#include <linux/maple_tree.h> #include <linux/module.h> +#include <linux/rwsem.h> #define MTREE_ALLOC_MAX 0x2000000000000Ul#define CONFIG_MAPLE_SEARCH
@@ -1714,17 +1715,21 @@ static noinline void __init check_forking(struct maple_tree *mt)void *val;MA_STATE (mas, mt,0 ,0 );MA_STATE (newmas, mt,0 ,0 ); +struct rw_semaphore newmt_lock; + +init_rwsem (&newmt_lock);for (i =0 ; i <= nr_entries; i++)mtree_store_range (mt, i*10 , i*10 +5 ,xa_mk_value (i),GFP_KERNEL );mt_set_non_kernel (99999 ); -mt_init_flags (&newmt,MT_FLAGS_ALLOC_RANGE ); +mt_init_flags (&newmt,MT_FLAGS_ALLOC_RANGE |MT_FLAGS_LOCK_EXTERN ); +mt_set_external_lock (&newmt, &newmt_lock); newmas.tree = &newmt;mas_reset (&newmas);mas_reset (&mas); -mas_lock (&newmas); +down_write (&newmt_lock); mas.index =0 ; mas.last =0 ;if (mas_expected_entries (&newmas, nr_entries)) {
@@ -1739,10 +1744,10 @@ static noinline void __init check_forking(struct maple_tree *mt) }rcu_read_unlock ();mas_destroy (&newmas); -mas_unlock (&newmas);mt_validate (&newmt);mt_set_non_kernel (0 ); -mtree_destroy (&newmt); +__mt_destroy (&newmt); +up_write (&newmt_lock); } static noinline void __init check_iteration(struct maple_tree *mt)
@@ -1853,6 +1858,10 @@ static noinline void __init bench_forking(struct maple_tree *mt)void *val;MA_STATE (mas, mt,0 ,0 );MA_STATE (newmas, mt,0 ,0 ); +struct rw_semaphore newmt_lock; + +init_rwsem (&newmt_lock); +mt_set_external_lock (&newmt, &newmt_lock);for (i =0 ; i <= nr_entries; i++) mtree_store_range(mt, i*10, i*10 + 5,
@@ -1867,7 +1876,7 @@ static noinline void __init bench_forking(struct maple_tree *mt) mas.index =0 ; mas.last =0 ;rcu_read_lock (); -mas_lock (&newmas); +down_write (&newmt_lock);if (mas_expected_entries (&newmas, nr_entries)) {printk ("OOM!" );BUG_ON (1 );
@@ -1878,11 +1887,11 @@ static noinline void __init bench_forking(struct maple_tree *mt) mas_store(&newmas, val); }mas_destroy (&newmas); -mas_unlock (&newmas);rcu_read_unlock ();mt_validate (&newmt);mt_set_non_kernel (0 ); -mtree_destroy (&newmt); +__mt_destroy (&newmt); +up_write (&newmt_lock); } }#endif
@@ -2489,6 +2498,10 @@ static noinline void __init check_dup_gaps(struct maple_tree *mt,void *tmp;MA_STATE (mas, mt,0 ,0 );MA_STATE (newmas, &newmt,0 ,0 ); +struct rw_semaphore newmt_lock; + +init_rwsem (&newmt_lock); +mt_set_external_lock (&newmt, &newmt_lock);if (!zero_start) i =1 ;
@@ -2498,9 +2511,9 @@ static noinline void __init check_dup_gaps(struct maple_tree *mt,mtree_store_range (mt, i*10 , (i+1 )*10 - gap,xa_mk_value (i),GFP_KERNEL ); -mt_init_flags (&newmt,MT_FLAGS_ALLOC_RANGE ); +mt_init_flags (&newmt,MT_FLAGS_ALLOC_RANGE |MT_FLAGS_LOCK_EXTERN );mt_set_non_kernel (99999 ); -mas_lock (&newmas); +down_write (&newmt_lock);
Lines of this file are not shown. View the raw message.
mm/hugetlb.c +41 -7
48 lines not on this page · raw message
net/core/neighbour.c +35 -32
67 lines not on this page · raw message
tools/testing/selftests/mm/mremap_dontunmap.c +1 -0
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.