summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CREDITS181
-rw-r--r--Documentation/ABI/stable/sysfs-driver-firmware-zynqmp70
-rw-r--r--Documentation/ABI/testing/sysfs-driver-qat_kpt3
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-mm-damon15
-rw-r--r--Documentation/admin-guide/LSM/LoadPin.rst10
-rw-r--r--Documentation/admin-guide/RAS/main.rst12
-rw-r--r--Documentation/admin-guide/cgroup-v2.rst4
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt57
-rw-r--r--Documentation/admin-guide/mm/damon/usage.rst22
-rw-r--r--Documentation/admin-guide/mm/ksm.rst8
-rw-r--r--Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst26
-rw-r--r--Documentation/arch/powerpc/vas-api.rst4
-rw-r--r--Documentation/arch/powerpc/vmemmap_dedup.rst90
-rw-r--r--Documentation/core-api/memory-allocation.rst32
-rw-r--r--Documentation/devicetree/bindings/display/msm/qcom,qcs8300-mdss.yaml6
-rw-r--r--Documentation/devicetree/bindings/display/msm/qcom,sar2130p-mdss.yaml4
-rw-r--r--Documentation/devicetree/bindings/display/msm/qcom,sm6150-dpu.yaml14
-rw-r--r--Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml2
-rw-r--r--Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml68
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-zynq.yaml6
-rw-r--r--Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml4
-rw-r--r--Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml2
-rw-r--r--Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml52
-rw-r--r--Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml4
-rw-r--r--Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml6
-rw-r--r--Documentation/devicetree/bindings/net/mdio-gpio.yaml16
-rw-r--r--Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml8
-rw-r--r--Documentation/devicetree/bindings/net/qcom,ipa.yaml10
-rw-r--r--Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml6
-rw-r--r--Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml36
-rw-r--r--Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml78
-rw-r--r--Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml32
-rw-r--r--Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml2
-rw-r--r--Documentation/devicetree/bindings/sound/adi,adau1372.yaml10
-rw-r--r--Documentation/devicetree/bindings/sound/adi,adau7118.yaml22
-rw-r--r--Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml20
-rw-r--r--Documentation/devicetree/bindings/sound/asahi-kasei,ak4619.yaml6
-rw-r--r--Documentation/devicetree/bindings/sound/cirrus,cs35l45.yaml44
-rw-r--r--Documentation/devicetree/bindings/sound/cirrus,cs4270.yaml12
-rw-r--r--Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml48
-rw-r--r--Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml20
-rw-r--r--Documentation/devicetree/bindings/sound/cirrus,cs42xx8.yaml60
-rw-r--r--Documentation/devicetree/bindings/sound/dialog,da7219.yaml80
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml2
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,sai.yaml14
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-card.yaml4
-rw-r--r--Documentation/devicetree/bindings/sound/invensense,ics43432.yaml8
-rw-r--r--Documentation/devicetree/bindings/sound/loongson,ls-audio-card.yaml4
-rw-r--r--Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml22
-rw-r--r--Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml82
-rw-r--r--Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml36
-rw-r--r--Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml36
-rw-r--r--Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml46
-rw-r--r--Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml50
-rw-r--r--Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml12
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.yaml16
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml32
-rw-r--r--Documentation/devicetree/bindings/sound/ti,tas5805m.yaml10
-rw-r--r--Documentation/devicetree/bindings/sound/ti,tlv320dac3100.yaml2
-rw-r--r--Documentation/devicetree/bindings/sound/ti,tpa6130a2.yaml2
-rw-r--r--Documentation/doc-guide/kernel-doc.rst7
-rw-r--r--Documentation/filesystems/fuse/fuse.rst8
-rw-r--r--Documentation/input/devices/yealink.rst7
-rw-r--r--Documentation/input/notifier.rst2
-rw-r--r--Documentation/kbuild/kconfig-macro-language.rst8
-rw-r--r--Documentation/mm/damon/design.rst34
-rw-r--r--Documentation/mm/damon/maintainer-profile.rst19
-rw-r--r--Documentation/mm/ksm.rst2
-rw-r--r--Documentation/mm/page_owner.rst8
-rw-r--r--Documentation/mm/process_addrs.rst6
-rw-r--r--Documentation/mm/vmemmap_dedup.rst32
-rw-r--r--Documentation/netlink/specs/nlctrl.yaml15
-rw-r--r--Documentation/netlink/specs/psp.yaml2
-rw-r--r--Documentation/netlink/specs/tcp_metrics.yaml18
-rw-r--r--Documentation/networking/ip-sysctl.rst2
-rw-r--r--Documentation/process/2.Process.rst2
-rw-r--r--Documentation/process/5.Posting.rst2
-rw-r--r--Documentation/process/6.Followthrough.rst2
-rw-r--r--Documentation/process/handling-regressions.rst2
-rw-r--r--Documentation/process/howto.rst2
-rw-r--r--Documentation/process/submitting-patches.rst2
-rw-r--r--Documentation/translations/pt_BR/process/2.Process.rst2
-rw-r--r--Documentation/translations/pt_BR/process/coding-style.rst1318
-rw-r--r--Documentation/translations/pt_BR/process/index.rst4
-rw-r--r--Documentation/translations/pt_BR/process/kernel-enforcement-statement.rst163
-rw-r--r--Documentation/translations/pt_BR/process/maintainer-kvm-x86.rst6
-rw-r--r--Documentation/translations/pt_BR/process/maintainer-tip.rst847
-rw-r--r--Documentation/translations/pt_BR/process/submitting-patches.rst961
-rw-r--r--Documentation/userspace-api/dma-buf-heaps.rst2
-rw-r--r--Documentation/userspace-api/futex2.rst4
-rw-r--r--Documentation/userspace-api/ioctl/ioctl-number.rst5
-rw-r--r--Documentation/userspace-api/vduse.rst33
-rw-r--r--Documentation/virt/coco/sev-guest.rst2
-rw-r--r--MAINTAINERS60
-rw-r--r--Makefile6
-rw-r--r--Next/SHA1s429
-rw-r--r--Next/Trees429
-rw-r--r--Next/merge.log10623
-rw-r--r--arch/Kconfig8
-rw-r--r--arch/alpha/Kconfig1
-rw-r--r--arch/alpha/include/asm/pgtable.h7
-rw-r--r--arch/arc/include/asm/pgalloc.h6
-rw-r--r--arch/arc/include/asm/pgtable-levels.h11
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/arm-soc-for-next-contents.txt22
-rw-r--r--arch/arm/include/asm/pgtable.h7
-rw-r--r--arch/arm/kernel/traps.c17
-rw-r--r--arch/arm64/Kconfig2
-rw-r--r--arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi15
-rw-r--r--arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts13
-rw-r--r--arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi13
-rw-r--r--arch/arm64/include/asm/kvm_host.h2
-rw-r--r--arch/arm64/include/asm/kvm_nested.h3
-rw-r--r--arch/arm64/include/asm/kvm_pkvm.h3
-rw-r--r--arch/arm64/include/asm/mte.h2
-rw-r--r--arch/arm64/include/asm/pgtable.h15
-rw-r--r--arch/arm64/include/asm/set_memory.h5
-rw-r--r--arch/arm64/kvm/arm.c8
-rw-r--r--arch/arm64/kvm/emulate-nested.c2
-rw-r--r--arch/arm64/kvm/hyp/include/nvhe/mem_protect.h2
-rw-r--r--arch/arm64/kvm/hyp/include/nvhe/mm.h1
-rw-r--r--arch/arm64/kvm/hyp/nvhe/mem_protect.c20
-rw-r--r--arch/arm64/kvm/hyp/nvhe/mm.c79
-rw-r--r--arch/arm64/kvm/hyp/nvhe/pkvm.c29
-rw-r--r--arch/arm64/kvm/hyp/nvhe/setup.c16
-rw-r--r--arch/arm64/kvm/hypercalls.c3
-rw-r--r--arch/arm64/kvm/mmu.c15
-rw-r--r--arch/arm64/kvm/nested.c111
-rw-r--r--arch/arm64/kvm/vgic/vgic-its.c46
-rw-r--r--arch/arm64/mm/mteswap.c32
-rw-r--r--arch/arm64/mm/pageattr.c24
-rw-r--r--arch/csky/include/asm/pgtable.h4
-rw-r--r--arch/hexagon/include/asm/pgtable.h3
-rw-r--r--arch/loongarch/Kconfig2
-rw-r--r--arch/loongarch/include/asm/pgtable.h13
-rw-r--r--arch/loongarch/include/asm/set_memory.h5
-rw-r--r--arch/loongarch/mm/init.c4
-rw-r--r--arch/loongarch/mm/pageattr.c27
-rw-r--r--arch/m68k/Kconfig1
-rw-r--r--arch/m68k/include/asm/mcf_pgalloc.h5
-rw-r--r--arch/m68k/include/asm/mcf_pgtable.h6
-rw-r--r--arch/m68k/include/asm/motorola_pgalloc.h9
-rw-r--r--arch/m68k/include/asm/motorola_pgtable.h8
-rw-r--r--arch/m68k/include/asm/sun3_pgtable.h7
-rw-r--r--arch/m68k/mm/motorola.c121
-rw-r--r--arch/microblaze/include/asm/pgalloc.h2
-rw-r--r--arch/microblaze/include/asm/pgtable.h7
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/mips/include/asm/pgtable-32.h10
-rw-r--r--arch/mips/include/asm/pgtable-64.h13
-rw-r--r--arch/nios2/include/asm/pgtable.h7
-rw-r--r--arch/openrisc/include/asm/pgtable.h7
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/include/asm/pgtable.h9
-rw-r--r--arch/parisc/kernel/pci-dma.c6
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/powerpc/include/asm/book3s/32/pgtable.h2
-rw-r--r--arch/powerpc/include/asm/book3s/64/pgtable.h7
-rw-r--r--arch/powerpc/include/asm/nohash/32/pgtable.h2
-rw-r--r--arch/powerpc/include/asm/nohash/64/pgtable-4k.h3
-rw-r--r--arch/powerpc/include/asm/nohash/64/pgtable.h5
-rw-r--r--arch/powerpc/kernel/iommu.c2
-rw-r--r--arch/powerpc/kvm/book3s_hv_nested.c2
-rw-r--r--arch/powerpc/kvm/book3s_hv_uvmem.c5
-rw-r--r--arch/powerpc/mm/book3s64/radix_pgtable.c124
-rw-r--r--arch/powerpc/platforms/powernv/Kconfig1
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig1
-rw-r--r--arch/riscv/Kconfig2
-rw-r--r--arch/riscv/boot/dts/spacemit/k3-com260.dtsi17
-rw-r--r--arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi11
-rw-r--r--arch/riscv/boot/dts/spacemit/k3.dtsi119
-rw-r--r--arch/riscv/include/asm/page.h6
-rw-r--r--arch/riscv/include/asm/pgtable-64.h9
-rw-r--r--arch/riscv/include/asm/pgtable.h4
-rw-r--r--arch/riscv/include/asm/set_memory.h5
-rw-r--r--arch/riscv/mm/pageattr.c23
-rw-r--r--arch/s390/Kconfig2
-rw-r--r--arch/s390/include/asm/pgtable.h11
-rw-r--r--arch/s390/include/asm/set_memory.h5
-rw-r--r--arch/s390/mm/pageattr.c20
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/include/asm/pgalloc.h6
-rw-r--r--arch/sh/include/asm/pgtable-3level.h3
-rw-r--r--arch/sh/include/asm/pgtable_32.h13
-rw-r--r--arch/sh/mm/init.c16
-rw-r--r--arch/sh/mm/pgtable.c20
-rw-r--r--arch/sparc/Kconfig4
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h7
-rw-r--r--arch/sparc/include/asm/pgalloc_64.h8
-rw-r--r--arch/sparc/include/asm/pgtable_32.h3
-rw-r--r--arch/sparc/include/asm/pgtable_64.h10
-rw-r--r--arch/sparc/include/asm/tlb_64.h2
-rw-r--r--arch/sparc/lib/bitext.c14
-rw-r--r--arch/sparc/mm/srmmu.c32
-rw-r--r--arch/um/Kconfig1
-rw-r--r--arch/um/include/asm/pgtable-2level.h7
-rw-r--r--arch/um/include/asm/pgtable-4level.h13
-rw-r--r--arch/x86/Kconfig4
-rw-r--r--arch/x86/entry/vdso/vdso32/fake_32bit_build.h2
-rw-r--r--arch/x86/include/asm/pgtable-2level.h5
-rw-r--r--arch/x86/include/asm/pgtable-3level.h11
-rw-r--r--arch/x86/include/asm/pgtable_64.h18
-rw-r--r--arch/x86/include/asm/set_memory.h5
-rw-r--r--arch/x86/include/asm/string_64.h83
-rw-r--r--arch/x86/kernel/cpu/mtrr/amd.c9
-rw-r--r--arch/x86/mm/pat/set_memory.c16
-rw-r--r--arch/xtensa/include/asm/pgtable.h4
-rw-r--r--arch/xtensa/include/asm/tlb.h2
-rw-r--r--drivers/acpi/sbs.c6
-rw-r--r--drivers/acpi/video_detect.c8
-rw-r--r--drivers/android/binder/page_range.rs19
-rw-r--r--drivers/android/binder_alloc.c63
-rw-r--r--drivers/block/zram/zcomp.c23
-rw-r--r--drivers/block/zram/zcomp.h4
-rw-r--r--drivers/block/zram/zram_drv.c82
-rw-r--r--drivers/char/Makefile2
-rw-r--r--drivers/char/mem.c (renamed from mm/char-mem.c)21
-rw-r--r--drivers/clk/spacemit/ccu-k3.c92
-rw-r--r--drivers/clk/ti/clockdomain.c2
-rw-r--r--drivers/crypto/atmel-ecc.c10
-rw-r--r--drivers/crypto/caam/jr.c23
-rw-r--r--drivers/crypto/intel/qat/qat_common/adf_sysfs_kpt.c24
-rw-r--r--drivers/cxl/core/hdm.c58
-rw-r--r--drivers/cxl/core/mbox.c3
-rw-r--r--drivers/cxl/core/region.c69
-rw-r--r--drivers/cxl/cxl.h10
-rw-r--r--drivers/cxl/port.c3
-rw-r--r--drivers/dax/Kconfig2
-rw-r--r--drivers/dma/arm-dma350.c2
-rw-r--r--drivers/dma/at_hdmac.c81
-rw-r--r--drivers/dma/at_xdmac.c159
-rw-r--r--drivers/dma/bestcomm/bestcomm.c45
-rw-r--r--drivers/dma/bestcomm/gen_bd.c11
-rw-r--r--drivers/dma/dma-jz4780.c10
-rw-r--r--drivers/dma/dmaengine.c34
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c39
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac.h10
-rw-r--r--drivers/dma/dw-edma/dw-edma-pcie.c18
-rw-r--r--drivers/dma/dw-edma/dw-hdma-v0-core.c23
-rw-r--r--drivers/dma/dw-edma/dw-hdma-v0-debugfs.c17
-rw-r--r--drivers/dma/dw-edma/dw-hdma-v0-regs.h10
-rw-r--r--drivers/dma/dw/core.c47
-rw-r--r--drivers/dma/ep93xx_dma.c37
-rw-r--r--drivers/dma/fsl-edma-main.c5
-rw-r--r--drivers/dma/fsl_raid.c6
-rw-r--r--drivers/dma/fsldma.c22
-rw-r--r--drivers/dma/idma64.c10
-rw-r--r--drivers/dma/loongson/loongson1-apb-dma.c23
-rw-r--r--drivers/dma/loongson/loongson2-apb-cmc-dma.c17
-rw-r--r--drivers/dma/loongson/loongson2-apb-dma.c9
-rw-r--r--drivers/dma/mmp_pdma.c5
-rw-r--r--drivers/dma/moxart-dma.c23
-rw-r--r--drivers/dma/mv_xor.c1
-rw-r--r--drivers/dma/nbpfaxi.c2
-rw-r--r--drivers/dma/owl-dma.c21
-rw-r--r--drivers/dma/pch_dma.c41
-rw-r--r--drivers/dma/pxa_dma.c52
-rw-r--r--drivers/dma/st_fdma.c2
-rw-r--r--drivers/dma/ste_dma40.c15
-rw-r--r--drivers/dma/stm32/stm32-dma.c69
-rw-r--r--drivers/dma/stm32/stm32-dma3.c99
-rw-r--r--drivers/dma/stm32/stm32-mdma.c96
-rw-r--r--drivers/dma/sun4i-dma.c17
-rw-r--r--drivers/dma/sun6i-dma.c31
-rw-r--r--drivers/dma/switchtec_dma.c14
-rw-r--r--drivers/dma/tegra186-gpc-dma.c4
-rw-r--r--drivers/dma/tegra20-apb-dma.c2
-rw-r--r--drivers/dma/ti/k3-udma.c6
-rw-r--r--drivers/dma/timb_dma.c63
-rw-r--r--drivers/dma/txx9dmac.c73
-rw-r--r--drivers/dma/virt-dma.h16
-rw-r--r--drivers/gpio/Kconfig12
-rw-r--r--drivers/gpio/Makefile1
-rw-r--r--drivers/gpio/gpio-ad7768.c121
-rw-r--r--drivers/gpio/gpio-regmap.c98
-rw-r--r--drivers/gpu/drm/amd/display/Kconfig1
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c101
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c2
-rw-r--r--drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c2
-rw-r--r--drivers/gpu/drm/drm_atomic_state_helper.c45
-rw-r--r--drivers/gpu/drm/drm_mode_config.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_mst.c24
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_mst.h2
-rw-r--r--drivers/gpu/drm/i915/display/intel_link_bw.c3
-rw-r--r--drivers/gpu/drm/i915/display/intel_quirks.c3
-rw-r--r--drivers/gpu/drm/imagination/pvr_ccb.c43
-rw-r--r--drivers/gpu/drm/imagination/pvr_device.c25
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw.c23
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw.h2
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_meta.c18
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_riscv.c40
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_startstop.c24
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_trace.c1
-rw-r--r--drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h920
-rw-r--r--drivers/gpu/drm/imagination/pvr_rogue_defs.h22
-rw-r--r--drivers/gpu/drm/imagination/pvr_rogue_riscv.h2
-rw-r--r--drivers/gpu/drm/mcde/mcde_display.c2
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.c2
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c1
-rw-r--r--drivers/gpu/drm/msm/dp/dp_display.c21
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c36
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_phy.c8
-rw-r--r--drivers/gpu/drm/msm/msm_fbdev.c1
-rw-r--r--drivers/gpu/drm/pl111/pl111_display.c2
-rw-r--r--drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c66
-rw-r--r--drivers/gpu/drm/scheduler/sched_entity.c8
-rw-r--r--drivers/gpu/drm/scheduler/sched_rq.c20
-rw-r--r--drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c54
-rw-r--r--drivers/gpu/drm/tiny/arcpgu.c2
-rw-r--r--drivers/gpu/drm/tiny/gm12u320.c2
-rw-r--r--drivers/gpu/drm/tiny/repaper.c2
-rw-r--r--drivers/gpu/drm/tve200/tve200_display.c2
-rw-r--r--drivers/gpu/drm/verisilicon/vs_cursor_plane.c2
-rw-r--r--drivers/gpu/drm/verisilicon/vs_hwdb.c44
-rw-r--r--drivers/gpu/drm/verisilicon/vs_hwdb.h4
-rw-r--r--drivers/gpu/drm/verisilicon/vs_primary_plane.c4
-rw-r--r--drivers/gpu/drm/xen/xen_drm_front_kms.c2
-rw-r--r--drivers/hid/hid-core.c4
-rw-r--r--drivers/i2c/Kconfig13
-rw-r--r--drivers/i2c/busses/i2c-at91-core.c3
-rw-r--r--drivers/i2c/busses/i2c-at91-master.c12
-rw-r--r--drivers/i2c/busses/i2c-at91.h1
-rw-r--r--drivers/i2c/busses/i2c-imx.c3
-rw-r--r--drivers/i2c/busses/i2c-ljca.c9
-rw-r--r--drivers/i2c/busses/i2c-qcom-cci.c20
-rw-r--r--drivers/i2c/busses/i2c-qcom-geni.c52
-rw-r--r--drivers/i2c/i2c-atr.c1
-rw-r--r--drivers/i2c/i2c-core-base.c43
-rw-r--r--drivers/i2c/i2c-dev.c3
-rw-r--r--drivers/net/ethernet/8390/pcnet_cs.c9
-rw-r--r--drivers/net/ethernet/microsoft/mana/hw_channel.c24
-rw-r--r--drivers/net/ethernet/qlogic/qla3xxx.c1
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c2
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c6
-rw-r--r--drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c6
-rw-r--r--drivers/net/phy/realtek/realtek_main.c8
-rw-r--r--drivers/net/wireless/ath/ath11k/dp_rx.c2
-rw-r--r--drivers/net/wireless/ath/ath12k/dp_mon.c2
-rw-r--r--drivers/net/wireless/ath/ath12k/dp_rx.c20
-rw-r--r--drivers/net/wireless/ath/ath12k/hw.h20
-rw-r--r--drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c20
-rw-r--r--drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h12
-rw-r--r--drivers/net/wireless/ath/ath12k/wifi7/hw.c6
-rw-r--r--drivers/net/wireless/ath/ath12k/wmi.c6
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c127
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h5
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c2
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/agg.c17
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/agg.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/rx.c50
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/rx.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c7
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rx.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c6
-rw-r--r--drivers/net/wireless/mediatek/mt76/mac80211.c25
-rw-r--r--drivers/net/wireless/realtek/rtw89/core.c7
-rw-r--r--drivers/net/wireless/virtual/mac80211_hwsim_main.c3
-rw-r--r--drivers/nvdimm/pmem.c2
-rw-r--r--drivers/nvdimm/pmem.h12
-rw-r--r--drivers/pci/controller/dwc/pcie-designware.c1
-rw-r--r--drivers/pinctrl/qcom/pinctrl-lpass-lpi.c6
-rw-r--r--drivers/pnp/driver.c4
-rw-r--r--drivers/remoteproc/Kconfig10
-rw-r--r--drivers/remoteproc/omap_remoteproc.c12
-rw-r--r--drivers/remoteproc/remoteproc_core.c3
-rw-r--r--drivers/remoteproc/remoteproc_sysfs.c7
-rw-r--r--drivers/remoteproc/ti_k3_common.c10
-rw-r--r--drivers/remoteproc/ti_k3_common.h4
-rw-r--r--drivers/remoteproc/ti_k3_dsp_remoteproc.c3
-rw-r--r--drivers/remoteproc/ti_k3_m4_remoteproc.c4
-rw-r--r--drivers/remoteproc/ti_k3_r5_remoteproc.c5
-rw-r--r--drivers/spi/spi-virtio.c2
-rw-r--r--drivers/tee/qcomtee/async.c4
-rw-r--r--drivers/tee/qcomtee/qcomtee_msg.h2
-rw-r--r--drivers/tee/qcomtee/qcomtee_object.h1
-rw-r--r--drivers/thunderbolt/domain.c26
-rw-r--r--drivers/thunderbolt/nhi.c26
-rw-r--r--drivers/thunderbolt/nhi.h21
-rw-r--r--drivers/thunderbolt/nhi_regs.h4
-rw-r--r--drivers/thunderbolt/pci.c23
-rw-r--r--fs/Kconfig2
-rw-r--r--fs/fs-writeback.c25
-rw-r--r--fs/iomap/buffered-io.c3
-rw-r--r--fs/ntfs/attrib.c11
-rw-r--r--fs/ocfs2/quota_local.c9
-rw-r--r--fs/orangefs/inode.c21
-rw-r--r--fs/orangefs/orangefs-debugfs.c10
-rw-r--r--fs/orangefs/super.c18
-rw-r--r--fs/proc/base.c3
-rw-r--r--fs/proc/internal.h2
-rw-r--r--fs/proc/task_mmu.c93
-rw-r--r--fs/xfs/libxfs/xfs_btree.c18
-rw-r--r--fs/xfs/xfs_platform.h4
-rw-r--r--include/asm-generic/pgtable-nop4d.h1
-rw-r--r--include/asm-generic/pgtable-nopmd.h1
-rw-r--r--include/asm-generic/pgtable-nopud.h1
-rw-r--r--include/asm-generic/tlb.h66
-rw-r--r--include/drm/drm_atomic_state_helper.h3
-rw-r--r--include/drm/drm_crtc.h12
-rw-r--r--include/linux/ccp.h58
-rw-r--r--include/linux/cgroup.h3
-rw-r--r--include/linux/compaction.h11
-rw-r--r--include/linux/damon.h77
-rw-r--r--include/linux/dma/edma.h1
-rw-r--r--include/linux/dmaengine.h23
-rw-r--r--include/linux/firewire.h5
-rw-r--r--include/linux/fsl/bestcomm/gen_bd.h8
-rw-r--r--include/linux/gfp_types.h2
-rw-r--r--include/linux/gpio/regmap.h2
-rw-r--r--include/linux/huge_mm.h9
-rw-r--r--include/linux/hugetlb.h8
-rw-r--r--include/linux/i2c.h13
-rw-r--r--include/linux/memblock.h1
-rw-r--r--include/linux/memcontrol.h233
-rw-r--r--include/linux/mm.h63
-rw-r--r--include/linux/mm_inline.h115
-rw-r--r--include/linux/mm_types.h8
-rw-r--r--include/linux/mmap_lock.h94
-rw-r--r--include/linux/mmzone.h110
-rw-r--r--include/linux/omap-mailbox.h5
-rw-r--r--include/linux/page-flags.h13
-rw-r--r--include/linux/page_counter.h1
-rw-r--r--include/linux/pagemap.h3
-rw-r--r--include/linux/pgtable.h14
-rw-r--r--include/linux/sched.h4
-rw-r--r--include/linux/set_memory.h12
-rw-r--r--include/linux/shmem_fs.h12
-rw-r--r--include/linux/siphash.h8
-rw-r--r--include/linux/string.h13
-rw-r--r--include/linux/swap.h45
-rw-r--r--include/linux/vmalloc.h4
-rw-r--r--include/linux/vmemmap-optimization.h94
-rw-r--r--include/linux/zsmalloc.h4
-rw-r--r--include/linux/zswap.h8
-rw-r--r--include/net/cfg80211.h4
-rw-r--r--include/net/ip_tunnels.h2
-rw-r--r--include/net/mac80211.h25
-rw-r--r--include/net/mana/hw_channel.h8
-rw-r--r--include/net/mana/mana.h4
-rw-r--r--include/net/page_pool/helpers.h2
-rw-r--r--include/sound/cs35l56.h4
-rw-r--r--include/sound/emu10k1.h4
-rw-r--r--include/sound/emux_legacy.h2
-rw-r--r--include/sound/simple_card_utils.h2
-rw-r--r--include/trace/events/huge_memory.h18
-rw-r--r--include/trace/events/mmflags.h43
-rw-r--r--include/trace/events/tegra_apb_dma.h6
-rw-r--r--include/trace/events/vmscan.h14
-rw-r--r--include/uapi/linux/alloc_tag.h1
-rw-r--r--include/uapi/linux/gpio.h2
-rw-r--r--include/uapi/linux/netlink.h14
-rw-r--r--include/uapi/linux/nl80211.h12
-rw-r--r--include/uapi/linux/random.h2
-rw-r--r--include/uapi/linux/tee.h40
-rw-r--r--include/vdso/getrandom.h2
-rw-r--r--kernel/bpf/stackmap.c17
-rw-r--r--kernel/bpf/task_iter.c2
-rw-r--r--kernel/cgroup/cgroup-internal.h1
-rw-r--r--kernel/cgroup/cgroup.c7
-rw-r--r--kernel/fork.c4
-rw-r--r--kernel/power/snapshot.c4
-rw-r--r--kernel/resource.c14
-rw-r--r--kernel/sched/ext/ext.c75
-rw-r--r--kernel/sched/ext/internal.h9
-rw-r--r--kernel/sched/ext/sub.c10
-rw-r--r--kernel/taskstats.c3
-rw-r--r--kernel/time/jiffies.c16
-rw-r--r--lib/codetag.c10
-rw-r--r--lib/region_alloc_benchmark.c8
-rw-r--r--localversion-next1
-rw-r--r--mm/Kconfig21
-rw-r--r--mm/Kconfig.debug1
-rw-r--r--mm/Makefile3
-rw-r--r--mm/alloc_tag.c14
-rw-r--r--mm/cma.h23
-rw-r--r--mm/collapse.h153
-rw-r--r--mm/compaction.c9
-rw-r--r--mm/damon/core.c254
-rw-r--r--mm/damon/lru_sort.c10
-rw-r--r--mm/damon/ops-common.c185
-rw-r--r--mm/damon/ops-common.h12
-rw-r--r--mm/damon/paddr.c74
-rw-r--r--mm/damon/reclaim.c8
-rw-r--r--mm/damon/sysfs-schemes.c33
-rw-r--r--mm/damon/sysfs.c306
-rw-r--r--mm/damon/tests/core-kunit.h290
-rw-r--r--mm/damon/vaddr.c299
-rw-r--r--mm/debug.c4
-rw-r--r--mm/execmem.c148
-rw-r--r--mm/folio.c19
-rw-r--r--mm/gup.c5
-rw-r--r--mm/gup_test.c9
-rw-r--r--mm/huge_memory.c114
-rw-r--r--mm/hugetlb.c207
-rw-r--r--mm/hugetlb_sysfs.c10
-rw-r--r--mm/hugetlb_vmemmap.c129
-rw-r--r--mm/hugetlb_vmemmap.h13
-rw-r--r--mm/init-mm.c2
-rw-r--r--mm/internal.h45
-rw-r--r--mm/khugepaged.c581
-rw-r--r--mm/ksm.c7
-rw-r--r--mm/list_lru.c9
-rw-r--r--mm/madvise.c184
-rw-r--r--mm/memblock.c26
-rw-r--r--mm/memcontrol-v1.c392
-rw-r--r--mm/memcontrol-v1.h12
-rw-r--r--mm/memcontrol.c431
-rw-r--r--mm/memfd.c31
-rw-r--r--mm/memory.c103
-rw-r--r--mm/memory_hotplug.c67
-rw-r--r--mm/mempolicy.c182
-rw-r--r--mm/migrate.c6
-rw-r--r--mm/migrate_device.c6
-rw-r--r--mm/mincore.c2
-rw-r--r--mm/mm_init.c179
-rw-r--r--mm/mm_init.h1
-rw-r--r--mm/mmap_lock.c61
-rw-r--r--mm/mmu_gather.c30
-rw-r--r--mm/nommu.c6
-rw-r--r--mm/oom_kill.c15
-rw-r--r--mm/page_alloc.c34
-rw-r--r--mm/page_counter.c41
-rw-r--r--mm/page_io.c38
-rw-r--r--mm/page_isolation.c40
-rw-r--r--mm/page_owner.c6
-rw-r--r--mm/page_table_check.c6
-rw-r--r--mm/page_vma_mapped.c7
-rw-r--r--mm/pagewalk.c2
-rw-r--r--mm/percpu.c9
-rw-r--r--mm/pgtable-generic.c35
-rw-r--r--mm/rmap.c11
-rw-r--r--mm/secretmem.c6
-rw-r--r--mm/shmem.c393
-rw-r--r--mm/slab_common.c2
-rw-r--r--mm/slub.c153
-rw-r--r--mm/sparse-vmemmap.c336
-rw-r--r--mm/sparse.c92
-rw-r--r--mm/sparse.h13
-rw-r--r--mm/swap.h9
-rw-r--r--mm/swap_state.c17
-rw-r--r--mm/swapfile.c147
-rw-r--r--mm/userfaultfd.c65
-rw-r--r--mm/vma.c39
-rw-r--r--mm/vma.h3
-rw-r--r--mm/vmalloc.c63
-rw-r--r--mm/vmalloc.h2
-rw-r--r--mm/vmpressure.c3
-rw-r--r--mm/vmscan.c524
-rw-r--r--mm/vmstat.c17
-rw-r--r--mm/workingset.c5
-rw-r--r--mm/zsmalloc.c77
-rw-r--r--mm/zswap.c327
-rw-r--r--net/atm/pppoatm.c42
-rw-r--r--net/bluetooth/l2cap_core.c3
-rw-r--r--net/bridge/br_vlan.c31
-rw-r--r--net/core/drop_monitor.c18
-rw-r--r--net/ipv4/ip_gre.c6
-rw-r--r--net/ipv4/ip_tunnel.c132
-rw-r--r--net/ipv4/ip_tunnel_core.c16
-rw-r--r--net/ipv4/ip_vti.c2
-rw-r--r--net/ipv4/ipip.c2
-rw-r--r--net/ipv4/ipmr.c12
-rw-r--r--net/ipv4/sysctl_net_ipv4.c4
-rw-r--r--net/ipv4/tcp.c40
-rw-r--r--net/ipv6/tcp_ipv6.c3
-rw-r--r--net/mac80211/agg-tx.c4
-rw-r--r--net/mac80211/ap.c3
-rw-r--r--net/mac80211/ht.c2
-rw-r--r--net/mac80211/ieee80211_i.h11
-rw-r--r--net/mac80211/iface.c7
-rw-r--r--net/mac80211/mlme.c10
-rw-r--r--net/mac80211/offchannel.c13
-rw-r--r--net/mac80211/rx.c447
-rw-r--r--net/mac80211/scan.c10
-rw-r--r--net/mac80211/tdls.c2
-rw-r--r--net/mac80211/tx.c10
-rw-r--r--net/netlink/af_netlink.c42
-rw-r--r--net/netlink/diag.c20
-rw-r--r--net/netlink/policy.c16
-rw-r--r--net/openvswitch/conntrack.c2
-rw-r--r--net/psp/psp.h1
-rw-r--r--net/psp/psp_main.c16
-rw-r--r--net/psp/psp_nl.c51
-rw-r--r--net/sched/act_api.c11
-rw-r--r--net/sched/sch_hhf.c9
-rw-r--r--net/unix/garbage.c17
-rw-r--r--net/wireless/nl80211.c18
-rw-r--r--rust/kernel/mm.rs58
-rw-r--r--samples/damon/mtier.c8
-rw-r--r--samples/damon/prcl.c5
-rw-r--r--samples/damon/wsse.c5
-rw-r--r--scripts/gdb/linux/mm.py14
-rw-r--r--security/landlock/syscalls.c2
-rw-r--r--security/selinux/avc.c5
-rw-r--r--security/selinux/hooks.c150
-rw-r--r--security/selinux/include/objsec.h10
-rw-r--r--security/selinux/selinuxfs.c25
-rw-r--r--sound/core/seq/oss/seq_oss_init.c2
-rw-r--r--sound/firewire/bebob/bebob_hwdep.c2
-rw-r--r--sound/hda/codecs/hdmi/hdmi.c2
-rw-r--r--sound/hda/codecs/realtek/alc882.c2
-rw-r--r--sound/hda/codecs/sigmatel.c6
-rw-r--r--sound/hda/common/codec.c2
-rw-r--r--sound/i2c/other/ak4113.c2
-rw-r--r--sound/i2c/other/ak4114.c2
-rw-r--r--sound/i2c/other/ak4xxx-adda.c2
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c2
-rw-r--r--sound/mips/hal2.c4
-rw-r--r--sound/pci/ac97/ac97_codec.c2
-rw-r--r--sound/pci/ac97/ac97_patch.c2
-rw-r--r--sound/pci/au88x0/au88x0.h2
-rw-r--r--sound/pci/au88x0/au88x0_mpu401.c2
-rw-r--r--sound/pci/aw2/aw2-saa7146.c4
-rw-r--r--sound/pci/cs4281.c2
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c6
-rw-r--r--sound/pci/cs46xx/dsp_spos_scb_lib.c8
-rw-r--r--sound/pci/echoaudio/echoaudio.c4
-rw-r--r--sound/pci/echoaudio/echoaudio.h4
-rw-r--r--sound/pci/lx6464es/lx_core.c2
-rw-r--r--sound/pci/lx6464es/lx_defs.h2
-rw-r--r--sound/pci/pcxhr/pcxhr_core.c4
-rw-r--r--sound/pci/riptide/riptide.c4
-rw-r--r--sound/pci/rme32.c2
-rw-r--r--sound/pci/rme9652/hdsp.c2
-rw-r--r--sound/pci/trident/trident_memory.c2
-rw-r--r--sound/pci/vx222/vx222_ops.c2
-rw-r--r--sound/pcmcia/vx/vxp_ops.c2
-rw-r--r--sound/ppc/tumbler.c2
-rw-r--r--sound/soc/amd/acp/acp-sdw-legacy-mach.c14
-rw-r--r--sound/soc/amd/acp/acp-sdw-sof-mach.c23
-rw-r--r--sound/soc/amd/yc/acp6x-mach.c7
-rw-r--r--sound/soc/codecs/cs35l56-sdw.c27
-rw-r--r--sound/soc/codecs/cs35l56-shared-test.c56
-rw-r--r--sound/soc/codecs/cs35l56-shared.c38
-rw-r--r--sound/soc/codecs/cs35l56.c17
-rw-r--r--sound/soc/codecs/cs35l56.h1
-rw-r--r--sound/soc/codecs/hdmi-codec.c6
-rw-r--r--sound/soc/codecs/rt721-sdca-sdw.c12
-rw-r--r--sound/soc/codecs/rt721-sdca.c315
-rw-r--r--sound/soc/codecs/rt721-sdca.h5
-rw-r--r--sound/soc/generic/audio-graph-card.c1
-rw-r--r--sound/soc/generic/audio-graph-card2.c1
-rw-r--r--sound/soc/generic/simple-card-utils.c21
-rw-r--r--sound/soc/generic/simple-card.c11
-rw-r--r--sound/soc/intel/avs/pcm.c4
-rw-r--r--sound/soc/intel/avs/topology.c25
-rw-r--r--sound/soc/intel/avs/topology.h3
-rw-r--r--sound/usb/endpoint.c9
-rw-r--r--sound/usb/mixer.c4
-rw-r--r--sound/usb/mixer_us16x08.h2
-rw-r--r--tools/include/linux/mm.h4
-rw-r--r--tools/mm/page_owner_sort.c134
-rw-r--r--tools/net/ynl/Makefile.deps3
-rw-r--r--tools/net/ynl/pyynl/lib/ynl.py8
-rw-r--r--tools/sched_ext/include/scx/common.bpf.h3
-rw-r--r--tools/sched_ext/scx_qmap.bpf.c14
-rw-r--r--tools/testing/cxl/test/cxl.c109
-rw-r--r--tools/testing/memblock/Makefile3
-rw-r--r--tools/testing/memblock/README12
-rw-r--r--tools/testing/memblock/TODO5
-rw-r--r--tools/testing/memblock/asm/dma.h6
-rw-r--r--tools/testing/memblock/main.c2
-rw-r--r--tools/testing/memblock/tests/alloc_low_api.c148
-rw-r--r--tools/testing/memblock/tests/alloc_low_api.h9
-rw-r--r--tools/testing/memblock/tests/common.c6
-rw-r--r--tools/testing/selftests/cgroup/test_zswap.c15
-rw-r--r--tools/testing/selftests/damon/_damon_sysfs.py161
-rwxr-xr-xtools/testing/selftests/damon/drgn_dump_damon_status.py32
-rwxr-xr-xtools/testing/selftests/damon/sysfs.py39
-rwxr-xr-xtools/testing/selftests/damon/sysfs.sh28
-rwxr-xr-xtools/testing/selftests/drivers/net/hds.py29
-rw-r--r--tools/testing/selftests/drivers/net/hw/devmem_lib.py4
-rwxr-xr-xtools/testing/selftests/drivers/net/psp.py180
-rw-r--r--tools/testing/selftests/kvm/Makefile.kvm1
-rw-r--r--tools/testing/selftests/kvm/arm64/smccc_filter.c4
-rw-r--r--tools/testing/selftests/kvm/arm64/vgic_its_save.c441
-rw-r--r--tools/testing/selftests/kvm/steal_time.c30
-rw-r--r--tools/testing/selftests/mm/.gitignore2
-rw-r--r--tools/testing/selftests/mm/folio_split_race_test.c2
-rw-r--r--tools/testing/selftests/mm/guard-regions.c14
-rw-r--r--tools/testing/selftests/mm/hugetlb-soft-offline.c49
-rw-r--r--tools/testing/selftests/mm/khugepaged.c22
-rw-r--r--tools/testing/selftests/mm/memfd_secret.c3
-rw-r--r--tools/testing/selftests/mm/merge.c95
-rw-r--r--tools/testing/selftests/mm/mlock-random-test.c1
-rw-r--r--tools/testing/selftests/mm/mremap_test.c44
-rw-r--r--tools/testing/selftests/mm/pagemap_ioctl.c94
-rw-r--r--tools/testing/selftests/mm/pkey-helpers.h7
-rw-r--r--tools/testing/selftests/mm/pkey_sighandler_tests.c4
-rwxr-xr-xtools/testing/selftests/mm/run_vmtests.sh31
-rw-r--r--tools/testing/selftests/mm/split_huge_page_test.c4
-rw-r--r--tools/testing/selftests/mm/uffd-unit-tests.c75
-rw-r--r--tools/testing/selftests/mm/uffd-wp-mremap.c2
-rw-r--r--tools/testing/selftests/net/af_unix/scm_rights.c17
-rw-r--r--tools/testing/selftests/proc/proc-self-map-files-001.c2
-rw-r--r--tools/testing/selftests/proc/proc-self-map-files-002.c2
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json115
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf_flows_limit.json128
-rw-r--r--tools/testing/vma/include/dup.h15
-rw-r--r--tools/testing/vma/shared.c9
-rw-r--r--tools/testing/vma/tests/mmap.c105
-rw-r--r--tools/testing/vma/vma_internal.h1
703 files changed, 25315 insertions, 10585 deletions
diff --git a/CREDITS b/CREDITS
index ec0e2d300fb1..f280ab24476a 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,6 +1,7 @@
This is at least a partial credits-file of people that have
- contributed to the Linux project. It is sorted by name and
- formatted to allow easy grepping and beautification by
+ contributed to the Linux project. It is sorted by family name,
+ assuming the used locale is default, e.g. by setting LC_ALL=C,
+ and formatted to allow easy grepping and beautification by
scripts. The fields are: name (N), email (E), web-address
(W), PGP key ID and fingerprint (P), description (D), and
snail-mail address (S).
@@ -344,6 +345,14 @@ D: Hardware spinlock (hwspinlock) subsystem
D: OMAP hwspinlock driver
D: OMAP remoteproc driver
+N: Muli Ben-Yehuda
+E: mulix@mulix.org
+E: muli@il.ibm.com
+W: http://www.mulix.org
+D: trident OSS sound driver, x86-64 dma-ops and Calgary IOMMU,
+D: KVM and Xen bits and other misc. hackery.
+S: Haifa, Israel
+
N: Krzysztof Benedyczak
E: golbi@mat.uni.torun.pl
W: http://www.mat.uni.torun.pl/~golbi
@@ -362,14 +371,6 @@ S: 2322 37th Ave SW
S: Seattle, Washington 98126-2010
S: USA
-N: Muli Ben-Yehuda
-E: mulix@mulix.org
-E: muli@il.ibm.com
-W: http://www.mulix.org
-D: trident OSS sound driver, x86-64 dma-ops and Calgary IOMMU,
-D: KVM and Xen bits and other misc. hackery.
-S: Haifa, Israel
-
N: Johannes Berg
E: johannes@sipsolutions.net
W: https://johannes.sipsolutions.net/
@@ -393,14 +394,14 @@ S: 1549 Hiironen Rd.
S: Brimson, MN 55602
S: USA
-N: Arnd Bergmann
-D: Maintainer of Cell Broadband Engine Architecture
-
N: Hennus Bergman
P: 1024/77D50909 76 99 FD 31 91 E1 96 1C 90 BB 22 80 62 F6 BD 63
D: Author and maintainer of the QIC-02 tape driver
S: The Netherlands
+N: Arnd Bergmann
+D: Maintainer of Cell Broadband Engine Architecture
+
N: Tomas Berndtsson
E: tomas@nocrew.org
W: http://tomas.nocrew.org/
@@ -492,10 +493,6 @@ D: Various fixes (mostly networking)
S: Montreal, Quebec
S: Canada
-N: Zoltán Böszörményi
-E: zboszor@mail.externet.hu
-D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
-
N: John Boyd
E: boyd@cis.ohio-state.edu
D: Co-author of wd7000 SCSI driver
@@ -589,9 +586,6 @@ N: Zach Brown
E: zab@zabbo.net
D: maestro pci sound
-N: Zefan Li
-D: Contribution to control group stuff
-
N: David Brownell
D: Kernel engineer, mentor, and friend. Maintained USB EHCI and
D: gadget layers, SPI subsystem, GPIO subsystem, and more than a few
@@ -632,6 +626,10 @@ S: Ravenhorst 58
S: 2317 AK Leiden
S: The Netherlands
+N: Zoltán Böszörményi
+E: zboszor@mail.externet.hu
+D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
+
N: Michael Callahan
E: callahan@maths.ox.ac.uk
D: PPP for Linux
@@ -703,6 +701,10 @@ S: Tamsui town, Taipei county,
S: Taiwan 251
S: Republic of China
+N: Landen Chao
+E: Landen.Chao@mediatek.com
+D: MT7531 Ethernet switch support
+
N: Michael Elizabeth Chastain
E: mec@shout.net
D: Configure, Menuconfig, xconfig
@@ -715,10 +717,6 @@ D: Media subsystem (V4L/DVB) drivers and core
D: EDAC drivers and EDAC 3.0 core rework
S: Brazil
-N: Landen Chao
-E: Landen.Chao@mediatek.com
-D: MT7531 Ethernet switch support
-
N: Raymond Chen
E: raymondc@microsoft.com
D: Author of Configure script
@@ -1447,6 +1445,10 @@ D: Made support for modules, ramdisk, generic-serial, etc. optional.
D: Transformed old user space bdflush into 1st kernel thread - kflushd.
D: Many other patches, documentation files, mini kernels, utilities, ...
+N: Andy Gospodarek
+E: andy@greyhouse.net
+D: Maintenance and contributions to the network interface bonding driver.
+
N: Masanori GOTO
E: gotom@debian.or.jp
D: Workbit NinjaSCSI-32Bi/UDE driver
@@ -1459,10 +1461,6 @@ S: 8124 Constitution Apt. 7
S: Sterling Heights, Michigan 48313
S: USA
-N: Andy Gospodarek
-E: andy@greyhouse.net
-D: Maintenance and contributions to the network interface bonding driver.
-
N: Vivek Goyal
E: vgoyal@redhat.com
D: KDUMP, KEXEC, and VIRTIO FILE SYSTEM
@@ -1535,6 +1533,14 @@ S: 44 St. Joseph Street, Suite 506
S: Toronto, Ontario, M4Y 2W4
S: Canada
+N: Nitin Gupta
+E: ngupta@vflare.org
+D: zsmalloc memory allocator and zram block device driver
+
+N: Justin Guyett
+E: jguyett@andrew.cmu.edu
+D: via-rhine net driver hacking
+
N: Richard Günther
E: rguenth@tat.physik.uni-tuebingen.de
W: http://www.tat.physik.uni-tuebingen.de/~rguenth
@@ -1543,14 +1549,6 @@ D: binfmt_misc
S: 72074 Tübingen
S: Germany
-N: Justin Guyett
-E: jguyett@andrew.cmu.edu
-D: via-rhine net driver hacking
-
-N: Nitin Gupta
-E: ngupta@vflare.org
-D: zsmalloc memory allocator and zram block device driver
-
N: Danny ter Haar
E: dth@cistron.nl
D: /proc/cpuinfo, reboot on panic , kernel pre-patch tester ;)
@@ -1945,16 +1943,6 @@ E: sjenning@redhat.com
D: Creation and maintenance of zswap
D: Creation and maintenace of the zbud allocator
-N: Jeremy Kerr
-D: Maintainer of SPU File System
-
-N: Michael Kerrisk
-E: mtk.manpages@gmail.com
-W: https://man7.org/
-P: 4096R/3A35CE5E E522 595B 52ED A4E6 BFCC CB5E 8561 9911 3A35 CE5E
-D: Maintainer of the Linux man-pages project
-D: Linux man pages online, at <https://man7.org/linux/man-pages/>
-
N: Niels Kristian Bech Jensen
E: nkbj1970@hotmail.com
D: Miscellaneous kernel updates and fixes.
@@ -2099,6 +2087,16 @@ S: Keplerstr. 6
S: 4050 Traun
S: Austria
+N: Jeremy Kerr
+D: Maintainer of SPU File System
+
+N: Michael Kerrisk
+E: mtk.manpages@gmail.com
+W: https://man7.org/
+P: 4096R/3A35CE5E E522 595B 52ED A4E6 BFCC CB5E 8561 9911 3A35 CE5E
+D: Maintainer of the Linux man-pages project
+D: Linux man pages online, at <https://man7.org/linux/man-pages/>
+
N: Karl Keyte
E: karl@koft.com
D: Disk usage statistics and modifications to line printer driver
@@ -2483,6 +2481,9 @@ D: and much more. He was the maintainer of MD from 2016 to 2018. Shaohua
D: passed away late 2018, he will be greatly missed.
W: https://www.spinics.net/lists/raid/msg61993.html
+N: Zefan Li
+D: Contribution to control group stuff
+
N: Stephan Linz
E: linz@mazet.de
E: Stephan.Linz@gmx.de
@@ -2542,11 +2543,6 @@ D: misc. kernel hacking and debugging
S: Cambridge, MA 02139
S: USA
-N: Martin von Löwis
-E: loewis@informatik.hu-berlin.de
-D: script binary format
-D: NTFS driver
-
N: H.J. Lu
E: hjl@gnu.ai.mit.edu
D: GCC + libraries hacker
@@ -2575,6 +2571,11 @@ S: Puistokaari 1 E 18
S: 00200 Helsinki
S: Finland
+N: Martin von Löwis
+E: loewis@informatik.hu-berlin.de
+D: script binary format
+D: NTFS driver
+
N: Daniel J. Maas
E: dmaas@dcine.com
W: https://www.maasdigital.com
@@ -2625,10 +2626,6 @@ S: PO BOX 220, HFX. CENTRAL
S: Halifax, Nova Scotia
S: Canada B3J 3C8
-N: Kai Mäkisara
-E: Kai.Makisara@kolumbus.fi
-D: SCSI Tape Driver
-
N: Asit Mallick
E: asit.k.mallick@intel.com
D: Linux/IA-64
@@ -2912,13 +2909,6 @@ S: 12725 SW Millikan Way, Suite 400
S: Beaverton, Oregon 97005
S: USA
-N: Eberhard Mönkeberg
-E: emoenke@gwdg.de
-D: CDROM driver "sbpcd" (Matsushita/Panasonic/Soundblaster)
-S: Ruhstrathöhe 2 b.
-S: D-37085 Göttingen
-S: Germany
-
N: Thomas Molina
E: tmolina@cablespeed.com
D: bug fixes, documentation, minor hackery
@@ -3005,6 +2995,17 @@ S: Dragonvagen 1 A 13
S: FIN-00330 Helsingfors
S: Finland
+N: Kai Mäkisara
+E: Kai.Makisara@kolumbus.fi
+D: SCSI Tape Driver
+
+N: Eberhard Mönkeberg
+E: emoenke@gwdg.de
+D: CDROM driver "sbpcd" (Matsushita/Panasonic/Soundblaster)
+S: Ruhstrathöhe 2 b.
+S: D-37085 Göttingen
+S: Germany
+
N: Matija Nalis
E: mnalis@jagor.srce.hr
E: mnalis@voyager.hr
@@ -3205,13 +3206,6 @@ S: RR #5, 497 Pole Line Road
S: Thunder Bay, Ontario
S: CANADA P7C 5M9
-N: Inaky Perez-Gonzalez
-E: inaky.perez-gonzalez@intel.com
-E: linux-wimax@intel.com
-E: inakypg@yahoo.com
-D: WiMAX stack
-D: Intel Wireless WiMAX Connection 2400 driver
-
N: Yuri Per
E: yuri@pts.mipt.ru
D: Some smbfs fixes
@@ -3219,6 +3213,13 @@ S: Demonstratsii 8-382
S: Tula 300000
S: Russia
+N: Inaky Perez-Gonzalez
+E: inaky.perez-gonzalez@intel.com
+E: linux-wimax@intel.com
+E: inakypg@yahoo.com
+D: WiMAX stack
+D: Intel Wireless WiMAX Connection 2400 driver
+
N: Thomas Petazzoni
E: thomas.petazzoni@bootlin.com
D: Driver for the Marvell Armada 370/XP network unit.
@@ -3333,14 +3334,14 @@ N: Frederic Potter
E: fpotter@cirpack.com
D: Some PCI kernel support
-N: Rui Prior
-E: rprior@inescn.pt
-D: ATM device driver for NICStAR based cards
-
N: Roopa Prabhu
E: roopa@nvidia.com
D: Bridge co-maintainer, vxlan and networking contributor
+N: Rui Prior
+E: rprior@inescn.pt
+D: ATM device driver for NICStAR based cards
+
N: Stefan Probst
E: sp@caldera.de
D: The Linux Support Team Erlangen, 1993-97
@@ -4028,12 +4029,6 @@ S: C/ Federico Garcia Lorca 1 10-A
S: Sevilla 41005
S: Spain
-N: Björn Töpel
-E: bjorn@kernel.org
-D: AF_XDP
-S: Gothenburg
-S: Sweden
-
N: Linus Torvalds
E: torvalds@linux-foundation.org
D: Original kernel hacker
@@ -4087,17 +4082,6 @@ D: Linux-Workshop Köln (aka LUG Cologne, Germany), Installfests
S: Tacitusstr. 6
S: D-50968 Köln
-N: Tsu-Sheng Tsao
-E: tsusheng@scf.usc.edu
-D: IGMP (Internet Group Management Protocol) version 2
-S: 2F 14 ALY 31 LN 166 SEC 1 SHIH-PEI RD
-S: Taipei
-S: Taiwan 112
-S: Republic of China
-S: 24335 Delta Drive
-S: Diamond Bar, California 91765
-S: USA
-
N: Theodore Ts'o
E: tytso@mit.edu
D: Random Linux hacker
@@ -4114,6 +4098,17 @@ S: 1 Amherst Street
S: Cambridge, Massachusetts 02139
S: USA
+N: Tsu-Sheng Tsao
+E: tsusheng@scf.usc.edu
+D: IGMP (Internet Group Management Protocol) version 2
+S: 2F 14 ALY 31 LN 166 SEC 1 SHIH-PEI RD
+S: Taipei
+S: Taiwan 112
+S: Republic of China
+S: 24335 Delta Drive
+S: Diamond Bar, California 91765
+S: USA
+
N: Luben Tuikov
E: Luben Tuikov <ltuikov89@gmail.com>
D: Maintainer of the DRM GPU Scheduler
@@ -4140,6 +4135,12 @@ S: 44 Campbell Park Crescent
S: Edinburgh EH13 0HT
S: United Kingdom
+N: Björn Töpel
+E: bjorn@kernel.org
+D: AF_XDP
+S: Gothenburg
+S: Sweden
+
N: Thomas Uhl
E: uhl@sun1.rz.fh-heilbronn.de
D: Application programmer
diff --git a/Documentation/ABI/stable/sysfs-driver-firmware-zynqmp b/Documentation/ABI/stable/sysfs-driver-firmware-zynqmp
index c3fec3c835af..214e9ed4564e 100644
--- a/Documentation/ABI/stable/sysfs-driver-firmware-zynqmp
+++ b/Documentation/ABI/stable/sysfs-driver-firmware-zynqmp
@@ -141,32 +141,44 @@ Description:
Usage:
- Select over temperature config ID to enable/disable feature
+ Select over temperature config ID to enable/disable feature::
+
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
- Check over temperature config ID is selected or not
+ Check over temperature config ID is selected or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
+
The expected result is 1.
- Select over temperature config ID to configure OT limit
+ Select over temperature config ID to configure OT limit::
+
# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
- Check over temperature config ID is selected or not
+ Check over temperature config ID is selected or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
+
The expected result is 2.
- Select external watchdog config ID to enable/disable feature
+ Select external watchdog config ID to enable/disable feature::
+
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
- Check external watchdog config ID is selected or not
+ Check external watchdog config ID is selected or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
+
The expected result is 3.
- Select external watchdog config ID to configure time interval
+ Select external watchdog config ID to configure time interval::
+
# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
- Check external watchdog config ID is selected or not
+ Check external watchdog config ID is selected or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
+
The expected result is 4.
Users: Xilinx
@@ -205,52 +217,70 @@ Description:
Usage:
- Enable over temperature feature
+ Enable over temperature feature::
+
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the over temperature feature is enabled or not
+ Check whether the over temperature feature is enabled or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 1.
- Disable over temperature feature
+ Disable over temperature feature::
+
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the over temperature feature is disabled or not
+ Check whether the over temperature feature is disabled or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 0.
- Configure over temperature limit to 50 Degree Celsius
+ Configure over temperature limit to 50 Degree Celsius::
+
# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the over temperature limit is configured or not
+ Check whether the over temperature limit is configured or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 50.
- Enable external watchdog feature
+ Enable external watchdog feature::
+
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the external watchdog feature is enabled or not
+ Check whether the external watchdog feature is enabled or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 1.
- Disable external watchdog feature
+ Disable external watchdog feature::
+
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the external watchdog feature is disabled or not
+ Check whether the external watchdog feature is disabled or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 0.
- Configure external watchdog timer interval to 500ms
+ Configure external watchdog timer interval to 500ms::
+
# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
- Check whether the external watchdog timer interval is configured or not
+ Check whether the external watchdog timer interval is configured or not::
+
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
+
The expected result is 500.
Users: Xilinx
diff --git a/Documentation/ABI/testing/sysfs-driver-qat_kpt b/Documentation/ABI/testing/sysfs-driver-qat_kpt
index c6480ea1fa4f..80831ce3d2ca 100644
--- a/Documentation/ABI/testing/sysfs-driver-qat_kpt
+++ b/Documentation/ABI/testing/sysfs-driver-qat_kpt
@@ -14,7 +14,8 @@ Contact: qat-linux@intel.com
Description:
(RW) Enables or disables Key Protection Technology (KPT).
- Write 1 to enable KPT, or 0 to disable it.
+ Write 1 to enable KPT, or 0 to disable it. The device must be
+ in the down state before changing the KPT state.
Example usage::
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon
index ad21f58f3c91..e675a57145e3 100644
--- a/Documentation/ABI/testing/sysfs-kernel-mm-damon
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon
@@ -3,7 +3,7 @@ Date: Mar 2022
Contact: SJ Park <sj@kernel.org>
Description: Interface for Data Access MONitoring (DAMON). Contains files
for controlling DAMON. For more details on DAMON itself,
- please refer to Documentation/mm/damon/index.rst.
+ please refer to Documentation/admin-guide/mm/damon/index.rst.
What: /sys/kernel/mm/damon/admin/
Date: Mar 2022
@@ -173,19 +173,6 @@ Contact: SJ Park <sj@kernel.org>
Description: Writing to and reading from this file sets and gets the
per-probe attribute weight.
-What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/preps/nr_preps
-Date: Jun 2026
-Contact: SJ Park <sj@kernel.org>
-Description: Writing a number 'N' to this file creates the number of
- directories for each DAMON probing preparation action named '0'
- to 'N-1' under the preps/ directory.
-
-What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/preps/<R>/prep_action
-Date: Jun 2026
-Contact: SJ Park <sj@kernel.org>
-Description: Writing to and reading from this file sets and gets the probing
- preparation action.
-
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/nr_filters
Date: May 2026
Contact: SJ Park <sj@kernel.org>
diff --git a/Documentation/admin-guide/LSM/LoadPin.rst b/Documentation/admin-guide/LSM/LoadPin.rst
index dd3ca68b5df1..a90fd9dac960 100644
--- a/Documentation/admin-guide/LSM/LoadPin.rst
+++ b/Documentation/admin-guide/LSM/LoadPin.rst
@@ -23,9 +23,9 @@ sysctl allows for easy testing on systems with a mutable filesystem.)
It's also possible to exclude specific file types from LoadPin using kernel
command line option "``loadpin.exclude``". By default, all files are
included, but they can be excluded using kernel command line option such
-as "``loadpin.exclude=kernel-module,kexec-image``". This allows to use
+as "``loadpin.exclude=kernel-module,kexec-image``". This allows using
different mechanisms such as ``CONFIG_MODULE_SIG`` and
-``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
-still use LoadPin to protect the integrity of other files kernel loads. The
-full list of valid file types can be found in ``kernel_read_file_str``
-defined in ``include/linux/kernel_read_file.h``.
+``CONFIG_KEXEC_SIG`` to verify kernel modules and kernel images while
+still using LoadPin to protect the integrity of other files the kernel
+loads. The full list of valid file types can be found in
+``kernel_read_file_str`` defined in ``include/linux/kernel_read_file.h``.
diff --git a/Documentation/admin-guide/RAS/main.rst b/Documentation/admin-guide/RAS/main.rst
index 5a45db32c49b..c1040e5a5b35 100644
--- a/Documentation/admin-guide/RAS/main.rst
+++ b/Documentation/admin-guide/RAS/main.rst
@@ -623,7 +623,7 @@ Under ``/sys/devices/system/edac/pci`` are control and attribute files as
follows:
-- ``check_pci_parity`` - Enable/Disable PCI Parity checking control file
+- ``check_pci_errors`` - Enable/Disable PCI Parity checking control file
This control file enables or disables the PCI Bus Parity scanning
operation. Writing a 1 to this file enables the scanning. Writing
@@ -631,11 +631,11 @@ follows:
Enable::
- echo "1" >/sys/devices/system/edac/pci/check_pci_parity
+ echo "1" >/sys/devices/system/edac/pci/check_pci_errors
Disable::
- echo "0" >/sys/devices/system/edac/pci/check_pci_parity
+ echo "0" >/sys/devices/system/edac/pci/check_pci_errors
- ``pci_parity_count`` - Parity Count
@@ -725,15 +725,15 @@ Module parameters
module/kernel parameter::
- edac_panic_on_pci_pe=[0|1]
+ edac_pci_panic_on_pe=[0|1]
Enable::
- echo "1" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
+ echo "1" > /sys/module/edac_core/parameters/edac_pci_panic_on_pe
Disable::
- echo "0" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
+ echo "0" > /sys/module/edac_core/parameters/edac_pci_panic_on_pe
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 8d2603751c51..86a2a0099178 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1321,10 +1321,6 @@ All memory amounts are in bytes. If a value which is not aligned to
PAGE_SIZE is written, the value may be rounded up to the closest
PAGE_SIZE multiple when read back.
-For the limit files described below, an empty or all-whitespace
-write is accepted and sets the limit to 0. To disable a limit,
-write "max"; to set it to zero explicitly, write "0".
-
memory.current
A read-only single value file which exists on non-root
cgroups.
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 9c58c66981a3..030ad09890f2 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -584,8 +584,6 @@ Kernel parameters
ataflop= [HW,M68k]
- atarimouse= [HW,MOUSE] Atari Mouse
-
atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess,
EzKey and similar keyboards
@@ -619,13 +617,6 @@ Kernel parameters
Format: <int> (must be >=0)
Default: 64
- bau= [X86_UV] Enable the BAU on SGI UV. The default
- behavior is to disable the BAU (i.e. bau=0).
- Format: { "0" | "1" }
- 0 - Disable the BAU.
- 1 - Enable the BAU.
- unset - Disable the BAU.
-
bdev_allow_write_mounted=
Format: <bool>
Control the ability to open a mounted block device
@@ -1596,14 +1587,6 @@ Kernel parameters
PCI device even when its classcode is not of the
UART class.
- edac_report= [HW,EDAC] Control how to report EDAC event
- Format: {"on" | "off" | "force"}
- on: enable EDAC to report H/W event. May be overridden
- by other higher priority error reporting module.
- off: disable H/W event reporting through EDAC.
- force: enforce the use of EDAC to report H/W event.
- default: on.
-
edd= [EDD]
Format: {"off" | "on" | "skip[mbr]"}
@@ -1673,12 +1656,6 @@ Kernel parameters
to discrete, to make X server driver able to add WB
entry later. This parameter enables that.
- enable_timer_pin_1 [X86]
- Enable PIN 1 of APIC timer
- Can be useful to work around chipset bugs
- (in particular on some ATI chipsets).
- The kernel tries to set a reasonable default.
-
enforcing= [SELINUX] Set initial enforcing status.
Format: {"0" | "1"}
See security/selinux/Kconfig help text.
@@ -4180,27 +4157,6 @@ Kernel parameters
Enable or disable the microcode minimal revision
enforcement for the runtime microcode loader.
- mini2440= [ARM,HW,KNL]
- Format:[0..2][b][c][t]
- Default: "0tb"
- MINI2440 configuration specification:
- 0 - The attached screen is the 3.5" TFT
- 1 - The attached screen is the 7" TFT
- 2 - The VGA Shield is attached (1024x768)
- Leaving out the screen size parameter will not load
- the TFT driver, and the framebuffer will be left
- unconfigured.
- b - Enable backlight. The TFT backlight pin will be
- linked to the kernel VESA blanking code and a GPIO
- LED. This parameter is not necessary when using the
- VGA shield.
- c - Enable the s3c camera interface.
- t - Reserved for enabling touchscreen support. The
- touchscreen support is not enabled in the mainstream
- kernel as of 2.6.30, a preliminary port can be found
- in the "bleeding edge" mini2440 support kernel at
- https://repo.or.cz/w/linux-2.6/mini2440.git
-
mitigations=
[X86,PPC,S390,ARM64,EARLY] Control optional mitigations for
CPU vulnerabilities. This is a set of curated,
@@ -4706,9 +4662,6 @@ Kernel parameters
nomce [X86-32] Disable Machine Check Exception
- nomfgpt [X86-32] Disable Multi-Function General Purpose
- Timer usage (for AMD Geode machines).
-
nomodeset Disable kernel modesetting. Most systems' firmware
sets up a display mode and provides framebuffer memory
for output. With nomodeset, DRM and fbdev drivers will
@@ -4921,11 +4874,6 @@ Kernel parameters
waiting for the ACK, so if this is set too high
interrupts *may* be lost!
- omap_mux= [OMAP] Override bootloader pin multiplexing.
- Format: <mux_mode0.mode_name=value>...
- For example, to override I2C bus2:
- omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
-
onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration
Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock]
@@ -5435,8 +5383,6 @@ Kernel parameters
nomsi Do not use MSI for native PCIe PME signaling (this makes
all PCIe root ports use INTx for all services).
- pcmv= [HW,PCMCIA] BadgePAD 4
-
pd_ignore_unused
[PM]
Keep all power-domains already enabled by bootloader on,
@@ -6720,9 +6666,6 @@ Kernel parameters
reserve_mem=12M:4096:oops ramoops.mem_name=oops
- Both the size and the alignment must be multiples of
- the page size.
-
reservetop= [X86-32,EARLY]
Format: nn[KMG]
Reserves a hole at the top of the kernel virtual
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index d3e37400367b..da5f9afd08ae 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -74,9 +74,6 @@ comma (",").
│ │ │ │ │ │ nr_regions/min,max
│ │ │ │ │ │ :ref:`probes <damon_usage_sysfs_probes>`/nr_probes
│ │ │ │ │ │ │ 0/weight
- │ │ │ │ │ │ │ │ preps/nr_preps
- │ │ │ │ │ │ │ │ │ 0/prep_action
- │ │ │ │ │ │ │ │ │ ...
│ │ │ │ │ │ │ │ filters/nr_filters
│ │ │ │ │ │ │ │ │ 0/type,matching,allow,path
│ │ │ │ │ │ │ │ │ ...
@@ -286,18 +283,9 @@ In the beginning, this directory has only one file, ``nr_probes``. Writing a
number (``N``) to the file creates the number of child directories named ``0``
to ``N-1``. Each directory represents each monitoring probe.
-In each probe directory, two directories, ``preps`` and ``filters`` exist. The
-directories contain files for installing probing preparation actions and
-filters for the probe, that are used to determine the data attribute for the
-probe.
-
-In the beginning, ``preps`` directory has only one file, ``nr_preps``.
-Writing a number (``N``) to the file creates the number of child directories
-named ``0`` to ``N-1``. Each directory represents each preparation action.
-Each directory has one file, ``prep_action``. The preparation action can be
-selected by writing the name of the action to the ``prep_action`` file. Refer
-to the :ref:`design doc <damon_design_data_attrs_monitoring>` for the list of
-supported actions.
+In each probe directory, one directory, ``filters`` exists. The directory
+contains files for installing filters for the probe, that is used to determine
+the data attribute for the probe.
Each probe directory also contains ``weight`` file. Reading from and writing
to the file gets and sets the :ref:`attributes-only monitoring
@@ -551,10 +539,6 @@ and ``damon_target_idx``. To ``type`` file, you can write the type of the
filter. Refer to :ref:`the design doc <damon_design_damos_filters>` for
available type names, their meaning and on what layer those are handled.
-For ``probe_hits_wsum`` type, you can specify the minimum and maximum probe
-hits weighted sum value for the filter to ``min`` and ``max`` files,
-respectively.
-
For ``memcg`` type, you can specify the memory cgroup of the interest by
writing the path of the memory cgroup from the cgroups mount point to
``memcg_path`` file. For ``addr`` type, you can specify the start and end
diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst
index c329ca747b8c..ad8e7a41f3b5 100644
--- a/Documentation/admin-guide/mm/ksm.rst
+++ b/Documentation/admin-guide/mm/ksm.rst
@@ -174,7 +174,7 @@ advisor_mode
The section about ``advisor`` explains in detail how the scan time
advisor works.
-advisor_max_cpu
+adivsor_max_cpu
specifies the upper limit of the cpu percent usage of the ksmd
background thread. The default is 70.
@@ -183,10 +183,10 @@ advisor_target_scan_time
pages. The default value is 200 seconds.
advisor_min_pages_to_scan
- specifies the initial value of the ``pages_to_scan`` parameter of
- the scan time advisor. The default is 500.
+ specifies the lower limit of the ``pages_to_scan`` parameter of the
+ scan time advisor. The default is 500.
-advisor_max_pages_to_scan
+adivsor_max_pages_to_scan
specifies the upper limit of the ``pages_to_scan`` parameter of the
scan time advisor. The default is 30000.
diff --git a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
index 7d38393f31fb..91ebb631a254 100644
--- a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
+++ b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
@@ -163,7 +163,7 @@ will be considered the 'good' release and used to prepare the .config file.
section 'Complementary tasks: cleanup during and after the process'
below.
- d) Once your finished the bisection, put a few things away::
+ d) Once you have finished the bisection, put a few things away::
cd ~/linux/
git bisect log > ~/bisect-log
@@ -178,9 +178,9 @@ will be considered the 'good' release and used to prepare the .config file.
./scripts/config --set-str CONFIG_LOCALVERSION '-local-cafec0cacaca0-reverted'
This is optional, as some commits are impossible to revert. But if the
- second command worked flawlessly, build, install, and boot one more kernel
- kernel; just this time skip the first command copying the base .config file
- over, as that already has been taken care off.
+ second command worked flawlessly, build, install, and boot one more kernel;
+ just this time skip the first command copying the base .config file over,
+ as that already has been taken care off.
* **Complementary tasks**: cleanup during and after the process.
@@ -229,10 +229,10 @@ depends on your issue:
Execute all steps till the end of *segment 1* to **verify if your kernel problem
is present in code supported by Linux kernel developers**. If it is, you are all
set to report the bug -- unless it did not happen with earlier kernel versions,
-as then your want to at least continue with *segment 2* to **check if the issue
+as then you want to at least continue with *segment 2* to **check if the issue
qualifies as regression** which receive priority treatment. Depending on the
outcome you then are ready to report a bug or submit a preliminary regression
-report; instead of the latter your could also head straight on and follow
+report; instead of the latter you could also head straight on and follow
*segment 3* to **perform a bisection** for a full-fledged regression report
developers are obliged to act upon.
@@ -550,7 +550,7 @@ be a waste of time. [:ref:`details <introlatestcheck_bisref>`]
cd ~/linux/
git switch --discard-changes --detach stable/linux-6.1.y
- Your series is unsupported, if is not listed or carrying a 'end of life'
+ Your series is unsupported if it is not listed or it is carrying a 'end of life'
tag. In that case you might want to check if a successor series (say
linux-6.2.y) or mainline (see next point) fix the bug.
@@ -1183,9 +1183,9 @@ Space requirements
The numbers mentioned are rough estimates with a big extra charge to be on the
safe side, so often you will need less.
-If you have space constraints, be sure to hay attention to the :ref:`step about
-debug symbols' <debugsymbols_bissbs>` and its :ref:`accompanying reference
-section' <debugsymbols_bisref>`, as disabling then will reduce the consumed disk
+If you have space constraints, be sure to pay attention to the :ref:`step about
+debug symbols <debugsymbols_bissbs>` and its :ref:`accompanying reference
+section <debugsymbols_bisref>`, as disabling them will reduce the consumed disk
space by quite a few gigabytes.
[:ref:`back to step-by-step guide <diskspace_bissbs>`]
@@ -1254,8 +1254,8 @@ distributions:
kernel-install-tools libelf-devel make modutils openssl openssl-devel \
perl-base zlib-devel rpm-build ncurses-devel qt6-base-devel
-These commands install a few packages that are often, but not always needed. You
-for example might want to skip installing the development headers for ncurses,
+These commands install a few packages that are often, but not always needed. For
+example, you might want to skip installing the development headers for ncurses,
which you will only need in case you later might want to adjust the kernel build
configuration using make the targets 'menuconfig' or 'nconfig'; likewise omit
the headers of Qt6 if you do not plan to adjust the .config using 'xconfig'.
@@ -1407,7 +1407,7 @@ Occasionally odd things happen when trying to use a config file prepared for one
kernel (say 6.1) on an older mainline release -- especially if it is much older
(say 5.15). That's one of the reasons why the previous step in the guide told
you to boot the kernel where everything works. If you manually add a .config
-file you thus want to ensure it's from the working kernel and not from a one
+file you thus want to ensure it's from the working kernel and not from one
that shows the regression.
In case you want to build kernels for another machine, locate its kernel build
diff --git a/Documentation/arch/powerpc/vas-api.rst b/Documentation/arch/powerpc/vas-api.rst
index 1d0d055356e3..f74ea9fbc8a0 100644
--- a/Documentation/arch/powerpc/vas-api.rst
+++ b/Documentation/arch/powerpc/vas-api.rst
@@ -136,7 +136,7 @@ a connection with NX co-processor engine:
follows::
#define VAS_MAGIC 'v'
- #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 1,
+ #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 0x20,
struct vas_tx_win_open_attr)
struct vas_tx_win_open_attr attr;
@@ -265,7 +265,7 @@ Simple example
{
int rc, fd;
void *addr;
- struct vas_setup_attr txattr;
+ struct vas_tx_win_open_attr txattr;
fd = open("/dev/crypto/nx-gzip", O_RDWR);
if (fd < 0) {
diff --git a/Documentation/arch/powerpc/vmemmap_dedup.rst b/Documentation/arch/powerpc/vmemmap_dedup.rst
index 8286acbca9bc..dc4db59fdf87 100644
--- a/Documentation/arch/powerpc/vmemmap_dedup.rst
+++ b/Documentation/arch/powerpc/vmemmap_dedup.rst
@@ -19,28 +19,82 @@ With 1G PUD level mapping, we require 16384 struct pages and a single 64K
vmemmap page can contain 1024 struct pages (64K/sizeof(struct page)). Hence we
require 16 64K pages in vmemmap to map the struct page for 1G PUD level mapping.
+Here's how things look like on device-dax after the sections are populated::
+ +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+
+ | | | 0 | -------------> | 0 |
+ | | +-----------+ +-----------+
+ | | | 1 | -------------> | 1 |
+ | | +-----------+ +-----------+
+ | | | 2 | ----------------^ ^ ^ ^ ^ ^
+ | | +-----------+ | | | | |
+ | | | 3 | ------------------+ | | | |
+ | | +-----------+ | | | |
+ | | | 4 | --------------------+ | | |
+ | PUD | +-----------+ | | |
+ | level | | . | ----------------------+ | |
+ | mapping | +-----------+ | |
+ | | | . | ------------------------+ |
+ | | +-----------+ |
+ | | | 15 | --------------------------+
+ | | +-----------+
+ | |
+ | |
+ | |
+ +-----------+
+
+
With 4K page size, 2M PMD level mapping requires 512 struct pages and a single
4K vmemmap page contains 64 struct pages(4K/sizeof(struct page)). Hence we
require 8 4K pages in vmemmap to map the struct page for 2M pmd level mapping.
-Here's how things look on device-dax after vmemmap-optimized sections are
-populated. ``N`` is the number of vmemmap pages required by the DAX mapping
-above::
-
- Device DAX vmemmap pages (N pages) backing page frames
- +-----------+ ---virt_to_page---> +-----------+ mapping to +-------------+
- | | | 0 | -------------> | 0 |
- | | +-----------+ +-------------+
- | | | 1 | ------+
- | | +-----------+ |
- | | | 2 | ------+
- | | +-----------+ |
- | | | . | ------+ +-------------+
- | PMD/PUD | +-----------+ | | A single, |
- | level | | . | ------+------> | per-zone |
- | mapping | +-----------+ | | shared tail |
- | | | N - 1 | ------+ | page |
- | | +-----------+ +-------------+
+Here's how things look like on device-dax after the sections are populated::
+
+ +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+
+ | | | 0 | -------------> | 0 |
+ | | +-----------+ +-----------+
+ | | | 1 | -------------> | 1 |
+ | | +-----------+ +-----------+
+ | | | 2 | ----------------^ ^ ^ ^ ^ ^
+ | | +-----------+ | | | | |
+ | | | 3 | ------------------+ | | | |
+ | | +-----------+ | | | |
+ | | | 4 | --------------------+ | | |
+ | PMD | +-----------+ | | |
+ | level | | 5 | ----------------------+ | |
+ | mapping | +-----------+ | |
+ | | | 6 | ------------------------+ |
+ | | +-----------+ |
+ | | | 7 | --------------------------+
+ | | +-----------+
+ | |
+ | |
+ | |
+ +-----------+
+
+With 1G PUD level mapping, we require 262144 struct pages and a single 4K
+vmemmap page can contain 64 struct pages (4K/sizeof(struct page)). Hence we
+require 4096 4K pages in vmemmap to map the struct pages for 1G PUD level
+mapping.
+
+Here's how things look like on device-dax after the sections are populated::
+
+ +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+
+ | | | 0 | -------------> | 0 |
+ | | +-----------+ +-----------+
+ | | | 1 | -------------> | 1 |
+ | | +-----------+ +-----------+
+ | | | 2 | ----------------^ ^ ^ ^ ^ ^
+ | | +-----------+ | | | | |
+ | | | 3 | ------------------+ | | | |
+ | | +-----------+ | | | |
+ | | | 4 | --------------------+ | | |
+ | PUD | +-----------+ | | |
+ | level | | . | ----------------------+ | |
+ | mapping | +-----------+ | |
+ | | | . | ------------------------+ |
+ | | +-----------+ |
+ | | | 4095 | --------------------------+
+ | | +-----------+
| |
| |
| |
diff --git a/Documentation/core-api/memory-allocation.rst b/Documentation/core-api/memory-allocation.rst
index 648222b6c857..0f19dd524323 100644
--- a/Documentation/core-api/memory-allocation.rst
+++ b/Documentation/core-api/memory-allocation.rst
@@ -21,16 +21,8 @@ answer, although very likely you should use
::
- kzalloc_obj(<VAR_OR_TYPE>);
-
-if you need memory for an object and
-
-::
-
kzalloc(<size>, GFP_KERNEL);
-if you need memory for a buffer.
-
Of course there are cases when other allocation APIs and different GFP
flags must be used.
@@ -147,13 +139,10 @@ allocate memory for an array, there are kmalloc_array() and kcalloc()
helpers. The helpers struct_size(), array_size() and array3_size() can
be used to safely calculate object sizes without overflowing.
-Since 7.0 there are type aware kmalloc-family helpers that let you safely and
-conveniently allocate a single object or arrays of objects with kzalloc_obj()
-and kmalloc_obj() and their array versions kzalloc_objs() and
-kmalloc_objs(). These helpers only need the type of the object that should be
-allocated and the count of elements in the array for the array versions.
-
-As of v7.2, vast majority of the memory allocations use kzalloc_obj().
+The maximal size of a chunk that can be allocated with `kmalloc` is
+limited. The actual limit depends on the hardware and the kernel
+configuration, but it is a good practice to use `kmalloc` for objects
+smaller than page size.
The address of a chunk allocated with `kmalloc` is aligned to at least
ARCH_KMALLOC_MINALIGN bytes. For sizes which are a power of two, the
@@ -165,16 +154,9 @@ Chunks allocated with kmalloc() can be resized with krealloc(). Similarly
to kmalloc_array(): a helper for resizing arrays is provided in the form of
krealloc_array().
-`kmalloc` always allocates physically contiguous memory and the maximal size of
-a chunk that can be allocated with `kmalloc` is limited by `KMALLOC_MAX_SIZE`,
-which matches the page allocator's MAX_PAGE_ORDER limit.
-
-Internally, the slab allocator differentiates allocations of different orders
-and delegates larger allocations to the page allocator, but for the users of
-`kmalloc` family it is entirely transparent.
-
-For large allocations that do not require physically contiguous memory you can
-use vmalloc() and vzalloc() family.
+For large allocations you can use vmalloc() and vzalloc(), or directly
+request pages from the page allocator. The memory allocated by `vmalloc`
+and related functions is not physically contiguous.
If you are not sure whether the allocation size is too large for
`kmalloc`, it is possible to use kvmalloc() and its derivatives. It will
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,qcs8300-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,qcs8300-mdss.yaml
index c41a86203e78..287cce4dbddc 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,qcs8300-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,qcs8300-mdss.yaml
@@ -150,7 +150,7 @@ examples:
reg = <0>;
dpu_intf0_out: endpoint {
- remote-endpoint = <&mdss_dp0_in>;
+ remote-endpoint = <&mdss_dp0_in>;
};
};
@@ -352,9 +352,9 @@ examples:
};
port@1 {
- reg = <1>;
+ reg = <1>;
- mdss_dp_out: endpoint { };
+ mdss_dp_out: endpoint { };
};
};
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sar2130p-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,sar2130p-mdss.yaml
index 44c1bb9e4109..fb3d24bbac7d 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sar2130p-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sar2130p-mdss.yaml
@@ -248,9 +248,9 @@ examples:
remote-endpoint = <&usb_dp_qmpphy_dp_in>;
};
};
- };
+ };
- dp_opp_table: opp-table {
+ dp_opp_table: opp-table {
compatible = "operating-points-v2";
opp-162000000 {
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sm6150-dpu.yaml b/Documentation/devicetree/bindings/display/msm/qcom,sm6150-dpu.yaml
index b4f437172218..8cbf99f9fcba 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sm6150-dpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sm6150-dpu.yaml
@@ -81,7 +81,7 @@ examples:
port@1 {
reg = <1>;
dpu_intf1_out: endpoint {
- remote-endpoint = <&mdss_dsi0_in>;
+ remote-endpoint = <&mdss_dsi0_in>;
};
};
};
@@ -90,18 +90,18 @@ examples:
compatible = "operating-points-v2";
opp-19200000 {
- opp-hz = /bits/ 64 <19200000>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
};
opp-25600000 {
- opp-hz = /bits/ 64 <25600000>;
- required-opps = <&rpmhpd_opp_svs>;
+ opp-hz = /bits/ 64 <25600000>;
+ required-opps = <&rpmhpd_opp_svs>;
};
opp-307200000 {
- opp-hz = /bits/ 64 <307200000>;
- required-opps = <&rpmhpd_opp_nom>;
+ opp-hz = /bits/ 64 <307200000>;
+ required-opps = <&rpmhpd_opp_nom>;
};
};
};
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml
index 68176de854b3..f5acf528d0e4 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml
@@ -223,7 +223,7 @@ examples:
phys = <&mdss_dsi0_phy>;
ports {
- #address-cells = <1>;
+ #address-cells = <1>;
#size-cells = <0>;
port@0 {
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml
index 8d698a2e055a..8c65a80b46e4 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml
@@ -208,47 +208,47 @@ examples:
#sound-dai-cells = <0>;
ports {
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
- port@0 {
- reg = <0>;
+ port@0 {
+ reg = <0>;
- mdss_dp0_in: endpoint {
- remote-endpoint = <&mdss_intf0_out>;
- };
- };
+ mdss_dp0_in: endpoint {
+ remote-endpoint = <&mdss_intf0_out>;
+ };
+ };
- port@1 {
- reg = <1>;
+ port@1 {
+ reg = <1>;
- mdss_dp0_out: endpoint {
- };
- };
+ mdss_dp0_out: endpoint {
+ };
+ };
};
mdss_dp0_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- opp-160000000 {
- opp-hz = /bits/ 64 <160000000>;
- required-opps = <&rpmhpd_opp_low_svs>;
- };
-
- opp-270000000 {
- opp-hz = /bits/ 64 <270000000>;
- required-opps = <&rpmhpd_opp_svs>;
- };
-
- opp-540000000 {
- opp-hz = /bits/ 64 <540000000>;
- required-opps = <&rpmhpd_opp_svs_l1>;
- };
-
- opp-810000000 {
- opp-hz = /bits/ 64 <810000000>;
- required-opps = <&rpmhpd_opp_nom>;
- };
+ compatible = "operating-points-v2";
+
+ opp-160000000 {
+ opp-hz = /bits/ 64 <160000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
};
};
};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
index de24bb361e9f..fffeb5ec0645 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
@@ -45,6 +45,12 @@ properties:
power-domains:
maxItems: 1
+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+ required:
+ - gpio-hog
+
allOf:
- if:
properties:
diff --git a/Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml b/Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml
index f9ede03c3287..4148081e3d84 100644
--- a/Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml
@@ -83,14 +83,14 @@ properties:
dmas:
minItems: 2
- maxItems: 4
+ maxItems: 6
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.
dma-names:
minItems: 2
- maxItems: 4
+ maxItems: 6
items:
enum:
- tx
diff --git a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
index a3db6d594c8c..7fcc564e820c 100644
--- a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
+++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
@@ -123,7 +123,7 @@ examples:
phy0: ethernet-phy@1 {
reg = <1>;
};
- };
+ };
mdio@ce14 {
compatible = "brcm,asp-v2.1-mdio";
diff --git a/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml b/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
index f0b5bea2458d..da9bc170cd54 100644
--- a/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
@@ -87,18 +87,6 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/cortina,gemini-clock.h>
#include <dt-bindings/reset/cortina,gemini-reset.h>
- mdio0: mdio {
- #address-cells = <1>;
- #size-cells = <0>;
- phy0: ethernet-phy@1 {
- reg = <1>;
- device_type = "ethernet-phy";
- };
- phy1: ethernet-phy@3 {
- reg = <3>;
- device_type = "ethernet-phy";
- };
- };
ethernet@60000000 {
compatible = "cortina,gemini-ethernet";
@@ -110,28 +98,28 @@ examples:
ranges;
gmac0: ethernet-port@0 {
- compatible = "cortina,gemini-ethernet-port";
- reg = <0x60008000 0x2000>, /* Port 0 DMA/TOE */
- <0x6000a000 0x2000>; /* Port 0 GMAC */
- interrupt-parent = <&intcon>;
- interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
- resets = <&syscon GEMINI_RESET_GMAC0>;
- clocks = <&syscon GEMINI_CLK_GATE_GMAC0>;
- clock-names = "PCLK";
- phy-mode = "rgmii";
- phy-handle = <&phy0>;
+ compatible = "cortina,gemini-ethernet-port";
+ reg = <0x60008000 0x2000>, /* Port 0 DMA/TOE */
+ <0x6000a000 0x2000>; /* Port 0 GMAC */
+ interrupt-parent = <&intcon>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&syscon GEMINI_RESET_GMAC0>;
+ clocks = <&syscon GEMINI_CLK_GATE_GMAC0>;
+ clock-names = "PCLK";
+ phy-mode = "rgmii";
+ phy-handle = <&phy0>;
};
gmac1: ethernet-port@1 {
- compatible = "cortina,gemini-ethernet-port";
- reg = <0x6000c000 0x2000>, /* Port 1 DMA/TOE */
- <0x6000e000 0x2000>; /* Port 1 GMAC */
- interrupt-parent = <&intcon>;
- interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
- resets = <&syscon GEMINI_RESET_GMAC1>;
- clocks = <&syscon GEMINI_CLK_GATE_GMAC1>;
- clock-names = "PCLK";
- phy-mode = "rgmii";
- phy-handle = <&phy1>;
+ compatible = "cortina,gemini-ethernet-port";
+ reg = <0x6000c000 0x2000>, /* Port 1 DMA/TOE */
+ <0x6000e000 0x2000>; /* Port 1 GMAC */
+ interrupt-parent = <&intcon>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&syscon GEMINI_RESET_GMAC1>;
+ clocks = <&syscon GEMINI_CLK_GATE_GMAC1>;
+ clock-names = "PCLK";
+ phy-mode = "rgmii";
+ phy-handle = <&phy1>;
};
};
diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
index ea285ef3e64f..fab6aa6237e9 100644
--- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
@@ -127,8 +127,8 @@ examples:
phy-mode = "internal";
fixed-link {
- speed = <1000>;
- full-duplex;
+ speed = <1000>;
+ full-duplex;
};
};
};
diff --git a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
index 62c1da36a2b5..d1522216d32b 100644
--- a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
+++ b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
@@ -91,9 +91,9 @@ examples:
snps,tx-queues-to-use = <2>;
snps,tx-sched-wrr;
queue0 {
- snps,weight = <0x10>;
- snps,dcb-algorithm;
- snps,priority = <0x0>;
+ snps,weight = <0x10>;
+ snps,dcb-algorithm;
+ snps,priority = <0x0>;
};
queue1 {
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.yaml b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
index eb4171a1940e..36e51aaae9c0 100644
--- a/Documentation/devicetree/bindings/net/mdio-gpio.yaml
+++ b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
@@ -45,13 +45,13 @@ examples:
};
mdio0: mdio {
- compatible = "virtual,mdio-gpio";
- #address-cells = <1>;
- #size-cells = <0>;
- gpios = <&qe_pio_a 11>,
- <&qe_pio_c 6>;
- ethphy0: ethernet-phy@0 {
- reg = <0>;
- };
+ compatible = "virtual,mdio-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpios = <&qe_pio_a 11>,
+ <&qe_pio_c 6>;
+ ethphy0: ethernet-phy@0 {
+ reg = <0>;
+ };
};
...
diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
index 86a9c3fc76c8..d825130b54b4 100644
--- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
+++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
@@ -197,10 +197,10 @@ examples:
<0x71040000 0x10000>,
<0x71050000 0x10000>,
<0x71060000 0x10000>;
- reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
- "port2", "port3", "port4", "port5", "port6",
- "port7", "port8", "port9", "port10", "qsys",
- "ana", "s0", "s1", "s2";
+ reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
+ "port2", "port3", "port4", "port5", "port6",
+ "port7", "port8", "port9", "port10", "qsys",
+ "ana", "s0", "s1", "s2";
ethernet-ports {
#address-cells = <1>;
diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index 68ec76fe4473..38e3830512fe 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -246,14 +246,14 @@ examples:
qcom,remote-pid = <5>;
ipa_smp2p_out: ipa-ap-to-modem {
- qcom,entry-name = "ipa";
- #qcom,smem-state-cells = <1>;
+ qcom,entry-name = "ipa";
+ #qcom,smem-state-cells = <1>;
};
ipa_smp2p_in: ipa-modem-to-ap {
- qcom,entry-name = "ipa";
- interrupt-controller;
- #interrupt-cells = <2>;
+ qcom,entry-name = "ipa";
+ interrupt-controller;
+ #interrupt-cells = <2>;
};
};
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index 45033c31a2d5..07b39ef1fc62 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -91,8 +91,8 @@ examples:
#size-cells = <0>;
ethphy1: ethernet-phy@1 {
- reg = <1>;
- realtek,clkout-disable;
- realtek,aldps-enable;
+ reg = <1>;
+ realtek,clkout-disable;
+ realtek,aldps-enable;
};
};
diff --git a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
index 4eb63b303cff..8c8622160abb 100644
--- a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
+++ b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
@@ -121,22 +121,22 @@ examples:
- |
ether: ethernet@65000000 {
compatible = "socionext,uniphier-ld20-ave4";
- reg = <0x65000000 0x8500>;
- interrupts = <0 66 4>;
- phy-mode = "rgmii";
- phy-handle = <&ethphy>;
- clock-names = "ether";
- clocks = <&sys_clk 6>;
- reset-names = "ether";
- resets = <&sys_rst 6>;
- socionext,syscon-phy-mode = <&soc_glue 0>;
-
- mdio {
- #address-cells = <1>;
- #size-cells = <0>;
-
- ethphy: ethernet-phy@1 {
- reg = <1>;
- };
- };
+ reg = <0x65000000 0x8500>;
+ interrupts = <0 66 4>;
+ phy-mode = "rgmii";
+ phy-handle = <&ethphy>;
+ clock-names = "ether";
+ clocks = <&sys_clk 6>;
+ reset-names = "ether";
+ resets = <&sys_rst 6>;
+ socionext,syscon-phy-mode = <&soc_glue 0>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy: ethernet-phy@1 {
+ reg = <1>;
+ };
};
+ };
diff --git a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
index 8b5da602a2e8..4d24dadfaa5d 100644
--- a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
+++ b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
@@ -192,50 +192,50 @@ examples:
interrupt-names = "rx_thresh", "rx", "tx", "misc";
ethernet-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- cpsw_port1: port@1 {
- reg = <1>;
- label = "port1";
- mac-address = [ 00 00 00 00 00 00 ];
- phys = <&phy_gmii_sel 1>;
- phy-handle = <&ethphy0_sw>;
- phy-mode = "rgmii";
- ti,dual-emac-pvid = <1>;
- };
-
- cpsw_port2: port@2 {
- reg = <2>;
- label = "wan";
- mac-address = [ 00 00 00 00 00 00 ];
- phys = <&phy_gmii_sel 2>;
- phy-handle = <&ethphy1_sw>;
- phy-mode = "rgmii";
- ti,dual-emac-pvid = <2>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpsw_port1: port@1 {
+ reg = <1>;
+ label = "port1";
+ mac-address = [ 00 00 00 00 00 00 ];
+ phys = <&phy_gmii_sel 1>;
+ phy-handle = <&ethphy0_sw>;
+ phy-mode = "rgmii";
+ ti,dual-emac-pvid = <1>;
+ };
+
+ cpsw_port2: port@2 {
+ reg = <2>;
+ label = "wan";
+ mac-address = [ 00 00 00 00 00 00 ];
+ phys = <&phy_gmii_sel 2>;
+ phy-handle = <&ethphy1_sw>;
+ phy-mode = "rgmii";
+ ti,dual-emac-pvid = <2>;
+ };
};
davinci_mdio_sw: mdio@1000 {
- compatible = "ti,cpsw-mdio","ti,davinci_mdio";
- reg = <0x1000 0x100>;
- clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
- clock-names = "fck";
- #address-cells = <1>;
- #size-cells = <0>;
- bus_freq = <1000000>;
-
- ethphy0_sw: ethernet-phy@0 {
- reg = <0>;
- };
-
- ethphy1_sw: ethernet-phy@1 {
- reg = <1>;
- };
+ compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+ reg = <0x1000 0x100>;
+ clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
+ clock-names = "fck";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ bus_freq = <1000000>;
+
+ ethphy0_sw: ethernet-phy@0 {
+ reg = <0>;
+ };
+
+ ethphy1_sw: ethernet-phy@1 {
+ reg = <1>;
+ };
};
cpts {
- clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 25>;
- clock-names = "cpts";
+ clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 25>;
+ clock-names = "cpts";
};
};
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index ae6b97cdc44b..bf4116b057d2 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -325,22 +325,22 @@ examples:
r0 {
regdomain = "FCC";
txpower-5g {
- b0 {
- channels = <36 48>;
- rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
- rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
- /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>;
- rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>,
- /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>;
- };
- b1 {
- channels = <100 181>;
- rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
- rates-mcs = /bits/ 8 <4 14 14 14 14 14 14 14 14 14 14>;
- txs-delta = <12 9 6>;
- rates-ru = /bits/ 8 <7 14 14 14 14 14 14 14 14 14 14 14 14>;
- };
- };
+ b0 {
+ channels = <36 48>;
+ rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
+ rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
+ /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>;
+ rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>,
+ /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>;
+ };
+ b1 {
+ channels = <100 181>;
+ rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
+ rates-mcs = /bits/ 8 <4 14 14 14 14 14 14 14 14 14 14>;
+ txs-delta = <12 9 6>;
+ rates-ru = /bits/ 8 <7 14 14 14 14 14 14 14 14 14 14 14 14>;
+ };
+ };
};
};
};
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
index e667d78b3ab3..a52cb8a0d409 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
@@ -408,4 +408,4 @@ examples:
"msi15",
"legacy";
ieee80211-freq-limit = <5470000 5875000>;
- };
+ };
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1372.yaml b/Documentation/devicetree/bindings/sound/adi,adau1372.yaml
index 9a7ff50a0a22..532550de62d7 100644
--- a/Documentation/devicetree/bindings/sound/adi,adau1372.yaml
+++ b/Documentation/devicetree/bindings/sound/adi,adau1372.yaml
@@ -52,11 +52,11 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
audio-codec@3c {
- compatible = "adi,adau1372";
- reg = <0x3c>;
- #sound-dai-cells = <0>;
- clock-names = "mclk";
- clocks = <&adau1372z_xtal>;
+ compatible = "adi,adau1372";
+ reg = <0x3c>;
+ #sound-dai-cells = <0>;
+ clock-names = "mclk";
+ clocks = <&adau1372z_xtal>;
};
};
diff --git a/Documentation/devicetree/bindings/sound/adi,adau7118.yaml b/Documentation/devicetree/bindings/sound/adi,adau7118.yaml
index 11f59c29b575..8272cdaf66a8 100644
--- a/Documentation/devicetree/bindings/sound/adi,adau7118.yaml
+++ b/Documentation/devicetree/bindings/sound/adi,adau7118.yaml
@@ -68,20 +68,20 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
adau7118_codec: audio-codec@14 {
- compatible = "adi,adau7118";
- reg = <0x14>;
- #sound-dai-cells = <0>;
- iovdd-supply = <&supply>;
- dvdd-supply = <&supply>;
- adi,pdm-clk-map = <1 1 0 0>;
- adi,decimation-ratio = <16>;
+ compatible = "adi,adau7118";
+ reg = <0x14>;
+ #sound-dai-cells = <0>;
+ iovdd-supply = <&supply>;
+ dvdd-supply = <&supply>;
+ adi,pdm-clk-map = <1 1 0 0>;
+ adi,decimation-ratio = <16>;
};
};
/* example with hw standalone mode */
adau7118_codec_hw: adau7118-codec-hw {
- compatible = "adi,adau7118";
- #sound-dai-cells = <0>;
- iovdd-supply = <&supply>;
- dvdd-supply = <&supply>;
+ compatible = "adi,adau7118";
+ #sound-dai-cells = <0>;
+ iovdd-supply = <&supply>;
+ dvdd-supply = <&supply>;
};
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
index 6fdf605ad59c..2be3b34e4f5f 100644
--- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
+++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
@@ -94,20 +94,20 @@ examples:
audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
dai-link-0 {
- sound-dai = <&i2s_fifo>;
+ sound-dai = <&i2s_fifo>;
};
dai-link-1 {
- sound-dai = <&i2s_encoder>;
- dai-format = "i2s";
- mclk-fs = <256>;
+ sound-dai = <&i2s_encoder>;
+ dai-format = "i2s";
+ mclk-fs = <256>;
- codec-0 {
- sound-dai = <&codec0>;
- };
+ codec-0 {
+ sound-dai = <&codec0>;
+ };
- codec-1 {
- sound-dai = <&codec1>;
- };
+ codec-1 {
+ sound-dai = <&codec1>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4619.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4619.yaml
index d412531ef9a2..2e81947bb8dd 100644
--- a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4619.yaml
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4619.yaml
@@ -54,9 +54,9 @@ examples:
#sound-dai-cells = <0>;
port {
- ak4619_endpoint: endpoint {
- remote-endpoint = <&rsnd_endpoint>;
- };
+ ak4619_endpoint: endpoint {
+ remote-endpoint = <&rsnd_endpoint>;
+ };
};
};
};
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l45.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l45.yaml
index fd0646b609f9..1ba809888a88 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs35l45.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l45.yaml
@@ -153,27 +153,27 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- cs35l45: cs35l45@2 {
- #sound-dai-cells = <1>;
- compatible = "cirrus,cs35l45";
- reg = <2>;
- spi-max-frequency = <5000000>;
- vdd-a-supply = <&dummy_vreg>;
- vdd-batt-supply = <&dummy_vreg>;
- reset-gpios = <&gpio 110 0>;
- cirrus,asp-sdout-hiz-ctrl = <(CS35L45_ASP_TX_HIZ_UNUSED |
- CS35L45_ASP_TX_HIZ_DISABLED)>;
- cirrus,sync-lsw-txid = <0x1>;
- cirrus,sync-sw-txid = <0x1>;
- cirrus,gpio-ctrl1 {
- gpio-ctrl = <0x2>;
- };
- cirrus,gpio-ctrl2 {
- gpio-ctrl = <0x2>;
- };
- cirrus,gpio-ctrl3 {
- gpio-ctrl = <0x1>;
- gpio-dir = <0x1>;
- };
+ cs35l45: audio-codec@2 {
+ #sound-dai-cells = <1>;
+ compatible = "cirrus,cs35l45";
+ reg = <2>;
+ spi-max-frequency = <5000000>;
+ vdd-a-supply = <&dummy_vreg>;
+ vdd-batt-supply = <&dummy_vreg>;
+ reset-gpios = <&gpio 110 0>;
+ cirrus,asp-sdout-hiz-ctrl = <(CS35L45_ASP_TX_HIZ_UNUSED |
+ CS35L45_ASP_TX_HIZ_DISABLED)>;
+ cirrus,sync-lsw-txid = <0x1>;
+ cirrus,sync-sw-txid = <0x1>;
+ cirrus,gpio-ctrl1 {
+ gpio-ctrl = <0x2>;
+ };
+ cirrus,gpio-ctrl2 {
+ gpio-ctrl = <0x2>;
+ };
+ cirrus,gpio-ctrl3 {
+ gpio-ctrl = <0x1>;
+ gpio-dir = <0x1>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs4270.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs4270.yaml
index 336e11773694..61106294a1d5 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs4270.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs4270.yaml
@@ -49,11 +49,11 @@ unevaluatedProperties: false
examples:
- |
i2c {
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
- codec@48 {
- compatible = "cirrus,cs4270";
- reg = <0x48>;
- };
+ codec@48 {
+ compatible = "cirrus,cs4270";
+ reg = <0x48>;
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml
index af599d8735e2..ab4c7d22dc0e 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml
@@ -199,28 +199,28 @@ examples:
- |
#include <dt-bindings/sound/cs42l42.h>
i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- cs42l42: cs42l42@48 {
- compatible = "cirrus,cs42l42";
- reg = <0x48>;
- VA-supply = <&dummy_vreg>;
- VP-supply = <&dummy_vreg>;
- VCP-supply = <&dummy_vreg>;
- VD_FILT-supply = <&dummy_vreg>;
- VL-supply = <&dummy_vreg>;
-
- reset-gpios = <&axi_gpio_0 1 0>;
- interrupt-parent = <&gpio0>;
- interrupts = <55 8>;
-
- cirrus,ts-inv = <CS42L42_TS_INV_DIS>;
- cirrus,ts-dbnc-rise = <CS42L42_TS_DBNCE_1000>;
- cirrus,ts-dbnc-fall = <CS42L42_TS_DBNCE_0>;
- cirrus,btn-det-init-dbnce = <100>;
- cirrus,btn-det-event-dbnce = <10>;
- cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;
- cirrus,hs-bias-ramp-rate = <CS42L42_HSBIAS_RAMP_SLOW>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ audio-codec@48 {
+ compatible = "cirrus,cs42l42";
+ reg = <0x48>;
+ VA-supply = <&dummy_vreg>;
+ VP-supply = <&dummy_vreg>;
+ VCP-supply = <&dummy_vreg>;
+ VD_FILT-supply = <&dummy_vreg>;
+ VL-supply = <&dummy_vreg>;
+
+ reset-gpios = <&axi_gpio_0 1 0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <55 8>;
+
+ cirrus,ts-inv = <CS42L42_TS_INV_DIS>;
+ cirrus,ts-dbnc-rise = <CS42L42_TS_DBNCE_1000>;
+ cirrus,ts-dbnc-fall = <CS42L42_TS_DBNCE_0>;
+ cirrus,btn-det-init-dbnce = <100>;
+ cirrus,btn-det-event-dbnce = <10>;
+ cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;
+ cirrus,hs-bias-ramp-rate = <CS42L42_HSBIAS_RAMP_SLOW>;
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
index 7f8338e8ae36..94062c1d9d45 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
@@ -43,14 +43,14 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- jack_codec: codec@4b {
- compatible = "cirrus,cs42l84";
- reg = <0x4b>;
- reset-gpios = <&pinctrl_nub 4 GPIO_ACTIVE_LOW>;
- interrupts-extended = <&pinctrl_ap 180 IRQ_TYPE_LEVEL_LOW>;
- #sound-dai-cells = <0>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ jack_codec: codec@4b {
+ compatible = "cirrus,cs42l84";
+ reg = <0x4b>;
+ reset-gpios = <&pinctrl_nub 4 GPIO_ACTIVE_LOW>;
+ interrupts-extended = <&pinctrl_ap 180 IRQ_TYPE_LEVEL_LOW>;
+ #sound-dai-cells = <0>;
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs42xx8.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs42xx8.yaml
index a1ae548c4b7b..b5cdc7e537f8 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs42xx8.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs42xx8.yaml
@@ -75,37 +75,37 @@ unevaluatedProperties: false
examples:
- |
i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- codec@48 {
- compatible = "cirrus,cs42888";
- reg = <0x48>;
- clocks = <&codec_mclk 0>;
- clock-names = "mclk";
- VA-supply = <&reg_audio>;
- VD-supply = <&reg_audio>;
- VLS-supply = <&reg_audio>;
- VLC-supply = <&reg_audio>;
- reset-gpios = <&gpio 1>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ codec@48 {
+ compatible = "cirrus,cs42888";
+ reg = <0x48>;
+ clocks = <&codec_mclk 0>;
+ clock-names = "mclk";
+ VA-supply = <&reg_audio>;
+ VD-supply = <&reg_audio>;
+ VLS-supply = <&reg_audio>;
+ VLC-supply = <&reg_audio>;
+ reset-gpios = <&gpio 1>;
+ };
};
spi {
- #address-cells = <1>;
- #size-cells = <0>;
- cs-gpios = <&gpio 8 0>;
-
- codec@0 {
- compatible = "cirrus,cs42888";
- reg = <0>;
- spi-max-frequency = <6000000>;
- clocks = <&codec_mclk 0>;
- clock-names = "mclk";
- VA-supply = <&reg_audio>;
- VD-supply = <&reg_audio>;
- VLS-supply = <&reg_audio>;
- VLC-supply = <&reg_audio>;
- reset-gpios = <&gpio 1>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cs-gpios = <&gpio 8 0>;
+
+ codec@0 {
+ compatible = "cirrus,cs42888";
+ reg = <0>;
+ spi-max-frequency = <6000000>;
+ clocks = <&codec_mclk 0>;
+ clock-names = "mclk";
+ VA-supply = <&reg_audio>;
+ VD-supply = <&reg_audio>;
+ VLS-supply = <&reg_audio>;
+ VLC-supply = <&reg_audio>;
+ reset-gpios = <&gpio 1>;
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/dialog,da7219.yaml b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml
index 19137abdba3e..852f27e9dffe 100644
--- a/Documentation/devicetree/bindings/sound/dialog,da7219.yaml
+++ b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml
@@ -195,44 +195,44 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- codec: da7219@1a {
- compatible = "dlg,da7219";
- reg = <0x1a>;
-
- interrupt-parent = <&gpio6>;
- interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
-
- VDD-supply = <&vdd_reg>;
- VDDMIC-supply = <&vddmic_reg>;
- VDDIO-supply = <&vddio_reg>;
-
- #clock-cells = <1>;
- clock-output-names = "da7219-dai-wclk", "da7219-dai-bclk";
-
- clocks = <&clks 201>;
- clock-names = "mclk";
-
- dlg,micbias-lvl = <2600>;
- dlg,mic-amp-in-sel = "diff";
-
- da7219_aad {
- dlg,btn-cfg = <50>;
- dlg,mic-det-thr = <500>;
- dlg,jack-ins-deb = <20>;
- dlg,jack-ins-det-pty = "low";
- dlg,jack-det-rate = "32_64";
- dlg,jack-rem-deb = <1>;
-
- dlg,a-d-btn-thr = <0xa>;
- dlg,d-b-btn-thr = <0x16>;
- dlg,b-c-btn-thr = <0x21>;
- dlg,c-mic-btn-thr = <0x3E>;
-
- dlg,btn-avg = <4>;
- dlg,adc-1bit-rpt = <1>;
- };
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ codec: audio-codec@1a {
+ compatible = "dlg,da7219";
+ reg = <0x1a>;
+
+ interrupt-parent = <&gpio6>;
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+
+ VDD-supply = <&vdd_reg>;
+ VDDMIC-supply = <&vddmic_reg>;
+ VDDIO-supply = <&vddio_reg>;
+
+ #clock-cells = <1>;
+ clock-output-names = "da7219-dai-wclk", "da7219-dai-bclk";
+
+ clocks = <&clks 201>;
+ clock-names = "mclk";
+
+ dlg,micbias-lvl = <2600>;
+ dlg,mic-amp-in-sel = "diff";
+
+ da7219_aad {
+ dlg,btn-cfg = <50>;
+ dlg,mic-det-thr = <500>;
+ dlg,jack-ins-deb = <20>;
+ dlg,jack-ins-det-pty = "low";
+ dlg,jack-det-rate = "32_64";
+ dlg,jack-rem-deb = <1>;
+
+ dlg,a-d-btn-thr = <0xa>;
+ dlg,d-b-btn-thr = <0x16>;
+ dlg,b-c-btn-thr = <0x21>;
+ dlg,c-mic-btn-thr = <0x3E>;
+
+ dlg,btn-avg = <4>;
+ dlg,adc-1bit-rpt = <1>;
+ };
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
index 608defc93c1e..cd69bad107c7 100644
--- a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
@@ -186,5 +186,5 @@ examples:
asrc_endpoint: endpoint {
remote-endpoint = <&fe00_ep>;
};
- };
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index ba65b3f3d066..eb0b9d8d907f 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -260,13 +260,13 @@ examples:
playback-only;
sai1_endpoint0: endpoint {
- dai-tdm-slot-num = <8>;
- dai-tdm-slot-width = <32>;
- dai-tdm-slot-width-map = <32 8 32>;
- dai-format = "dsp_a";
- bitclock-master;
- frame-master;
- remote-endpoint = <&mcodec01_ep>;
+ dai-tdm-slot-num = <8>;
+ dai-tdm-slot-width = <32>;
+ dai-tdm-slot-width-map = <32 8 32>;
+ dai-format = "dsp_a";
+ bitclock-master;
+ frame-master;
+ remote-endpoint = <&mcodec01_ep>;
};
};
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
index 950e3eab2942..27636466ba63 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
+++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
@@ -105,10 +105,10 @@ examples:
format = "i2s";
fsl,mclk-equal-bclk;
cpu {
- sound-dai = <&sai1>;
+ sound-dai = <&sai1>;
};
codec {
- sound-dai = <&ak4458_1>, <&ak4458_2>;
+ sound-dai = <&ak4458_1>, <&ak4458_2>;
};
};
fe-dai-link {
diff --git a/Documentation/devicetree/bindings/sound/invensense,ics43432.yaml b/Documentation/devicetree/bindings/sound/invensense,ics43432.yaml
index 7bd984817aa9..054f80390b8d 100644
--- a/Documentation/devicetree/bindings/sound/invensense,ics43432.yaml
+++ b/Documentation/devicetree/bindings/sound/invensense,ics43432.yaml
@@ -42,10 +42,10 @@ examples:
compatible = "invensense,ics43432";
port {
- endpoint {
- remote-endpoint = <&i2s1_endpoint>;
- dai-format = "i2s";
- };
+ endpoint {
+ remote-endpoint = <&i2s1_endpoint>;
+ dai-format = "i2s";
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/loongson,ls-audio-card.yaml b/Documentation/devicetree/bindings/sound/loongson,ls-audio-card.yaml
index dc7f4afbb777..69ea611d4250 100644
--- a/Documentation/devicetree/bindings/sound/loongson,ls-audio-card.yaml
+++ b/Documentation/devicetree/bindings/sound/loongson,ls-audio-card.yaml
@@ -79,7 +79,7 @@ examples:
sound-dai = <&i2s>;
};
codec {
- sound-dai = <&es8323>;
+ sound-dai = <&es8323>;
};
};
@@ -104,6 +104,6 @@ examples:
};
codec {
- sound-dai = <&es8388>;
+ sound-dai = <&es8388>;
};
};
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml
index d8993b5d457a..4c66160e9e1b 100644
--- a/Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml
@@ -84,15 +84,15 @@ examples:
<&topckgen CLK_TOP_I2S2_M_SEL>,
<&topckgen CLK_TOP_I2S3_M_SEL>,
<&topckgen CLK_TOP_I2S3_B_SEL>;
- clock-names = "infra_sys_audio_clk",
- "top_pdn_audio",
- "top_pdn_aud_intbus",
- "bck0",
- "bck1",
- "i2s0_m",
- "i2s1_m",
- "i2s2_m",
- "i2s3_m",
- "i2s3_b";
- memory-region = <&afe_dma_mem>;
+ clock-names = "infra_sys_audio_clk",
+ "top_pdn_audio",
+ "top_pdn_aud_intbus",
+ "bck0",
+ "bck1",
+ "i2s0_m",
+ "i2s1_m",
+ "i2s2_m",
+ "i2s3_m",
+ "i2s3_b";
+ memory-region = <&afe_dma_mem>;
};
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml
index 031b0fa7b4dc..261247ca2c87 100644
--- a/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml
@@ -182,47 +182,47 @@ examples:
<&topckgen CLK_TOP_APLL12_DIV4>,
<&topckgen CLK_TOP_APLL12_DIVB>,
<&clk26m>;
- clock-names = "aud_afe_clk",
- "aud_dac_clk",
- "aud_dac_predis_clk",
- "aud_adc_clk",
- "aud_adc_adda6_clk",
- "aud_apll22m_clk",
- "aud_apll24m_clk",
- "aud_apll1_tuner_clk",
- "aud_apll2_tuner_clk",
- "aud_i2s1_bclk_sw",
- "aud_i2s2_bclk_sw",
- "aud_i2s3_bclk_sw",
- "aud_i2s4_bclk_sw",
- "aud_tdm_clk",
- "aud_tml_clk",
- "aud_infra_clk",
- "mtkaif_26m_clk",
- "top_mux_audio",
- "top_mux_aud_intbus",
- "top_syspll_d2_d4",
- "top_mux_aud_1",
- "top_apll1_ck",
- "top_mux_aud_2",
- "top_apll2_ck",
- "top_mux_aud_eng1",
- "top_apll1_d8",
- "top_mux_aud_eng2",
- "top_apll2_d8",
- "top_i2s0_m_sel",
- "top_i2s1_m_sel",
- "top_i2s2_m_sel",
- "top_i2s3_m_sel",
- "top_i2s4_m_sel",
- "top_i2s5_m_sel",
- "top_apll12_div0",
- "top_apll12_div1",
- "top_apll12_div2",
- "top_apll12_div3",
- "top_apll12_div4",
- "top_apll12_divb",
- "top_clk26m_clk";
+ clock-names = "aud_afe_clk",
+ "aud_dac_clk",
+ "aud_dac_predis_clk",
+ "aud_adc_clk",
+ "aud_adc_adda6_clk",
+ "aud_apll22m_clk",
+ "aud_apll24m_clk",
+ "aud_apll1_tuner_clk",
+ "aud_apll2_tuner_clk",
+ "aud_i2s1_bclk_sw",
+ "aud_i2s2_bclk_sw",
+ "aud_i2s3_bclk_sw",
+ "aud_i2s4_bclk_sw",
+ "aud_tdm_clk",
+ "aud_tml_clk",
+ "aud_infra_clk",
+ "mtkaif_26m_clk",
+ "top_mux_audio",
+ "top_mux_aud_intbus",
+ "top_syspll_d2_d4",
+ "top_mux_aud_1",
+ "top_apll1_ck",
+ "top_mux_aud_2",
+ "top_apll2_ck",
+ "top_mux_aud_eng1",
+ "top_apll1_d8",
+ "top_mux_aud_eng2",
+ "top_apll2_d8",
+ "top_i2s0_m_sel",
+ "top_i2s1_m_sel",
+ "top_i2s2_m_sel",
+ "top_i2s3_m_sel",
+ "top_i2s4_m_sel",
+ "top_i2s5_m_sel",
+ "top_apll12_div0",
+ "top_apll12_div1",
+ "top_apll12_div2",
+ "top_apll12_div3",
+ "top_apll12_div4",
+ "top_apll12_divb",
+ "top_clk26m_clk";
};
...
diff --git a/Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml b/Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml
index 037f21443ad1..d5b358838e2a 100644
--- a/Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml
@@ -167,30 +167,30 @@ examples:
"HDMI1", "TX";
hs-playback-dai-link {
- link-name = "I2S0";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&da7219>;
- };
+ link-name = "I2S0";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&da7219>;
+ };
};
hs-capture-dai-link {
- link-name = "I2S1";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&da7219>;
- };
+ link-name = "I2S1";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&da7219>;
+ };
};
spk-dp-playback-dai-link {
- link-name = "I2S3";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&anx_bridge_dp>, <&max98357a>;
- };
+ link-name = "I2S3";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&anx_bridge_dp>, <&max98357a>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
index ed93f18ef985..7f553575c73d 100644
--- a/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
@@ -171,30 +171,30 @@ examples:
"HDMI1", "TX";
hs-playback-dai-link {
- link-name = "I2S0";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&rt5682s 0>;
- };
+ link-name = "I2S0";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&rt5682s 0>;
+ };
};
hs-capture-dai-link {
- link-name = "I2S1";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&rt5682s 0>;
- };
+ link-name = "I2S1";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&rt5682s 0>;
+ };
};
spk-hdmi-playback-dai-link {
- link-name = "I2S3";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&it6505dptx>, <&rt1019p>;
- };
+ link-name = "I2S3";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&it6505dptx>, <&rt1019p>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml
index c4e68f31aaab..841aab0178e3 100644
--- a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml
@@ -165,38 +165,38 @@ examples:
"Speakers", "Speaker";
spk-playback-dai-link {
- link-name = "I2S3";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&rt1015p>;
- };
+ link-name = "I2S3";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&rt1015p>;
+ };
};
hs-playback-dai-link {
- link-name = "I2S8";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&rt5682 0>;
- };
+ link-name = "I2S8";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&rt5682 0>;
+ };
};
hs-capture-dai-link {
- link-name = "I2S9";
- dai-format = "i2s";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&rt5682 0>;
- };
+ link-name = "I2S9";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&rt5682 0>;
+ };
};
displayport-dai-link {
- link-name = "TDM";
- dai-format = "dsp_a";
- codec {
- sound-dai = <&anx_bridge_dp>;
- };
+ link-name = "TDM";
+ dai-format = "dsp_a";
+ codec {
+ sound-dai = <&anx_bridge_dp>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml b/Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml
index 356e1feee962..c6bd286780c9 100644
--- a/Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml
@@ -156,46 +156,46 @@ examples:
"Ext Spk", "Speaker";
mm-dai-link {
- link-name = "ETDM1_IN_BE";
- mediatek,clk-provider = "cpu";
+ link-name = "ETDM1_IN_BE";
+ mediatek,clk-provider = "cpu";
};
hs-playback-dai-link {
- link-name = "ETDM1_OUT_BE";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&headset_codec>;
- };
+ link-name = "ETDM1_OUT_BE";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&headset_codec>;
+ };
};
hs-capture-dai-link {
- link-name = "ETDM2_IN_BE";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&headset_codec>;
- };
+ link-name = "ETDM2_IN_BE";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&headset_codec>;
+ };
};
spk-playback-dai-link {
- link-name = "ETDM2_OUT_BE";
- mediatek,clk-provider = "cpu";
- codec {
- sound-dai = <&spk_amplifier>;
- };
+ link-name = "ETDM2_OUT_BE";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&spk_amplifier>;
+ };
};
hdmi-dai-link {
- link-name = "ETDM3_OUT_BE";
- codec {
- sound-dai = <&hdmi_tx>;
- };
+ link-name = "ETDM3_OUT_BE";
+ codec {
+ sound-dai = <&hdmi_tx>;
+ };
};
displayport-dai-link {
- link-name = "DPTX_BE";
- codec {
- sound-dai = <&dp_tx>;
- };
+ link-name = "DPTX_BE";
+ codec {
+ sound-dai = <&dp_tx>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
index 4878c424ef03..78587139f155 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
@@ -75,11 +75,11 @@ examples:
#size-cells = <0>;
dai@10 {
- reg = <PRIMARY_MI2S_RX>;
- clocks = <&q6prmcc LPASS_CLK_ID_PRI_MI2S_IBIT
- LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
- <&q6prmcc LPASS_CLK_ID_MCLK_1
- LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- clock-names = "bclk", "mclk";
+ reg = <PRIMARY_MI2S_RX>;
+ clocks = <&q6prmcc LPASS_CLK_ID_PRI_MI2S_IBIT
+ LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_MCLK_1
+ LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "bclk", "mclk";
};
};
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index e8a2acb92646..d3516fb1b130 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -432,14 +432,14 @@ examples:
"ssi.1", "ssi.0";
rcar_sound,dvc {
- dvc0: dvc-0 {
- dmas = <&audma0 0xbc>;
- dma-names = "tx";
- };
- dvc1: dvc-1 {
- dmas = <&audma0 0xbe>;
- dma-names = "tx";
- };
+ dvc0: dvc-0 {
+ dmas = <&audma0 0xbc>;
+ dma-names = "tx";
+ };
+ dvc1: dvc-1 {
+ dmas = <&audma0 0xbe>;
+ dma-names = "tx";
+ };
};
rcar_sound,mix {
diff --git a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml b/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml
index 1394f78281fc..d696fb33d9b8 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml
@@ -95,20 +95,20 @@ examples:
ssi0: ssi@10049c00 {
compatible = "renesas,r9a07g044-ssi",
"renesas,rz-ssi";
- reg = <0x10049c00 0x400>;
- interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 327 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 328 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "int_req", "dma_rx", "dma_tx";
- clocks = <&cpg CPG_MOD R9A07G044_SSI0_PCLK2>,
- <&cpg CPG_MOD R9A07G044_SSI0_PCLK_SFR>,
- <&audio_clk1>,
- <&audio_clk2>;
- clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2";
- power-domains = <&cpg>;
- resets = <&cpg R9A07G044_SSI0_RST_M2_REG>;
- dmas = <&dmac 0x2655>,
- <&dmac 0x2656>;
- dma-names = "tx", "rx";
- #sound-dai-cells = <0>;
+ reg = <0x10049c00 0x400>;
+ interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 328 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "int_req", "dma_rx", "dma_tx";
+ clocks = <&cpg CPG_MOD R9A07G044_SSI0_PCLK2>,
+ <&cpg CPG_MOD R9A07G044_SSI0_PCLK_SFR>,
+ <&audio_clk1>,
+ <&audio_clk2>;
+ clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2";
+ power-domains = <&cpg>;
+ resets = <&cpg R9A07G044_SSI0_RST_M2_REG>;
+ dmas = <&dmac 0x2655>,
+ <&dmac 0x2656>;
+ dma-names = "tx", "rx";
+ #sound-dai-cells = <0>;
};
diff --git a/Documentation/devicetree/bindings/sound/ti,tas5805m.yaml b/Documentation/devicetree/bindings/sound/ti,tas5805m.yaml
index c2c2835a9e1d..f2ab274b02cd 100644
--- a/Documentation/devicetree/bindings/sound/ti,tas5805m.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,tas5805m.yaml
@@ -45,13 +45,13 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
tas5805m: tas5805m@2c {
- reg = <0x2c>;
- compatible = "ti,tas5805m";
+ reg = <0x2c>;
+ compatible = "ti,tas5805m";
- pvdd-supply = <&audiopwr>;
- pdn-gpios = <&tlmm 160 0>;
+ pvdd-supply = <&audiopwr>;
+ pdn-gpios = <&tlmm 160 0>;
- ti,dsp-config-name = "mono_pbtl_48khz";
+ ti,dsp-config-name = "mono_pbtl_48khz";
};
};
...
diff --git a/Documentation/devicetree/bindings/sound/ti,tlv320dac3100.yaml b/Documentation/devicetree/bindings/sound/ti,tlv320dac3100.yaml
index 10299064cbc6..3bdaab1e5084 100644
--- a/Documentation/devicetree/bindings/sound/ti,tlv320dac3100.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,tlv320dac3100.yaml
@@ -121,6 +121,6 @@ examples:
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
- };
+ };
};
diff --git a/Documentation/devicetree/bindings/sound/ti,tpa6130a2.yaml b/Documentation/devicetree/bindings/sound/ti,tpa6130a2.yaml
index a42bf9bde694..5634b601ce65 100644
--- a/Documentation/devicetree/bindings/sound/ti,tpa6130a2.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,tpa6130a2.yaml
@@ -50,6 +50,6 @@ examples:
reg = <0x60>;
Vdd-supply = <&vmmc2>;
power-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>;
- };
+ };
};
diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index 1c148fe8e1f9..48f62e59c455 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -422,7 +422,8 @@ Domain`_ references.
Function reference.
``@parameter``
- Name of a function parameter. (No cross-referencing, just formatting.)
+ Name of a function parameter, struct member, union member, or
+ enum value. (No cross-referencing, just formatting.)
``%CONST``
Name of a constant. (No cross-referencing, just formatting.)
@@ -563,8 +564,8 @@ identifiers: *[ function/type ...]*
Include documentation for each *function* and *type* in *source*.
If no *function* is specified, the documentation for all functions
and types in the *source* will be included.
- *type* can be a ``struct``, ``union``, ``enum``, ``typedef`` or ``var``
- identifier.
+ *type* can be a ``struct``, ``union``, ``enum``, ``typedef``, ``var``,
+ or ``define`` identifier.
Examples::
diff --git a/Documentation/filesystems/fuse/fuse.rst b/Documentation/filesystems/fuse/fuse.rst
index 0fbd5a03fdc9..063d99959396 100644
--- a/Documentation/filesystems/fuse/fuse.rst
+++ b/Documentation/filesystems/fuse/fuse.rst
@@ -173,10 +173,10 @@ the error set to EINTR.
It is also possible that there's a race between processing the
original request and its INTERRUPT request. There are two possibilities:
- 1. The INTERRUPT request is processed before the original request is
+ 1) The INTERRUPT request is processed before the original request is
processed
- 2. The INTERRUPT request is processed after the original request has
+ 2) The INTERRUPT request is processed after the original request has
been answered
If the filesystem cannot find the original request, it should wait for
@@ -239,9 +239,9 @@ How are requirements fulfilled?
A) The mount owner could gain elevated privileges by either:
- 1. creating a filesystem containing a device file, then opening this device
+ 1) creating a filesystem containing a device file, then opening this device
- 2. creating a filesystem containing a suid or sgid application, then executing this application
+ 2) creating a filesystem containing a suid or sgid application, then executing this application
The solution is not to allow opening device files and ignore
setuid and setgid bits when executing programs. To ensure this
diff --git a/Documentation/input/devices/yealink.rst b/Documentation/input/devices/yealink.rst
index bb5a1aafeca2..53191a3c83ca 100644
--- a/Documentation/input/devices/yealink.rst
+++ b/Documentation/input/devices/yealink.rst
@@ -120,9 +120,10 @@ Reading /sys/../lineX will return the format string with its current value.
Writing to /sys/../lineX will set the corresponding LCD line.
- Excess characters are ignored.
- - If less characters are written than allowed, the remaining digits are
+ - If fewer characters than allowed are written, the remaining digits are
unchanged.
- - The tab '\t'and '\n' char does not overwrite the original content.
+ - The tab ``\t`` and newline ``\n`` characters do not overwrite the original
+ content.
- Writing a space to an icon will always hide its content.
Example::
@@ -205,7 +206,7 @@ Troubleshooting
:Q: Module yealink compiled and installed without any problem but phone
is not initialized and does not react to any actions.
:A: If you see something like:
- hiddev0: USB HID v1.00 Device [Yealink Network Technology Ltd. VOIP USB Phone
+ hiddev0: USB HID v1.00 Device [Yealink Network Technology Ltd. VOIP USB Phone]
in dmesg, it means that the hid driver has grabbed the device first. Try to
load module yealink before any other usb hid driver. Please see the
instructions provided by your distribution on module configuration.
diff --git a/Documentation/input/notifier.rst b/Documentation/input/notifier.rst
index 824379399e61..e7facd1a1003 100644
--- a/Documentation/input/notifier.rst
+++ b/Documentation/input/notifier.rst
@@ -31,7 +31,7 @@ In a rough C snippet, we have::
kbd_keycode(keycode) {
...
params.value = keycode;
- if (notifier_call_chain(KBD_KEYCODE,&params) == NOTIFY_STOP)
+ if ((notifier_call_chain(KBD_KEYCODE,&params) == NOTIFY_STOP)
|| !bound) {
notifier_call_chain(KBD_UNBOUND_KEYCODE,&params);
return;
diff --git a/Documentation/kbuild/kconfig-macro-language.rst b/Documentation/kbuild/kconfig-macro-language.rst
index 6163467f6ae4..c427bece3148 100644
--- a/Documentation/kbuild/kconfig-macro-language.rst
+++ b/Documentation/kbuild/kconfig-macro-language.rst
@@ -225,7 +225,7 @@ not work::
$(MY_TYPE) "foo"
default y
-Obviously from the design, $(shell command) is expanded in the textual
+Obviously from the design, $(shell,command) is expanded in the textual
substitution phase. You cannot pass symbols to the 'shell' function.
The following does not work as expected::
@@ -236,12 +236,12 @@ The following does not work as expected::
default "-mlittle-endian" if CPU_LITTLE_ENDIAN
config CC_HAS_ENDIAN_FLAG
- def_bool $(shell $(srctree)/scripts/gcc-check-flag ENDIAN_FLAG)
+ def_bool $(shell,$(srctree)/scripts/gcc-check-flag ENDIAN_FLAG)
Instead, you can do like follows so that any function call is statically
expanded::
config CC_HAS_ENDIAN_FLAG
bool
- default $(shell $(srctree)/scripts/gcc-check-flag -mbig-endian) if CPU_BIG_ENDIAN
- default $(shell $(srctree)/scripts/gcc-check-flag -mlittle-endian) if CPU_LITTLE_ENDIAN
+ default $(shell,$(srctree)/scripts/gcc-check-flag -mbig-endian) if CPU_BIG_ENDIAN
+ default $(shell,$(srctree)/scripts/gcc-check-flag -mlittle-endian) if CPU_LITTLE_ENDIAN
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index cb116a82ff20..aed6cb1cf483 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -249,7 +249,7 @@ For each ``aggregation interval``, it compares the access frequencies
sum of the two regions' sizes is smaller than the size of total regions divided
by the ``minimum number of regions``, DAMON merges the two regions. If the
resulting number of total regions is still higher than ``maximum number of
-regions``, it repeats the merging with increasing access frequencies difference
+regions``, it repeats the merging with increasing access frequenceis difference
threshold until the upper-limit of the number of regions is met, or the
threshold becomes higher than possible maximum value (``aggregation interval``
divided by ``sampling interval``). Then, after it reports and clears the
@@ -293,13 +293,8 @@ registration is made by specifying a probe per attribute. Each of the probe
specifies a rule to determine if a given memory region has the related
attribute. The rule is constructed with multiple filters. The filters work
same to :ref:`DAMOS filters <damon_design_damos_filters>` except the supported
-filter types. Currently below filter types are supported.
-
-- ``anon``: Same to that for DAMOS filters.
-- ``memcg``: Same to that for DAMOS filters.
-- ``pgidle_unset``: Matches if the page for the memory is marked as not
- access-idle.
-- ``pgidle_set``: Matches if the page for the memory is marked as access-idle.
+filter types. Currently only ``anon`` and ``memcg`` filter types are supported
+for data attributes monitoring.
If such probes are registered, DAMON executes the probes for each region's
sampling memory when it does the access :ref:`sampling
@@ -310,13 +305,6 @@ Users can therefore know how much of a given DAMON region has a specific data
attribute by reading the per-region per-probe probe hits counter after each
aggregation interval.
-Users can optionally register probing preparation actions per probe. If such
-actions are registered, DAMON applies the actions to each region's sampling
-memory before starting the next sampling interval. Currently only one action,
-``set_pgidle`` is supported. The action marks the page for the probing target
-memory as access-idle. This can be useful to be used together with
-``pgidle_unset`` or ``pgidle_set`` probe filter.
-
This is a sampling based mechanism. Hence, it is lightweight but the output
may include some measurement errors. The output should be used with good
understanding of statistics.
@@ -725,8 +713,6 @@ mechanism tries to make ``current_value`` of ``target_metric`` be same to
bp (1/10,000).
- ``node_eligible_mem_bp``: Scheme target access pattern-eligible memory ratio
of a node in bp (1/10,000).
-- ``hugepage_mem_bp``: Total huge page to total used memory ratio in bp
- (1/10,000).
``nid`` is optionally required for ``node_mem_used_bp``, ``node_mem_free_bp``,
``node_memcg_used_bp``, ``node_memcg_free_bp`` and ``node_eligible_mem_bp`` to
@@ -823,9 +809,6 @@ Below ``type`` of filters are currently supported.
- Applied to pages that belonging to a given address range.
- target
- Applied to pages that belonging to a given DAMON monitoring target.
- - probe_hits_wsum
- - Matches to monitoring regions having a given range of :ref:`probe
- hits weighted sum <damon_design_attrs_only_monitoring>` value.
- Operations layer handled, supported by only ``paddr`` operations set.
- anon
- Applied to pages that containing data that not stored in files.
@@ -863,8 +846,8 @@ scheme's execution.
- ``nr_applied``: Total number of regions that the scheme is applied.
- ``sz_applied``: Total size of regions that the scheme is applied.
- ``qt_exceeds``: Total number of times the quota of the scheme has exceeded.
-- ``nr_snapshots``: Total number of DAMON snapshots that the scheme is
- completely tried to be applied.
+- ``nr_snapshots``: Total number of DAMON snapshots that the scheme is tried to
+ be applied.
- ``max_nr_snapshots``: Upper limit of ``nr_snapshots``.
"A scheme is tried to be applied to a region" means DAMOS core logic determined
@@ -888,12 +871,11 @@ action is ``pageout`` while all pages of the region are unreclaimable, applying
the action to the region will fail.
Unlike normal stats, ``max_nr_snapshots`` is set by users. If it is set as
-non-zero and ``nr_snapshots`` equals or is greater than ``max_nr_snapshots``,
-the scheme is deactivated. Note that, unlike watermarks, even if a scheme's
-``nr_snapshots`` reaches ``max_nr_snapshots``, monitoring will not stop.
+non-zero and ``nr_snapshots`` be same to or greater than ``nr_snapshots``, the
+scheme is deactivated.
To know how user-space can read the stats via :ref:`DAMON sysfs interface
-<sysfs_interface>`, refer to :ref:`stats <sysfs_schemes_stats>` part of the
+<sysfs_interface>`, refer to :ref:s`stats <sysfs_stats>` part of the
documentation.
Regions Walking
diff --git a/Documentation/mm/damon/maintainer-profile.rst b/Documentation/mm/damon/maintainer-profile.rst
index a7c135233937..fb2fa00cc9aa 100644
--- a/Documentation/mm/damon/maintainer-profile.rst
+++ b/Documentation/mm/damon/maintainer-profile.rst
@@ -106,9 +106,18 @@ AI Review
For patches that are publicly posted to DAMON mailing list
(damon@lists.linux.dev), AI reviews of the patches will be available at
-sashiko.dev. The reviews will also be sent as replies to the author of the
-patch and the mailing list.
+sashiko.dev. The reviews could also be sent as mails to the author of the
+patch.
+
+Patch authors are encouraged to check the AI reviews and share their opinions.
+The sharing could be done as a reply to the mail thread. Consider reducing the
+recipients list for such sharing, since some people are not really interested
+in AI reviews. As a rule of thumb, drop stable@vger.kernel.org and individuals
+except DAMON maintainer.
+
+`hkml` also provides a `feature
+<https://github.com/sjp38/hackermail/blob/master/USAGE.md#forwarding-sashikodev-statuscomments-to-mailing-list>`_
+for such sharing. Please feel free to use the feature.
-Patch authors are encouraged to check the AI reviews and share their opinions
-by replying on the mail thread. It is only an optional recommendation. DAMON
-maintainer could also ask any question about the AI reviews, though.
+It is only an optional recommendation. DAMON maintainer could also ask any
+question about the AI reviews, though.
diff --git a/Documentation/mm/ksm.rst b/Documentation/mm/ksm.rst
index 5a80573162de..2b4f72f1f953 100644
--- a/Documentation/mm/ksm.rst
+++ b/Documentation/mm/ksm.rst
@@ -78,7 +78,7 @@ The frequency of such scans is defined by
Reference
---------
.. kernel-doc:: mm/ksm.c
- :functions: ksm_mm_slot ksm_scan ksm_stable_node ksm_rmap_item
+ :functions: mm_slot ksm_scan stable_node rmap_item
--
Izik Eidus,
diff --git a/Documentation/mm/page_owner.rst b/Documentation/mm/page_owner.rst
index bd027377dff6..a6bd3fe6423a 100644
--- a/Documentation/mm/page_owner.rst
+++ b/Documentation/mm/page_owner.rst
@@ -199,7 +199,6 @@ Usage
-p Sort by pid.
-P Sort by tgid.
-n Sort by task command name.
- -M Sort by module name.
-r Sort by memory release time.
-s Sort by stack trace.
-t Sort by times (default).
@@ -241,10 +240,8 @@ Usage
group ID numbers appear in <tgidlist>.
--name <cmdlist> Select by task command name. This selects the blocks whose
task command name appear in <cmdlist>.
- --module <modlist> Select by module name. This selects the blocks whose
- module name appear in <modlist>.
- <pidlist>, <tgidlist>, <cmdlist>, <modlist> are single arguments in the form of a comma-separated list,
+ <pidlist>, <tgidlist>, <cmdlist> are single arguments in the form of a comma-separated list,
which offers a way to specify individual selecting rules.
@@ -252,7 +249,6 @@ Usage
./page_owner_sort <input> <output> --pid=1
./page_owner_sort <input> <output> --tgid=1,2,3
./page_owner_sort <input> <output> --name name1,name2
- ./page_owner_sort <input> <output> --module xfs,ext4
STANDARD FORMAT SPECIFIERS
==========================
@@ -269,7 +265,6 @@ STANDARD FORMAT SPECIFIERS
ft free_ts timestamp of the page when it was released
at alloc_ts timestamp of the page when it was allocated
ator allocator memory allocator for pages
- mod module kernel module name
For --cull option:
@@ -280,7 +275,6 @@ STANDARD FORMAT SPECIFIERS
f free whether the page has been released or not
st stacktrace stack trace of the page allocation
ator allocator memory allocator for pages
- mod module kernel module name
Filtering page_owner output
============================
diff --git a/Documentation/mm/process_addrs.rst b/Documentation/mm/process_addrs.rst
index 1e65b139f355..a7296f251799 100644
--- a/Documentation/mm/process_addrs.rst
+++ b/Documentation/mm/process_addrs.rst
@@ -537,12 +537,6 @@ We establish basic locking rules when interacting with page tables:
* When changing a page table entry the page table lock for that page table
**must** be held, except if you can safely assume nobody can access the page
tables concurrently (such as on invocation of :c:func:`!free_pgtables`).
-* Page tables may be *walked* under RCU alone, as page tables are freed only
- after an RCU grace period has elapsed. However, any entry found must be
- revalidated after the page table lock is taken (such as the
- :c:func:`!pmd_same` recheck performed by :c:func:`!pte_offset_map_lock`)
- before it is acted upon. Changing an entry always requires the page table
- lock.
* Reads from and writes to page table entries must be *appropriately*
atomic. See the section on atomicity below for details.
* Populating previously empty entries requires that the mmap or VMA locks are
diff --git a/Documentation/mm/vmemmap_dedup.rst b/Documentation/mm/vmemmap_dedup.rst
index 8c287ae3f86c..9fa8642ded48 100644
--- a/Documentation/mm/vmemmap_dedup.rst
+++ b/Documentation/mm/vmemmap_dedup.rst
@@ -1,3 +1,4 @@
+
.. SPDX-License-Identifier: GPL-2.0
=========================================
@@ -191,7 +192,32 @@ to 4 on HugeTLB pages.
There's no remapping of vmemmap given that device-dax memory is not part of
System RAM ranges initialized at boot. Thus the tail page deduplication
-happens at a later stage when we populate the sections.
+happens at a later stage when we populate the sections. HugeTLB reuses the
+the head vmemmap page representing, whereas device-dax reuses the tail
+vmemmap page. This results in only half of the savings compared to HugeTLB.
+
+Deduplicated tail pages are not mapped read-only.
-Deduplicated tail pages are not mapped read-only. The mapping layout is the same
-as HugeTLB.
+Here's how things look like on device-dax after the sections are populated::
+
+ +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+
+ | | | 0 | -------------> | 0 |
+ | | +-----------+ +-----------+
+ | | | 1 | -------------> | 1 |
+ | | +-----------+ +-----------+
+ | | | 2 | ----------------^ ^ ^ ^ ^ ^
+ | | +-----------+ | | | | |
+ | | | 3 | ------------------+ | | | |
+ | | +-----------+ | | | |
+ | | | 4 | --------------------+ | | |
+ | PMD | +-----------+ | | |
+ | level | | 5 | ----------------------+ | |
+ | mapping | +-----------+ | |
+ | | | 6 | ------------------------+ |
+ | | +-----------+ |
+ | | | 7 | --------------------------+
+ | | +-----------+
+ | |
+ | |
+ | |
+ +-----------+
diff --git a/Documentation/netlink/specs/nlctrl.yaml b/Documentation/netlink/specs/nlctrl.yaml
index 8b4472a6aa36..7e7c158e3e73 100644
--- a/Documentation/netlink/specs/nlctrl.yaml
+++ b/Documentation/netlink/specs/nlctrl.yaml
@@ -42,6 +42,16 @@ definitions:
- bitfield32
- sint
- uint
+ -
+ name: policy-byte-order
+ doc: |
+ Byte order of an integer attribute. Zero is left unused so that it
+ can be taken to mean host byte order.
+ enum-name: netlink-policy-byte-order
+ type: enum
+ value-start: 1
+ entries:
+ - big-endian
attribute-sets:
-
@@ -152,6 +162,11 @@ attribute-sets:
-
name: pad
type: pad
+ -
+ name: byte-order
+ doc: Byte order of the attribute, absent means host byte order.
+ type: u32
+ enum: policy-byte-order
-
name: op-policy-attrs
name-prefix: ctrl-attr-policy-
diff --git a/Documentation/netlink/specs/psp.yaml b/Documentation/netlink/specs/psp.yaml
index e9c2ee7e28e0..f3266763c325 100644
--- a/Documentation/netlink/specs/psp.yaml
+++ b/Documentation/netlink/specs/psp.yaml
@@ -38,6 +38,8 @@ attribute-sets:
doc: |
ifindex of the main netdevice linked to the PSP device,
or the ifindex to associate with the PSP device.
+ Only reported to the network namespace the main netdevice
+ lives in, an ifindex has no meaning outside of it.
type: u32
-
name: psp-versions-cap
diff --git a/Documentation/netlink/specs/tcp_metrics.yaml b/Documentation/netlink/specs/tcp_metrics.yaml
index 13144aeed31a..779e8a22b765 100644
--- a/Documentation/netlink/specs/tcp_metrics.yaml
+++ b/Documentation/netlink/specs/tcp_metrics.yaml
@@ -32,7 +32,7 @@ attribute-sets:
name: addr-ipv6
type: binary
checks:
- min-len: 16
+ exact-len: 16
byte-order: big-endian
display-hint: ipv6
-
@@ -63,7 +63,7 @@ attribute-sets:
name: fopen-cookie
type: binary
checks:
- min-len: tcp-fastopen-cookie-max
+ max-len: tcp-fastopen-cookie-max
-
name: saddr-ipv4
type: u32
@@ -73,7 +73,7 @@ attribute-sets:
name: saddr-ipv6
type: binary
checks:
- min-len: 16
+ exact-len: 16
byte-order: big-endian
display-hint: ipv6
-
@@ -93,14 +93,12 @@ attribute-sets:
name: rtt
type: u32
doc: |
- Round Trip Time (RTT), in msecs with 3 bits fractional
- (left-shift by 3 to get the msec value).
+ Round Trip Time (RTT), in msecs with 3 bits fractional.
-
name: rttvar
type: u32
doc: |
- Round Trip Time VARiance (RTT), in msecs with 2 bits fractional
- (left-shift by 2 to get the msec value).
+ Round Trip Time VARiance (RTTVAR), in msecs with 2 bits fractional.
-
name: ssthresh
type: u32
@@ -117,14 +115,12 @@ attribute-sets:
name: rtt-us
type: u32
doc: |
- Round Trip Time (RTT), in usecs, with 3 bits fractional
- (left-shift by 3 to get the msec value).
+ Round Trip Time (RTT), in usecs, with 3 bits fractional.
-
name: rttvar-us
type: u32
doc: |
- Round Trip Time (RTT), in usecs, with 2 bits fractional
- (left-shift by 3 to get the msec value).
+ Round Trip Time VARiance (RTTVAR), in usecs, with 2 bits fractional.
operations:
list:
diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
index b05829e44d8f..f7af0286341c 100644
--- a/Documentation/networking/ip-sysctl.rst
+++ b/Documentation/networking/ip-sysctl.rst
@@ -874,6 +874,8 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
case this value is ignored.
Default: between 131072 and 32MB, depending on RAM size.
+ Each of the three values cannot be set below 4096.
+
tcp_sack - BOOLEAN
Enable select acknowledgments (SACKS).
diff --git a/Documentation/process/2.Process.rst b/Documentation/process/2.Process.rst
index d09fa23d6c42..a8e09ca4e7c7 100644
--- a/Documentation/process/2.Process.rst
+++ b/Documentation/process/2.Process.rst
@@ -227,7 +227,7 @@ tree, usually (but certainly not always) using the Git source management
tool. Tools like Git (and related tools like Quilt or Mercurial) allow
maintainers to track a list of patches, including authorship information
and other metadata. At any given time, the maintainer can identify which
-patches in his or her repository are not found in the mainline.
+patches in their repository are not found in the mainline.
When the merge window opens, top-level maintainers will ask Linus to "pull"
the patches they have selected for merging from their repositories. If
diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst
index b8a449980452..976cf45a565a 100644
--- a/Documentation/process/5.Posting.rst
+++ b/Documentation/process/5.Posting.rst
@@ -233,7 +233,7 @@ the patch. Each of these uses this format::
The tags in common use are:
- - Signed-off-by: this is a developer's certification that he or she has
+ - Signed-off-by: this is a developer's certification that they have
the right to submit the patch for inclusion into the kernel. It is an
agreement to the Developer's Certificate of Origin, the full text of
which can be found in :ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
diff --git a/Documentation/process/6.Followthrough.rst b/Documentation/process/6.Followthrough.rst
index 66fa400c6d94..ebb0e4cc9584 100644
--- a/Documentation/process/6.Followthrough.rst
+++ b/Documentation/process/6.Followthrough.rst
@@ -114,7 +114,7 @@ What happens next
If a patch is considered to be a good thing to add to the kernel, and once
most of the review issues have been resolved, the next step is usually
entry into a subsystem maintainer's tree. How that works varies from one
-subsystem to the next; each maintainer has his or her own way of doing
+subsystem to the next; each maintainer has their own way of doing
things. In particular, there may be more than one tree - one, perhaps,
dedicated to patches planned for the next merge window, and another for
longer-term work.
diff --git a/Documentation/process/handling-regressions.rst b/Documentation/process/handling-regressions.rst
index c71b5d403f0c..6958a2a8b034 100644
--- a/Documentation/process/handling-regressions.rst
+++ b/Documentation/process/handling-regressions.rst
@@ -283,7 +283,7 @@ sure your patch description makes this aspect obvious. Once the change is
merged, tell the Linux kernel's regression tracker and the regressions mailing
list about the risk, so everyone has the change on the radar in case reports
trickle in. Depending on the risk, you also might want to ask the subsystem
-maintainer to mention the issue in his mainline pull request.
+maintainer to mention the issue in their mainline pull request.
What else is there to known about regressions?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst
index 9438e03d6f50..8c60138d03f2 100644
--- a/Documentation/process/howto.rst
+++ b/Documentation/process/howto.rst
@@ -305,7 +305,7 @@ The maintainers of the various kernel subsystems --- and also many
kernel subsystem developers --- expose their current state of
development in source repositories. That way, others can see what is
happening in the different areas of the kernel. In areas where
-development is rapid, a developer may be asked to base his submissions
+development is rapid, a developer may be asked to base their submissions
onto such a subsystem kernel tree so that conflicts between the
submission and other already ongoing work are avoided.
diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
index 7ae79452e1b4..4c28a239e8cb 100644
--- a/Documentation/process/submitting-patches.rst
+++ b/Documentation/process/submitting-patches.rst
@@ -456,7 +456,7 @@ When to use Acked-by:, Cc:, and Co-developed-by:
------------------------------------------------
The Signed-off-by: tag indicates that the signer was involved in the
-development of the patch, or that he/she was in the patch's delivery path.
+development of the patch, or that they were in the patch's delivery path.
If a person was not directly involved in the preparation or handling of a
patch but wishes to signify and record their approval of it then they can
diff --git a/Documentation/translations/pt_BR/process/2.Process.rst b/Documentation/translations/pt_BR/process/2.Process.rst
index 03e288d46950..0019b7404d33 100644
--- a/Documentation/translations/pt_BR/process/2.Process.rst
+++ b/Documentation/translations/pt_BR/process/2.Process.rst
@@ -455,7 +455,7 @@ Existem algumas dicas que podem ajudar na sobrevivência na lista linux-kernel:
- Use respostas intercaladas, o que torna sua resposta mais fácil
de ler. (ou seja, evite o "top-posting" — a prática de colocar sua resposta
acima do texto citado ao qual você está respondendo). Para mais detalhes, veja
- :ref:`Documentation/process/submitting-patches.rst <interleaved_replies>`.
+ :ref:`Documentation/process/submitting-patches.rst <pt_BR_interleaved_replies>`.
- Pergunte na lista de discussão correta. A lista linux-kernel pode até ser o
ponto de encontro geral, mas não é o melhor lugar para encontrar desenvolvedores
diff --git a/Documentation/translations/pt_BR/process/coding-style.rst b/Documentation/translations/pt_BR/process/coding-style.rst
new file mode 100644
index 000000000000..26dcd1246de6
--- /dev/null
+++ b/Documentation/translations/pt_BR/process/coding-style.rst
@@ -0,0 +1,1318 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Estilo de codificação do kernel Linux
+=====================================
+
+Este é um breve documento descrevendo o estilo de codificação preferido
+para o kernel Linux. O estilo de codificação é muito pessoal, e eu não
+**forçarei** minhas opiniões a ninguém, mas isso é o que vale para tudo
+que eu tenha que manter, e eu preferiria isso para a maioria das outras
+coisas também. Por favor, considere pelo menos os pontos aqui apresentados.
+
+Primeiramente, eu sugiro imprimir uma cópia dos padrões de codificação do GNU,
+e NÃO lê-la. Queime-as, é um grande gesto simbólico.
+
+De qualquer forma, aqui vai:
+
+
+1) Indentação
+-------------
+
+As tabulações têm 8 caracteres, e portanto as indentações também têm 8
+caracteres. Há movimentos heréticos que tentam fazer com que as indentações
+tenham 4 (ou até 2!) caracteres de profundidade, e isso é semelhante a
+tentar definir o valor de PI como 3.
+
+Justificativa: A ideia central da indentação é definir claramente onde um
+bloco de controle começa e termina. Especialmente quando você esteve olhando
+para a tela por 20 horas seguidas, você vai achar muito mais fácil ver como
+a indentação funciona se ela for mais ampla.
+
+Agora, algumas pessoas afirmarão que ter indentações de 8 caracteres faz
+o código se deslocar demais para a direita e dificultam a leitura em um
+terminal de 80 caracteres. A resposta é que, se você precisar de mais de 3
+níveis de indentação, você já está em apuros de qualquer forma, e deve
+corrigir seu programa.
+
+Em resumo, indentações de 8 caracteres deixam as coisas mais fáceis de ler, e
+têm o benefício adicional de avisar quando você está aninhando suas funções
+em excesso. Atenda a esse aviso.
+
+A maneira preferida de aliviar vários níveis de indentação em uma instrução
+``switch`` é alinhar o ``switch`` e seus rótulos subordinados ``case`` na
+mesma coluna, em vez de indentar duplamente os rótulos ``case``. Por exemplo:
+
+.. code-block:: c
+
+ switch (suffix) {
+ case 'G':
+ case 'g':
+ mem <<= 30;
+ break;
+ case 'M':
+ case 'm':
+ mem <<= 20;
+ break;
+ case 'K':
+ case 'k':
+ mem <<= 10;
+ fallthrough;
+ default:
+ break;
+ }
+
+Não coloque múltiplas instruções em uma única linha, a menos que você tenha
+algo para esconder:
+
+.. code-block:: c
+
+ if (condition) do_this;
+ do_something_everytime;
+
+Não use vírgulas para evitar usar chaves:
+
+.. code-block:: c
+
+ if (condition)
+ do_this(), do_that();
+
+Sempre use chaves para múltiplas instruções:
+
+.. code-block:: c
+
+ if (condition) {
+ do_this();
+ do_that();
+ }
+
+Também não coloque múltiplas atribuições em uma única linha. O estilo de
+codificação do kernel é extremamente simples. Evite expressões complicadas.
+
+
+Fora de comentários, documentação e, exceto em Kconfig, espaços nunca são
+usados para indentação, e o exemplo acima foi deliberadamente quebrado.
+
+Obtenha um editor decente e não deixe espaços em branco no final das linhas.
+
+
+2) Quebrando linhas longas e strings
+------------------------------------
+
+O estilo de codificação trata principalmente da legibilidade e da
+manutenibilidade usando ferramentas comumente disponíveis.
+
+O limite preferido para o comprimento de uma única linha é de 80 colunas.
+
+Instruções com mais de 80 colunas devem ser quebradas em partes sensatas,
+a menos que exceder 80 colunas aumente significativamente a legibilidade e
+não esconda informações.
+
+Os descendentes são sempre substancialmente mais curtos do que o pai e são
+colocados substancialmente à direita. Um estilo muito usado é alinhar os
+descendentes ao parêntese de abertura de uma função.
+
+Essas mesmas regras são aplicadas aos cabeçalhos de função com uma lista de
+argumentos longa.
+
+No entanto, nunca quebre strings visíveis ao usuário, como mensagens
+``printk``, porque isso prejudica a capacidade de fazer ``grep`` nelas.
+
+
+3) Posicionamento de chaves e espaços
+-------------------------------------
+
+A outra questão que sempre surge no estilo em C é o posicionamento das
+chaves. Ao contrário do tamanho da indentação, há poucos motivos técnicos
+para escolher uma estratégia de posicionamento em vez de outra, mas a forma
+preferida, como nos mostraram os profetas Kernighan e Ritchie, é colocar a
+chave de abertura no final da linha e a chave de fechamento no início, assim:
+
+.. code-block:: c
+
+ if (x is true) {
+ we do y
+ }
+
+Isso se aplica a todos os blocos de instruções que não sejam funções (if,
+switch, for, while, do). Por exemplo:
+
+.. code-block:: c
+
+ switch (action) {
+ case KOBJ_ADD:
+ return "add";
+ case KOBJ_REMOVE:
+ return "remove";
+ case KOBJ_CHANGE:
+ return "change";
+ default:
+ return NULL;
+ }
+
+No entanto, há um caso especial: as funções, que têm a chave de abertura no
+início da linha seguinte, assim:
+
+.. code-block:: c
+
+ int function(int x)
+ {
+ body of function
+ }
+
+Pessoas heréticas por todo o mundo afirmaram que essa inconsistência é ...
+bem ... inconsistente, mas todas as pessoas de bom senso sabem que (a) K&R
+estão **corretos** e (b) K&R estão certos. Além disso, as funções são
+especiais de qualquer forma (você não pode aninhá-las em C).
+
+Observe que a chave de fechamento fica vazia em uma linha própria, **exceto**
+nos casos em que ela é seguida por uma continuação da mesma instrução, ou
+seja, um ``while`` em um do-statement ou um ``else`` em um if-statement, como
+neste exemplo:
+
+.. code-block:: c
+
+ do {
+ body of do-loop
+ } while (condition);
+
+e
+
+.. code-block:: c
+
+ if (x == y) {
+ ..
+ } else if (x > y) {
+ ...
+ } else {
+ ....
+ }
+
+Justificativa: K&R.
+
+Além disso, observe que esse posicionamento de chaves também minimiza o
+número de linhas vazias (ou quase vazias), sem qualquer perda de
+legibilidade. Assim, como o suprimento de linhas novas na sua tela não é um
+recurso renovável (pense em telas de terminal de 25 linhas), você tem mais
+linhas vazias para colocar comentários.
+
+Não use chaves desnecessariamente quando uma única instrução basta.
+
+.. code-block:: c
+
+ if (condition)
+ action();
+
+e
+
+.. code-block:: c
+
+ if (condition)
+ do_this();
+ else
+ do_that();
+
+Isso não se aplica se apenas um ramo de uma instrução condicional for uma
+única instrução; nesse último caso, use chaves em ambos os ramos:
+
+.. code-block:: c
+
+ if (condition) {
+ do_this();
+ do_that();
+ } else {
+ otherwise();
+ }
+
+Além disso, use chaves quando um laço contiver mais de uma instrução simples:
+
+.. code-block:: c
+
+ while (condition) {
+ if (test)
+ do_something();
+ }
+
+3.1) Espaços
+************
+
+O estilo do kernel Linux para o uso de espaços depende (em grande parte) do
+uso de função versus palavra-chave. Use um espaço após (a maioria das)
+palavras-chave. As exceções notáveis são ``sizeof``, ``typeof``, ``alignof`` e
+``__attribute__``, que parecem um pouco com funções (e geralmente são usadas
+com parênteses no Linux, embora não sejam obrigatórias na linguagem, como em:
+``sizeof info`` depois que ``struct fileinfo info;`` é declarado).
+
+Então use um espaço após estas palavras-chave::
+
+ if, switch, case, for, do, while
+
+mas não com ``sizeof``, ``typeof``, ``alignof`` ou ``__attribute__``. Por
+exemplo,
+
+.. code-block:: c
+
+
+ s = sizeof(struct file);
+
+Não adicione espaços ao redor (dentro) de expressões entre parênteses. Este
+exemplo é **ruim**:
+
+.. code-block:: c
+
+
+ s = sizeof( struct file );
+
+Ao declarar dados de ponteiro ou uma função que retorna um tipo de ponteiro, o
+uso preferido de ``*`` fica adjacente ao nome dos dados ou ao nome da função e
+não adjacente ao nome do tipo. Exemplos:
+
+.. code-block:: c
+
+
+ char *linux_banner;
+ unsigned long long memparse(char *ptr, char **retptr);
+ char *match_strdup(substring_t *s);
+
+Use um espaço em volta (de cada lado) da maioria dos operadores binários e
+ternários, como qualquer um destes::
+
+ = + - < > * / % | & ^ <= >= == != ? :
+
+mas sem espaço após operadores unários::
+
+ & * + - ~ ! sizeof typeof alignof __attribute__ defined
+
+sem espaço antes dos operadores unários pós-fixados de incremento e
+decremento::
+
+ ++ --
+
+sem espaço após os operadores unários prefixados de incremento e
+decremento::
+
+ ++ --
+
+e sem espaço ao redor dos operadores de membro de estrutura ``.`` e ``->``.
+
+Não deixe espaços em branco no final das linhas. Alguns editores com
+indentação ``inteligente`` inserem espaços no início das novas linhas conforme
+apropriado, para que você possa começar a digitar a próxima linha de código
+imediatamente. No entanto, alguns desses editores não removem o espaço em
+branco se você acabar não colocando uma linha de código ali, como quando deixa
+uma linha em branco. Como resultado, você termina com linhas contendo espaço
+em branco no final.
+
+O Git avisará você sobre patches que introduzem espaço em branco no final e
+pode remover esse espaço automaticamente para você; entretanto, se você
+aplicar uma série de patches, isso pode fazer com que patches posteriores da
+série falhem ao alterar suas linhas de contexto.
+
+
+4) Nomeação
+-----------
+
+C é uma linguagem espartana, e suas convenções de nomenclatura devem seguir o
+mesmo caminho. Ao contrário dos programadores em Modula-2 e Pascal, os
+programadores em C não usam nomes bonitinhos como ThisVariableIsATemporaryCounter.
+Um programador em C chamaria essa variável de ``tmp``, o que é muito mais fácil
+de escrever e não é menos fácil de entender.
+
+ENTRETANTO, embora nomes em camelCase sejam desencorajados, nomes descritivos
+para variáveis globais são essenciais. Chamar uma função global de ``foo`` é
+um crime.
+
+Variáveis GLOBAIS (a serem usadas somente se você **realmente** precisar) devem
+ter nomes descritivos, assim como as funções globais. Se você tiver uma função
+que conta o número de usuários ativos, você deve chamá-la de
+``count_active_users()`` ou algo parecido; você **não** deve chamá-la de
+``cntusr()``.
+
+Codificar o tipo de uma função no nome (a chamada notação Húngara) é absurdo -
+o compilador conhece os tipos de qualquer forma e pode verificar isso, e isso
+só confunde o programador.
+
+Nomes de variáveis locais devem ser curtos e diretos. Se você tiver algum
+contador inteiro aleatório de loop, provavelmente deve ser chamado de ``i``.
+Chamá-lo de ``loop_counter`` é improdutivo, se não houver chance de ser mal
+interpretado. Da mesma forma, ``tmp`` pode ser praticamente qualquer tipo de
+variável usada para manter um valor temporário.
+
+Se você tem medo de misturar os nomes de variáveis locais, você tem outro
+problema, chamado síndrome de desequilíbrio de hormônio de crescimento da
+função. Veja o capítulo 6 (Funções).
+
+Para nomes de símbolos e documentação, evite introduzir o uso novo de
+'master / slave' (ou 'slave' independente de 'master') e 'blacklist /
+whitelist'.
+
+Substituições recomendadas para 'master / slave' são:
+ '{primary,main} / {secondary,replica,subordinate}'
+ '{initiator,requester} / {target,responder}'
+ '{controller,host} / {device,worker,proxy}'
+ 'leader / follower'
+ 'director / performer'
+
+Substituições recomendadas para 'blacklist/whitelist' são:
+ 'denylist / allowlist'
+ 'blocklist / passlist'
+
+Exceções para introduzir novos usos são manter uma ABI/API do espaço do
+usuário, ou ao atualizar código para um hardware ou especificação de
+protocolo existente (a partir de 2020) que exija esses termos. Para novas
+especificações, traduza o uso da terminologia na especificação para o padrão
+de codificação do kernel quando possível.
+
+5) Tipos definidos (typedefs)
+-----------------------------
+
+Por favor, não use coisas como ``vps_t``.
+É um **erro** usar ``typedef`` para estruturas e ponteiros. Quando você vê
+
+.. code-block:: c
+
+
+ vps_t a;
+
+no código-fonte, o que isso significa?
+Em contraste, se diz
+
+.. code-block:: c
+
+ struct virtual_container *a;
+
+você consegue dizer o que ``a`` é.
+
+Muitas pessoas pensam que ``typedef``s ``ajudam na legibilidade``. Não é bem
+assim. Eles são úteis apenas para:
+
+ (a) objetos totalmente opacos (onde o ``typedef`` é usado ativamente para
+ **ocultar** o que o objeto é).
+
+ Exemplo: ``pte_t`` etc. Objetos opacos que você só pode acessar usando
+ as funções de acesso apropriadas.
+
+ .. note::
+
+ Opacidade e ``funções de acesso`` não são boas em si mesmas.
+ A razão pela qual as temos para coisas como ``pte_t`` etc. é que
+ realmente existe absolutamente **zero** informação acessível de forma portátil
+ ali.
+
+ (b) tipos inteiros claros, em que a abstração **ajuda** a evitar confusão
+ sobre se é ``int`` ou ``long``.
+
+ ``u8/u16/u32`` são typedefs perfeitamente aceitáveis, embora se
+ encaixem melhor na categoria (d) do que aqui.
+
+ .. note::
+
+ Novamente - precisa haver uma **razão** para isso. Se algo é
+ ``unsigned long``, não há motivo para fazer
+
+ typedef unsigned long myflags_t;
+
+ mas se houver uma razão clara para que em certas circunstâncias possa
+ ser ``unsigned int`` e em outras configurações possa ser ``unsigned
+ long``, então, claro, use um ``typedef``.
+
+ (c) quando você usa ``sparse`` para criar literalmente um **novo** tipo para
+ verificação de tipos.
+
+ (d) novos tipos idênticos aos tipos padrão do C99, em certas
+ circunstâncias excepcionais.
+
+ Embora levasse apenas um curto período para os olhos e o cérebro se
+ acostumarem aos tipos padrão como ``uint32_t``, algumas pessoas ainda
+ se opõem ao seu uso.
+
+ Portanto, os tipos específicos do Linux ``u8/u16/u32/u64`` e seus
+ equivalentes assinados, que são idênticos aos tipos padrão, são
+ permitidos -- embora não sejam obrigatórios em código novo seu.
+
+ Ao editar código existente que já usa um ou outro conjunto de tipos, você
+ deve seguir as escolhas existentes nesse código.
+
+ (e) tipos seguros para uso em espaço do usuário.
+
+ Em certas estruturas visíveis ao espaço do usuário, não podemos exigir
+ tipos C99 nem usar a forma ``u32`` acima. Portanto, usamos ``__u32`` e
+ tipos semelhantes em todas as estruturas compartilhadas com o espaço do
+ usuário.
+
+Pode haver outros casos também, mas a regra básica deve ser: NUNCA use um
+``typedef`` a menos que você consiga encaixar claramente em uma dessas regras.
+
+Em geral, um ponteiro, ou uma estrutura com elementos que podem ser acessados
+diretamente, **nunca** deve ser um ``typedef``.
+
+
+6) Funções
+----------
+
+As funções devem ser curtas e diretas, e fazer apenas uma coisa. Elas devem
+caber em uma ou duas telas de texto (o tamanho de tela ISO/ANSI é 80x24,
+como todos sabem), e fazer uma coisa e fazê-la bem.
+
+O comprimento máximo de uma função é inversamente proporcional à complexidade
+e ao nível de indentação dessa função. Então, se você tiver uma função
+conceitualmente simples que seja apenas uma longa (mas simples) instrução
+``switch``, em que você precisa fazer várias pequenas coisas para muitos casos
+diferentes, é aceitável ter uma função mais longa.
+
+No entanto, se você tiver uma função complexa e suspeitar que um estudante
+do primeiro ano do ensino médio, menos talentoso, talvez nem entenda do que
+se trata a função, você deve obedecer aos limites máximos ainda mais de
+perto. Use funções auxiliares com nomes descritivos (você pode pedir ao
+compilador para incorporá-las em linha se achar que é crítico para o
+desempenho, e provavelmente ele fará um trabalho melhor do que você faria).
+
+Outra medida da função é o número de variáveis locais. Elas não devem exceder
+5-10, ou algo está errado. Reflita sobre a função e divida em partes menores.
+Um cérebro humano geralmente consegue rastrear facilmente cerca de 7 coisas
+diferentes; qualquer quantidade acima disso o confunde. Você sabe que é
+brilhante, mas talvez queira entender o que fez daqui a 2 semanas.
+
+Nos arquivos de código-fonte, separe as funções com uma linha em branco. Se a
+função for exportada, a macro **EXPORT** para ela deve seguir imediatamente
+depois da linha da chave de fechamento da função. Por exemplo:
+
+.. code-block:: c
+
+ int system_is_up(void)
+ {
+ return system_state == SYSTEM_RUNNING;
+ }
+ EXPORT_SYMBOL(system_is_up);
+
+6.1) Protótipos de função
+*************************
+
+Nos protótipos de função, inclua nomes de parâmetros junto com seus tipos de
+dados. Embora isso não seja obrigatório pela linguagem C, é preferido no Linux
+porque é uma maneira simples de adicionar informações valiosas para o leitor.
+
+Não use a palavra-chave ``extern`` em declarações de função, pois isso torna
+as linhas mais longas e não é estritamente necessário.
+
+Ao escrever protótipos de função, por favor mantenha a `ordem dos elementos
+regular <https://lore.kernel.org/mm-commits/CAHk-=wiOCLRny5aifWNhr621kYrJwhfURsa0vFPeUEm8mF0ufg@mail.gmail.com/>`_.
+Por exemplo, usando este exemplo de declaração de função::
+
+ __init void * __must_check action(enum magic value, size_t size, u8 count,
+ char *fmt, ...) __printf(4, 5) __malloc;
+
+A ordem preferida dos elementos para um protótipo de função é:
+
+- classe de armazenamento (abaixo, ``static __always_inline``, observando que
+ ``__always_inline`` é tecnicamente um atributo, mas é tratado como ``inline``)
+- atributos de classe de armazenamento (aqui, ``__init`` -- ou seja,
+ declarações de seção, mas também coisas como ``__cold``)
+- tipo de retorno (aqui, ``void *``)
+- atributos do tipo de retorno (aqui, ``__must_check``)
+- nome da função (aqui, ``action``)
+- parâmetros da função (aqui, ``(enum magic value, size_t size, u8 count,
+ char *fmt, ...)``, observando que os nomes dos parâmetros devem sempre ser
+ incluídos)
+- atributos dos parâmetros da função (aqui, ``__printf(4, 5)``)
+- atributos de comportamento da função (aqui, ``__malloc``)
+
+Observe que, para uma **definição** de função (ou seja, o corpo real da
+função), o compilador não permite atributos de parâmetro da função depois dos
+parâmetros da função. Nesses casos, eles devem vir depois dos atributos da
+classe de armazenamento (por exemplo, observe a posição alterada de
+``__printf(4, 5)`` abaixo, em comparação com o exemplo de **declaração**
+acima)::
+
+ static __always_inline __init __printf(4, 5) void * __must_check action(enum magic value,
+ size_t size, u8 count, char *fmt, ...) __malloc
+ {
+ ...
+ }
+
+7) Saída centralizada de funções
+--------------------------------
+
+Embora seja depreciado por algumas pessoas, o equivalente da instrução
+``goto`` é usado com frequência pelos compiladores na forma da instrução de
+salto incondicional.
+
+A instrução ``goto`` é útil quando uma função sai de vários pontos e é
+necessária alguma tarefa comum, como limpeza. Se não for necessária nenhuma
+limpeza, basta retornar diretamente.
+
+Escolha nomes de rótulos que indiquem o que o ``goto`` faz ou por que ele
+existe. Um exemplo de nome bom poderia ser ``out_free_buffer:`` se o goto
+liberar ``buffer``. Evite usar nomes do GW-BASIC como ``err1:`` e ``err2:``,
+porque você teria que renumerá-los se adicionasse ou removesse caminhos de
+saída, e isso também torna a correção mais difícil de verificar.
+
+A justificativa para usar gotos é:
+
+- instruções incondicionais são mais fáceis de entender e seguir
+- o aninhamento é reduzido
+- erros por não atualizar pontos de saída individuais ao fazer
+ modificações são evitados
+- economiza o trabalho do compilador de otimizar e remover código redundante ;)
+
+.. code-block:: c
+
+ int fun(int a)
+ {
+ int result = 0;
+ char *buffer;
+
+ buffer = kmalloc(SIZE, GFP_KERNEL);
+ if (!buffer)
+ return -ENOMEM;
+
+ if (condition1) {
+ while (loop1) {
+ ...
+ }
+ result = 1;
+ goto out_free_buffer;
+ }
+ ...
+ out_free_buffer:
+ kfree(buffer);
+ return result;
+ }
+
+Um tipo comum de bug do qual você deve estar ciente é o ``one err bugs``
+(o "bug de um erro"), que se parece com isto:
+
+.. code-block:: c
+
+ err:
+ kfree(foo->bar);
+ kfree(foo);
+ return ret;
+
+O problema neste código é que, em alguns caminhos de saída, ``foo`` é NULL.
+Normalmente, a correção é dividir em dois rótulos de erro
+``err_free_bar:`` e ``err_free_foo:``:
+
+.. code-block:: c
+
+ err_free_bar:
+ kfree(foo->bar);
+ err_free_foo:
+ kfree(foo);
+ return ret;
+
+Idealmente, você deve simular erros para testar todos os caminhos de saída.
+
+
+8) Comentários
+--------------
+
+Comentários são bons, mas também há o perigo de comentar demais. NUNCA tente
+explicar COMO o seu código funciona em um comentário: é muito melhor escrever
+o código de forma que o **funcionamento** seja óbvio, e é um desperdício de
+tempo explicar código mal escrito.
+
+Em geral, você quer que seus comentários digam O QUE o seu código faz, não
+COMO. Também tente evitar colocar comentários dentro do corpo de uma função:
+se a função for tão complexa que você precisa comentar partes separadas dela,
+provavelmente você deveria voltar ao capítulo 6 por um tempo. Você pode fazer
+pequenos comentários para notar ou avisar sobre algo particularmente esperto
+(ou feio), mas tente evitar excesso. Em vez disso, coloque os comentários no
+início da função, dizendo às pessoas o que ela faz e, possivelmente, POR QUE
+ela faz isso.
+
+Ao comentar as funções da API do kernel, por favor use o formato kernel-doc.
+Veja os arquivos em :ref:`Documentation/doc-guide/ <doc_guide>` e
+``tools/docs/kernel-doc`` para detalhes. Observe que o perigo de comentar em
+excesso se aplica aos comentários kernel-doc da mesma forma. Não adicione
+kernel-doc genérico que apenas repete o que já é óbvio pela assinatura da
+função.
+
+O estilo preferido para comentários longos (em várias linhas) é:
+
+.. code-block:: c
+
+ /*
+ * Este é o estilo preferido para comentários em várias linhas
+ * no código-fonte do kernel Linux.
+ * Por favor, use-o de forma consistente.
+ *
+ * Descrição: uma coluna de asteriscos à esquerda,
+ * com linhas de início e fim quase vazias.
+ */
+
+Também é importante comentar dados, sejam tipos básicos ou tipos derivados.
+Para isso, use apenas uma declaração de dado por linha (sem vírgulas para
+múltiplas declarações de dados). Isso deixa espaço para um pequeno comentário
+em cada item explicando seu uso.
+
+
+9) Você fez uma bagunça
+-----------------------
+
+Tudo bem, todos fazemos isso. Você provavelmente foi informado por seu
+auxiliar de longa data em Unix que o ``GNU emacs`` formata automaticamente os
+arquivos-fonte em C para você, e você percebeu que ele realmente faz isso, mas as
+configurações padrão que ele usa são menos do que desejáveis (na verdade,
+elas são piores do que digitação aleatória - um número infinito de macacos
+digitando no GNU emacs nunca faria um bom programa).
+
+Então, você pode ou se livrar do GNU emacs, ou mudar para usar valores mais
+sãos. Para fazer isso, você pode colocar o seguinte no seu arquivo .emacs:
+
+.. code-block:: elisp
+
+ (defun c-lineup-arglist-tabs-only (ignored)
+ "Line up argument lists by tabs, not spaces"
+ (let* ((anchor (c-langelem-pos c-syntactic-element))
+ (column (c-langelem-2nd-pos c-syntactic-element))
+ (offset (- (1+ column) anchor))
+ (steps (floor offset c-basic-offset)))
+ (* (max steps 1)
+ c-basic-offset)))
+
+ (dir-locals-set-class-variables
+ 'linux-kernel
+ '((c-mode . (
+ (c-basic-offset . 8)
+ (c-label-minimum-indentation . 0)
+ (c-offsets-alist . (
+ (arglist-close . c-lineup-arglist-tabs-only)
+ (arglist-cont-nonempty .
+ (c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
+ (arglist-intro . +)
+ (brace-list-intro . +)
+ (c . c-lineup-C-comments)
+ (case-label . 0)
+ (comment-intro . c-lineup-comment)
+ (cpp-define-intro . +)
+ (cpp-macro . -1000)
+ (cpp-macro-cont . +)
+ (defun-block-intro . +)
+ (else-clause . 0)
+ (func-decl-cont . +)
+ (inclass . +)
+ (inher-cont . c-lineup-multi-inher)
+ (knr-argdecl-intro . 0)
+ (label . -1000)
+ (statement . 0)
+ (statement-block-intro . +)
+ (statement-case-intro . +)
+ (statement-cont . +)
+ (substatement . +)
+ ))
+ (indent-tabs-mode . t)
+ (show-trailing-whitespace . t)
+ ))))
+
+ (dir-locals-set-directory-class
+ (expand-file-name "~/src/linux-trees")
+ 'linux-kernel)
+
+Isso fará o emacs funcionar melhor com o estilo de codificação do kernel para
+arquivos C abaixo de ``~/src/linux-trees``.
+
+Mas, mesmo que você falhe em fazer o emacs formatar de maneira sensata, nem
+tudo está perdido: use ``indent``.
+
+Agora, novamente, o GNU indent tem as mesmas configurações sem cérebro do GNU
+emacs, e é por isso que você precisa dar a ele algumas opções de linha de
+comando. No entanto, isso não é tão ruim, porque até os criadores do GNU
+indent reconhecem a autoridade do K&R (as pessoas do GNU não são más, apenas
+estão gravemente equivocadas nessa questão), então você apenas dá ao indent as
+opções ``-kr -i8`` (que significa ``K&R, indentações de 8 caracteres``), ou
+usa ``scripts/Lindent``, que indenta no estilo mais recente.
+
+``indent`` tem muitas opções, e especialmente quando se trata de reformatação
+de comentários, você pode querer dar uma olhada na página de manual. Mas
+lembre-se: ``indent`` não é uma solução para programação ruim.
+
+Observe que você também pode usar a ferramenta ``clang-format`` para ajudá-lo
+com essas regras, para reformatar rapidamente partes do seu código
+automaticamente e revisar arquivos completos para detectar erros de estilo de
+codificação, erros de digitação e possíveis melhorias. Também é útil para
+ordenar ``#includes``, alinhar variáveis/macros, reorganizar texto e outras
+tarefas semelhantes. Consulte o arquivo
+:ref:`Documentation/dev-tools/clang-format.rst <clangformat>`
+para obter mais detalhes.
+
+Algumas configurações básicas do editor, como indentação e finais de linha,
+serão definidas automaticamente se você estiver usando um editor compatível com
+o EditorConfig. Consulte o site oficial do EditorConfig para obter mais
+informação: https://editorconfig.org/
+
+10) Arquivos de configuração Kconfig
+------------------------------------
+
+Para todos os arquivos de configuração Kconfig* em toda a árvore de origem,
+a indentação é um pouco diferente. Linhas sob uma definição ``config`` são
+indentadas com uma tabulação, enquanto o texto de ajuda é indentado com mais
+dois espaços. Exemplo::
+
+ config AUDIT
+ bool "Auditing support"
+ depends on NET
+ help
+ Enable auditing infrastructure that can be used with another
+ kernel subsystem, such as SELinux (which requires this for
+ logging of avc messages output). Does not do system-call
+ auditing without CONFIG_AUDITSYSCALL.
+
+Recursos seriamente perigosos (como suporte de gravação para certos sistemas
+de arquivos) devem anunciar isso de forma proeminente na string do prompt::
+
+ config ADFS_FS_RW
+ bool "ADFS write support (DANGEROUS)"
+ depends on ADFS_FS
+ ...
+
+Para documentação completa sobre os arquivos de configuração, consulte o
+arquivo Documentation/kbuild/kconfig-language.rst.
+
+
+11) Estruturas de dados
+-----------------------
+
+Estruturas de dados que tenham visibilidade fora do ambiente monothread em que
+são criadas e destruídas devem ter contadores de referência. No kernel, coleta
+de lixo não existe (e fora do kernel, a coleta de lixo é lenta e
+ineficiente), o que significa que você absolutamente **precisa** contar todas
+as referências de uso.
+
+Contagem de referência significa que você pode evitar bloqueios e permite que
+múltiplos usuários tenham acesso à estrutura de dados em paralelo - sem se
+preocupar com a estrutura desaparecendo debaixo deles do nada apenas porque
+eles dormiram ou fizeram outra coisa por um tempo.
+
+Observe que bloqueio **não** substitui contagem de referência. O bloqueio é
+usado para manter estruturas de dados coerentes, enquanto a contagem de
+referência é uma técnica de gerenciamento de memória. Normalmente, ambos são
+necessários, e não devem ser confundidos entre si.
+
+Muitas estruturas de dados podem, de fato, ter dois níveis de contagem de
+referência, quando existem usuários de diferentes ``classes``. A contagem da
+subclasse conta o número de usuários da subclasse e decrementa a contagem
+global apenas uma vez quando a contagem da subclasse chega a zero.
+
+Exemplos desse tipo de ``multi-level-reference-counting`` podem ser encontrados
+em gerenciamento de memória (``struct mm_struct``: mm_users e mm_count) e em
+código de sistema de arquivos (``struct super_block``: s_count e s_active).
+
+Lembre-se: se outra thread puder encontrar sua estrutura de dados, e você não
+tiver contagem de referência nela, quase certamente há um bug.
+
+
+12) Macros, enums e RTL
+-----------------------
+
+Nomes de macros que definem constantes e rótulos em enums são maiúsculos.
+
+.. code-block:: c
+
+ #define CONSTANT 0x12345
+
+Enums são preferidos quando várias constantes relacionadas são definidas.
+
+Nomes de macro em maiúsculas são apreciados, mas macros que se parecem com
+funções podem ser nomeadas em minúsculas.
+
+Em geral, funções inline são preferíveis a macros que se parecem com funções.
+
+Macros com múltiplas instruções devem ser envoltas em um bloco do-while:
+
+.. code-block:: c
+
+ #define macrofun(a, b, c) \
+ do { \
+ if (a == 5) \
+ do_this(b, c); \
+ } while (0)
+
+Macros do tipo função com parâmetros não usados devem ser substituídas por
+funções estáticas inline para evitar o problema de variáveis não usadas:
+
+.. code-block:: c
+
+ static inline void fun(struct foo *foo)
+ {
+ }
+
+Devido a práticas históricas, muitos arquivos ainda empregam a abordagem
+"cast para (void)" para avaliar parâmetros. No entanto, esse método não é
+aconselhável.
+Funções inline resolvem o problema de "expressão com efeitos colaterais
+avaliada mais de uma vez", contornam problemas de variáveis não usadas e, por
+algum motivo, geralmente são mais bem documentadas do que macros.
+
+.. code-block:: c
+
+ /*
+ * Evite fazer isto sempre que possível e prefira funções estáticas
+ * inline
+ */
+ #define macrofun(foo) do { (void) (foo); } while (0)
+
+Coisas a evitar ao usar macros:
+
+1) macros que afetam o fluxo de controle:
+
+.. code-block:: c
+
+ #define FOO(x) \
+ do { \
+ if (blah(x) < 0) \
+ return -EBUGGERED; \
+ } while (0)
+
+é uma ideia **muito** ruim. Ela parece uma chamada de função, mas sai da
+função ``calling``; não quebre os parsers internos de quem lerá o código.
+
+2) macros que dependem de ter uma variável local com um nome mágico:
+
+.. code-block:: c
+
+ #define FOO(val) bar(index, val)
+
+pode parecer uma boa coisa, mas é confuso pra caramba para quem lê o código e
+é propenso a quebrar com mudanças aparentemente inocentes.
+
+3) macros com argumentos usados como l-values: FOO(x) = y; vai te morder se
+alguém, por exemplo, transformar FOO em uma função inline.
+
+4) esquecer da precedência: macros que definem constantes usando expressões
+devem colocar a expressão entre parênteses. Cuidado com problemas semelhantes
+com macros que usam parâmetros.
+
+.. code-block:: c
+
+ #define CONSTANT 0x4000
+ #define CONSTEXP (CONSTANT | 3)
+
+5) colisões de namespace ao definir variáveis locais em macros que se
+parecem com funções:
+
+.. code-block:: c
+
+ #define FOO(x) \
+ ({ \
+ typeof(x) ret; \
+ ret = calc_ret(x); \
+ (ret); \
+ })
+
+``ret`` é um nome comum para uma variável local - ``__foo_ret`` tem menos
+chance de colidir com uma variável existente.
+
+O manual do cpp trata de macros de forma exaustiva. O manual interno do gcc
+também cobre o RTL, que é usado frequentemente com linguagem de montagem no
+kernel.
+
+
+13) Imprimindo mensagens do kernel
+----------------------------------
+
+Desenvolvedores do kernel gostam de ser vistos como letrados. Preste atenção à
+ortografia das mensagens do kernel para causar uma boa impressão. Não use
+contrações incorretas como ``dont``; use ``do not`` ou ``don't`` em vez
+disso. Faça as mensagens concisas, claras e inequívocas.
+
+Mensagens do kernel não precisam terminar com ponto.
+
+Imprimir números entre parênteses (%d) não agrega valor e deve ser evitado.
+
+Há vários macros de diagnóstico do modelo de driver em <linux/dev_printk.h>
+que você deve usar para garantir que as mensagens sejam correspondidas ao
+dispositivo e driver corretos e sejam marcadas com o nível certo: ``dev_err()``,
+``dev_warn()``, ``dev_info()`` e assim por diante. Para mensagens que não
+estão associadas a um device específico, <linux/printk.h> define
+``pr_notice()``, ``pr_info()``, ``pr_warn()``, ``pr_err()`` etc. Quando os
+drivers funcionam corretamente, eles ficam silenciosos, então prefira usar
+``dev_dbg``/``pr_debug`` a menos que algo esteja errado.
+
+Encontrar boas mensagens de depuração pode ser um desafio; e, uma vez que
+você tenha essas mensagens, elas podem ajudar bastante para solução de
+problemas remota. No entanto, a impressão de mensagens de depuração é tratada
+diferentemente da impressão de outras mensagens não de depuração. Enquanto as
+outras funções ``pr_XXX()`` imprimem incondicionalmente, ``pr_debug()`` não;
+ela é compilada fora por padrão, a menos que ``DEBUG`` seja definido ou
+``CONFIG_DYNAMIC_DEBUG`` esteja configurado. Isso também vale para
+``dev_dbg()``, e uma convenção relacionada usa ``VERBOSE_DEBUG`` para adicionar
+mensagens ``dev_vdbg()`` às já habilitadas por ``DEBUG``.
+
+Muitos subsistemas têm opções de depuração do Kconfig para ativar ``-DDEBUG``
+no Makefile correspondente; em outros casos, arquivos específicos fazem
+``#define DEBUG``. E quando uma mensagem de depuração deve ser impressa
+incondicionalmente, por exemplo, se ela já estiver dentro de uma seção
+``#ifdef`` relacionada à depuração, pode-se usar ``printk(KERN_DEBUG ...)``.
+
+
+14) Alocando memória
+--------------------
+
+O kernel fornece os seguintes alocadores de memória de uso geral:
+``kmalloc()``, ``kzalloc()``, ``kmalloc_objs()``, ``kzalloc_objs()``,
+``vmalloc()`` e ``vzalloc()``. Consulte a documentação da API para obter mais
+informações sobre eles. :ref:`Documentation/core-api/memory-allocation.rst
+<memory_allocation>`
+
+A forma preferida de passar o tamanho de uma estrutura é a seguinte:
+
+.. code-block:: c
+
+ p = kmalloc_obj(*p, ...);
+
+A forma alternativa em que o nome da estrutura é escrito explicitamente piora a
+legibilidade e cria oportunidade para um bug quando o tipo da variável ponteiro
+é alterado, mas o ``sizeof`` correspondente passado para um alocador de memória
+não é.
+
+Casting do valor de retorno, que é um ponteiro ``void``, é redundante. A
+conversão de ponteiro ``void`` para qualquer outro tipo de ponteiro é garantida
+pela linguagem de programação C.
+
+A forma preferida para alocar um array é a seguinte:
+
+.. code-block:: c
+
+ p = kmalloc_objs(*p, n, ...);
+
+A forma preferida para alocar um array zerado é a seguinte:
+
+.. code-block:: c
+
+ p = kzalloc_objs(*p, n, ...);
+
+As duas formas verificam estouro no tamanho de alocação ``n * sizeof(...)`` e
+retornam ``NULL`` se isso ocorrer.
+
+Essas funções genéricas de alocação emitem um dump de pilha em caso de falha
+quando usadas sem ``__GFP_NOWARN``, então não há utilidade em emitir uma
+mensagem de falha adicional quando ``NULL`` é retornado.
+
+15) A doença do inline
+----------------------
+
+Parece haver uma percepção errônea comum de que o gcc tem uma opção mágica de
+aceleração chamada ``inline``. Embora o uso de ``inline`` possa ser apropriado
+(por exemplo, como uma forma de substituir macros; veja o Capítulo 12), muitas
+vezes não é. O uso abundante da palavra-chave ``inline`` leva a um kernel
+muito maior, o que, por sua vez, torna o sistema mais lento como um todo, por
+causa de uma maior ocupação de i-cache para a CPU e simplesmente porque há menos
+memória disponível para o ``pagecache``. Pense nisso: uma falha no pagecache
+causa um seek no disco, que facilmente leva 5 milissegundos. Há MUITOS ciclos
+de CPU que podem entrar nesses 5 milissegundos.
+
+Uma regra prática razoável é não colocar ``inline`` em funções com mais de 3
+linhas de código. Uma exceção a essa regra são os casos em que um parâmetro é
+conhecido como uma constante em tempo de compilação, e como resultado dessa
+constância você *sabe* que o compilador será capaz de otimizar grande parte da
+sua função em tempo de compilação. Para um bom exemplo desse caso posterior,
+veja a função inline ``kmalloc()``.
+
+Muitas pessoas argumentam que adicionar ``inline`` a funções ``static`` usadas
+apenas uma vez é sempre uma vantagem, porque não há custo de espaço. Embora
+isso seja tecnicamente correto, o gcc é capaz de fazer esse inline
+automaticamente sem ajuda, e a questão de manutenção de remover o ``inline``
+quando um segundo usuário aparece supera o valor potencial da dica que diz ao
+gcc para fazer algo que ele faria de qualquer forma.
+
+
+16) Valores e nomes de retorno de função
+----------------------------------------
+
+Funções podem retornar valores de vários tipos, e um dos mais comuns é um valor
+que indica se a função teve sucesso ou falhou. Esse valor pode ser representado
+como um inteiro de código de erro (-Exxx = falha, 0 = sucesso) ou como um
+booleano ``succeeded`` (0 = falha, diferente de zero = sucesso).
+
+Misturar esses dois tipos de representação é uma fonte fértil de bugs difíceis
+de encontrar. Se a linguagem C incluísse uma distinção forte entre inteiros e
+booleanos, o compilador encontraria esses erros para nós... mas não inclui. Para
+ajudar a evitar esses bugs, siga sempre esta convenção::
+
+ Se o nome de uma função for uma ação ou um comando imperativo,
+ a função deve retornar um inteiro de código de erro. Se o nome
+ for um predicado, a função deve retornar um booleano de "sucesso".
+
+Por exemplo, ``add work`` é um comando, e a função ``add_work()`` retorna 0
+para sucesso ou -EBUSY para falha. Da mesma forma, ``PCI device present`` é um
+predicado, e a função ``pci_dev_present()`` retorna 1 se encontrar um device
+correspondente ou 0 se não encontrar.
+
+Todas as funções ``EXPORT`` devem respeitar esta convenção, e assim também
+devem todas as funções públicas. Funções privadas (``static``) não precisam,
+mas é recomendável que o façam.
+
+Funções cujo valor de retorno é o resultado real de um cálculo, em vez de uma
+indicação de se o cálculo teve sucesso, não estão sujeitas a essa regra.
+Normalmente, elas indicam falha retornando algum resultado fora do intervalo.
+Exemplos típicos seriam funções que retornam ponteiros; elas usam ``NULL`` ou o
+mecanismo ``ERR_PTR`` para informar falha.
+
+
+17) Usando bool
+---------------
+
+O tipo ``bool`` do kernel Linux é um alias do tipo C99 ``_Bool``. Valores
+``bool`` só podem avaliar para 0 ou 1, e conversão implícita ou explícita para
+``bool`` converte automaticamente o valor para verdadeiro ou falso. Ao usar
+tipos ``bool``, a construção ``!!`` não é necessária, o que elimina uma classe
+de bugs.
+
+Ao trabalhar com valores ``bool``, as definições ``true`` e ``false`` devem ser
+usadas em vez de 1 e 0.
+
+Tipos de retorno de função ``bool`` e variáveis locais na pilha são sempre
+válidos quando apropriados. O uso de ``bool`` é encorajado para melhorar a
+legibilidade e muitas vezes é uma opção melhor do que ``int`` para armazenar
+valores booleanos.
+
+Não use ``bool`` se o layout da linha de cache ou o tamanho do valor importar,
+porque seu tamanho e alinhamento variam conforme a arquitetura compilada.
+Estruturas otimizadas para alinhamento e tamanho não devem usar ``bool``.
+
+Se uma estrutura tiver muitos valores verdadeiro/falso, considere consolidá-los
+em um ``bitfield`` com membros de 1 bit, ou usar um tipo de largura fixa
+apropriado, como ``u8``.
+
+Da mesma forma, para argumentos de função, muitos valores verdadeiro/falso podem
+ser consolidados em um único argumento de sinalizadores bit a bit, e
+``flags`` muitas vezes pode ser uma alternativa mais legível se os pontos de
+chamada tiverem constantes verdadeiras/falsas "nuas".
+
+Caso contrário, o uso limitado de ``bool`` em estruturas e argumentos pode
+melhorar a legibilidade.
+
+18) Não reinventando as macros do kernel
+----------------------------------------
+
+Existem muitos arquivos de cabeçalho em ``include/linux/`` que contêm várias
+macros que você deve usar em vez de escrever explicitamente alguma variante
+delas. Por exemplo, se você precisa calcular o comprimento de um array, aproveite
+a macro
+
+.. code-block:: c
+
+ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+que é definida em ``array_size.h``.
+
+Da mesma forma, se você precisar calcular o tamanho de um membro de alguma
+estrutura, use
+
+.. code-block:: c
+
+ #define sizeof_field(t, f) (sizeof(((t*)0)->f))
+
+que é definida em ``stddef.h``.
+
+Também existem macros ``min()`` e ``max()`` definidas em ``minmax.h`` que fazem
+verificação estrita de tipos se você precisar delas. Sinta-se à vontade para
+explorar os arquivos de cabeçalho para ver o que já está definido e não deve
+ser reproduzido no seu código.
+
+
+19) Modelines do editor e outros restos
+---------------------------------------
+
+Alguns editores podem interpretar informações de configuração embutidas em
+arquivos de origem, indicadas por marcadores especiais. Por exemplo, o emacs
+interpreta linhas marcadas assim:
+
+.. code-block:: c
+
+ -*- mode: c -*-
+
+Ou assim:
+
+.. code-block:: c
+
+ /*
+ Local Variables:
+ compile-command: "gcc -DMAGIC_DEBUG_FLAG foo.c"
+ End:
+ */
+
+O Vim interpreta marcadores que parecem com isto:
+
+.. code-block:: c
+
+ /* vim:set sw=8 noet */
+
+Não inclua nenhum desses em arquivos de origem. As pessoas têm suas próprias
+configurações pessoais de editor, e seus arquivos de origem não devem
+substituí-las. Isso inclui marcadores para indentação e configuração de modo.
+As pessoas podem usar seu próprio modo personalizado, ou podem ter algum outro
+método mágico para fazer a indentação funcionar corretamente.
+
+
+20) Montagem inline
+-------------------
+
+Em código específico de arquitetura, pode ser necessário usar montagem inline
+para interagir com a funcionalidade da CPU ou da plataforma. Não hesite em
+fazê-lo quando necessário. No entanto, não use montagem inline de forma
+gratuita quando o C puder fazer o trabalho. Você pode e deve mexer em hardware
+em C quando possível.
+
+Considere escrever funções auxiliares simples que encapsulem partes comuns de
+montagem inline, em vez de escrevê-las repetidamente com pequenas variações.
+Lembre-se de que a montagem inline pode usar parâmetros C.
+
+Funções grandes e não triviais de montagem devem ir para arquivos ``.S``, com
+protótipos C correspondentes definidos em arquivos de cabeçalho C. Os
+protótipos C para funções de montagem devem usar ``asmlinkage``.
+
+Você pode precisar marcar sua instrução ``asm`` como ``volatile`` para impedir
+que o GCC a remova se o GCC não perceber efeitos colaterais. No entanto, você
+nem sempre precisa fazer isso, e fazê-lo desnecessariamente pode limitar a
+otimização.
+
+Ao escrever uma única instrução de montagem inline contendo várias instruções,
+coloque cada instrução em uma linha separada em uma string separada e termine
+cada string, exceto a última, com ``\n\t`` para indentar corretamente a
+próxima instrução na saída de montagem:
+
+.. code-block:: c
+
+ asm ("magic %reg1, #42\n\t"
+ "more_magic %reg2, %reg3"
+ : /* outputs */ : /* inputs */ : /* clobbers */);
+
+
+21) Compilação condicional
+--------------------------
+
+Sempre que possível, não use condicionais do pré-processador (#if, #ifdef) em
+arquivos ``.c``; isso torna o código mais difícil de ler e a lógica mais difícil
+de seguir. Em vez disso, use esses condicionais em um arquivo de cabeçalho que
+defina funções para uso nesses arquivos ``.c``, fornecendo versões de stub sem
+efeito no caso ``#else``, e então chame essas funções incondicionalmente nos
+arquivos ``.c``. O compilador evitará gerar qualquer código para as chamadas de
+stub, produzindo resultados idênticos, mas a lógica permanecerá fácil de
+seguir.
+
+Prefira compilar funções inteiras fora do código, em vez de partes de funções
+ou partes de expressões. Em vez de colocar um ``ifdef`` em uma expressão,
+extraia parte ou toda a expressão para uma função auxiliar separada e aplique a
+condicional a essa função.
+
+Se você tiver uma função ou variável que pode potencialmente ficar sem uso em
+uma configuração específica, e o compilador avisaria sobre a definição ficar sem
+uso, marque a definição como ``__maybe_unused`` em vez de envolvê-la em uma
+condicional do pré-processador. (No entanto, se uma função ou variável
+*sempre* ficar sem uso, elimine-a.)
+
+Dentro do código, quando possível, use a macro ``IS_ENABLED`` para converter um
+símbolo Kconfig em uma expressão booleana C e usá-la em uma condicional C
+normal:
+
+.. code-block:: c
+
+ if (IS_ENABLED(CONFIG_SOMETHING)) {
+ ...
+ }
+
+O compilador reduzirá a condicional a um valor constante e incluirá ou
+excluirá o bloco de código assim como com um ``#ifdef``, então isso não
+adicionará nenhum custo de runtime. No entanto, essa abordagem ainda permite
+que o compilador C veja o código dentro do bloco e verifique sua correção
+(sintaxe, tipos, referências de símbolo etc.). Portanto, você ainda precisa usar
+um ``#ifdef`` se o código dentro do bloco referenciar símbolos que não existirão
+se a condição não for atendida.
+
+No final de qualquer bloco ``#if`` ou ``#ifdef`` não trivial (mais de algumas
+linhas), coloque um comentário após o ``#endif`` na mesma linha, indicando a
+expressão condicional usada. Por exemplo:
+
+.. code-block:: c
+
+ #ifdef CONFIG_SOMETHING
+ ...
+ #endif /* CONFIG_SOMETHING */
+
+
+22) Não derrube o kernel
+------------------------
+
+Em geral, a decisão de derrubar o kernel pertence ao usuário, e não ao
+desenvolvedor do kernel.
+
+Evite ``panic()``
+*****************
+
+``panic()`` deve ser usado com cuidado e principalmente apenas durante a inicialização
+do sistema. ``panic()`` é, por exemplo, aceitável ao ficar sem memória durante
+a inicialização e não ser possível continuar.
+
+Use ``WARN()`` em vez de ``BUG()``
+**********************************
+
+Não adicione novo código que use nenhuma das variantes de ``BUG()``, como
+``BUG()``, ``BUG_ON()`` ou ``VM_BUG_ON()``. Em vez disso, use uma variante de
+``WARN*()``, preferencialmente ``WARN_ON_ONCE()``, e possivelmente com código de
+recuperação. O código de recuperação não é obrigatório se não houver uma
+maneira razoável de pelo menos recuperar parcialmente.
+
+"Sou preguiçoso para tratar erros" não é uma desculpa para usar ``BUG()``.
+Corrupções internas graves sem como continuar ainda podem usar ``BUG()``, mas
+precisam de uma boa justificativa.
+
+Use ``WARN_ON_ONCE()`` em vez de ``WARN()`` ou ``WARN_ON()``
+************************************************************
+
+``WARN_ON_ONCE()`` geralmente é preferido em relação a ``WARN()`` ou
+``WARN_ON()``, porque é comum que uma dada condição de aviso, se ocorrer,
+ocorra várias vezes. Isso pode encher e sobrescrever o log do kernel e até
+diminuir o sistema o suficiente para que o registro excessivo vire um problema
+adicional.
+
+Não emita ``WARN`` levianamente
+*******************************
+
+``WARN*()`` foi concebido para situações inesperadas, em que "isso nunca devia
+acontecer". Macros ``WARN*()`` não devem ser usadas para nada que se espere que
+aconteça durante a operação normal. Esses não são asserts de pré- ou pós-
+condição, por exemplo. Novamente: ``WARN*()`` não deve ser usado para uma
+condição que se espera que seja acionada facilmente, por exemplo, por ações do
+espaço do usuário. ``pr_warn_once()`` é uma alternativa possível, se você
+precisar notificar o usuário sobre um problema.
+
+Não se preocupe com usuários de ``panic_on_warn``
+*************************************************
+
+Mais algumas palavras sobre ``panic_on_warn``: lembre-se de que
+``panic_on_warn`` é uma opção disponível do kernel, e muitos usuários a
+habilitam. É por isso que existe um texto "Não emita WARN levianamente" acima.
+Entretanto, a existência de usuários de ``panic_on_warn`` não é uma razão válida
+para evitar o uso judicioso de ``WARN*()``. Isso ocorre porque quem habilita
+``panic_on_warn`` explicitamente pediu ao kernel para travar se um ``WARN*()``
+for disparado, e esses usuários devem estar preparados para lidar com as
+consequências de um sistema que tem uma chance um pouco maior de travar.
+
+Use ``BUILD_BUG_ON()`` para assertivas em tempo de compilação
+*************************************************************
+
+O uso de ``BUILD_BUG_ON()`` é aceitável e encorajado, porque é uma assertiva
+em tempo de compilação que não tem efeito em tempo de execução.
+
+Apêndice I) Referências
+-----------------------
+
+The C Programming Language, Second Edition
+by Brian W. Kernighan and Dennis M. Ritchie.
+Prentice Hall, Inc., 1988.
+ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).
+
+The Practice of Programming
+by Brian W. Kernighan and Rob Pike.
+Addison-Wesley, Inc., 1999.
+ISBN 0-201-61586-X.
+
+Manuais GNU - onde em conformidade com K&R e este texto - para cpp, gcc,
+gcc internals e indent, todos disponíveis em https://www.gnu.org/manual/
+
+WG14 é o grupo de trabalho de padronização internacional para a linguagem de
+programação C, URL: http://www.open-std.org/JTC1/SC22/WG14/
+
+Kernel CodingStyle, by greg@kroah.com at OLS 2002:
+http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
diff --git a/Documentation/translations/pt_BR/process/index.rst b/Documentation/translations/pt_BR/process/index.rst
index 7841eca6bf45..2c63d82bff67 100644
--- a/Documentation/translations/pt_BR/process/index.rst
+++ b/Documentation/translations/pt_BR/process/index.rst
@@ -26,6 +26,7 @@ sua entrada na comunidade do kernel.
Como começar <howto>
Guia do Processo de Desenvolvimento <development-process>
+ Enviando patches: o guia essencial para colocar o seu código no kernel <submitting-patches>
Lista de verificação para submissão de patches do kernel Linux <submit-checklist>
Ferramentas e guias técnicos para desenvolvedores do kernel
@@ -38,6 +39,7 @@ devem estar familiarizados.
:maxdepth: 1
Requisitos mínimos <changes>
+ Estilo de codificação do kernel Linux <coding-style>
Informações sobre clientes de email para Linux <email-clients>
Como aplicar patches <applying-patches>
Backporting e resolução de conflitos <backporting>
@@ -58,9 +60,11 @@ Estas são as regras pelas quais tentamos viver na comunidade do kernel
Código de Conduta de Compromisso do Colaborador <code-of-conduct>
Interpretação do Código de Conduta do Kernel Linux <code-of-conduct-interpretation>
Modelos de Maturidade para Contribuição no Kernel Linux <contribution-maturity-model.rst>
+ Declaração de Aplicação do Kernel Linux <kernel-enforcement-statement>
Declaração sobre Drivers do Kernel <kernel-driver-statement>
Estilo de gerenciamento do kernel Linux <management-style>
Assistentes de código <coding-assistants>
+ O manual da árvore tip <maintainer-tip>
Conclave (Continuidade do projeto) <conclave>
Lidando com bugs
diff --git a/Documentation/translations/pt_BR/process/kernel-enforcement-statement.rst b/Documentation/translations/pt_BR/process/kernel-enforcement-statement.rst
new file mode 100644
index 000000000000..3833c433c36b
--- /dev/null
+++ b/Documentation/translations/pt_BR/process/kernel-enforcement-statement.rst
@@ -0,0 +1,163 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Declaração de Aplicação do Kernel Linux
+---------------------------------------
+
+Como desenvolvedores do kernel Linux, temos um grande interesse em como nosso
+software é usado e como a licença do nosso software é aplicada. A conformidade
+com as obrigações de compartilhamento recíproco da GPL-2.0 é crítica para a
+sustentabilidade a longo prazo do nosso software e da nossa comunidade.
+
+Embora exista o direito de aplicar os interesses de direitos autorais separados nas
+contribuições feitas à nossa comunidade, compartilhamos o interesse em garantir
+que ações de aplicação individuais sejam conduzidas de uma maneira que beneficie
+nossa comunidade e não tenham um impacto negativo não intencional na saúde e no
+crescimento do nosso ecossistema de software. A fim de deter ações de aplicação
+inúteis, concordamos que é do melhor interesse da nossa comunidade de
+desenvolvimento assumir o seguinte compromisso com os usuários do kernel Linux,
+em nosso nome e em nome de quaisquer sucessores dos nossos interesses de
+direitos autorais:
+
+ Não obstante as disposições de rescisão da GPL-2.0, concordamos que
+ é do melhor interesse da nossa comunidade de desenvolvimento adotar as
+ seguintes disposições da GPL-3.0 como permissões adicionais sob nossa
+ licença com relação a qualquer reivindicação não defensiva de direitos sob a
+ licença.
+
+ No entanto, se você cessar toda violação desta Licença, sua licença
+ de um detentor de direitos autorais específico será restabelecida (a)
+ provisoriamente, a menos e até que o detentor de direitos autorais encerre
+ explícita e definitivamente sua licença, e (b) permanentemente, se o
+ detentor de direitos autorais não notificar você sobre a violação por
+ algum meio razoável antes de 60 dias após a cessação.
+
+ Além disso, sua licença de um detentor de direitos autorais específico é
+ restabelecida permanentemente se o detentor de direitos autorais
+ notificá-lo da violação por algum meio razoável, se esta for a primeira
+ vez que você recebe um aviso de violação desta Licença (para qualquer
+ trabalho) daquele detentor de direitos autorais, e você sanar a violação
+ antes de 30 dias após o recebimento do aviso.
+
+Nossa intenção ao fornecer essas garantias é incentivar um maior uso do
+software. Queremos que empresas e indivíduos usem, modifiquem e distribuam
+este software. Queremos trabalhar com os usuários de forma aberta e transparente
+para eliminar qualquer incerteza sobre nossas expectativas em relação à
+conformidade ou aplicação que possa limitar a adoção do nosso software. Vemos
+a ação judicial como um último recurso, a ser iniciada apenas quando outros
+esforços da comunidade falharem em resolver o problema.
+
+Por fim, uma vez que um problema de não conformidade seja resolvido, esperamos
+que o usuário se sinta bem-vindo para se juntar a nós em nossos esforços neste
+projeto. Trabalhando juntos, seremos mais fortes.
+
+Exceto onde indicado abaixo, falamos apenas por nós mesmos, e não por qualquer
+empresa para a qual possamos trabalhar hoje, no passado ou no futuro.
+
+ - Bjorn Andersson (Linaro)
+ - Andrea Arcangeli
+ - Neil Armstrong
+ - Jens Axboe
+ - Pablo Neira Ayuso
+ - Khalid Aziz
+ - Ralf Baechle
+ - Felipe Balbi
+ - Arnd Bergmann
+ - Ard Biesheuvel
+ - Tim Bird
+ - Paolo Bonzini
+ - Christian Borntraeger
+ - Mark Brown (Linaro)
+ - Paul Burton
+ - Javier Martinez Canillas
+ - Rob Clark
+ - Kees Cook (Google)
+ - Jonathan Corbet
+ - Dennis Dalessandro
+ - Vivien Didelot (Savoir-faire Linux)
+ - Hans de Goede
+ - Mel Gorman (SUSE)
+ - Sven Eckelmann
+ - Alex Elder (Linaro)
+ - Fabio Estevam
+ - Larry Finger
+ - Bhumika Goyal
+ - Andy Gross
+ - Juergen Gross
+ - Shawn Guo
+ - Ulf Hansson
+ - Stephen Hemminger (Microsoft)
+ - Tejun Heo
+ - Rob Herring
+ - Masami Hiramatsu
+ - Michal Hocko
+ - Simon Horman
+ - Johan Hovold (Hovold Consulting AB)
+ - Christophe JAILLET
+ - Olof Johansson
+ - Lee Jones (Linaro)
+ - Heiner Kallweit
+ - Srinivas Kandagatla
+ - Jan Kara
+ - Shuah Khan (Samsung)
+ - David Kershner
+ - Jaegeuk Kim
+ - Namhyung Kim
+ - Colin Ian King
+ - Jeff Kirsher
+ - Greg Kroah-Hartman (Linux Foundation)
+ - Christian König
+ - Vinod Koul
+ - Krzysztof Kozlowski
+ - Viresh Kumar
+ - Aneesh Kumar K.V
+ - Julia Lawall
+ - Doug Ledford
+ - Chuck Lever (Oracle)
+ - Daniel Lezcano
+ - Shaohua Li
+ - Xin Long
+ - Tony Luck
+ - Catalin Marinas (Arm Ltd)
+ - Mike Marshall
+ - Chris Mason
+ - Paul E. McKenney
+ - Arnaldo Carvalho de Melo
+ - David S. Miller
+ - Ingo Molnar
+ - Kuninori Morimoto
+ - Trond Myklebust
+ - Martin K. Petersen (Oracle)
+ - Borislav Petkov
+ - Jiri Pirko
+ - Josh Poimboeuf
+ - Sebastian Reichel (Collabora)
+ - Guenter Roeck
+ - Joerg Roedel
+ - Leon Romanovsky
+ - Steven Rostedt (VMware)
+ - Frank Rowand
+ - Ivan Safonov
+ - Anna Schumaker
+ - Jes Sorensen
+ - K.Y. Srinivasan
+ - David Sterba (SUSE)
+ - Heiko Stuebner
+ - Jiri Kosina (SUSE)
+ - Willy Tarreau
+ - Dmitry Torokhov
+ - Linus Torvalds
+ - Thierry Reding
+ - Rik van Riel
+ - Luis R. Rodriguez
+ - Geert Uytterhoeven (Glider bvba)
+ - Eduardo Valentin (Amazon.com)
+ - Daniel Vetter
+ - Linus Walleij
+ - Richard Weinberger
+ - Dan Williams
+ - Rafael J. Wysocki
+ - Arvind Yadav
+ - Masahiro Yamada
+ - Wei Yongjun
+ - Lv Zheng
+ - Marc Zyngier (Arm Ltd)
diff --git a/Documentation/translations/pt_BR/process/maintainer-kvm-x86.rst b/Documentation/translations/pt_BR/process/maintainer-kvm-x86.rst
index 6480ff08b9d8..d9fd272fb866 100644
--- a/Documentation/translations/pt_BR/process/maintainer-kvm-x86.rst
+++ b/Documentation/translations/pt_BR/process/maintainer-kvm-x86.rst
@@ -122,7 +122,7 @@ Quando se trata de estilo, nomenclatura, padrões, etc., a consistência é a
prioridade número um no KVM x86. Se tudo mais falhar, siga o que já existe.
Com algumas ressalvas listadas abaixo, siga o estilo de codificação preferido
-dos mantenedores da árvore "tip" (:ref:`maintainer-tip-coding-style`), já que
+dos mantenedores da árvore "tip" (:ref:`pt_BR_maintainer-tip-coding-style`), já que
patches/séries frequentemente tocam tanto arquivos do KVM quanto arquivos x86
não-KVM, ou seja, atraem a atenção de mantenedores do KVM *e* da árvore "tip".
@@ -206,7 +206,7 @@ Novos tópicos surgem ocasionalmente, mas, por favor, inicie uma discussão na
lista se desejar propor a introdução de um novo tópico; ou seja, não aja por
conta própria.
-Veja :ref:`the_canonical_patch_format` para mais informações, com uma ressalva:
+Veja :ref:`pt_BR_the_canonical_patch_format` para mais informações, com uma ressalva:
não trate o limite de 70-75 caracteres como um limite absoluto e rígido. Em
vez disso, use 75 caracteres como um limite firme, mas não rígido, e use 80
caracteres como um limite intransponível. Ou seja, permita que o shortlog
@@ -218,7 +218,7 @@ Changelog
O mais importante: escreva os changelogs usando o modo imperativo e evite o uso
de pronomes.
-Veja :ref:`describe_changes` para mais informações, com uma ressalva: comece com
+Veja :ref:`pt_BR_describe_changes` para mais informações, com uma ressalva: comece com
uma breve descrição das mudanças reais e, em seguida, apresente o contexto e o
histórico. Note! Esta ordem entra em conflito direto com a abordagem preferida
da árvore "tip"! Por favor, siga o estilo preferido da árvore "tip" ao enviar
diff --git a/Documentation/translations/pt_BR/process/maintainer-tip.rst b/Documentation/translations/pt_BR/process/maintainer-tip.rst
new file mode 100644
index 000000000000..e583bad4282d
--- /dev/null
+++ b/Documentation/translations/pt_BR/process/maintainer-tip.rst
@@ -0,0 +1,847 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+O manual da árvore tip
+======================
+
+O que é a árvore tip?
+---------------------
+
+A árvore tip é uma coleção de vários subsistemas e áreas de
+desenvolvimento. A árvore tip é tanto uma árvore de desenvolvimento direto quanto uma
+árvore de agregação para várias árvores de sub-mantenedores. A URL gitweb da árvore tip
+é: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+
+A árvore tip contém os seguintes subsistemas:
+
+ - **Arquitetura x86**
+
+ O desenvolvimento da arquitetura x86 ocorre na árvore tip, exceto
+ pelas partes específicas do KVM e XEN no x86, que são mantidas nos
+ subsistemas correspondentes e roteadas diretamente para a mainline a partir
+ dali. Ainda é uma boa prática enviar Cc para os mantenedores x86 nos
+ patches do KVM e XEN específicos para x86.
+
+ Alguns subsistemas x86 têm seus próprios mantenedores além dos
+ mantenedores gerais do x86. Por favor, envie Cc para os mantenedores gerais do x86 em
+ patches que toquem em arquivos em arch/x86, mesmo quando não forem indicados
+ pelo arquivo MAINTAINER.
+
+ Note que ``x86@kernel.org`` não é uma lista de discussão. É meramente um
+ alias de e-mail que distribui mensagens para a equipe de mantenedores de nível superior
+ do x86. Por favor, sempre envie Cc para a lista de discussão do Linux Kernel (LKML)
+ ``linux-kernel@vger.kernel.org``, caso contrário, seu e-mail acabará apenas nas
+ caixas de entrada privadas dos mantenedores.
+
+ - **Scheduler**
+
+ O desenvolvimento do scheduler ocorre na árvore -tip, na
+ branch sched/core - com ocasionais árvores de subtópicos para
+ conjuntos de patches em progresso.
+
+ - **Locking e atomics**
+
+ O desenvolvimento de locking (incluindo atomics e outras primitivas de
+ sincronização que estão conectadas ao locking) ocorre na árvore -tip,
+ na branch locking/core - com ocasionais árvores de subtópicos
+ para conjuntos de patches em progresso.
+
+ - **Subsistema genérico de interrupções e drivers de chip de interrupção**:
+
+ - o desenvolvimento do núcleo de interrupções ocorre na branch irq/core
+
+ - o desenvolvimento do driver de chip de interrupção também ocorre na branch
+ irq/core, mas os patches geralmente são aplicados em uma árvore de mantenedor
+ separada e depois agregados na irq/core
+
+ - **Tempo, timers, timekeeping, NOHZ e drivers de chip relacionados**:
+
+ - o desenvolvimento do timekeeping, núcleo clocksource, NTP e alarmtimer
+ ocorre na branch timers/core, mas os patches geralmente são aplicados em
+ uma árvore de mantenedor separada e depois agregados na timers/core
+
+ - o desenvolvimento do driver clocksource/event ocorre na branch
+ timers/core, mas os patches são em sua maioria aplicados em uma árvore de mantenedor
+ separada e depois agregados na timers/core
+
+ - **Núcleo de contadores de desempenho, suporte a arquitetura e ferramentas**:
+
+ - o desenvolvimento do núcleo perf e suporte a arquitetura ocorre na
+ branch perf/core
+
+ - o desenvolvimento de ferramentas perf ocorre na árvore do mantenedor
+ de ferramentas perf e é agregado à árvore tip.
+
+ - **Núcleo de hotplug de CPU**
+
+ - **Núcleo RAS**
+
+ Em sua maioria, os patches RAS específicos para x86 são coletados na branch
+ ras/core da árvore tip.
+
+ - **Núcleo EFI**
+
+ Desenvolvimento EFI na árvore git efi. Os patches coletados são
+ agregados na branch efi/core da árvore tip.
+
+ - **RCU**
+
+ O desenvolvimento do RCU ocorre na árvore linux-rcu. As mudanças resultantes
+ são agregadas na branch core/rcu da árvore tip.
+
+ - **Vários componentes de código do núcleo**:
+
+ - debugobjects
+
+ - objtool
+
+ - partes e peças aleatórias
+
+
+Notas de submissão de patch
+---------------------------
+
+Selecionando a árvore/branch
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Em geral, o desenvolvimento contra o head da branch master da árvore tip é
+adequado, mas para os subsistemas que são mantidos separadamente, possuem sua
+própria árvore git e são apenas agregados na árvore tip, o desenvolvimento deve
+ocorrer contra a árvore ou branch do subsistema relevante.
+
+Correções de bugs que visam a mainline devem sempre ser aplicáveis contra a
+árvore do kernel mainline. Potenciais conflitos contra mudanças que já estão
+na fila da árvore tip são resolvidos pelos mantenedores.
+
+Assunto do patch
+^^^^^^^^^^^^^^^^
+
+O formato preferido da árvore tip para prefixos de assunto do patch é
+'subsys/component:', ex. 'x86/apic:', 'x86/mm/fault:', 'sched/fair:',
+'genirq/core:'. Por favor, não use nomes de arquivos ou caminhos de arquivos completos como
+prefixo. 'git log path/to/file' deve lhe dar uma dica razoável na maioria
+dos casos.
+
+A descrição condensada do patch na linha de assunto deve começar com uma
+letra maiúscula e deve ser escrita em tom imperativo.
+
+
+Changelog
+^^^^^^^^^
+
+As regras gerais sobre changelogs no :ref:`Guia de submissão de patches
+<pt_BR_describe_changes>`, se aplicam.
+
+Os mantenedores da árvore tip valorizam seguir essas regras, especialmente no
+pedido para escrever changelogs no modo imperativo e não personificando
+o código ou sua execução. Isso não é apenas um capricho dos
+mantenedores. Changelogs escritos em palavras abstratas são mais precisos e
+tendem a ser menos confusos do que aqueles escritos em forma de romances.
+
+Também é útil estruturar o changelog em vários parágrafos e não
+juntar tudo em um só. Uma boa estrutura é explicar
+o contexto, o problema e a solução em parágrafos separados e nesta
+ordem.
+
+Exemplos para ilustração:
+
+ Exemplo 1::
+
+ x86/intel_rdt/mbm: Corrigir o manipulador de overflow do MBM durante hot cpu
+
+ Quando uma CPU está morrendo, cancelamos o worker e agendamos um novo worker em uma
+ CPU diferente no mesmo domínio. Mas se o timer já está prestes a
+ expirar (digamos 0.99s) então essencialmente dobramos o intervalo.
+
+ Modificamos o tratamento de hot cpu para cancelar o trabalho atrasado na cpu
+ que está morrendo e executar o worker imediatamente em uma cpu diferente no mesmo domínio. Não
+ fazemos o flush do worker porque o worker de overflow do MBM reagenda o
+ worker na mesma CPU e escaneia a domain->cpu_mask para obter o ponteiro
+ do domínio.
+
+ Versão melhorada::
+
+ x86/intel_rdt/mbm: Corrigir o manipulador de overflow do MBM durante hotplug de CPU
+
+ Quando uma CPU está morrendo, o worker de overflow é cancelado e reagendado em uma
+ CPU diferente no mesmo domínio. Mas se o timer já estiver prestes a
+ expirar isso essencialmente dobra o intervalo, o que pode resultar em um overflow
+ não detectado.
+
+ Cancele o worker de overflow e reagende-o imediatamente em uma CPU diferente
+ no mesmo domínio. O trabalho também poderia sofrer um flush, mas isso iria
+ reagendá-lo na mesma CPU.
+
+ Exemplo 2::
+
+ time: POSIX CPU timers: Garantir que a variável seja inicializada
+
+ Se cpu_timer_sample_group retornar -EINVAL, ela não terá escrito em
+ *sample. Checar o valor de retorno de cpu_timer_sample_group previne o
+ uso potencial de um valor não inicializado de now no bloco seguinte.
+ Dado um clock_idx inválido, o código anterior poderia caso contrário sobrescrever
+ *oldval de maneira indefinida. Isso agora é prevenido. Também exploramos
+ o curto-circuito do && para amostrar o timer apenas se o resultado for
+ realmente usado para atualizar *oldval.
+
+ Versão melhorada::
+
+ posix-cpu-timers: Tornar set_process_cpu_timer() mais robusto
+
+ Como o valor de retorno de cpu_timer_sample_group() não é checado,
+ compiladores e checadores estáticos podem legitimamente avisar sobre um uso potencial
+ da variável não inicializada 'now'. Isso não é um problema de tempo de execução pois todos
+ os locais de chamada passam ids de clock válidos.
+
+ Além disso, cpu_timer_sample_group() é invocado incondicionalmente mesmo quando o
+ resultado não é usado porque *oldval é NULL.
+
+ Torne a invocação condicional e cheque o valor de retorno.
+
+ Exemplo 3::
+
+ A entidade também pode ser usada para outros propósitos.
+
+ Vamos renomeá-la para ser mais genérica.
+
+ Versão melhorada::
+
+ A entidade também pode ser usada para outros propósitos.
+
+ Renomeie para ser mais genérica.
+
+
+Para cenários complexos, especialmente condições de corrida (race conditions) e problemas
+de ordenação de memória, é valioso descrever o cenário com uma tabela que mostra
+o paralelismo e a ordem temporal dos eventos. Aqui está um exemplo::
+
+ CPU0 CPU1
+ free_irq(X) interrupt X
+ spin_lock(desc->lock)
+ wake irq thread()
+ spin_unlock(desc->lock)
+ spin_lock(desc->lock)
+ remove action()
+ shutdown_irq()
+ release_resources() thread_handler()
+ spin_unlock(desc->lock) access released resources.
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ synchronize_irq()
+
+O Lockdep fornece uma saída útil semelhante para descrever um possível cenário
+de deadlock::
+
+ CPU0 CPU1
+ rtmutex_lock(&rcu->rt_mutex)
+ spin_lock(&rcu->rt_mutex.wait_lock)
+ local_irq_disable()
+ spin_lock(&timer->it_lock)
+ spin_lock(&rcu->mutex.wait_lock)
+ --> Interrupt
+ spin_lock(&timer->it_lock)
+
+Referências a funções em changelogs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Quando uma função é mencionada no changelog, seja no corpo do texto ou na
+linha de assunto, por favor use o formato 'nome_da_funcao()'. Omitir os
+parênteses após o nome da função pode ser ambíguo::
+
+ Subject: subsys/component: Make reservation_count static
+
+ reservation_count is only used in reservation_stats. Make it static.
+
+A variante com parênteses é mais precisa::
+
+ Subject: subsys/component: Make reservation_count() static
+
+ reservation_count() is only called from reservation_stats(). Make it
+ static.
+
+
+Backtraces em changelogs
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Veja :ref:`pt_BR_backtraces`.
+
+Ordenação das tags de commit
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Para ter uma visão uniforme das tags de commit, os mantenedores da tip usam o
+seguinte esquema de ordenação de tags:
+
+ - Fixes: 12+char-SHA1 ("sub/sys: Original subject line")
+
+ Uma tag Fixes deve ser adicionada mesmo para alterações que não precisam ser
+ portadas de volta (backported) para kernels estáveis, ou seja, quando abordar um
+ problema recém-introduzido que afeta apenas a árvore tip ou o head atual da linha principal (mainline). Estas tags
+ são úteis para identificar o commit original e são muito mais valiosas
+ do que mencionar de forma proeminente o commit que introduziu um problema no
+ próprio texto do changelog, porque elas podem ser automaticamente
+ extraídas.
+
+ O exemplo a seguir ilustra a diferença::
+
+ Commit
+
+ abcdef012345678 ("x86/xxx: Replace foo with bar")
+
+ deixou uma instância não utilizada da variável foo. Remova-a.
+
+ Signed-off-by: J.Dev <j.dev@mail>
+
+ Por favor, diga em vez disso::
+
+ A recente substituição de foo por bar deixou uma instância não utilizada da
+ variável foo. Remova-a.
+
+ Fixes: abcdef012345678 ("x86/xxx: Replace foo with bar")
+ Signed-off-by: J.Dev <j.dev@mail>
+
+ O último coloca as informações sobre o patch em foco e
+ as complementa com a referência ao commit que introduziu o problema,
+ em vez de colocar o foco no commit original em primeiro lugar.
+
+ - Reported-by: ``Reporter <reporter@mail>``
+
+ - Closes: ``URL or Message-ID of the bug report this is fixing``
+
+ - Originally-by: ``Original author <original-author@mail>``
+
+ - Suggested-by: ``Suggester <suggester@mail>``
+
+ - Co-developed-by: ``Co-author <co-author@mail>``
+
+ Signed-off-by: ``Co-author <co-author@mail>``
+
+ Note que Co-developed-by e Signed-off-by do(s) co-autor(es) devem
+ vir em pares.
+
+ - Signed-off-by: ``Author <author@mail>``
+
+ O primeiro Signed-off-by (SOB) após o último par Co-developed-by/SOB é o
+ SOB do autor, ou seja, a pessoa marcada como autora pelo git.
+
+ - Signed-off-by: ``Patch handler <handler@mail>``
+
+ SOBs após o SOB do autor são de pessoas que lidam e transportam
+ o patch, mas não estiveram envolvidas no desenvolvimento. As cadeias de SOB devem
+ refletir a rota **real** que um patch tomou conforme foi propagado para nós,
+ com a primeira entrada de SOB sinalizando a autoria principal de um único
+ autor. Acks devem ser dados como linhas Acked-by e aprovações de revisão
+ como linhas Reviewed-by.
+
+ Se o manipulador fez modificações no patch ou no changelog, então
+ isso deve ser mencionado **após** o texto do changelog e **acima**
+ de todas as tags de commit no seguinte formato::
+
+ ... o texto do changelog termina.
+
+ [ handler: Substituiu foo por bar e atualizou o changelog ]
+
+ First-tag: .....
+
+ Observe as duas novas linhas vazias que separam o texto do changelog e as
+ tags de commit daquele aviso.
+
+ Se um patch for enviado para a lista de discussão por um manipulador, então o autor tem
+ que ser notado na primeira linha do changelog com::
+
+ From: Author <author@mail>
+
+ O texto do changelog começa aqui....
+
+ assim a autoria é preservada. A linha 'From:' tem que ser seguida
+ por uma nova linha vazia. Se essa linha 'From:' estiver faltando, então o patch
+ seria atribuído à pessoa que o enviou (transportou, manipulou).
+ A linha 'From:' é automaticamente removida quando o patch é aplicado
+ e não aparece no changelog final do git. Ela meramente afeta
+ a informação de autoria do commit resultante do Git.
+
+ - Tested-by: ``Tester <tester@mail>``
+
+ - Reviewed-by: ``Reviewer <reviewer@mail>``
+
+ - Acked-by: ``Acker <acker@mail>``
+
+ - Cc: ``cc-ed-person <person@mail>``
+
+ Se o patch deve ser portado para stable, então por favor adicione uma tag '``Cc:
+ stable@vger.kernel.org``', mas não coloque em Cc o stable ao enviar o seu
+ e-mail.
+
+ - Link: ``https://link/to/information``
+
+ Para se referir a um e-mail postado nas listas de discussão do kernel, por favor
+ use o URL de redirecionamento lore.kernel.org::
+
+ Link: https://lore.kernel.org/email-message-id@here
+
+ Esta URL deve ser usada ao se referir a tópicos de lista de discussão relevantes,
+ conjuntos de patches relacionados, ou outras threads de discussão notáveis.
+ Uma maneira conveniente de associar os trailers ``Link:`` com a mensagem de commit
+ é usar a notação de colchetes semelhante ao markdown, por exemplo::
+
+ A similar approach was attempted before as part of a different
+ effort [1], but the initial implementation caused too many
+ regressions [2], so it was backed out and reimplemented.
+
+ Link: https://lore.kernel.org/some-msgid@here # [1]
+ Link: https://bugzilla.example.org/bug/12345 # [2]
+
+ Você também pode usar os trailers ``Link:`` para indicar a origem do
+ patch ao aplicá-lo em sua árvore git. Neste caso, por favor use o
+ domínio dedicado ``patch.msgid.link`` em vez de ``lore.kernel.org``.
+ Esta prática torna possível que as ferramentas automatizadas identifiquem
+ qual link usar para recuperar o envio do patch original. Por
+ exemplo::
+
+ Link: https://patch.msgid.link/patch-source-message-id@here
+
+Por favor não use tags combinadas, ex. ``Reported-and-tested-by``, pois
+elas apenas complicam a extração automatizada de tags.
+
+
+Links para documentação
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Fornecer links para a documentação no changelog é uma grande ajuda para depuração e
+análise posteriores. Infelizmente, os URLs costumam quebrar muito rapidamente
+porque as empresas reestruturam seus sites frequentemente. Exceções não 'voláteis'
+incluem o Intel SDM e o AMD APM.
+
+Portanto, para documentos 'voláteis', por favor crie uma entrada no bugzilla do kernel
+https://bugzilla.kernel.org e anexe uma cópia desses documentos
+à entrada do bugzilla. Finalmente, forneça o URL da entrada do bugzilla no
+changelog.
+
+Reenvio de patch ou lembretes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Veja :ref:`pt_BR_resend_reminders`.
+
+Janela de merge
+^^^^^^^^^^^^^^^
+
+Por favor, não espere que os patches sejam revisados ou mesclados pelos mantenedores da árvore tip
+em torno ou durante a janela de merge. As árvores ficam fechadas
+para todos, exceto correções urgentes, durante esse tempo. Elas reabrem assim que a janela de merge
+fecha e um novo kernel -rc1 é lançado.
+
+Grandes séries devem ser enviadas em estado mesclável (mergeable state) *pelo* *menos* uma semana
+antes da janela de merge abrir. Exceções são feitas para correções de bugs e
+*às vezes* para pequenos drivers independentes para novos hardwares ou patches minimamente
+invasivos para ativação de hardware.
+
+Durante a janela de merge, os mantenedores se concentram em seguir as
+alterações upstream, corrigir problemas resultantes da janela de merge, coletar correções de bugs, e
+se permitir um respiro. Por favor, respeite isso.
+
+Os chamados branches _urgent_ serão mesclados na linha principal (mainline) durante a
+fase de estabilização de cada versão.
+
+
+Git
+^^^
+
+Os mantenedores da árvore tip aceitam pull requests do git de mantenedores que fornecem
+alterações de subsistema para agregação na árvore tip.
+
+Pull requests para novos envios de patches normalmente não são aceitos e não
+substituem o envio adequado de patch para a lista de discussão. O principal motivo para
+isso é que o fluxo de trabalho de revisão é baseado em e-mail.
+
+Se você enviar uma série maior de patches, é útil fornecer um branch git
+em um repositório privado que permita que pessoas interessadas façam pull da
+série facilmente para testes. A maneira usual de oferecer isso é uma URL do git na carta de apresentação (cover letter)
+da série de patches.
+
+Testes
+^^^^^^
+
+O código deve ser testado antes de ser enviado para os mantenedores da árvore tip. Qualquer coisa
+além de alterações menores deve ser construída, inicializada e testada com
+opções abrangentes (e pesadas) de depuração do kernel ativadas.
+
+Essas opções de depuração podem ser encontradas em kernel/configs/x86_debug.config
+e podem ser adicionadas a uma configuração de kernel existente executando:
+
+ make x86_debug.config
+
+Algumas dessas opções são específicas do x86 e podem ser deixadas de fora ao testar
+em outras arquiteturas.
+
+.. _pt_BR_maintainer-tip-coding-style:
+
+Notas de estilo de código
+-------------------------
+
+Estilo de comentário
+^^^^^^^^^^^^^^^^^^^^
+
+Frases em comentários começam com uma letra maiúscula.
+
+Comentários de linha única::
+
+ /* Este é um comentário de linha única */
+
+Comentários de várias linhas::
+
+ /*
+ * This is a properly formatted
+ * multi-line comment.
+ *
+ * Larger multi-line comments should be split into paragraphs.
+ */
+
+Sem comentários no fim da linha (veja abaixo):
+
+ Por favor, abstenha-se de usar comentários no fim da linha. Comentários no fim da linha atrapalham o
+ fluxo de leitura em quase todos os contextos, mas especialmente em código::
+
+ if (somecondition_is_true) /* Não coloque um comentário aqui */
+ dostuff(); /* Nem aqui */
+
+ seed = MAGIC_CONSTANT; /* Nem aqui */
+
+ Use comentários independentes em vez disso::
+
+ /* Esta condição não é óbvia sem um comentário */
+ if (somecondition_is_true) {
+ /* Isso realmente precisa ser documentado */
+ dostuff();
+ }
+
+ /* Esta inicialização mágica precisa de um comentário. Talvez não? */
+ seed = MAGIC_CONSTANT;
+
+ Use o estilo C++, comentários no fim da linha ao documentar structs em headers para
+ alcançar um layout mais compacto e melhor legibilidade::
+
+ // eax
+ u32 x2apic_shift : 5, // Número de bits para deslocar o ID APIC para a direita
+ // para o ID de topologia no próximo nível
+ : 27; // Reservado
+ // ebx
+ u32 num_processors : 16, // Número de processadores no nível atual
+ : 16; // Reservado
+
+ versus::
+
+ /* eax */
+ /*
+ * Número de bits para deslocar o ID APIC para a direita para o ID de topologia
+ * no próximo nível
+ */
+ u32 x2apic_shift : 5,
+ /* Reservado */
+ : 27;
+
+ /* ebx */
+ /* Número de processadores no nível atual */
+ u32 num_processors : 16,
+ /* Reservado */
+ : 16;
+
+Comente as coisas importantes:
+
+ Comentários devem ser adicionados onde a operação não é óbvia. Documentar
+ o óbvio é apenas uma distração::
+
+ /* Decrementa o refcount e verifica por zero */
+ if (refcount_dec_and_test(&p->refcnt)) {
+ do;
+ lots;
+ of;
+ magic;
+ things;
+ }
+
+ Em vez disso, os comentários devem explicar os detalhes não óbvios e documentar
+ as restrições::
+
+ if (refcount_dec_and_test(&p->refcnt)) {
+ /*
+ * Explicação muito boa de por que as coisas mágicas abaixo
+ * precisam ser feitas, restrições de ordenação e locking,
+ * etc..
+ */
+ do;
+ lots;
+ of;
+ magic;
+ /* Precisa ser a última operação porque ... */
+ things;
+ }
+
+Comentários de documentação de função:
+
+ Para documentar funções e seus argumentos por favor use o formato kernel-doc
+ e não comentários de formato livre::
+
+ /**
+ * magic_function - Faz muitas coisas mágicas
+ * @magic: Ponteiro para os dados mágicos nos quais operar
+ * @offset: Deslocamento no array de dados de @magic
+ *
+ * Explicação profunda das coisas misteriosas feitas com @magic junto
+ * com a documentação dos valores de retorno.
+ *
+ * Note que os descritores de argumento acima estão dispostos
+ * de forma tabular.
+ */
+
+ Isto se aplica especialmente a funções visíveis globalmente e funções
+ inline em arquivos de cabeçalho públicos. Pode ser um exagero usar o formato
+ kernel-doc para cada função (estática) que precisa de uma pequena explicação. O
+ uso de nomes de funções descritivos frequentemente substitui esses pequenos comentários.
+ Aplique o bom senso como sempre.
+
+
+Documentando requisitos de locking
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Documentar requisitos de locking é uma coisa boa, mas comentários não
+ são necessariamente a melhor escolha. Em vez de escrever::
+
+ /* Caller must hold foo->lock */
+ void func(struct foo *foo)
+ {
+ ...
+ }
+
+ Por favor, use::
+
+ void func(struct foo *foo)
+ {
+ lockdep_assert_held(&foo->lock);
+ ...
+ }
+
+ Em kernels PROVE_LOCKING, lockdep_assert_held() emite um aviso
+ se o chamador não detém o lock. Comentários não podem fazer isso.
+
+Regras de chaves
+^^^^^^^^^^^^^^^^
+
+Chaves devem ser omitidas apenas se a instrução que se segue a 'if', 'for',
+'while' etc. for verdadeiramente uma única linha::
+
+ if (foo)
+ do_something();
+
+O seguinte não é considerado uma instrução de linha única mesmo
+que o C não exija chaves::
+
+ for (i = 0; i < end; i++)
+ if (foo[i])
+ do_something(foo[i]);
+
+Adicionar chaves ao redor do loop externo melhora o fluxo de leitura::
+
+ for (i = 0; i < end; i++) {
+ if (foo[i])
+ do_something(foo[i]);
+ }
+
+
+Declarações de variáveis
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+A ordem preferida das declarações de variáveis no início de uma
+função é a ordem de árvore de abeto invertida (reverse fir tree order)::
+
+ struct long_struct_name *descriptive_name;
+ unsigned long foo, bar;
+ unsigned int tmp;
+ int ret;
+
+O que está acima é mais rápido de analisar do que a ordem invertida::
+
+ int ret;
+ unsigned int tmp;
+ unsigned long foo, bar;
+ struct long_struct_name *descriptive_name;
+
+E ainda mais do que uma ordem aleatória::
+
+ unsigned long foo, bar;
+ int ret;
+ struct long_struct_name *descriptive_name;
+ unsigned int tmp;
+
+Também por favor tente agregar variáveis do mesmo tipo em uma única
+linha. Não há sentido em desperdiçar espaço na tela::
+
+ unsigned long a;
+ unsigned long b;
+ unsigned long c;
+ unsigned long d;
+
+É realmente suficiente fazer::
+
+ unsigned long a, b, c, d;
+
+Por favor, evite também introduzir divisões de linha em declarações de variáveis::
+
+ struct long_struct_name *descriptive_name = container_of(bar,
+ struct long_struct_name,
+ member);
+ struct foobar foo;
+
+É muito melhor mover a inicialização para uma linha separada após as
+declarações::
+
+ struct long_struct_name *descriptive_name;
+ struct foobar foo;
+
+ descriptive_name = container_of(bar, struct long_struct_name, member);
+
+
+Tipos de variáveis
+^^^^^^^^^^^^^^^^^^
+
+Por favor use os tipos u8, u16, u32, u64 adequados para variáveis que são destinadas
+a descrever hardware ou são usadas como argumentos para funções que acessam
+hardware. Estes tipos definem claramente a largura em bits e evitam
+truncamento, expansão e confusão entre 32/64 bits.
+
+u64 também é recomendado em código que se tornaria ambíguo para kernels
+de 32 bits quando 'unsigned long' fosse usado em vez disso. Embora em tais
+situações 'unsigned long long' pudesse ser usado também, u64 é mais curto
+e também mostra claramente que a operação requer uma largura de 64 bits
+independente da CPU alvo.
+
+Por favor use 'unsigned int' em vez de 'unsigned'.
+
+
+Constantes
+^^^^^^^^^^
+
+Por favor, não use números (hexa)decimais literais em código ou inicializadores.
+Ou use defines adequados que tenham nomes descritivos ou considere usar
+um enum.
+
+
+Declarações e inicializadores de struct
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+As declarações de struct devem alinhar os nomes dos membros da struct de forma
+tabular::
+
+ struct bar_order {
+ unsigned int guest_id;
+ int ordered_item;
+ struct menu *menu;
+ };
+
+Por favor, evite documentar os membros da struct dentro da declaração, pois
+isso frequentemente resulta em comentários formatados de maneira estranha e os membros da struct
+ficam ofuscados::
+
+ struct bar_order {
+ unsigned int guest_id; /* ID único do convidado */
+ int ordered_item;
+ /* Ponteiro para uma instância de menu que contém todas as bebidas */
+ struct menu *menu;
+ };
+
+Em vez disso, por favor considere usar o formato kernel-doc em um comentário precedendo
+a declaração da struct, que é mais fácil de ler e tem a vantagem adicional
+de incluir a informação na documentação do kernel, por exemplo, da
+seguinte forma::
+
+
+ /**
+ * struct bar_order - Descrição de um pedido de bar
+ * @guest_id: ID único do convidado
+ * @ordered_item: O número do item do menu
+ * @menu: Ponteiro para o menu do qual o item
+ * foi pedido
+ *
+ * Informação suplementar para usar a struct.
+ *
+ * Note que os descritores dos membros da struct acima estão dispostos
+ * de forma tabular.
+ */
+ struct bar_order {
+ unsigned int guest_id;
+ int ordered_item;
+ struct menu *menu;
+ };
+
+Inicializadores de struct estáticos devem usar inicializadores C99 e também devem ser
+alinhados de forma tabular::
+
+ static struct foo statfoo = {
+ .a = 0,
+ .plain_integer = CONSTANT_DEFINE_OR_ENUM,
+ .bar = &statbar,
+ };
+
+Note que embora a sintaxe C99 permita a omissão da vírgula final,
+nós recomendamos o uso de uma vírgula na última linha porque isso torna
+o reordenamento e a adição de novas linhas mais fáceis, e também torna tais
+patches futuros ligeiramente mais fáceis de ler.
+
+Quebras de linha
+^^^^^^^^^^^^^^^^
+
+Restringir o comprimento da linha a 80 caracteres torna código profundamente indentado difícil de
+ler. Considere dividir o código em funções auxiliares para evitar quebra de
+linha excessiva.
+
+A regra de 80 caracteres não é uma regra estrita, então por favor use bom senso ao
+quebrar linhas. Especialmente strings de formato nunca devem ser divididas.
+
+Ao dividir declarações de funções ou chamadas de funções, então por favor alinhe
+o primeiro argumento na segunda linha com o primeiro argumento na primeira
+linha::
+
+ static int long_function_name(struct foobar *barfoo, unsigned int id,
+ unsigned int offset)
+ {
+
+ if (!id) {
+ ret = longer_function_name(barfoo, DEFAULT_BARFOO_ID,
+ offset);
+ ...
+
+Namespaces
+^^^^^^^^^^
+
+Namespaces de funções/variáveis melhoram a legibilidade e permitem
+grepping fácil. Estes namespaces são prefixos de string para nomes
+de funções e variáveis visíveis globalmente, incluindo inlines. Estes prefixos devem
+combinar o subsistema e o nome do componente como 'x86_comp\_',
+'sched\_', 'irq\_', e 'mutex\_'.
+
+Isso também inclui funções estáticas de escopo de arquivo que são imediatamente colocadas
+em templates de driver visíveis globalmente - é útil que esses símbolos
+também carreguem um bom prefixo, para legibilidade do backtrace.
+
+Prefixos de namespace podem ser omitidos para funções e variáveis
+estáticas locais. Funções verdadeiramente locais, chamadas apenas por outras funções locais,
+podem ter nomes descritivos mais curtos - nossa preocupação principal é a facilidade de grepping
+e a legibilidade do backtrace.
+
+Por favor note que os prefixos 'xxx_vendor\_' e 'vendor_xxx\_' não são
+úteis para funções estáticas em arquivos específicos de fornecedores. Afinal,
+já está claro que o código é específico do fornecedor. Além disso, nomes
+de fornecedores devem ser apenas para funcionalidades verdadeiramente específicas de fornecedores.
+
+Como sempre, aplique o bom senso e vise a consistência e a legibilidade.
+
+
+Notificações de commit
+----------------------
+
+A árvore tip é monitorada por um bot por novos commits. O bot envia um email
+para cada novo commit para uma lista de discussão dedicada
+(``linux-tip-commits@vger.kernel.org``) e coloca em Cc todas as pessoas que são
+mencionadas em uma das tags de commit. Ele usa o ID da mensagem de email da
+tag Link no final da lista de tags para definir o cabeçalho de email In-Reply-To para que
+a mensagem seja encadeada corretamente com o email de submissão do patch.
+
+Os mantenedores e submantenedores tip tentam responder ao remetente
+ao fazer o merge de um patch, mas às vezes eles esquecem ou isso não se encaixa no
+fluxo de trabalho do momento. Embora a mensagem do bot seja puramente mecânica, ela
+também implica em um 'Obrigado! Aplicado.'.
diff --git a/Documentation/translations/pt_BR/process/submitting-patches.rst b/Documentation/translations/pt_BR/process/submitting-patches.rst
new file mode 100644
index 000000000000..8cf1aae52005
--- /dev/null
+++ b/Documentation/translations/pt_BR/process/submitting-patches.rst
@@ -0,0 +1,961 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Enviando patches: o guia essencial para colocar o seu código no kernel
+======================================================================
+
+Para uma pessoa ou empresa que deseja enviar uma mudança para o
+kernel Linux, o processo pode, por vezes, ser intimidador se você não
+estiver familiarizado com "o sistema". Este texto é uma coleção de sugestões
+que podem aumentar muito as chances de sua mudança ser aceita.
+
+Este documento contém um grande número de sugestões em um formato relativamente
+conciso. Para informações detalhadas sobre como funciona o processo de
+desenvolvimento do kernel, consulte Documentation/process/development-process.rst.
+Além disso, leia Documentation/process/submit-checklist.rst
+para uma lista de itens a serem verificados antes de enviar o código.
+Para patches de binding de device tree, leia
+Documentation/devicetree/bindings/submitting-patches.rst.
+
+Esta documentação assume que você está usando o ``git`` para preparar seus
+patches. Se você não está familiarizado com o ``git``, é muito recomendado que
+você aprenda a usá-lo, ele tornará a sua vida como um desenvolvedor do kernel e,
+em geral, muito mais fácil.
+
+Alguns subsistemas e árvores de mantenedores possuem informações adicionais
+sobre seus fluxos de trabalho e expectativas, consulte
+Documentation/process/maintainer-handbooks.rst.
+
+Obtenha uma árvore de código-fonte atual
+----------------------------------------
+
+Se você não tiver um repositório com o código-fonte atual do kernel em mãos,
+use o ``git`` para obter um. Você vai querer começar com o repositório mainline,
+que pode ser obtido com::
+
+ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
+
+Note, no entanto, que você pode não querer desenvolver diretamente na
+árvore mainline. A maioria dos mantenedores de subsistemas mantém suas
+próprias árvores e desejam ver os patches preparados em relação a essas árvores.
+Consulte a entrada **T:** do subsistema no arquivo MAINTAINERS para encontrar
+essa árvore, ou simplesmente pergunte ao mantenedor se a árvore não estiver
+listada lá.
+
+.. _pt_BR_describe_changes:
+
+Descreva as suas mudanças
+-------------------------
+
+Descreva o seu problema. Seja o seu patch uma correção de bug de uma linha ou
+5000 linhas de um novo recurso, deve haver um problema subjacente que o motivou
+a fazer esse trabalho. Convença o revisor de que existe um problema que vale a
+pena corrigir e que faz sentido que ele leia além do primeiro parágrafo.
+
+Descreva o impacto visível ao usuário. Travamentos e bloqueios diretos são
+bastante convincentes, mas nem todos os bugs são tão evidentes. Mesmo que o
+problema tenha sido identificado durante a revisão do código, descreva o impacto
+que você acredita que ele pode ter sobre os usuários. Tenha em mente que a
+maioria das instalações Linux executa kernels de árvores estáveis secundárias
+ou árvores específicas de fornecedores/produtos que selecionam apenas patches
+específicos do upstream, então inclua qualquer coisa que possa ajudar a
+direcionar sua mudança downstream: circunstâncias provocadoras, trechos do
+dmesg, descrições do travamento, regressões de desempenho, picos de latência,
+bloqueios, etc.
+
+Quantifique as otimizações e compensações. Se você afirma haver melhorias no
+desempenho, consumo de memória, uso da pilha ou tamanho do binário, inclua
+números que as comprovem. Mas também descreva custos que não são óbvios.
+Otimizações geralmente não são gratuitas, sendo trocas entre CPU, memória e
+legibilidade; ou, quando se trata de heurísticas, entre diferentes cargas de
+trabalho. Descreva as desvantagens esperadas da sua otimização para que o
+revisor possa pesar os custos contra os benefícios.
+
+Uma vez estabelecido o problema, descreva o que você está efetivamente fazendo
+sobre ele, com detalhes técnicos. É importante descrever a mudança em inglês
+claro para o revisor verificar que o código está se comportando como
+você pretendia.
+
+O mantenedor agradecerá se você escrever a descrição do seu patch em uma forma
+que possa ser facilmente inserida no sistema de gerenciamento de código-fonte do
+Linux, o ``git``, como uma "mensagem de commit". Veja
+:ref:`pt_BR_the_canonical_patch_format`.
+
+Resolva apenas um problema por patch. Se a sua descrição começar a ficar longa,
+isso é um sinal de que você provavelmente precisa dividir o seu patch.
+Consulte :ref:`pt_BR_split_changes`.
+
+Quando você enviar ou reenviar um patch ou uma série de patches, inclua a
+descrição completa do patch e a justificativa para ele. Não diga apenas
+que esta é a versão N do patch (ou série). Não espere que o mantenedor
+do subsistema consulte versões anteriores do patch ou URLs de referência
+para encontrar a descrição do patch e colocá-la no patch.
+Ou seja, o patch (ou a série) e sua descrição devem ser autossuficientes.
+Isso beneficia tanto os mantenedores quanto os revisores. Alguns revisores
+provavelmente nem chegaram a receber as versões anteriores do patch.
+
+Descreva suas alterações no modo imperativo, por exemplo, "faça xyzzy executar
+frotz" em vez de "[Este patch] faz xyzzy executar frotz" ou "[Eu] mudei xyzzy
+para executar frotz", como se você estivesse dando ordens à base de código para
+mudar o seu comportamento.
+
+Se você quiser se referir a um commit específico, não se refira apenas ao
+ID SHA-1 do commit. Por favor, inclua também o resumo de uma linha do
+commit, para tornar mais fácil para os revisores saberem sobre o que se trata.
+Exemplo::
+
+ Commit e21d2170f36602ae2708 ("video: remove unnecessary
+ platform_set_drvdata()") removed the unnecessary
+ platform_set_drvdata(), but left the variable "dev" unused,
+ delete it.
+
+Você também deve ter a certeza de usar pelo menos os primeiros doze caracteres do
+ID SHA-1. O repositório do kernel possui um número *muito* grande de objetos, o que torna as
+colisões com IDs mais curtos uma possibilidade real. Tenha em mente que, mesmo que
+não haja colisão com o seu ID de seis caracteres agora, essa condição pode
+mudar daqui a cinco anos.
+
+Se discussões relacionadas ou qualquer outra informação de contexto por trás da mudança
+puderem ser encontradas na web, adicione tags 'Link:' apontando para isso. Se o patch é o
+resultado de algumas discussões anteriores na lista de e-mails ou algo documentado na
+web, aponte para ele.
+
+Ao criar links para arquivos de listas de e-mails, de preferência use o serviço
+de arquivo de mensagens lore.kernel.org. Para criar a URL do link, use o
+conteúdo do cabeçalho ``Message-ID`` da mensagem, sem os colchetes angulares
+circundantes. Por exemplo::
+
+ Link: https://lore.kernel.org/30th.anniversary.repost@klaava.Helsinki.FI
+
+Por favor, verifique o link para se certificar de que ele está realmente
+funcionando e aponta para a mensagem relevante.
+
+No entanto, tente tornar a sua explicação compreensível sem recursos
+externos. Além de fornecer um URL para um arquivo da lista de e-mails ou bug,
+resuma os pontos relevantes da discussão que levaram ao patch conforme enviado.
+
+Caso o seu patch corrija um bug, use a tag 'Closes:' com um URL que referencie o
+relato nos arquivos da lista de e-mails ou em um rastreador público de bugs. Por exemplo::
+
+ Closes: https://example.com/issues/1234
+
+Alguns rastreadores de bugs têm a capacidade de fechar os problemas
+automaticamente quando um commit com tal tag é aplicado. Alguns bots que monitoram as listas de
+e-mails também podem rastrear tais tags e tomar certas ações. Rastreadores de bugs
+privados e URLs inválidos são proibidos.
+
+Se o seu patch corrige um bug em um commit específico, por exemplo, você encontrou um problema usando
+``git bisect``, por favor, use a tag 'Fixes:' com pelo menos os primeiros 12
+caracteres do ID SHA-1 e o resumo de uma linha. Não divida a tag em
+várias linhas, as tags estão isentas da regra de "quebra de linha nas 75 colunas" para
+simplificar os scripts de parsing. Por exemplo::
+
+ Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")
+
+As seguintes configurações do ``git config`` podem ser usadas para adicionar um formato aprimorado para
+exibir o estilo acima nos comandos ``git log`` ou ``git show``::
+
+ [core]
+ abbrev = 12
+ [pretty]
+ fixes = Fixes: %h (\"%s\")
+
+Um exemplo de chamada::
+
+ $ git log -1 --pretty=fixes 54a4f0239f2e
+ Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")
+
+.. _pt_BR_split_changes:
+
+Separe as suas mudanças
+-----------------------
+
+Separe cada **mudança lógica** em um patch separado.
+
+Por exemplo, se as suas alterações incluírem tanto correções de bugs quanto melhorias
+de desempenho para um único driver, separe essas alterações em dois
+ou mais patches. Se as suas alterações incluírem uma atualização de API e um novo
+driver que utiliza essa nova API, separe-os em dois patches.
+
+Por outro lado, se você fizer uma única alteração em vários arquivos,
+agrupe essas alterações em um único patch. Assim, uma única mudança
+lógica está contida em um único patch.
+
+O ponto a lembrar é que cada patch deve fazer uma mudança facilmente compreendida
+que possa ser verificada pelos revisores. Cada patch deve ser justificável
+por seus próprios méritos.
+
+Se um patch depender de outro patch para que uma mudança seja
+completa, não tem problema. Simplesmente note **"this patch depends on patch X"**
+na descrição do seu patch.
+
+Ao dividir a sua mudança em uma série de patches, tome um cuidado especial para
+garantir que o kernel compile e seja executado adequadamente após cada patch da
+série. Desenvolvedores que usam o ``git bisect`` para rastrear um problema podem acabar
+dividindo a sua série de patches em qualquer ponto; eles não ficarão gratos se você
+introduzir bugs no meio do processo.
+
+Se você não conseguir condensar o seu conjunto de patches em um conjunto menor
+de patches, então publique, digamos, apenas uns 15 de cada vez e aguarde pela
+revisão e integração.
+
+
+
+Verifique o estilo das suas mudanças
+------------------------------------
+
+Verifique o seu patch quanto a violações básicas de estilo, cujos detalhes podem ser
+encontrados em Documentation/process/coding-style.rst.
+Não fazer isso simplesmente desperdiça
+o tempo dos revisores e fará com que o seu patch seja rejeitado, provavelmente
+sem sequer ser lido.
+
+Uma exceção significativa é quando se move código de um arquivo para
+outro -- neste caso você não deve modificar o código movido no
+mesmo patch que o move. Isso delineia claramente o ato de
+mover o código e as suas alterações. Isso ajuda muito a revisão das
+diferenças reais e permite que as ferramentas rastreiem melhor o histórico do
+próprio código.
+
+Verifique os seus patches com o verificador de estilo de patch antes de os submeter
+(scripts/checkpatch.pl). Note, porém, que o verificador de estilo deve ser
+visto como um guia, e não como um substituto para o julgamento humano. Se o seu
+código parecer melhor com uma violação, provavelmente é melhor deixá-lo como está.
+
+O verificador emite relatórios em três níveis:
+ - ERROR: coisas que muito provavelmente estão erradas
+ - WARNING: coisas que requerem uma revisão cuidadosa
+ - CHECK: coisas que requerem reflexão
+
+Você deve ser capaz de justificar todas as violações que permanecerem no seu
+patch.
+
+Selecione os destinatários do seu patch
+---------------------------------------
+
+Você deve sempre copiar o(s) mantenedor(es) e a(s) lista(s) do subsistema
+apropriado(s) em qualquer patch para o código que eles mantêm; dê uma
+olhada no arquivo MAINTAINERS e no histórico de revisão do código-fonte
+para ver quem são esses mantenedores. O script scripts/get_maintainer.pl
+pode ser muito útil nesta etapa (passe os caminhos para seus patches
+como argumentos para scripts/get_maintainer.pl). Se você não conseguir
+encontrar um mantenedor para o subsistema em que está trabalhando,
+Andrew Morton (akpm@linux-foundation.org) serve como um mantenedor de
+último recurso.
+
+linux-kernel@vger.kernel.org deve ser usado por padrão para todos os
+patches, mas o volume dessa lista fez com que vários desenvolvedores a
+ignorassem. Por favor, não envie spam para listas e pessoas não
+relacionadas.
+
+Muitas listas relacionadas ao kernel estão hospedadas em kernel.org;
+você pode encontrar uma lista delas em https://subspace.kernel.org.
+Existem listas relacionadas ao kernel hospedadas em outros lugares
+também, no entanto.
+
+Linus Torvalds é o árbitro final de todas as mudanças aceitas no
+kernel do Linux. Seu endereço de e-mail é <torvalds@linux-foundation.org>.
+Ele recebe muitos e-mails e, neste momento, muito poucos patches passam
+por Linus diretamente, então, normalmente, você deve fazer o seu melhor
+para -evitar- enviar e-mails para ele.
+
+Se você tiver um patch que corrija um bug de segurança explorável,
+envie esse patch para security@kernel.org. Para bugs severos, um
+curto embargo pode ser considerado para permitir que os distribuidores
+disponibilizem o patch aos usuários; em tais casos, obviamente, o
+patch não deve ser enviado a nenhuma lista pública. Veja também
+Documentation/process/security-bugs.rst.
+
+Patches que corrigem um bug severo em um kernel já lançado devem ser
+direcionados aos mantenedores stable (estáveis), colocando uma linha como esta::
+
+ Cc: stable@vger.kernel.org
+
+na área de sign-off do seu patch (note, NÃO como um destinatário de e-mail).
+Você também deve ler Documentation/process/stable-kernel-rules.rst
+além deste documento.
+
+Se as alterações afetarem as interfaces userland-kernel,
+por favor, envie ao mantenedor das MAN-PAGES (como listado no arquivo MAINTAINERS)
+um patch para as páginas de manual, ou pelo menos uma notificação da alteração,
+para que alguma informação chegue às páginas de manual. Mudanças na API
+do espaço de usuário também devem ser copiadas para linux-api@vger.kernel.org.
+
+
+Sem MIME, sem links, sem compressão, sem anexos. Apenas texto puro
+------------------------------------------------------------------
+
+Linus e outros desenvolvedores do kernel precisam ser capazes de ler e
+comentar as mudanças que você está enviando. É importante que um
+desenvolvedor do kernel seja capaz de "citar" suas mudanças, usando
+ferramentas de e-mail padrão, para que eles possam comentar em partes
+específicas do seu código.
+
+Por esse motivo, todos os patches devem ser enviados por e-mail "inline". A
+maneira mais fácil de fazer isso é com ``git send-email``, que é
+fortemente recomendado. Um tutorial interativo para ``git send-email``
+está disponível em https://git-send-email.io.
+
+Se você optar por não usar ``git send-email``:
+
+.. warning::
+
+ Tenha cuidado com a quebra de linha do seu editor corrompendo seu patch,
+ se você optar por recortar e colar o seu patch.
+
+Não anexe o patch como um anexo MIME, comprimido ou não.
+Muitos aplicativos populares de e-mail nem sempre transmitirão um
+anexo MIME como texto puro, tornando impossível comentar o seu
+código. Um anexo MIME também leva um pouco mais de tempo para Linus
+processar, diminuindo a probabilidade da sua alteração anexada em MIME
+ser aceita.
+
+Exceção: Se o seu cliente de e-mail estiver danificando os patches,
+alguém pode pedir que você os reenvie usando MIME.
+
+Veja Documentation/process/email-clients.rst para dicas sobre como
+configurar seu cliente de e-mail para que ele envie seus patches intocados.
+
+Responda aos comentários de revisão
+-----------------------------------
+
+Seu patch quase certamente receberá comentários dos revisores sobre maneiras
+pelas quais o patch pode ser melhorado, na forma de uma resposta ao seu
+e-mail. Você deve responder a esses comentários; ignorar revisores é uma
+boa maneira de ser ignorado em troca. Você pode simplesmente responder aos
+e-mails deles para responder aos seus comentários. Comentários de revisão
+ou perguntas que não levam a uma alteração no código devem quase certamente
+resultar em um comentário ou entrada no changelog para que o próximo
+revisor entenda melhor o que está acontecendo.
+
+Certifique-se de dizer aos revisores quais alterações você está fazendo e
+de agradecê-los pelo tempo dedicado. A revisão de código é um processo
+cansativo e demorado, e os revisores às vezes ficam mal-humorados. Mesmo
+nesse caso, no entanto, responda educadamente e resolva os problemas que
+eles apontaram. Ao enviar uma próxima versão, adicione um ``changelog do patch``
+à carta de apresentação (cover letter) ou aos patches individuais,
+explicando a diferença em relação ao envio anterior (veja
+:ref:`pt_BR_the_canonical_patch_format`).
+Notifique as pessoas que comentaram no seu patch sobre as novas versões
+adicionando-as à lista de CC dos patches.
+
+Veja Documentation/process/email-clients.rst para recomendações sobre
+clientes de e-mail e etiqueta de listas de discussão.
+
+.. _pt_BR_interleaved_replies:
+
+Use respostas intercaladas e aparadas em discussões por e-mail
+--------------------------------------------------------------
+O top-posting (responder no topo) é fortemente desencorajado em
+discussões de desenvolvimento do kernel do Linux. Respostas
+intercaladas (ou "inline") tornam as conversas muito mais fáceis de
+acompanhar. Para mais detalhes, veja:
+https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
+
+Como é frequentemente citado na lista de discussão::
+
+ A: http://en.wikipedia.org/wiki/Top_post
+ Q: Onde encontro informações sobre essa coisa chamada top-posting?
+ A: Porque bagunça a ordem em que as pessoas normalmente leem o texto.
+ Q: Por que o top-posting é algo tão ruim?
+ A: Top-posting.
+ Q: Qual é a coisa mais irritante no e-mail?
+
+Da mesma forma, por favor, apare (corte) todas as citações
+desnecessárias que não são relevantes para a sua resposta. Isso torna
+as respostas mais fáceis de encontrar, e economiza tempo e espaço. Para
+mais detalhes, veja: http://daringfireball.net/2007/07/on_top ::
+
+ A: Não.
+ Q: Devo incluir citações após minha resposta?
+
+.. _pt_BR_resend_reminders:
+
+Não desanime - nem fique impaciente
+-----------------------------------
+
+Depois de ter enviado a sua alteração, seja paciente e espere. Os
+revisores são pessoas ocupadas e podem não chegar ao seu patch
+imediatamente.
+
+Era uma vez, patches costumavam desaparecer no vazio sem comentários,
+mas o processo de desenvolvimento funciona de forma mais suave do que
+isso agora. Você deve receber comentários dentro de algumas semanas
+(normalmente 2-3); se isso não acontecer, certifique-se de que você
+enviou seus patches para o lugar certo. Espere por no mínimo uma
+semana antes de reenviar ou dar um "ping" nos revisores -
+possivelmente mais tempo durante períodos ocupados, como as janelas
+de mesclagem (merge windows).
+
+Também não há problema em reenviar o patch ou a série de patches após
+algumas semanas com a palavra "RESEND" adicionada à linha de Assunto::
+
+ [PATCH Vx RESEND] sub/sys: Resumo condensado do patch
+
+Não adicione "RESEND" quando você estiver enviando uma versão
+modificada do seu patch ou série de patches - "RESEND" se aplica
+apenas ao reenvio de um patch ou série de patches que não foram
+modificados de forma alguma em relação ao envio anterior.
+
+
+Inclua PATCH no Assunto
+-----------------------
+
+Devido ao alto tráfego de e-mails para Linus e para a linux-kernel, é
+uma convenção comum prefixar a sua linha de Assunto com [PATCH]. Isso
+permite que Linus e outros desenvolvedores do kernel distingam
+mais facilmente os patches de outras discussões por e-mail.
+
+O ``git send-email`` fará isso por você automaticamente.
+
+
+Assine seu trabalho - o Certificado de Origem do Desenvolvedor
+--------------------------------------------------------------
+
+Para melhorar o rastreamento de quem fez o que, especialmente com patches
+que podem percolar até o seu local de descanso final no kernel através de
+várias camadas de mantenedores, nós introduzimos um procedimento de
+"sign-off" nos patches que estão sendo enviados por e-mail.
+
+O sign-off é uma linha simples no final da explicação do patch, que
+certifica que você o escreveu ou que de outra forma tem o direito de
+repassá-lo como um patch de código aberto. As regras são bem simples:
+se você pode certificar o seguinte::
+
+ Certificado de Origem do Desenvolvedor 1.1
+
+ Ao fazer uma contribuição para este projeto, eu certifico que:
+
+ (a) A contribuição foi criada no todo ou em parte por mim e eu
+ tenho o direito de enviá-la sob a licença de código aberto
+ indicada no arquivo; ou
+
+ (b) A contribuição baseia-se em trabalho anterior que, até onde eu
+ sei, é coberto por uma licença de código aberto apropriada
+ e eu tenho o direito, sob essa licença, de enviar esse
+ trabalho com modificações, tenham sido criadas no todo ou
+ em parte por mim, sob a mesma licença de código aberto (a menos que eu
+ tenha permissão para enviar sob uma licença diferente), conforme
+ indicado no arquivo; ou
+
+ (c) A contribuição foi fornecida diretamente a mim por alguma outra
+ pessoa que certificou (a), (b) ou (c) e eu não a modifiquei.
+
+ (d) Eu entendo e concordo que este projeto e a contribuição
+ são públicos e que um registro da contribuição (incluindo todas
+ as informações pessoais que eu envio com ela, incluindo meu
+ sign-off) é mantido indefinidamente e pode ser redistribuído de forma
+ consistente com este projeto ou com a(s) licença(s) de código
+ aberto envolvida(s).
+
+então você apenas adiciona uma linha dizendo::
+
+ Signed-off-by: Random J Developer <random@developer.example.org>
+
+usando uma identidade conhecida (desculpe, sem contribuições anônimas.)
+Isso será feito para você automaticamente se você usar o ``git commit -s``.
+As reversões também devem incluir "Signed-off-by". O ``git revert -s``
+faz isso por você.
+
+Algumas pessoas também colocam tags extras no final. Elas serão
+apenas ignoradas por enquanto, mas você pode fazer isso para marcar
+procedimentos internos da empresa ou apenas para apontar algum
+detalhe especial sobre o sign-off.
+
+Quaisquer outros SoBs (Signed-off-by:'s) seguindo o SoB do autor
+são de pessoas que manusearam e transportaram o patch, mas não
+estiveram envolvidas no seu desenvolvimento. As cadeias de SoB devem
+refletir a rota **real** que um patch percorreu à medida que foi
+propagado aos mantenedores e, finalmente, para Linus, com a primeira
+entrada de SoB sinalizando a autoria principal de um único autor.
+
+
+Quando usar Acked-by:, Cc: e Co-developed-by:
+---------------------------------------------
+
+A tag Signed-off-by: indica que o signatário esteve envolvido no
+desenvolvimento do patch, ou que ele/ela estava no caminho de
+entrega do patch.
+
+Se uma pessoa não esteve diretamente envolvida na preparação ou manuseio de um
+patch, mas deseja manifestar e registrar sua aprovação, ela pode
+pedir para ter uma linha Acked-by: adicionada ao changelog do patch.
+
+Acked-by: destina-se a ser usado por aqueles responsáveis ou envolvidos com o
+código afetado de uma forma ou de outra. Mais comumente, o mantenedor quando esse
+mantenedor não contribuiu nem encaminhou o patch.
+
+Acked-by: também pode ser usado por outras partes interessadas, como pessoas com conhecimento de
+domínio (por exemplo, o autor original do código sendo modificado), revisores
+do lado do espaço de usuário para um patch uAPI do kernel ou usuários-chave de um recurso. Opcionalmente,
+nestes casos, pode ser útil adicionar um "# Sufixo" para esclarecer seu significado::
+
+ Acked-by: The Stakeholder <stakeholder@example.org> # As primary user
+
+Acked-by: não é tão formal quanto Signed-off-by:. É um registro de que o avaliador
+pelo menos revisou o patch e indicou aceitação. Por isso, os responsáveis pela fusão de
+patches às vezes converterão manualmente um "sim, parece bom para mim" de um avaliador
+em um Acked-by: (mas note que geralmente é melhor pedir um
+ack explícito).
+
+Acked-by: também é menos formal do que Reviewed-by:. Por exemplo, mantenedores podem
+usá-lo para sinalizar que estão de acordo com a inclusão de um patch, mas podem não tê-lo
+revisado tão minuciosamente como se um Reviewed-by: fosse fornecido. Da mesma forma, um
+usuário-chave pode não ter realizado uma revisão técnica do patch, mas ainda assim estar
+satisfeito com a abordagem geral, o recurso ou a interface voltada para o usuário.
+
+Acked-by: não indica necessariamente o reconhecimento de todo o patch.
+Por exemplo, se um patch afeta vários subsistemas e tem um Acked-by: de
+um mantenedor de subsistema, isso geralmente indica o reconhecimento apenas
+da parte que afeta o código desse mantenedor. O bom senso deve ser usado aqui.
+Em caso de dúvida, as pessoas devem consultar a discussão original nos arquivos da
+lista de discussão. Um "# Sufixo" também pode ser usado neste caso para esclarecer.
+
+Se uma pessoa teve a oportunidade de comentar em um patch, mas não
+forneceu tais comentários, você pode opcionalmente adicionar uma tag ``Cc:`` ao patch.
+Esta tag documenta que partes potencialmente interessadas foram incluídas na
+discussão. Note que esta é uma de apenas três tags que você pode usar
+sem a permissão explícita da pessoa nomeada (veja 'Marcar pessoas requer
+permissão' abaixo para detalhes).
+
+Co-developed-by: afirma que o patch foi co-criado por múltiplos desenvolvedores;
+é usado para dar atribuição a coautores (além do autor
+atribuído pela tag From:) quando várias pessoas trabalham em um único patch. Como
+Co-developed-by: denota autoria, cada Co-developed-by: deve ser imediatamente
+seguido por um Signed-off-by: do coautor associado. O procedimento padrão de assinatura
+se aplica, ou seja, a ordem das tags Signed-off-by: deve refletir a
+história cronológica do patch na medida do possível, independentemente se
+o autor for atribuído via From: ou Co-developed-by:. Notavelmente, o último
+Signed-off-by: deve ser sempre o do desenvolvedor que está enviando o patch.
+
+Note que a tag From: é opcional quando o autor no From: também é a pessoa (e
+e-mail) listada na linha From: do cabeçalho do e-mail.
+
+Exemplo de um patch enviado pelo autor do From:::
+
+ <changelog>
+
+ Co-developed-by: First Co-Author <first@coauthor.example.org>
+ Signed-off-by: First Co-Author <first@coauthor.example.org>
+ Co-developed-by: Second Co-Author <second@coauthor.example.org>
+ Signed-off-by: Second Co-Author <second@coauthor.example.org>
+ Signed-off-by: From Author <from@author.example.org>
+
+Exemplo de um patch enviado por um autor do Co-developed-by:::
+
+ From: From Author <from@author.example.org>
+
+ <changelog>
+
+ Co-developed-by: Random Co-Author <random@coauthor.example.org>
+ Signed-off-by: Random Co-Author <random@coauthor.example.org>
+ Signed-off-by: From Author <from@author.example.org>
+ Co-developed-by: Submitting Co-Author <sub@coauthor.example.org>
+ Signed-off-by: Submitting Co-Author <sub@coauthor.example.org>
+
+
+Usando Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: e Fixes:
+---------------------------------------------------------------------
+
+A tag Reported-by dá crédito às pessoas que encontram bugs e os relatam e
+espera-se que isso as inspire a nos ajudar novamente no futuro. A tag destina-se a
+bugs; por favor, não a use para dar crédito a solicitações de recursos. A tag deve ser
+seguida por uma tag Closes: apontando para o relato, a menos que o relato não
+esteja disponível na web. A tag Link: pode ser usada em vez de Closes: se o patch
+corrigir uma parte do(s) problema(s) sendo relatado(s). Note que a tag Reported-by é
+uma de apenas três tags que você pode usar sem a permissão explícita da
+pessoa nomeada (veja 'Marcar pessoas requer permissão' abaixo para detalhes).
+
+Uma tag Tested-by: indica que o patch foi testado com sucesso (em
+algum ambiente) pela pessoa nomeada. Esta tag informa aos mantenedores que
+algum teste foi realizado, fornece um meio para localizar testadores para
+patches futuros e garante crédito para os testadores.
+
+Reviewed-by:, por sua vez, indica que o patch foi revisado e considerado
+aceitável de acordo com a Declaração do Revisor::
+
+ Declaração de supervisão do revisor
+
+ Ao oferecer minha tag Reviewed-by:, eu declaro que:
+
+ (a) Eu realizei uma revisão técnica deste patch para
+ avaliar sua adequação e prontidão para inclusão no
+ kernel mainline.
+
+ (b) Quaisquer problemas, preocupações ou perguntas relacionadas ao patch
+ foram comunicadas de volta ao remetente. Eu estou satisfeito
+ com a resposta do remetente aos meus comentários.
+
+ (c) Embora possa haver coisas que poderiam ser melhoradas com este
+ envio, eu acredito que é, neste momento, (1) uma
+ modificação que vale a pena para o kernel, e (2) livre de problemas
+ conhecidos que argumentariam contra sua inclusão.
+
+ (d) Embora eu tenha revisado o patch e acredite que seja sólido, eu
+ não faço (a menos que explicitamente declarado em outro lugar)
+ garantias de que alcançará seu propósito
+ declarado ou funcionará adequadamente em qualquer situação.
+
+Uma tag Reviewed-by é uma declaração de opinião de que o patch é uma
+modificação apropriada do kernel sem nenhum problema técnico sério
+restante. Qualquer revisor interessado (que tenha feito o trabalho e seja uma
+pessoa com identidade conhecida) pode oferecer uma tag Reviewed-by para um patch. Esta tag
+serve para dar crédito aos revisores e para informar os mantenedores do grau de
+revisão que foi feito no patch. Tags Reviewed-by:, quando fornecidas por
+revisores conhecidos por entender a área de assunto e realizar revisões completas,
+normalmente aumentarão a probabilidade de seu patch entrar no kernel.
+
+Ambas as tags Tested-by e Reviewed-by, uma vez recebidas na lista de discussão do testador
+ou revisor, devem ser adicionadas pelo autor aos patches aplicáveis ao enviar as
+próximas versões. No entanto, se o patch mudou substancialmente na versão
+seguinte, essas tags podem não ser mais aplicáveis e, portanto, devem ser removidas.
+Normalmente, a remoção das tags Acked-by, Tested-by ou Reviewed-by de alguém deve ser
+mencionada no changelog do patch com uma explicação (após o separador '---').
+
+Uma tag Suggested-by: indica que a ideia do patch foi sugerida pela pessoa
+nomeada e garante crédito à pessoa pela ideia: se creditarmos diligentemente
+nossos relatores de ideias, eles serão, com sorte, inspirados a nos ajudar novamente no
+futuro. Note que esta é uma de apenas três tags que você pode usar sem
+permissão explícita da pessoa nomeada (veja 'Marcar pessoas requer
+permissão' abaixo para detalhes).
+
+Uma tag Fixes: indica que o patch corrige um bug em um commit anterior. Ela
+é usada para facilitar a determinação de onde um problema se originou, o que pode ajudar
+na revisão da correção de um bug. Esta tag também auxilia a equipe do kernel estável a determinar
+quais versões do kernel estável devem receber sua correção. Este é o método preferido
+para indicar um bug corrigido pelo patch. Veja :ref:`pt_BR_describe_changes`
+para mais detalhes.
+
+Nota: Anexar uma tag Fixes: não subverte o processo de regras do kernel
+estável, nem o requisito de enviar em Cc: para stable@vger.kernel.org em todos os patches
+candidatos estáveis. Para mais informações, por favor, leia
+Documentation/process/stable-kernel-rules.rst.
+
+Por fim, embora fornecer tags seja bem-vindo e tipicamente muito apreciado, por favor
+note que os signatários (ou seja, remetentes e mantenedores) podem usar sua discrição ao
+aplicar as tags oferecidas.
+
+
+Marcar pessoas requer permissão
+-------------------------------
+
+Tenha cuidado ao adicionar as tags mencionadas acima aos seus patches, pois todas
+exceto Cc:, Reported-by: e Suggested-by: precisam de permissão explícita da
+pessoa nomeada. Para essas três, a permissão implícita é suficiente se a pessoa
+contribuiu para o kernel Linux usando esse nome e endereço de e-mail de acordo
+com os arquivos do lore ou o histórico de commits -- e no caso de Reported-by:
+e Suggested-by: tenha feito o relato ou sugestão em público. Note que o
+bugzilla.kernel.org é um local público nesse sentido, mas os endereços de e-mail
+usados lá são privados; portanto, não os exponha em tags, a menos que a pessoa
+os tenha usado em contribuições anteriores.
+
+Usando Assisted-by:
+-------------------
+
+Se você usou qualquer tipo de ferramenta avançada de codificação na criação do seu patch,
+você precisa reconhecer esse uso adicionando uma tag Assisted-by. A falha em
+fazer isso pode impedir a aceitação do seu trabalho. Por favor, veja
+Documentation/process/coding-assistants.rst para detalhes sobre o
+reconhecimento de assistentes de codificação.
+
+
+.. _pt_BR_the_canonical_patch_format:
+
+O formato canônico do patch
+---------------------------
+
+Esta seção descreve como o próprio patch deve ser formatado. Note
+que, se você tiver seus patches armazenados em um repositório ``git``, a formatação
+adequada do patch pode ser obtida com ``git format-patch``. As ferramentas não podem criar
+o texto necessário, no entanto, portanto, leia as instruções abaixo de qualquer maneira.
+
+Linha de Assunto
+^^^^^^^^^^^^^^^^
+
+A linha de assunto canônica do patch é::
+
+ Assunto: [PATCH 001/123] subsistema: frase de resumo
+
+O corpo canônico da mensagem do patch contém o seguinte:
+
+ - Uma linha ``from`` especificando o autor do patch, seguida por uma linha
+ vazia (necessário apenas se a pessoa enviando o patch não for o autor).
+
+ - O corpo da explicação, com quebra de linha em 75 colunas, que será
+ copiado para o changelog permanente para descrever este patch.
+
+ - Uma linha vazia.
+
+ - As linhas ``Signed-off-by:``, descritas acima, que também
+ irão para o changelog.
+
+ - Uma linha de marcador contendo simplesmente ``---``.
+
+ - Quaisquer comentários adicionais não adequados para o changelog.
+
+ - O próprio patch (saída do ``diff``).
+
+O formato da linha de Assunto torna muito fácil classificar os e-mails
+alfabeticamente pela linha de assunto - praticamente qualquer leitor de e-mail
+suportará isso - pois, como o número de sequência é preenchido com zeros,
+a classificação numérica e alfabética é a mesma.
+
+O ``subsystem`` no Assunto do e-mail deve identificar qual
+área ou subsistema do kernel está recebendo o patch.
+
+A ``frase de resumo`` no Assunto do e-mail deve descrever de forma concisa
+o patch que esse e-mail contém. A ``frase de resumo`` não deve ser um nome de arquivo.
+Não use a mesma ``frase de resumo`` para cada patch em uma série de patches inteira (onde uma ``série
+de patches`` é uma sequência ordenada de múltiplos patches relacionados).
+
+Tenha em mente que a ``frase de resumo`` do seu e-mail se torna um
+identificador globalmente único para aquele patch. Ela se propaga por todo o caminho
+até o changelog do ``git``. A ``frase de resumo`` pode ser usada posteriormente em
+discussões de desenvolvedores que se referem ao patch. As pessoas vão querer
+pesquisar no Google pela ``frase de resumo`` para ler a discussão sobre esse
+patch. Também será a única coisa que as pessoas poderão ver rapidamente
+quando, dois ou três meses depois, estiverem passando por talvez
+milhares de patches usando ferramentas como ``gitk`` ou ``git log
+--oneline``.
+
+Por essas razões, o ``resumo`` não deve ter mais de 70-75
+caracteres, e deve descrever tanto o que o patch altera, quanto
+por que o patch pode ser necessário. É um desafio ser
+sucinto e descritivo, mas é isso que um resumo bem escrito
+deve fazer.
+
+A ``frase de resumo`` pode ser prefixada por tags delimitadas por colchetes
+retos: "Assunto: [PATCH <tag>...] <frase de resumo>". As tags não
+são consideradas parte da frase de resumo, mas descrevem como o patch
+deve ser tratado. Tags comuns podem incluir um descritor de versão se
+as múltiplas versões do patch tiverem sido enviadas em resposta a
+comentários (ou seja, "v1, v2, v3"), ou "RFC" para indicar um pedido de
+comentários.
+
+Se houver quatro patches em uma série de patches, os patches individuais podem
+ser numerados assim: 1/4, 2/4, 3/4, 4/4. Isso garante que os desenvolvedores
+entendam a ordem na qual os patches devem ser aplicados e que
+eles tenham revisado ou aplicado todos os patches na série de patches.
+
+Aqui estão alguns bons exemplos de Assuntos::
+
+ Subject: [PATCH 2/5] ext2: improve scalability of bitmap searching
+ Subject: [PATCH v2 01/27] x86: fix eflags tracking
+ Subject: [PATCH v2] sub/sys: Condensed patch summary
+ Subject: [PATCH v2 M/N] sub/sys: Condensed patch summary
+
+Linha From
+^^^^^^^^^^
+
+A linha ``from`` deve ser a primeira linha no corpo da mensagem,
+e tem a forma:
+
+ From: Patch Author <author@example.com>
+
+A linha ``from`` especifica quem será creditado como o autor do
+patch no changelog permanente. Se a linha ``from`` estiver faltando,
+então a linha ``From:`` do cabeçalho do e-mail será usada para determinar
+o autor do patch no changelog.
+
+O autor pode indicar sua afiliação ou o patrocinador do trabalho
+adicionando o nome de uma organização às linhas ``from`` e ``SoB``,
+por exemplo:
+
+ From: Patch Author (Company) <author@example.com>
+
+Corpo da Explicação
+^^^^^^^^^^^^^^^^^^^
+
+O corpo da explicação será commitado no changelog
+permanente da fonte, então deve fazer sentido para um leitor competente que já
+esqueceu há muito tempo os detalhes imediatos da discussão que podem ter levado a
+este patch. Incluir sintomas da falha que o patch aborda
+(mensagens de log do kernel, mensagens oops, etc.) é especialmente útil para
+pessoas que possam estar pesquisando nas mensagens de commit procurando pelo patch
+aplicável. O texto deve ser escrito com detalhes suficientes para que, quando lido
+semanas, meses ou até anos depois, possa dar ao leitor os detalhes
+necessários para compreender o raciocínio do **por que** o patch foi criado.
+
+Se um patch corrige uma falha de compilação, pode não ser necessário incluir
+_todas_ as falhas de compilação; apenas o suficiente para que seja provável que
+alguém pesquisando pelo patch possa encontrá-lo. Como na ``frase de resumo``,
+é importante ser tanto sucinto quanto descritivo.
+
+.. _pt_BR_backtraces:
+
+Backtraces em mensagens de commit
+"""""""""""""""""""""""""""""""""
+
+Backtraces ajudam a documentar a cadeia de chamadas que leva a um problema. No entanto,
+nem todos os backtraces são úteis. Por exemplo, as cadeias de chamadas iniciais de boot são
+únicas e óbvias. Copiar a saída dmesg completa verbatim, no entanto,
+adiciona informações que distraem, como timestamps, listas de módulos, dumps de
+registradores e pilhas.
+
+Portanto, os backtraces mais úteis devem destilar as informações
+relevantes do dump, o que facilita o foco no problema
+real. Aqui está um exemplo de um backtrace bem aparado::
+
+ unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064)
+ at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20)
+ Call Trace:
+ mba_wrmsr
+ update_domains
+ rdtgroup_mkdir
+
+Comentários
+^^^^^^^^^^^
+
+A linha marcadora ``---`` serve ao propósito essencial de marcar para
+as ferramentas de manipulação de patches onde a mensagem do changelog termina.
+
+Um bom uso para os comentários adicionais após o marcador ``---`` é
+para um ``diffstat``, para mostrar quais arquivos mudaram, e o número de
+linhas inseridas e excluídas por arquivo. Um ``diffstat`` é especialmente útil
+em patches maiores. Se você for incluir um ``diffstat`` após o
+marcador ``---``, por favor, use as opções do ``diffstat`` ``-p 1 -w 70`` para que
+os nomes dos arquivos sejam listados a partir do topo da árvore de código-fonte do kernel e não
+usem muito espaço horizontal (cabem facilmente em 80 colunas, talvez com algum
+recuo). (o ``git`` gera diffstats apropriados por padrão.)
+
+Outros comentários relevantes apenas para o momento ou para o mantenedor, não
+adequados para o changelog permanente, também devem ir aqui. Um bom
+exemplo de tais comentários podem ser ``changelogs do patch`` que descrevem
+o que mudou entre as versões v1 e v2 do patch.
+
+Por favor, coloque esta informação **após** a linha ``---`` que separa
+o changelog do restante do patch. A informação da versão não
+faz parte do changelog que é commitado na árvore git. É
+informação adicional para os revisores. Se for colocada acima das
+tags de commit, precisará de interação manual para removê-la. Se estiver abaixo
+da linha separadora, ela é automaticamente removida ao aplicar o
+patch. Se disponíveis, adicionar links para as versões anteriores do patch (por exemplo,
+link do arquivo lore.kernel.org) é recomendado para ajudar os revisores::
+
+ <commit message>
+ ...
+ Signed-off-by: Author <author@mail>
+ ---
+ V2 -> V3: Removed redundant helper function
+ V1 -> V2: Cleaned up coding style and addressed review comments
+
+ v2: https://lore.kernel.org/bar
+ v1: https://lore.kernel.org/foo
+
+ path/to/file | 5+++--
+ ...
+
+Veja mais detalhes sobre o formato de patch adequado nas seguintes
+referências.
+
+
+Cabeçalhos In-Reply-To explícitos
+---------------------------------
+
+Pode ser útil adicionar manualmente cabeçalhos In-Reply-To: a um patch
+(por exemplo, ao usar ``git send-email``) para associar o patch com
+discussões relevantes anteriores, por exemplo, para vincular uma correção de bug ao e-mail com
+o relatório do bug. No entanto, para uma série de múltiplos patches, geralmente é
+melhor evitar usar In-Reply-To: para vincular a versões mais antigas da
+série. Desta forma, múltiplas versões do patch não se tornam uma
+floresta incontrolável de referências nos clientes de e-mail. Se um link for
+útil, você pode usar o redirecionador https://lore.kernel.org/ (por exemplo, no
+texto do e-mail de capa) para vincular a uma versão anterior da série de patches.
+
+
+Informações sobre a árvore base
+-------------------------------
+
+Quando outros desenvolvedores recebem seus patches e iniciam o processo de revisão,
+é absolutamente necessário que eles saibam qual é o commit/branch
+base no qual seu trabalho se aplica, considerando a enorme quantidade de
+árvores de mantenedores presentes hoje em dia. Note novamente a entrada **T:** no
+arquivo MAINTAINERS explicado acima.
+
+Isso é ainda mais importante para processos automatizados de CI que tentam
+executar uma série de testes a fim de estabelecer a qualidade da sua
+submissão antes que o mantenedor inicie a revisão.
+
+Se você estiver usando ``git format-patch`` para gerar seus patches, você pode
+incluir automaticamente as informações da árvore base em sua submissão ao
+usar a flag ``--base``. A maneira mais fácil e conveniente de usar
+esta opção é com branches de tópicos (topical branches)::
+
+ $ git checkout -t -b my-topical-branch master
+ Branch 'my-topical-branch' set up to track local branch 'master'.
+ Switched to a new branch 'my-topical-branch'
+
+ [perform your edits and commits]
+
+ $ git format-patch --base=auto --cover-letter -o outgoing/ master
+ outgoing/0000-cover-letter.patch
+ outgoing/0001-First-Commit.patch
+ outgoing/...
+
+Quando você abrir ``outgoing/0000-cover-letter.patch`` para edição, você
+notará que ele terá o trailer ``base-commit:`` bem no
+final, o qual fornece ao revisor e às ferramentas de CI informações suficientes
+para realizar o ``git am`` adequadamente sem se preocupar com conflitos::
+
+ $ git checkout -b patch-review [base-commit-id]
+ Switched to a new branch 'patch-review'
+ $ git am patches.mbox
+ Applying: First Commit
+ Applying: ...
+
+Por favor, veja ``man git-format-patch`` para mais informações sobre esta
+opção.
+
+.. note::
+
+ A funcionalidade ``--base`` foi introduzida no git versão 2.9.0.
+
+Se você não estiver usando git para formatar seus patches, você ainda pode incluir
+o mesmo trailer ``base-commit`` para indicar o hash do commit da árvore
+na qual seu trabalho se baseia. Você deve adicioná-lo na cover
+letter (carta de apresentação) ou no primeiro patch da série e ele deve ser colocado
+abaixo da linha ``---`` ou bem no final de todo o outro
+conteúdo, logo antes da sua assinatura de e-mail.
+
+Certifique-se de que o commit base está em uma árvore oficial de mantenedor/mainline
+e não em alguma árvore interna acessível apenas por você - caso contrário seria
+inútil.
+
+Ferramentas
+-----------
+
+Muitos dos aspectos técnicos deste processo podem ser automatizados usando
+b4, documentado em <https://b4.docs.kernel.org/en/latest/>. Isso pode
+ajudar com coisas como rastreamento de dependências, execução do checkpatch e
+com a formatação e o envio de e-mails.
+
+Referências
+-----------
+
+Andrew Morton, "The perfect patch" (tpp).
+ <https://www.ozlabs.org/~akpm/stuff/tpp.txt>
+
+Jeff Garzik, "Linux kernel patch submission format".
+ <https://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.html>
+
+Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".
+ <http://www.kroah.com/log/linux/maintainer.html>
+
+ <http://www.kroah.com/log/linux/maintainer-02.html>
+
+ <http://www.kroah.com/log/linux/maintainer-03.html>
+
+ <http://www.kroah.com/log/linux/maintainer-04.html>
+
+ <http://www.kroah.com/log/linux/maintainer-05.html>
+
+ <http://www.kroah.com/log/linux/maintainer-06.html>
+
+Kernel Documentation/process/coding-style.rst
+
+Linus Torvalds's mail on the canonical patch format:
+ <https://lore.kernel.org/r/Pine.LNX.4.58.0504071023190.28951@ppc970.osdl.org>
+
+Andi Kleen, "On submitting kernel patches"
+ Some strategies to get difficult or controversial changes in.
+
+ http://halobates.de/on-submitting-patches.pdf
diff --git a/Documentation/userspace-api/dma-buf-heaps.rst b/Documentation/userspace-api/dma-buf-heaps.rst
index f56b743cdb36..92099188893e 100644
--- a/Documentation/userspace-api/dma-buf-heaps.rst
+++ b/Documentation/userspace-api/dma-buf-heaps.rst
@@ -36,7 +36,7 @@ following heaps:
- A heap will be created for each reusable region in the device tree
with the ``shared-dma-pool`` compatible, using the full device tree
node name as its name. The buffer semantics are identical to
- ``default-cma-region``.
+ ``default_cma_region``.
Naming Convention
=================
diff --git a/Documentation/userspace-api/futex2.rst b/Documentation/userspace-api/futex2.rst
index 9693f47a7e62..615616305c57 100644
--- a/Documentation/userspace-api/futex2.rst
+++ b/Documentation/userspace-api/futex2.rst
@@ -51,10 +51,10 @@ future extension.
For each entry in ``waiters`` array, the current value at ``uaddr`` is compared
to ``val``. If it's different, the syscall undo all the work done so far and
-return ``-EAGAIN``. If all tests and verifications succeeds, syscall waits until
+return ``-EWOULDBLOCK``. If all tests and verifications succeeds, syscall waits until
one of the following happens:
-- The timeout expires, returning ``-ETIMEOUT``.
+- The timeout expires, returning ``-ETIMEDOUT``.
- A signal was sent to the sleeping task, returning ``-ERESTARTSYS``.
- Some futex at the list was woken, returning the index of some waked futex.
diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst
index 32c0d08e92e4..35f495bc54f7 100644
--- a/Documentation/userspace-api/ioctl/ioctl-number.rst
+++ b/Documentation/userspace-api/ioctl/ioctl-number.rst
@@ -181,8 +181,9 @@ Code Seq# Include File Comments
'M' 01-03 drivers/scsi/megaraid/megaraid_sas.h
'M' 00-0F drivers/video/fsl-diu-fb.h conflict!
'N' 00-1F drivers/usb/scanner.h
-'N' 40-7F drivers/block/nvme.c
-'N' 80-8F uapi/linux/ntsync.h NT synchronization primitives
+'N' 40-7F uapi/linux/nvme_ioctl.h
+'N' 80-83 uapi/linux/ntsync.h and uapi/linux/nvme_ioctl.h conflict!
+'N' 84-8F uapi/linux/ntsync.h NT synchronization primitives
<mailto:wine-devel@winehq.org>
'O' 00-06 mtd/ubi-user.h UBI
'P' all linux/soundcard.h conflict!
diff --git a/Documentation/userspace-api/vduse.rst b/Documentation/userspace-api/vduse.rst
index 81479d47c8b9..d316857ca5bd 100644
--- a/Documentation/userspace-api/vduse.rst
+++ b/Documentation/userspace-api/vduse.rst
@@ -11,11 +11,10 @@ to make the device emulation more secure, the emulated vDPA device's
control path is handled in the kernel and only the data path is
implemented in the userspace.
-Note that only virtio block device is supported by VDUSE framework now,
-which can reduce security risks when the userspace process that implements
-the data path is run by an unprivileged user. The support for other device
-types can be added after the security issue of corresponding device driver
-is clarified or fixed in the future.
+Note that virtio block, network, and filesystem device types are supported
+by the VDUSE framework. Other device types may be added after the security
+implications of the corresponding device driver are clarified or fixed in
+the future.
Create/Destroy VDUSE devices
----------------------------
@@ -135,7 +134,8 @@ module as follows:
return 0;
}
-There are now three types of messages introduced by VDUSE framework:
+The following control message types may be delivered via read(2) on
+/dev/vduse/$NAME:
- VDUSE_GET_VQ_STATE: Get the state for virtqueue, userspace should return
avail index for split virtqueue or the device/driver ring wrap counters and
@@ -151,6 +151,15 @@ There are now three types of messages introduced by VDUSE framework:
IOVA range, userspace should firstly remove the old mapping, then setup the new
mapping via the VDUSE_IOTLB_GET_FD ioctl.
+- VDUSE_SET_VQ_GROUP_ASID: Notify userspace to change the address space of a
+ virtqueue group (API version 1).
+
+- VDUSE_SET_VQ_READY: Notify userspace that a virtqueue should become ready or
+ not ready (when VDUSE_F_QUEUE_READY is negotiated).
+
+- VDUSE_SUSPEND: Notify userspace that the device is being suspended (when
+ VDUSE_F_SUSPEND is negotiated).
+
After DRIVER_OK status bit is set via the VDUSE_SET_STATUS message, userspace is
able to start the dataplane processing as follows:
@@ -227,7 +236,7 @@ able to start the dataplane processing as follows:
described by the descriptors in the descriptor table should be also mapped into
userspace via the VDUSE_IOTLB_GET_FD ioctl before accessing.
-5. Inject an interrupt for specific virtqueue with the VDUSE_INJECT_VQ_IRQ ioctl
+5. Inject an interrupt for specific virtqueue with the VDUSE_VQ_INJECT_IRQ ioctl
after the used ring is filled.
Enabling ASID (API version 1)
@@ -238,11 +247,11 @@ version 1. Set it up with ioctl(VDUSE_SET_API_VERSION) on `/dev/vduse/control`
and pass `VDUSE_API_VERSION_1` before creating a new VDUSE instance with
ioctl(VDUSE_CREATE_DEV).
-Afterwards, you can use the member asid of ioctl(VDUSE_VQ_SETUP) argument to
-select the address space of the IOTLB you are querying. The driver could
-change the address space of any virtqueue group by using the
-VDUSE_SET_VQ_GROUP_ASID VDUSE message type, and the VDUSE instance needs to
-reply with VDUSE_REQ_RESULT_OK if it was possible to change it.
+Afterwards, ioctl(VDUSE_VQ_SETUP) takes a virtqueue group index in
+struct vduse_vq_config::group. The driver can change the address space
+of any virtqueue group by using the VDUSE_SET_VQ_GROUP_ASID message type,
+and the VDUSE instance needs to reply with VDUSE_REQ_RESULT_OK if it was
+possible to change it.
Similarly, you can use ioctl(VDUSE_IOTLB_GET_FD2) to obtain the file descriptor
describing an IOVA region of a specific ASID. Example usage:
diff --git a/Documentation/virt/coco/sev-guest.rst b/Documentation/virt/coco/sev-guest.rst
index 93debceb6eb0..3371ebc29e8b 100644
--- a/Documentation/virt/coco/sev-guest.rst
+++ b/Documentation/virt/coco/sev-guest.rst
@@ -38,7 +38,7 @@ along with a description:
are not detailed, but errors with specific meanings are.
The guest ioctl should be issued on a file descriptor of the /dev/sev-guest
-device. The ioctl accepts struct snp_user_guest_request. The input and
+device. The ioctl accepts struct snp_guest_request_ioctl. The input and
output structure is specified through the req_data and resp_data field
respectively. If the ioctl fails to execute due to a firmware error, then
the fw_error code will be set, otherwise fw_error will be set to -1.
diff --git a/MAINTAINERS b/MAINTAINERS
index a53620839407..6e50747a621c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -113,7 +113,7 @@ F: net/6lowpan/
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/
+W: https://wireless.docs.kernel.org/en/latest/
Q: https://patchwork.kernel.org/project/linux-wireless/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
@@ -4275,13 +4275,13 @@ M: Nick Kossifidis <mickflemm@gmail.com>
M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath5k.html
F: drivers/net/wireless/ath/ath5k/
ATHEROS ATH6KL WIRELESS DRIVER
L: linux-wireless@vger.kernel.org
S: Orphan
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath6kl.html
F: drivers/net/wireless/ath/ath6kl/
ATI_REMOTE2 DRIVER
@@ -4569,14 +4569,14 @@ B43 WIRELESS DRIVER
L: linux-wireless@vger.kernel.org
L: b43-dev@lists.infradead.org
S: Orphan
-W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43.html
F: drivers/net/wireless/broadcom/b43/
B43LEGACY WIRELESS DRIVER
L: linux-wireless@vger.kernel.org
L: b43-dev@lists.infradead.org
S: Orphan
-W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43.html
F: drivers/net/wireless/broadcom/b43legacy/
BACKLIGHT CLASS/SUBSYSTEM
@@ -5946,7 +5946,7 @@ CARL9170 LINUX COMMUNITY WIRELESS DRIVER
M: Christian Lamparter <chunkeey@googlemail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/en/users/Drivers/carl9170
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/carl9170.html
F: drivers/net/wireless/ath/carl9170/
CAVIUM I2C DRIVER
@@ -12196,7 +12196,6 @@ F: Documentation/mm/hugetlbfs_reserv.rst
F: Documentation/mm/vmemmap_dedup.rst
F: fs/hugetlbfs/
F: include/linux/hugetlb.h
-F: include/linux/vmemmap-optimization.h
F: include/trace/events/hugetlbfs.h
F: mm/hugetlb.c
F: mm/hugetlb_cgroup.c
@@ -13677,7 +13676,7 @@ INTEL WIRELESS WIFI LINK (iwlwifi)
M: Miri Korenblit <miriam.rachel.korenblit@intel.com>
L: linux-wireless@vger.kernel.org
S: Supported
-W: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/iwlwifi.html
T: git https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git/
F: drivers/net/wireless/intel/iwlwifi/
@@ -15790,7 +15789,7 @@ MAC80211
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/
+W: https://wireless.docs.kernel.org/en/latest/
Q: https://patchwork.kernel.org/project/linux-wireless/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
@@ -17430,10 +17429,8 @@ F: Documentation/ABI/testing/sysfs-kernel-mm-cma
F: Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers
F: Documentation/ABI/testing/sysfs-kernel-mm-numa
F: Documentation/admin-guide/mm/
-F: Documentation/core-api/memory-allocation.rst
-F: Documentation/core-api/mm-api.rst
F: Documentation/mm/
-F: mm/char-mem.c
+F: drivers/char/mem.c
F: include/linux/cma.h
F: include/linux/dmapool.h
F: include/linux/ioremap.h
@@ -17592,7 +17589,6 @@ F: Documentation/admin-guide/mm/transhuge.rst
F: include/linux/huge_mm.h
F: include/linux/khugepaged.h
F: include/trace/events/huge_memory.h
-F: mm/collapse.h
F: mm/huge_memory.c
F: mm/khugepaged.c
F: mm/mm_slot.h
@@ -17639,7 +17635,7 @@ L: linux-mm@kvack.org
S: Maintained
W: http://www.linux-mm.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
-F: mm/char-mem.c
+F: drivers/char/mem.c
F: include/trace/events/mmap.h
F: fs/proc/task_mmu.c
F: fs/proc/task_nommu.c
@@ -19097,7 +19093,7 @@ NETWORKING DRIVERS (WIRELESS)
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/
+W: https://wireless.docs.kernel.org/en/latest/
Q: https://patchwork.kernel.org/project/linux-wireless/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
@@ -20787,7 +20783,7 @@ P54 WIRELESS DRIVER
M: Christian Lamparter <chunkeey@googlemail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/p54.html
F: Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
F: drivers/net/wireless/intersil/
@@ -22477,7 +22473,7 @@ M: Jeff Johnson <jjohnson@kernel.org>
L: linux-wireless@vger.kernel.org
L: ath12k@lists.infradead.org
S: Supported
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath12k.html
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath12k/
N: ath12k
@@ -22487,7 +22483,7 @@ M: Jeff Johnson <jjohnson@kernel.org>
L: linux-wireless@vger.kernel.org
L: ath10k@lists.infradead.org
S: Supported
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath10k.html
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath10k/
N: ath10k
@@ -22497,8 +22493,8 @@ M: Jeff Johnson <jjohnson@kernel.org>
L: linux-wireless@vger.kernel.org
L: ath11k@lists.infradead.org
S: Supported
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
-B: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath11k.html
+B: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath11k/bugreport.html
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath11k/
N: ath11k
@@ -22507,7 +22503,7 @@ QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
M: Toke Høiland-Jørgensen <toke@toke.dk>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath9k.html
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
F: drivers/net/wireless/ath/ath9k/
@@ -22859,7 +22855,7 @@ M: Loic Poulain <loic.poulain@oss.qualcomm.com>
L: wcn36xx@lists.infradead.org
L: linux-wireless@vger.kernel.org
S: Supported
-W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/wcn36xx.html
F: drivers/net/wireless/ath/wcn36xx/
QUANTENNA QTNFMAC WIRELESS DRIVER
@@ -23618,7 +23614,7 @@ RFKILL
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
S: Maintained
-W: https://wireless.wiki.kernel.org/
+W: https://wireless.docs.kernel.org/en/latest/
Q: https://patchwork.kernel.org/project/linux-wireless/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
@@ -23706,7 +23702,8 @@ F: drivers/iommu/riscv/
RISC-V MICROCHIP SUPPORT
M: Conor Dooley <conor.dooley@microchip.com>
-M: Daire McNamara <daire.mcnamara@microchip.com>
+R: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
+R: Daire McNamara <daire.mcnamara@microchip.com>
L: linux-riscv@lists.infradead.org
S: Supported
T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/ (dts, soc, firmware)
@@ -23788,6 +23785,7 @@ F: include/linux/mailbox/riscv-rpmi-message.h
RISC-V SPACEMIT SoC Support
M: Yixun Lan <dlan@kernel.org>
+R: Troy Mitchell <troy.mitchell@linux.spacemit.com>
L: linux-riscv@lists.infradead.org
L: spacemit@lists.linux.dev
S: Maintained
@@ -25939,6 +25937,14 @@ S: Maintained
F: Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml
F: sound/soc/spacemit/k1_i2s.c
+SPACEMIT RESET CONTROLLER DRIVER
+M: Guodong Xu <docular.xu@gmail.com>
+L: linux-riscv@lists.infradead.org
+L: spacemit@lists.linux.dev
+S: Maintained
+F: drivers/reset/spacemit/
+F: include/dt-bindings/reset/spacemit,k3-resets.h
+
SPANISH DOCUMENTATION
M: Carlos Bilbao <carlos.bilbao@kernel.org>
R: Avadhut Naik <avadhut.naik@amd.com>
@@ -27731,8 +27737,8 @@ F: drivers/media/platform/ti/vpe/
TI WILINK WIRELESS DRIVERS
L: linux-wireless@vger.kernel.org
S: Orphan
-W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx
-W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/wl12xx.html
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/wl1251.html
F: drivers/net/wireless/ti/
TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
@@ -29616,7 +29622,7 @@ F: drivers/hid/hid-wiimote*
WILOCITY WIL6210 WIRELESS DRIVER
L: linux-wireless@vger.kernel.org
S: Orphan
-W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
+W: https://wireless.docs.kernel.org/en/latest/en/users/drivers/wil6210.html
F: drivers/net/wireless/ath/wil6210/
WINBOND CIR DRIVER
diff --git a/Makefile b/Makefile
index c8087bc6a2f0..8fbe4b056116 100644
--- a/Makefile
+++ b/Makefile
@@ -681,8 +681,8 @@ ifdef building_out_of_srctree
# outputmakefile generates a Makefile in the output directory, if using a
# separate output directory. This allows convenient use of make in the
# output directory.
-# At the same time when output Makefile generated, generate .gitignore to
-# ignore whole output directory
+# At the same time as the output Makefile is generated, generate .gitignore to
+# ignore the whole output directory
ifdef KBUILD_EXTMOD
print_env_for_makefile = \
@@ -1144,7 +1144,7 @@ export CC_FLAGS_NO_FPU
ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0)
# Set the minimal function alignment. Use the newer GCC option
-# -fmin-function-alignment if it is available, or fall back to -falign-funtions.
+# -fmin-function-alignment if it is available, or fall back to -falign-functions.
# See also CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT.
ifdef CONFIG_CC_HAS_MIN_FUNCTION_ALIGNMENT
KBUILD_CFLAGS += -fmin-function-alignment=$(CONFIG_FUNCTION_ALIGNMENT)
diff --git a/Next/SHA1s b/Next/SHA1s
new file mode 100644
index 000000000000..f5e716a608d3
--- /dev/null
+++ b/Next/SHA1s
@@ -0,0 +1,429 @@
+Name SHA1
+---- ----
+origin 9b87fdc9af2fbfcdb5c24a64139685ef80f6573f
+ext4-fixes 981fcc5674e67158d24d23e841523eccba19d0e7
+vfs-brauner-fixes 1abd643f3783ea8f8e273c18697ff0413aa92dc7
+fscrypt-current cee9395acd8043be0644b25c34bfa86623f2b935
+fsverity-current cee9395acd8043be0644b25c34bfa86623f2b935
+btrfs-fixes b63ce33f279ec98bf609cef057ea14010a735bb5
+vfs-fixes 49c5d168a3a8f4eb27d44a2a22b7e8a856ca601f
+erofs-fixes 135d84c66f85426299db01a09d93a79a87af18ba
+nfsd-fixes f76017a7663c4ce5e379f8a8d39f032bdb1fd865
+v9fs-fixes 028ef9c96e96197026887c0f092424679298aae8
+overlayfs-fixes 4549871118cf616eecdd2d939f78e3b9e1dddc48
+fscrypt cee9395acd8043be0644b25c34bfa86623f2b935
+btrfs 0fa0a3b3b2b007ab40e87245152e1328703a317e
+ceph dc173b37415e8f738fc4de477490056b479ddc9f
+cifs 84be9814fb9ba09b8add887508f58176c928c614
+configfs 2251d0ed97c24a9b96fd47c2efb4b51ef1c39aee
+ecryptfs f81cb44f9a4b88d73ee5dec4a1ccdb0232fd2e3f
+dlm ed9b6a1296f10e4881d93dfe6d76013fbbaeee87
+erofs a7d28aa0e9b2c983b915d091f9596f0e3b253355
+exfat 216426aff8f69379f03337857551ca0ed3190361
+ext3 36384189919e923902c2350d2f592924cf921c0d
+ext4 9091c97be34083587a75db174aab51551d8e8543
+f2fs 60105162524e9c839e0fe3cc9d57ffe91c997d9e
+fsverity cee9395acd8043be0644b25c34bfa86623f2b935
+fuse 10bd6b32965265688fa277d166ab224de8e86eb2
+gfs2 700a0a6892f7c0c541d5d23837cfab98cc744d17
+jfs dad98c5b2a05ef744af4c884c97066a3c8cdad61
+ksmbd b3ebcc75b08453494e527cf078d22f323fb4d26d
+nfs fd73f4a6659897191fa0d40695fe370925dd3780
+nfs-anna e053b624f5d36669756990743346157be9f68c34
+nfsd 47e2b4a93936a3037a41cf2103a03a08a37483be
+ntfs 56b4f864e199c67f9bfa61bb8e7dc08f1eb20ce1
+ntfs3 a32e893a077a4b0d3b04c86cb7f69e354a187995
+orangefs 2bc09cb0e9e44c7e622b956332ebfb9b638fd5f7
+overlayfs 1f6ee9be92f8df85a8c9a5a78c20fd39c0c21a95
+ubifs a5e0055eac837a1168c781653943d4a0d9920af3
+v9fs c60ae98c5aa64021751b38ab1313b19d620bf640
+v9fs-ericvh 028ef9c96e96197026887c0f092424679298aae8
+xfs 4266ffdfd7cb8d45b0bf1df999a70b9795feaa75
+zonefs 3a8389d42bdf4213730f4067f8bfa78bae6564ef
+vfs-brauner f30afd22d01612fc4cdc8008071ae5fce2f39665
+vfs 4dda01b67c8662c5d0c53034974cb8280c575a5d
+mm-fixes d743a24a470ff492c1e477e6c12370b46e5a88b4
+fs-current 3a7233820cbe6f5ed35f9821949ddc7d4e889e3b
+kbuild-current 48744e62d4100f71c093c00f710b1d4ab0c66780
+clang-fixes-current df2908090cda368b01ff43709f51890076c56157
+arc-current d12c6a6f0c8fd5b5b41120f7be319f743dae3b4f
+arm-current 1039bffd6ae9c75b42b7d148d6c1106134107b66
+arm64-fixes fdb9ebc7fb7788b8371fbef6c17dc5c8291e1429
+arm-soc-fixes 869e97e66d3f5c37a42571154b103c09778e41cb
+davinci-current cee9395acd8043be0644b25c34bfa86623f2b935
+realtek-fixes dc59e4fea9d83f03bad6bddf3fa2e52491777482
+drivers-memory-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+sophgo-fixes 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
+sophgo-soc-fixes 0af2f6be1b4281385b618cb86ad946eded089ac8
+m68k-current 2f8e3cad53b5c36ab0ed5d3195bfc55c59ea61a5
+powerpc-fixes 0b271f7d7f5ed45bc498a03ce0aa9cfd8402fc71
+s390-fixes dc2136341be9835e70ba7c6b36904cf3683fd029
+net ceac0de741bfb47ca255eee075257b3bb31f0651
+bpf ee363e055895364039bf28348ff13c615afad4ba
+ipsec 96f01b53c2d05e003b040892256de54a586e8529
+netfilter ceac0de741bfb47ca255eee075257b3bb31f0651
+ipvs a401a9d547c50ef34db1088cc1fb9a201a7af657
+wireless 1eeca1d5e0920fbdad6449768fd2d4364e714180
+ath 1eeca1d5e0920fbdad6449768fd2d4364e714180
+iwlwifi d13d5d299c11b7bd3362d5692c56225d9e176664
+wpan 2b4707a149a55e8fa75c9ef32b359d60f470a566
+rdma-fixes 9ff797e516dbc1ecb73701ec4c24055712d44411
+sound-current dbd9d1cbf9700528c8595ab1fa7ef832e79821fe
+sound-asoc-fixes 7abfc3b5d51326858426d78a48ab06c8421dbad7
+regmap-fixes 2e42cade8ff1ff579e77976d9869db4df1feaf74
+regulator-fixes f3e6ef13e24c9f26dca0d35de57fcdf04f78e378
+spi-fixes 095858324f063dba830041f067872f0a08765d2f
+pci-current cee9395acd8043be0644b25c34bfa86623f2b935
+driver-core.current 77be3641f3e3a56e42a5ed889372ef395a933f3c
+tty.current fd73f4a6659897191fa0d40695fe370925dd3780
+usb.current 8c51ea651d043c786c37668c51624bd6b338a0ef
+usb-serial-fixes ae0e61d95677efa778379853e495d748e6efbf95
+phy 486a70ef848264dcf9a57f0bb0452848db9537de
+staging.current df2908090cda368b01ff43709f51890076c56157
+iio-fixes 7d38af8f20239a66e90de7632a79c9425256c574
+watchdog-fixes fd73f4a6659897191fa0d40695fe370925dd3780
+counter-current f1a3a9946aab611dd2200c01ff122f64b033dad2
+char-misc.current 049094c8878062cebd93c8c22d2c13b1d6804e99
+soundwire-fixes aba7b41faeecb7692458095ce6fafc341fe0b80e
+thunderbolt-fixes c230bc2b926d137ed06cd4538dfccf57b80fb9ea
+input-current 85f080fb87ed5cd3e46121be677f52c82f26a0ab
+crypto-current 53cf0f26eece095a3752642151150404bc3351cc
+libcrypto-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+vfio-fixes e242e974e812e7a47e3088860c80d9492fac314f
+kselftest-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+dmaengine-fixes 075bc7b1d3dde5ed43fbaabbc1a69f09b7fc3a47
+backlight-fixes dc59e4fea9d83f03bad6bddf3fa2e52491777482
+mtd-fixes 44b8a0bf5f96e8393312fc34b956766882341f16
+mfd-fixes d5d2d7a8d8be18681a0864f58e3875f1c639e11c
+v4l-dvb-fixes 37bef2170d4c88fc3d708eecf3ef0f4032bc1372
+reset-fixes 71827776667f4e4677a4fa806bcfb24d4b8dd9d7
+mips-fixes 126f16e0a1b353c2ba5c7e2c8626cfa865934f9f
+at91-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+omap-fixes 2fabd2f406d0cf787be47b3bbeea99b30004033d
+tegra-fixes ed3e0ee8a9ec966809774cdca84c4433ad088a85
+kvm-fixes d599822bdb66aeec5ec76297b0fc6efaaeefe07c
+kvms390-fixes f47190b08b71e8482072978373ee88cb2dfbdaf4
+kvm-arm-fixes 089e4f3c4862ba3f29dff2361caa8084879194fd
+hwmon-fixes c702a5f18b780e477eccbbab558e590e9673e4cb
+nvdimm-fixes a8aec14230322ed8f1e8042b6d656c1631d41163
+cxl-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+dma-mapping-fixes 55a8e1451869233db837a97e8f3cbf9983bc8678
+drivers-x86-fixes d144a494d81fcf2d1c5cf58b01c655bb8bafc701
+samsung-krzk-fixes 48f344b3e83211025763ca9bc1c5f3dc544b9613
+pinctrl-samsung-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+pinctrl-qcom-fixes 818103dc7f5998a0d7957fb71d4deecdf4d579e1
+devicetree-fixes 5bb01c657ff9fc807c2c592ca18af34c4fc3bc6f
+dt-krzk-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+scsi-fixes 3d676e458fe0c566f5a62753dc696b6a862fc412
+drm-fixes fd73f4a6659897191fa0d40695fe370925dd3780
+drm-intel-fixes a26204be587c57bd5c54fa513be26c4fd7bf252d
+mmc-fixes 4396d70bb7fec531bcf934fed016b2f3300c670b
+rtc-fixes 254f49634ee16a731174d2ae34bc50bd5f45e731
+gnss-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+hyperv-fixes ec31dc39e835ccde0930daccece8c492d28282fc
+risc-v-fixes b94cec5761d22624d109d859467d7d4ce0a1b88b
+riscv-dt-fixes 0f70fd6f4c1d6c1f2ea298d8dd07c4a4d5dff9af
+riscv-soc-fixes dc59e4fea9d83f03bad6bddf3fa2e52491777482
+fpga-fixes 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
+spdx cee9395acd8043be0644b25c34bfa86623f2b935
+gpio-brgl-fixes 50fd0ada8d37587223001600933270b59cb30e19
+gpio-intel-fixes 32c7f7f80e5f7f2764682fd456054478fc11c8d9
+pinctrl-intel-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+auxdisplay-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+kunit-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+renesas-fixes 8dc2615d5702059b2b71fca6f93c0d7d10ae54cb
+perf-current aadea57f532882d8bab444646863c7ef8a778ff1
+efi-fixes d8809f6931065cbbf3554647a50a65a471ab5983
+battery-fixes a58cbc8b36ec0cd00d2ba3de7d003de818a27523
+iommufd-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+rust-fixes 704340f1cd0dcef829eb62f5b48ae95a2ce17bdf
+w1-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+pmdomain-fixes df2908090cda368b01ff43709f51890076c56157
+i2c-andi-fixes d4d0e2b81c8d16db3b17df70c14b080559a40c74
+i2c-rust-fixes 4eb422482ca5d924d7212ad2ca1cb7ea6f5b524d
+sparc-fixes 254f49634ee16a731174d2ae34bc50bd5f45e731
+clk-fixes 59e0cc31cc5c43586c6eaada62c2c863bfbcbfb5
+thead-clk-fixes dc59e4fea9d83f03bad6bddf3fa2e52491777482
+tenstorrent-clk-fixes 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
+fustini-config-fixes 254f49634ee16a731174d2ae34bc50bd5f45e731
+pwrseq-fixes 242da4318d97380741516b595af3920207b2f0f1
+thead-dt-fixes dc59e4fea9d83f03bad6bddf3fa2e52491777482
+ftrace-fixes 1650a1b6cb1ae6cb99bb4fce21b30ebdf9fc238e
+ring-buffer-fixes 057caace5214da3b457bbd295e1a2ad34d3685ea
+trace-fixes d860c67c051685abb0460b593b193f0f45f4fa92
+tracefs-fixes 07004a8c4b572171934390148ee48c4175c77eed
+spacemit-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+tip-fixes eda0baaf93e90a836609bf8af39fd9cb016c6923
+kexec-fixes a901b0778ae82d46084b55237e65d3a7bb5f0c86
+liveupdate-fixes 3a0b8fa2eb36afc88b62a95f33f0c77c71fa5ded
+drm-msm-fixes a15fac810c76397ec9f62a6fc26c4d7ab6e238a7
+uml-fixes af421e9aed3920c7ac88c24daa48606c7112feca
+fwctl-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+devsec-tsm-fixes c3fd16c3b98ed726294feab2f94f876290bf7b61
+drm-rust-fixes cee9395acd8043be0644b25c34bfa86623f2b935
+tenstorrent-dt-fixes 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
+nfc-fixes 50a0fd24027765eada2532ca27d2056cfe304711
+drm-misc-fixes 6c62dfd2820f0c32b0083668edbe0baca6e10b92
+rust fd73f4a6659897191fa0d40695fe370925dd3780
+rust-interop 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
+rust-alloc 82134823a07b4f45096a287f790c169511859617
+rust-io 86731a2a651e58953fc949573895f2fa6d456841
+rust-pin-init 3b3ff9034a497fb3b8429f6fe8ba5697bc7dcebd
+rust-timekeeping ddb1444d3335129ae87d9796ab1debf41c0ee51b
+rust-xarray c455f19bbe6104debd980bb15515faf716bd81b8
+rust-analyzer 5f45afb8ab04d934fc0601a202f95267ebc20059
+mm 66ebd32b32e4c85ff87fad87f2b0379f9a5d2efa
+mm-nonmm-stable 0d9ff90a5422cc7509258aaaba1e7481df4d332a
+mm-nonmm-unstable 8b508253c39025f0bd7c7fd861d9c02d572b9706
+kbuild 322b0463f30b0a02180c9528e38c2afb73d20fa0
+clang-fixes 0bb666d5f5a2339a5692afb312c2161df9620503
+clang-format 8f0b4cce4481fb22653697cced8d0d04027cb1e8
+perf 91b0782fc9e9d2f0a40b5256146e014802fdbb36
+compiler-attributes 8f0b4cce4481fb22653697cced8d0d04027cb1e8
+dma-mapping 57a57ae077f0f167056fc08f1666678f78e5b147
+asm-generic adbbd9714f8058730f93c8df5c5bf1679456424b
+alpha d58041d2c63e09a1c9083e0e9f4151e487c4e16a
+arm 1a89abc009cb5035d0cb4e5ba48d32b94f30e8e4
+arm64 cee9395acd8043be0644b25c34bfa86623f2b935
+arm-perf cee9395acd8043be0644b25c34bfa86623f2b935
+arm-soc b9bb4134a9583a388704433eef22c82c49963585
+amlogic a2530c83c458a503e55219966217dfd1c36a385e
+asahi-soc 9c0d8280aec9159e4fd361d6f273ef50c16c73b0
+at91 cee9395acd8043be0644b25c34bfa86623f2b935
+bmc cd7d1ef7d74ed5f5a1790a40389bc38382924556
+broadcom c0f2033a9ce4b843ca3e947536a0607ecf982be1
+cix a0cffbd8878c55b12dc4555f883adf3372cecd91
+davinci cee9395acd8043be0644b25c34bfa86623f2b935
+drivers-memory 771c036d72eefe36aa6c953ecf44bee4c000a368
+fsl 31d42d67c6eb66efc058069f426d69abb48ec0dd
+imx-mxs 46d8fa682d263271f3ef7bf95166b124c19d6c62
+mediatek cebd824d439e8acea65a8cfdd7fe7e7a14adf8dc
+mvebu 1dd243147c2fa918eb19cc4f5d67907ff99e7e06
+omap e1743a4a9b0b1bb6249454263f65889936fe9d6f
+qcom 27b3028b7d65cbc44fc5b60d2e977ce55cf186f1
+realtek 3c778f0c9fa36b6b9a26bd2146df24ed4e830ba4
+renesas f94066544077effd53e468e527756ecd756d358a
+reset d373605cd514837d8a6de3d00c786d4bae6dbaf8
+rockchip 32e0f64640d558a0f5410ac5cdd8ebf371c5e6a6
+samsung-krzk de3710de161c0dcb20f822400256c68a8312de4f
+scmi da3f4c5770401f70cb8f3f98cbfffd4a9e832219
+sophgo 76acfee87c74dc0dc7a68a00b70b9c39d1c8428f
+sophgo-soc c8754c7deab4cbfa947fa2d656cbaf83771828ef
+spacemit 12dfeb5b8a2521c26b3439f999143ac091f150c1
+stm32 2f92d900f262a16c8ae02daf53ae2910d07185f5
+sunxi 26910870333e52ac15102dccefad8609f9bd545e
+tee 0044312f9bb824d362aef3ffe929c192abef7f73
+tegra 23f776ce28b3e3a6d23542ddcc15a5b68804b276
+tenstorrent-dt 33583baeb1ba7d328e6a9775d889036900b74cdb
+fustini-config 020e209272bee0b8add8cba21125e4744f034b26
+thead-dt 15d32aaf6300b832814a9930fdbd20efdbc9adcf
+ti 712357fa6b256b0a6bcf9a26b5c52e8bce36680a
+xilinx 20df11b6d06664c1333abdc4d7e8123bf62664e3
+socfpga 012193571177ef6b55956137a7af3127c9fc6c91
+clk 4539402e0b34c8c239208d5f5b90248c040fee89
+clk-imx 39ec460b56b26319d1f31b459e8be7ea34ae9c67
+clk-renesas 8d90c0eeef104553d6b9137becd7f58b468aaa0b
+thead-clk b2ee00d0bf4cca5dd02702fc339d2b523191966f
+tenstorrent-clk 23c8ebc952849b3ba47d04d0ec95daf5cc136061
+csky abb81e5ce7d995baa41556b8125fa59e28ba3be8
+loongarch a2628ce4ddb6873e35380a42396d17a66e704a1a
+m68k cee9395acd8043be0644b25c34bfa86623f2b935
+m68knommu 338b54d48e2741a045eb11b4a35d2e319425d001
+microblaze 98f468b04d5cc3be5382a923f19ab289e0c40fc4
+mips cee9395acd8043be0644b25c34bfa86623f2b935
+openrisc 6620f5e8c11c4f7e41222a86f5c97150cc5f84a5
+parisc-hd 7dfa2e8a7a6bd8e86060bf4ea99b54091b3fd971
+powerpc fd73f4a6659897191fa0d40695fe370925dd3780
+risc-v 77ae27fd98f3b548797c9f22c10ab5cf1c4ada53
+riscv-dt f55a54f07a367ed5c73ae53398a60c01219a6df3
+riscv-soc 00bdd4d4daaae140ff747475ef475facee61a950
+s390 378fa97eada763fefb5508be679df9aae2ad946a
+sh b0aa5e4b087b686575f1b31ce54048b4d059b7b8
+sparc 5b2a3b1a98fb47c593144c2770e012d463952b70
+uml 1590cf0329716306e948a8fc29f1d3ee87d3989f
+xtensa 28722ed2527aa63ac1454013defe718c56032886
+fs-next 5d71d81f4e1edcf3258072089f756d4c00b5fc10
+printk 45b895e5f6ce61d4adfe9295fc509785e4a9f5eb
+pci 08afa8a2e38e82e3ce0babd4a7d358012f8492a6
+pstore 24b8f8dcb9a139a36cf48bfbe935e8dc1f33ed79
+hid 044e1dab0692de204f83393ae97dd59794f2c353
+i2c 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
+i2c-andi 59adeac7050cd3cafb52948fd706a4f84904d110
+i2c-rust 61ddec70c9bcc3d4b0471c8683e57d3b03cecf0a
+i3c cab40cfc9e116acd4d60f95b4b1264cab78f3803
+dmi 1afafbaf749d8e8ec53f8e38efdc731131902b5b
+hwmon-staging 46fde107b4e881f179bf02bca69d8a0020561b3c
+jc_docs 322695d64f868da8d1091ea93c7c8f47bcc41220
+v4l-dvb b38d06ad1e13c32970d58039c154f009b81a3368
+v4l-dvb-next adc218676eef25575469234709c2d87185ca223a
+pm 98c1e0cb36f88bf2dc503c1397cebf26bed2c0c0
+cpufreq-arm d82d896f00e7bf697b61d5df0555941afa8d0657
+cpupower cee9395acd8043be0644b25c34bfa86623f2b935
+devfreq 9a222650d9e70d0027126e4df5b00b1b5b678a97
+pmdomain 26b9ea4f00732908c4f87501483c20ecaaf4eca5
+opp 1f6de65e3314519ce462bfd3a1d29e918f97e4e5
+thermal b115930d716defc3a7daa2bc2ae2465d864b7114
+rdma 3e1de7f906ab162b23d6fe0eabccf687a98fa25f
+net-next 87b80c2f6b05cad9f0ff9136709c62a0f59923e3
+bpf-next 29fcf9ce4bbdf4cc339def776860e1c0095bca98
+ipsec-next 6ebcf5074cff0402730c6981d2397139fee6322d
+mlx5-next 36b1d3299d0b6aa51485cc9a79b8d94948d5f3d4
+netfilter-next 87b80c2f6b05cad9f0ff9136709c62a0f59923e3
+ipvs-next 6ebcf5074cff0402730c6981d2397139fee6322d
+bluetooth 2e63b55654e0ea35cbc4fae20244026718f56755
+wireless-next 3b35f726c20d138fafa154182ee926a419306269
+ath-next c3bace8584ca707e34ba837f65c2e9d566af4c2c
+iwlwifi-next 4a2610a5a9fcf77eaad82bb030ec77ec5e381db8
+wpan-next a6bfdfcc6711d1d5a92e98644359dedc67c0c858
+wpan-staging a6bfdfcc6711d1d5a92e98644359dedc67c0c858
+mtd 8fcbb04ee5152b303980b2b48d69c6f7f4094ca6
+nand 7e874b1750a40f3dc9a629aeb72eba09c77f77e9
+spi-nor a96edc3f0b4f036a5b6ebc9b1eca4273ef5ce2d0
+crypto 75ed7550da436aeefbe86c1d3e46d9d7e4fcc940
+libcrypto cee9395acd8043be0644b25c34bfa86623f2b935
+drm 14d6074f52d3af2b27565e6957b92dceeb8b00da
+drm-exynos 3a8660878839faadb4f1a6dd72c3179c1df56787
+drm-misc f1bcb90506a9a6be4d44dc85034f8acc48a49c29
+amdgpu 9f725dd80ae781ac046420e0e53ffe5b3bcfa44b
+drm-intel ee00f8fbb2b202002ab90834e02e9ba372773a36
+drm-msm a15fac810c76397ec9f62a6fc26c4d7ab6e238a7
+drm-msm-lumag 140b13475302601368c0cf4e193e66126a49feb3
+drm-xe 9c8ed392385177546fdd65e4463e292f0f647c6c
+drm-rust 66a2c223b620d844fe26c6bd4844d2a6a8c9dffc
+drm-nova 93296e9d9528f0d87f2cf3fee494599060a0f14a
+etnaviv 6bde14ba5f7ef59e103ac317df6cc5ac4291ff4a
+fbdev 7bb1d95a44f20ecceae407ceddb98996a3ae2bd8
+regmap 070a698c9b2309803bf4dd009996e48dcac4ccd0
+sound ad563e61f576b269e09e53232a1809541c87c8c1
+ieee1394 a20545fbf9226591017fc371bdfb1bfd490b0e0b
+sound-asoc 3e96ebae30f7184b7d781112a9b191eb5b615b16
+modules a22f1497700e1b4b1d6285b7884cc1da3ffbba43
+input fcc1d6eab4ce4ba86ae05a87ecf7ce06cd2ca4d8
+block 2dd9768a37dbb99398c5e332485dbb107ac397c8
+device-mapper db0e36567224b207d532ef752367f5b5dbb00b7d
+libata 52d19459ca79fef362126e472b9e9a3bfc5020b8
+pcmcia b3c26ea81ccc522e77ed0b1707add61fc9206216
+mmc ddcec9ed9f24e92679994e04b6f302981b4c8115
+mfd 5a5f978cf3cd2f50b9e123f851f5c6577519ee89
+backlight cee9395acd8043be0644b25c34bfa86623f2b935
+battery 4fc88ba435dadbc05990951e3f3fbd8ccd2df140
+regulator 44064abfb54051584efc8747378deeb1cb1e133a
+security 63b4c8561b436e8950409d6041fce43f12936f59
+apparmor cee9395acd8043be0644b25c34bfa86623f2b935
+integrity 6903878d4654bdef4e08e38cdf1ae306ce7de5f9
+selinux 7f0636181232e94db614de23026a78b061fc823f
+smack fedc88e38ce979a720cd2de042578cb5df3dc8de
+tomoyo 1fc5a74b108fc90951890ec513ac81869f5eaff1
+tpmdd-tpm b5f1b25b21f56c9fff87ad0235791883d1bf01a9
+tpmdd-keys 8697c431e297eb0d0ab13dda6bc172b48a34f05c
+watchdog 385c2df0776831412ab60daa987ebdd7ac631a89
+iommu b63c3c26726576e2a87baeee80bc202a5a43c9e5
+audit ca12826b4aac898318e7359bf7a1b1532ae02d2d
+devicetree 8273a4059c41748d21a7dfc076407396ddca25b5
+dt-krzk 6bd34d56818cc881a75c789ad6ce8ec4a1e32f3a
+mailbox 14af7a96afa39f4f3c1972705489b9ba15c01857
+spi bfbb7ef974fa06df012450e4cd7ae15a2446f27b
+tip 9d957098a0d4c4bda17534c491d1aa6083f4a780
+kexec 4d17a004cfd5489f88ad0a7a151dea11a533338b
+liveupdate 25c3605f491885d69e3d1006f02fa61ab7e0976f
+clockevents 1b8b356b4b06e3a28feb852c04e06caeac07bc87
+edac ff2ba4ce4abcd9deff9703c56aa3ba10969b37e3
+ftrace 6dc993d4520fdaa083c8871e5fee443117d87057
+rcu 9cc63f8bcd560c760d0b12e15bba8f81c86237cf
+paulmck d60bdc990308754af31c1860fffadf3de8c00025
+kvm d4b7fb647204f0c81dfeae2d1a708e4d858e0c94
+kvm-arm 8476ce1f1e949a4eae0c0b8f06cf6ab51a3edfd0
+kvms390 dd6f4ef6f8a37412909ad787c837332fb070159c
+kvm-ppc fd73f4a6659897191fa0d40695fe370925dd3780
+kvm-riscv b5060a4aa33d7d78a8c1837ab08ef0c81ea96650
+kvm-x86 70c944caf570fda2d79baa71435589a8db39f048
+xen-tip d330fb86a7170f845123ae82d95df440fad9b707
+percpu 8f0b4cce4481fb22653697cced8d0d04027cb1e8
+workqueues 9d4815c14f7faf789aeaa63515024168daf0390c
+sched-ext 55019197345f60a3712e7701828c2c973bd11d43
+drivers-x86 cee9395acd8043be0644b25c34bfa86623f2b935
+chrome-platform 5859f97c6f404d07e89fe9c0d20a318ebf200bd1
+chrome-platform-firmware 0e30b98a545991e440a947fb24f9df4ded9798f0
+hsi e81250ec6b69248b00d38c523dc6a13efaf38aab
+leds-lj 4805e5ec50d0b355370e3d1ea906af4fc758accf
+ipmi 89a312991dc6e638a36adc43ccb91dbc25504c04
+driver-core d3bdf70cf0e862d7f1641522c32e55764cd5b481
+usb 600334ef2f29b975485ce062a81fcfa00bd3ef45
+thunderbolt 5da91c3694b8060b651aab5d95b2e4729c6e2b56
+usb-serial 6583f9741341b98ade67aa764794a02fea1eb7db
+tty fd73f4a6659897191fa0d40695fe370925dd3780
+char-misc df2908090cda368b01ff43709f51890076c56157
+coresight 9e3604d7369cfc0110100eb1a0acab1865ee2d18
+fastrpc ef071c4906eb45d16b60f09154cf0bc6ec8f5435
+fpga a0906012699dded6ca1525c30ba86738f90587a8
+icc 7ae6fbdd9651729c5f61499061adbf3eae1684a1
+iio 746ce4dd0ea41825a1dfa5e9d8c22e46a4cf7101
+nfc cee9395acd8043be0644b25c34bfa86623f2b935
+phy-next 8bc74189b12e3d094d45eb82946c1fa17569fc93
+soundwire 90b63b309fd6c0f192337659e73e3047a67df99f
+extcon 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
+gnss cee9395acd8043be0644b25c34bfa86623f2b935
+vfio 4e3c1fc8abcb8eff062150b4340fa4569696d645
+w1 813a5b9a3c9f6cee830b1e23343fbd2359683557
+spmi 8cdeaa50eae8dad34885515f62559ee83e7e8dda
+staging 8444548bd905f22093729065408284a6b46f7eee
+counter-next 353b2e09f44a91e64c6b8117df46b6999c52e465
+mux ac7bde3c53166656d80e3aacc7d274d3c60a6de4
+dmaengine 0a8dda0a15d3926422d286567f945a05328a4ac6
+cgroup 02f890299bd9a8de7d4a83aecb4a882ea98fc70e
+scsi c037ebe671f86f32aa73eaa78e20e7f24017e41d
+scsi-mkp f07317a8d57f382ec505597816271dd72ffa20c7
+vhost dd886653d2038a510a21bff476fa1be0422a4fb9
+rpmsg da48e73dfe057b9fd4dc136ebbccc154a0130f8b
+gpio-brgl ea4f5a734cd7625ab161ead75403aded18c0c5ab
+gpio-intel 32c7f7f80e5f7f2764682fd456054478fc11c8d9
+pinctrl c4ac5623606bef2d64386fd68d19a870f264c693
+pinctrl-intel c016587866e573fa8dff50c3bdae9734c4418099
+pinctrl-renesas 0cd4a7b3a4883970df3ae8814d9aabdecf65a81e
+pinctrl-samsung cee9395acd8043be0644b25c34bfa86623f2b935
+pinctrl-qcom d29bfb93a19771b822dab6d7adbbbaf188cb1db5
+pwm 17dbb6938d3ab444cd6be1c95506450595a8800d
+ktest 932cdaf3e273a2727e77af97f79f12577174c5a0
+kselftest cee9395acd8043be0644b25c34bfa86623f2b935
+kunit cee9395acd8043be0644b25c34bfa86623f2b935
+kunit-next e38f53f0482468efd04397f66bda4648b70ac9fa
+livepatching 5d791d3396ca4c9e5fd9d20b49386c20d8179eb8
+rtc afce9701d6423a63194a349d2f1e34c50ce76482
+nvdimm e99cb3ecd8334ca21e01ff9a79a916693f58f1fb
+at24 dc59e4fea9d83f03bad6bddf3fa2e52491777482
+ntb dc59e4fea9d83f03bad6bddf3fa2e52491777482
+seccomp 41fa04327384148b0e2e828c9be9862c5240e9fa
+slimbus cee9395acd8043be0644b25c34bfa86623f2b935
+nvmem 8f596c13b6b7fa9fa35091273c37f9b6e3fc2d0f
+hyperv be0cfab740e58b70047ef6e7e3d578f00ed5d258
+auxdisplay c868291c2b3d74d5f1cae748a9452b340b21f1d1
+kgdb fdbdd0ccb30af18d3b29e714ac8d5ab6163279e0
+hmm cee9395acd8043be0644b25c34bfa86623f2b935
+cfi dc59e4fea9d83f03bad6bddf3fa2e52491777482
+mhi 83c29a55b89e0de6e15bcc6c21b16b4b75ec3e89
+cxl d7ed7d0fd69c40c25cfabca043574ca85410fcf5
+zstd 65d1f5507ed2c78c64fce40e44e5574a9419eb09
+efi bb6cbbb42c3a4b1d949dbe0efdd5f7c952a9d7b0
+unicode a511442085c140da9cdbe60e3f0fab1c71480801
+random 703749b069d53b55f92499e088b30b031e47b8f9
+landlock e26307d83048803274837abf33f65396a88e21ac
+sysctl c5c4ca25387e3cefd1af64edf9187546b6d06787
+execve ab11176bd3a76058ecafd066d0f9c718dc80f389
+bitmap cf72cbb39da84b6f02f90c07f33b102fc10b16f0
+hte 30167fadbf87fa901a2fee49c30a5c5a506a43e8
+kspp 7cada81883e820152b5cd3da038be10238b79738
+nolibc 319b153f400a510e15029ce92c9c9b8981aa8bf9
+iommufd fe85c40e992be9578b8cdfa992d9e23005e25e77
+turbostat 1c996a37fd244d19e5dbb715328c1676e28ef607
+pwrseq 935ecc5c86c5ae2693b2fbff83fc1bd086a9c915
+capabilities-next 9b0ee13b80798feb0e6a83a6d69e915f23fcb6bc
+ipe 87c77c3cd372f0f621daac6f7b5ff67ebe682840
+kcsan a8488ecbd7ba44d65b912dfe88a73f438eba2447
+crc cee9395acd8043be0644b25c34bfa86623f2b935
+keys-next 965e9a2cf23b066d8bdeb690dff9cd7089c5f667
+fwctl cee9395acd8043be0644b25c34bfa86623f2b935
+devsec-tsm 3177779ae17db4c66c851f799505fb95c7530c03
+hisilicon a5db65458a911daa6f8927264366dab501715dc0
+device-id 995832b2cebe6969d1b42635db698803ee31294d
+kthread fa39ec4f89f2637ed1cdbcde3656825951787668
+pagemap-headers e02cb91d4644dfff593146f89e70d2008cc6ac16
diff --git a/Next/Trees b/Next/Trees
new file mode 100644
index 000000000000..bc01a105fda1
--- /dev/null
+++ b/Next/Trees
@@ -0,0 +1,429 @@
+Trees included into this release:
+
+Name Url
+---- ---
+origin https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#master
+ext4-fixes https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git#fixes
+vfs-brauner-fixes https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git#vfs.fixes
+fscrypt-current https://git.kernel.org/pub/scm/fs/fscrypt/linux.git#for-current
+fsverity-current https://git.kernel.org/pub/scm/fs/fsverity/linux.git#for-current
+btrfs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git#next-fixes
+vfs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git#fixes
+erofs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git#fixes
+nfsd-fixes https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux#nfsd-fixes
+v9fs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git#fixes/next
+overlayfs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git#ovl-fixes
+fscrypt https://git.kernel.org/pub/scm/fs/fscrypt/linux.git#for-next
+btrfs https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git#for-next
+ceph https://github.com/ceph/ceph-client.git#master
+cifs https://git.manguebit.org/linux.git#cifs-next
+configfs https://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux.git#configfs-next
+ecryptfs https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git#next
+dlm https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git#next
+erofs https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git#dev
+exfat https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git#dev
+ext3 https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git#for_next
+ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git#dev
+f2fs https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git#dev
+fsverity https://git.kernel.org/pub/scm/fs/fsverity/linux.git#for-next
+fuse https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#for-next
+gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git#for-next
+jfs https://github.com/kleikamp/linux-shaggy.git#jfs-next
+ksmbd https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb.git#ksmbd-for-next
+nfs git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git#linux-next
+nfs-anna git://git.linux-nfs.org/projects/anna/linux-nfs.git#linux-next
+nfsd https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux#nfsd-next
+ntfs https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git#ntfs-next
+ntfs3 https://github.com/Paragon-Software-Group/linux-ntfs3.git#master
+orangefs https://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git#for-next
+overlayfs https://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git#overlayfs-next
+ubifs https://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git#next
+v9fs https://github.com/martinetd/linux#9p-next
+v9fs-ericvh https://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git#ericvh/for-next
+xfs https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git#for-next
+zonefs https://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs.git#for-next
+vfs-brauner https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git#vfs.all
+vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git#for-next
+mm-fixes https://git.kernel.org/pub/scm/linux/kernel/git/mm/linux.git#for-next-fixes
+kbuild-current https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git#kbuild-fixes-for-next
+clang-fixes-current https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git#clang-fixes-for-current
+arc-current https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git#for-curr
+arm-current https://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux.git#fixes
+arm64-fixes https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux#for-next/fixes
+arm-soc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git#arm/fixes
+davinci-current https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#davinci/for-current
+realtek-fixes https://git.kernel.org/pub/scm/linux/kernel/git/yu_chun/linux.git#fixes
+drivers-memory-fixes https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git#fixes
+sophgo-fixes https://github.com/sophgo/linux.git#fixes
+sophgo-soc-fixes https://github.com/sophgo/linux.git#soc-fixes
+m68k-current https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git#for-linus
+powerpc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git#fixes
+s390-fixes https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git#fixes
+net https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git#main
+bpf https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/#master
+ipsec https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git#master
+netfilter https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git#main
+ipvs https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git#main
+wireless https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git#for-next
+ath https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git#for-current
+iwlwifi https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git#fixes
+wpan https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan.git#master
+rdma-fixes https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git#for-rc
+sound-current https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git#for-linus
+sound-asoc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git#for-linus
+regmap-fixes https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git#for-linus
+regulator-fixes https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git#for-linus
+spi-fixes https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git#for-linus
+pci-current https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git#for-linus
+driver-core.current https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git#driver-core-linus
+tty.current https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git#tty-linus
+usb.current https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git#usb-linus
+usb-serial-fixes https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git#usb-linus
+phy https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git#fixes
+staging.current https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git#staging-linus
+iio-fixes https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git#fixes-togreg
+watchdog-fixes https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git#watchdog
+counter-current https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git#counter-current
+char-misc.current https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git#char-misc-linus
+soundwire-fixes https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git#fixes
+thunderbolt-fixes https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git#fixes
+input-current https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git#for-linus
+crypto-current https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git#master
+libcrypto-fixes https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git#libcrypto-fixes
+vfio-fixes https://github.com/awilliam/linux-vfio.git#for-linus
+kselftest-fixes https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git#fixes
+dmaengine-fixes https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git#fixes
+backlight-fixes https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git#for-backlight-fixes
+mtd-fixes https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#mtd/fixes
+mfd-fixes https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git#for-mfd-fixes
+v4l-dvb-fixes git://linuxtv.org/media-ci/media-pending.git#fixes
+reset-fixes https://git.kernel.org/pub/scm/linux/kernel/git/pza/linux#reset/fixes
+mips-fixes https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git#mips-fixes
+at91-fixes https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git#at91-fixes
+omap-fixes https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git#fixes
+tegra-fixes https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git#fixes
+kvm-fixes git://git.kernel.org/pub/scm/virt/kvm/kvm.git#master
+kvms390-fixes https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git#master
+kvm-arm-fixes https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git#fixes
+hwmon-fixes https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git#hwmon
+nvdimm-fixes https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git#libnvdimm-fixes
+cxl-fixes https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git#fixes
+dma-mapping-fixes https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git#dma-mapping-fixes
+drivers-x86-fixes https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git#fixes
+samsung-krzk-fixes https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git#fixes
+pinctrl-samsung-fixes https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git#fixes
+pinctrl-qcom-fixes https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#pinctrl-qcom/for-current
+devicetree-fixes https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git#dt/linus
+dt-krzk-fixes https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git#fixes
+scsi-fixes https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git#fixes
+drm-fixes https://gitlab.freedesktop.org/drm/kernel.git#drm-fixes
+drm-intel-fixes https://gitlab.freedesktop.org/drm/i915/kernel.git#for-linux-next-fixes
+mmc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git#fixes
+rtc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git#rtc-fixes
+gnss-fixes https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git#gnss-linus
+hyperv-fixes https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git#hyperv-fixes
+risc-v-fixes https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git#fixes
+riscv-dt-fixes https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git#riscv-dt-fixes
+riscv-soc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git#riscv-soc-fixes
+fpga-fixes https://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git#fixes
+spdx https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git#spdx-linus
+gpio-brgl-fixes https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#gpio/for-current
+gpio-intel-fixes https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git#fixes
+pinctrl-intel-fixes https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git#fixes
+auxdisplay-fixes https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git#fixes
+kunit-fixes https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git#kunit-fixes
+renesas-fixes https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git#fixes
+perf-current https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git#perf-tools
+efi-fixes https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git#urgent
+battery-fixes https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git#fixes
+iommufd-fixes https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git#for-rc
+rust-fixes https://github.com/Rust-for-Linux/linux.git#rust-fixes
+w1-fixes https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1.git#fixes
+pmdomain-fixes https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git#fixes
+i2c-andi-fixes https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git#i2c/i2c-fixes
+i2c-rust-fixes https://github.com/ikrtn/rust-for-linux#rust-i2c-fixes
+sparc-fixes https://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc.git#for-linus
+clk-fixes https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git#clk-fixes
+thead-clk-fixes https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#thead-clk-fixes
+tenstorrent-clk-fixes https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git#tenstorrent-clk-fixes
+fustini-config-fixes https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#riscv-config-fixes
+pwrseq-fixes https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#pwrseq/for-current
+thead-dt-fixes https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#thead-dt-fixes
+ftrace-fixes https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git#ftrace/fixes
+ring-buffer-fixes https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git#ring-buffer/fixes
+trace-fixes https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git#trace/fixes
+tracefs-fixes https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git#tracefs/fixes
+spacemit-fixes https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux#fixes
+tip-fixes https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#tip/urgent
+kexec-fixes https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git#kexec-fixes
+liveupdate-fixes https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git#fixes
+drm-msm-fixes https://gitlab.freedesktop.org/drm/msm.git#msm-fixes
+uml-fixes https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git#fixes
+fwctl-fixes https://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl.git#for-rc
+devsec-tsm-fixes https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git#fixes
+drm-rust-fixes https://gitlab.freedesktop.org/drm/rust/kernel.git#for-linux-next-fixes
+tenstorrent-dt-fixes https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git#tenstorrent-dt-fixes
+nfc-fixes https://codeberg.org/linux-nfc/linux.git#for-linus
+drm-misc-fixes https://gitlab.freedesktop.org/drm/misc/kernel.git#for-linux-next-fixes
+rust https://github.com/Rust-for-Linux/linux.git#rust-next
+rust-interop https://github.com/Rust-for-Linux/linux.git#interop-next
+rust-alloc https://github.com/Rust-for-Linux/linux.git#alloc-next
+rust-io https://github.com/Rust-for-Linux/linux.git#io-next
+rust-pin-init https://github.com/Rust-for-Linux/linux.git#pin-init-next
+rust-timekeeping https://github.com/Rust-for-Linux/linux.git#timekeeping-next
+rust-xarray https://github.com/Rust-for-Linux/linux.git#xarray-next
+rust-analyzer https://github.com/Rust-for-Linux/linux.git#rust-analyzer-next
+mm https://git.kernel.org/pub/scm/linux/kernel/git/mm/linux.git#for-next
+mm-nonmm-stable https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm#mm-nonmm-stable
+mm-nonmm-unstable https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm#mm-nonmm-unstable
+kbuild https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git#kbuild-for-next
+clang-fixes https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git#clang-fixes-for-next
+clang-format https://github.com/ojeda/linux.git#clang-format
+perf https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git#perf-tools-next
+compiler-attributes https://github.com/ojeda/linux.git#compiler-attributes
+dma-mapping https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git#dma-mapping-for-next
+asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic#master
+alpha https://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git#alpha-next
+arm https://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux.git#for-next
+arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux#for-next/core
+arm-perf https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git#for-next/perf
+arm-soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git#for-next
+amlogic https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git#for-next
+asahi-soc https://github.com/AsahiLinux/linux.git#asahi-soc/for-next
+at91 https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git#at91-next
+bmc https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux.git#for-next
+broadcom https://github.com/Broadcom/stblinux.git#next
+cix https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/cix.git#for-next
+davinci https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#davinci/for-next
+drivers-memory https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git#for-next
+fsl https://git.kernel.org/pub/scm/linux/kernel/git/chleroy/linux.git#soc_fsl
+imx-mxs https://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux.git#for-next
+mediatek https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git#for-next
+mvebu https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git#for-next
+omap https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git#for-next
+qcom https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git#for-next
+realtek https://git.kernel.org/pub/scm/linux/kernel/git/yu_chun/linux.git#for-next
+renesas https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git#next
+reset https://git.kernel.org/pub/scm/linux/kernel/git/pza/linux#reset/next
+rockchip https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git#for-next
+samsung-krzk https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git#for-next
+scmi https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git#for-linux-next
+sophgo https://github.com/sophgo/linux.git#for-next
+sophgo-soc https://github.com/sophgo/linux.git#soc-for-next
+spacemit https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux#for-next
+stm32 https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git#stm32-next
+sunxi https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git#sunxi/for-next
+tee https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee.git#next
+tegra https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git#for-next
+tenstorrent-dt https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git#tenstorrent-dt-for-next
+fustini-config https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#riscv-config-for-next
+thead-dt https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#thead-dt-for-next
+ti https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git#ti-next
+xilinx https://github.com/Xilinx/linux-xlnx.git#for-next
+socfpga https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git#for-next
+clk https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git#clk-next
+clk-imx https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git#for-next
+clk-renesas https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#renesas-clk
+thead-clk https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git#thead-clk-for-next
+tenstorrent-clk https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git#tenstorrent-clk-for-next
+csky https://github.com/c-sky/csky-linux.git#linux-next
+loongarch https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git#loongarch-next
+m68k https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git#for-next
+m68knommu https://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git#for-next
+microblaze git://git.monstr.eu/linux-2.6-microblaze.git#next
+mips https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git#mips-next
+openrisc https://github.com/openrisc/linux.git#for-next
+parisc-hd https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git#for-next
+powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git#next
+risc-v https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git#for-next
+riscv-dt https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git#riscv-dt-for-next
+riscv-soc https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git#riscv-soc-for-next
+s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git#for-next
+sh https://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux.git#for-next
+sparc https://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc.git#for-next
+uml https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git#next
+xtensa https://github.com/jcmvbkbc/linux-xtensa.git#xtensa-for-next
+printk https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git#for-next
+pci https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git#next
+pstore https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git#for-next/pstore
+hid https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git#for-next
+i2c https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git#i2c/for-next
+i2c-andi https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git#i2c/i2c-next
+i2c-rust https://github.com/ikrtn/rust-for-linux#rust-i2c-next
+i3c https://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git#i3c/next
+dmi https://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git#dmi-for-next
+hwmon-staging https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git#hwmon-next
+jc_docs git://git.lwn.net/linux.git#docs-next
+v4l-dvb git://linuxtv.org/media-ci/media-pending.git#next
+v4l-dvb-next git://linuxtv.org/mchehab/media-next.git#master
+pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git#linux-next
+cpufreq-arm https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git#cpufreq/arm/linux-next
+cpupower https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git#cpupower
+devfreq https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git#devfreq-next
+pmdomain https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git#next
+opp https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git#opp/linux-next
+thermal https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git#thermal/linux-next
+rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git#for-next
+net-next https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git#main
+bpf-next https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git#for-next
+ipsec-next https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git#master
+mlx5-next https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git#mlx5-next
+netfilter-next https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git#main
+ipvs-next https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git#main
+bluetooth https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git#master
+wireless-next https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git#for-next
+ath-next https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git#for-next
+iwlwifi-next https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git#next
+wpan-next https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next.git#master
+wpan-staging https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next.git#staging
+mtd https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#mtd/next
+nand https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#nand/next
+spi-nor https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#spi-nor/next
+crypto https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git#master
+libcrypto https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git#libcrypto-next
+drm https://gitlab.freedesktop.org/drm/kernel.git#drm-next
+drm-exynos https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git#for-linux-next
+drm-misc https://gitlab.freedesktop.org/drm/misc/kernel.git#for-linux-next
+amdgpu https://gitlab.freedesktop.org/agd5f/linux.git#drm-next
+drm-intel https://gitlab.freedesktop.org/drm/i915/kernel.git#for-linux-next
+drm-msm https://gitlab.freedesktop.org/drm/msm.git#msm-next
+drm-msm-lumag https://gitlab.freedesktop.org/lumag/msm.git#msm-next-lumag
+drm-xe https://gitlab.freedesktop.org/drm/xe/kernel.git#drm-xe-next
+drm-rust https://gitlab.freedesktop.org/drm/rust/kernel.git#for-linux-next
+drm-nova https://gitlab.freedesktop.org/drm/nova.git#nova-next
+etnaviv https://git.pengutronix.de/git/lst/linux#etnaviv/next
+fbdev https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git#for-next
+regmap https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git#for-next
+sound https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git#for-next
+ieee1394 https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git#for-next
+sound-asoc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git#for-next
+modules https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git#modules-next
+input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git#next
+block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git#for-next
+device-mapper https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git#for-next
+libata https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux#for-next
+pcmcia https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git#pcmcia-next
+mmc https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git#next
+mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git#for-mfd-next
+backlight https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git#for-backlight-next
+battery https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git#for-next
+regulator https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git#for-next
+security https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git#next
+apparmor https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor#apparmor-next
+integrity https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity#next-integrity
+selinux https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git#next
+smack https://github.com/cschaufler/smack-next#next
+tomoyo git://git.code.sf.net/p/tomoyo/tomoyo.git#master
+tpmdd-tpm https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git#for-next-tpm
+tpmdd-keys https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git#for-next-keys
+watchdog https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git#watchdog-next
+iommu https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git#next
+audit https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git#next
+devicetree https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git#for-next
+dt-krzk https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git#for-next
+mailbox https://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox.git#for-next
+spi https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git#for-next
+tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#master
+kexec https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git#kexec-next
+liveupdate https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git#next
+clockevents https://git.kernel.org/pub/scm/linux/kernel/git/daniel.lezcano/linux.git#timers/drivers/next
+edac https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git#edac-for-next
+ftrace https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git#for-next
+rcu https://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux#next
+paulmck https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git#non-rcu/next
+kvm git://git.kernel.org/pub/scm/virt/kvm/kvm.git#next
+kvm-arm https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git#next
+kvms390 https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git#next
+kvm-ppc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git#topic/ppc-kvm
+kvm-riscv https://github.com/kvm-riscv/linux.git#riscv_kvm_next
+kvm-x86 https://github.com/kvm-x86/linux.git#next
+xen-tip https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git#linux-next
+percpu https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git#for-next
+workqueues https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git#for-next
+sched-ext https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git#for-next
+drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git#for-next
+chrome-platform https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git#for-next
+chrome-platform-firmware https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git#for-firmware-next
+hsi https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git#for-next
+leds-lj https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git#for-leds-next
+ipmi https://github.com/cminyard/linux-ipmi.git#for-next
+driver-core https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git#driver-core-next
+usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git#usb-next
+thunderbolt https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git#next
+usb-serial https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git#usb-next
+tty https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git#tty-next
+char-misc https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git#char-misc-next
+coresight https://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git#next
+fastrpc https://git.kernel.org/pub/scm/linux/kernel/git/srini/fastrpc.git#for-next
+fpga https://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git#for-next
+icc https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc.git#icc-next
+iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git#togreg
+nfc https://codeberg.org/linux-nfc/linux.git#for-next
+phy-next https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git#next
+soundwire https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git#next
+extcon https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git#extcon-next
+gnss https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git#gnss-next
+vfio https://github.com/awilliam/linux-vfio.git#next
+w1 https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1.git#for-next
+spmi https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git#spmi-next
+staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git#staging-next
+counter-next https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git#counter-next
+mux https://gitlab.com/peda-linux/mux.git#for-next
+dmaengine https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git#next
+cgroup https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git#for-next
+scsi https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git#for-next
+scsi-mkp https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git#for-next
+vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git#linux-next
+rpmsg https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git#for-next
+gpio-brgl https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#gpio/for-next
+gpio-intel https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git#for-next
+pinctrl https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git#for-next
+pinctrl-intel https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git#for-next
+pinctrl-renesas https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#renesas-pinctrl
+pinctrl-samsung https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git#for-next
+pinctrl-qcom https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#pinctrl-qcom/for-next
+pwm https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git#pwm/for-next
+ktest https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git#for-next
+kselftest https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git#next
+kunit https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git#test
+kunit-next https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git#kunit
+livepatching https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git#for-next
+rtc https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git#rtc-next
+nvdimm https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git#libnvdimm-for-next
+at24 https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#at24/for-next
+ntb https://github.com/jonmason/ntb.git#ntb-next
+seccomp https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git#for-next/seccomp
+slimbus https://git.kernel.org/pub/scm/linux/kernel/git/srini/slimbus.git#for-next
+nvmem https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git#for-next
+hyperv https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git#hyperv-next
+auxdisplay https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git#for-next
+kgdb https://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux.git#kgdb/for-next
+hmm https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git#hmm
+cfi https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#cfi/next
+mhi https://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git#mhi-next
+cxl https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git#next
+zstd https://github.com/terrelln/linux.git#zstd-next
+efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git#next
+unicode https://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git#for-next
+random https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git#master
+landlock https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git#next
+sysctl https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git#sysctl-next
+execve https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git#for-next/execve
+bitmap https://github.com/norov/linux.git#bitmap-for-next
+hte https://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux.git#for-next
+kspp https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git#for-next/kspp
+nolibc https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git#for-next
+iommufd https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git#for-next
+turbostat https://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git#next
+pwrseq https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git#pwrseq/for-next
+capabilities-next https://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git#caps-next
+ipe https://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe.git#next
+kcsan https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git#next
+crc https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git#crc-next
+keys-next https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git#keys-next
+fwctl https://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl.git#for-next
+devsec-tsm https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git#next
+hisilicon https://github.com/hisilicon/linux-hisi.git#for-next
+device-id https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git#device-id-rework
+kthread https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git#for-next
+pagemap-headers git://git.infradead.org/users/willy/pagecache.git#headers
diff --git a/Next/merge.log b/Next/merge.log
new file mode 100644
index 000000000000..a58f5b70d2b0
--- /dev/null
+++ b/Next/merge.log
@@ -0,0 +1,10623 @@
+$ date -R
+Wed, 16 Sep 2026 11:38:11 +0100
+$ git checkout master
+Already on 'master'
+$ git reset --hard stable
+Updating files: 62% (4159/6691) Updating files: 63% (4216/6691) Updating files: 64% (4283/6691) Updating files: 65% (4350/6691) Updating files: 66% (4417/6691) Updating files: 67% (4483/6691) Updating files: 68% (4550/6691) Updating files: 69% (4617/6691) Updating files: 70% (4684/6691) Updating files: 71% (4751/6691) Updating files: 72% (4818/6691) Updating files: 73% (4885/6691) Updating files: 74% (4952/6691) Updating files: 75% (5019/6691) Updating files: 76% (5086/6691) Updating files: 77% (5153/6691) Updating files: 78% (5219/6691) Updating files: 79% (5286/6691) Updating files: 80% (5353/6691) Updating files: 81% (5420/6691) Updating files: 82% (5487/6691) Updating files: 83% (5554/6691) Updating files: 84% (5621/6691) Updating files: 85% (5688/6691) Updating files: 86% (5755/6691) Updating files: 87% (5822/6691) Updating files: 88% (5889/6691) Updating files: 89% (5955/6691) Updating files: 90% (6022/6691) Updating files: 91% (6089/6691) Updating files: 92% (6156/6691) Updating files: 93% (6223/6691) Updating files: 94% (6290/6691) Updating files: 95% (6357/6691) Updating files: 96% (6424/6691) Updating files: 97% (6491/6691) Updating files: 98% (6558/6691) Updating files: 99% (6625/6691) Updating files: 100% (6691/6691) Updating files: 100% (6691/6691), done.
+HEAD is now at 587858367581b Merge tag 'nfsd-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
+Merging origin/master (9b87fdc9af2fb Merge tag 'sched_ext-for-7.3-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git origin/master
+Updating 587858367581b..9b87fdc9af2fb
+Fast-forward (no commit created; -m option ignored)
+ kernel/cgroup/cgroup.c | 7 +-
+ kernel/sched/ext/ext.c | 142 ++++++++++++++++++++------
+ kernel/sched/ext/idle.c | 11 ++-
+ kernel/sched/ext/internal.h | 12 ++-
+ kernel/sched/ext/sub.c | 12 ++-
+ kernel/time/jiffies.c | 16 +--
+ tools/sched_ext/include/scx/common.bpf.h | 1 +
+ tools/sched_ext/scx_qmap.bpf.c | 164 +++++++++++++++++++++----------
+ tools/sched_ext/scx_qmap.h | 3 +
+ 9 files changed, 269 insertions(+), 99 deletions(-)
+Merging ext4-fixes/fixes (981fcc5674e67 jbd2: fix deadlock in jbd2_journal_cancel_revoke())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git ext4-fixes/fixes
+Already up to date.
+Merging vfs-brauner-fixes/vfs.fixes (1abd643f3783e fs/ntfs3: use d_instantiate_new() in ntfs_create_inode() and murder syzbot's "WARNING in do_new_mount" saga)
+$ git merge -m Merge branch 'vfs.fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-brauner-fixes/vfs.fixes
+Merge made by the 'ort' strategy.
+ fs/ntfs3/inode.c | 7 ++-----
+ tools/testing/selftests/Makefile | 5 ++++-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+Merging fscrypt-current/for-current (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-current' of https://git.kernel.org/pub/scm/fs/fscrypt/linux.git fscrypt-current/for-current
+Already up to date.
+Merging fsverity-current/for-current (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-current' of https://git.kernel.org/pub/scm/fs/fsverity/linux.git fsverity-current/for-current
+Already up to date.
+Merging btrfs-fixes/next-fixes (b63ce33f279ec Merge branch 'misc-7.3' into next-fixes)
+$ git merge -m Merge branch 'next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git btrfs-fixes/next-fixes
+Merge made by the 'ort' strategy.
+Merging vfs-fixes/fixes (49c5d168a3a8f udf: fix nls leak on udf_fill_super() failure)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git vfs-fixes/fixes
+Auto-merging fs/udf/super.c
+Merge made by the 'ort' strategy.
+Merging erofs-fixes/fixes (135d84c66f854 erofs: add missing buf->off in erofs_bread())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git erofs-fixes/fixes
+Already up to date.
+Merging nfsd-fixes/nfsd-fixes (f76017a7663c4 nfsd: fix handling of NFSEXP_PNFS in the netlink codepath)
+$ git merge -m Merge branch 'nfsd-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-fixes/nfsd-fixes
+Already up to date.
+Merging v9fs-fixes/fixes/next (028ef9c96e961 Linux 7.0)
+$ git merge -m Merge branch 'fixes/next' of https://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git v9fs-fixes/fixes/next
+Already up to date.
+Merging overlayfs-fixes/ovl-fixes (4549871118cf6 Linux 7.1-rc7)
+$ git merge -m Merge branch 'ovl-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git overlayfs-fixes/ovl-fixes
+Already up to date.
+Merging fscrypt/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/fs/fscrypt/linux.git fscrypt/for-next
+Already up to date.
+Merging btrfs/for-next (0fa0a3b3b2b00 Merge branch 'for-next-next-v7.3-20260909' into for-next-20260909)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git btrfs/for-next
+Merge made by the 'ort' strategy.
+ fs/btrfs/Kconfig | 1 +
+ fs/btrfs/bio.c | 163 ++---
+ fs/btrfs/bio.h | 9 +-
+ fs/btrfs/block-group.c | 461 +------------
+ fs/btrfs/block-group.h | 16 +-
+ fs/btrfs/btrfs_inode.h | 22 +-
+ fs/btrfs/compression.c | 20 +-
+ fs/btrfs/ctree.c | 4 +-
+ fs/btrfs/delalloc-space.c | 13 +-
+ fs/btrfs/delayed-inode.c | 115 +++-
+ fs/btrfs/delayed-inode.h | 22 +-
+ fs/btrfs/dev-replace.c | 11 +-
+ fs/btrfs/dir-item.c | 41 +-
+ fs/btrfs/dir-item.h | 5 +-
+ fs/btrfs/disk-io.c | 108 +--
+ fs/btrfs/extent-io-tree.c | 2 +-
+ fs/btrfs/extent-tree.c | 10 +
+ fs/btrfs/extent_io.c | 64 +-
+ fs/btrfs/extent_map.c | 8 +
+ fs/btrfs/file-item.c | 46 +-
+ fs/btrfs/free-space-cache.c | 1337 +-------------------------------------
+ fs/btrfs/free-space-cache.h | 29 +-
+ fs/btrfs/fs.c | 2 +-
+ fs/btrfs/fs.h | 4 +-
+ fs/btrfs/inode.c | 337 ++++------
+ fs/btrfs/ioctl.c | 41 +-
+ fs/btrfs/ordered-data.c | 27 +-
+ fs/btrfs/qgroup.c | 126 ++--
+ fs/btrfs/qgroup.h | 16 +-
+ fs/btrfs/raid56.c | 57 +-
+ fs/btrfs/relocation.c | 2 +-
+ fs/btrfs/send.c | 2 +-
+ fs/btrfs/space-info.c | 2 -
+ fs/btrfs/space-info.h | 4 -
+ fs/btrfs/super.c | 48 +-
+ fs/btrfs/sysfs.c | 129 +---
+ fs/btrfs/tests/extent-io-tests.c | 131 ++--
+ fs/btrfs/transaction.c | 40 +-
+ fs/btrfs/transaction.h | 29 +-
+ fs/btrfs/tree-checker.c | 66 +-
+ fs/btrfs/tree-log.c | 8 +-
+ fs/btrfs/verity.c | 31 +-
+ fs/btrfs/volumes.c | 55 +-
+ fs/btrfs/volumes.h | 1 +
+ fs/btrfs/zlib.c | 10 +-
+ fs/btrfs/zoned.c | 26 +-
+ fs/btrfs/zstd.c | 73 ++-
+ include/uapi/linux/btrfs_tree.h | 25 +-
+ 48 files changed, 940 insertions(+), 2859 deletions(-)
+Merging ceph/master (dc173b37415e8 ceph: apply nearfull_sync option on remount)
+$ git merge -m Merge branch 'master' of https://github.com/ceph/ceph-client.git ceph/master
+Already up to date.
+Merging cifs/cifs-next (84be9814fb9ba smb: client: fix use-after-free of iface in cifs_try_adding_channels())
+$ git merge -m Merge branch 'cifs-next' of https://git.manguebit.org/linux.git cifs/cifs-next
+Merge made by the 'ort' strategy.
+ fs/smb/client/connect.c | 9 +++++
+ fs/smb/client/file.c | 4 +-
+ fs/smb/client/reparse.c | 58 +++++++++++++++++----------
+ fs/smb/client/reparse.h | 7 ++--
+ fs/smb/client/sess.c | 104 +++++++++++++++++++++++++++++-------------------
+ 5 files changed, 114 insertions(+), 68 deletions(-)
+Merging configfs/configfs-next (2251d0ed97c24 configfs: unhash the dentry before dropping the item in rmdir)
+$ git merge -m Merge branch 'configfs-next' of https://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux.git configfs/configfs-next
+Merge made by the 'ort' strategy.
+Merging ecryptfs/next (f81cb44f9a4b8 ecryptfs: ecryptfs_kernel.h: clean up kernel-doc comments)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git ecryptfs/next
+Already up to date.
+Merging dlm/next (ed9b6a1296f10 dlm: wait for outstanding SRCU callbacks to complete in exit paths)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git dlm/next
+Merge made by the 'ort' strategy.
+ fs/dlm/config.c | 30 ++++++++++++++++++++++++++++--
+ fs/dlm/dlm_internal.h | 5 +++++
+ fs/dlm/lock.c | 18 +++++++++++++-----
+ fs/dlm/lock.h | 4 ++--
+ fs/dlm/lowcomms.c | 1 +
+ fs/dlm/midcomms.c | 1 +
+ fs/dlm/plock.c | 14 +++++++++++++-
+ fs/dlm/user.c | 23 +++++++++++++++++++++++
+ 8 files changed, 86 insertions(+), 10 deletions(-)
+Merging erofs/dev (a7d28aa0e9b2c erofs: simplify z_erofs_gbuf_growsize())
+$ git merge -m Merge branch 'dev' of https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git erofs/dev
+Already up to date.
+Merging exfat/dev (216426aff8f69 MAINTAINERS: add exFAT documentation)
+$ git merge -m Merge branch 'dev' of https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git exfat/dev
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ Documentation/filesystems/exfat.rst | 117 ++++++++++++++++++++++++++++++++++++
+ Documentation/filesystems/index.rst | 1 +
+ MAINTAINERS | 1 +
+ fs/exfat/dir.c | 52 ++++++++++++++--
+ fs/exfat/exfat_fs.h | 1 +
+ fs/exfat/fatent.c | 19 +++---
+ fs/exfat/iomap.c | 28 ++++++++-
+ fs/exfat/namei.c | 7 ++-
+ fs/exfat/super.c | 30 +++++++--
+ 9 files changed, 234 insertions(+), 22 deletions(-)
+ create mode 100644 Documentation/filesystems/exfat.rst
+Merging ext3/for_next (36384189919e9 Pull reviewer addition.)
+$ git merge -m Merge branch 'for_next' of https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git ext3/for_next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 1 +
+ fs/ext2/Makefile | 2 +
+ fs/ext2/balloc.c | 4 ++
+ fs/ext2/ext2.h | 19 ++++++----
+ fs/ext2/inode.c | 7 ++++
+ fs/ext2/super.c | 33 +++++++++-------
+ fs/isofs/compress.c | 77 +++++++++++++++++++++-----------------
+ fs/isofs/inode.c | 2 +
+ fs/isofs/isofs.h | 2 +
+ fs/isofs/rock.c | 11 +++++-
+ fs/notify/fanotify/fanotify_user.c | 2 +-
+ fs/ocfs2/quota_local.c | 4 ++
+ fs/udf/inode.c | 52 ++++++++++++++++++++++---
+ fs/udf/misc.c | 15 ++++----
+ fs/udf/super.c | 5 ++-
+ include/linux/once_lite.h | 8 ++--
+ mm/shmem_quota.c | 5 +++
+ 17 files changed, 174 insertions(+), 75 deletions(-)
+Merging ext4/dev (9091c97be3408 ext4: fix estimate extent index blocks in ext4_ext_index_trans_blocks())
+$ git merge -m Merge branch 'dev' of https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git ext4/dev
+Already up to date.
+Merging f2fs/dev (60105162524e9 f2fs: stop using PG_private)
+$ git merge -m Merge branch 'dev' of https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git f2fs/dev
+Merge made by the 'ort' strategy.
+ fs/f2fs/checkpoint.c | 90 +++++++-------
+ fs/f2fs/compress.c | 10 +-
+ fs/f2fs/data.c | 123 +++++++++++---------
+ fs/f2fs/debug.c | 4 +-
+ fs/f2fs/dir.c | 51 ++++----
+ fs/f2fs/extent_cache.c | 13 ++-
+ fs/f2fs/f2fs.h | 151 +++++++++++++++++-------
+ fs/f2fs/file.c | 89 +++++++-------
+ fs/f2fs/gc.c | 33 +++---
+ fs/f2fs/inline.c | 13 +--
+ fs/f2fs/inode.c | 43 +++----
+ fs/f2fs/node.c | 303 +++++++++++++++++++++++++-----------------------
+ fs/f2fs/node.h | 159 ++++++++++++++-----------
+ fs/f2fs/recovery.c | 66 +++++------
+ fs/f2fs/segment.c | 124 +++++++++++++++-----
+ fs/f2fs/segment.h | 32 ++---
+ fs/f2fs/shrinker.c | 2 +-
+ fs/f2fs/super.c | 88 +++++++++-----
+ fs/f2fs/sysfs.c | 10 +-
+ fs/f2fs/verity.c | 6 +-
+ fs/f2fs/xattr.c | 10 +-
+ fs/f2fs/xattr.h | 11 +-
+ include/linux/f2fs_fs.h | 137 ++++++++++++----------
+ 23 files changed, 907 insertions(+), 661 deletions(-)
+Merging fsverity/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/fs/fsverity/linux.git fsverity/for-next
+Already up to date.
+Merging fuse/for-next (10bd6b3296526 fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git fuse/for-next
+Auto-merging fs/fuse/file.c
+Merge made by the 'ort' strategy.
+ fs/fuse/dax.c | 1 +
+ fs/fuse/file.c | 7 ++++--
+ fs/fuse/fuse_i.h | 9 +++++++
+ fs/fuse/inode.c | 28 ++++++++++++++++++++++
+ fs/fuse/ioctl.c | 3 ---
+ fs/fuse/req.c | 7 +++---
+ include/uapi/linux/fuse.h | 12 +++++++++-
+ .../testing/selftests/filesystems/fuse/.gitignore | 1 +
+ tools/testing/selftests/filesystems/fuse/Makefile | 2 +-
+ 9 files changed, 59 insertions(+), 11 deletions(-)
+Merging gfs2/for-next (700a0a6892f7c gfs2: Fix the return value in gfs2_get_link() kernel-doc)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git gfs2/for-next
+Merge made by the 'ort' strategy.
+ fs/gfs2/acl.c | 11 +++--
+ fs/gfs2/aops.c | 17 +++----
+ fs/gfs2/bmap.c | 93 +++++++++++++++++++++----------------
+ fs/gfs2/dentry.c | 6 +--
+ fs/gfs2/dir.c | 61 +++++++++++++++---------
+ fs/gfs2/export.c | 7 +--
+ fs/gfs2/file.c | 72 +++++++++++++++-------------
+ fs/gfs2/glock.c | 60 ++++++++++++++++--------
+ fs/gfs2/glops.c | 13 ++++--
+ fs/gfs2/incore.h | 8 ++--
+ fs/gfs2/inode.c | 124 +++++++++++++++++++++++++++----------------------
+ fs/gfs2/lock_dlm.c | 4 +-
+ fs/gfs2/log.c | 3 +-
+ fs/gfs2/lops.c | 18 ++++---
+ fs/gfs2/meta_io.c | 7 +--
+ fs/gfs2/ops_fstype.c | 26 +++++------
+ fs/gfs2/quota.c | 57 +++++++++++++----------
+ fs/gfs2/recovery.c | 19 ++++----
+ fs/gfs2/rgrp.c | 129 +++++++++++++++++++++++++++------------------------
+ fs/gfs2/super.c | 98 +++++++++++++++++++++++---------------
+ fs/gfs2/trace_gfs2.h | 6 +--
+ fs/gfs2/util.c | 8 ++--
+ fs/gfs2/xattr.c | 69 ++++++++++++++++-----------
+ 23 files changed, 524 insertions(+), 392 deletions(-)
+Merging jfs/jfs-next (dad98c5b2a05e jfs: avoid -Wtautological-constant-out-of-range-compare warning again)
+$ git merge -m Merge branch 'jfs-next' of https://github.com/kleikamp/linux-shaggy.git jfs/jfs-next
+Already up to date.
+Merging ksmbd/ksmbd-for-next (b3ebcc75b0845 ksmbd: print IPv6 client addresses correctly in procfs)
+$ git merge -m Merge branch 'ksmbd-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb.git ksmbd/ksmbd-for-next
+Merge made by the 'ort' strategy.
+ Documentation/filesystems/smb/ksmbd.rst | 14 +-
+ fs/smb/server/Kconfig | 2 +
+ fs/smb/server/Makefile | 1 +
+ fs/smb/server/connection.c | 74 +++-
+ fs/smb/server/connection.h | 6 +
+ fs/smb/server/ksmbd_work.c | 3 -
+ fs/smb/server/ksmbd_work.h | 5 +-
+ fs/smb/server/mgmt/user_session.c | 128 +++++-
+ fs/smb/server/mgmt/user_session.h | 8 +-
+ fs/smb/server/proc.c | 2 +
+ fs/smb/server/server.c | 2 +-
+ fs/smb/server/smb2pdu.c | 684 +++++++++++++-------------------
+ fs/smb/server/smb2pdu.h | 3 +-
+ fs/smb/server/smbacl.c | 7 +-
+ fs/smb/server/stats.h | 1 +
+ fs/smb/server/tests/Kconfig | 15 +
+ fs/smb/server/tests/Makefile | 4 +
+ fs/smb/server/tests/smbacl_kunit.c | 301 ++++++++++++++
+ fs/smb/server/transport_tcp.c | 1 +
+ fs/smb/server/vfs.c | 12 +-
+ fs/smb/server/vfs.h | 5 +
+ fs/smb/server/vfs_cache.c | 48 ---
+ fs/smb/server/vfs_cache.h | 6 -
+ 23 files changed, 845 insertions(+), 487 deletions(-)
+ create mode 100644 fs/smb/server/tests/Kconfig
+ create mode 100644 fs/smb/server/tests/Makefile
+ create mode 100644 fs/smb/server/tests/smbacl_kunit.c
+$ git am -3 ../patches/0001-ntfs3-Fix-up-merge-with-Linus.patch
+Applying: ntfs3: Fix up merge with Linus
+Using index info to reconstruct a base tree...
+M fs/ntfs3/file.c
+Falling back to patching base and 3-way merge...
+Auto-merging fs/ntfs3/file.c
+No changes -- Patch already applied.
+Merging nfs/linux-next (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'linux-next' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git nfs/linux-next
+Already up to date.
+Merging nfs-anna/linux-next (e053b624f5d36 NFSv4.2: fix nfs4_listxattr size accounting)
+$ git merge -m Merge branch 'linux-next' of git://git.linux-nfs.org/projects/anna/linux-nfs.git nfs-anna/linux-next
+Already up to date.
+Merging nfsd/nfsd-next (47e2b4a93936a lockd: Serialize block retries against host teardown)
+$ git merge -m Merge branch 'nfsd-next' of https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd/nfsd-next
+Auto-merging MAINTAINERS
+Auto-merging fs/nfsd/export.c
+Merge made by the 'ort' strategy.
+ Documentation/admin-guide/nfs/pnfs-scsi-server.rst | 2 +-
+ MAINTAINERS | 3 +-
+ fs/lockd/svc.c | 1 -
+ fs/lockd/svclock.c | 33 +-
+ fs/lockd/trace.h | 1 -
+ fs/lockd/xdr.h | 2 +-
+ fs/namei.c | 2 +
+ fs/nfs/nfs4file.c | 1 +
+ fs/nfs/super.c | 25 -
+ fs/nfs_common/nfs_ssc.c | 126 +++--
+ fs/nfsd/blocklayout.c | 1 +
+ fs/nfsd/blocklayoutxdr.c | 11 +
+ fs/nfsd/export.c | 8 +-
+ fs/nfsd/export.h | 3 +-
+ fs/nfsd/filecache.c | 1 +
+ fs/nfsd/flexfilelayout.c | 24 +-
+ fs/nfsd/flexfilelayoutxdr.c | 9 +-
+ fs/nfsd/flexfilelayoutxdr.h | 8 +-
+ fs/nfsd/localio.c | 10 +-
+ fs/nfsd/lockd.c | 5 +-
+ fs/nfsd/netns.h | 17 +-
+ fs/nfsd/nfs2acl.c | 48 +-
+ fs/nfsd/nfs3acl.c | 1 +
+ fs/nfsd/nfs3proc.c | 79 ++-
+ fs/nfsd/nfs3xdr.c | 4 +
+ fs/nfsd/nfs4acl.c | 1 +
+ fs/nfsd/nfs4callback.c | 8 +-
+ fs/nfsd/nfs4ctl.h | 83 +++
+ fs/nfsd/nfs4idmap.c | 1 +
+ fs/nfsd/nfs4layouts.c | 1 +
+ fs/nfsd/nfs4proc.c | 435 ++++++++++------
+ fs/nfsd/nfs4recover.c | 1 +
+ fs/nfsd/nfs4state.c | 568 ++++++++++++++++++---
+ fs/nfsd/nfs4xdr.c | 145 +++++-
+ fs/nfsd/nfscache.c | 1 +
+ fs/nfsd/nfsctl.c | 15 +-
+ fs/nfsd/nfsd.h | 237 +--------
+ fs/nfsd/nfserr.h | 158 ++++++
+ fs/nfsd/nfsfh.c | 73 +--
+ fs/nfsd/nfsfh.h | 28 +-
+ fs/nfsd/nfsproc.c | 20 +-
+ fs/nfsd/nfssvc.c | 8 +
+ fs/nfsd/nfsxdr.c | 1 +
+ fs/nfsd/state.h | 46 +-
+ fs/nfsd/vfs.c | 298 +++++------
+ fs/nfsd/vfs.h | 39 +-
+ fs/nfsd/xdr.h | 6 +-
+ fs/nfsd/xdr3.h | 2 +-
+ fs/nfsd/xdr4.h | 154 +-----
+ fs/nfsd/xdr4cb.h | 20 +-
+ include/linux/nfs.h | 55 +-
+ include/linux/nfs3.h | 8 +
+ include/linux/nfs4.h | 6 +
+ include/linux/nfs_fh.h | 63 +++
+ include/linux/nfs_ssc.h | 69 +--
+ include/linux/nfsd_ssc.h | 38 ++
+ include/linux/nfslocalio.h | 11 +-
+ include/trace/misc/nfs.h | 11 +
+ net/sunrpc/svcauth_unix.c | 9 +
+ net/sunrpc/svcsock.c | 489 +++++++++++-------
+ net/sunrpc/xprtsock.c | 66 ++-
+ 61 files changed, 2263 insertions(+), 1336 deletions(-)
+ create mode 100644 fs/nfsd/nfs4ctl.h
+ create mode 100644 fs/nfsd/nfserr.h
+ create mode 100644 include/linux/nfs_fh.h
+ create mode 100644 include/linux/nfsd_ssc.h
+$ git am -3 ../patches/0001-Revert-smb-client-implement-fileattr_get-to-support-.patch
+Applying: Revert "smb: client: implement fileattr_get to support FS_IOC_GETFLAGS"
+Using index info to reconstruct a base tree...
+M fs/smb/client/cifsfs.c
+M fs/smb/client/cifsfs.h
+M fs/smb/client/inode.c
+Falling back to patching base and 3-way merge...
+Auto-merging fs/smb/client/inode.c
+Auto-merging fs/smb/client/cifsfs.h
+Auto-merging fs/smb/client/cifsfs.c
+No changes -- Patch already applied.
+Merging ntfs/ntfs-next (56b4f864e199c ntfs: avoid truncate and writeback deadlock)
+$ git merge -m Merge branch 'ntfs-next' of https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git ntfs/ntfs-next
+Auto-merging fs/ntfs/compress.c
+Auto-merging fs/ntfs/mft.c
+Auto-merging fs/ntfs/super.c
+Merge made by the 'ort' strategy.
+ fs/ntfs/attrib.c | 268 ++++++++++++++++++++++++-------
+ fs/ntfs/attrib.h | 9 ++
+ fs/ntfs/attrlist.c | 228 +++++++++++++++++++++++++--
+ fs/ntfs/attrlist.h | 2 +
+ fs/ntfs/collate.c | 2 +-
+ fs/ntfs/compress.c | 2 +-
+ fs/ntfs/file.c | 3 +-
+ fs/ntfs/inode.c | 98 +++++++-----
+ fs/ntfs/mft.c | 455 +++++++++++++++++++++++++++++++++++++++++------------
+ fs/ntfs/mft.h | 2 +-
+ fs/ntfs/namei.c | 2 +-
+ fs/ntfs/reparse.c | 2 +-
+ fs/ntfs/super.c | 28 ++--
+ fs/ntfs/volume.h | 12 +-
+ 14 files changed, 873 insertions(+), 240 deletions(-)
+Merging ntfs3/master (a32e893a077a4 fs/ntfs3: zero frame pages on read error)
+$ git merge -m Merge branch 'master' of https://github.com/Paragon-Software-Group/linux-ntfs3.git ntfs3/master
+Merge made by the 'ort' strategy.
+ Documentation/filesystems/ntfs3.rst | 23 +++++++++++++++++++++++
+ fs/ntfs3/attrib.c | 10 ++++++----
+ fs/ntfs3/frecord.c | 5 +++++
+ fs/ntfs3/super.c | 2 +-
+ fs/ntfs3/xattr.c | 6 ++++--
+ 5 files changed, 39 insertions(+), 7 deletions(-)
+Merging orangefs/for-next (2bc09cb0e9e44 orangefs: don't continue on to gpf if client dies on write.)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git orangefs/for-next
+Merge made by the 'ort' strategy.
+ fs/orangefs/inode.c | 21 ++++++++++++++++++++-
+ fs/orangefs/orangefs-debugfs.c | 10 ++++++----
+ fs/orangefs/super.c | 18 ++++++++++++++++++
+ 3 files changed, 44 insertions(+), 5 deletions(-)
+Merging overlayfs/overlayfs-next (1f6ee9be92f8d ovl: make fsync after metadata copy-up opt-in mount option)
+$ git merge -m Merge branch 'overlayfs-next' of https://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git overlayfs/overlayfs-next
+Already up to date.
+Merging ubifs/next (a5e0055eac837 UBI: support per-device wear-leveling threshold)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git ubifs/next
+Already up to date.
+Merging v9fs/9p-next (c60ae98c5aa64 9p: Fix v9fs_issue_write() to update i_size and remote_i_size)
+$ git merge -m Merge branch '9p-next' of https://github.com/martinetd/linux v9fs/9p-next
+Already up to date.
+Merging v9fs-ericvh/ericvh/for-next (028ef9c96e961 Linux 7.0)
+$ git merge -m Merge branch 'ericvh/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git v9fs-ericvh/ericvh/for-next
+Already up to date.
+Merging xfs/for-next (4266ffdfd7cb8 xfs: remove an extra cast in xfs_file_compat_ioctl)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git xfs/for-next
+Merge made by the 'ort' strategy.
+ fs/xfs/xfs_ioctl.c | 381 ++++++++++++++++++++++++++++++---------------------
+ fs/xfs/xfs_ioctl.h | 4 +-
+ fs/xfs/xfs_ioctl32.c | 188 ++++++++++++++-----------
+ fs/xfs/xfs_rtalloc.h | 49 ++++++-
+ 4 files changed, 376 insertions(+), 246 deletions(-)
+Merging zonefs/for-next (3a8389d42bdf4 zonefs: handle integer overflow in zonefs_fname_to_fno)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs.git zonefs/for-next
+Already up to date.
+Merging vfs-brauner/vfs.all (731d51b121c7d Merge branch 'vfs-7.4.shared.net-next.pidfd' into vfs.all)
+$ git merge -m Merge branch 'vfs.all' of https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-brauner/vfs.all
+Auto-merging Documentation/filesystems/index.rst
+Auto-merging MAINTAINERS
+Auto-merging fs/9p/vfs_addr.c
+Auto-merging fs/dax.c
+Auto-merging fs/gfs2/inode.c
+Auto-merging fs/gfs2/log.c
+Auto-merging fs/gfs2/lops.c
+Auto-merging fs/namei.c
+Auto-merging fs/nfsd/vfs.c
+Merge made by the 'ort' strategy.
+ CREDITS | 2 +-
+ Documentation/admin-guide/binfmt-misc.rst | 3 +
+ Documentation/filesystems/befs.rst | 4 +-
+ Documentation/filesystems/bfs.rst | 60 -
+ Documentation/filesystems/index.rst | 1 -
+ Documentation/filesystems/porting.rst | 2 +-
+ Documentation/filesystems/proc.rst | 4 +
+ Documentation/filesystems/squashfs.rst | 6 +-
+ MAINTAINERS | 8 +-
+ arch/alpha/include/uapi/asm/socket.h | 4 +
+ arch/mips/configs/malta_defconfig | 1 -
+ arch/mips/configs/malta_kvm_defconfig | 1 -
+ arch/mips/configs/maltaup_xpa_defconfig | 1 -
+ arch/mips/configs/rm200_defconfig | 1 -
+ arch/mips/include/uapi/asm/socket.h | 4 +
+ arch/parisc/include/uapi/asm/socket.h | 4 +
+ arch/powerpc/Kconfig | 1 -
+ arch/powerpc/configs/fsl-emb-nonhw.config | 1 -
+ arch/powerpc/configs/ppc6xx_defconfig | 1 -
+ arch/powerpc/include/asm/elf.h | 6 -
+ arch/powerpc/include/asm/spu.h | 3 -
+ arch/powerpc/platforms/cell/Kconfig | 1 -
+ arch/powerpc/platforms/cell/spu_syscalls.c | 20 -
+ arch/powerpc/platforms/cell/spufs/Makefile | 1 -
+ arch/powerpc/platforms/cell/spufs/coredump.c | 183 --
+ arch/powerpc/platforms/cell/spufs/file.c | 114 --
+ arch/powerpc/platforms/cell/spufs/spufs.h | 12 -
+ arch/powerpc/platforms/cell/spufs/syscalls.c | 4 -
+ arch/sparc/include/uapi/asm/socket.h | 4 +
+ drivers/base/devtmpfs.c | 108 +-
+ fs/9p/vfs_addr.c | 1 -
+ fs/9p/vfs_inode.c | 3 +
+ fs/9p/vfs_inode_dotl.c | 3 +
+ fs/Kconfig | 9 +-
+ fs/Makefile | 1 -
+ fs/adfs/dir.c | 2 +-
+ fs/afs/file.c | 7 +-
+ fs/afs/internal.h | 2 +-
+ fs/aio.c | 11 +-
+ fs/bfs/Kconfig | 21 -
+ fs/bfs/Makefile | 8 -
+ fs/bfs/bfs.h | 69 -
+ fs/bfs/dir.c | 356 ----
+ fs/bfs/file.c | 203 --
+ fs/bfs/inode.c | 538 ------
+ fs/binfmt_elf.c | 18 +-
+ fs/binfmt_elf_fdpic.c | 14 +-
+ fs/binfmt_misc.c | 12 +-
+ fs/bpf_fs_kfuncs.c | 4 +-
+ fs/buffer.c | 131 +-
+ fs/cachefiles/Kconfig | 2 +-
+ fs/cachefiles/interface.c | 10 +-
+ fs/cachefiles/internal.h | 4 +-
+ fs/cachefiles/io.c | 25 +-
+ fs/ceph/Kconfig | 1 +
+ fs/ceph/addr.c | 4 +-
+ fs/ceph/file.c | 3 +
+ fs/char_dev.c | 4 +-
+ fs/coredump.c | 547 ++++--
+ fs/dax.c | 26 +-
+ fs/dcache.c | 27 +-
+ fs/devpts/inode.c | 2 +
+ fs/exec.c | 13 +-
+ fs/exfat/misc.c | 2 +-
+ fs/ext2/xattr.c | 2 +-
+ fs/ext4/ext4_jbd2.c | 2 +-
+ fs/ext4/mmp.c | 2 +-
+ fs/fat/misc.c | 2 +-
+ fs/file.c | 111 +-
+ fs/fs-writeback.c | 6 +-
+ fs/fs_pin.c | 9 +-
+ fs/fuse/dir.c | 3 +
+ fs/gfs2/inode.c | 3 +
+ fs/gfs2/log.c | 4 +-
+ fs/gfs2/lops.c | 4 +-
+ fs/inode.c | 2 +-
+ fs/internal.h | 2 +
+ fs/iomap/buffered-io.c | 8 +-
+ fs/iomap/direct-io.c | 2 +-
+ fs/jbd2/commit.c | 22 +-
+ fs/jbd2/journal.c | 31 +-
+ fs/jbd2/transaction.c | 2 +-
+ fs/kernfs/dir.c | 112 +-
+ fs/kernfs/kernfs-internal.h | 18 +-
+ fs/kernfs/mount.c | 34 +-
+ fs/kernfs/symlink.c | 17 +-
+ fs/namei.c | 227 ++-
+ fs/namespace.c | 4 +-
+ fs/netfs/Kconfig | 3 +
+ fs/netfs/Makefile | 2 +-
+ fs/netfs/buffered_read.c | 37 +-
+ fs/netfs/buffered_write.c | 66 +-
+ fs/netfs/direct_read.c | 14 +-
+ fs/netfs/direct_write.c | 8 +-
+ fs/netfs/fscache_cookie.c | 8 +-
+ fs/netfs/fscache_io.c | 10 +-
+ fs/netfs/internal.h | 68 +-
+ fs/netfs/iterator.c | 2 +-
+ fs/netfs/main.c | 1 -
+ fs/netfs/misc.c | 10 +-
+ fs/netfs/objects.c | 6 +-
+ fs/netfs/read_collect.c | 14 +-
+ fs/netfs/read_pgpriv2.c | 13 +-
+ fs/netfs/read_retry.c | 5 +-
+ fs/netfs/read_single.c | 12 +-
+ fs/netfs/stats.c | 4 +-
+ fs/netfs/write_collect.c | 25 +-
+ fs/netfs/write_issue.c | 123 +-
+ fs/netfs/write_retry.c | 5 +-
+ fs/nfs/Kconfig | 1 +
+ fs/nfs/dir.c | 6 +
+ fs/nfsd/vfs.c | 13 +-
+ fs/ocfs2/buffer_head_io.c | 12 +-
+ fs/ocfs2/journal.c | 25 +-
+ fs/omfs/inode.c | 4 +-
+ fs/open.c | 76 +-
+ fs/pidfs.c | 27 +-
+ fs/proc/base.c | 43 +-
+ fs/smb/client/dir.c | 3 +
+ fs/smb/client/transport.c | 13 +-
+ fs/splice.c | 58 +-
+ fs/tests/.kunitconfig | 2 +
+ fs/tests/fdtable_kunit.c | 72 +
+ fs/ufs/dir.c | 2 +-
+ fs/vboxsf/dir.c | 3 +
+ include/linux/binfmts.h | 3 +-
+ include/linux/buffer_head.h | 86 +-
+ include/linux/coredump.h | 41 +-
+ include/linux/dax.h | 12 -
+ include/linux/fcntl.h | 6 +
+ include/linux/fdtable.h | 8 +-
+ include/linux/fs.h | 2 +-
+ include/linux/fscache-cache.h | 2 +-
+ include/linux/fscache.h | 36 +-
+ include/linux/lsm_hook_defs.h | 1 +
+ include/linux/netfs.h | 80 +-
+ include/linux/pid.h | 53 +
+ include/linux/pid_types.h | 8 +
+ include/linux/pidfs.h | 5 +
+ include/linux/sched.h | 2 +-
+ include/linux/sched/signal.h | 53 +-
+ include/linux/security.h | 7 +
+ include/linux/splice.h | 4 +-
+ include/linux/user_namespace.h | 11 +-
+ include/linux/wait_bit.h | 26 +
+ include/net/scm.h | 7 +-
+ include/net/sock.h | 14 +-
+ include/trace/events/cachefiles.h | 30 +-
+ include/trace/events/fscache.h | 10 +-
+ include/trace/events/landlock.h | 2 +-
+ include/trace/events/netfs.h | 134 +-
+ include/uapi/asm-generic/socket.h | 4 +
+ include/uapi/linux/coredump.h | 157 +-
+ include/uapi/linux/fs.h | 2 +-
+ init/Kconfig | 11 +
+ ipc/mqueue.c | 7 +
+ kernel/Makefile | 1 +
+ kernel/exit.c | 22 +-
+ kernel/fork.c | 48 +-
+ kernel/pid_namespace.c | 3 +-
+ kernel/tests/.kunitconfig | 4 +
+ kernel/tests/user_ns_map_kunit.c | 98 +
+ kernel/user_namespace.c | 32 +-
+ kernel/utsname.c | 1 -
+ net/bluetooth/af_bluetooth.c | 6 +-
+ net/bluetooth/hci_sock.c | 8 +-
+ net/bluetooth/l2cap_sock.c | 2 +-
+ net/core/scm.c | 36 +-
+ net/core/sock.c | 120 +-
+ net/unix/af_unix.c | 67 +-
+ net/unix/af_unix.h | 3 +-
+ security/security.c | 25 +
+ security/selinux/hooks.c | 31 +
+ tools/include/uapi/linux/coredump.h | 157 +-
+ tools/lib/python/kdoc/xforms_lists.py | 1 +
+ tools/testing/selftests/Makefile | 1 +
+ .../selftests/clone3/clone3_clear_sighand.c | 6 +-
+ tools/testing/selftests/coredump/Makefile | 9 +-
+ .../selftests/coredump/coredump_close_files_test.c | 592 ++++++
+ .../selftests/coredump/coredump_notify_signal.h | 29 +
+ .../coredump/coredump_notify_signal_helper.c | 46 +
+ .../coredump/coredump_notify_signal_test.c | 245 +++
+ .../coredump/coredump_socket_protocol_test.c | 1989 +++++++++++++++-----
+ .../selftests/coredump/coredump_socket_test.c | 175 ++
+ tools/testing/selftests/coredump/coredump_test.h | 32 +-
+ .../selftests/coredump/coredump_test_helpers.c | 1789 +++++++++++++++++-
+ .../selftests/coredump/coredump_test_helpers.h | 79 +
+ tools/testing/selftests/exec/Makefile | 4 +
+ tools/testing/selftests/exec/binfmt_misc_delim.c | 127 ++
+ tools/testing/selftests/filesystems/.gitignore | 2 +-
+ tools/testing/selftests/filesystems/Makefile | 2 +-
+ tools/testing/selftests/filesystems/config | 8 +
+ .../selftests/filesystems/file_stressor/.gitignore | 2 +
+ .../selftests/filesystems/file_stressor/Makefile | 6 +
+ .../{ => file_stressor}/file_stressor.c | 0
+ .../selftests/filesystems/file_stressor/settings | 3 +
+ .../selftests/filesystems/fscontext_ns/.gitignore | 2 +
+ tools/testing/selftests/filesystems/kernfs_test.c | 1003 +++++++++-
+ .../selftests/filesystems/open_o_creat_o_dir.c | 201 ++
+ .../filesystems/statmount/statmount_test.c | 2 +-
+ tools/testing/selftests/filesystems/wrappers.h | 11 +
+ tools/testing/selftests/net/af_unix/Makefile | 2 +
+ tools/testing/selftests/net/af_unix/scm_pidfd.c | 366 ++++
+ tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +-
+ 204 files changed, 8832 insertions(+), 3465 deletions(-)
+ delete mode 100644 Documentation/filesystems/bfs.rst
+ delete mode 100644 arch/powerpc/platforms/cell/spufs/coredump.c
+ delete mode 100644 fs/bfs/Kconfig
+ delete mode 100644 fs/bfs/Makefile
+ delete mode 100644 fs/bfs/bfs.h
+ delete mode 100644 fs/bfs/dir.c
+ delete mode 100644 fs/bfs/file.c
+ delete mode 100644 fs/bfs/inode.c
+ create mode 100644 fs/tests/.kunitconfig
+ create mode 100644 fs/tests/fdtable_kunit.c
+ create mode 100644 kernel/tests/.kunitconfig
+ create mode 100644 kernel/tests/user_ns_map_kunit.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_close_files_test.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal.h
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_helper.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_test.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_test_helpers.h
+ create mode 100644 tools/testing/selftests/exec/binfmt_misc_delim.c
+ create mode 100644 tools/testing/selftests/filesystems/config
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/Makefile
+ rename tools/testing/selftests/filesystems/{ => file_stressor}/file_stressor.c (100%)
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/settings
+ create mode 100644 tools/testing/selftests/filesystems/fscontext_ns/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/open_o_creat_o_dir.c
+$ git am -3 ../patches/0001-ksmbd-Fix-removal-of-type-parameter-from-vfs_path_pa.patch
+Applying: ksmbd: Fix removal of type parameter from vfs_path_parent_lookup()
+Using index info to reconstruct a base tree...
+M fs/smb/server/vfs.c
+Falling back to patching base and 3-way merge...
+Auto-merging fs/smb/server/vfs.c
+No changes -- Patch already applied.
+$ git reset --hard HEAD^
+HEAD is now at 54e481ceeca7f Merge branch 'for-next' of https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
+Merging next-20260914 version of vfs-brauner
+$ git merge -m next-20260914/vfs-brauner f30afd22d01612fc4cdc8008071ae5fce2f39665
+Auto-merging Documentation/filesystems/index.rst
+Auto-merging MAINTAINERS
+Auto-merging fs/9p/vfs_addr.c
+Auto-merging fs/dax.c
+Auto-merging fs/gfs2/inode.c
+Auto-merging fs/gfs2/log.c
+Auto-merging fs/gfs2/lops.c
+Auto-merging fs/namei.c
+Auto-merging fs/nfsd/vfs.c
+Auto-merging net/unix/af_unix.c
+Merge made by the 'ort' strategy.
+ CREDITS | 2 +-
+ Documentation/admin-guide/binfmt-misc.rst | 3 +
+ Documentation/filesystems/befs.rst | 4 +-
+ Documentation/filesystems/bfs.rst | 60 -
+ Documentation/filesystems/index.rst | 1 -
+ Documentation/filesystems/porting.rst | 2 +-
+ Documentation/filesystems/proc.rst | 4 +
+ Documentation/filesystems/squashfs.rst | 6 +-
+ MAINTAINERS | 8 +-
+ arch/alpha/include/uapi/asm/socket.h | 4 +
+ arch/mips/configs/malta_defconfig | 1 -
+ arch/mips/configs/malta_kvm_defconfig | 1 -
+ arch/mips/configs/maltaup_xpa_defconfig | 1 -
+ arch/mips/configs/rm200_defconfig | 1 -
+ arch/mips/include/uapi/asm/socket.h | 4 +
+ arch/parisc/include/uapi/asm/socket.h | 4 +
+ arch/powerpc/Kconfig | 1 -
+ arch/powerpc/configs/fsl-emb-nonhw.config | 1 -
+ arch/powerpc/configs/ppc6xx_defconfig | 1 -
+ arch/powerpc/include/asm/elf.h | 6 -
+ arch/powerpc/include/asm/spu.h | 3 -
+ arch/powerpc/platforms/cell/Kconfig | 1 -
+ arch/powerpc/platforms/cell/spu_syscalls.c | 20 -
+ arch/powerpc/platforms/cell/spufs/Makefile | 1 -
+ arch/powerpc/platforms/cell/spufs/coredump.c | 183 --
+ arch/powerpc/platforms/cell/spufs/file.c | 114 --
+ arch/powerpc/platforms/cell/spufs/spufs.h | 12 -
+ arch/powerpc/platforms/cell/spufs/syscalls.c | 4 -
+ arch/sparc/include/uapi/asm/socket.h | 4 +
+ drivers/base/devtmpfs.c | 108 +-
+ fs/9p/vfs_addr.c | 1 -
+ fs/9p/vfs_inode.c | 3 +
+ fs/9p/vfs_inode_dotl.c | 3 +
+ fs/Kconfig | 9 +-
+ fs/Makefile | 1 -
+ fs/adfs/dir.c | 2 +-
+ fs/afs/file.c | 7 +-
+ fs/afs/internal.h | 2 +-
+ fs/aio.c | 11 +-
+ fs/bfs/Kconfig | 21 -
+ fs/bfs/Makefile | 8 -
+ fs/bfs/bfs.h | 69 -
+ fs/bfs/dir.c | 356 ----
+ fs/bfs/file.c | 203 --
+ fs/bfs/inode.c | 538 ------
+ fs/binfmt_elf.c | 16 +-
+ fs/binfmt_elf_fdpic.c | 12 +-
+ fs/binfmt_misc.c | 12 +-
+ fs/bpf_fs_kfuncs.c | 4 +-
+ fs/buffer.c | 131 +-
+ fs/cachefiles/Kconfig | 2 +-
+ fs/cachefiles/interface.c | 10 +-
+ fs/cachefiles/internal.h | 4 +-
+ fs/cachefiles/io.c | 25 +-
+ fs/ceph/Kconfig | 1 +
+ fs/ceph/addr.c | 4 +-
+ fs/ceph/file.c | 3 +
+ fs/char_dev.c | 4 +-
+ fs/coredump.c | 460 +++--
+ fs/dax.c | 26 +-
+ fs/dcache.c | 27 +-
+ fs/devpts/inode.c | 2 +
+ fs/exfat/misc.c | 2 +-
+ fs/ext2/xattr.c | 2 +-
+ fs/ext4/ext4_jbd2.c | 2 +-
+ fs/ext4/mmp.c | 2 +-
+ fs/fat/misc.c | 2 +-
+ fs/file.c | 4 +
+ fs/fs-writeback.c | 6 +-
+ fs/fs_pin.c | 9 +-
+ fs/fuse/dir.c | 3 +
+ fs/gfs2/inode.c | 3 +
+ fs/gfs2/log.c | 4 +-
+ fs/gfs2/lops.c | 4 +-
+ fs/inode.c | 2 +-
+ fs/internal.h | 1 +
+ fs/iomap/buffered-io.c | 8 +-
+ fs/iomap/direct-io.c | 2 +-
+ fs/jbd2/commit.c | 22 +-
+ fs/jbd2/journal.c | 31 +-
+ fs/jbd2/transaction.c | 2 +-
+ fs/kernfs/dir.c | 112 +-
+ fs/kernfs/kernfs-internal.h | 18 +-
+ fs/kernfs/mount.c | 34 +-
+ fs/kernfs/symlink.c | 17 +-
+ fs/namei.c | 227 ++-
+ fs/namespace.c | 4 +-
+ fs/netfs/Kconfig | 3 +
+ fs/netfs/Makefile | 2 +-
+ fs/netfs/buffered_read.c | 37 +-
+ fs/netfs/buffered_write.c | 66 +-
+ fs/netfs/direct_read.c | 14 +-
+ fs/netfs/direct_write.c | 8 +-
+ fs/netfs/fscache_cookie.c | 8 +-
+ fs/netfs/fscache_io.c | 10 +-
+ fs/netfs/internal.h | 68 +-
+ fs/netfs/iterator.c | 2 +-
+ fs/netfs/main.c | 1 -
+ fs/netfs/misc.c | 10 +-
+ fs/netfs/objects.c | 6 +-
+ fs/netfs/read_collect.c | 14 +-
+ fs/netfs/read_pgpriv2.c | 13 +-
+ fs/netfs/read_retry.c | 5 +-
+ fs/netfs/read_single.c | 12 +-
+ fs/netfs/stats.c | 4 +-
+ fs/netfs/write_collect.c | 25 +-
+ fs/netfs/write_issue.c | 123 +-
+ fs/netfs/write_retry.c | 5 +-
+ fs/nfs/Kconfig | 1 +
+ fs/nfs/dir.c | 6 +
+ fs/nfsd/vfs.c | 13 +-
+ fs/ocfs2/buffer_head_io.c | 12 +-
+ fs/ocfs2/journal.c | 25 +-
+ fs/omfs/inode.c | 4 +-
+ fs/open.c | 59 +-
+ fs/pidfs.c | 27 +-
+ fs/proc/base.c | 43 +-
+ fs/smb/client/dir.c | 3 +
+ fs/smb/client/transport.c | 13 +-
+ fs/splice.c | 58 +-
+ fs/tests/.kunitconfig | 2 +
+ fs/tests/fdtable_kunit.c | 72 +
+ fs/ufs/dir.c | 2 +-
+ fs/vboxsf/dir.c | 3 +
+ include/linux/binfmts.h | 3 +-
+ include/linux/buffer_head.h | 86 +-
+ include/linux/coredump.h | 41 +-
+ include/linux/dax.h | 12 -
+ include/linux/fcntl.h | 6 +
+ include/linux/fdtable.h | 2 +-
+ include/linux/fs.h | 2 +-
+ include/linux/fscache-cache.h | 2 +-
+ include/linux/fscache.h | 36 +-
+ include/linux/lsm_hook_defs.h | 1 +
+ include/linux/netfs.h | 80 +-
+ include/linux/pid.h | 53 +
+ include/linux/pid_types.h | 8 +
+ include/linux/pidfs.h | 5 +
+ include/linux/sched.h | 2 +-
+ include/linux/sched/signal.h | 45 +-
+ include/linux/security.h | 7 +
+ include/linux/splice.h | 4 +-
+ include/linux/user_namespace.h | 11 +-
+ include/net/scm.h | 7 +-
+ include/net/sock.h | 14 +-
+ include/trace/events/cachefiles.h | 30 +-
+ include/trace/events/fscache.h | 10 +-
+ include/trace/events/landlock.h | 2 +-
+ include/trace/events/netfs.h | 134 +-
+ include/uapi/asm-generic/socket.h | 4 +
+ include/uapi/linux/coredump.h | 149 +-
+ include/uapi/linux/fs.h | 2 +-
+ init/Kconfig | 11 +
+ ipc/mqueue.c | 7 +
+ kernel/Makefile | 1 +
+ kernel/pid_namespace.c | 3 +-
+ kernel/tests/.kunitconfig | 4 +
+ kernel/tests/user_ns_map_kunit.c | 98 +
+ kernel/user_namespace.c | 32 +-
+ kernel/utsname.c | 1 -
+ net/bluetooth/af_bluetooth.c | 6 +-
+ net/bluetooth/hci_sock.c | 8 +-
+ net/bluetooth/l2cap_sock.c | 2 +-
+ net/core/scm.c | 36 +-
+ net/core/sock.c | 120 +-
+ net/unix/af_unix.c | 67 +-
+ net/unix/af_unix.h | 3 +-
+ security/security.c | 25 +
+ security/selinux/hooks.c | 31 +
+ tools/include/uapi/linux/coredump.h | 149 +-
+ tools/lib/python/kdoc/xforms_lists.py | 1 +
+ tools/testing/selftests/Makefile | 1 +
+ .../selftests/clone3/clone3_clear_sighand.c | 6 +-
+ tools/testing/selftests/coredump/Makefile | 7 +-
+ .../selftests/coredump/coredump_notify_signal.h | 29 +
+ .../coredump/coredump_notify_signal_helper.c | 46 +
+ .../coredump/coredump_notify_signal_test.c | 245 +++
+ .../coredump/coredump_socket_protocol_test.c | 1983 +++++++++++++++-----
+ .../selftests/coredump/coredump_socket_test.c | 175 ++
+ tools/testing/selftests/coredump/coredump_test.h | 32 +-
+ .../selftests/coredump/coredump_test_helpers.c | 1788 +++++++++++++++++-
+ .../selftests/coredump/coredump_test_helpers.h | 81 +
+ tools/testing/selftests/exec/Makefile | 4 +
+ tools/testing/selftests/exec/binfmt_misc_delim.c | 127 ++
+ tools/testing/selftests/filesystems/.gitignore | 2 +-
+ tools/testing/selftests/filesystems/Makefile | 2 +-
+ tools/testing/selftests/filesystems/config | 8 +
+ .../selftests/filesystems/file_stressor/.gitignore | 2 +
+ .../selftests/filesystems/file_stressor/Makefile | 6 +
+ .../{ => file_stressor}/file_stressor.c | 0
+ .../selftests/filesystems/file_stressor/settings | 3 +
+ .../selftests/filesystems/fscontext_ns/.gitignore | 2 +
+ tools/testing/selftests/filesystems/kernfs_test.c | 1003 +++++++++-
+ .../selftests/filesystems/open_o_creat_o_dir.c | 201 ++
+ .../filesystems/statmount/statmount_test.c | 2 +-
+ tools/testing/selftests/filesystems/wrappers.h | 11 +
+ tools/testing/selftests/net/af_unix/Makefile | 2 +
+ tools/testing/selftests/net/af_unix/scm_pidfd.c | 366 ++++
+ tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +-
+ 199 files changed, 7998 insertions(+), 3345 deletions(-)
+ delete mode 100644 Documentation/filesystems/bfs.rst
+ delete mode 100644 arch/powerpc/platforms/cell/spufs/coredump.c
+ delete mode 100644 fs/bfs/Kconfig
+ delete mode 100644 fs/bfs/Makefile
+ delete mode 100644 fs/bfs/bfs.h
+ delete mode 100644 fs/bfs/dir.c
+ delete mode 100644 fs/bfs/file.c
+ delete mode 100644 fs/bfs/inode.c
+ create mode 100644 fs/tests/.kunitconfig
+ create mode 100644 fs/tests/fdtable_kunit.c
+ create mode 100644 kernel/tests/.kunitconfig
+ create mode 100644 kernel/tests/user_ns_map_kunit.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal.h
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_helper.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_test.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_test_helpers.h
+ create mode 100644 tools/testing/selftests/exec/binfmt_misc_delim.c
+ create mode 100644 tools/testing/selftests/filesystems/config
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/Makefile
+ rename tools/testing/selftests/filesystems/{ => file_stressor}/file_stressor.c (100%)
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/settings
+ create mode 100644 tools/testing/selftests/filesystems/fscontext_ns/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/open_o_creat_o_dir.c
+$ git am -3 ../patches/0001-ksmbd-Fix-removal-of-type-parameter-from-vfs_path_pa.patch
+Applying: ksmbd: Fix removal of type parameter from vfs_path_parent_lookup()
+Using index info to reconstruct a base tree...
+M fs/smb/server/vfs.c
+Falling back to patching base and 3-way merge...
+Auto-merging fs/smb/server/vfs.c
+No changes -- Patch already applied.
+Merging vfs/for-next (4dda01b67c866 Merge branches 'work.dcache', 'work.dcache-d_add' and 'work.configfs' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git vfs/for-next
+Merge made by the 'ort' strategy.
+Merging mm-fixes/for-next-fixes (d743a24a470ff Merge https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-hotfixes-unstable into for-next-fixes)
+$ git merge -m Merge branch 'for-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mm/linux.git mm-fixes/for-next-fixes
+Updating 9b87fdc9af2fb..d743a24a470ff
+Fast-forward (no commit created; -m option ignored)
+ .mailmap | 4 ++
+ MAINTAINERS | 4 +-
+ fs/ocfs2/namei.c | 9 +---
+ fs/ocfs2/xattr.c | 13 ++---
+ fs/ocfs2/xattr.h | 8 +--
+ include/uapi/linux/alloc_tag.h | 1 +
+ kernel/module/main.c | 8 ++-
+ lib/test_xarray.c | 70 +++++++++++++++++++++++++
+ lib/xarray.c | 8 +--
+ mm/backing-dev.c | 5 +-
+ mm/damon/core.c | 39 +++++++++-----
+ mm/damon/ops-common.c | 7 ++-
+ mm/damon/vaddr.c | 21 +++++---
+ mm/hugetlb.c | 45 ++++++++++++----
+ mm/memblock.c | 1 +
+ mm/page_alloc.c | 16 +++++-
+ mm/rmap.c | 6 ++-
+ mm/shmem.c | 12 ++++-
+ mm/vma.c | 8 +++
+ mm/vmalloc.c | 79 +++++++++++++++++++----------
+ tools/testing/selftests/Makefile | 5 +-
+ tools/testing/selftests/cgroup/test_zswap.c | 28 +++++++++-
+ 22 files changed, 302 insertions(+), 95 deletions(-)
+Merging fs-current (3a7233820cbe6 Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git)
+$ git merge -m Merge branch 'fs-current' of linux-next fs-current
+Merge made by the 'ort' strategy.
+ fs/ntfs3/inode.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+Merging kbuild-current/kbuild-fixes-for-next (48744e62d4100 docs: kconfig: fix shell function syntax in caveats)
+$ git merge -m Merge branch 'kbuild-fixes-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-current/kbuild-fixes-for-next
+Merge made by the 'ort' strategy.
+ Documentation/kbuild/kconfig-macro-language.rst | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+Merging clang-fixes-current/clang-fixes-for-current (df2908090cda3 Linux 7.3-rc2)
+$ git merge -m Merge branch 'clang-fixes-for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git clang-fixes-current/clang-fixes-for-current
+Already up to date.
+Merging arc-current/for-curr (d12c6a6f0c8fd arc: kernel: Fix clk reference leak in show_cpuinfo())
+$ git merge -m Merge branch 'for-curr' of https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git arc-current/for-curr
+Merge made by the 'ort' strategy.
+ arch/arc/Kconfig | 4 ----
+ arch/arc/kernel/setup.c | 1 +
+ arch/arc/kernel/smp.c | 1 -
+ 3 files changed, 1 insertion(+), 5 deletions(-)
+Merging arm-current/fixes (1039bffd6ae9c ARM: 9485/1: mm: acquire mmap write lock around show_pte() for user faults)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux.git arm-current/fixes
+Already up to date.
+Merging arm64-fixes/for-next/fixes (fdb9ebc7fb778 arm64: mte: Fix PTRACE_{PEEK,POKE}MTETAGS error documentation)
+$ git merge -m Merge branch 'for-next/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux arm64-fixes/for-next/fixes
+Merge made by the 'ort' strategy.
+ .../arch/arm64/memory-tagging-extension.rst | 5 ++---
+ arch/arm64/include/asm/percpu.h | 20 ++++++++++----------
+ arch/arm64/kernel/hibernate-asm.S | 2 ++
+ arch/arm64/kernel/hibernate.c | 4 ++--
+ arch/arm64/kernel/mte.c | 2 +-
+ drivers/perf/arm-cmn.c | 10 +++++++---
+ .../selftests/arm64/mte/check_gcr_el1_cswitch.c | 2 +-
+ 7 files changed, 25 insertions(+), 20 deletions(-)
+Merging arm-soc-fixes/arm/fixes (869e97e66d3f5 Merge tag 'scmi-ffa-fixes-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes)
+$ git merge -m Merge branch 'arm/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git arm-soc-fixes/arm/fixes
+Merge made by the 'ort' strategy.
+ arch/arm/mach-socfpga/Kconfig | 2 +-
+ .../boot/dts/altera/socfpga_stratix10_socdk.dtsi | 0
+ .../dts/altera/socfpga_stratix10_socdk_emmc.dts | 0
+ arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 10 ++++++++
+ arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 10 ++++++++
+ arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 10 ++++++++
+ arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 27 ++++++++++++++++++++++
+ arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 27 ++++++++++++++++++++++
+ drivers/clk/clk-scpi.c | 11 ++++++---
+ drivers/firmware/arm_ffa/driver.c | 1 +
+ drivers/firmware/arm_scmi/driver.c | 2 +-
+ drivers/firmware/arm_scpi.c | 9 +++++---
+ 12 files changed, 101 insertions(+), 8 deletions(-)
+ mode change 100755 => 100644 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dtsi
+ mode change 100755 => 100644 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_emmc.dts
+Merging davinci-current/davinci/for-current (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'davinci/for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git davinci-current/davinci/for-current
+Already up to date.
+Merging realtek-fixes/fixes (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/yu_chun/linux.git realtek-fixes/fixes
+Already up to date.
+Merging drivers-memory-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git drivers-memory-fixes/fixes
+Already up to date.
+Merging sophgo-fixes/fixes (19272b37aa4f8 Linux 6.16-rc1)
+$ git merge -m Merge branch 'fixes' of https://github.com/sophgo/linux.git sophgo-fixes/fixes
+Already up to date.
+Merging sophgo-soc-fixes/soc-fixes (0af2f6be1b428 Linux 6.15-rc1)
+$ git merge -m Merge branch 'soc-fixes' of https://github.com/sophgo/linux.git sophgo-soc-fixes/soc-fixes
+Already up to date.
+Merging m68k-current/for-linus (2f8e3cad53b5c m68k: nfcon: Do not call console_is_registered() in nfcon_device())
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git m68k-current/for-linus
+Already up to date.
+Merging powerpc-fixes/fixes (0b271f7d7f5ed powerpc/iommu: Fix the overflow validation in iommu_tce_check_ioba)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git powerpc-fixes/fixes
+Merge made by the 'ort' strategy.
+ arch/powerpc/kernel/iommu.c | 2 +-
+ arch/powerpc/kvm/book3s_hv_nested.c | 2 ++
+ arch/powerpc/kvm/book3s_hv_uvmem.c | 5 ++++-
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+Merging s390-fixes/fixes (dc2136341be98 s390/crypto: Enable CONTEXT_ANALYSIS)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git s390-fixes/fixes
+Already up to date.
+Merging net/main (ceac0de741bfb netlink: do not free nlk->groups while lockless readers can use it)
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git net/main
+Merge made by the 'ort' strategy.
+ Documentation/netlink/specs/rt-neigh.yaml | 3 +
+ Documentation/networking/ip-sysctl.rst | 4 +-
+ drivers/bluetooth/btintel_pcie.c | 8 +-
+ drivers/bluetooth/btmtk.c | 7 +-
+ drivers/bluetooth/btmtksdio.c | 24 +++-
+ drivers/bluetooth/btmtkuart.c | 20 +++-
+ drivers/bluetooth/btusb.c | 17 +++
+ drivers/bluetooth/hci_qca.c | 14 ++-
+ drivers/net/dsa/mxl862xx/mxl862xx.c | 23 ++--
+ drivers/net/ethernet/broadcom/genet/bcmgenet.c | 19 ++-
+ .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 -
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +-
+ drivers/net/fddi/skfp/skfddi.c | 3 +-
+ drivers/net/phy/mediatek/mtk-phy-lib.c | 27 +++--
+ include/net/bluetooth/coredump.h | 2 +
+ net/atm/pppoatm.c | 42 +++----
+ net/bluetooth/coredump.c | 65 +++++++----
+ net/bluetooth/eir.c | 10 +-
+ net/bluetooth/hci_codec.c | 36 +++---
+ net/bluetooth/hci_conn.c | 21 ++++
+ net/bluetooth/hci_core.c | 18 ++-
+ net/bluetooth/hci_sync.c | 2 +
+ net/bluetooth/iso.c | 53 +++++++--
+ net/bluetooth/rfcomm/sock.c | 13 ++-
+ net/bridge/br_mst.c | 20 ++--
+ net/bridge/br_vlan.c | 31 +++--
+ net/core/drop_monitor.c | 18 +--
+ net/core/neighbour.c | 35 ++++--
+ net/ipv4/icmp.c | 17 +--
+ net/ipv4/ip_tunnel_core.c | 16 ++-
+ net/ipv4/sysctl_net_ipv4.c | 4 +-
+ net/ipv6/seg6_local.c | 3 +
+ net/ipv6/tcp_ipv6.c | 3 +-
+ net/netfilter/nf_flow_table_core.c | 12 +-
+ net/netfilter/nf_nat_core.c | 46 +++++---
+ net/netfilter/nf_tables_api.c | 22 ++--
+ net/netfilter/nft_nat.c | 2 +-
+ net/netlink/af_netlink.c | 42 +++++--
+ net/netlink/diag.c | 18 ++-
+ net/openvswitch/conntrack.c | 2 +-
+ net/rds/ib_cm.c | 2 +-
+ net/sched/act_api.c | 11 +-
+ net/sched/sch_hhf.c | 9 +-
+ net/unix/garbage.c | 17 +--
+ rust/kernel/net/phy.rs | 38 +++---
+ tools/testing/selftests/net/af_unix/scm_rights.c | 17 +++
+ .../tc-testing/tc-tests/actions/batch-delete.json | 115 ++++++++++++++++++
+ .../tc-tests/qdiscs/hhf_flows_limit.json | 128 +++++++++++++++++++++
+ 48 files changed, 812 insertions(+), 255 deletions(-)
+ create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json
+ create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf_flows_limit.json
+Merging bpf/master (ee363e0558953 Merge branch 'bpf-arm64-fix-the-exception-callback-s-frame-pointer')
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/ bpf/master
+Merge made by the 'ort' strategy.
+ Documentation/bpf/kfuncs.rst | 10 ++
+ arch/arm64/net/bpf_jit_comp.c | 2 +
+ include/linux/btf.h | 1 +
+ kernel/bpf/btf.c | 2 +-
+ kernel/bpf/hashtab.c | 32 +++--
+ kernel/bpf/helpers.c | 60 +++++-----
+ kernel/bpf/memalloc.c | 50 ++++----
+ kernel/bpf/syscall.c | 10 +-
+ kernel/bpf/verifier.c | 30 ++++-
+ net/bpf/test_run.c | 4 +-
+ net/core/filter.c | 39 +++----
+ net/core/skmsg.c | 4 +
+ net/ipv4/inet_connection_sock.c | 3 +-
+ .../testing/selftests/bpf/prog_tests/exceptions.c | 1 +
+ .../selftests/bpf/prog_tests/sock_destroy.c | 121 +++++++++++++++++++
+ .../selftests/bpf/prog_tests/tc_change_tail_pmtu.c | 125 ++++++++++++++++++++
+ tools/testing/selftests/bpf/prog_tests/verifier.c | 4 +
+ tools/testing/selftests/bpf/progs/exceptions.c | 30 +++++
+ .../selftests/bpf/progs/sock_destroy_prog.c | 30 +++++
+ .../selftests/bpf/progs/test_tc_change_tail_pmtu.c | 129 +++++++++++++++++++++
+ .../selftests/bpf/progs/verifier_btf_flex_array.c | 56 +++++++++
+ tools/testing/selftests/bpf/progs/verifier_gotox.c | 48 ++++++++
+ .../selftests/bpf/progs/verifier_kfunc_perfmon.c | 75 ++++++++++++
+ 23 files changed, 774 insertions(+), 92 deletions(-)
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/tc_change_tail_pmtu.c
+ create mode 100644 tools/testing/selftests/bpf/progs/test_tc_change_tail_pmtu.c
+ create mode 100644 tools/testing/selftests/bpf/progs/verifier_btf_flex_array.c
+ create mode 100644 tools/testing/selftests/bpf/progs/verifier_kfunc_perfmon.c
+Merging ipsec/master (96f01b53c2d05 net: xfrm: reject unrepresentable espintcp transport headers)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git ipsec/master
+Auto-merging net/ipv4/esp4.c
+Auto-merging net/ipv6/esp6.c
+Merge made by the 'ort' strategy.
+ net/ipv4/esp4.c | 6 ++++++
+ net/ipv6/esp6.c | 6 ++++++
+ net/ipv6/xfrm6_output.c | 10 ++++++++--
+ net/xfrm/espintcp.c | 6 +++++-
+ net/xfrm/xfrm_input.c | 22 +++++++++++++++++++---
+ net/xfrm/xfrm_iptfs.c | 12 ++++++++++--
+ net/xfrm/xfrm_policy.c | 20 +++++++++++++++-----
+ net/xfrm/xfrm_state.c | 9 +++++++--
+ net/xfrm/xfrm_user.c | 18 +++++-------------
+ 9 files changed, 81 insertions(+), 28 deletions(-)
+Merging netfilter/main (ceac0de741bfb netlink: do not free nlk->groups while lockless readers can use it)
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git netfilter/main
+Already up to date.
+Merging ipvs/main (a401a9d547c50 Merge branch 'net-macb-fix-two-probe-path-leaks')
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git ipvs/main
+Already up to date.
+Merging wireless/for-next (1eeca1d5e0920 wifi: brcmsmac: fix UAF in brcms_free_timer())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git wireless/for-next
+Auto-merging net/wireless/core.c
+Auto-merging net/wireless/nl80211.c
+Merge made by the 'ort' strategy.
+ .get_maintainer.ignore | 2 +
+ drivers/net/wireless/ath/ath11k/mac.c | 25 +++-
+ drivers/net/wireless/ath/ath12k/wifi7/ahb.c | 51 +------
+ drivers/net/wireless/ath/wcn36xx/dxe.c | 2 +-
+ .../wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +
+ .../broadcom/brcm80211/brcmfmac/cyw/core.c | 5 +-
+ .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 4 +
+ drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 +-
+ drivers/net/wireless/intel/ipw2x00/ipw2200.c | 9 ++
+ .../wireless/intel/ipw2x00/libipw_crypto_tkip.c | 12 +-
+ drivers/net/wireless/intel/ipw2x00/libipw_rx.c | 6 +
+ drivers/net/wireless/intel/iwlegacy/common.c | 2 +-
+ drivers/net/wireless/intersil/p54/eeprom.c | 22 ++-
+ drivers/net/wireless/marvell/libertas_tf/main.c | 2 +-
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c | 12 +-
+ drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +-
+ drivers/net/wireless/marvell/mwifiex/scan.c | 54 ++++++--
+ drivers/net/wireless/marvell/mwifiex/util.c | 10 +-
+ drivers/net/wireless/microchip/wilc1000/cfg80211.c | 14 ++
+ drivers/net/wireless/microchip/wilc1000/wlan.c | 9 ++
+ drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 -
+ drivers/net/wireless/ti/wlcore/main.c | 4 +-
+ drivers/net/wireless/virtual/mac80211_hwsim_main.c | 39 ++++--
+ drivers/net/wireless/virtual/virt_wifi.c | 4 +-
+ include/linux/ieee80211-mesh.h | 4 +-
+ include/net/mac80211.h | 5 +-
+ net/mac80211/cfg.c | 18 ++-
+ net/mac80211/debugfs.c | 2 +-
+ net/mac80211/debugfs_netdev.c | 9 ++
+ net/mac80211/ieee80211_i.h | 2 +-
+ net/mac80211/iface.c | 39 +++++-
+ net/mac80211/main.c | 4 +
+ net/mac80211/mesh.c | 34 +++--
+ net/mac80211/offchannel.c | 7 +
+ net/mac80211/pm.c | 8 +-
+ net/mac80211/rate.c | 8 ++
+ net/mac80211/scan.c | 2 +-
+ net/mac80211/tdls.c | 40 ++++--
+ net/mac80211/tx.c | 115 ++++++++++------
+ net/wireless/core.c | 153 ++++++++++++---------
+ net/wireless/core.h | 18 ++-
+ net/wireless/ibss.c | 38 ++---
+ net/wireless/nl80211.c | 64 +++++----
+ net/wireless/rdev-ops.h | 3 +
+ net/wireless/reg.c | 52 +++++--
+ net/wireless/reg.h | 16 +++
+ net/wireless/scan.c | 43 +++++-
+ net/wireless/util.c | 38 +++--
+ 48 files changed, 694 insertions(+), 326 deletions(-)
+Merging ath/for-current (1eeca1d5e0920 wifi: brcmsmac: fix UAF in brcms_free_timer())
+$ git merge -m Merge branch 'for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git ath/for-current
+Already up to date.
+Merging iwlwifi/fixes (d13d5d299c11b wifi: iwlwifi: validate SEC_RT TLV minimum size)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git iwlwifi/fixes
+Already up to date.
+Merging wpan/master (2b4707a149a55 net: mctp: i3c: serialize probe with bus removal)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan.git wpan/master
+Already up to date.
+Merging rdma-fixes/for-rc (9ff797e516dbc RDMA/siw: Bound fragmented header copies by the remaining length)
+$ git merge -m Merge branch 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git rdma-fixes/for-rc
+Already up to date.
+Merging sound-current/for-linus (dbd9d1cbf9700 ALSA: usb-audio: fix list_add double-add in push_back_to_ready_list)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git sound-current/for-linus
+Auto-merging sound/core/init.c
+Merge made by the 'ort' strategy.
+ sound/core/init.c | 3 ++-
+ sound/core/pcm_timer.c | 7 +++++--
+ sound/hda/codecs/realtek/alc269.c | 11 ++++++++++-
+ sound/hda/common/controller.c | 2 +-
+ sound/usb/6fire/pcm.c | 12 ++++++++++--
+ sound/usb/bcd2000/bcd2000.c | 33 ++++++++++++++++++++++++++-------
+ sound/usb/card.h | 1 +
+ sound/usb/endpoint.c | 21 ++++++++++++++-------
+ sound/usb/implicit.c | 1 +
+ sound/usb/mixer_maps.c | 13 +++++++++++++
+ sound/virtio/virtio_card.c | 4 ++--
+ 11 files changed, 85 insertions(+), 23 deletions(-)
+Merging sound-asoc-fixes/for-linus (7abfc3b5d5132 ASoC: hdmi-codec: Report a change when the channel status moves)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git sound-asoc-fixes/for-linus
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/sound/cirrus,cs35l45.yaml | 20 +
+ .../bindings/sound/davinci-evm-audio.txt | 49 -
+ .../bindings/sound/foursemi,fs2105s.yaml | 2 +-
+ .../devicetree/bindings/sound/imx-audmux.yaml | 8 +-
+ .../devicetree/bindings/sound/nuvoton,nau8360.yaml | 115 +
+ .../bindings/sound/ti,da830-evm-audio.yaml | 83 +
+ MAINTAINERS | 3 +
+ drivers/firmware/cirrus/cs_dsp.c | 2 +-
+ include/sound/cs35l56.h | 4 +
+ include/sound/soc.h | 3 +-
+ include/sound/soc_sdw_utils.h | 22 +-
+ include/sound/tas2781-dsp.h | 4 +
+ sound/soc/amd/acp/acp-sdw-legacy-mach.c | 14 +-
+ sound/soc/amd/acp/acp-sdw-sof-mach.c | 23 +-
+ sound/soc/amd/yc/acp6x-mach.c | 7 +
+ sound/soc/codecs/Kconfig | 28 +-
+ sound/soc/codecs/Makefile | 4 +
+ sound/soc/codecs/adau1977-i2c.c | 9 +
+ sound/soc/codecs/adau1977-spi.c | 12 +-
+ sound/soc/codecs/ak4642.c | 5 +-
+ sound/soc/codecs/cs-amp-lib.c | 2 +
+ sound/soc/codecs/cs35l45-tables.c | 4 +
+ sound/soc/codecs/cs35l45.c | 89 +-
+ sound/soc/codecs/cs35l45.h | 23 +
+ sound/soc/codecs/cs35l56-sdw.c | 27 +-
+ sound/soc/codecs/cs35l56-shared.c | 38 +
+ sound/soc/codecs/cs35l56.c | 17 +
+ sound/soc/codecs/cs35l56.h | 1 +
+ sound/soc/codecs/es8326.c | 24 +-
+ sound/soc/codecs/es8375.c | 18 +-
+ sound/soc/codecs/es8389.c | 20 +-
+ sound/soc/codecs/fs210x.c | 5 +-
+ sound/soc/codecs/hdmi-codec.c | 6 +-
+ sound/soc/codecs/lpass-rx-macro.c | 6 +-
+ sound/soc/codecs/lpass-tx-macro.c | 4 +-
+ sound/soc/codecs/lpass-va-macro.c | 4 +-
+ sound/soc/codecs/lpass-wsa-macro.c | 48 +-
+ sound/soc/codecs/nau8360-dsp.c | 634 ++++++
+ sound/soc/codecs/nau8360-dsp.h | 122 ++
+ sound/soc/codecs/nau8360.c | 2309 ++++++++++++++++++++
+ sound/soc/codecs/nau8360.h | 917 ++++++++
+ sound/soc/codecs/rt712-sdca-dmic.c | 14 +-
+ sound/soc/codecs/rt712-sdca-sdw.c | 8 +
+ sound/soc/codecs/rt712-sdca.c | 86 +-
+ sound/soc/codecs/rt712-sdca.h | 18 +
+ sound/soc/codecs/sma1307.c | 14 +-
+ sound/soc/codecs/sn624x-sdca-sdw.c | 1888 ++++++++++++++++
+ sound/soc/codecs/sn624x-sdca.h | 152 ++
+ sound/soc/codecs/sta32x.c | 107 +-
+ sound/soc/codecs/sta350.c | 6 +-
+ sound/soc/codecs/tas2764.c | 2 +-
+ sound/soc/codecs/tas2770.c | 2 +-
+ sound/soc/codecs/tas2781-comlib-i2c.c | 7 +-
+ sound/soc/codecs/tas2781-comlib.c | 22 +-
+ sound/soc/codecs/tas2781-fmwlib.c | 4 +-
+ sound/soc/codecs/tas2783-sdw.c | 105 +-
+ sound/soc/codecs/tlv320aic32x4-clk.c | 2 +-
+ sound/soc/codecs/twl4030.c | 5 +-
+ sound/soc/codecs/wcd-mbhc-v2.c | 8 +-
+ sound/soc/codecs/wcd934x.c | 2 +-
+ sound/soc/codecs/wm8962.c | 4 +-
+ sound/soc/codecs/wm8996.c | 2 +-
+ sound/soc/codecs/wm_adsp.c | 5 +-
+ sound/soc/codecs/wm_hubs.c | 2 +-
+ sound/soc/fsl/fsl_mqs.c | 14 +
+ sound/soc/intel/boards/Kconfig | 1 +
+ sound/soc/intel/boards/sof_es8336.c | 9 +
+ sound/soc/intel/common/soc-acpi-intel-arl-match.c | 71 +
+ sound/soc/intel/common/soc-acpi-intel-lnl-match.c | 71 +
+ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 71 +
+ sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 82 +
+ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c | 61 +-
+ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 4 +-
+ sound/soc/mediatek/mt2701/mt2701-cs42448.c | 4 +-
+ sound/soc/mediatek/mt2701/mt2701-wm8960.c | 4 +-
+ sound/soc/mediatek/mt6797/mt6797-afe-clk.c | 23 +-
+ sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 8 +-
+ sound/soc/mediatek/mt7986/mt7986-afe-pcm.c | 8 +-
+ sound/soc/mediatek/mt7986/mt7986-dai-etdm.c | 2 +-
+ sound/soc/mediatek/mt7986/mt7986-wm8960.c | 4 +-
+ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 24 +-
+ sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 95 +-
+ sound/soc/mediatek/mt8186/mt8186-afe-gpio.c | 6 +-
+ sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 21 +-
+ sound/soc/samsung/aries_wm8994.c | 14 +-
+ sound/soc/samsung/pcm.c | 19 +-
+ sound/soc/samsung/spdif.c | 8 +-
+ sound/soc/samsung/tm2_wm5110.c | 12 +-
+ sound/soc/sdca/sdca_class_function.c | 5 +
+ sound/soc/sdca/sdca_functions.c | 12 +-
+ sound/soc/sdw_utils/Makefile | 4 +-
+ sound/soc/sdw_utils/soc_sdw_cs_amp.c | 46 -
+ sound/soc/sdw_utils/soc_sdw_senary_amp.c | 80 +
+ sound/soc/sdw_utils/soc_sdw_senary_dmic.c | 49 +
+ sound/soc/sdw_utils/soc_sdw_senary_sdca.c | 63 +
+ .../sdw_utils/soc_sdw_senary_sdca_jack_common.c | 197 ++
+ sound/soc/sdw_utils/soc_sdw_utils.c | 190 +-
+ sound/soc/soc-component.c | 8 +-
+ sound/soc/soc-core.c | 2 +-
+ sound/soc/soc-ops.c | 4 +-
+ sound/soc/soc-pcm.c | 18 +-
+ sound/soc/sof/imx/imx8.c | 26 +-
+ sound/soc/tegra/tegra210_adx.c | 12 +-
+ sound/soc/tegra/tegra210_adx.h | 2 +-
+ sound/soc/uniphier/aio-dma.c | 5 +-
+ sound/soc/xilinx/xlnx_formatter_pcm.c | 79 +-
+ 106 files changed, 8071 insertions(+), 567 deletions(-)
+ delete mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
+ create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8360.yaml
+ create mode 100644 Documentation/devicetree/bindings/sound/ti,da830-evm-audio.yaml
+ create mode 100644 sound/soc/codecs/nau8360-dsp.c
+ create mode 100644 sound/soc/codecs/nau8360-dsp.h
+ create mode 100644 sound/soc/codecs/nau8360.c
+ create mode 100644 sound/soc/codecs/nau8360.h
+ create mode 100644 sound/soc/codecs/sn624x-sdca-sdw.c
+ create mode 100644 sound/soc/codecs/sn624x-sdca.h
+ create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_amp.c
+ create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_dmic.c
+ create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca.c
+ create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca_jack_common.c
+Merging regmap-fixes/for-linus (2e42cade8ff1f regmap: irq: Free the irqdomain we create)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git regmap-fixes/for-linus
+Merge made by the 'ort' strategy.
+ drivers/base/regmap/regmap-irq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+Merging regulator-fixes/for-linus (f3e6ef13e24c9 regulator: pf1550: fix which regulator is notified)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git regulator-fixes/for-linus
+Already up to date.
+Merging spi-fixes/for-linus (095858324f063 spi: virtio: Use the per-transfer bits per word)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git spi-fixes/for-linus
+Merge made by the 'ort' strategy.
+ drivers/spi/spi-qpic-snand.c | 4 ----
+ drivers/spi/spi-virtio.c | 2 +-
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+Merging pci-current/for-linus (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git pci-current/for-linus
+Already up to date.
+Merging driver-core.current/driver-core-linus (77be3641f3e3a debugfs: don't warn about uninitialized debugfs for an error parent)
+$ git merge -m Merge branch 'driver-core-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git driver-core.current/driver-core-linus
+Merge made by the 'ort' strategy.
+ fs/debugfs/inode.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+Merging tty.current/tty-linus (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'tty-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty.current/tty-linus
+Already up to date.
+Merging usb.current/usb-linus (8c51ea651d043 usb: typec: ucsi: acpi: Assume UCSI 1.2 on Acer Nitro ANV15-41)
+$ git merge -m Merge branch 'usb-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb.current/usb-linus
+Merge made by the 'ort' strategy.
+ drivers/thunderbolt/ctl.c | 63 +++++++++--------
+ drivers/thunderbolt/nhi.c | 5 ++
+ drivers/thunderbolt/switch.c | 9 ++-
+ drivers/thunderbolt/tb.c | 37 ++++++----
+ drivers/thunderbolt/test.c | 58 +++++++++++++---
+ drivers/thunderbolt/tunnel.c | 73 +++++++++++++-------
+ drivers/thunderbolt/tunnel.h | 8 ++-
+ drivers/thunderbolt/xdomain.c | 1 -
+ drivers/usb/class/cdc-acm.c | 36 +++++-----
+ drivers/usb/class/cdc-acm.h | 1 -
+ drivers/usb/core/hub.c | 7 +-
+ drivers/usb/dwc2/hcd.c | 3 +-
+ drivers/usb/dwc3/dwc3-am62.c | 1 +
+ drivers/usb/gadget/function/f_midi2.c | 4 +-
+ drivers/usb/host/octeon-hcd.c | 54 +++++++++++++--
+ drivers/usb/serial/bus.c | 6 +-
+ drivers/usb/serial/generic.c | 10 ++-
+ drivers/usb/serial/option.c | 14 ++++
+ drivers/usb/serial/usb-serial.c | 126 +++++++++++++++++++++++++++-------
+ drivers/usb/serial/xr_serial.c | 10 +--
+ drivers/usb/storage/sierra_ms.c | 7 ++
+ drivers/usb/typec/tcpm/tcpm.c | 2 +-
+ drivers/usb/typec/tipd/core.c | 11 +--
+ drivers/usb/typec/ucsi/ucsi_acpi.c | 34 +++++++++
+ drivers/usb/typec/ucsi/ucsi_glink.c | 15 +++-
+ include/linux/thunderbolt.h | 3 +
+ include/linux/usb/serial.h | 1 +
+ 27 files changed, 441 insertions(+), 158 deletions(-)
+Merging usb-serial-fixes/usb-linus (ae0e61d95677e USB: serial: fix ioctl hangup race)
+$ git merge -m Merge branch 'usb-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git usb-serial-fixes/usb-linus
+Already up to date.
+Merging phy/fixes (486a70ef84826 phy: mediatek: phy-mtk-hdmi-mt8195: Fix TMDS clk bit ratio setting)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git phy/fixes
+Merge made by the 'ort' strategy.
+ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 4 +-
+ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 3 +
+ drivers/phy/renesas/phy-rcar-gen3-usb2.c | 310 ++++++++++++++++++++++++-----
+ 3 files changed, 270 insertions(+), 47 deletions(-)
+Merging staging.current/staging-linus (df2908090cda3 Linux 7.3-rc2)
+$ git merge -m Merge branch 'staging-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging.current/staging-linus
+Already up to date.
+Merging iio-fixes/fixes-togreg (7d38af8f20239 iio: proximity: vcnl3020: fix ISR bitmask check in IRQ handler)
+$ git merge -m Merge branch 'fixes-togreg' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git iio-fixes/fixes-togreg
+Auto-merging drivers/iio/buffer/industrialio-buffer-dmaengine.c
+Merge made by the 'ort' strategy.
+ .../bindings/iio/adc/rockchip-saradc.yaml | 18 +++----
+ drivers/iio/accel/kionix-kx022a.c | 30 ++++++++---
+ drivers/iio/accel/sca3000.c | 2 +-
+ drivers/iio/adc/ade9000.c | 31 +++++------
+ drivers/iio/adc/adi-axi-adc.c | 4 ++
+ drivers/iio/adc/aspeed_adc.c | 4 +-
+ drivers/iio/adc/axp288_adc.c | 8 +++
+ drivers/iio/adc/max1363.c | 8 +++
+ drivers/iio/adc/rohm-bd79124.c | 20 ++++---
+ drivers/iio/adc/sun4i-gpadc-iio.c | 10 ++--
+ drivers/iio/adc/xilinx-xadc-core.c | 9 ++--
+ drivers/iio/buffer/industrialio-buffer-dmaengine.c | 16 ++++--
+ .../iio/common/inv_sensors/inv_sensors_timestamp.c | 11 ++--
+ drivers/iio/dac/mcp47a1.c | 4 +-
+ drivers/iio/dac/rohm-bd79703.c | 3 ++
+ drivers/iio/frequency/adf4377.c | 4 +-
+ drivers/iio/frequency/admv1013.c | 9 ++--
+ drivers/iio/gyro/adis16136.c | 2 +-
+ drivers/iio/health/max30102.c | 12 +++--
+ drivers/iio/imu/adis16400.c | 2 +-
+ drivers/iio/imu/adis16480.c | 4 +-
+ drivers/iio/industrialio-buffer.c | 3 +-
+ drivers/iio/industrialio-trigger.c | 2 +
+ drivers/iio/light/gp2ap020a00f.c | 2 +
+ drivers/iio/light/rohm-bu27034.c | 62 +++++++++++++---------
+ drivers/iio/pressure/bmp280-core.c | 2 +-
+ drivers/iio/pressure/rohm-bm1390.c | 2 +-
+ drivers/iio/proximity/aw96103.c | 30 ++++++++---
+ drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 4 +-
+ drivers/iio/proximity/sx9324.c | 2 +-
+ drivers/iio/proximity/vcnl3020.c | 24 ++++++---
+ drivers/iio/proximity/vl53l0x-i2c.c | 3 ++
+ 32 files changed, 234 insertions(+), 113 deletions(-)
+Merging watchdog-fixes/watchdog (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'watchdog' of https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git watchdog-fixes/watchdog
+Already up to date.
+Merging counter-current/counter-current (f1a3a9946aab6 counter: microchip-tcb-capture: Fix DT channel validation)
+$ git merge -m Merge branch 'counter-current' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git counter-current/counter-current
+Already up to date.
+Merging char-misc.current/char-misc-linus (049094c887806 Merge tag 'iio-fixes-for-7.3a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus)
+$ git merge -m Merge branch 'char-misc-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc.current/char-misc-linus
+Merge made by the 'ort' strategy.
+ drivers/virt/nitro_enclaves/ne_misc_dev.c | 1 +
+ 1 file changed, 1 insertion(+)
+Merging soundwire-fixes/fixes (aba7b41faeecb soundwire: cadence_master: wait and cancel cdns->work before clock stop)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git soundwire-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/soundwire/cadence_master.c | 7 +++++++
+ drivers/soundwire/dmi-quirks.c | 7 +++++++
+ 2 files changed, 14 insertions(+)
+Merging thunderbolt-fixes/fixes (c230bc2b926d1 Revert "thunderbolt: Add quirk to reset host interface on DMA path teardown for AMD USB4 routers")
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git thunderbolt-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/thunderbolt/domain.c | 26 +-------------------------
+ drivers/thunderbolt/nhi.c | 26 --------------------------
+ drivers/thunderbolt/nhi.h | 21 ++-------------------
+ drivers/thunderbolt/nhi_regs.h | 4 ----
+ drivers/thunderbolt/pci.c | 23 -----------------------
+ drivers/thunderbolt/xdomain.c | 4 ++++
+ 6 files changed, 7 insertions(+), 97 deletions(-)
+Merging input-current/for-linus (85f080fb87ed5 Input: cyttsp5 - clamp the HID report size before memcpy)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git input-current/for-linus
+Auto-merging drivers/input/keyboard/atkbd.c
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/input/mediatek,mt6779-keypad.yaml | 1 +
+ drivers/input/evdev.c | 2 ++
+ drivers/input/input-compat.c | 2 ++
+ drivers/input/keyboard/adp5588-keys.c | 12 ++++++------
+ drivers/input/keyboard/atkbd.c | 8 ++++++++
+ drivers/input/rmi4/rmi_driver.c | 13 +++++++++++++
+ drivers/input/rmi4/rmi_smbus.c | 10 +++++-----
+ drivers/input/touchscreen/cyttsp5.c | 1 +
+ 8 files changed, 38 insertions(+), 11 deletions(-)
+Merging crypto-current/master (53cf0f26eece0 crypto: caam - map job ring registers without claiming region)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git crypto-current/master
+Merge made by the 'ort' strategy.
+ drivers/crypto/caam/jr.c | 23 ++++++++++++++++++++---
+ 1 file changed, 20 insertions(+), 3 deletions(-)
+Merging libcrypto-fixes/libcrypto-fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'libcrypto-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-fixes/libcrypto-fixes
+Already up to date.
+Merging vfio-fixes/for-linus (e242e974e812e vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile)
+$ git merge -m Merge branch 'for-linus' of https://github.com/awilliam/linux-vfio.git vfio-fixes/for-linus
+Already up to date.
+Merging kselftest-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git kselftest-fixes/fixes
+Already up to date.
+Merging dmaengine-fixes/fixes (075bc7b1d3dde dmaengine: mmp_pdma: fix wrong sg length in mmp_pdma_prep_slave_sg())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git dmaengine-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/dma/dmaengine.c | 19 +++++++++++++++----
+ drivers/dma/mmp_pdma.c | 5 ++---
+ drivers/dma/pxa_dma.c | 3 ++-
+ drivers/dma/sprd-dma.c | 3 +--
+ drivers/dma/sun6i-dma.c | 9 +++++----
+ drivers/dma/ti/k3-udma-glue.c | 5 +++--
+ drivers/dma/xilinx/xilinx_dma.c | 26 ++++++++++++++++++--------
+ 7 files changed, 46 insertions(+), 24 deletions(-)
+Merging backlight-fixes/for-backlight-fixes (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'for-backlight-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git backlight-fixes/for-backlight-fixes
+Already up to date.
+Merging mtd-fixes/mtd/fixes (44b8a0bf5f96e mtd: spi-nor: core: Fix mutex leak in spi_nor_rww_start_exclusive())
+$ git merge -m Merge branch 'mtd/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd-fixes/mtd/fixes
+Merge made by the 'ort' strategy.
+ drivers/mtd/chips/cfi_cmdset_0001.c | 42 ++++++++-----
+ drivers/mtd/devices/block2mtd.c | 2 +-
+ drivers/mtd/devices/mtd_intel_dg.c | 3 +-
+ drivers/mtd/mtdcore.c | 3 +-
+ drivers/mtd/nand/ecc.c | 7 +++
+ drivers/mtd/nand/raw/cadence-nand-controller.c | 6 +-
+ drivers/mtd/nand/raw/vf610_nfc.c | 85 +++++++++++++++++++++-----
+ drivers/mtd/nand/spi/core.c | 43 +++++++++----
+ drivers/mtd/spi-nor/core.c | 2 +-
+ include/linux/mtd/nand.h | 2 +
+ 10 files changed, 146 insertions(+), 49 deletions(-)
+Merging mfd-fixes/for-mfd-fixes (d5d2d7a8d8be1 MAINTAINERS: Add a mailing list entry to MFD)
+$ git merge -m Merge branch 'for-mfd-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git mfd-fixes/for-mfd-fixes
+Already up to date.
+Merging v4l-dvb-fixes/fixes (37bef2170d4c8 media: mediatek: vcodec: bound AV1 tile-start copy to the array capacity)
+$ git merge -m Merge branch 'fixes' of git://linuxtv.org/media-ci/media-pending.git v4l-dvb-fixes/fixes
+Already up to date.
+Merging reset-fixes/reset/fixes (71827776667f4 reset: imx7: Correct polarity of MIPI CSI resets on i.MX8MQ)
+$ git merge -m Merge branch 'reset/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/pza/linux reset-fixes/reset/fixes
+Already up to date.
+Merging mips-fixes/mips-fixes (126f16e0a1b35 MIPS: Octeon: apply USB FDT fixups also when USB is modular)
+$ git merge -m Merge branch 'mips-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-fixes/mips-fixes
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 1 +
+ arch/mips/Kconfig | 4 +-
+ arch/mips/cavium-octeon/octeon-platform.c | 4 +-
+ arch/mips/configs/econet_en751221_defconfig | 264 ++++++++++++++++++++++++++++
+ 4 files changed, 268 insertions(+), 5 deletions(-)
+ create mode 100644 arch/mips/configs/econet_en751221_defconfig
+Merging at91-fixes/at91-fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'at91-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git at91-fixes/at91-fixes
+Already up to date.
+Merging omap-fixes/fixes (2fabd2f406d0c ARM: dts: ti/omap: dra7: fix PCIe PHY clock divider definition)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git omap-fixes/fixes
+Merge made by the 'ort' strategy.
+ arch/arm/boot/dts/ti/omap/dra7xx-clocks.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+Merging tegra-fixes/fixes (ed3e0ee8a9ec9 Merge branch for-7.3/arm64/dt into fixes)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tegra-fixes/fixes
+Merge made by the 'ort' strategy.
+ .../boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 13 ++
+ arch/arm64/boot/dts/nvidia/tegra264.dtsi | 180 ++++++++++++++++++---
+ drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 +-
+ drivers/soc/tegra/pmc.c | 1 +
+ 4 files changed, 171 insertions(+), 25 deletions(-)
+Merging kvm-fixes/master (d599822bdb66a Merge tag 'kvm-s390-master-7.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD)
+$ git merge -m Merge branch 'master' of git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-fixes/master
+Auto-merging arch/s390/kvm/s390/s390.c
+Merge made by the 'ort' strategy.
+ arch/s390/kernel/uv.c | 8 ++--
+ arch/s390/kvm/gmap/dat.c | 65 ++++++++++++++++------------
+ arch/s390/kvm/gmap/dat.h | 10 ++---
+ arch/s390/kvm/gmap/gmap.c | 6 ++-
+ arch/s390/kvm/gmap/kvm_mmu.c | 91 ++++++++++++++++-----------------------
+ arch/s390/kvm/gmap/kvm_mmu.h | 4 --
+ arch/s390/kvm/s390/gaccess.c | 13 ++++++
+ arch/s390/kvm/s390/interrupt.c | 81 +++++++++++++++++-----------------
+ arch/s390/kvm/s390/s390.c | 3 +-
+ arch/s390/kvm/s390/s390.h | 2 +-
+ drivers/s390/crypto/vfio_ap_ops.c | 18 ++++++--
+ 11 files changed, 157 insertions(+), 144 deletions(-)
+Merging kvms390-fixes/master (f47190b08b71e s390/uv: Prevent potential out-of-bounds read)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git kvms390-fixes/master
+Already up to date.
+Merging kvm-arm-fixes/fixes (089e4f3c4862b KVM: arm64: Fix FGT mapping for HFGITR_EL2.nGCSEPP)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-fixes/fixes
+Merge made by the 'ort' strategy.
+ arch/arm64/include/asm/kvm_host.h | 2 +-
+ arch/arm64/include/asm/kvm_nested.h | 3 +-
+ arch/arm64/include/asm/kvm_pkvm.h | 3 +-
+ arch/arm64/kvm/arm.c | 8 +-
+ arch/arm64/kvm/emulate-nested.c | 2 +-
+ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 +
+ arch/arm64/kvm/hyp/include/nvhe/mm.h | 1 +
+ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 20 +
+ arch/arm64/kvm/hyp/nvhe/mm.c | 79 +++-
+ arch/arm64/kvm/hyp/nvhe/pkvm.c | 29 +-
+ arch/arm64/kvm/hyp/nvhe/setup.c | 16 +-
+ arch/arm64/kvm/hypercalls.c | 3 +-
+ arch/arm64/kvm/mmu.c | 15 +-
+ arch/arm64/kvm/nested.c | 115 +++---
+ arch/arm64/kvm/vgic/vgic-its.c | 46 ++-
+ tools/testing/selftests/kvm/Makefile.kvm | 1 +
+ tools/testing/selftests/kvm/arm64/smccc_filter.c | 4 +
+ tools/testing/selftests/kvm/arm64/vgic_its_save.c | 441 ++++++++++++++++++++++
+ tools/testing/selftests/kvm/steal_time.c | 30 +-
+ 19 files changed, 701 insertions(+), 119 deletions(-)
+ create mode 100644 tools/testing/selftests/kvm/arm64/vgic_its_save.c
+Merging hwmon-fixes/hwmon (c702a5f18b780 hwmon: (w83793) release probe data through kref)
+$ git merge -m Merge branch 'hwmon' of https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-fixes/hwmon
+Merge made by the 'ort' strategy.
+ Documentation/hwmon/cgbc-hwmon.rst | 42 +++++++-----
+ drivers/hwmon/cgbc-hwmon.c | 129 +++++++++++++++++++++++--------------
+ drivers/hwmon/gpio-fan.c | 4 +-
+ drivers/hwmon/k10temp.c | 2 +-
+ drivers/hwmon/pmbus/pmbus.h | 3 +-
+ drivers/hwmon/pwm-fan.c | 13 +++-
+ drivers/hwmon/w83791d.c | 1 +
+ drivers/hwmon/w83793.c | 4 +-
+ 8 files changed, 127 insertions(+), 71 deletions(-)
+Merging nvdimm-fixes/libnvdimm-fixes (a8aec14230322 nvdimm/bus: Fix potential use after free in asynchronous initialization)
+$ git merge -m Merge branch 'libnvdimm-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git nvdimm-fixes/libnvdimm-fixes
+Already up to date.
+Merging cxl-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git cxl-fixes/fixes
+Already up to date.
+Merging dma-mapping-fixes/dma-mapping-fixes (55a8e14518692 x86/mm: Don't force unencrypted DMA for IOMMU-backed devices)
+$ git merge -m Merge branch 'dma-mapping-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git dma-mapping-fixes/dma-mapping-fixes
+Merge made by the 'ort' strategy.
+ arch/x86/mm/mem_encrypt.c | 3 ++-
+ include/trace/events/dma.h | 2 +-
+ kernel/dma/coherent.c | 3 +--
+ kernel/dma/swiotlb.c | 4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+Merging drivers-x86-fixes/fixes (d144a494d81fc MAINTAINERS: fix sysfs-platform-ayaneo-ec documentation path)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git drivers-x86-fixes/fixes
+Already up to date.
+Merging samsung-krzk-fixes/fixes (48f344b3e8321 soc: samsung: exynos-pmu: fix use-after-free of interrupt generator node)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git samsung-krzk-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/soc/samsung/exynos-pmu.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+Merging pinctrl-samsung-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git pinctrl-samsung-fixes/fixes
+Already up to date.
+Merging pinctrl-qcom-fixes/pinctrl-qcom/for-current (818103dc7f599 pinctrl: qcom: ipq5210: Publish the OF module alias)
+$ git merge -m Merge branch 'pinctrl-qcom/for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git pinctrl-qcom-fixes/pinctrl-qcom/for-current
+Merge made by the 'ort' strategy.
+ .../bindings/pinctrl/qcom,nord-tlmm.yaml | 7 +++--
+ drivers/pinctrl/qcom/pinctrl-ipq5210.c | 1 +
+ drivers/pinctrl/qcom/pinctrl-nord.c | 34 +++++++++++++++-------
+ 3 files changed, 28 insertions(+), 14 deletions(-)
+Merging devicetree-fixes/dt/linus (5bb01c657ff9f of: fix out-of-bounds read in of_alias_scan() stem parser)
+$ git merge -m Merge branch 'dt/linus' of https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git devicetree-fixes/dt/linus
+Already up to date.
+Merging dt-krzk-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git dt-krzk-fixes/fixes
+Already up to date.
+Merging scsi-fixes/fixes (3d676e458fe0c scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git scsi-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/scsi/Kconfig | 1 +
+ drivers/scsi/fnic/fnic.h | 2 +-
+ drivers/scsi/fnic/fnic_isr.c | 13 ++++++++++---
+ drivers/scsi/fnic/fnic_main.c | 41 ++++++++++++++++++++++++++++++++++++++-
+ drivers/scsi/pm8001/pm8001_init.c | 6 +++---
+ drivers/scsi/qla2xxx/qla_os.c | 2 +-
+ drivers/scsi/scsi.c | 24 ++++++++++++++++++-----
+ 7 files changed, 75 insertions(+), 14 deletions(-)
+Merging drm-fixes/drm-fixes (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'drm-fixes' of https://gitlab.freedesktop.org/drm/kernel.git drm-fixes/drm-fixes
+Already up to date.
+Merging drm-intel-fixes/for-linux-next-fixes (a26204be587c5 Revert "drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable")
+$ git merge -m Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/i915/kernel.git drm-intel-fixes/for-linux-next-fixes
+Merge made by the 'ort' strategy.
+ drivers/gpu/drm/i915/display/intel_cursor.c | 15 +++++----------
+ drivers/gpu/drm/i915/display/intel_dp_link_caps.c | 9 ++++++++-
+ drivers/gpu/drm/i915/display/skl_universal_plane.c | 15 +++++----------
+ 3 files changed, 18 insertions(+), 21 deletions(-)
+Merging mmc-fixes/fixes (4396d70bb7fec mmc: sdhci-of-aspeed: Remove children before releasing SDC resources)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git mmc-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/memstick/core/ms_block.c | 2 ++
+ drivers/mmc/core/bus.c | 2 +-
+ drivers/mmc/core/host.c | 1 +
+ drivers/mmc/core/sdio_uart.c | 3 +++
+ drivers/mmc/host/mmc_hsq.c | 8 ++++++-
+ drivers/mmc/host/mmc_spi.c | 1 +
+ drivers/mmc/host/mmci.c | 3 +++
+ drivers/mmc/host/mxcmmc.c | 4 ++++
+ drivers/mmc/host/rtsx_pci_sdmmc.c | 5 +++++
+ drivers/mmc/host/sdhci-of-aspeed.c | 5 ++++-
+ drivers/mmc/host/sdhci_am654.c | 43 +++++++++++++++++++++++++-------------
+ drivers/mmc/host/sh_mmcif.c | 3 +--
+ 12 files changed, 60 insertions(+), 20 deletions(-)
+Merging rtc-fixes/rtc-fixes (254f49634ee16 Linux 7.1-rc1)
+$ git merge -m Merge branch 'rtc-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-fixes/rtc-fixes
+Already up to date.
+Merging gnss-fixes/gnss-linus (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'gnss-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git gnss-fixes/gnss-linus
+Already up to date.
+Merging hyperv-fixes/hyperv-fixes (ec31dc39e835c Drivers: hv: Don't reset VMBus connection state on error/exit paths)
+$ git merge -m Merge branch 'hyperv-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-fixes/hyperv-fixes
+Merge made by the 'ort' strategy.
+ arch/x86/hyperv/hv_init.c | 7 ++++---
+ drivers/hv/channel_mgmt.c | 12 +++++++++---
+ drivers/hv/connection.c | 1 -
+ drivers/hv/vmbus_drv.c | 19 +++++++------------
+ 4 files changed, 20 insertions(+), 19 deletions(-)
+Merging risc-v-fixes/fixes (b94cec5761d22 riscv: skip software algning code for HAVE_EFFICIENT_UNALIGNED_ACCESS)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git risc-v-fixes/fixes
+Already up to date.
+Merging riscv-dt-fixes/riscv-dt-fixes (0f70fd6f4c1d6 riscv: dts: microchip: beaglev-fire: remove double definition of gpio interrupts)
+$ git merge -m Merge branch 'riscv-dt-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git riscv-dt-fixes/riscv-dt-fixes
+Merge made by the 'ort' strategy.
+ arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 18 ------------------
+ 1 file changed, 18 deletions(-)
+Merging riscv-soc-fixes/riscv-soc-fixes (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'riscv-soc-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git riscv-soc-fixes/riscv-soc-fixes
+Already up to date.
+Merging fpga-fixes/fixes (19272b37aa4f8 Linux 6.16-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git fpga-fixes/fixes
+Already up to date.
+Merging spdx/spdx-linus (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'spdx-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git spdx/spdx-linus
+Already up to date.
+Merging gpio-brgl-fixes/gpio/for-current (50fd0ada8d375 gpio: virtuser: skip free_irq when no IRQ is installed)
+$ git merge -m Merge branch 'gpio/for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio-brgl-fixes/gpio/for-current
+Auto-merging drivers/gpio/gpio-virtuser.c
+Merge made by the 'ort' strategy.
+ drivers/gpio/gpio-virtuser.c | 3 ++-
+ drivers/gpio/gpiolib-of.c | 6 +++---
+ drivers/gpio/gpiolib-shared.c | 9 ++++++---
+ 3 files changed, 11 insertions(+), 7 deletions(-)
+Merging gpio-intel-fixes/fixes (32c7f7f80e5f7 gpio: crystalcove: add missing MODULE_ALIAS())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git gpio-intel-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/gpio/gpio-crystalcove.c | 1 +
+ 1 file changed, 1 insertion(+)
+Merging pinctrl-intel-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git pinctrl-intel-fixes/fixes
+Already up to date.
+Merging auxdisplay-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git auxdisplay-fixes/fixes
+Already up to date.
+Merging kunit-fixes/kunit-fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'kunit-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git kunit-fixes/kunit-fixes
+Already up to date.
+Merging renesas-fixes/fixes (8dc2615d57020 arm64: dts: renesas: r8a779f0: Set UFS lane count)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git renesas-fixes/fixes
+Merge made by the 'ort' strategy.
+ arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+Merging perf-current/perf-tools (aadea57f53288 perf powerpc-vpadtl: Fix raw_size of DTL samples)
+$ git merge -m Merge branch 'perf-tools' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git perf-current/perf-tools
+Already up to date.
+Merging efi-fixes/urgent (d8809f6931065 efi: sysfb_efi: Extend quirk to cover IdeaPad Duet 3 10IGL5-LTE)
+$ git merge -m Merge branch 'urgent' of https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-fixes/urgent
+Already up to date.
+Merging battery-fixes/fixes (a58cbc8b36ec0 power: supply: ds2780: Fix ds2780_get_capacity() returning raw value)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git battery-fixes/fixes
+Merge made by the 'ort' strategy.
+ drivers/power/supply/ds2780_battery.c | 2 +-
+ drivers/power/supply/max17042_battery.c | 2 +-
+ include/linux/power_supply.h | 6 +++---
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+Merging iommufd-fixes/for-rc (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git iommufd-fixes/for-rc
+Already up to date.
+Merging rust-fixes/rust-fixes (704340f1cd0dc Merge tag 'x86_urgent_for_7.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
+$ git merge -m Merge branch 'rust-fixes' of https://github.com/Rust-for-Linux/linux.git rust-fixes/rust-fixes
+Already up to date.
+Merging w1-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1.git w1-fixes/fixes
+Already up to date.
+Merging pmdomain-fixes/fixes (df2908090cda3 Linux 7.3-rc2)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git pmdomain-fixes/fixes
+Already up to date.
+Merging i2c-andi-fixes/i2c/i2c-fixes (d4d0e2b81c8d1 i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove())
+$ git merge -m Merge branch 'i2c/i2c-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c-andi-fixes/i2c/i2c-fixes
+Merge made by the 'ort' strategy.
+ drivers/i2c/busses/i2c-at91-core.c | 3 +++
+ drivers/i2c/busses/i2c-at91-master.c | 12 +++++++++++-
+ drivers/i2c/busses/i2c-at91.h | 1 +
+ drivers/i2c/busses/i2c-imx.c | 3 +++
+ drivers/i2c/busses/i2c-ljca.c | 9 ---------
+ drivers/i2c/busses/i2c-qcom-cci.c | 20 +++++++++++---------
+ drivers/i2c/busses/i2c-qcom-geni.c | 4 +++-
+ drivers/i2c/i2c-atr.c | 1 +
+ 8 files changed, 33 insertions(+), 20 deletions(-)
+Merging i2c-rust-fixes/rust-i2c-fixes (4eb422482ca5d rust: i2c: fix I2cAdapter refcounts double increment)
+$ git merge -m Merge branch 'rust-i2c-fixes' of https://github.com/ikrtn/rust-for-linux i2c-rust-fixes/rust-i2c-fixes
+Already up to date.
+Merging sparc-fixes/for-linus (254f49634ee16 Linux 7.1-rc1)
+$ git merge -m Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc.git sparc-fixes/for-linus
+Already up to date.
+Merging clk-fixes/clk-fixes (59e0cc31cc5c4 clk: ti: composite: resolve parent clocks by name again)
+$ git merge -m Merge branch 'clk-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-fixes/clk-fixes
+Merge made by the 'ort' strategy.
+ drivers/clk/ti/composite.c | 26 ++++++++++++--------------
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+Merging thead-clk-fixes/thead-clk-fixes (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'thead-clk-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git thead-clk-fixes/thead-clk-fixes
+Already up to date.
+Merging tenstorrent-clk-fixes/tenstorrent-clk-fixes (6de23f81a5e08 Linux 7.0-rc1)
+$ git merge -m Merge branch 'tenstorrent-clk-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git tenstorrent-clk-fixes/tenstorrent-clk-fixes
+Already up to date.
+Merging fustini-config-fixes/riscv-config-fixes (254f49634ee16 Linux 7.1-rc1)
+$ git merge -m Merge branch 'riscv-config-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git fustini-config-fixes/riscv-config-fixes
+Already up to date.
+Merging pwrseq-fixes/pwrseq/for-current (242da4318d973 power: sequencing: fix NULL-pointer dereference in pwrseq_device_register())
+$ git merge -m Merge branch 'pwrseq/for-current' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git pwrseq-fixes/pwrseq/for-current
+Auto-merging drivers/power/sequencing/core.c
+Merge made by the 'ort' strategy.
+ drivers/power/sequencing/Kconfig | 3 ++-
+ drivers/power/sequencing/core.c | 11 +++++++----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+Merging thead-dt-fixes/thead-dt-fixes (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'thead-dt-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git thead-dt-fixes/thead-dt-fixes
+Already up to date.
+Merging ftrace-fixes/ftrace/fixes (1650a1b6cb1ae fgraph: Check ftrace_pids_enabled on registration for early filtering)
+$ git merge -m Merge branch 'ftrace/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git ftrace-fixes/ftrace/fixes
+Already up to date.
+Merging ring-buffer-fixes/ring-buffer/fixes (057caace5214d tracing: Create output file from cmd_check_undefined)
+$ git merge -m Merge branch 'ring-buffer/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git ring-buffer-fixes/ring-buffer/fixes
+Already up to date.
+Merging trace-fixes/trace/fixes (d860c67c05168 ring-buffer: Check resize_disabled before publishing the new subbuf order)
+$ git merge -m Merge branch 'trace/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-fixes/trace/fixes
+Already up to date.
+Merging tracefs-fixes/tracefs/fixes (07004a8c4b572 eventfs: Hold eventfs_mutex and SRCU when remount walks events)
+$ git merge -m Merge branch 'tracefs/fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git tracefs-fixes/tracefs/fixes
+Already up to date.
+Merging spacemit-fixes/fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux spacemit-fixes/fixes
+Already up to date.
+Merging tip-fixes/tip/urgent (eda0baaf93e90 Merge branch into tip/master: 'x86/mm')
+$ git merge -m Merge branch 'tip/urgent' of https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tip-fixes/tip/urgent
+Merge made by the 'ort' strategy.
+ arch/x86/mm/pat/set_memory.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+Merging kexec-fixes/kexec-fixes (a901b0778ae82 Merge patch series "kexec: fix probe error codes and error propagation")
+$ git merge -m Merge branch 'kexec-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git kexec-fixes/kexec-fixes
+Merge made by the 'ort' strategy.
+ arch/arm64/kernel/kexec_image.c | 4 ++--
+ arch/loongarch/kernel/kexec_efi.c | 4 ++--
+ arch/riscv/kernel/kexec_image.c | 4 ++--
+ kernel/kexec_elf.c | 4 ++--
+ kernel/kexec_file.c | 12 +++++++-----
+ 5 files changed, 15 insertions(+), 13 deletions(-)
+Merging liveupdate-fixes/fixes (3a0b8fa2eb36a kho: fix size calculation in kho_preserved_memory_reserve())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git liveupdate-fixes/fixes
+Already up to date.
+Merging drm-msm-fixes/msm-fixes (a15fac810c763 dt-bindings: display/msm: Use consistent indentation in the example)
+$ git merge -m Merge branch 'msm-fixes' of https://gitlab.freedesktop.org/drm/msm.git drm-msm-fixes/msm-fixes
+Merge made by the 'ort' strategy.
+ .../bindings/display/msm/qcom,qcs8300-mdss.yaml | 6 +--
+ .../bindings/display/msm/qcom,sar2130p-mdss.yaml | 4 +-
+ .../bindings/display/msm/qcom,sm6150-dpu.yaml | 14 ++---
+ .../bindings/display/msm/qcom,sm8350-mdss.yaml | 2 +-
+ .../bindings/display/msm/qcom,x1e80100-mdss.yaml | 60 +++++++++++-----------
+ drivers/gpu/drm/ci/xfails/msm-apq8016-fails.txt | 7 +++
+ drivers/gpu/drm/msm/Makefile | 1 -
+ drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +-
+ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++--
+ drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
+ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 15 +++---
+ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 1 +
+ drivers/gpu/drm/msm/dp/dp_display.c | 21 +++++++-
+ drivers/gpu/drm/msm/dsi/dsi_host.c | 36 +++++++------
+ drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 8 ++-
+ drivers/gpu/drm/msm/msm_drv.c | 2 +-
+ drivers/gpu/drm/msm/msm_fbdev.c | 1 +
+ drivers/gpu/drm/msm/msm_gem.h | 3 ++
+ drivers/gpu/drm/msm/msm_gem_vma.c | 2 +-
+ drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +-
+ drivers/gpu/drm/msm/msm_ringbuffer.h | 1 +
+ drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 2 +
+ 22 files changed, 124 insertions(+), 80 deletions(-)
+Merging uml-fixes/fixes (af421e9aed392 um: vector: fix use-after-free in vector_mmsg_rx())
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git uml-fixes/fixes
+Already up to date.
+Merging fwctl-fixes/for-rc (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl.git fwctl-fixes/for-rc
+Already up to date.
+Merging devsec-tsm-fixes/fixes (c3fd16c3b98ed virt: tdx-guest: Fix handling of host controlled 'quote' buffer length)
+$ git merge -m Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git devsec-tsm-fixes/fixes
+Already up to date.
+Merging drm-rust-fixes/for-linux-next-fixes (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust-fixes/for-linux-next-fixes
+Already up to date.
+Merging tenstorrent-dt-fixes/tenstorrent-dt-fixes (6de23f81a5e08 Linux 7.0-rc1)
+$ git merge -m Merge branch 'tenstorrent-dt-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git tenstorrent-dt-fixes/tenstorrent-dt-fixes
+Already up to date.
+Merging nfc-fixes/for-linus (50a0fd2402776 selftests: nci: Correct pthread_create return value check)
+$ git merge -m Merge branch 'for-linus' of https://codeberg.org/linux-nfc/linux.git nfc-fixes/for-linus
+Merge made by the 'ort' strategy.
+ drivers/nfc/nfcmrvl/fw_dnld.c | 11 ++++++++---
+ drivers/nfc/port100.c | 7 +++++++
+ drivers/nfc/st21nfca/i2c.c | 29 +++++++++++++++++++----------
+ net/nfc/llcp_core.c | 25 +++++++++++++++++++++++++
+ tools/testing/selftests/nci/nci_dev.c | 12 +++++++-----
+ 5 files changed, 66 insertions(+), 18 deletions(-)
+Merging drm-misc-fixes/for-linux-next-fixes (6c62dfd2820f0 drm/verisilicon: remove ARGB formats from primary plane)
+$ git merge -m Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-fixes/for-linux-next-fixes
+Merge made by the 'ort' strategy.
+ drivers/dma-buf/Kconfig | 2 +-
+ drivers/dma-buf/dma-buf-mapping.c | 31 ++++++++++-----
+ drivers/dma-buf/dma-fence.c | 14 ++++++-
+ drivers/gpu/drm/drm_atomic_uapi.c | 13 +++++--
+ drivers/gpu/drm/gud/gud_pipe.c | 7 +++-
+ .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c | 2 +-
+ .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 8 +++-
+ .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 8 ++--
+ .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gsp.c | 3 +-
+ .../drm/nouveau/nvkm/subdev/gsp/rm/r570/nvrm/gsp.h | 8 ++++
+ drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h | 2 +-
+ drivers/gpu/drm/scheduler/sched_entity.c | 8 +++-
+ drivers/gpu/drm/scheduler/sched_rq.c | 20 +++++-----
+ drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
+ drivers/gpu/drm/vc4/vc4_kms.c | 2 +-
+ drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 2 +
+ drivers/gpu/drm/verisilicon/vs_hwdb.c | 44 +++-------------------
+ drivers/gpu/drm/verisilicon/vs_hwdb.h | 4 +-
+ drivers/gpu/drm/verisilicon/vs_primary_plane.c | 4 +-
+ include/linux/dma-fence.h | 6 +++
+ 20 files changed, 107 insertions(+), 83 deletions(-)
+Merging rust/rust-next (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git rust/rust-next
+Already up to date.
+Merging rust-interop/interop-next (05f7e89ab9731 Linux 6.19)
+$ git merge -m Merge branch 'interop-next' of https://github.com/Rust-for-Linux/linux.git rust-interop/interop-next
+Already up to date.
+Merging rust-alloc/alloc-next (82134823a07b4 MAINTAINERS: add Alice Ryhl as co-maintainer for Rust [ALLOC])
+$ git merge -m Merge branch 'alloc-next' of https://github.com/Rust-for-Linux/linux.git rust-alloc/alloc-next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 1 +
+ 1 file changed, 1 insertion(+)
+Merging rust-io/io-next (86731a2a651e5 Linux 6.16-rc3)
+$ git merge -m Merge branch 'io-next' of https://github.com/Rust-for-Linux/linux.git rust-io/io-next
+Already up to date.
+Merging rust-pin-init/pin-init-next (3b3ff9034a497 rust: pin-init: internal: init: support tuple struct constructor syntax)
+$ git merge -m Merge branch 'pin-init-next' of https://github.com/Rust-for-Linux/linux.git rust-pin-init/pin-init-next
+Merge made by the 'ort' strategy.
+ rust/pin-init/internal/src/init.rs | 494 ++++++++++++++++++++++++++++-----
+ rust/pin-init/internal/src/lib.rs | 12 +-
+ rust/pin-init/internal/src/pin_data.rs | 129 ++++++---
+ rust/pin-init/internal/src/util.rs | 54 ++++
+ rust/pin-init/src/lib.rs | 71 ++++-
+ 5 files changed, 638 insertions(+), 122 deletions(-)
+ create mode 100644 rust/pin-init/internal/src/util.rs
+Merging rust-timekeeping/timekeeping-next (ddb1444d33351 hrtimer: add usage examples to documentation)
+$ git merge -m Merge branch 'timekeeping-next' of https://github.com/Rust-for-Linux/linux.git rust-timekeeping/timekeeping-next
+Already up to date.
+Merging rust-xarray/xarray-next (c455f19bbe610 rust: xarray: add __rust_helper to helpers)
+$ git merge -m Merge branch 'xarray-next' of https://github.com/Rust-for-Linux/linux.git rust-xarray/xarray-next
+Already up to date.
+Merging rust-analyzer/rust-analyzer-next (5f45afb8ab04d scripts: generate_rust_analyzer.py: pass cfg to macros crate)
+$ git merge -m Merge branch 'rust-analyzer-next' of https://github.com/Rust-for-Linux/linux.git rust-analyzer/rust-analyzer-next
+Auto-merging scripts/generate_rust_analyzer.py
+Merge made by the 'ort' strategy.
+ scripts/generate_rust_analyzer.py | 1 +
+ 1 file changed, 1 insertion(+)
+Merging mm/for-next (66ebd32b32e4c Merge branch 'gup-7.4.misc' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mm/linux.git mm/for-next
+Merge made by the 'ort' strategy.
+ mm/gup.c | 185 ++++++++++++++++++++++++++++++----------------------------
+ mm/gup_test.c | 11 ++--
+ 2 files changed, 102 insertions(+), 94 deletions(-)
+Merging mm-nonmm-stable/mm-nonmm-stable (0d9ff90a5422c Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi)
+$ git merge -m Merge branch 'mm-nonmm-stable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm mm-nonmm-stable/mm-nonmm-stable
+Already up to date.
+Merging mm-nonmm-unstable/mm-nonmm-unstable (8b508253c3902 CREDITS: fix the ordering and other issues)
+$ git merge -m Merge branch 'mm-nonmm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm mm-nonmm-unstable/mm-nonmm-unstable
+Auto-merging .mailmap
+Auto-merging CREDITS
+Auto-merging Documentation/admin-guide/kernel-parameters.txt
+Auto-merging Documentation/admin-guide/sysctl/kernel.rst
+Auto-merging MAINTAINERS
+Auto-merging drivers/usb/gadget/legacy/inode.c
+Auto-merging init/main.c
+Auto-merging kernel/fork.c
+Auto-merging tools/bootconfig/main.c
+Merge made by the 'ort' strategy.
+ .mailmap | 3 +
+ CREDITS | 181 ++++++++--------
+ Documentation/admin-guide/kernel-parameters.txt | 6 +-
+ Documentation/admin-guide/sysctl/kernel.rst | 5 +-
+ MAINTAINERS | 1 +
+ arch/Kconfig | 8 -
+ arch/alpha/include/uapi/asm/setup.h | 4 +
+ arch/arc/include/asm/setup.h | 2 +-
+ arch/arm/include/uapi/asm/setup.h | 6 +-
+ arch/arm64/include/uapi/asm/setup.h | 4 +
+ arch/loongarch/include/uapi/asm/setup.h | 4 +
+ arch/m68k/include/uapi/asm/setup.h | 6 +-
+ arch/microblaze/include/uapi/asm/setup.h | 4 +
+ arch/mips/include/uapi/asm/setup.h | 4 +
+ arch/parisc/include/uapi/asm/setup.h | 4 +
+ arch/powerpc/include/uapi/asm/setup.h | 4 +
+ arch/riscv/include/uapi/asm/setup.h | 4 +
+ arch/s390/Kconfig | 8 -
+ arch/s390/kernel/traps.c | 7 +
+ arch/sparc/include/uapi/asm/setup.h | 10 +-
+ arch/sparc/kernel/setup.c | 9 +
+ arch/um/include/asm/setup.h | 2 +-
+ arch/x86/include/asm/setup.h | 2 +-
+ arch/xtensa/include/uapi/asm/setup.h | 4 +
+ drivers/infiniband/hw/hfi1/fault.c | 1 -
+ drivers/media/v4l2-core/v4l2-vp9.c | 30 +--
+ drivers/rapidio/devices/rio_mport_cdev.c | 5 +-
+ drivers/usb/gadget/legacy/inode.c | 4 +-
+ fs/fat/fat.h | 2 +-
+ fs/fat/fatent.c | 21 +-
+ fs/fat/file.c | 3 +-
+ fs/fat/inode.c | 23 +-
+ fs/fat/misc.c | 6 +-
+ fs/ocfs2/alloc.c | 27 +++
+ fs/ocfs2/dir.c | 55 +++++
+ fs/ocfs2/dlmglue.c | 4 +
+ fs/ocfs2/inode.c | 53 ++++-
+ fs/ocfs2/journal.c | 3 +-
+ fs/ocfs2/journal.h | 1 -
+ fs/ocfs2/ocfs2.h | 17 ++
+ fs/ocfs2/quota_local.c | 9 +-
+ fs/ocfs2/refcounttree.c | 27 +++
+ fs/ocfs2/suballoc.c | 235 +++++++++++++++++---
+ fs/ocfs2/suballoc.h | 2 +-
+ fs/ocfs2/super.c | 32 ++-
+ fs/ocfs2/xattr.c | 194 +++++++++++++----
+ fs/proc/base.c | 8 +-
+ fs/squashfs/fragment.c | 6 +-
+ fs/squashfs/squashfs_fs.h | 2 +-
+ include/asm-generic/vmlinux.lds.h | 4 +-
+ include/linux/fault-inject.h | 10 +-
+ include/linux/init.h | 25 ++-
+ include/linux/minmax.h | 6 +-
+ include/linux/module.h | 4 +-
+ include/linux/panic.h | 2 +
+ include/uapi/asm-generic/setup.h | 4 +
+ init/Kconfig | 19 +-
+ init/main.c | 63 +++++-
+ init/version.c | 11 +-
+ ipc/mqueue.c | 7 +
+ kernel/fork.c | 5 +-
+ kernel/gcov/fs.c | 2 +-
+ kernel/hung_task.c | 55 ++++-
+ kernel/module/main.c | 24 +--
+ kernel/panic.c | 22 +-
+ kernel/resource.c | 16 +-
+ kernel/taskstats.c | 54 ++---
+ lib/Kconfig | 14 +-
+ lib/Kconfig.debug | 15 ++
+ lib/bootconfig.c | 46 ++--
+ lib/decompress_bunzip2.c | 2 +-
+ lib/decompress_unlz4.c | 4 +
+ lib/decompress_unxz.c | 12 +-
+ lib/dynamic_debug.c | 15 +-
+ lib/fault-inject.c | 7 +-
+ lib/group_cpus.c | 87 +++++++-
+ lib/klist.c | 16 +-
+ lib/plist.c | 7 +
+ lib/raid/Kconfig | 2 +
+ lib/raid/raid6/x86/avx2.c | 6 +
+ lib/raid/raid6/x86/avx512.c | 6 +
+ lib/raid/raid6/x86/recov_avx2.c | 2 +
+ lib/raid/raid6/x86/recov_avx512.c | 2 +
+ lib/raid/xor/x86/xor-avx.c | 1 +
+ lib/tests/Makefile | 1 +
+ lib/tests/errseq_kunit.c | 237 +++++++++++++++++++++
+ rust/bindings/bindings_helper.h | 1 +
+ rust/macros/module.rs | 19 ++
+ scripts/checkpatch.pl | 24 ++-
+ scripts/checkstack.pl | 6 +-
+ scripts/spelling.txt | 4 +-
+ tools/bootconfig/main.c | 104 ++++-----
+ tools/bootconfig/test-bootconfig.sh | 12 ++
+ tools/testing/selftests/core/unshare_test.c | 19 +-
+ .../filesystems/epoll/epoll_wakeup_test.c | 32 ++-
+ .../selftests/membarrier/membarrier_test_impl.h | 17 +-
+ tools/testing/selftests/uevent/uevent_filtering.c | 8 -
+ 97 files changed, 1629 insertions(+), 494 deletions(-)
+ create mode 100644 lib/tests/errseq_kunit.c
+Merging kbuild/kbuild-for-next (322b0463f30b0 kbuild: fix grammar in output Makefile .gitignore generation comment)
+$ git merge -m Merge branch 'kbuild-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild/kbuild-for-next
+Auto-merging Makefile
+Merge made by the 'ort' strategy.
+ Makefile | 11 ++++++----
+ scripts/Makefile.gcc-plugins | 4 ++++
+ scripts/kconfig/symbol.c | 5 ++++-
+ scripts/kconfig/tests/err_recursive_dep/Kconfig | 24 ++++++++++++++++++++++
+ .../tests/err_recursive_dep/expected_stderr | 13 ++++++++++++
+ scripts/mkcompile_h | 2 +-
+ scripts/setlocalversion | 3 +--
+ 7 files changed, 54 insertions(+), 8 deletions(-)
+Merging clang-fixes/clang-fixes-for-next (0bb666d5f5a23 once_lite: Simplify condition handling and fix context analysis)
+$ git merge -m Merge branch 'clang-fixes-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git clang-fixes/clang-fixes-for-next
+Merge made by the 'ort' strategy.
+ include/linux/once_lite.h | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+Merging clang-format/clang-format (8f0b4cce4481f Linux 6.19-rc1)
+$ git merge -m Merge branch 'clang-format' of https://github.com/ojeda/linux.git clang-format/clang-format
+Already up to date.
+Merging perf/perf-tools-next (91b0782fc9e9d perf annotate-data: Convert type histogram to hashmap)
+$ git merge -m Merge branch 'perf-tools-next' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf/perf-tools-next
+Merge made by the 'ort' strategy.
+ tools/arch/x86/include/asm/msr-index.h | 7 +
+ tools/arch/x86/include/uapi/asm/perf_regs.h | 53 ++
+ tools/build/Makefile.feature | 3 +-
+ tools/build/feature/Makefile | 18 +-
+ tools/build/feature/test-gtk2-infobar.c | 12 -
+ tools/build/feature/{test-gtk2.c => test-gtk4.c} | 4 +-
+ tools/build/feature/test-timerfd.c | 2 +-
+ tools/include/uapi/linux/perf_event.h | 49 +-
+ tools/perf/.clang-format | 1 +
+ tools/perf/Documentation/perf-annotate.txt | 3 +
+ tools/perf/Documentation/perf-record.txt | 18 +-
+ tools/perf/Documentation/perf-report.txt | 8 +-
+ tools/perf/Documentation/perf-top.txt | 6 +
+ tools/perf/Makefile | 35 +-
+ tools/perf/Makefile.config | 27 +-
+ tools/perf/Makefile.perf | 6 +-
+ tools/perf/arch/x86/tests/dwarf-unwind.c | 4 +
+ tools/perf/arch/x86/util/pmu.c | 216 +++++---
+ tools/perf/bench/futex.h | 11 +
+ tools/perf/builtin-annotate.c | 88 ++--
+ tools/perf/builtin-c2c.c | 1 +
+ tools/perf/builtin-config.c | 18 +-
+ tools/perf/builtin-ftrace.c | 28 +-
+ tools/perf/builtin-help.c | 30 +-
+ tools/perf/builtin-kvm.c | 1 +
+ tools/perf/builtin-list.c | 2 +-
+ tools/perf/builtin-report.c | 12 +-
+ tools/perf/builtin-script.c | 93 +++-
+ tools/perf/builtin-stat.c | 4 +-
+ tools/perf/builtin-top.c | 3 +
+ tools/perf/builtin-trace.c | 249 ++++++---
+ tools/perf/builtin.h | 3 +
+ tools/perf/perf.c | 114 +++--
+ tools/perf/pmu-events/intel_metrics.py | 3 +-
+ tools/perf/python/ilist.py | 78 +--
+ tools/perf/python/treport.py | 561 +++++++++++++++++++++
+ tools/perf/scripts/install-build-deps.sh | 4 +-
+ tools/perf/tests/make | 54 +-
+ tools/perf/tests/sample-parsing.c | 109 ++++
+ tools/perf/tests/shell/annotate_weight.sh | 63 +++
+ tools/perf/tests/shell/lib/waiting.sh | 34 +-
+ tools/perf/tests/shell/record.sh | 257 ++++++++++
+ tools/perf/tests/shell/stat.sh | 5 +
+ tools/perf/tests/shell/test_event_open_fallback.sh | 2 -
+ tools/perf/tests/shell/trace_ksym_beautifier.sh | 38 ++
+ tools/perf/trace/beauty/beauty.h | 3 +
+ tools/perf/ui/browsers/annotate-data.c | 10 +-
+ tools/perf/ui/browsers/annotate.c | 21 +-
+ tools/perf/ui/browsers/hists.c | 1 +
+ tools/perf/ui/browsers/scripts.c | 1 +
+ tools/perf/ui/gtk/annotate.c | 36 +-
+ tools/perf/ui/gtk/browser.c | 96 +++-
+ tools/perf/ui/gtk/gtk.h | 16 +-
+ tools/perf/ui/gtk/hists.c | 72 +--
+ tools/perf/ui/gtk/progress.c | 40 +-
+ tools/perf/ui/gtk/setup.c | 5 +-
+ tools/perf/ui/gtk/util.c | 97 ++--
+ tools/perf/ui/libslang.h | 2 +
+ tools/perf/ui/setup.c | 2 +-
+ tools/perf/util/Build | 1 -
+ tools/perf/util/annotate-arch/Build | 1 +
+ tools/perf/util/annotate-arch/annotate-alpha.c | 185 +++++++
+ tools/perf/util/annotate-data.c | 72 ++-
+ tools/perf/util/annotate-data.h | 8 +-
+ tools/perf/util/annotate.c | 132 ++++-
+ tools/perf/util/annotate.h | 56 +-
+ tools/perf/util/cache.h | 31 --
+ tools/perf/util/config.c | 42 +-
+ tools/perf/util/disasm.c | 15 +-
+ tools/perf/util/disasm.h | 1 +
+ tools/perf/util/dwarf-regs-arch/dwarf-regs-csky.c | 2 +-
+ .../perf/util/dwarf-regs-arch/dwarf-regs-powerpc.c | 2 +-
+ tools/perf/util/dwarf-regs-arch/dwarf-regs-s390.c | 2 +-
+ tools/perf/util/dwarf-regs-arch/dwarf-regs-x86.c | 140 ++++-
+ tools/perf/util/dwarf-regs.c | 9 +-
+ tools/perf/util/evsel.c | 128 ++++-
+ tools/perf/util/evsel.h | 7 +
+ tools/perf/util/genelf_debug.c | 28 +-
+ tools/perf/util/header.c | 131 +++--
+ tools/perf/util/help-unknown-cmd.c | 19 +-
+ tools/perf/util/hist.h | 6 -
+ tools/perf/util/include/dwarf-regs.h | 7 +-
+ tools/perf/util/jitdump.c | 204 ++++++--
+ tools/perf/util/machine.c | 1 +
+ tools/perf/util/parse-regs-options.c | 210 +++++++-
+ tools/perf/util/path.c | 10 +-
+ tools/perf/util/path.h | 6 +-
+ tools/perf/util/perf-regs-arch/perf_regs_x86.c | 436 +++++++++++++++-
+ tools/perf/util/perf_event_attr_fprintf.c | 13 +
+ tools/perf/util/perf_regs.c | 84 ++-
+ tools/perf/util/perf_regs.h | 21 +-
+ tools/perf/util/powerpc-vpadtl.c | 2 +-
+ tools/perf/util/record.h | 7 +
+ tools/perf/util/sample.h | 5 +
+ .../util/scripting-engines/trace-event-python.c | 129 ++++-
+ tools/perf/util/session.c | 112 +++-
+ tools/perf/util/strbuf.c | 14 +-
+ tools/perf/util/symbol_conf.h | 13 +-
+ tools/perf/util/synthetic-events.c | 38 ++
+ tools/perf/util/thread.c | 2 +-
+ tools/perf/util/unwind-libdw.c | 11 +-
+ tools/perf/util/usage.c | 34 --
+ tools/perf/util/util.h | 4 -
+ 103 files changed, 4196 insertions(+), 924 deletions(-)
+ delete mode 100644 tools/build/feature/test-gtk2-infobar.c
+ rename tools/build/feature/{test-gtk2.c => test-gtk4.c} (76%)
+ create mode 100755 tools/perf/python/treport.py
+ create mode 100755 tools/perf/tests/shell/annotate_weight.sh
+ create mode 100755 tools/perf/tests/shell/trace_ksym_beautifier.sh
+ create mode 100644 tools/perf/util/annotate-arch/annotate-alpha.c
+ delete mode 100644 tools/perf/util/cache.h
+ delete mode 100644 tools/perf/util/usage.c
+Merging compiler-attributes/compiler-attributes (8f0b4cce4481f Linux 6.19-rc1)
+$ git merge -m Merge branch 'compiler-attributes' of https://github.com/ojeda/linux.git compiler-attributes/compiler-attributes
+Already up to date.
+Merging dma-mapping/dma-mapping-for-next (57a57ae077f0f MAINTAINERS: Add files to the DMA MAPPING HELPERS entry)
+$ git merge -m Merge branch 'dma-mapping-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git dma-mapping/dma-mapping-for-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/nvme/host/pci.c
+Auto-merging mm/page_alloc.c
+Merge made by the 'ort' strategy.
+ Documentation/core-api/dma-api.rst | 2 +-
+ MAINTAINERS | 1 +
+ drivers/iommu/dma-iommu.c | 12 +++++++-----
+ drivers/nvme/host/pci.c | 2 +-
+ drivers/scsi/scsi_transport_sas.c | 12 ++++++------
+ include/linux/dma-map-ops.h | 4 ++--
+ include/linux/dma-mapping.h | 4 ++--
+ include/linux/gfp.h | 2 +-
+ include/linux/iommu-dma.h | 2 +-
+ kernel/dma/contiguous.c | 6 +++---
+ kernel/dma/direct.c | 8 +++++---
+ kernel/dma/mapping.c | 10 +++++-----
+ kernel/dma/ops_helpers.c | 11 +++++++----
+ mm/page_alloc.c | 2 +-
+ 14 files changed, 43 insertions(+), 35 deletions(-)
+Merging asm-generic/master (adbbd9714f805 scripts: headers_install.sh: Remove config leak ignore machinery)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic asm-generic/master
+Already up to date.
+Merging alpha/alpha-next (d58041d2c63e0 MAINTAINERS: Add Magnus Lindholm as maintainer for alpha port)
+$ git merge -m Merge branch 'alpha-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git alpha/alpha-next
+Already up to date.
+Merging arm/for-next (1a89abc009cb5 Merge branches 'fixes' and 'misc' into for-linus)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux.git arm/for-next
+Already up to date.
+Merging arm64/for-next/core (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next/core' of https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux arm64/for-next/core
+Already up to date.
+Merging arm-perf/for-next/perf (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next/perf' of https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git arm-perf/for-next/perf
+Already up to date.
+Merging arm-soc/for-next (b9bb4134a9583 soc: document merges)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git arm-soc/for-next
+Merge made by the 'ort' strategy.
+ arch/arm/arm-soc-for-next-contents.txt | 22 ++++
+ .../boot/dts/amlogic/amlogic-t7-a311d2-an400.dts | 2 +-
+ .../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 113 ++++++++++++++++++++-
+ arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 44 ++++++--
+ 4 files changed, 171 insertions(+), 10 deletions(-)
+ create mode 100644 arch/arm/arm-soc-for-next-contents.txt
+Merging amlogic/for-next (a2530c83c458a Merge branch 'v7.4/arm64-dt' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git amlogic/for-next
+Merge made by the 'ort' strategy.
+ arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 15 +++++++++------
+ .../arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 2 +-
+ arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +-
+ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +-
+ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +-
+ 5 files changed, 13 insertions(+), 10 deletions(-)
+Merging asahi-soc/asahi-soc/for-next (9c0d8280aec91 Merge branch 'apple-soc/dt-7.4' into asahi-soc/for-next)
+$ git merge -m Merge branch 'asahi-soc/for-next' of https://github.com/AsahiLinux/linux.git asahi-soc/asahi-soc/for-next
+Merge made by the 'ort' strategy.
+ Documentation/devicetree/bindings/arm/apple.yaml | 21 +
+ .../devicetree/bindings/arm/apple/apple,pmgr.yaml | 1 +
+ Documentation/devicetree/bindings/arm/cpus.yaml | 2 +
+ .../devicetree/bindings/i2c/apple,i2c.yaml | 1 +
+ .../bindings/interrupt-controller/apple,aic2.yaml | 1 +
+ .../devicetree/bindings/pinctrl/apple,pinctrl.yaml | 1 +
+ .../bindings/power/apple,pmgr-pwrstate.yaml | 1 +
+ .../devicetree/bindings/pwm/apple,s5l-fpwm.yaml | 1 +
+ arch/arm64/Kconfig.platforms | 1 +
+ arch/arm64/boot/dts/apple/Makefile | 6 +
+ arch/arm64/boot/dts/apple/t6001.dtsi | 11 +-
+ arch/arm64/boot/dts/apple/t6002.dtsi | 18 +-
+ arch/arm64/boot/dts/apple/t600x-die0.dtsi | 3 +-
+ arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t600x-nvme.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t6021.dtsi | 10 +-
+ arch/arm64/boot/dts/apple/t6022.dtsi | 18 +-
+ arch/arm64/boot/dts/apple/t602x-common.dtsi | 2 +-
+ arch/arm64/boot/dts/apple/t602x-die0.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t602x-dieX.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t602x-nvme.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t6030.dtsi | 2 +-
+ arch/arm64/boot/dts/apple/t6031-die0.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t6031-dieX.dtsi | 2 +
+ arch/arm64/boot/dts/apple/t6031.dtsi | 9 +-
+ arch/arm64/boot/dts/apple/t6032.dtsi | 18 +-
+ arch/arm64/boot/dts/apple/t8132-j604.dts | 35 +
+ arch/arm64/boot/dts/apple/t8132-j623.dts | 18 +
+ arch/arm64/boot/dts/apple/t8132-j624.dts | 18 +
+ arch/arm64/boot/dts/apple/t8132-j713.dts | 35 +
+ arch/arm64/boot/dts/apple/t8132-j715.dts | 35 +
+ arch/arm64/boot/dts/apple/t8132-j773g.dts | 25 +
+ arch/arm64/boot/dts/apple/t8132-jxxx.dtsi | 48 +
+ arch/arm64/boot/dts/apple/t8132-pmgr.dtsi | 1130 ++++++++++++++++++++
+ arch/arm64/boot/dts/apple/t8132.dtsi | 467 ++++++++
+ 35 files changed, 1902 insertions(+), 50 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j604.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j623.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j624.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j713.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j715.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-j773g.dts
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-jxxx.dtsi
+ create mode 100644 arch/arm64/boot/dts/apple/t8132-pmgr.dtsi
+ create mode 100644 arch/arm64/boot/dts/apple/t8132.dtsi
+Merging at91/at91-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'at91-next' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git at91/at91-next
+Already up to date.
+Merging bmc/for-next (cd7d1ef7d74ed Merge branches 'aspeed/drivers', 'aspeed/arm/dt', 'aspeed/fixes/drivers', 'aspeed/maintainers', 'nuvoton/arm/dt', 'nuvoton/arm/fixes' and 'nuvoton/arm64/dt' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux.git bmc/for-next
+Merge made by the 'ort' strategy.
+Merging broadcom/next (c0f2033a9ce4b Merge branch 'devicetree-arm64/next' into next)
+$ git merge -m Merge branch 'next' of https://github.com/Broadcom/stblinux.git broadcom/next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/arm/bcm/bcm2835.yaml | 6 ++
+ arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 13 +++
+ .../dts/broadcom/bcm4708-linksys-ea6300-v1.dts | 4 +
+ .../boot/dts/broadcom/bcm4708-smartrg-sr400ac.dts | 18 ++++
+ .../boot/dts/broadcom/bcm4709-linksys-ea9200.dts | 62 +++++++++++
+ .../boot/dts/broadcom/bcm4709-netgear-r8000.dts | 12 +++
+ .../boot/dts/broadcom/bcm47094-dlink-dir-890l.dts | 6 +-
+ .../dts/broadcom/bcm47094-linksys-panamera.dts | 2 +-
+ arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 20 ++++
+ arch/arm/boot/dts/broadcom/bcm53573.dtsi | 9 +-
+ arch/arm/boot/dts/broadcom/bcm7445.dtsi | 2 +-
+ arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +
+ .../boot/dts/broadcom/bcm2712-rpi-5-b-base.dtsi | 41 +++++++
+ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 77 +++++++++++++
+ arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 119 +++++++++++++++++++++
+ 15 files changed, 392 insertions(+), 4 deletions(-)
+Merging cix/for-next (a0cffbd8878c5 Merge remote-tracking branch 'cix/dt' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/cix.git cix/for-next
+Merge made by the 'ort' strategy.
+Merging davinci/davinci/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'davinci/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git davinci/davinci/for-next
+Already up to date.
+Merging drivers-memory/for-next (771c036d72eef memory: mtk-smi: Add MT8189 support)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git drivers-memory/for-next
+Merge made by the 'ort' strategy.
+ .../memory-controllers/mediatek,smi-common.yaml | 21 +-
+ .../memory-controllers/mediatek,smi-larb.yaml | 3 +
+ drivers/memory/brcmstb_dpfe.c | 41 ++-
+ drivers/memory/emif.c | 3 +
+ drivers/memory/emif.h | 4 +-
+ drivers/memory/mtk-smi.c | 45 +++
+ drivers/memory/renesas-rpc-if.c | 87 ++---
+ drivers/memory/samsung/exynos5422-dmc.c | 11 +-
+ drivers/memory/tegra/tegra264.c | 392 +++++++++++++--------
+ 9 files changed, 394 insertions(+), 213 deletions(-)
+Merging fsl/soc_fsl (31d42d67c6eb6 soc: fsl: qe: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE)
+$ git merge -m Merge branch 'soc_fsl' of https://git.kernel.org/pub/scm/linux/kernel/git/chleroy/linux.git fsl/soc_fsl
+Merge made by the 'ort' strategy.
+ drivers/bus/fsl-mc/fsl-mc-bus.c | 47 +++++++++++++++++------------
+ drivers/bus/fsl-mc/fsl-mc-msi.c | 2 +-
+ drivers/soc/fsl/qe/gpio.c | 67 ++++++++++++++++-------------------------
+ drivers/usb/host/fhci-hcd.c | 2 +-
+ include/soc/fsl/qe/qe.h | 6 ++--
+ 5 files changed, 60 insertions(+), 64 deletions(-)
+Merging imx-mxs/for-next (46d8fa682d263 Merge branches 'imx/drivers', 'imx/dt' and 'imx/dt64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux.git imx-mxs/for-next
+Merge made by the 'ort' strategy.
+ Documentation/ABI/testing/se-cdev | 45 +
+ Documentation/devicetree/bindings/arm/fsl.yaml | 31 +-
+ .../bindings/display/bridge/fsl,ldb.yaml | 23 +-
+ .../devicetree/bindings/display/fsl,lcdif.yaml | 1 +
+ .../devicetree/bindings/firmware/fsl,imx-se.yaml | 91 +
+ .../bindings/soc/imx/fsl,imx-iomuxc-gpr.yaml | 62 +
+ .../driver-api/firmware/other_interfaces.rst | 238 ++
+ arch/arm/boot/dts/nxp/imx/Makefile | 49 +
+ arch/arm/boot/dts/nxp/imx/e60k02.dtsi | 8 +-
+ arch/arm/boot/dts/nxp/imx/e70k02.dtsi | 8 +-
+ arch/arm/boot/dts/nxp/imx/imx50-kobo-aura.dts | 7 +-
+ arch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx53-qsb.dts | 2 +-
+ .../arm/boot/dts/nxp/imx/imx53-voipac-dmm-668.dtsi | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6dl-b125pv2.dts | 2 +
+ arch/arm/boot/dts/nxp/imx/imx6dl-b125v2.dts | 2 +
+ arch/arm/boot/dts/nxp/imx/imx6dl-mamoj.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6dl-plym2m.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6dl-prtvt7.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6dl-victgo.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6q-bosch-acc.dts | 4 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl-emcon.dtsi | 1 -
+ arch/arm/boot/dts/nxp/imx/imx6qdl-gw560x.dtsi | 20 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl-pico.dtsi | 4 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl-wandboard.dtsi | 4 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi | 10 +-
+ arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi | 10 +-
+ arch/arm/boot/dts/nxp/imx/imx6sl-kobo-aura2.dts | 8 +-
+ .../boot/dts/nxp/imx/imx6sl-tolino-shine2hd.dts | 8 +-
+ arch/arm/boot/dts/nxp/imx/imx6sll-evk.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx6sll.dtsi | 11 -
+ arch/arm/boot/dts/nxp/imx/imx6ul-14x14-evk.dtsi | 1 -
+ arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 52 +-
+ ...nel-cap-touch-7inch-parallel-touch-adapter.dtso | 58 +
+ ...olibri-emmc-panel-cap-touch-7inch-parallel.dtso | 43 +
+ ...olibri-emmc-panel-res-touch-7inch-parallel.dtso | 32 +
+ .../boot/dts/nxp/imx/imx7d-colibri-emmc-vga.dtso | 59 +
+ arch/arm/boot/dts/nxp/imx/imx7d-meerkat96.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/imx7d-nitrogen7.dts | 1 -
+ .../nxp/imx/imx7d-var-som-emmc-mx7customboard.dts | 23 +
+ .../imx7d-var-som-emmc-wm8731-mx7customboard.dts | 23 +
+ arch/arm/boot/dts/nxp/imx/imx7d-var-som-emmc.dtsi | 56 +
+ .../dts/nxp/imx/imx7d-var-som-mx7customboard.dtsi | 358 +++
+ .../nxp/imx/imx7d-var-som-nand-mx7customboard.dts | 23 +
+ .../imx7d-var-som-nand-wm8731-mx7customboard.dts | 23 +
+ arch/arm/boot/dts/nxp/imx/imx7d-var-som-nand.dtsi | 73 +
+ .../imx/imx7d-var-som-v2-emmc-mx7customboard.dts | 24 +
+ .../imx/imx7d-var-som-v2-nand-mx7customboard.dts | 24 +
+ arch/arm/boot/dts/nxp/imx/imx7d-var-som-v2.dtsi | 66 +
+ .../arm/boot/dts/nxp/imx/imx7d-var-som-wm8731.dtsi | 102 +
+ .../arm/boot/dts/nxp/imx/imx7d-var-som-wm8904.dtsi | 118 +
+ arch/arm/boot/dts/nxp/imx/imx7d-var-som.dtsi | 533 +++++
+ arch/arm/boot/dts/nxp/imx/imx7s-warp.dts | 2 +-
+ arch/arm/boot/dts/nxp/imx/mba6ulx.dtsi | 36 +-
+ arch/arm/boot/dts/nxp/ls/ls1021a.dtsi | 10 +-
+ arch/arm/boot/dts/nxp/vf/Makefile | 2 +
+ arch/arm/boot/dts/nxp/vf/vf-colibri-iris.dtsi | 126 +
+ arch/arm/boot/dts/nxp/vf/vf-colibri.dtsi | 56 +
+ arch/arm/boot/dts/nxp/vf/vf500-colibri-iris.dts | 14 +
+ arch/arm/boot/dts/nxp/vf/vf500.dtsi | 6 +
+ arch/arm/boot/dts/nxp/vf/vf610-colibri-iris.dts | 14 +
+ arch/arm/boot/dts/nxp/vf/vf610.dtsi | 3 +
+ arch/arm/include/asm/linkage.h | 29 +
+ arch/arm/mach-imx/hardware.h | 2 +-
+ arch/arm/mach-imx/mach-imx6q.c | 30 -
+ arch/arm/mach-imx/mxc.h | 2 +-
+ arch/arm/mach-imx/pm-imx6.c | 26 +-
+ arch/arm/mach-imx/suspend-imx6.S | 6 +-
+ arch/arm64/boot/dts/freescale/Makefile | 255 +-
+ arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +-
+ arch/arm64/boot/dts/freescale/fsl-lx216x.dtsi | 19 +-
+ .../arm64/boot/dts/freescale/imx8-apalis-eval.dtsi | 6 +-
+ .../boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 6 +-
+ .../boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 6 +-
+ .../arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi | 16 +-
+ .../dts/freescale/imx8mm-beacon-baseboard.dtsi | 2 +-
+ .../imx8mm-data-modul-edm-sbc-overlay-cm4.dtso | 56 +
+ ...odul-edm-sbc-overlay-edm-mod-imx8mm-common.dtsi | 59 +
+ ...-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtsi | 99 +
+ ...-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtso | 79 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtsi | 69 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtso | 59 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtsi | 94 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtso | 17 +
+ ...edm-sbc-overlay-edm-mod-imx8mm-lvds-common.dtsi | 118 +
+ ...l-edm-sbc-overlay-edm-mod-imx8mm-lvds-dual.dtsi | 32 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtsi | 12 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtsi | 12 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtsi | 12 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtsi | 12 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtso | 7 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtsi | 12 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtso | 7 +
+ ...c-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtsi | 12 +
+ ...c-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtso | 7 +
+ ...verlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtsi | 12 +
+ ...verlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtso | 7 +
+ ...edm-sbc-overlay-edm-mod-imx8mm-lvds-single.dtsi | 20 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds.dtsi | 22 +
+ ...odul-edm-sbc-overlay-edm-sbc-imx8mm-rev900.dtso | 18 +
+ ...imx8mm-data-modul-edm-sbc-overlay-lvds-3v3.dtsi | 19 +
+ ...imx8mm-data-modul-edm-sbc-overlay-lvds-5v0.dtsi | 19 +
+ ...mx8mm-data-modul-edm-sbc-overlay-lvds-dual.dtsi | 29 +
+ ...data-modul-edm-sbc-overlay-lvds-g070y2-l01.dtsi | 31 +
+ ...ata-modul-edm-sbc-overlay-lvds-g101ice-l01.dtsi | 31 +
+ ...ata-modul-edm-sbc-overlay-lvds-g121xce-l01.dtsi | 31 +
+ ...ata-modul-edm-sbc-overlay-lvds-g156hce-l01.dtsi | 31 +
+ ...data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi | 30 +
+ ...ta-modul-edm-sbc-overlay-lvds-mi0700a2t-30.dtsi | 31 +
+ ...modul-edm-sbc-overlay-lvds-mi1010z1t-1cp11.dtsi | 31 +
+ ...8mm-data-modul-edm-sbc-overlay-lvds-single.dtsi | 13 +
+ .../dts/freescale/imx8mm-data-modul-edm-sbc.dts | 64 +-
+ .../freescale/imx8mn-vhip4-evalboard-common.dtsi | 3 +-
+ .../dts/freescale/imx8mn-vhip4-evalboard-v1.dts | 8 +
+ .../dts/freescale/imx8mn-vhip4-evalboard-v2.dts | 28 +-
+ .../imx8mn-vhip4-overlay-eeprom-1000.dtso | 103 +
+ .../imx8mn-vhip4-overlay-eeprom-1100.dtso | 103 +
+ .../imx8mn-vhip4-overlay-eeprom-2000.dtso | 107 +
+ .../imx8mp-data-modul-edm-sbc-overlay-cm7.dtso | 57 +
+ ...-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtso | 67 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtso | 46 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtso | 17 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtso | 7 +
+ ...bc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtso | 7 +
+ ...sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtso | 11 +
+ ...c-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtso | 7 +
+ ...verlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtso | 7 +
+ ...-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds.dtsi | 35 +
+ ...sbc-overlay-edm-sbc-imx8mp-lvds-g070y2-l01.dtso | 24 +
+ ...bc-overlay-edm-sbc-imx8mp-lvds-g101ice-l01.dtso | 24 +
+ ...bc-overlay-edm-sbc-imx8mp-lvds-g121xce-l01.dtso | 24 +
+ ...bc-overlay-edm-sbc-imx8mp-lvds-g156hce-l01.dtso | 32 +
+ ...sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso | 36 +
+ ...c-overlay-edm-sbc-imx8mp-lvds-mi0700a2t-30.dtso | 24 +
+ ...verlay-edm-sbc-imx8mp-lvds-mi1010z1t-1cp11.dtso | 24 +
+ ...edm-sbc-overlay-edm-sbc-imx8mp-lvds-rev900.dtso | 41 +
+ ...edm-sbc-overlay-edm-sbc-imx8mp-lvds-rev902.dtso | 14 +
+ ...-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi | 79 +
+ ...odul-edm-sbc-overlay-edm-sbc-imx8mp-rev900.dtso | 97 +
+ ...odul-edm-sbc-overlay-edm-sbc-imx8mp-rev902.dtso | 69 +
+ .../dts/freescale/imx8mp-data-modul-edm-sbc.dts | 176 +-
+ .../dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts | 2 +-
+ .../boot/dts/freescale/imx8mp-icore-mx8mp.dtsi | 2 +-
+ .../imx8mp-phyboard-pollux-peb-av-10.dtsi | 5 +-
+ .../imx8mp-phyboard-pollux-peb-wlbt-07.dtso | 76 +
+ ...8mp-tqma8mpqs-mb-smarc-2-lvds0-tm070jvhg33.dtso | 2 +-
+ ...8mp-tqma8mpqs-mb-smarc-2-lvds1-tm070jvhg33.dtso | 2 +-
+ .../boot/dts/freescale/imx8mp-var-dart-sonata.dts | 1 +
+ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +-
+ arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 6 +
+ .../boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 +-
+ arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 +-
+ arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 2 +-
+ .../arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 16 +-
+ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 168 +-
+ arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi | 38 +
+ .../boot/dts/freescale/imx8qm-var-som-symphony.dts | 2 +-
+ arch/arm64/boot/dts/freescale/imx8qm-var-som.dtsi | 6 +-
+ arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 3 +-
+ .../arm64/boot/dts/freescale/imx8ulp-firmware.dtsi | 31 +
+ arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 12 +-
+ arch/arm64/boot/dts/freescale/imx9-mqs.dtso | 57 +
+ arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts | 54 +-
+ .../boot/dts/freescale/imx91-11x11-frdm-s.dts | 2 -
+ arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts | 2 -
+ .../freescale/imx91-9x9-qsb-tianma-tm050rdh03.dtso | 104 +
+ arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts | 51 +
+ arch/arm64/boot/dts/freescale/imx91.dtsi | 11 +
+ arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 6 +
+ arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 54 +-
+ .../dts/freescale/imx93-11x11-frdm-common.dtsi | 681 ++++++
+ arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts | 682 +-----
+ arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 55 +-
+ arch/arm64/boot/dts/freescale/imx93w-frdm.dts | 23 +
+ arch/arm64/boot/dts/freescale/imx94.dtsi | 5 +-
+ .../boot/dts/freescale/imx943-evk-sdwifi.dtso | 25 +
+ arch/arm64/boot/dts/freescale/imx943-evk.dts | 138 +-
+ arch/arm64/boot/dts/freescale/imx943.dtsi | 2 +-
+ arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts | 48 +-
+ arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts | 26 +-
+ arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 55 +-
+ .../boot/dts/freescale/imx95-19x19-frdm-pro.dts | 2 -
+ .../boot/dts/freescale/imx95-aquila-clover.dts | 18 +
+ arch/arm64/boot/dts/freescale/imx95-aquila-dev.dts | 18 +
+ arch/arm64/boot/dts/freescale/imx95-aquila.dtsi | 7 +
+ .../boot/dts/freescale/imx95-toradex-smarc-dev.dts | 8 +
+ .../boot/dts/freescale/imx95-toradex-smarc.dtsi | 7 +
+ arch/arm64/boot/dts/freescale/imx95.dtsi | 15 +-
+ arch/arm64/boot/dts/freescale/imx952-evk.dts | 77 +-
+ arch/arm64/boot/dts/freescale/imx952-frdm.dts | 9 +
+ arch/arm64/boot/dts/freescale/imx952-frdm.dtsi | 726 ++++++
+ arch/arm64/boot/dts/freescale/imx952.dtsi | 16 +-
+ arch/arm64/boot/dts/freescale/s32g2.dtsi | 2 +-
+ arch/arm64/boot/dts/freescale/s32g3.dtsi | 2 +-
+ drivers/firmware/imx/Kconfig | 12 +
+ drivers/firmware/imx/Makefile | 2 +
+ drivers/firmware/imx/ele_base_msg.c | 395 ++++
+ drivers/firmware/imx/ele_base_msg.h | 119 +
+ drivers/firmware/imx/ele_common.c | 1012 ++++++++
+ drivers/firmware/imx/ele_common.h | 147 ++
+ drivers/firmware/imx/ele_fw_api.c | 404 ++++
+ drivers/firmware/imx/ele_fw_api.h | 104 +
+ drivers/firmware/imx/ele_msg_addr_field.c | 619 +++++
+ drivers/firmware/imx/imx-dsp.c | 6 +-
+ drivers/firmware/imx/se_ctrl.c | 2434 ++++++++++++++++++++
+ drivers/firmware/imx/se_ctrl.h | 309 +++
+ include/linux/firmware/imx/se_api.h | 14 +
+ include/linux/micrel_phy.h | 5 -
+ include/soc/imx/cpu.h | 2 +-
+ include/uapi/linux/se_ioctl.h | 97 +
+ 217 files changed, 13500 insertions(+), 1116 deletions(-)
+ create mode 100644 Documentation/ABI/testing/se-cdev
+ create mode 100644 Documentation/devicetree/bindings/firmware/fsl,imx-se.yaml
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-colibri-emmc-panel-cap-touch-7inch-parallel-touch-adapter.dtso
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-colibri-emmc-panel-cap-touch-7inch-parallel.dtso
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-colibri-emmc-panel-res-touch-7inch-parallel.dtso
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-colibri-emmc-vga.dtso
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-emmc-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-emmc-wm8731-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-emmc.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-mx7customboard.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-nand-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-nand-wm8731-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-nand.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-v2-emmc-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-v2-nand-mx7customboard.dts
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-v2.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-wm8731.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som-wm8904.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/imx/imx7d-var-som.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/vf/vf-colibri-iris.dtsi
+ create mode 100644 arch/arm/boot/dts/nxp/vf/vf500-colibri-iris.dts
+ create mode 100644 arch/arm/boot/dts/nxp/vf/vf610-colibri-iris.dts
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-cm4.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-common.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-common.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-dual.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-single.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-edm-sbc-imx8mm-rev900.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-3v3.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-5v0.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-dual.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g070y2-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g101ice-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g121xce-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g156hce-l01.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-mi0700a2t-30.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-mi1010z1t-1cp11.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-single.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-vhip4-overlay-eeprom-1000.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-vhip4-overlay-eeprom-1100.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-vhip4-overlay-eeprom-2000.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-cm7.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1-audio.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-fio1.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-hdmi.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g070y2-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g101ice-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g121xce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g156hce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-g215hvn011.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi0700a2t-30.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds-mi1010z1t-1cp11.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-mod-imx8mm-lvds.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g070y2-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g101ice-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g121xce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g156hce-l01.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-mi0700a2t-30.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-mi1010z1t-1cp11.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-rev900.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-rev902.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-rev900.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-rev902.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-peb-wlbt-07.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx8ulp-firmware.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx9-mqs.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx91-9x9-qsb-tianma-tm050rdh03.dtso
+ create mode 100644 arch/arm64/boot/dts/freescale/imx93-11x11-frdm-common.dtsi
+ create mode 100644 arch/arm64/boot/dts/freescale/imx93w-frdm.dts
+ create mode 100644 arch/arm64/boot/dts/freescale/imx952-frdm.dts
+ create mode 100644 arch/arm64/boot/dts/freescale/imx952-frdm.dtsi
+ create mode 100644 drivers/firmware/imx/ele_base_msg.c
+ create mode 100644 drivers/firmware/imx/ele_base_msg.h
+ create mode 100644 drivers/firmware/imx/ele_common.c
+ create mode 100644 drivers/firmware/imx/ele_common.h
+ create mode 100644 drivers/firmware/imx/ele_fw_api.c
+ create mode 100644 drivers/firmware/imx/ele_fw_api.h
+ create mode 100644 drivers/firmware/imx/ele_msg_addr_field.c
+ create mode 100644 drivers/firmware/imx/se_ctrl.c
+ create mode 100644 drivers/firmware/imx/se_ctrl.h
+ create mode 100644 include/linux/firmware/imx/se_api.h
+ create mode 100644 include/uapi/linux/se_ioctl.h
+Merging mediatek/for-next (cebd824d439e8 Merge branch 'v7.3-next/dts64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git mediatek/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/arm/mediatek.yaml | 1 +
+ arch/arm/boot/dts/mediatek/Makefile | 1 +
+ arch/arm/boot/dts/mediatek/mt8127-amazon-ford.dts | 54 ++++++++++++++++++++++
+ arch/arm/boot/dts/mediatek/mt8127.dtsi | 7 +++
+ arch/arm64/boot/dts/mediatek/mt6878-pinfunc.h | 2 +-
+ arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h | 2 +-
+ .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 13 ++++++
+ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 1 +
+ .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 13 ++++++
+ arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 5 ++
+ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 +-
+ arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 ++
+ arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi | 5 ++
+ arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi | 7 ++-
+ arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 5 ++
+ arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 5 ++
+ drivers/soc/mediatek/mtk-regulator-coupler.c | 1 +
+ 17 files changed, 125 insertions(+), 4 deletions(-)
+ create mode 100644 arch/arm/boot/dts/mediatek/mt8127-amazon-ford.dts
+$ git am -3 ../patches/0001-mediatek-Take-the-other-branch.patch
+Applying: mediatek: Take the other branch
+$ git reset HEAD^
+Unstaged changes after reset:
+M drivers/soc/mediatek/mt8167-mmsys.h
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 085703b8dbe6f] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git
+ Date: Wed Sep 16 13:06:27 2026 +0100
+Merging mvebu/for-next (1dd243147c2fa ARM: dts: marvell: Replace spaces indentation with tabs)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git mvebu/for-next
+Merge made by the 'ort' strategy.
+ .../boot/dts/marvell/armada-385-clearfog-gtr.dtsi | 2 +-
+ arch/arm/boot/dts/marvell/armada-388-helios4.dts | 23 +++++++++-------------
+ arch/arm/boot/dts/marvell/armada-38x.dtsi | 1 +
+ arch/arm/boot/dts/marvell/armada-395-gp.dts | 1 -
+ arch/arm/boot/dts/marvell/armada-39x.dtsi | 1 +
+ arch/arm/boot/dts/marvell/dove.dtsi | 22 ++++++++++-----------
+ arch/arm/boot/dts/marvell/kirkwood-6282.dtsi | 15 +++++++-------
+ .../dts/marvell/kirkwood-guruplug-server-plus.dts | 4 ++--
+ arch/arm/boot/dts/marvell/kirkwood-lsxl.dtsi | 4 ++--
+ arch/arm/boot/dts/marvell/kirkwood-synology.dtsi | 12 +++++------
+ .../arm/boot/dts/marvell/orion5x-rd88f5182-nas.dts | 2 +-
+ 11 files changed, 41 insertions(+), 46 deletions(-)
+Merging omap/for-next (e1743a4a9b0b1 Merge branch 'omap-for-v7.4/soc' into tmp/omap-next-20260831.110627)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git omap/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/input/omap-keypad.txt | 28 ----------
+ .../devicetree/bindings/input/ti,omap4-keypad.yaml | 63 +++++++++++++++++++++
+ .../boot/dts/ti/omap/am335x-boneblack-hdmi.dtsi | 2 +-
+ arch/arm/boot/dts/ti/omap/am335x-shc.dts | 4 --
+ arch/arm/boot/dts/ti/omap/am437x-l4.dtsi | 2 +-
+ arch/arm/boot/dts/ti/omap/am57-pruss.dtsi | 11 ++++
+ arch/arm/boot/dts/ti/omap/am571x-idk.dts | 65 +++++++++++++++++++++-
+ arch/arm/boot/dts/ti/omap/am5729-beagleboneai.dts | 2 +-
+ .../boot/dts/ti/omap/am57xx-beagle-x15-common.dtsi | 2 +-
+ arch/arm/boot/dts/ti/omap/am57xx-idk-common.dtsi | 3 +-
+ arch/arm/boot/dts/ti/omap/dra7-l4.dtsi | 2 +-
+ .../boot/dts/ti/omap/motorola-mapphone-common.dtsi | 8 +--
+ .../dts/ti/omap/motorola-mapphone-mz607-mz617.dtsi | 2 +
+ arch/arm/boot/dts/ti/omap/omap3-igep.dtsi | 2 +-
+ arch/arm/boot/dts/ti/omap/omap3-n9.dts | 5 +-
+ arch/arm/boot/dts/ti/omap/omap3-n900.dts | 3 +-
+ arch/arm/boot/dts/ti/omap/omap3-n950.dts | 5 +-
+ arch/arm/boot/dts/ti/omap/omap3-tao3530.dtsi | 8 +--
+ .../boot/dts/ti/omap/omap4-droid-bionic-xt875.dts | 2 +
+ arch/arm/boot/dts/ti/omap/omap4-droid4-xt894.dts | 2 +
+ arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 2 +
+ arch/arm/boot/dts/ti/omap/omap4-l4.dtsi | 1 +
+ .../dts/ti/omap/omap4-samsung-espresso-common.dtsi | 6 +-
+ arch/arm/boot/dts/ti/omap/omap4-sdp.dts | 2 +
+ arch/arm/boot/dts/ti/omap/omap4.dtsi | 6 +-
+ arch/arm/boot/dts/ti/omap/omap5-l4.dtsi | 1 +
+ arch/arm/boot/dts/ti/omap/omap5.dtsi | 2 +-
+ arch/arm/configs/omap2plus_defconfig | 3 +
+ arch/arm/mach-omap2/control.h | 8 +--
+ arch/arm/mach-omap2/soc.h | 4 +-
+ arch/arm/mach-omap2/sram.h | 4 +-
+ 31 files changed, 193 insertions(+), 67 deletions(-)
+ delete mode 100644 Documentation/devicetree/bindings/input/omap-keypad.txt
+ create mode 100644 Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
+Merging qcom/for-next (27b3028b7d65c Merge branches 'arm64-defconfig-for-7.4', 'arm64-fixes-for-7.3', 'arm64-for-7.4', 'clk-fixes-for-7.3', 'clk-for-7.4', 'drivers-fixes-for-7.3' and 'drivers-for-7.4' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git qcom/for-next
+Auto-merging Documentation/devicetree/bindings/arm/cpus.yaml
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
+ .../bindings/arm/qcom,coresight-ctcu.yaml | 1 +
+ .../devicetree/bindings/arm/qcom-soc.yaml | 4 +-
+ Documentation/devicetree/bindings/arm/qcom.yaml | 8 +
+ .../devicetree/bindings/clock/qcom,hawi-gpucc.yaml | 80 +
+ .../bindings/clock/qcom,kaanapali-gxclkctl.yaml | 23 +-
+ .../devicetree/bindings/clock/qcom,kuno-gcc.yaml | 52 +
+ .../bindings/clock/qcom,milos-camcc.yaml | 39 +-
+ .../bindings/clock/qcom,milos-videocc.yaml | 29 +-
+ .../devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
+ .../devicetree/bindings/clock/qcom,sm6375-gcc.yaml | 9 +-
+ .../devicetree/bindings/clock/qcom,sm7150-gcc.yaml | 53 -
+ .../bindings/clock/qcom,sm8450-camcc.yaml | 2 +
+ .../bindings/clock/qcom,sm8450-gpucc.yaml | 3 +
+ .../bindings/clock/qcom,sm8450-videocc.yaml | 2 +
+ .../bindings/clock/qcom,sm8550-tcsr.yaml | 1 -
+ .../bindings/clock/qcom,x1e80100-tcsr.yaml | 114 +
+ .../devicetree/bindings/firmware/qcom,scm.yaml | 1 +
+ .../bindings/interconnect/qcom,msm8998-bwmon.yaml | 1 +
+ .../bindings/net/wireless/qcom,ath11k.yaml | 16 +-
+ MAINTAINERS | 2 +
+ arch/arm64/boot/dts/qcom/Makefile | 24 +
+ arch/arm64/boot/dts/qcom/agatti.dtsi | 76 +-
+ arch/arm64/boot/dts/qcom/eliza-cqs-som.dtsi | 15 +
+ arch/arm64/boot/dts/qcom/eliza-evk.dtsi | 243 ++
+ arch/arm64/boot/dts/qcom/eliza-mtp.dts | 34 +
+ arch/arm64/boot/dts/qcom/eliza.dtsi | 774 +++++-
+ .../dts/qcom/glymur-asus-zenbook-a16-ux3607oa.dts | 2 +-
+ arch/arm64/boot/dts/qcom/glymur-crd.dts | 8 +
+ arch/arm64/boot/dts/qcom/glymur-crd.dtsi | 3 +-
+ .../boot/dts/qcom/glymur-hp-elitebook-x-g2q.dts | 940 +++++++
+ .../boot/dts/qcom/glymur-lenovo-yoga-slim7x.dts | 1208 ++++++++
+ arch/arm64/boot/dts/qcom/glymur.dtsi | 386 ++-
+ arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 134 +-
+ arch/arm64/boot/dts/qcom/hamoa-iot-som.dtsi | 21 +
+ .../qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts | 21 +
+ arch/arm64/boot/dts/qcom/hamoa.dtsi | 22 +-
+ arch/arm64/boot/dts/qcom/kodiak.dtsi | 1413 +++++-----
+ .../boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso | 12 +-
+ arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 116 +
+ arch/arm64/boot/dts/qcom/mahua-crd.dts | 5 +
+ arch/arm64/boot/dts/qcom/mahua.dtsi | 89 +
+ arch/arm64/boot/dts/qcom/milos.dtsi | 12 +-
+ arch/arm64/boot/dts/qcom/monaco-ac-evk.dts | 938 +++++++
+ .../boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso | 12 +-
+ arch/arm64/boot/dts/qcom/monaco-pmics.dtsi | 62 +
+ arch/arm64/boot/dts/qcom/monaco.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 35 +
+ arch/arm64/boot/dts/qcom/purwa-iot-evk.dts | 133 +-
+ arch/arm64/boot/dts/qcom/purwa-iot-som.dtsi | 21 +
+ .../qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso | 24 +-
+ .../dts/qcom/qcs6490-rb3gen2-vision-mezzanine.dtso | 13 +-
+ arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 12 +-
+ .../dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 12 +-
+ .../qcs6490-thundercomm-rubikpi3-cam1-imx219.dtso | 115 +
+ .../qcs6490-thundercomm-rubikpi3-cam2-imx219.dtso | 115 +
+ .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 23 +
+ arch/arm64/boot/dts/qcom/qcs8550-rb5gen2.dts | 12 +-
+ arch/arm64/boot/dts/qcom/sar2130p.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 3 +
+ .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 3 +
+ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 37 +
+ .../boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 3 +
+ .../boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 3 +
+ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 554 +++-
+ arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi | 42 +
+ arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 36 +-
+ .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 -
+ .../boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 2 +
+ arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 -
+ arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/shikra-evk.dtsi | 18 +
+ arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/shikra.dtsi | 1490 +++++++++-
+ arch/arm64/boot/dts/qcom/sm4450.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 +
+ .../boot/dts/qcom/sm7325-nothing-spacewar.dts | 2 +
+ arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 -
+ .../boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts | 232 +-
+ arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 -
+ arch/arm64/boot/dts/qcom/sm8750.dtsi | 70 +-
+ .../boot/dts/qcom/talos-evk-rpi-display-2-5in.dtso | 88 +
+ arch/arm64/boot/dts/qcom/talos.dtsi | 1 -
+ arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1-crd.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi | 93 +-
+ arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 21 +
+ .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 21 +
+ .../boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 21 +
+ .../dts/qcom/x1e80100-honor-magicbook-art-14.dts | 21 +
+ .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 21 +
+ .../dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts | 25 +-
+ .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 21 +
+ arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 21 +
+ .../boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 21 +
+ .../boot/dts/qcom/x1p42100-microsoft-sp12in.dts | 21 +
+ arch/arm64/configs/defconfig | 4 +
+ drivers/clk/qcom/Kconfig | 144 +-
+ drivers/clk/qcom/Makefile | 7 +
+ drivers/clk/qcom/cambistmclkcc-eliza.c | 464 +++
+ drivers/clk/qcom/camcc-eliza.c | 2803 +++++++++++++++++++
+ drivers/clk/qcom/camcc-nord.c | 2941 ++++++++++++++++++++
+ drivers/clk/qcom/clk-alpha-pll.c | 9 +
+ drivers/clk/qcom/clk-rpmh.c | 15 +
+ drivers/clk/qcom/dispcc-sm8450.c | 40 +-
+ drivers/clk/qcom/gcc-eliza.c | 6 +-
+ drivers/clk/qcom/gcc-hawi.c | 6 +-
+ drivers/clk/qcom/gcc-kaanapali.c | 6 +-
+ drivers/clk/qcom/gcc-kuno.c | 1483 ++++++++++
+ drivers/clk/qcom/gcc-msm8939.c | 4 +
+ drivers/clk/qcom/gcc-qcs8300.c | 103 +
+ drivers/clk/qcom/gpucc-eliza.c | 606 ++++
+ drivers/clk/qcom/gpucc-glymur.c | 2 +-
+ drivers/clk/qcom/gpucc-hawi.c | 477 ++++
+ drivers/clk/qcom/gpucc-kaanapali.c | 2 +-
+ drivers/clk/qcom/nwgcc-nord.c | 3 +
+ drivers/clk/qcom/tcsrcc-x1e80100.c | 337 +--
+ drivers/clk/qcom/videocc-eliza.c | 404 +++
+ drivers/clk/qcom/videocc-glymur.c | 38 +
+ drivers/firmware/qcom/Kconfig | 4 +-
+ drivers/firmware/qcom/qcom_scm.c | 167 +-
+ drivers/soc/qcom/Kconfig | 1 -
+ drivers/soc/qcom/apr.c | 75 +-
+ drivers/soc/qcom/llcc-qcom.c | 60 +-
+ drivers/soc/qcom/pmic_glink_altmode.c | 4 +-
+ drivers/soc/qcom/qcom-geni-se.c | 49 +-
+ drivers/soc/qcom/qcom_aoss.c | 4 +-
+ drivers/soc/qcom/rpmh-internal.h | 16 +-
+ drivers/soc/qcom/rpmh-rsc.c | 4 +-
+ drivers/soc/qcom/rpmh.c | 40 +-
+ drivers/soc/qcom/smem_dramc.c | 81 +-
+ drivers/soc/qcom/smp2p.c | 12 +-
+ drivers/soc/qcom/smsm.c | 20 +-
+ drivers/soc/qcom/socinfo.c | 1 +
+ drivers/soc/qcom/ubwc_config.c | 10 +
+ include/dt-bindings/arm/qcom,ids.h | 1 +
+ .../dt-bindings/clock/qcom,eliza-cambistmclkcc.h | 32 +
+ include/dt-bindings/clock/qcom,eliza-camcc.h | 151 +
+ include/dt-bindings/clock/qcom,eliza-gpucc.h | 51 +
+ include/dt-bindings/clock/qcom,eliza-videocc.h | 37 +
+ include/dt-bindings/clock/qcom,hawi-gpucc.h | 47 +
+ include/dt-bindings/clock/qcom,kuno-gcc.h | 100 +
+ include/dt-bindings/clock/qcom,nord-camcc.h | 167 ++
+ include/dt-bindings/clock/qcom,nord-nwgcc.h | 3 +
+ include/dt-bindings/clock/qcom,qcs8300-gcc.h | 6 +
+ include/linux/device-id/apr.h | 21 -
+ include/linux/firmware/qcom/qcom_scm.h | 29 -
+ include/linux/mod_devicetable.h | 1 -
+ include/linux/soc/qcom/apr.h | 4 +-
+ include/linux/soc/qcom/llcc-qcom.h | 4 +
+ include/linux/soc/qcom/ubwc.h | 3 +
+ 157 files changed, 19918 insertions(+), 1733 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/clock/qcom,hawi-gpucc.yaml
+ create mode 100644 Documentation/devicetree/bindings/clock/qcom,kuno-gcc.yaml
+ delete mode 100644 Documentation/devicetree/bindings/clock/qcom,sm7150-gcc.yaml
+ create mode 100644 Documentation/devicetree/bindings/clock/qcom,x1e80100-tcsr.yaml
+ create mode 100644 arch/arm64/boot/dts/qcom/glymur-hp-elitebook-x-g2q.dts
+ create mode 100644 arch/arm64/boot/dts/qcom/glymur-lenovo-yoga-slim7x.dts
+ create mode 100644 arch/arm64/boot/dts/qcom/monaco-ac-evk.dts
+ create mode 100644 arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3-cam1-imx219.dtso
+ create mode 100644 arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3-cam2-imx219.dtso
+ create mode 100644 arch/arm64/boot/dts/qcom/talos-evk-rpi-display-2-5in.dtso
+ create mode 100644 drivers/clk/qcom/cambistmclkcc-eliza.c
+ create mode 100644 drivers/clk/qcom/camcc-eliza.c
+ create mode 100644 drivers/clk/qcom/camcc-nord.c
+ create mode 100644 drivers/clk/qcom/gcc-kuno.c
+ create mode 100644 drivers/clk/qcom/gpucc-eliza.c
+ create mode 100644 drivers/clk/qcom/gpucc-hawi.c
+ create mode 100644 drivers/clk/qcom/videocc-eliza.c
+ create mode 100644 include/dt-bindings/clock/qcom,eliza-cambistmclkcc.h
+ create mode 100644 include/dt-bindings/clock/qcom,eliza-camcc.h
+ create mode 100644 include/dt-bindings/clock/qcom,eliza-gpucc.h
+ create mode 100644 include/dt-bindings/clock/qcom,eliza-videocc.h
+ create mode 100644 include/dt-bindings/clock/qcom,hawi-gpucc.h
+ create mode 100644 include/dt-bindings/clock/qcom,kuno-gcc.h
+ create mode 100644 include/dt-bindings/clock/qcom,nord-camcc.h
+ delete mode 100644 include/linux/device-id/apr.h
+Merging realtek/for-next (3c778f0c9fa36 arm64: dts: realtek: Add GPIO support for RTD1625)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/yu_chun/linux.git realtek/for-next
+Already up to date.
+Merging renesas/next (f94066544077e Merge branch 'renesas-dts-for-v7.4' into renesas-next)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git renesas/next
+Merge made by the 'ort' strategy.
+ arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts | 2 +
+ .../boot/dts/renesas/r8a7740-armadillo800eva.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7743-sk-rzg1m.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7743.dtsi | 6 +-
+ arch/arm/boot/dts/renesas/r8a7744.dtsi | 6 +-
+ arch/arm/boot/dts/renesas/r8a7745-sk-rzg1e.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7745.dtsi | 6 +-
+ arch/arm/boot/dts/renesas/r8a77470.dtsi | 6 +-
+ arch/arm/boot/dts/renesas/r8a7790-lager.dts | 28 +-
+ arch/arm/boot/dts/renesas/r8a7790-stout.dts | 4 +-
+ arch/arm/boot/dts/renesas/r8a7790.dtsi | 4 +-
+ arch/arm/boot/dts/renesas/r8a7791-koelsch.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7791-porter.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7791.dtsi | 4 +-
+ arch/arm/boot/dts/renesas/r8a7792.dtsi | 4 +-
+ arch/arm/boot/dts/renesas/r8a7793-gose.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7793.dtsi | 4 +-
+ arch/arm/boot/dts/renesas/r8a7794-alt.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7794-silk.dts | 2 +
+ arch/arm/boot/dts/renesas/r8a7794.dtsi | 4 +-
+ .../arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts | 1 -
+ .../arm/boot/dts/renesas/r9a06g032-rzn1d400-eb.dts | 14 +-
+ arch/arm/boot/dts/renesas/r9a06g032.dtsi | 2 -
+ arch/arm/configs/shmobile_defconfig | 3 +-
+ arch/arm64/boot/dts/renesas/Makefile | 9 +
+ .../dts/renesas/aistarvision-mipi-adapter-2.1.dtsi | 2 +-
+ .../boot/dts/renesas/beacon-renesom-baseboard.dtsi | 6 +-
+ .../arm64/boot/dts/renesas/beacon-renesom-som.dtsi | 12 +-
+ arch/arm64/boot/dts/renesas/cat875.dtsi | 2 +
+ arch/arm64/boot/dts/renesas/condor-common.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/draak.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/ebisu.dtsi | 6 +-
+ arch/arm64/boot/dts/renesas/gray-hawk-single.dtsi | 8 +-
+ arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 +-
+ arch/arm64/boot/dts/renesas/hihope-rev2.dtsi | 8 +-
+ arch/arm64/boot/dts/renesas/hihope-rev4.dtsi | 4 +-
+ arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 6 +-
+ arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 12 +-
+ arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 4 +-
+ arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 12 +-
+ arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/r8a77951.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/r8a77960.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/r8a77961.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/r8a77965.dtsi | 12 +-
+ .../renesas/r8a77970-eagle-function-expansion.dtso | 2 +-
+ arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 2 +-
+ arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts | 2 +-
+ arch/arm64/boot/dts/renesas/r8a77970.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts | 2 +-
+ arch/arm64/boot/dts/renesas/r8a77980.dtsi | 4 +-
+ arch/arm64/boot/dts/renesas/r8a77990.dtsi | 10 +-
+ arch/arm64/boot/dts/renesas/r8a77995.dtsi | 6 +-
+ .../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/r8a779a0-falcon.dts | 4 +-
+ arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 2 +-
+ .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 36 ++-
+ arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 2 +-
+ .../arm64/boot/dts/renesas/r8a779g0-white-hawk.dts | 94 +++++++
+ arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 69 ++++-
+ .../renesas/r8a779g3-sparrow-hawk-fan-argon40.dtso | 1 -
+ .../r8a779g3-sparrow-hawk-ws-2ch-canfd.dtso | 135 ++++++++++
+ .../boot/dts/renesas/r8a779g3-sparrow-hawk.dts | 19 +-
+ arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 26 +-
+ arch/arm64/boot/dts/renesas/r8a779md-geist.dts | 12 +-
+ arch/arm64/boot/dts/renesas/r8a78000.dtsi | 300 +++++++++++++++++++--
+ .../arm64/boot/dts/renesas/r9a07g044l2-remi-pi.dts | 2 +-
+ arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 5 +-
+ arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 265 ++++++++++++++++++
+ arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 4 +-
+ arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts | 27 +-
+ arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 2 +-
+ .../boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts | 6 +-
+ arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 65 ++++-
+ .../dts/renesas/r9a09g077m44-evk-cn15-lcdc.dtso | 53 ++++
+ .../boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts | 18 +-
+ arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 65 ++++-
+ .../dts/renesas/r9a09g087m44-evk-cn20-lcdc.dtso | 63 +++++
+ .../boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts | 32 ++-
+ arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi | 13 +-
+ .../boot/dts/renesas/rzg2l-smarc-pinfunction.dtsi | 16 +-
+ arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi | 20 +-
+ arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi | 2 +-
+ .../boot/dts/renesas/rzg2lc-smarc-pinfunction.dtsi | 16 +-
+ arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi | 20 +-
+ arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi | 2 +-
+ .../boot/dts/renesas/rzg2ul-smarc-pinfunction.dtsi | 16 +-
+ arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 20 +-
+ arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi | 14 +
+ arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 25 +-
+ arch/arm64/boot/dts/renesas/rzg3s-smarc-switches.h | 4 +
+ arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 1 -
+ .../boot/dts/renesas/rzt2h-n2h-evk-common.dtsi | 7 +
+ .../boot/dts/renesas/rzt2h-n2h-evk-du-adv7513.dtsi | 72 +++++
+ arch/arm64/boot/dts/renesas/salvator-common.dtsi | 14 +-
+ arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 2 +-
+ .../ulcb-kf-audio-graph-card2-mix+split.dtsi | 18 +-
+ arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/ulcb.dtsi | 8 +-
+ .../boot/dts/renesas/white-hawk-cpu-common.dtsi | 6 +-
+ drivers/soc/renesas/Kconfig | 19 +-
+ drivers/soc/renesas/r9a08g046-sysc.c | 1 +
+ drivers/soc/renesas/rcar-mfis.c | 62 ++++-
+ drivers/soc/renesas/rcar-rst.c | 1 +
+ drivers/soc/renesas/renesas-soc.c | 3 +
+ drivers/soc/renesas/rz-sysc.c | 5 +
+ drivers/soc/renesas/rz-sysc.h | 2 +
+ 111 files changed, 1663 insertions(+), 368 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-ws-2ch-canfd.dtso
+ create mode 100644 arch/arm64/boot/dts/renesas/r9a09g077m44-evk-cn15-lcdc.dtso
+ create mode 100644 arch/arm64/boot/dts/renesas/r9a09g087m44-evk-cn20-lcdc.dtso
+ create mode 100644 arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-du-adv7513.dtsi
+Merging reset/reset/next (d373605cd5148 Merge tag 'reset-fixes-for-v7.0-2' into reset/next)
+$ git merge -m Merge branch 'reset/next' of https://git.kernel.org/pub/scm/linux/kernel/git/pza/linux reset/reset/next
+Already up to date.
+Merging rockchip/for-next (32e0f64640d55 Merge branch 'v7.4-armsoc/dts64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git rockchip/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/arm/rockchip.yaml | 7 +
+ arch/arm/boot/dts/rockchip/rk3229-xms6.dts | 4 +-
+ arch/arm64/boot/dts/rockchip/Makefile | 6 +
+ .../boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 2 +
+ .../boot/dts/rockchip/rk3576-armsom-cm5-io.dts | 4 +-
+ arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
+ arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 39 +
+ .../rockchip/rk3588-jaguar-can1-can2-uart4.dtso | 26 +
+ arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 16 +
+ .../boot/dts/rockchip/rk3588-lubancat-5-btb.dtsi | 534 ++++++++++
+ .../boot/dts/rockchip/rk3588-lubancat-5io.dts | 1032 ++++++++++++++++++++
+ .../boot/dts/rockchip/rk3588-nanopc-t6-lts.dts | 17 -
+ arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 175 ++--
+ .../boot/dts/rockchip/rk3588-tiger-haikou.dts | 4 +
+ arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 5 +
+ .../boot/dts/rockchip/rk3588s-gameforce-ace.dts | 7 +-
+ 16 files changed, 1755 insertions(+), 125 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-jaguar-can1-can2-uart4.dtso
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-lubancat-5-btb.dtsi
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
+Merging samsung-krzk/for-next (de3710de161c0 Merge branch 'next/dt64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git samsung-krzk/for-next
+Merge made by the 'ort' strategy.
+ .../bindings/clock/samsung,exynos5515-cmu.yaml | 145 ++
+ .../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 1 +
+ .../bindings/hwinfo/samsung,exynos-chipid.yaml | 1 +
+ .../bindings/input/samsung,s3c6410-keypad.yaml | 53 +-
+ arch/arm/boot/dts/samsung/exynos4210-i9100.dts | 5 +-
+ arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 5 +-
+ arch/arm/mach-exynos/smc.h | 4 +-
+ arch/arm/mach-s3c/Kconfig | 5 -
+ arch/arm/mach-s3c/Kconfig.s3c64xx | 7 -
+ arch/arm/mach-s3c/Makefile.s3c64xx | 1 -
+ arch/arm/mach-s3c/devs.c | 27 -
+ arch/arm/mach-s3c/devs.h | 1 -
+ arch/arm/mach-s3c/gpio-core.h | 3 +
+ arch/arm/mach-s3c/gpio-samsung-s3c64xx.h | 5 +
+ arch/arm/mach-s3c/gpio-samsung.c | 72 +-
+ arch/arm/mach-s3c/keypad.h | 27 -
+ arch/arm/mach-s3c/mach-crag6410.c | 135 +-
+ arch/arm/mach-s3c/setup-keypad-s3c64xx.c | 20 -
+ arch/arm64/boot/dts/exynos/exynos850.dtsi | 22 +
+ arch/arm64/boot/dts/tesla/fsd-evb.dts | 10 +-
+ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 16 +-
+ arch/arm64/boot/dts/tesla/fsd.dtsi | 1162 +++++++--------
+ drivers/clk/samsung/Makefile | 1 +
+ drivers/clk/samsung/clk-exynos5515.c | 1484 ++++++++++++++++++++
+ drivers/clk/samsung/clk-pll.c | 1 +
+ drivers/clk/samsung/clk-pll.h | 1 +
+ drivers/input/keyboard/samsung-keypad.c | 200 ++-
+ drivers/soc/samsung/exynos-chipid.c | 1 +
+ include/dt-bindings/clock/samsung,exynos5515-cmu.h | 191 +++
+ include/linux/input/samsung-keypad.h | 39 -
+ 30 files changed, 2749 insertions(+), 896 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynos5515-cmu.yaml
+ delete mode 100644 arch/arm/mach-s3c/keypad.h
+ delete mode 100644 arch/arm/mach-s3c/setup-keypad-s3c64xx.c
+ create mode 100644 drivers/clk/samsung/clk-exynos5515.c
+ create mode 100644 include/dt-bindings/clock/samsung,exynos5515-cmu.h
+ delete mode 100644 include/linux/input/samsung-keypad.h
+Merging scmi/for-linux-next (da3f4c5770401 Merge branch 'for-next/scmi/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux)
+$ git merge -m Merge branch 'for-linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git scmi/for-linux-next
+Merge made by the 'ort' strategy.
+ drivers/firmware/arm_scmi/common.h | 22 ++++++++++++++++++++
+ drivers/firmware/arm_scmi/driver.c | 38 ++++++++++++++++++++++++++++++-----
+ drivers/firmware/arm_scmi/protocols.h | 9 ++++++---
+ drivers/firmware/arm_scmi/raw_mode.c | 30 +++++++++++++++++++++------
+ drivers/firmware/arm_scmi/reset.c | 36 ++++++++++-----------------------
+ include/linux/scmi_protocol.h | 13 +++++++-----
+ include/trace/events/scmi.h | 8 +++-----
+ 7 files changed, 107 insertions(+), 49 deletions(-)
+Merging sophgo/for-next (76acfee87c74d Merge branch 'dt/arm' into for-next)
+$ git merge -m Merge branch 'for-next' of https://github.com/sophgo/linux.git sophgo/for-next
+Merge made by the 'ort' strategy.
+Merging sophgo-soc/soc-for-next (c8754c7deab4c soc: sophgo: cv1800: rtcsys: New driver (handling RTC only))
+$ git merge -m Merge branch 'soc-for-next' of https://github.com/sophgo/linux.git sophgo-soc/soc-for-next
+Already up to date.
+Merging spacemit/for-next (12dfeb5b8a252 Merge branch 'spacemit-misc-for-next' into spacemit-for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux spacemit/for-next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 9 ++
+ arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 30 ++++++
+ arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 91 +++++++++++------
+ arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 17 ++++
+ arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 11 ++
+ arch/riscv/boot/dts/spacemit/k3.dtsi | 123 ++++++++++++++++++++++-
+ drivers/clk/spacemit/ccu-k3.c | 92 +++++++++++++++++
+ 7 files changed, 340 insertions(+), 33 deletions(-)
+Merging stm32/stm32-next (2f92d900f262a ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk)
+$ git merge -m Merge branch 'stm32-next' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32/stm32-next
+Auto-merging arch/arm64/configs/defconfig
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/arm/stm32/stm32.yaml | 21 +-
+ arch/arm/boot/dts/st/stm32mp131.dtsi | 24 ++
+ arch/arm/boot/dts/st/stm32mp135.dtsi | 44 +--
+ arch/arm/boot/dts/st/stm32mp135f-dk.dts | 28 +-
+ arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi | 34 +++
+ arch/arm/boot/dts/st/stm32mp151.dtsi | 20 +-
+ .../arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
+ arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts | 8 +-
+ arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts | 8 +-
+ arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts | 8 +-
+ arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts | 8 +-
+ arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 9 +-
+ arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts | 2 +-
+ arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi | 1 +
+ arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 2 +-
+ arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 2 +
+ arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 35 ++-
+ arch/arm64/boot/dts/st/Makefile | 1 +
+ arch/arm64/boot/dts/st/stm32mp231.dtsi | 1 +
+ arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 330 +++++++++++++++++++++
+ arch/arm64/boot/dts/st/stm32mp251.dtsi | 17 ++
+ arch/arm64/boot/dts/st/stm32mp253.dtsi | 16 +
+ .../boot/dts/st/stm32mp257-engicam-microgea.dtsi | 63 ++++
+ .../dts/st/stm32mp257d-engicam-microgea-rmm.dts | 319 ++++++++++++++++++++
+ arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 56 ++--
+ arch/arm64/configs/defconfig | 4 +
+ 26 files changed, 956 insertions(+), 107 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
+ create mode 100644 arch/arm64/boot/dts/st/stm32mp257d-engicam-microgea-rmm.dts
+Merging sunxi/sunxi/for-next (26910870333e5 Merge branch 'sunxi/clk-for-7.4' into sunxi/for-next)
+$ git merge -m Merge branch 'sunxi/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/sunxi/for-next
+Merge made by the 'ort' strategy.
+ arch/arm/boot/dts/allwinner/sun7i-a20.dtsi | 2 +-
+ drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 37 ++++-----
+ drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 128 +++++++++++++----------------
+ drivers/clk/sunxi-ng/ccu_div.h | 18 +++-
+ 4 files changed, 89 insertions(+), 96 deletions(-)
+Merging tee/next (0044312f9bb82 Merge branches 'qcomtee_fix_for_v7.3', 'qcomtee_for_v7.4' and 'tee_update_for_v7.4' into next)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee.git tee/next
+Merge made by the 'ort' strategy.
+ drivers/tee/qcomtee/async.c | 4 ++--
+ drivers/tee/qcomtee/qcomtee_msg.h | 2 +-
+ drivers/tee/qcomtee/qcomtee_object.h | 1 +
+ include/uapi/linux/tee.h | 40 ++++++++++++++++++------------------
+ 4 files changed, 24 insertions(+), 23 deletions(-)
+Merging tegra/for-next (23f776ce28b3e Merge branch for-7.4/arm64/dt into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tegra/for-next
+Auto-merging drivers/soc/tegra/pmc.c
+Merge made by the 'ort' strategy.
+ .../memory-controllers/nvidia,tegra124-emc.yaml | 10 +-
+ .../memory-controllers/nvidia,tegra124-mc.yaml | 1 +
+ arch/arm/boot/dts/nvidia/tegra124.dtsi | 16 +-
+ arch/arm64/boot/dts/nvidia/tegra132.dtsi | 16 +-
+ .../dts/nvidia/tegra186-p3509-0000+p3636-0001.dts | 8 +-
+ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 74 +--
+ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 8 +-
+ .../arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 8 +-
+ arch/arm64/boot/dts/nvidia/tegra194.dtsi | 78 +--
+ arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 10 +-
+ arch/arm64/boot/dts/nvidia/tegra210.dtsi | 6 +-
+ .../boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi | 9 +-
+ .../dts/nvidia/tegra234-p3740-0002+p3701-0008.dts | 9 +-
+ .../boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi | 2 +-
+ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 74 +--
+ arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi | 32 ++
+ .../boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 75 +++
+ arch/arm64/boot/dts/nvidia/tegra264.dtsi | 524 +++++++++++----------
+ .../boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h | 20 +
+ drivers/soc/tegra/pmc.c | 98 ++++
+ 20 files changed, 653 insertions(+), 425 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h
+Merging tenstorrent-dt/tenstorrent-dt-for-next (33583baeb1ba7 dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU)
+$ git merge -m Merge branch 'tenstorrent-dt-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git tenstorrent-dt/tenstorrent-dt-for-next
+Already up to date.
+Merging fustini-config/riscv-config-for-next (020e209272bee riscv: defconfig: thead: enable PCA953X GPIO driver)
+$ git merge -m Merge branch 'riscv-config-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git fustini-config/riscv-config-for-next
+Already up to date.
+Merging thead-dt/thead-dt-for-next (15d32aaf6300b riscv: dts: thead: Add remaining Lichee Pi 4A IO expansions)
+$ git merge -m Merge branch 'thead-dt-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git thead-dt/thead-dt-for-next
+Already up to date.
+Merging ti/ti-next (712357fa6b256 Merge branch 'ti-k3-dts-next' into ti-next)
+$ git merge -m Merge branch 'ti-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git ti/ti-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/firmware/ti_sci.c
+Merge made by the 'ort' strategy.
+ Documentation/devicetree/bindings/arm/ti/k3.yaml | 7 +
+ MAINTAINERS | 1 +
+ arch/arm/boot/dts/ti/keystone/keystone-k2e.dtsi | 2 +-
+ arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi | 4 +-
+ arch/arm/boot/dts/ti/keystone/keystone-k2hk.dtsi | 16 +-
+ arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi | 16 +-
+ arch/arm/boot/dts/ti/keystone/keystone.dtsi | 4 +-
+ arch/arm64/boot/dts/ti/Makefile | 6 +
+ arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 +-
+ arch/arm64/boot/dts/ti/k3-am625-sk-common.dtsi | 1 +
+ arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 2 +-
+ arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 1 +
+ .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 11 +
+ .../boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 2 +-
+ arch/arm64/boot/dts/ti/k3-am67-phycore-som.dtsi | 324 ++++++++++++++++
+ .../arm64/boot/dts/ti/k3-am6754-phyboard-rigel.dts | 431 +++++++++++++++++++++
+ ...uila-dsi-to-lvds-v2-panel-cap-touch-10inch.dtso | 161 ++++++++
+ .../boot/dts/ti/k3-j7200-common-proc-board.dts | 1 +
+ .../boot/dts/ti/k3-j721s2-common-proc-board.dts | 1 +
+ arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 26 +-
+ .../boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 2 +
+ drivers/firmware/ti_sci.c | 4 +-
+ 22 files changed, 983 insertions(+), 46 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/ti/k3-am67-phycore-som.dtsi
+ create mode 100644 arch/arm64/boot/dts/ti/k3-am6754-phyboard-rigel.dts
+ create mode 100644 arch/arm64/boot/dts/ti/k3-am69-aquila-dsi-to-lvds-v2-panel-cap-touch-10inch.dtso
+Merging xilinx/for-next (20df11b6d0666 ARM: dts: xilinx: Replace spaces indentation with tabs)
+$ git merge -m Merge branch 'for-next' of https://github.com/Xilinx/linux-xlnx.git xilinx/for-next
+Merge made by the 'ort' strategy.
+ arch/arm/boot/dts/xilinx/zynq-7000.dtsi | 8 ++++----
+ arch/arm/boot/dts/xilinx/zynq-parallella.dts | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+Merging socfpga/for-next (012193571177e arm64: dts: agilex5: add SOCDK eMMC daughter board)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git socfpga/for-next
+Merge made by the 'ort' strategy.
+ Documentation/devicetree/bindings/arm/altera.yaml | 1 +
+ arch/arm64/boot/dts/intel/Makefile | 1 +
+ arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 26 +++++
+ .../arm64/boot/dts/intel/socfpga_agilex5_socdk.dts | 34 +++++-
+ .../boot/dts/intel/socfpga_agilex5_socdk_emmc.dts | 123 +++++++++++++++++++++
+ 5 files changed, 184 insertions(+), 1 deletion(-)
+ create mode 100644 arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_emmc.dts
+Merging clk/clk-next (4539402e0b34c clk: ti: clean-up simple provider misuse of the consumer API)
+$ git merge -m Merge branch 'clk-next' of https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk/clk-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/clk/clk-scpi.c
+Auto-merging drivers/clk/samsung/clk-pll.c
+Merge made by the 'ort' strategy.
+ .../bindings/clock/clock-nexus-node.yaml | 30 +++++
+ MAINTAINERS | 11 ++
+ drivers/clk/Kconfig | 1 +
+ drivers/clk/Makefile | 5 +-
+ drivers/clk/actions/owl-composite.h | 1 -
+ drivers/clk/actions/owl-fixed-factor.h | 2 -
+ drivers/clk/aspeed/clk-aspeed.c | 2 +-
+ drivers/clk/aspeed/clk-ast2600.c | 2 +-
+ drivers/clk/aspeed/clk-ast2700.c | 2 +-
+ drivers/clk/at91/clk-audio-pll.c | 4 +-
+ drivers/clk/at91/clk-h32mx.c | 2 +-
+ drivers/clk/at91/clk-main.c | 2 +-
+ drivers/clk/at91/clk-pll.c | 2 +-
+ drivers/clk/at91/clk-plldiv.c | 2 +-
+ drivers/clk/at91/clk-slow.c | 2 +-
+ drivers/clk/at91/clk-smd.c | 2 +-
+ drivers/clk/at91/clk-usb.c | 6 +-
+ drivers/clk/at91/sckc.c | 2 +-
+ drivers/clk/bcm/clk-iproc-armpll.c | 2 +-
+ drivers/clk/bcm/clk-iproc-asiu.c | 2 +-
+ drivers/clk/bcm/clk-iproc-pll.c | 2 +-
+ drivers/clk/berlin/berlin2-avpll.c | 4 +-
+ drivers/clk/berlin/berlin2-pll.c | 2 +-
+ drivers/clk/clk-axi-clkgen.c | 2 +-
+ drivers/clk/clk-cdce925.c | 2 +-
+ drivers/clk/clk-conf.c | 12 +-
+ drivers/clk/clk-cs2000-cp.c | 2 +-
+ drivers/clk/clk-fractional-divider.c | 2 +-
+ drivers/clk/clk-gemini.c | 2 +-
+ drivers/clk/clk-highbank.c | 2 +-
+ drivers/clk/clk-lmk04832.c | 6 +-
+ drivers/clk/clk-milbeaut.c | 4 +-
+ drivers/clk/clk-nomadik.c | 4 +-
+ drivers/clk/clk-npcm7xx.c | 2 +-
+ drivers/clk/clk-pwm.c | 2 +-
+ drivers/clk/clk-renesas-pcie.c | 39 +++---
+ drivers/clk/clk-s2mps11.c | 12 +-
+ drivers/clk/clk-scpi.c | 2 +-
+ drivers/clk/clk-si514.c | 2 +-
+ drivers/clk/clk-si521xx.c | 8 +-
+ drivers/clk/clk-si5341.c | 2 +-
+ drivers/clk/clk-si544.c | 2 +-
+ drivers/clk/clk-si570.c | 2 +-
+ drivers/clk/clk-stm32f4.c | 4 +-
+ drivers/clk/clk-stm32h7.c | 2 +-
+ drivers/clk/clk-versaclock5.c | 8 +-
+ drivers/clk/clk-vt8500.c | 4 +-
+ drivers/clk/clk-xgene.c | 6 +-
+ drivers/clk/clk.c | 61 +++++----
+ drivers/clk/clk.h | 5 +-
+ drivers/clk/clk_kunit_helpers.c | 31 +++++
+ drivers/clk/clk_test.c | 139 +++++++++++++++++++++
+ drivers/clk/clkdev.c | 4 +-
+ drivers/clk/davinci/Kconfig | 10 ++
+ drivers/clk/davinci/Makefile | 8 +-
+ drivers/clk/davinci/da8xx-cfgchip.c | 4 +-
+ drivers/clk/davinci/pll.c | 2 +-
+ drivers/clk/davinci/psc.c | 2 +-
+ drivers/clk/hisilicon/clk-hi3559a.c | 2 +-
+ drivers/clk/hisilicon/clk-hi3620.c | 2 +-
+ drivers/clk/hisilicon/clk-hi6220-stub.c | 2 +-
+ drivers/clk/hisilicon/clk-hisi-phase.c | 2 +-
+ drivers/clk/hisilicon/clk-hix5hd2.c | 2 +-
+ drivers/clk/hisilicon/clkdivider-hi6220.c | 2 +-
+ drivers/clk/hisilicon/clkgate-separated.c | 2 +-
+ drivers/clk/imx/clk-busy.c | 4 +-
+ drivers/clk/imx/clk-cpu.c | 2 +-
+ drivers/clk/imx/clk-divider-gate.c | 2 +-
+ drivers/clk/imx/clk-fixup-div.c | 2 +-
+ drivers/clk/imx/clk-fixup-mux.c | 2 +-
+ drivers/clk/imx/clk-frac-pll.c | 2 +-
+ drivers/clk/imx/clk-fracn-gppll.c | 2 +-
+ drivers/clk/imx/clk-gate-93.c | 2 +-
+ drivers/clk/imx/clk-gate-exclusive.c | 2 +-
+ drivers/clk/imx/clk-gate2.c | 2 +-
+ drivers/clk/imx/clk-lpcg-scu.c | 2 +-
+ drivers/clk/imx/clk-pfd.c | 2 +-
+ drivers/clk/imx/clk-pfdv2.c | 2 +-
+ drivers/clk/imx/clk-pll14xx.c | 2 +-
+ drivers/clk/imx/clk-pllv1.c | 2 +-
+ drivers/clk/imx/clk-pllv2.c | 2 +-
+ drivers/clk/imx/clk-pllv3.c | 2 +-
+ drivers/clk/imx/clk-pllv4.c | 2 +-
+ drivers/clk/imx/clk-scu.c | 4 +-
+ drivers/clk/imx/clk-sscg-pll.c | 2 +-
+ drivers/clk/ingenic/cgu.c | 2 +-
+ drivers/clk/keystone/gate.c | 2 +-
+ drivers/clk/keystone/pll.c | 2 +-
+ drivers/clk/keystone/syscon-clk.c | 2 +-
+ drivers/clk/kunit_clk_parse_clkspec.dtso | 31 +++++
+ drivers/clk/mediatek/Kconfig | 1 +
+ drivers/clk/mediatek/clk-cpumux.c | 2 +-
+ drivers/clk/mediatek/reset.h | 6 +-
+ drivers/clk/mmp/clk-apbc.c | 2 +-
+ drivers/clk/mmp/clk-apmu.c | 2 +-
+ drivers/clk/mmp/clk-frac.c | 2 +-
+ drivers/clk/mmp/clk-gate.c | 2 +-
+ drivers/clk/mmp/clk-mix.c | 2 +-
+ drivers/clk/mmp/clk-pll.c | 2 +-
+ drivers/clk/mstar/clk-msc313-mpll.c | 2 +-
+ drivers/clk/mvebu/ap-cpu-clk.c | 2 +-
+ drivers/clk/mvebu/clk-corediv.c | 2 +-
+ drivers/clk/mvebu/clk-cpu.c | 2 +-
+ drivers/clk/mxs/clk-div.c | 2 +-
+ drivers/clk/mxs/clk-frac.c | 2 +-
+ drivers/clk/mxs/clk-pll.c | 2 +-
+ drivers/clk/mxs/clk-ref.c | 2 +-
+ drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +-
+ drivers/clk/pistachio/clk-pll.c | 2 +-
+ drivers/clk/rockchip/clk-cpu.c | 2 +-
+ drivers/clk/rockchip/clk-ddr.c | 2 +-
+ drivers/clk/rockchip/clk-gate-grf.c | 2 +-
+ drivers/clk/rockchip/clk-inverter.c | 2 +-
+ drivers/clk/rockchip/clk-mmc-phase.c | 2 +-
+ drivers/clk/rockchip/clk-muxgrf.c | 2 +-
+ drivers/clk/rockchip/clk-pll.c | 2 +-
+ drivers/clk/rockchip/clk.c | 2 +-
+ drivers/clk/samsung/clk-cpu.c | 2 +-
+ drivers/clk/samsung/clk-exynos-clkout.c | 8 +-
+ drivers/clk/samsung/clk-pll.c | 2 +-
+ drivers/clk/socfpga/clk-gate-a10.c | 2 +-
+ drivers/clk/socfpga/clk-gate-s10.c | 6 +-
+ drivers/clk/socfpga/clk-gate.c | 2 +-
+ drivers/clk/socfpga/clk-periph-a10.c | 2 +-
+ drivers/clk/socfpga/clk-periph-s10.c | 8 +-
+ drivers/clk/socfpga/clk-periph.c | 2 +-
+ drivers/clk/socfpga/clk-pll-a10.c | 2 +-
+ drivers/clk/socfpga/clk-pll-s10.c | 8 +-
+ drivers/clk/socfpga/clk-pll.c | 2 +-
+ drivers/clk/spear/clk-aux-synth.c | 2 +-
+ drivers/clk/spear/clk-frac-synth.c | 2 +-
+ drivers/clk/spear/clk-gpt-synth.c | 2 +-
+ drivers/clk/spear/clk-vco-pll.c | 2 +-
+ drivers/clk/st/clk-flexgen.c | 2 +-
+ drivers/clk/st/clkgen-fsyn.c | 4 +-
+ drivers/clk/st/clkgen-pll.c | 2 +-
+ drivers/clk/stm32/clk-stm32mp1.c | 4 +-
+ drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 2 +-
+ drivers/clk/tegra/clk-audio-sync.c | 2 +-
+ drivers/clk/tegra/clk-divider.c | 2 +-
+ drivers/clk/tegra/clk-periph-fixed.c | 2 +-
+ drivers/clk/tegra/clk-periph-gate.c | 2 +-
+ drivers/clk/tegra/clk-periph.c | 2 +-
+ drivers/clk/tegra/clk-pll-out.c | 2 +-
+ drivers/clk/tegra/clk-pll.c | 2 +-
+ drivers/clk/tegra/clk-sdmmc-mux.c | 2 +-
+ drivers/clk/tegra/clk-super.c | 4 +-
+ drivers/clk/tegra/clk-tegra-super-cclk.c | 2 +-
+ drivers/clk/tegra/clk-tegra124-emc.c | 2 +-
+ drivers/clk/tegra/clk-tegra20-emc.c | 2 +-
+ drivers/clk/tegra/clk-tegra210-emc.c | 2 +-
+ drivers/clk/tegra/clk.h | 2 +-
+ drivers/clk/ti/clockdomain.c | 2 +-
+ drivers/clk/uniphier/clk-uniphier-cpugear.c | 2 +-
+ drivers/clk/uniphier/clk-uniphier-fixed-factor.c | 2 +-
+ drivers/clk/uniphier/clk-uniphier-fixed-rate.c | 2 +-
+ drivers/clk/uniphier/clk-uniphier-gate.c | 2 +-
+ drivers/clk/uniphier/clk-uniphier-mux.c | 2 +-
+ drivers/clk/ux500/clk-prcc.c | 2 +-
+ drivers/clk/ux500/clk-prcmu.c | 4 +-
+ drivers/clk/ux500/clk-sysctrl.c | 2 +-
+ drivers/clk/versatile/clk-icst.c | 2 +-
+ drivers/clk/versatile/clk-sp810.c | 2 +-
+ drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
+ drivers/clk/x86/clk-pmc-atom.c | 2 +-
+ drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 14 +--
+ drivers/clk/xilinx/xlnx_vcu.c | 2 +-
+ drivers/clk/zynqmp/clk-gate-zynqmp.c | 2 +-
+ drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +-
+ drivers/clk/zynqmp/divider.c | 2 +-
+ drivers/clk/zynqmp/pll.c | 2 +-
+ include/kunit/clk.h | 2 +
+ include/linux/clk-provider.h | 22 +++-
+ include/linux/clk/ti.h | 2 +-
+ 174 files changed, 551 insertions(+), 272 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/clock/clock-nexus-node.yaml
+ create mode 100644 drivers/clk/davinci/Kconfig
+ create mode 100644 drivers/clk/kunit_clk_parse_clkspec.dtso
+Merging clk-imx/for-next (39ec460b56b26 clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git clk-imx/for-next
+Already up to date.
+Merging clk-renesas/renesas-clk (8d90c0eeef104 clk: renesas: r9a09g077: Register SYSC regmap)
+$ git merge -m Merge branch 'renesas-clk' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git clk-renesas/renesas-clk
+Merge made by the 'ort' strategy.
+ drivers/clk/renesas/Kconfig | 2 +
+ drivers/clk/renesas/r9a06g032-clocks.c | 2 +-
+ drivers/clk/renesas/r9a08g046-cpg.c | 92 +++++-
+ drivers/clk/renesas/r9a09g077-cpg.c | 142 +++++++++
+ drivers/clk/renesas/rcar-gen3-cpg.c | 15 +-
+ drivers/clk/renesas/rcar-gen3-cpg.h | 3 +-
+ drivers/clk/renesas/renesas-cpg-mssr.c | 3 +
+ drivers/clk/renesas/renesas-cpg-mssr.h | 1 +
+ drivers/clk/renesas/rzg2l-cpg.c | 554 ++++++++++++++++++++++++++++++++-
+ drivers/clk/renesas/rzg2l-cpg.h | 51 ++-
+ drivers/clk/renesas/rzv2h-cpg.c | 164 +++++-----
+ 11 files changed, 898 insertions(+), 131 deletions(-)
+Merging thead-clk/thead-clk-for-next (b2ee00d0bf4cc clk: thead: allow COMPILE_TEST builds)
+$ git merge -m Merge branch 'thead-clk-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux.git thead-clk/thead-clk-for-next
+Already up to date.
+Merging tenstorrent-clk/tenstorrent-clk-for-next (23c8ebc952849 clk: tenstorrent: Add Atlantis clock controller driver)
+$ git merge -m Merge branch 'tenstorrent-clk-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tenstorrent/linux.git tenstorrent-clk/tenstorrent-clk-for-next
+Already up to date.
+Merging csky/linux-next (abb81e5ce7d99 csky: Fix a4/a5 restoration in syscall trace path)
+$ git merge -m Merge branch 'linux-next' of https://github.com/c-sky/csky-linux.git csky/linux-next
+Already up to date.
+Merging loongarch/loongarch-next (a2628ce4ddb68 perf build: Add clang and rust target flags for LoongArch)
+$ git merge -m Merge branch 'loongarch-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch/loongarch-next
+Already up to date.
+Merging m68k/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git m68k/for-next
+Already up to date.
+Merging m68knommu/for-next (338b54d48e274 m68k: fix typo "eanble" in comment)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git m68knommu/for-next
+Merge made by the 'ort' strategy.
+ arch/m68k/coldfire/reset.c | 2 +-
+ arch/m68k/include/asm/m53xxacr.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+Merging microblaze/next (98f468b04d5cc kunit: qemu_configs: Add microblaze configurations)
+$ git merge -m Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze.git microblaze/next
+Merge made by the 'ort' strategy.
+ arch/microblaze/Kconfig | 9 +
+ arch/microblaze/Makefile | 8 +-
+ arch/microblaze/include/asm/entry.h | 13 +
+ arch/microblaze/include/asm/processor.h | 2 +-
+ arch/microblaze/include/asm/uaccess.h | 3 +-
+ arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c | 2 +-
+ arch/microblaze/kernel/cpu/cpuinfo-static.c | 2 +-
+ arch/microblaze/kernel/cpu/cpuinfo.c | 1 +
+ arch/microblaze/kernel/entry.S | 348 ++++++++++++-----------
+ arch/microblaze/kernel/hw_exception_handler.S | 5 +
+ arch/microblaze/kernel/process.c | 5 +-
+ arch/microblaze/kernel/ptrace.c | 3 +
+ arch/microblaze/kernel/reset.c | 22 ++
+ arch/microblaze/kernel/signal.c | 26 ++
+ arch/microblaze/kernel/syscalls/syscall.tbl | 2 +-
+ tools/testing/kunit/qemu_configs/microblazebe.py | 24 ++
+ tools/testing/kunit/qemu_configs/microblazeel.py | 27 ++
+ 17 files changed, 326 insertions(+), 176 deletions(-)
+ create mode 100644 tools/testing/kunit/qemu_configs/microblazebe.py
+ create mode 100644 tools/testing/kunit/qemu_configs/microblazeel.py
+Merging mips/mips-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'mips-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips/mips-next
+Already up to date.
+Merging openrisc/for-next (6620f5e8c11c4 openrisc: drop unneeded semicolon)
+$ git merge -m Merge branch 'for-next' of https://github.com/openrisc/linux.git openrisc/for-next
+Already up to date.
+Merging parisc-hd/for-next (7dfa2e8a7a6bd parisc: unwind: Replace open-coded binary search with bsearch())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-hd/for-next
+Merge made by the 'ort' strategy.
+ arch/parisc/include/asm/pdcpat.h | 4 ++--
+ arch/parisc/include/asm/special_insns.h | 2 +-
+ arch/parisc/include/uapi/asm/mman.h | 2 +-
+ arch/parisc/kernel/unwind.c | 33 +++++++++++++++------------------
+ arch/parisc/lib/memcpy.c | 2 +-
+ drivers/parisc/ccio-dma.c | 2 +-
+ drivers/parisc/dino.c | 2 +-
+ drivers/parisc/pdc_stable.c | 2 +-
+ drivers/parisc/sba_iommu.c | 2 +-
+ drivers/parport/parport_gsc.c | 2 +-
+ 10 files changed, 25 insertions(+), 28 deletions(-)
+Merging powerpc/next (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git powerpc/next
+Already up to date.
+Merging risc-v/for-next (77ae27fd98f3b Merge tag 'printk-for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git risc-v/for-next
+Already up to date.
+Merging riscv-dt/riscv-dt-for-next (f55a54f07a367 MAINTAINERS: update RISC-V Microchip maintainers)
+$ git merge -m Merge branch 'riscv-dt-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git riscv-dt/riscv-dt-for-next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+Merging riscv-soc/riscv-soc-for-next (00bdd4d4daaae Merge branch 'riscv-firmware-for-next' into riscv-soc-for-next)
+$ git merge -m Merge branch 'riscv-soc-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git riscv-soc/riscv-soc-for-next
+Merge made by the 'ort' strategy.
+ drivers/firmware/microchip/mpfs-auto-update.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+Merging s390/for-next (378fa97eada76 Merge branch 'features' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git s390/for-next
+Merge made by the 'ort' strategy.
+ arch/s390/boot/ipl_parm.c | 13 ++++++++++++-
+ arch/s390/include/asm/ebcdic.h | 6 ++++++
+ arch/s390/kernel/ebcdic.c | 40 +++++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 57 insertions(+), 2 deletions(-)
+Merging sh/for-next (b0aa5e4b087b6 sh: Fix fallout from ZERO_PAGE consolidation)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux.git sh/for-next
+Already up to date.
+Merging sparc/for-next (5b2a3b1a98fb4 sparc: Remove remaining defconfig references to the pktcdvd driver)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc.git sparc/for-next
+Already up to date.
+Merging uml/next (1590cf0329716 Linux 7.2-rc4)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git uml/next
+Already up to date.
+Merging xtensa/xtensa-for-next (28722ed2527aa xtensa: time: Fix clk reference leak in calibrate_ccount())
+$ git merge -m Merge branch 'xtensa-for-next' of https://github.com/jcmvbkbc/linux-xtensa.git xtensa/xtensa-for-next
+Merge made by the 'ort' strategy.
+ arch/xtensa/include/asm/atomic.h | 13 -------------
+ arch/xtensa/include/uapi/asm/mman.h | 2 +-
+ arch/xtensa/kernel/entry.S | 2 +-
+ arch/xtensa/kernel/time.c | 1 +
+ arch/xtensa/kernel/vectors.S | 2 +-
+ arch/xtensa/mm/init.c | 2 +-
+ 6 files changed, 5 insertions(+), 17 deletions(-)
+Merging fs-next (5d71d81f4e1ed Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git)
+$ git merge -m Merge branch 'fs-next' of linux-next fs-next
+Auto-merging CREDITS
+Auto-merging MAINTAINERS
+Auto-merging fs/fat/misc.c
+Auto-merging fs/ocfs2/journal.c
+Auto-merging fs/ocfs2/quota_local.c
+Auto-merging fs/proc/base.c
+Auto-merging init/Kconfig
+Merge made by the 'ort' strategy.
+ CREDITS | 2 +-
+ Documentation/admin-guide/binfmt-misc.rst | 3 +
+ Documentation/admin-guide/nfs/pnfs-scsi-server.rst | 2 +-
+ Documentation/filesystems/befs.rst | 4 +-
+ Documentation/filesystems/bfs.rst | 60 -
+ Documentation/filesystems/exfat.rst | 117 ++
+ Documentation/filesystems/index.rst | 2 +-
+ Documentation/filesystems/ntfs3.rst | 23 +
+ Documentation/filesystems/porting.rst | 2 +-
+ Documentation/filesystems/proc.rst | 4 +
+ Documentation/filesystems/smb/ksmbd.rst | 14 +-
+ Documentation/filesystems/squashfs.rst | 6 +-
+ MAINTAINERS | 13 +-
+ arch/alpha/include/uapi/asm/socket.h | 4 +
+ arch/mips/configs/malta_defconfig | 1 -
+ arch/mips/configs/malta_kvm_defconfig | 1 -
+ arch/mips/configs/maltaup_xpa_defconfig | 1 -
+ arch/mips/configs/rm200_defconfig | 1 -
+ arch/mips/include/uapi/asm/socket.h | 4 +
+ arch/parisc/include/uapi/asm/socket.h | 4 +
+ arch/powerpc/Kconfig | 1 -
+ arch/powerpc/configs/fsl-emb-nonhw.config | 1 -
+ arch/powerpc/configs/ppc6xx_defconfig | 1 -
+ arch/powerpc/include/asm/elf.h | 6 -
+ arch/powerpc/include/asm/spu.h | 3 -
+ arch/powerpc/platforms/cell/Kconfig | 1 -
+ arch/powerpc/platforms/cell/spu_syscalls.c | 20 -
+ arch/powerpc/platforms/cell/spufs/Makefile | 1 -
+ arch/powerpc/platforms/cell/spufs/coredump.c | 183 --
+ arch/powerpc/platforms/cell/spufs/file.c | 114 --
+ arch/powerpc/platforms/cell/spufs/spufs.h | 12 -
+ arch/powerpc/platforms/cell/spufs/syscalls.c | 4 -
+ arch/sparc/include/uapi/asm/socket.h | 4 +
+ drivers/base/devtmpfs.c | 108 +-
+ fs/9p/vfs_addr.c | 1 -
+ fs/9p/vfs_inode.c | 3 +
+ fs/9p/vfs_inode_dotl.c | 3 +
+ fs/Kconfig | 9 +-
+ fs/Makefile | 1 -
+ fs/adfs/dir.c | 2 +-
+ fs/afs/file.c | 7 +-
+ fs/afs/internal.h | 2 +-
+ fs/aio.c | 11 +-
+ fs/bfs/Kconfig | 21 -
+ fs/bfs/Makefile | 8 -
+ fs/bfs/bfs.h | 69 -
+ fs/bfs/dir.c | 356 ----
+ fs/bfs/file.c | 203 --
+ fs/bfs/inode.c | 538 ------
+ fs/binfmt_elf.c | 16 +-
+ fs/binfmt_elf_fdpic.c | 12 +-
+ fs/binfmt_misc.c | 12 +-
+ fs/bpf_fs_kfuncs.c | 4 +-
+ fs/btrfs/Kconfig | 1 +
+ fs/btrfs/bio.c | 163 +-
+ fs/btrfs/bio.h | 9 +-
+ fs/btrfs/block-group.c | 461 +----
+ fs/btrfs/block-group.h | 16 +-
+ fs/btrfs/btrfs_inode.h | 22 +-
+ fs/btrfs/compression.c | 20 +-
+ fs/btrfs/ctree.c | 4 +-
+ fs/btrfs/delalloc-space.c | 13 +-
+ fs/btrfs/delayed-inode.c | 115 +-
+ fs/btrfs/delayed-inode.h | 22 +-
+ fs/btrfs/dev-replace.c | 11 +-
+ fs/btrfs/dir-item.c | 41 +-
+ fs/btrfs/dir-item.h | 5 +-
+ fs/btrfs/disk-io.c | 108 +-
+ fs/btrfs/extent-io-tree.c | 2 +-
+ fs/btrfs/extent-tree.c | 10 +
+ fs/btrfs/extent_io.c | 64 +-
+ fs/btrfs/extent_map.c | 8 +
+ fs/btrfs/file-item.c | 46 +-
+ fs/btrfs/free-space-cache.c | 1337 +------------
+ fs/btrfs/free-space-cache.h | 29 +-
+ fs/btrfs/fs.c | 2 +-
+ fs/btrfs/fs.h | 4 +-
+ fs/btrfs/inode.c | 337 ++--
+ fs/btrfs/ioctl.c | 41 +-
+ fs/btrfs/ordered-data.c | 27 +-
+ fs/btrfs/qgroup.c | 126 +-
+ fs/btrfs/qgroup.h | 16 +-
+ fs/btrfs/raid56.c | 57 +-
+ fs/btrfs/relocation.c | 2 +-
+ fs/btrfs/send.c | 2 +-
+ fs/btrfs/space-info.c | 2 -
+ fs/btrfs/space-info.h | 4 -
+ fs/btrfs/super.c | 48 +-
+ fs/btrfs/sysfs.c | 129 +-
+ fs/btrfs/tests/extent-io-tests.c | 131 +-
+ fs/btrfs/transaction.c | 40 +-
+ fs/btrfs/transaction.h | 29 +-
+ fs/btrfs/tree-checker.c | 66 +-
+ fs/btrfs/tree-log.c | 8 +-
+ fs/btrfs/verity.c | 31 +-
+ fs/btrfs/volumes.c | 55 +-
+ fs/btrfs/volumes.h | 1 +
+ fs/btrfs/zlib.c | 10 +-
+ fs/btrfs/zoned.c | 26 +-
+ fs/btrfs/zstd.c | 73 +-
+ fs/buffer.c | 131 +-
+ fs/cachefiles/Kconfig | 2 +-
+ fs/cachefiles/interface.c | 10 +-
+ fs/cachefiles/internal.h | 4 +-
+ fs/cachefiles/io.c | 25 +-
+ fs/ceph/Kconfig | 1 +
+ fs/ceph/addr.c | 4 +-
+ fs/ceph/file.c | 3 +
+ fs/char_dev.c | 4 +-
+ fs/coredump.c | 460 +++--
+ fs/dax.c | 26 +-
+ fs/dcache.c | 27 +-
+ fs/devpts/inode.c | 2 +
+ fs/dlm/config.c | 30 +-
+ fs/dlm/dlm_internal.h | 5 +
+ fs/dlm/lock.c | 18 +-
+ fs/dlm/lock.h | 4 +-
+ fs/dlm/lowcomms.c | 1 +
+ fs/dlm/midcomms.c | 1 +
+ fs/dlm/plock.c | 14 +-
+ fs/dlm/user.c | 23 +
+ fs/exfat/dir.c | 52 +-
+ fs/exfat/exfat_fs.h | 1 +
+ fs/exfat/fatent.c | 19 +-
+ fs/exfat/iomap.c | 28 +-
+ fs/exfat/misc.c | 2 +-
+ fs/exfat/namei.c | 7 +-
+ fs/exfat/super.c | 30 +-
+ fs/ext2/Makefile | 2 +
+ fs/ext2/balloc.c | 4 +
+ fs/ext2/ext2.h | 19 +-
+ fs/ext2/inode.c | 7 +
+ fs/ext2/super.c | 33 +-
+ fs/ext2/xattr.c | 2 +-
+ fs/ext4/ext4_jbd2.c | 2 +-
+ fs/ext4/mmp.c | 2 +-
+ fs/f2fs/checkpoint.c | 90 +-
+ fs/f2fs/compress.c | 10 +-
+ fs/f2fs/data.c | 123 +-
+ fs/f2fs/debug.c | 4 +-
+ fs/f2fs/dir.c | 51 +-
+ fs/f2fs/extent_cache.c | 13 +-
+ fs/f2fs/f2fs.h | 151 +-
+ fs/f2fs/file.c | 89 +-
+ fs/f2fs/gc.c | 33 +-
+ fs/f2fs/inline.c | 13 +-
+ fs/f2fs/inode.c | 43 +-
+ fs/f2fs/node.c | 303 +--
+ fs/f2fs/node.h | 159 +-
+ fs/f2fs/recovery.c | 66 +-
+ fs/f2fs/segment.c | 124 +-
+ fs/f2fs/segment.h | 32 +-
+ fs/f2fs/shrinker.c | 2 +-
+ fs/f2fs/super.c | 88 +-
+ fs/f2fs/sysfs.c | 10 +-
+ fs/f2fs/verity.c | 6 +-
+ fs/f2fs/xattr.c | 10 +-
+ fs/f2fs/xattr.h | 11 +-
+ fs/fat/misc.c | 2 +-
+ fs/file.c | 4 +
+ fs/fs-writeback.c | 6 +-
+ fs/fs_pin.c | 9 +-
+ fs/fuse/dax.c | 1 +
+ fs/fuse/dir.c | 3 +
+ fs/fuse/file.c | 7 +-
+ fs/fuse/fuse_i.h | 9 +
+ fs/fuse/inode.c | 28 +
+ fs/fuse/ioctl.c | 3 -
+ fs/fuse/req.c | 7 +-
+ fs/gfs2/acl.c | 11 +-
+ fs/gfs2/aops.c | 17 +-
+ fs/gfs2/bmap.c | 93 +-
+ fs/gfs2/dentry.c | 6 +-
+ fs/gfs2/dir.c | 61 +-
+ fs/gfs2/export.c | 7 +-
+ fs/gfs2/file.c | 72 +-
+ fs/gfs2/glock.c | 60 +-
+ fs/gfs2/glops.c | 13 +-
+ fs/gfs2/incore.h | 8 +-
+ fs/gfs2/inode.c | 127 +-
+ fs/gfs2/lock_dlm.c | 4 +-
+ fs/gfs2/log.c | 7 +-
+ fs/gfs2/lops.c | 22 +-
+ fs/gfs2/meta_io.c | 7 +-
+ fs/gfs2/ops_fstype.c | 26 +-
+ fs/gfs2/quota.c | 57 +-
+ fs/gfs2/recovery.c | 19 +-
+ fs/gfs2/rgrp.c | 129 +-
+ fs/gfs2/super.c | 98 +-
+ fs/gfs2/trace_gfs2.h | 6 +-
+ fs/gfs2/util.c | 8 +-
+ fs/gfs2/xattr.c | 69 +-
+ fs/inode.c | 2 +-
+ fs/internal.h | 1 +
+ fs/iomap/buffered-io.c | 8 +-
+ fs/iomap/direct-io.c | 2 +-
+ fs/isofs/compress.c | 77 +-
+ fs/isofs/inode.c | 2 +
+ fs/isofs/isofs.h | 2 +
+ fs/isofs/rock.c | 11 +-
+ fs/jbd2/commit.c | 22 +-
+ fs/jbd2/journal.c | 31 +-
+ fs/jbd2/transaction.c | 2 +-
+ fs/kernfs/dir.c | 112 +-
+ fs/kernfs/kernfs-internal.h | 18 +-
+ fs/kernfs/mount.c | 34 +-
+ fs/kernfs/symlink.c | 17 +-
+ fs/lockd/svc.c | 1 -
+ fs/lockd/svclock.c | 33 +-
+ fs/lockd/trace.h | 1 -
+ fs/lockd/xdr.h | 2 +-
+ fs/namei.c | 229 ++-
+ fs/namespace.c | 4 +-
+ fs/netfs/Kconfig | 3 +
+ fs/netfs/Makefile | 2 +-
+ fs/netfs/buffered_read.c | 37 +-
+ fs/netfs/buffered_write.c | 66 +-
+ fs/netfs/direct_read.c | 14 +-
+ fs/netfs/direct_write.c | 8 +-
+ fs/netfs/fscache_cookie.c | 8 +-
+ fs/netfs/fscache_io.c | 10 +-
+ fs/netfs/internal.h | 68 +-
+ fs/netfs/iterator.c | 2 +-
+ fs/netfs/main.c | 1 -
+ fs/netfs/misc.c | 10 +-
+ fs/netfs/objects.c | 6 +-
+ fs/netfs/read_collect.c | 14 +-
+ fs/netfs/read_pgpriv2.c | 13 +-
+ fs/netfs/read_retry.c | 5 +-
+ fs/netfs/read_single.c | 12 +-
+ fs/netfs/stats.c | 4 +-
+ fs/netfs/write_collect.c | 25 +-
+ fs/netfs/write_issue.c | 123 +-
+ fs/netfs/write_retry.c | 5 +-
+ fs/nfs/Kconfig | 1 +
+ fs/nfs/dir.c | 6 +
+ fs/nfs/nfs4file.c | 1 +
+ fs/nfs/super.c | 25 -
+ fs/nfs_common/nfs_ssc.c | 126 +-
+ fs/nfsd/blocklayout.c | 1 +
+ fs/nfsd/blocklayoutxdr.c | 11 +
+ fs/nfsd/export.c | 8 +-
+ fs/nfsd/export.h | 3 +-
+ fs/nfsd/filecache.c | 1 +
+ fs/nfsd/flexfilelayout.c | 24 +-
+ fs/nfsd/flexfilelayoutxdr.c | 9 +-
+ fs/nfsd/flexfilelayoutxdr.h | 8 +-
+ fs/nfsd/localio.c | 10 +-
+ fs/nfsd/lockd.c | 5 +-
+ fs/nfsd/netns.h | 17 +-
+ fs/nfsd/nfs2acl.c | 48 +-
+ fs/nfsd/nfs3acl.c | 1 +
+ fs/nfsd/nfs3proc.c | 79 +-
+ fs/nfsd/nfs3xdr.c | 4 +
+ fs/nfsd/nfs4acl.c | 1 +
+ fs/nfsd/nfs4callback.c | 8 +-
+ fs/nfsd/nfs4ctl.h | 83 +
+ fs/nfsd/nfs4idmap.c | 1 +
+ fs/nfsd/nfs4layouts.c | 1 +
+ fs/nfsd/nfs4proc.c | 435 +++--
+ fs/nfsd/nfs4recover.c | 1 +
+ fs/nfsd/nfs4state.c | 568 +++++-
+ fs/nfsd/nfs4xdr.c | 145 +-
+ fs/nfsd/nfscache.c | 1 +
+ fs/nfsd/nfsctl.c | 15 +-
+ fs/nfsd/nfsd.h | 237 +--
+ fs/nfsd/nfserr.h | 158 ++
+ fs/nfsd/nfsfh.c | 73 +-
+ fs/nfsd/nfsfh.h | 28 +-
+ fs/nfsd/nfsproc.c | 20 +-
+ fs/nfsd/nfssvc.c | 8 +
+ fs/nfsd/nfsxdr.c | 1 +
+ fs/nfsd/state.h | 46 +-
+ fs/nfsd/vfs.c | 311 ++-
+ fs/nfsd/vfs.h | 39 +-
+ fs/nfsd/xdr.h | 6 +-
+ fs/nfsd/xdr3.h | 2 +-
+ fs/nfsd/xdr4.h | 154 +-
+ fs/nfsd/xdr4cb.h | 20 +-
+ fs/notify/fanotify/fanotify_user.c | 2 +-
+ fs/ntfs/attrib.c | 268 ++-
+ fs/ntfs/attrib.h | 9 +
+ fs/ntfs/attrlist.c | 228 ++-
+ fs/ntfs/attrlist.h | 2 +
+ fs/ntfs/collate.c | 2 +-
+ fs/ntfs/compress.c | 2 +-
+ fs/ntfs/file.c | 3 +-
+ fs/ntfs/inode.c | 98 +-
+ fs/ntfs/mft.c | 455 ++++-
+ fs/ntfs/mft.h | 2 +-
+ fs/ntfs/namei.c | 2 +-
+ fs/ntfs/reparse.c | 2 +-
+ fs/ntfs/super.c | 28 +-
+ fs/ntfs/volume.h | 12 +-
+ fs/ntfs3/attrib.c | 10 +-
+ fs/ntfs3/frecord.c | 5 +
+ fs/ntfs3/super.c | 2 +-
+ fs/ntfs3/xattr.c | 6 +-
+ fs/ocfs2/buffer_head_io.c | 12 +-
+ fs/ocfs2/journal.c | 25 +-
+ fs/ocfs2/quota_local.c | 4 +
+ fs/omfs/inode.c | 4 +-
+ fs/open.c | 59 +-
+ fs/orangefs/inode.c | 21 +-
+ fs/orangefs/orangefs-debugfs.c | 10 +-
+ fs/orangefs/super.c | 18 +
+ fs/pidfs.c | 27 +-
+ fs/proc/base.c | 43 +-
+ fs/smb/client/connect.c | 9 +
+ fs/smb/client/dir.c | 3 +
+ fs/smb/client/file.c | 4 +-
+ fs/smb/client/reparse.c | 58 +-
+ fs/smb/client/reparse.h | 7 +-
+ fs/smb/client/sess.c | 104 +-
+ fs/smb/client/transport.c | 13 +-
+ fs/smb/server/Kconfig | 2 +
+ fs/smb/server/Makefile | 1 +
+ fs/smb/server/connection.c | 74 +-
+ fs/smb/server/connection.h | 6 +
+ fs/smb/server/ksmbd_work.c | 3 -
+ fs/smb/server/ksmbd_work.h | 5 +-
+ fs/smb/server/mgmt/user_session.c | 128 +-
+ fs/smb/server/mgmt/user_session.h | 8 +-
+ fs/smb/server/proc.c | 2 +
+ fs/smb/server/server.c | 2 +-
+ fs/smb/server/smb2pdu.c | 684 +++----
+ fs/smb/server/smb2pdu.h | 3 +-
+ fs/smb/server/smbacl.c | 7 +-
+ fs/smb/server/stats.h | 1 +
+ fs/smb/server/tests/Kconfig | 15 +
+ fs/smb/server/tests/Makefile | 4 +
+ fs/smb/server/tests/smbacl_kunit.c | 301 +++
+ fs/smb/server/transport_tcp.c | 1 +
+ fs/smb/server/vfs.c | 12 +-
+ fs/smb/server/vfs.h | 5 +
+ fs/smb/server/vfs_cache.c | 48 -
+ fs/smb/server/vfs_cache.h | 6 -
+ fs/splice.c | 58 +-
+ fs/tests/.kunitconfig | 2 +
+ fs/tests/fdtable_kunit.c | 72 +
+ fs/udf/inode.c | 52 +-
+ fs/udf/misc.c | 15 +-
+ fs/udf/super.c | 5 +-
+ fs/ufs/dir.c | 2 +-
+ fs/vboxsf/dir.c | 3 +
+ fs/xfs/xfs_ioctl.c | 381 ++--
+ fs/xfs/xfs_ioctl.h | 4 +-
+ fs/xfs/xfs_ioctl32.c | 188 +-
+ fs/xfs/xfs_rtalloc.h | 49 +-
+ include/linux/binfmts.h | 3 +-
+ include/linux/buffer_head.h | 86 +-
+ include/linux/coredump.h | 41 +-
+ include/linux/dax.h | 12 -
+ include/linux/f2fs_fs.h | 137 +-
+ include/linux/fcntl.h | 6 +
+ include/linux/fdtable.h | 2 +-
+ include/linux/fs.h | 2 +-
+ include/linux/fscache-cache.h | 2 +-
+ include/linux/fscache.h | 36 +-
+ include/linux/lsm_hook_defs.h | 1 +
+ include/linux/netfs.h | 80 +-
+ include/linux/nfs.h | 55 +-
+ include/linux/nfs3.h | 8 +
+ include/linux/nfs4.h | 6 +
+ include/linux/nfs_fh.h | 63 +
+ include/linux/nfs_ssc.h | 69 +-
+ include/linux/nfsd_ssc.h | 38 +
+ include/linux/nfslocalio.h | 11 +-
+ include/linux/pid.h | 53 +
+ include/linux/pid_types.h | 8 +
+ include/linux/pidfs.h | 5 +
+ include/linux/sched.h | 2 +-
+ include/linux/sched/signal.h | 45 +-
+ include/linux/security.h | 7 +
+ include/linux/splice.h | 4 +-
+ include/linux/user_namespace.h | 11 +-
+ include/net/scm.h | 7 +-
+ include/net/sock.h | 14 +-
+ include/trace/events/cachefiles.h | 30 +-
+ include/trace/events/fscache.h | 10 +-
+ include/trace/events/landlock.h | 2 +-
+ include/trace/events/netfs.h | 134 +-
+ include/trace/misc/nfs.h | 11 +
+ include/uapi/asm-generic/socket.h | 4 +
+ include/uapi/linux/btrfs_tree.h | 25 +-
+ include/uapi/linux/coredump.h | 149 +-
+ include/uapi/linux/fs.h | 2 +-
+ include/uapi/linux/fuse.h | 12 +-
+ init/Kconfig | 11 +
+ kernel/Makefile | 1 +
+ kernel/pid_namespace.c | 3 +-
+ kernel/tests/.kunitconfig | 4 +
+ kernel/tests/user_ns_map_kunit.c | 98 +
+ kernel/user_namespace.c | 32 +-
+ kernel/utsname.c | 1 -
+ mm/shmem_quota.c | 5 +
+ net/bluetooth/af_bluetooth.c | 6 +-
+ net/bluetooth/hci_sock.c | 8 +-
+ net/bluetooth/l2cap_sock.c | 2 +-
+ net/core/scm.c | 36 +-
+ net/core/sock.c | 120 +-
+ net/sunrpc/svcauth_unix.c | 9 +
+ net/sunrpc/svcsock.c | 489 +++--
+ net/sunrpc/xprtsock.c | 66 +-
+ net/unix/af_unix.c | 67 +-
+ net/unix/af_unix.h | 3 +-
+ security/security.c | 25 +
+ security/selinux/hooks.c | 31 +
+ tools/include/uapi/linux/coredump.h | 149 +-
+ tools/lib/python/kdoc/xforms_lists.py | 1 +
+ tools/testing/selftests/Makefile | 1 +
+ .../selftests/clone3/clone3_clear_sighand.c | 6 +-
+ tools/testing/selftests/coredump/Makefile | 7 +-
+ .../selftests/coredump/coredump_notify_signal.h | 29 +
+ .../coredump/coredump_notify_signal_helper.c | 46 +
+ .../coredump/coredump_notify_signal_test.c | 245 +++
+ .../coredump/coredump_socket_protocol_test.c | 1983 +++++++++++++++-----
+ .../selftests/coredump/coredump_socket_test.c | 175 ++
+ tools/testing/selftests/coredump/coredump_test.h | 32 +-
+ .../selftests/coredump/coredump_test_helpers.c | 1788 +++++++++++++++++-
+ .../selftests/coredump/coredump_test_helpers.h | 81 +
+ tools/testing/selftests/exec/Makefile | 4 +
+ tools/testing/selftests/exec/binfmt_misc_delim.c | 127 ++
+ tools/testing/selftests/filesystems/.gitignore | 2 +-
+ tools/testing/selftests/filesystems/Makefile | 2 +-
+ tools/testing/selftests/filesystems/config | 8 +
+ .../selftests/filesystems/file_stressor/.gitignore | 2 +
+ .../selftests/filesystems/file_stressor/Makefile | 6 +
+ .../{ => file_stressor}/file_stressor.c | 0
+ .../selftests/filesystems/file_stressor/settings | 3 +
+ .../selftests/filesystems/fscontext_ns/.gitignore | 2 +
+ .../testing/selftests/filesystems/fuse/.gitignore | 1 +
+ tools/testing/selftests/filesystems/fuse/Makefile | 2 +-
+ tools/testing/selftests/filesystems/kernfs_test.c | 1003 +++++++++-
+ .../selftests/filesystems/open_o_creat_o_dir.c | 201 ++
+ .../filesystems/statmount/statmount_test.c | 2 +-
+ tools/testing/selftests/filesystems/wrappers.h | 11 +
+ tools/testing/selftests/net/af_unix/Makefile | 2 +
+ tools/testing/selftests/net/af_unix/scm_pidfd.c | 366 ++++
+ tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +-
+ 440 files changed, 15464 insertions(+), 9761 deletions(-)
+ delete mode 100644 Documentation/filesystems/bfs.rst
+ create mode 100644 Documentation/filesystems/exfat.rst
+ delete mode 100644 arch/powerpc/platforms/cell/spufs/coredump.c
+ delete mode 100644 fs/bfs/Kconfig
+ delete mode 100644 fs/bfs/Makefile
+ delete mode 100644 fs/bfs/bfs.h
+ delete mode 100644 fs/bfs/dir.c
+ delete mode 100644 fs/bfs/file.c
+ delete mode 100644 fs/bfs/inode.c
+ create mode 100644 fs/nfsd/nfs4ctl.h
+ create mode 100644 fs/nfsd/nfserr.h
+ create mode 100644 fs/smb/server/tests/Kconfig
+ create mode 100644 fs/smb/server/tests/Makefile
+ create mode 100644 fs/smb/server/tests/smbacl_kunit.c
+ create mode 100644 fs/tests/.kunitconfig
+ create mode 100644 fs/tests/fdtable_kunit.c
+ create mode 100644 include/linux/nfs_fh.h
+ create mode 100644 include/linux/nfsd_ssc.h
+ create mode 100644 kernel/tests/.kunitconfig
+ create mode 100644 kernel/tests/user_ns_map_kunit.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal.h
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_helper.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_notify_signal_test.c
+ create mode 100644 tools/testing/selftests/coredump/coredump_test_helpers.h
+ create mode 100644 tools/testing/selftests/exec/binfmt_misc_delim.c
+ create mode 100644 tools/testing/selftests/filesystems/config
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/Makefile
+ rename tools/testing/selftests/filesystems/{ => file_stressor}/file_stressor.c (100%)
+ create mode 100644 tools/testing/selftests/filesystems/file_stressor/settings
+ create mode 100644 tools/testing/selftests/filesystems/fscontext_ns/.gitignore
+ create mode 100644 tools/testing/selftests/filesystems/open_o_creat_o_dir.c
+Merging printk/for-next (45b895e5f6ce6 Merge branch 'for-7.4-console-registration' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git printk/for-next
+Merge made by the 'ort' strategy.
+ kernel/printk/printk.c | 37 ++++++++++++++++++++++++++-----------
+ 1 file changed, 26 insertions(+), 11 deletions(-)
+Merging pci/next (08afa8a2e38e8 Merge branch 'pci/controller/xgene')
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git pci/next
+Auto-merging drivers/pci/endpoint/pci-ep-msi.c
+Merge made by the 'ort' strategy.
+ Documentation/driver-api/pci/p2pdma.rst | 6 +-
+ .../pci/controller/cadence/pcie-cadence-debugfs.c | 15 +-
+ drivers/pci/controller/cadence/pcie-cadence-plat.c | 6 +-
+ drivers/pci/controller/cadence/pcie-cadence.c | 16 +-
+ drivers/pci/controller/cadence/pcie-cadence.h | 2 -
+ drivers/pci/controller/dwc/pci-dra7xx.c | 16 --
+ drivers/pci/controller/dwc/pci-imx6.c | 52 ++++++-
+ drivers/pci/controller/dwc/pci-keystone.c | 32 +---
+ drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +-
+ drivers/pci/controller/dwc/pcie-designware.h | 1 +
+ drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 +
+ drivers/pci/controller/dwc/pcie-histb.c | 1 +
+ drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
+ drivers/pci/controller/dwc/pcie-qcom.c | 81 +++++++++-
+ drivers/pci/controller/dwc/pcie-rcar-gen4.c | 68 ++++++++-
+ drivers/pci/controller/dwc/pcie-spacemit-k1.c | 3 +
+ drivers/pci/controller/dwc/pcie-tegra194.c | 1 +
+ drivers/pci/controller/pci-tegra.c | 1 +
+ drivers/pci/controller/pci-xgene.c | 11 +-
+ drivers/pci/controller/pcie-aspeed.c | 9 +-
+ drivers/pci/controller/pcie-mediatek-gen3.c | 15 +-
+ drivers/pci/controller/pcie-mediatek.c | 4 +-
+ drivers/pci/controller/pcie-rockchip-host.c | 1 +
+ drivers/pci/controller/plda/pcie-starfive.c | 1 +
+ drivers/pci/controller/vmd.c | 52 ++++++-
+ drivers/pci/endpoint/functions/pci-epf-vntb.c | 93 ++++++++++--
+ drivers/pci/endpoint/pci-ep-msi.c | 40 ++---
+ drivers/pci/p2pdma.c | 37 +++--
+ drivers/pci/pwrctrl/Kconfig | 1 +
+ drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 168 ++++++---------------
+ include/linux/pci-epf.h | 3 +-
+ 31 files changed, 469 insertions(+), 277 deletions(-)
+Merging pstore/for-next/pstore (24b8f8dcb9a13 pstore/ftrace: Factor KASLR offset in the core kernel instruction addresses)
+$ git merge -m Merge branch 'for-next/pstore' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git pstore/for-next/pstore
+Already up to date.
+Merging hid/for-next (044e1dab0692d Merge branch 'for-7.3/upstream-fixes' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git hid/for-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/hid/hid-asus.c
+Auto-merging drivers/hid/hid-steelseries-arctis.c
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 6 +
+ drivers/hid/Kconfig | 24 +-
+ drivers/hid/Makefile | 2 +-
+ drivers/hid/amd-sfh-hid/amd_sfh_common.h | 6 +
+ drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 20 +
+ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_desc.c | 13 +-
+ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 37 +-
+ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.h | 7 +
+ drivers/hid/bpf/hid_bpf_dispatch.c | 12 +-
+ .../hid/bpf/progs/Huion__Inspiroy-Frego-M.bpf.c | 11 +-
+ drivers/hid/hid-alps.c | 25 +-
+ drivers/hid/hid-appletb-kbd.c | 95 ++-
+ drivers/hid/hid-asus.c | 14 +-
+ drivers/hid/hid-corsair-void.c | 15 +-
+ drivers/hid/hid-elecom.c | 6 +-
+ drivers/hid/hid-google-hammer.c | 2 +-
+ drivers/hid/hid-ids.h | 20 +-
+ drivers/hid/hid-kysona.c | 292 --------
+ drivers/hid/hid-lenovo.c | 14 +
+ drivers/hid/hid-logitech-hidpp.c | 2 +
+ drivers/hid/hid-multitouch.c | 29 +-
+ drivers/hid/hid-nintendo.c | 14 +-
+ drivers/hid/hid-oxp.c | 6 +-
+ drivers/hid/hid-pulsar.c | 765 +++++++++++++++++++++
+ drivers/hid/hid-quirks.c | 7 +-
+ drivers/hid/hid-roccat.c | 8 +-
+ drivers/hid/hid-steelseries-arctis.c | 44 ++
+ drivers/hid/hid-winwing.c | 10 +-
+ drivers/hid/i2c-hid/i2c-hid-acpi.c | 8 +-
+ drivers/hid/i2c-hid/i2c-hid-core.c | 15 +-
+ drivers/hid/surface-hid/surface_kbd.c | 4 +-
+ drivers/hid/usbhid/hiddev.c | 45 +-
+ drivers/hid/wacom.h | 2 +-
+ drivers/hid/wacom_sys.c | 201 ++++--
+ drivers/hid/wacom_wac.c | 72 +-
+ drivers/hid/wacom_wac.h | 6 +-
+ include/linux/hiddev.h | 2 +
+ scripts/coccinelle/hid/ff_race.cocci | 11 +-
+ tools/testing/selftests/hid/hid_bpf.c | 91 ++-
+ tools/testing/selftests/hid/hid_common.h | 25 +-
+ tools/testing/selftests/hid/progs/hid.c | 2 +-
+ 41 files changed, 1458 insertions(+), 532 deletions(-)
+ delete mode 100644 drivers/hid/hid-kysona.c
+ create mode 100644 drivers/hid/hid-pulsar.c
+Merging i2c/i2c/for-next (8cd9520d35a6c Linux 7.1)
+$ git merge -m Merge branch 'i2c/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/i2c/for-next
+Already up to date.
+$ git am -3 ../patches/0001-i2c-Fix-up-the-rest-of-the-merge.patch
+Applying: i2c: Fix up the rest of the merge
+Using index info to reconstruct a base tree...
+M drivers/i2c/i2c-core-base.c
+Falling back to patching base and 3-way merge...
+Auto-merging drivers/i2c/i2c-core-base.c
+No changes -- Patch already applied.
+Merging i2c-andi/i2c/i2c-next (59adeac7050cd Merge branch 'i2c/i2c' into i2c/i2c-next)
+$ git merge -m Merge branch 'i2c/i2c-next' of https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c-andi/i2c/i2c-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/i2c/renesas,rcar-i2c.yaml | 4 +-
+ .../bindings/i2c/snps,designware-i2c.yaml | 15 +++++
+ .../bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 2 +-
+ drivers/i2c/Kconfig | 13 ++++
+ drivers/i2c/busses/i2c-bcm2835.c | 2 +-
+ drivers/i2c/busses/i2c-qcom-geni.c | 72 +++++++++++++++-------
+ drivers/i2c/i2c-core-acpi.c | 1 +
+ drivers/i2c/i2c-core-base.c | 43 +++++++++++++
+ drivers/i2c/i2c-dev.c | 3 +
+ drivers/media/i2c/isl7998x.c | 3 +-
+ include/linux/i2c.h | 17 ++++-
+ 11 files changed, 145 insertions(+), 30 deletions(-)
+Merging i2c-rust/rust-i2c-next (61ddec70c9bcc i2c: rust: mark I2cAdapter methods as inline)
+$ git merge -m Merge branch 'rust-i2c-next' of https://github.com/ikrtn/rust-for-linux i2c-rust/rust-i2c-next
+Auto-merging drivers/i2c/busses/i2c-imx-lpi2c.c
+CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-imx-lpi2c.c
+Auto-merging drivers/i2c/busses/i2c-imx.c
+Auto-merging drivers/i2c/busses/i2c-qcom-geni.c
+Auto-merging rust/kernel/i2c.rs
+Resolved 'drivers/i2c/busses/i2c-imx-lpi2c.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master d60c1a52836bc] Merge branch 'rust-i2c-next' of https://github.com/ikrtn/rust-for-linux
+$ git diff -M --stat --summary HEAD^..
+ drivers/i2c/busses/i2c-imx-lpi2c.c | 18 ++++--------------
+ 1 file changed, 4 insertions(+), 14 deletions(-)
+Merging i3c/i3c/next (cab40cfc9e116 i3c: dw: reduce do_daa time if there's no client)
+$ git merge -m Merge branch 'i3c/next' of https://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git i3c/i3c/next
+Already up to date.
+Merging dmi/dmi-for-next (1afafbaf749d8 firmware/dmi: Include product_family info to modalias)
+$ git merge -m Merge branch 'dmi-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git dmi/dmi-for-next
+Already up to date.
+Merging hwmon-staging/hwmon-next (46fde107b4e88 hwmon: (pmbus/max34440): Add support for ADPM12300)
+$ git merge -m Merge branch 'hwmon-next' of https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-staging/hwmon-next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ Documentation/ABI/testing/sysfs-class-hwmon | 36 +
+ .../bindings/hwmon/axiado,ax3000-tsadc.yaml | 45 +
+ .../devicetree/bindings/hwmon/national,lm63.yaml | 55 ++
+ .../devicetree/bindings/hwmon/national,lm90.yaml | 28 +-
+ .../bindings/hwmon/pmbus/adi,max20826.yaml | 102 ++
+ .../bindings/hwmon/pmbus/ti,tps25990.yaml | 8 +-
+ .../devicetree/bindings/hwmon/ti,tmp102.yaml | 16 +-
+ .../devicetree/bindings/hwmon/ti,tmp401.yaml | 3 +
+ .../devicetree/bindings/trivial-devices.yaml | 14 +-
+ .../devicetree/bindings/vendor-prefixes.yaml | 2 +
+ Documentation/hwmon/arctic_fan_controller.rst | 26 +-
+ Documentation/hwmon/asus_ec_sensors.rst | 2 +
+ Documentation/hwmon/asus_rog_ryujin.rst | 1 +
+ Documentation/hwmon/axiado-tsadc.rst | 41 +
+ Documentation/hwmon/honor-fmi.rst | 32 +
+ Documentation/hwmon/index.rst | 4 +
+ Documentation/hwmon/it87.rst | 8 +
+ Documentation/hwmon/lm63.rst | 22 +
+ Documentation/hwmon/max20826.rst | 139 +++
+ Documentation/hwmon/max34440.rst | 28 +-
+ Documentation/hwmon/minisforum-um780xtx.rst | 68 ++
+ Documentation/hwmon/nct6775.rst | 32 +
+ Documentation/hwmon/sht4x.rst | 17 +-
+ Documentation/hwmon/socfpga-hwmon.rst | 52 +
+ Documentation/hwmon/sysfs-interface.rst | 14 +-
+ Documentation/hwmon/tps25990.rst | 15 +-
+ Documentation/hwmon/tps53679.rst | 24 +-
+ Documentation/hwmon/yogafan.rst | 46 +-
+ MAINTAINERS | 35 +-
+ drivers/hwmon/Kconfig | 45 +-
+ drivers/hwmon/Makefile | 3 +
+ drivers/hwmon/abituguru.c | 4 +-
+ drivers/hwmon/adm1177.c | 2 +-
+ drivers/hwmon/adt7x10.c | 2 +-
+ drivers/hwmon/arctic_fan_controller.c | 22 +-
+ drivers/hwmon/asus-ec-sensors.c | 4 +
+ drivers/hwmon/asus_rog_ryujin.c | 3 +
+ drivers/hwmon/axiado-tsadc.c | 275 ++++++
+ drivers/hwmon/dell-smm-hwmon.c | 16 +
+ drivers/hwmon/emc2103.c | 2 +-
+ drivers/hwmon/hih6130.c | 4 +-
+ drivers/hwmon/honor-fmi.c | 178 ++++
+ drivers/hwmon/hwmon.c | 6 +
+ drivers/hwmon/it87.c | 308 +++++-
+ drivers/hwmon/k10temp.c | 2 +
+ drivers/hwmon/lm63.c | 426 ++++++--
+ drivers/hwmon/lm85.c | 2 +-
+ drivers/hwmon/lm90.c | 5 +
+ drivers/hwmon/minisforum-um780xtx.c | 501 ++++++++++
+ drivers/hwmon/nct6775-core.c | 116 +++
+ drivers/hwmon/nct6775-platform.c | 33 +-
+ drivers/hwmon/nct6775.h | 4 +-
+ drivers/hwmon/pmbus/Kconfig | 28 +-
+ drivers/hwmon/pmbus/Makefile | 1 +
+ drivers/hwmon/pmbus/ltc4286.c | 96 +-
+ drivers/hwmon/pmbus/max20826.c | 1044 ++++++++++++++++++++
+ drivers/hwmon/pmbus/max34440.c | 2 +
+ drivers/hwmon/pmbus/mp2888.c | 4 +-
+ drivers/hwmon/pmbus/pmbus.h | 7 +
+ drivers/hwmon/pmbus/pmbus_core.c | 29 +-
+ drivers/hwmon/pmbus/tps25990.c | 249 +++--
+ drivers/hwmon/pmbus/tps53679.c | 9 +-
+ drivers/hwmon/sht4x.c | 62 +-
+ drivers/hwmon/socfpga-hwmon.c | 22 +
+ drivers/hwmon/spd5118.c | 67 +-
+ drivers/hwmon/yogafan.c | 48 +
+ include/linux/hwmon.h | 12 +
+ 67 files changed, 4205 insertions(+), 353 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml
+ create mode 100644 Documentation/devicetree/bindings/hwmon/national,lm63.yaml
+ create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,max20826.yaml
+ create mode 100644 Documentation/hwmon/axiado-tsadc.rst
+ create mode 100644 Documentation/hwmon/honor-fmi.rst
+ create mode 100644 Documentation/hwmon/max20826.rst
+ create mode 100644 Documentation/hwmon/minisforum-um780xtx.rst
+ create mode 100644 drivers/hwmon/axiado-tsadc.c
+ create mode 100644 drivers/hwmon/honor-fmi.c
+ create mode 100644 drivers/hwmon/minisforum-um780xtx.c
+ create mode 100644 drivers/hwmon/pmbus/max20826.c
+Merging jc_docs/docs-next (322695d64f868 docs: ioctl: fix stale NVMe registry entry and note N conflict)
+$ git merge -m Merge branch 'docs-next' of git://git.lwn.net/linux.git jc_docs/docs-next
+Auto-merging Documentation/admin-guide/kernel-parameters.txt
+Auto-merging Documentation/admin-guide/sysctl/kernel.rst
+Auto-merging Documentation/filesystems/porting.rst
+Auto-merging Documentation/filesystems/proc.rst
+Auto-merging tools/lib/python/kdoc/xforms_lists.py
+Merge made by the 'ort' strategy.
+ .../ABI/stable/sysfs-driver-firmware-zynqmp | 70 +-
+ Documentation/admin-guide/LSM/LoadPin.rst | 10 +-
+ Documentation/admin-guide/RAS/main.rst | 12 +-
+ Documentation/admin-guide/cpu-isolation.rst | 4 +-
+ Documentation/admin-guide/kernel-parameters.txt | 54 -
+ Documentation/admin-guide/parport.rst | 2 +-
+ Documentation/admin-guide/sysctl/kernel.rst | 19 +-
+ Documentation/admin-guide/sysctl/vm.rst | 2 +-
+ .../verify-bugs-and-bisect-regressions.rst | 26 +-
+ Documentation/arch/powerpc/vas-api.rst | 4 +-
+ Documentation/core-api/cpu_hotplug.rst | 4 +-
+ Documentation/core-api/debug-objects.rst | 2 +-
+ Documentation/core-api/dma-attributes.rst | 2 +-
+ Documentation/core-api/dma-isa-lpc.rst | 11 +-
+ Documentation/core-api/housekeeping.rst | 2 +-
+ Documentation/core-api/irq/irq-affinity.rst | 2 +-
+ Documentation/core-api/irq/irqflags-tracing.rst | 8 +-
+ Documentation/core-api/maple_tree.rst | 9 +-
+ Documentation/core-api/real-time/differences.rst | 10 +-
+ Documentation/core-api/swiotlb.rst | 2 +-
+ Documentation/core-api/this_cpu_ops.rst | 6 +-
+ Documentation/core-api/xarray.rst | 4 +-
+ Documentation/doc-guide/kernel-doc.rst | 7 +-
+ Documentation/doc-guide/parse-headers.rst | 15 +-
+ Documentation/driver-api/reset.rst | 2 +-
+ Documentation/driver-api/serial/serial-rs485.rst | 5 +-
+ .../locking/cmpxchg-local/arch-support.txt | 2 +-
+ Documentation/filesystems/fuse/fuse.rst | 8 +-
+ Documentation/filesystems/locking.rst | 2 +-
+ Documentation/filesystems/porting.rst | 2 +-
+ Documentation/filesystems/proc.rst | 10 +-
+ Documentation/input/devices/yealink.rst | 7 +-
+ Documentation/input/notifier.rst | 2 +-
+ Documentation/livepatch/api.rst | 5 +-
+ Documentation/misc-devices/spear-pcie-gadget.rst | 10 +-
+ Documentation/process/1.Intro.rst | 2 +-
+ Documentation/process/2.Process.rst | 20 +-
+ Documentation/process/3.Early-stage.rst | 2 +-
+ Documentation/process/5.Posting.rst | 12 +-
+ Documentation/process/6.Followthrough.rst | 2 +-
+ Documentation/process/7.AdvancedTopics.rst | 36 +-
+ Documentation/process/backporting.rst | 18 +-
+ .../process/embargoed-hardware-issues.rst | 2 +-
+ Documentation/process/handling-regressions.rst | 2 +-
+ Documentation/process/howto.rst | 2 +-
+ Documentation/process/maintainer-pgp-guide.rst | 38 +-
+ Documentation/process/submitting-patches.rst | 2 +-
+ Documentation/timers/no_hz.rst | 4 +-
+ .../translations/pt_BR/process/2.Process.rst | 14 +-
+ .../translations/pt_BR/process/3.Early-stage.rst | 10 +-
+ .../translations/pt_BR/process/4.Coding.rst | 6 +-
+ .../translations/pt_BR/process/5.Posting.rst | 12 +-
+ .../translations/pt_BR/process/6.Followthrough.rst | 14 +-
+ .../translations/pt_BR/process/8.Conclusion.rst | 3 +-
+ .../translations/pt_BR/process/adding-syscalls.rst | 54 +-
+ .../pt_BR/process/applying-patches.rst | 4 +-
+ .../translations/pt_BR/process/backporting.rst | 4 +-
+ .../pt_BR/process/coding-assistants.rst | 60 +
+ .../translations/pt_BR/process/coding-style.rst | 1318 ++++++++++++++++++++
+ .../pt_BR/process/embargoed-hardware-issues.rst | 362 ++++++
+ Documentation/translations/pt_BR/process/index.rst | 7 +
+ .../pt_BR/process/kernel-enforcement-statement.rst | 163 +++
+ .../pt_BR/process/maintainer-kvm-x86.rst | 6 +-
+ .../translations/pt_BR/process/maintainer-tip.rst | 847 +++++++++++++
+ .../pt_BR/process/submitting-patches.rst | 961 ++++++++++++++
+ .../pt_BR/process/volatile-considered-harmful.rst | 130 ++
+ Documentation/userspace-api/dma-buf-heaps.rst | 2 +-
+ Documentation/userspace-api/futex2.rst | 4 +-
+ Documentation/userspace-api/ioctl/ioctl-number.rst | 7 +-
+ Documentation/userspace-api/iommufd.rst | 2 +-
+ Documentation/userspace-api/vduse.rst | 33 +-
+ Documentation/virt/coco/sev-guest.rst | 2 +-
+ include/uapi/linux/gpio.h | 2 +-
+ security/landlock/syscalls.c | 2 +-
+ tools/lib/python/kdoc/c_lex.py | 2 +-
+ tools/lib/python/kdoc/xforms_lists.py | 2 +-
+ 76 files changed, 4185 insertions(+), 332 deletions(-)
+ create mode 100644 Documentation/translations/pt_BR/process/coding-assistants.rst
+ create mode 100644 Documentation/translations/pt_BR/process/coding-style.rst
+ create mode 100644 Documentation/translations/pt_BR/process/embargoed-hardware-issues.rst
+ create mode 100644 Documentation/translations/pt_BR/process/kernel-enforcement-statement.rst
+ create mode 100644 Documentation/translations/pt_BR/process/maintainer-tip.rst
+ create mode 100644 Documentation/translations/pt_BR/process/submitting-patches.rst
+ create mode 100644 Documentation/translations/pt_BR/process/volatile-considered-harmful.rst
+Merging v4l-dvb/next (b38d06ad1e13c media: ipu6: Fix up missing IWYU issue)
+$ git merge -m Merge branch 'next' of git://linuxtv.org/media-ci/media-pending.git v4l-dvb/next
+Auto-merging MAINTAINERS
+Auto-merging drivers/media/pci/intel/ipu-bridge.c
+Auto-merging drivers/media/v4l2-core/v4l2-ctrls-core.c
+Merge made by the 'ort' strategy.
+ .../bindings/clock/nxp,imx95-blk-ctl.yaml | 71 +
+ .../bindings/media/fsl,imx95-csi-formatter.yaml | 88 +
+ .../bindings/media/i2c/himax,hm1246.yaml | 120 +
+ .../devicetree/bindings/media/i2c/hynix,hi846.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/ite,it6625.yaml | 175 ++
+ .../bindings/media/i2c/ovti,os02g10.yaml | 94 +
+ .../bindings/media/i2c/ovti,ov08d10.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/ovti,ov4689.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/ovti,ov5675.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/ovti,ov5693.yaml | 5 +-
+ .../bindings/media/i2c/ovti,ov64a40.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/sony,imx111.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/sony,imx355.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/sony,imx415.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/st,vd55g1.yaml | 3 +-
+ .../devicetree/bindings/media/i2c/st,vd56g3.yaml | 3 +-
+ .../bindings/media/i2c/thine,thp7312.yaml | 3 +-
+ .../bindings/media/i2c/toshiba,tc358743.txt | 48 -
+ .../bindings/media/i2c/toshiba,tc358743.yaml | 93 +
+ .../bindings/media/nxp,imx8mq-mipi-csi2.yaml | 4 +-
+ .../devicetree/bindings/media/snps,dw-hdmi-rx.yaml | 13 +-
+ .../bindings/media/video-interface-devices.yaml | 17 +-
+ .../userspace-api/media/drivers/dcmipp.rst | 14 +
+ .../userspace-api/media/drivers/index.rst | 1 +
+ MAINTAINERS | 51 +-
+ drivers/media/cec/platform/meson/ao-cec-g12a.c | 2 +-
+ drivers/media/common/cypress_firmware.c | 2 +
+ drivers/media/common/saa7146/saa7146_core.c | 3 +-
+ drivers/media/dvb-frontends/drxd_map_firm.h | 4 +-
+ drivers/media/dvb-frontends/stv0900_core.c | 2 +
+ drivers/media/dvb-frontends/stv090x.c | 2 +
+ drivers/media/i2c/Kconfig | 39 +
+ drivers/media/i2c/Makefile | 3 +
+ drivers/media/i2c/adv7175.c | 2 +-
+ drivers/media/i2c/adv7604.c | 3 +-
+ drivers/media/i2c/ccs/ccs-data.h | 4 +-
+ drivers/media/i2c/cvs/core.c | 7 +-
+ drivers/media/i2c/cvs/v4l2.c | 13 +-
+ drivers/media/i2c/cx25840/cx25840-core.c | 38 +-
+ drivers/media/i2c/hi847.c | 2 +-
+ drivers/media/i2c/hm1246.c | 1285 +++++++++++
+ drivers/media/i2c/imx471.c | 2 +-
+ drivers/media/i2c/it6625.c | 2390 ++++++++++++++++++++
+ drivers/media/i2c/os02g10.c | 932 ++++++++
+ drivers/media/i2c/ov5693.c | 25 +
+ drivers/media/i2c/ov772x.c | 2 +-
+ drivers/media/i2c/ov8856.c | 32 +-
+ drivers/media/i2c/tc358743.c | 3 +-
+ drivers/media/i2c/wm8739.c | 2 +-
+ drivers/media/pci/bt8xx/bttv-driver.c | 8 +-
+ drivers/media/pci/cx18/cx23418.h | 2 +-
+ drivers/media/pci/cx23885/cx23885-core.c | 4 +
+ drivers/media/pci/cx88/cx88-input.c | 22 +-
+ drivers/media/pci/cx88/cx88-video.c | 8 +-
+ drivers/media/pci/hws/hws.h | 4 +-
+ drivers/media/pci/hws/hws_pci.c | 6 +-
+ drivers/media/pci/hws/hws_reg.h | 10 +-
+ drivers/media/pci/hws/hws_v4l2_ioctl.c | 5 +-
+ drivers/media/pci/hws/hws_video.c | 6 +-
+ drivers/media/pci/intel/ipu-bridge.c | 131 +-
+ drivers/media/pci/intel/ipu6/Kconfig | 9 +
+ drivers/media/pci/intel/ipu6/Makefile | 10 +-
+ drivers/media/pci/intel/ipu6/ipu6-bus.h | 6 +-
+ drivers/media/pci/intel/ipu6/ipu6-buttress.c | 588 +++--
+ drivers/media/pci/intel/ipu6/ipu6-buttress.h | 50 +-
+ drivers/media/pci/intel/ipu6/ipu6-cpd.c | 201 +-
+ drivers/media/pci/intel/ipu6/ipu6-cpd.h | 43 +
+ drivers/media/pci/intel/ipu6/ipu6-dma.c | 24 +-
+ drivers/media/pci/intel/ipu6/ipu6-dma.h | 2 +
+ drivers/media/pci/intel/ipu6/ipu6-fw-isys.c | 589 ++++-
+ drivers/media/pci/intel/ipu6/ipu6-fw-isys.h | 48 +-
+ drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c | 211 +-
+ drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h | 5 +
+ drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 87 +-
+ drivers/media/pci/intel/ipu6/ipu6-isys-queue.h | 6 +-
+ drivers/media/pci/intel/ipu6/ipu6-isys-video.c | 160 +-
+ drivers/media/pci/intel/ipu6/ipu6-isys-video.h | 1 +
+ drivers/media/pci/intel/ipu6/ipu6-isys.c | 399 +---
+ drivers/media/pci/intel/ipu6/ipu6-isys.h | 55 +-
+ drivers/media/pci/intel/ipu6/ipu6-mmu-hw.c | 296 +++
+ drivers/media/pci/intel/ipu6/ipu6-mmu.c | 133 +-
+ drivers/media/pci/intel/ipu6/ipu6-mmu.h | 158 +-
+ .../pci/intel/ipu6/ipu6-platform-buttress-regs.h | 111 +-
+ drivers/media/pci/intel/ipu6/ipu6.c | 574 +++--
+ drivers/media/pci/intel/ipu6/ipu6.h | 196 +-
+ drivers/media/pci/intel/ipu6/ipu7-boot.c | 405 ++++
+ drivers/media/pci/intel/ipu6/ipu7-boot.h | 46 +
+ drivers/media/pci/intel/ipu6/ipu7-fw-com.c | 74 +
+ drivers/media/pci/intel/ipu6/ipu7-fw-com.h | 53 +
+ drivers/media/pci/intel/ipu6/ipu7-fw-isys.c | 788 +++++++
+ drivers/media/pci/intel/ipu6/ipu7-fw-isys.h | 296 +++
+ drivers/media/pci/intel/ipu6/ipu7-isys-csi-phy.c | 1072 +++++++++
+ drivers/media/pci/intel/ipu6/ipu7-isys-csi-phy.h | 16 +
+ drivers/media/pci/intel/ipu6/ipu7-isys-csi2-regs.h | 1189 ++++++++++
+ drivers/media/pci/intel/ipu6/ipu7-mmu-hw.c | 858 +++++++
+ drivers/media/pci/intel/ipu6/ipu7-mmu-hw.h | 254 +++
+ drivers/media/pci/intel/ipu6/ipu7-platform-regs.h | 32 +
+ drivers/media/pci/intel/ivsc/mei_csi.c | 7 +-
+ drivers/media/pci/saa7134/saa7134-core.c | 8 +-
+ drivers/media/pci/saa7134/saa7134-input.c | 7 +-
+ drivers/media/pci/saa7146/mxb.c | 4 +-
+ drivers/media/pci/saa7164/saa7164-core.c | 32 +-
+ drivers/media/pci/saa7164/saa7164.h | 1 -
+ drivers/media/pci/tw68/tw68-core.c | 8 +-
+ drivers/media/platform/aspeed/aspeed-video.c | 12 +-
+ drivers/media/platform/cadence/cdns-csi2rx.c | 4 +
+ drivers/media/platform/m2m-deinterlace.c | 2 +-
+ drivers/media/platform/marvell/Kconfig | 1 +
+ drivers/media/platform/marvell/cafe-driver.c | 2 +-
+ drivers/media/platform/marvell/mcam-core.c | 20 +-
+ drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h | 2 +-
+ .../mediatek/vcodec/decoder/vdec_ipi_msg.h | 4 +-
+ .../media/platform/microchip/microchip-csi2dc.c | 1 +
+ .../media/platform/microchip/microchip-isc-base.c | 82 +-
+ .../media/platform/microchip/microchip-isc-clk.c | 7 +-
+ .../media/platform/microchip/microchip-isc-regs.h | 16 +-
+ drivers/media/platform/microchip/microchip-isc.h | 5 +-
+ .../platform/microchip/microchip-sama5d2-isc.c | 48 +-
+ .../platform/microchip/microchip-sama7g5-isc.c | 48 +-
+ drivers/media/platform/nuvoton/npcm-video.c | 18 +-
+ drivers/media/platform/nxp/Kconfig | 16 +
+ drivers/media/platform/nxp/Makefile | 1 +
+ drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 23 +-
+ drivers/media/platform/nxp/imx95-csi-formatter.c | 758 +++++++
+ drivers/media/platform/renesas/rcar_drif.c | 2 +-
+ .../media/platform/renesas/rzg2l-cru/rzg2l-core.c | 3 +-
+ .../media/platform/renesas/rzg2l-cru/rzg2l-cru.h | 2 +-
+ .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 13 +-
+ drivers/media/platform/renesas/vsp1/vsp1_dl.c | 2 +-
+ drivers/media/platform/st/stm32/stm32-csi.c | 5 +-
+ .../media/platform/st/stm32/stm32-dcmipp/Makefile | 3 +-
+ .../st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 27 +-
+ .../{dcmipp-bytecap.c => dcmipp-capture.c} | 600 +++--
+ .../platform/st/stm32/stm32-dcmipp/dcmipp-common.h | 99 +-
+ .../platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 124 +-
+ .../platform/st/stm32/stm32-dcmipp/dcmipp-input.c | 126 +-
+ .../platform/st/stm32/stm32-dcmipp/dcmipp-isp.c | 491 ++++
+ .../st/stm32/stm32-dcmipp/dcmipp-pixelcommon.c | 180 ++
+ .../st/stm32/stm32-dcmipp/dcmipp-pixelcommon.h | 41 +
+ .../st/stm32/stm32-dcmipp/dcmipp-pixelproc.c | 940 ++++++++
+ .../media/platform/synopsys/hdmirx/snps_hdmirx.c | 335 ++-
+ .../media/platform/synopsys/hdmirx/snps_hdmirx.h | 8 +
+ drivers/media/platform/ti/Kconfig | 11 -
+ drivers/media/platform/ti/cal/cal.c | 10 +-
+ .../media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 24 +
+ drivers/media/radio/si4713/radio-usb-si4713.c | 4 +-
+ drivers/media/radio/si4713/si4713.c | 2 +-
+ drivers/media/rc/bpf-lirc.c | 18 +-
+ drivers/media/rc/imon.c | 9 +-
+ drivers/media/rc/ir-hix5hd2.c | 5 +-
+ drivers/media/rc/meson-ir-tx.c | 17 +-
+ drivers/media/rc/rc-ir-raw.c | 47 +-
+ drivers/media/rc/rc-main.c | 19 +-
+ drivers/media/rc/redrat3.c | 32 +-
+ drivers/media/rc/streamzap.c | 1 +
+ drivers/media/rc/sunxi-cir.c | 2 +-
+ drivers/media/test-drivers/vicodec/codec-fwht.h | 2 +-
+ drivers/media/test-drivers/vicodec/vicodec-core.c | 14 +-
+ drivers/media/test-drivers/vidtv/vidtv_bridge.c | 75 +-
+ drivers/media/test-drivers/vidtv/vidtv_demod.c | 9 -
+ drivers/media/test-drivers/vim2m.c | 33 +-
+ drivers/media/test-drivers/vimc/vimc-sensor.c | 8 +-
+ drivers/media/test-drivers/vivid/vivid-core.c | 1 +
+ drivers/media/test-drivers/vivid/vivid-vid-cap.c | 13 +
+ drivers/media/tuners/tda18250.c | 3 +-
+ drivers/media/usb/au0828/au0828-dvb.c | 20 +-
+ drivers/media/usb/cx231xx/cx231xx-audio.c | 15 +-
+ drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +-
+ drivers/media/usb/cx231xx/cx231xx.h | 2 +-
+ drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 4 +-
+ drivers/media/usb/dvb-usb/dib0700_core.c | 2 +-
+ drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 2 +
+ drivers/media/usb/em28xx/em28xx-video.c | 4 +
+ drivers/media/usb/go7007/go7007-usb.c | 6 +
+ drivers/media/usb/gspca/gspca.c | 3 +-
+ drivers/media/usb/gspca/ov519.c | 2 +-
+ drivers/media/usb/gspca/w996Xcf.c | 2 +-
+ drivers/media/usb/hackrf/hackrf.c | 7 +-
+ drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 12 +-
+ drivers/media/usb/usbtv/usbtv-core.c | 2 -
+ drivers/media/usb/usbtv/usbtv-video.c | 4 +
+ drivers/media/v4l2-core/v4l2-common.c | 20 +-
+ drivers/media/v4l2-core/v4l2-ctrls-core.c | 7 +
+ drivers/platform/x86/intel/int3472/discrete.c | 81 +-
+ drivers/platform/x86/intel/int3472/tps68470.c | 2 +-
+ .../pci/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h | 4 +-
+ drivers/staging/media/av7110/av7110.c | 2 +-
+ drivers/staging/media/av7110/av7110_ir.c | 2 -
+ drivers/staging/media/av7110/sp8870.c | 9 +-
+ drivers/staging/media/ipu3/ipu3-css.c | 1 -
+ drivers/staging/media/ipu7/TODO | 28 +-
+ drivers/staging/media/ipu7/ipu7.c | 7 +
+ drivers/staging/media/tegra-video/vi.c | 92 +-
+ .../dt-bindings/media/video-interface-devices.h | 13 +
+ include/linux/platform_data/x86/int3472.h | 2 +
+ include/media/ipu-bridge.h | 52 +-
+ include/media/ipu6-pci-table.h | 4 +
+ include/media/v4l2-common.h | 75 +-
+ include/uapi/linux/it6625.h | 25 +
+ include/uapi/linux/media/st/dcmipp_config.h | 16 +
+ include/uapi/linux/v4l2-controls.h | 21 +
+ 201 files changed, 17581 insertions(+), 2345 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/media/fsl,imx95-csi-formatter.yaml
+ create mode 100644 Documentation/devicetree/bindings/media/i2c/himax,hm1246.yaml
+ create mode 100644 Documentation/devicetree/bindings/media/i2c/ite,it6625.yaml
+ create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,os02g10.yaml
+ delete mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
+ create mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
+ create mode 100644 Documentation/userspace-api/media/drivers/dcmipp.rst
+ create mode 100644 drivers/media/i2c/hm1246.c
+ create mode 100644 drivers/media/i2c/it6625.c
+ create mode 100644 drivers/media/i2c/os02g10.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu6-mmu-hw.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-boot.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-boot.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-fw-com.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-fw-com.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-fw-isys.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-fw-isys.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-isys-csi-phy.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-isys-csi-phy.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-isys-csi2-regs.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-mmu-hw.c
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-mmu-hw.h
+ create mode 100644 drivers/media/pci/intel/ipu6/ipu7-platform-regs.h
+ create mode 100644 drivers/media/platform/nxp/imx95-csi-formatter.c
+ rename drivers/media/platform/st/stm32/stm32-dcmipp/{dcmipp-bytecap.c => dcmipp-capture.c} (53%)
+ create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c
+ create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelcommon.c
+ create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelcommon.h
+ create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
+ create mode 100644 include/dt-bindings/media/video-interface-devices.h
+ create mode 100644 include/uapi/linux/it6625.h
+ create mode 100644 include/uapi/linux/media/st/dcmipp_config.h
+Merging v4l-dvb-next/master (adc218676eef2 Linux 6.12)
+$ git merge -m Merge branch 'master' of git://linuxtv.org/mchehab/media-next.git v4l-dvb-next/master
+Already up to date.
+Merging pm/linux-next (98c1e0cb36f88 Merge branches 'pnp', 'acpi-sbs' and 'acpi-video' into linux-next)
+$ git merge -m Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git pm/linux-next
+Auto-merging Documentation/admin-guide/kernel-parameters.txt
+Merge made by the 'ort' strategy.
+ Documentation/admin-guide/kernel-parameters.txt | 7 -
+ Documentation/admin-guide/pm/amd-pstate.rst | 6 -
+ .../driver-api/thermal/cpu-idle-cooling.rst | 2 +-
+ Documentation/firmware-guide/acpi/apei/einj.rst | 6 +-
+ Documentation/power/userland-swsusp.rst | 4 +-
+ drivers/acpi/acpi_extlog.c | 64 +++---
+ drivers/acpi/acpi_mrrm.c | 14 +-
+ drivers/acpi/acpi_video.c | 43 ++--
+ drivers/acpi/apei/ghes.c | 92 +++++++--
+ drivers/acpi/apei/ghes_helpers.c | 18 +-
+ drivers/acpi/battery.c | 131 ++++++++++--
+ drivers/acpi/button.c | 12 ++
+ drivers/acpi/device_pm.c | 77 ++++---
+ drivers/acpi/fan.h | 2 +-
+ drivers/acpi/fan_core.c | 69 ++-----
+ drivers/acpi/fan_hwmon.c | 2 +-
+ drivers/acpi/glue.c | 145 +++++++------
+ drivers/acpi/internal.h | 1 +
+ drivers/acpi/osl.c | 2 +-
+ drivers/acpi/pfr_update.c | 2 +-
+ drivers/acpi/processor_driver.c | 6 +-
+ drivers/acpi/processor_thermal.c | 80 +-------
+ drivers/acpi/sbs.c | 8 +-
+ drivers/acpi/scan.c | 54 ++---
+ drivers/acpi/thermal.c | 15 +-
+ drivers/acpi/video_detect.c | 8 +
+ drivers/base/power/runtime-test.c | 57 ++++++
+ drivers/base/power/runtime.c | 3 +-
+ drivers/clocksource/timer-ti-dm.c | 9 +-
+ drivers/cpufreq/amd-pstate-ut.c | 23 ++-
+ drivers/cpufreq/amd-pstate.c | 226 ++++++++++++++++-----
+ drivers/cpufreq/amd-pstate.h | 16 ++
+ drivers/cpuidle/cpuidle-tegra.c | 2 +-
+ drivers/cpuidle/governors/menu.c | 8 +-
+ drivers/cpuidle/governors/teo.c | 11 +
+ drivers/cxl/core/ras.c | 3 +-
+ drivers/firmware/efi/cper.c | 51 ++++-
+ drivers/idle/intel_idle.c | 12 +-
+ drivers/pnp/driver.c | 4 +-
+ drivers/powercap/intel_rapl_msr.c | 1 +
+ drivers/thermal/gov_power_allocator.c | 7 +-
+ .../int340x_thermal/processor_thermal_device.c | 14 +-
+ drivers/thermal/intel/intel_powerclamp.c | 27 +--
+ drivers/thermal/intel/intel_tcc_cooling.c | 1 +
+ drivers/thermal/thermal_core.c | 28 +--
+ drivers/thermal/thermal_core.h | 3 +-
+ drivers/thermal/thermal_of.c | 13 +-
+ include/acpi/acpi_bus.h | 19 +-
+ include/acpi/ghes.h | 4 +
+ include/acpi/processor.h | 6 +-
+ include/cxl/event.h | 6 +-
+ include/linux/acpi.h | 24 +--
+ include/linux/thermal.h | 19 +-
+ kernel/cpu_pm.c | 9 +-
+ 54 files changed, 954 insertions(+), 522 deletions(-)
+Merging cpufreq-arm/cpufreq/arm/linux-next (d82d896f00e7b cpufreq: Use %pe to print error pointers symbolically)
+$ git merge -m Merge branch 'cpufreq/arm/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq-arm/cpufreq/arm/linux-next
+Merge made by the 'ort' strategy.
+ drivers/cpufreq/airoha-cpufreq.c | 2 +-
+ drivers/cpufreq/bmips-cpufreq.c | 4 ++--
+ drivers/cpufreq/cppc_cpufreq.c | 4 ++--
+ drivers/cpufreq/qoriq-cpufreq.c | 3 +--
+ drivers/cpufreq/rcpufreq_dt.rs | 1 +
+ drivers/cpufreq/s3c64xx-cpufreq.c | 5 ++---
+ drivers/cpufreq/sparc-us2e-cpufreq.c | 11 +++++------
+ drivers/cpufreq/sti-cpufreq.c | 4 ++--
+ drivers/cpufreq/tegra194-cpufreq.c | 2 +-
+ rust/kernel/cpufreq.rs | 18 ++++++++++++++----
+ 10 files changed, 31 insertions(+), 23 deletions(-)
+Merging cpupower/cpupower (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'cpupower' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower/cpupower
+Already up to date.
+Merging devfreq/devfreq-next (9a222650d9e70 PM / devfreq: Fix governor_store() failing when device has no current governor)
+$ git merge -m Merge branch 'devfreq-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq/devfreq-next
+Auto-merging drivers/devfreq/event/rockchip-dfi.c
+Merge made by the 'ort' strategy.
+ drivers/devfreq/devfreq.c | 50 +++++++-----------------------------
+ drivers/devfreq/event/rockchip-dfi.c | 4 ++-
+ 2 files changed, 12 insertions(+), 42 deletions(-)
+Merging pmdomain/next (26b9ea4f00732 pmdomain: qcom: rpmhpd: Add RPMh power domains for SM7250)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git pmdomain/next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/power/qcom,rpmpd.yaml | 2 ++
+ drivers/pmdomain/qcom/rpmhpd.c | 41 ++++++++++++++++++++++
+ drivers/pmdomain/renesas/rcar-sysc.h | 12 +++++--
+ include/dt-bindings/power/qcom,rpmhpd.h | 1 +
+ 4 files changed, 53 insertions(+), 3 deletions(-)
+Merging opp/opp/linux-next (1f6de65e33145 opp: fix use after free in _update_opp_table_clk())
+$ git merge -m Merge branch 'opp/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/opp/linux-next
+Already up to date.
+Merging thermal/thermal/linux-next (b115930d716de thermal/drivers/armada: Fix missing bitfields include)
+$ git merge -m Merge branch 'thermal/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/thermal/linux-next
+Already up to date.
+Merging rdma/for-next (3e1de7f906ab1 RDMA: fix repeated words in comments)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git rdma/for-next
+Auto-merging drivers/infiniband/core/nldev.c
+Auto-merging drivers/infiniband/core/verbs.c
+Auto-merging drivers/infiniband/hw/erdma/erdma_main.c
+Auto-merging drivers/infiniband/hw/hns/hns_roce_debugfs.c
+Auto-merging drivers/infiniband/hw/irdma/verbs.c
+Auto-merging drivers/infiniband/ulp/rtrs/rtrs-clt.c
+Merge made by the 'ort' strategy.
+ Documentation/ABI/stable/sysfs-class-infiniband | 118 ------------------------
+ drivers/infiniband/core/device.c | 2 +-
+ drivers/infiniband/core/iwcm.c | 2 +-
+ drivers/infiniband/core/nldev.c | 4 +-
+ drivers/infiniband/core/uverbs_uapi.c | 2 +-
+ drivers/infiniband/core/verbs.c | 2 +-
+ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
+ drivers/infiniband/hw/cxgb4/cq.c | 2 +-
+ drivers/infiniband/hw/erdma/erdma_main.c | 2 +-
+ drivers/infiniband/hw/hfi1/affinity.c | 2 +-
+ drivers/infiniband/hw/hfi1/firmware.c | 2 +-
+ drivers/infiniband/hw/hfi1/pcie.c | 14 +--
+ drivers/infiniband/hw/hns/hns_roce_debugfs.c | 55 +++++++++++
+ drivers/infiniband/hw/hns/hns_roce_debugfs.h | 1 +
+ drivers/infiniband/hw/hns/hns_roce_device.h | 4 +-
+ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 58 ++++++++----
+ drivers/infiniband/hw/ionic/ionic_controlpath.c | 20 +++-
+ drivers/infiniband/hw/ionic/ionic_fw.h | 2 +
+ drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 1 +
+ drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 1 +
+ drivers/infiniband/hw/irdma/ctrl.c | 23 ++---
+ drivers/infiniband/hw/irdma/hw.c | 2 -
+ drivers/infiniband/hw/irdma/protos.h | 3 +-
+ drivers/infiniband/hw/irdma/type.h | 7 +-
+ drivers/infiniband/hw/irdma/verbs.c | 7 +-
+ drivers/infiniband/hw/mana/cq.c | 26 ++++--
+ drivers/infiniband/hw/mana/device.c | 3 +-
+ drivers/infiniband/hw/mana/main.c | 34 ++++++-
+ drivers/infiniband/hw/mana/mana_ib.h | 27 +++++-
+ drivers/infiniband/hw/mana/qp.c | 59 +++++++++---
+ drivers/infiniband/hw/mlx4/mcg.c | 4 +-
+ drivers/infiniband/hw/mlx5/data_direct.c | 10 +-
+ drivers/infiniband/hw/mlx5/odp.c | 2 +-
+ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 6 +-
+ drivers/infiniband/hw/qedr/verbs.c | 2 +-
+ drivers/infiniband/hw/usnic/usnic_abi.h | 2 +-
+ drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
+ drivers/infiniband/hw/usnic/usnic_transport.h | 2 +-
+ drivers/infiniband/sw/rdmavt/qp.c | 2 +-
+ drivers/infiniband/sw/rdmavt/srq.c | 2 +-
+ drivers/infiniband/sw/rxe/rxe_loc.h | 1 +
+ drivers/infiniband/sw/rxe/rxe_net.c | 68 +++++++++++++-
+ drivers/infiniband/sw/rxe/rxe_req.c | 2 +-
+ drivers/infiniband/sw/rxe/rxe_resp.c | 4 +-
+ drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 2 +-
+ drivers/infiniband/ulp/iser/iscsi_iser.c | 6 +-
+ drivers/infiniband/ulp/iser/iser_verbs.c | 2 +-
+ drivers/infiniband/ulp/rtrs/rtrs-clt.c | 23 +++--
+ drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
+ include/net/mana/gdma.h | 1 +
+ include/rdma/ib_verbs.h | 4 +-
+ include/rdma/uverbs_ioctl.h | 2 +-
+ include/uapi/rdma/ionic-abi.h | 9 +-
+ include/uapi/rdma/mana-abi.h | 12 +++
+ 54 files changed, 397 insertions(+), 262 deletions(-)
+Merging net-next/main (87b80c2f6b05c net: txgbe: free the fixed-rate clock on cleanup)
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git net-next/main
+Auto-merging MAINTAINERS
+Auto-merging drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+Auto-merging net/bridge/br_mst.c
+Auto-merging net/bridge/br_vlan.c
+Auto-merging net/core/neighbour.c
+CONFLICT (content): Merge conflict in net/core/neighbour.c
+Auto-merging net/core/sock.c
+Auto-merging net/ipv4/inet_connection_sock.c
+Auto-merging net/ipv6/tcp_ipv6.c
+Auto-merging net/netfilter/nf_nat_core.c
+Auto-merging net/netlink/af_netlink.c
+Auto-merging net/unix/af_unix.c
+Resolved 'net/core/neighbour.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 35c62469bcff4] Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
+$ git diff -M --stat --summary HEAD^..
+ .../ABI/testing/sysfs-devices-platform-soc-ipa | 14 -
+ Documentation/admin-guide/sysctl/net.rst | 14 +
+ .../devicetree/bindings/net/brcm,asp-v2.0.yaml | 2 +-
+ .../bindings/net/cortina,gemini-ethernet.yaml | 52 +-
+ .../bindings/net/dsa/motorcomm,yt921x.yaml | 23 +
+ .../devicetree/bindings/net/dsa/realtek.yaml | 33 +
+ .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 4 +-
+ .../devicetree/bindings/net/fsl,fman-dtsec.yaml | 4 -
+ .../devicetree/bindings/net/intel,dwmac-plat.yaml | 6 +-
+ .../devicetree/bindings/net/mdio-gpio.yaml | 16 +-
+ .../bindings/net/mscc,vsc7514-switch.yaml | 8 +-
+ .../devicetree/bindings/net/qcom,ipa.yaml | 10 +-
+ .../devicetree/bindings/net/realtek,rtl82xx.yaml | 6 +-
+ .../bindings/net/realtek,rtl9301-mdio.yaml | 14 +-
+ .../devicetree/bindings/net/snps,dwmac.yaml | 1 +
+ .../bindings/net/socionext,uniphier-ave4.yaml | 32 +-
+ .../devicetree/bindings/net/ti,cpsw-switch.yaml | 70 +-
+ .../bindings/net/ultrarisc,dp1000-gmac.yaml | 74 ++
+ .../bindings/net/wireless/mediatek,mt76.yaml | 32 +-
+ .../bindings/net/wireless/qcom,ath10k.yaml | 2 +-
+ .../bindings/net/x-powers,acx00-ephy-package.yaml | 170 +++
+ Documentation/netlink/specs/conntrack.yaml | 54 +-
+ Documentation/netlink/specs/dpll.yaml | 15 +-
+ Documentation/netlink/specs/fou.yaml | 4 +
+ Documentation/netlink/specs/handshake.yaml | 9 +-
+ Documentation/netlink/specs/nlctrl.yaml | 15 +
+ Documentation/netlink/specs/psp.yaml | 2 +
+ Documentation/netlink/specs/rt-link.yaml | 11 +-
+ Documentation/netlink/specs/tcp_metrics.yaml | 18 +-
+ .../device_drivers/ethernet/intel/i40e.rst | 2 +-
+ .../device_drivers/ethernet/intel/iavf.rst | 2 +-
+ .../device_drivers/ethernet/microsoft/netvsc.rst | 2 -
+ .../device_drivers/ethernet/stmicro/stmmac.rst | 1 -
+ Documentation/networking/mctp.rst | 4 +-
+ .../networking/net_cachelines/net_device.rst | 1 +
+ Documentation/networking/netconsole.rst | 5 +
+ Documentation/networking/netdevices.rst | 14 +-
+ Documentation/networking/page_pool.rst | 2 +-
+ Documentation/networking/phonet.rst | 2 +-
+ Documentation/networking/proc_net_tcp.rst | 20 +-
+ MAINTAINERS | 9 +-
+ drivers/dibs/dibs_loopback.c | 5 +-
+ drivers/dpll/dpll_nl.c | 20 +-
+ drivers/infiniband/ulp/ipoib/ipoib_main.c | 27 +-
+ drivers/net/bonding/bond_alb.c | 63 +-
+ drivers/net/can/bxcan.c | 2 +-
+ drivers/net/can/c_can/c_can_platform.c | 4 +-
+ drivers/net/can/flexcan/flexcan-core.c | 2 +-
+ drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +-
+ drivers/net/can/m_can/m_can_platform.c | 2 +-
+ drivers/net/can/sja1000/f81601.c | 2 +-
+ drivers/net/can/sja1000/sja1000_platform.c | 2 +-
+ drivers/net/dsa/Kconfig | 10 +-
+ drivers/net/dsa/Makefile | 2 +-
+ drivers/net/dsa/b53/b53_mdio.c | 2 +-
+ drivers/net/dsa/b53/b53_srab.c | 2 +-
+ drivers/net/dsa/bcm_sf2.c | 2 +-
+ drivers/net/dsa/hirschmann/hellcreek.c | 2 +-
+ drivers/net/dsa/lan9303_i2c.c | 2 +-
+ drivers/net/dsa/lan9303_mdio.c | 2 +-
+ drivers/net/dsa/lantiq/lantiq_gswip_common.c | 1 +
+ drivers/net/dsa/lantiq/mxl-gsw1xx.c | 31 +-
+ drivers/net/dsa/microchip/ksz_common.c | 61 +-
+ drivers/net/dsa/microchip/ksz_common.h | 5 +
+ drivers/net/dsa/motorcomm/Kconfig | 17 +
+ drivers/net/dsa/motorcomm/Makefile | 5 +
+ drivers/net/dsa/{yt921x.c => motorcomm/chip.c} | 228 +---
+ drivers/net/dsa/{yt921x.h => motorcomm/chip.h} | 15 +
+ drivers/net/dsa/motorcomm/leds.c | 643 +++++++++++
+ drivers/net/dsa/motorcomm/leds.h | 118 +++
+ drivers/net/dsa/motorcomm/smi.c | 180 ++++
+ drivers/net/dsa/motorcomm/smi.h | 61 ++
+ drivers/net/dsa/mt7530-mdio.c | 14 +-
+ drivers/net/dsa/mt7530-mmio.c | 2 +-
+ drivers/net/dsa/mt7530.c | 832 +++++++--------
+ drivers/net/dsa/mt7530.h | 221 ++--
+ drivers/net/dsa/mv88e6060.c | 2 +-
+ drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
+ drivers/net/dsa/qca/qca8k-8xxx.c | 2 +-
+ drivers/net/dsa/realtek/realtek.h | 3 +
+ drivers/net/dsa/realtek/rtl8365mb_main.c | 8 +-
+ drivers/net/dsa/realtek/rtl8366rb.c | 2 +-
+ drivers/net/dsa/realtek/rtl83xx.c | 23 +-
+ drivers/net/dsa/rzn1_a5psw.c | 2 +-
+ drivers/net/dsa/sja1105/sja1105_main.c | 2 +-
+ drivers/net/ethernet/8390/pcnet_cs.c | 9 +-
+ drivers/net/ethernet/adaptec/starfire.c | 6 +-
+ drivers/net/ethernet/airoha/airoha_eth.c | 363 ++++++-
+ drivers/net/ethernet/airoha/airoha_eth.h | 29 +-
+ drivers/net/ethernet/airoha/airoha_regs.h | 23 +-
+ .../net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 -
+ drivers/net/ethernet/atheros/alx/main.c | 13 +-
+ drivers/net/ethernet/atheros/atl1c/atl1c_hw.h | 2 +-
+ drivers/net/ethernet/atheros/atl1e/atl1e.h | 2 +-
+ drivers/net/ethernet/atheros/atl1e/atl1e_hw.c | 2 +-
+ drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 2 +-
+ drivers/net/ethernet/atheros/atlx/atl1.c | 2 +-
+ drivers/net/ethernet/atheros/atlx/atl2.c | 2 +-
+ drivers/net/ethernet/broadcom/asp2/bcmasp.c | 4 +-
+ drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +-
+ drivers/net/ethernet/broadcom/bcm63xx_enet.h | 2 +-
+ drivers/net/ethernet/broadcom/bcmsysport.c | 2 -
+ drivers/net/ethernet/broadcom/bcmsysport.h | 2 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 4 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 4 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 2 +-
+ .../net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 2 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 8 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 4 +-
+ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +-
+ drivers/net/ethernet/cadence/macb_main.c | 2 +-
+ .../net/ethernet/cavium/liquidio/cn66xx_device.c | 2 +-
+ drivers/net/ethernet/cavium/liquidio/lio_core.c | 2 +-
+ .../net/ethernet/cavium/liquidio/octeon_config.h | 4 +-
+ drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 +-
+ drivers/net/ethernet/cavium/liquidio/octeon_main.h | 2 +-
+ drivers/net/ethernet/cavium/liquidio/octeon_nic.h | 2 +-
+ .../net/ethernet/cavium/liquidio/request_manager.c | 2 +-
+ drivers/net/ethernet/cavium/thunder/nic.h | 2 +-
+ drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
+ drivers/net/ethernet/cisco/enic/enic_main.c | 19 +-
+ drivers/net/ethernet/cortina/gemini.h | 2 +-
+ drivers/net/ethernet/davicom/dm9000.c | 6 +-
+ drivers/net/ethernet/dec/tulip/de2104x.c | 2 +-
+ drivers/net/ethernet/dec/tulip/interrupt.c | 4 +-
+ drivers/net/ethernet/dec/tulip/media.c | 2 +-
+ drivers/net/ethernet/dec/tulip/tulip.h | 4 +-
+ drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +-
+ drivers/net/ethernet/freescale/enetc/Kconfig | 1 +
+ drivers/net/ethernet/freescale/enetc/enetc.c | 63 +-
+ drivers/net/ethernet/freescale/enetc/enetc.h | 11 +-
+ .../net/ethernet/freescale/enetc/enetc4_debugfs.c | 51 +-
+ drivers/net/ethernet/freescale/enetc/enetc4_hw.h | 1 +
+ drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 85 +-
+ .../net/ethernet/freescale/enetc/enetc_ethtool.c | 6 +
+ drivers/net/ethernet/freescale/enetc/enetc_hw.h | 26 +
+ .../net/ethernet/freescale/enetc/enetc_mailbox.h | 109 +-
+ drivers/net/ethernet/freescale/enetc/enetc_msg.c | 641 ++++++++++-
+ drivers/net/ethernet/freescale/enetc/enetc_pf.c | 64 +-
+ drivers/net/ethernet/freescale/enetc/enetc_pf.h | 21 +-
+ .../net/ethernet/freescale/enetc/enetc_pf_common.c | 150 ++-
+ .../net/ethernet/freescale/enetc/enetc_pf_common.h | 19 +
+ drivers/net/ethernet/freescale/enetc/enetc_vf.c | 449 +++++++-
+ drivers/net/ethernet/freescale/fec.h | 2 +-
+ drivers/net/ethernet/freescale/fec_main.c | 18 +-
+ drivers/net/ethernet/freescale/fec_ptp.c | 24 +-
+ drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +-
+ drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +-
+ drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 +-
+ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 11 +-
+ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +-
+ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
+ drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 -
+ drivers/net/ethernet/intel/i40e/i40e_common.c | 2 +-
+ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
+ drivers/net/ethernet/intel/i40e/i40e_main.c | 70 +-
+ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 5 +-
+ drivers/net/ethernet/intel/i40e/i40e_txrx.h | 7 +-
+ drivers/net/ethernet/intel/i40e/i40e_type.h | 5 +
+ drivers/net/ethernet/intel/i40e/i40e_xsk.c | 12 +
+ drivers/net/ethernet/intel/ice/ice.h | 2 +-
+ drivers/net/ethernet/intel/ice/ice_dpll.c | 493 ++++++++-
+ drivers/net/ethernet/intel/ice/ice_dpll.h | 4 +
+ drivers/net/ethernet/intel/ice/ice_main.c | 11 +-
+ drivers/net/ethernet/intel/ice/ice_ptp.c | 82 ++
+ drivers/net/ethernet/intel/ice/ice_ptp.h | 11 +
+ drivers/net/ethernet/intel/ice/ice_sriov.c | 2 +-
+ drivers/net/ethernet/intel/ice/ice_tspll.c | 120 ++-
+ drivers/net/ethernet/intel/ice/ice_tspll.h | 6 +
+ drivers/net/ethernet/intel/idpf/idpf.h | 12 +
+ drivers/net/ethernet/intel/idpf/idpf_lib.c | 19 +
+ drivers/net/ethernet/intel/idpf/idpf_txrx.c | 69 +-
+ drivers/net/ethernet/intel/idpf/idpf_txrx.h | 8 +-
+ drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 60 +-
+ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
+ drivers/net/ethernet/marvell/mvmdio.c | 4 +-
+ drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 2 +-
+ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
+ drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 8 +-
+ .../ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 1 -
+ drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 15 +-
+ drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 2 +
+ .../ethernet/marvell/octeontx2/af/lmac_common.h | 2 +
+ .../net/ethernet/marvell/octeontx2/af/mcs_reg.h | 2 -
+ drivers/net/ethernet/marvell/octeontx2/af/npc.h | 4 +-
+ drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 40 +-
+ drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 2 +
+ drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 4 +-
+ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 5 +-
+ .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 12 +
+ .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 8 +
+ .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
+ drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c | 2 +-
+ .../ethernet/marvell/octeontx2/nic/otx2_common.h | 1 -
+ .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 2 +-
+ .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 18 +
+ .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 99 +-
+ .../net/ethernet/marvell/octeontx2/nic/otx2_reg.h | 2 +
+ .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 9 +-
+ drivers/net/ethernet/marvell/octeontx2/nic/qos.h | 2 -
+ .../ethernet/marvell/prestera/prestera_router.c | 10 +-
+ drivers/net/ethernet/marvell/pxa168_eth.c | 4 +-
+ drivers/net/ethernet/mellanox/mlx4/main.c | 8 +-
+ drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 2 +-
+ .../net/ethernet/mellanox/mlx5/core/en/rep/neigh.c | 29 +-
+ .../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 23 +-
+ drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +-
+ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 6 +-
+ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-
+ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +-
+ .../net/ethernet/mellanox/mlx5/core/fpga/conn.c | 2 +-
+ drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 2 +-
+ drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +-
+ drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 +-
+ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 +-
+ .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 10 +-
+ drivers/net/ethernet/meta/fbnic/fbnic.h | 2 +
+ drivers/net/ethernet/meta/fbnic/fbnic_devlink.c | 2 +
+ drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 15 +-
+ drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 9 +-
+ drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 9 +-
+ drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 2 -
+ drivers/net/ethernet/meta/fbnic/fbnic_tlv.c | 13 +-
+ drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 17 +
+ drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 10 +
+ drivers/net/ethernet/microsoft/mana/hw_channel.c | 24 +-
+ drivers/net/ethernet/microsoft/mana/mana_bpf.c | 3 -
+ .../ethernet/netronome/nfp/flower/tunnel_conf.c | 14 +-
+ .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 10 +-
+ .../net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 2 +-
+ drivers/net/ethernet/qlogic/qed/qed_cxt.c | 2 +-
+ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 2 +-
+ drivers/net/ethernet/qlogic/qla3xxx.c | 1 +
+ drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 +-
+ .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 +-
+ drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 2 +-
+ drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 4 +-
+ drivers/net/ethernet/realtek/Kconfig | 2 +-
+ drivers/net/ethernet/realtek/r8169_main.c | 705 +++++++++---
+ drivers/net/ethernet/renesas/rswitch_main.c | 7 +-
+ drivers/net/ethernet/rocker/rocker_main.c | 2 +-
+ drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
+ drivers/net/ethernet/sfc/tc_counters.c | 8 +-
+ drivers/net/ethernet/sfc/tc_encap_actions.c | 4 +-
+ drivers/net/ethernet/smsc/Kconfig | 3 +-
+ drivers/net/ethernet/smsc/smc9194.h | 241 -----
+ drivers/net/ethernet/spacemit/k1_emac.c | 4 +-
+ drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 +
+ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
+ drivers/net/ethernet/stmicro/stmmac/common.h | 5 +
+ .../net/ethernet/stmicro/stmmac/dwmac-eic7700.c | 13 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c | 10 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-ultrarisc.c | 52 +
+ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 6 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 79 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 2 +
+ .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 18 -
+ drivers/net/ethernet/stmicro/stmmac/hwif.h | 3 -
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 62 +-
+ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 11 +
+ .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 112 --
+ drivers/net/ethernet/sun/niu.c | 10 +-
+ drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
+ drivers/net/ethernet/ti/cpsw.c | 2 +-
+ drivers/net/ethernet/ti/cpsw_new.c | 2 +-
+ drivers/net/ethernet/ti/davinci_mdio.c | 4 +-
+ drivers/net/ethernet/wangxun/libwx/wx_hw.c | 2 +-
+ drivers/net/ethernet/wangxun/libwx/wx_type.h | 6 +-
+ drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 6 +-
+ drivers/net/ethernet/xilinx/ll_temac_main.c | 7 +-
+ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 12 +-
+ drivers/net/fddi/skfp/cfm.c | 2 +-
+ drivers/net/fddi/skfp/ecm.c | 2 +-
+ drivers/net/fddi/skfp/fplustm.c | 4 +-
+ drivers/net/fddi/skfp/h/hwmtm.h | 2 +-
+ drivers/net/fddi/skfp/h/sba.h | 2 +-
+ drivers/net/fddi/skfp/pcmplc.c | 2 +-
+ drivers/net/fddi/skfp/rmt.c | 2 +-
+ drivers/net/gtp.c | 2 +-
+ drivers/net/hyperv/netvsc.c | 10 +-
+ drivers/net/ieee802154/at86rf230.c | 2 +-
+ drivers/net/mdio/Kconfig | 4 +-
+ drivers/net/mdio/mdio-bcm-iproc.c | 2 +-
+ drivers/net/mdio/mdio-bcm-unimac.c | 2 +-
+ drivers/net/mdio/mdio-mux-meson-g12a.c | 2 +-
+ drivers/net/mdio/mdio-realtek-rtl9300.c | 426 +++++++-
+ drivers/net/netconsole.c | 132 ++-
+ drivers/net/netdevsim/bus.c | 7 +-
+ drivers/net/netdevsim/ipsec.c | 10 +-
+ drivers/net/netdevsim/netdev.c | 10 +-
+ drivers/net/netdevsim/netdevsim.h | 5 +-
+ drivers/net/netdevsim/psp.c | 33 -
+ drivers/net/pcs/pcs-lynx.c | 6 +-
+ drivers/net/pcs/pcs-xpcs-plat.c | 2 +-
+ drivers/net/phy/Kconfig | 11 +
+ drivers/net/phy/Makefile | 1 +
+ drivers/net/phy/air_en8811h.c | 84 +-
+ drivers/net/phy/dp83848.c | 3 +
+ drivers/net/phy/dp83867.c | 109 +-
+ drivers/net/phy/microchip_t1.c | 16 +-
+ drivers/net/phy/motorcomm.c | 84 +-
+ drivers/net/phy/nxp-c45-tja11xx.c | 2 +-
+ drivers/net/phy/phy_device.c | 270 +++--
+ drivers/net/phy/phy_led_triggers.c | 11 +-
+ drivers/net/phy/phylink.c | 176 ++-
+ drivers/net/phy/realtek/realtek_main.c | 62 +-
+ drivers/net/phy/xpowers/Makefile | 3 +
+ drivers/net/phy/xpowers/ac200.c | 314 ++++++
+ drivers/net/phy/xpowers/ac300.c | 387 +++++++
+ drivers/net/phy/xpowers/acx00.c | 633 +++++++++++
+ drivers/net/phy/xpowers/acx00.h | 28 +
+ drivers/net/usb/qmi_wwan.c | 1 +
+ drivers/net/usb/r8152.c | 51 +-
+ drivers/net/virtio_net.c | 33 +-
+ drivers/net/vrf.c | 2 +-
+ drivers/net/vxlan/vxlan_core.c | 16 +-
+ drivers/net/wan/slic_ds26522.c | 2 +-
+ drivers/usb/atm/cxacru.c | 16 +-
+ drivers/usb/atm/speedtch.c | 4 +-
+ include/linux/mdio-mux.h | 2 +-
+ include/linux/net.h | 2 +-
+ include/linux/netdevice.h | 15 +-
+ include/linux/netpoll.h | 5 -
+ include/linux/phy.h | 18 +
+ include/linux/phylink.h | 2 +
+ include/linux/platform_data/microchip-ksz.h | 1 +
+ include/linux/stmmac.h | 2 +
+ include/net/arp.h | 10 +-
+ include/net/bond_alb.h | 14 +-
+ include/net/dropreason-core.h | 6 +
+ include/net/inet_connection_sock.h | 1 +
+ include/net/ip_tunnels.h | 7 +-
+ include/net/mana/hw_channel.h | 8 +-
+ include/net/ndisc.h | 20 +-
+ include/net/neighbour.h | 22 +-
+ include/net/net_namespace.h | 4 +
+ include/net/page_pool/helpers.h | 2 +-
+ include/net/phy/realtek_phy.h | 7 -
+ include/net/psp/functions.h | 5 -
+ include/net/psp/types.h | 4 +
+ include/net/route.h | 7 +-
+ include/net/tcp.h | 15 +-
+ include/uapi/linux/atm.h | 2 +-
+ include/uapi/linux/handshake.h | 5 +-
+ include/uapi/linux/if_link.h | 1 +
+ include/uapi/linux/mii.h | 2 +-
+ include/uapi/linux/netlink.h | 14 +
+ net/8021q/vlan.c | 8 +-
+ net/8021q/vlan.h | 20 +-
+ net/atm/proc.c | 7 +-
+ net/batman-adv/bat_iv_ogm.c | 29 +-
+ net/batman-adv/bat_v.c | 42 +-
+ net/batman-adv/bridge_loop_avoidance.c | 6 +-
+ net/batman-adv/distributed-arp-table.c | 10 +-
+ net/batman-adv/hash.h | 2 +-
+ net/batman-adv/mesh-interface.c | 12 +-
+ net/batman-adv/multicast.c | 6 +-
+ net/batman-adv/translation-table.c | 1118 +++++++++++++-------
+ net/batman-adv/types.h | 49 +-
+ net/bridge/br_arp_nd_proxy.c | 10 +-
+ net/bridge/br_mst.c | 19 +-
+ net/bridge/br_multicast.c | 18 +-
+ net/bridge/br_netlink.c | 10 +-
+ net/bridge/br_netlink_tunnel.c | 14 +-
+ net/bridge/br_private.h | 37 +-
+ net/bridge/br_vlan.c | 39 +-
+ net/bridge/br_vlan_options.c | 8 +-
+ net/bridge/br_vlan_tunnel.c | 2 +-
+ net/core/neighbour.c | 428 ++++----
+ net/core/net-sysfs.c | 112 +-
+ net/core/netdev-genl.c | 26 +-
+ net/core/netdev_work.c | 15 +-
+ net/core/page_pool_user.c | 8 +-
+ net/core/rtnetlink.c | 22 +
+ net/core/skbuff.c | 32 +-
+ net/core/sock.c | 4 +-
+ net/core/sysctl_net_core.c | 10 +
+ net/devlink/dev.c | 4 +-
+ net/handshake/genl.c | 4 +-
+ net/handshake/handshake-test.c | 2 +-
+ net/handshake/request.c | 2 +-
+ net/ieee802154/6lowpan/tx.c | 3 +-
+ net/ipv4/af_inet.c | 3 -
+ net/ipv4/arp.c | 137 ++-
+ net/ipv4/bpf_tcp_ca.c | 5 +-
+ net/ipv4/devinet.c | 18 +-
+ net/ipv4/fib_semantics.c | 7 +-
+ net/ipv4/fou_nl.c | 6 +-
+ net/ipv4/inet_connection_sock.c | 1 +
+ net/ipv4/inet_hashtables.c | 11 +
+ net/ipv4/ip_forward.c | 2 +-
+ net/ipv4/ip_gre.c | 6 +-
+ net/ipv4/ip_tunnel.c | 146 ++-
+ net/ipv4/ip_vti.c | 2 +-
+ net/ipv4/ipip.c | 2 +-
+ net/ipv4/ipmr.c | 17 +-
+ net/ipv4/ping.c | 5 +-
+ net/ipv4/raw.c | 4 +-
+ net/ipv4/route.c | 2 +-
+ net/ipv4/tcp.c | 9 +-
+ net/ipv4/tcp_bbr.c | 13 +-
+ net/ipv4/tcp_ipv4.c | 13 +-
+ net/ipv4/tcp_output.c | 28 +-
+ net/ipv4/udp.c | 5 +-
+ net/ipv6/addrconf.c | 17 +-
+ net/ipv6/af_inet6.c | 4 -
+ net/ipv6/ah6.c | 2 +-
+ net/ipv6/datagram.c | 5 +-
+ net/ipv6/exthdrs.c | 6 +-
+ net/ipv6/ip6_output.c | 6 +-
+ net/ipv6/ip6_vti.c | 2 +-
+ net/ipv6/ip6mr.c | 5 +-
+ net/ipv6/ipv6_sockglue.c | 87 --
+ net/ipv6/ndisc.c | 148 +--
+ net/ipv6/route.c | 18 +-
+ net/ipv6/sit.c | 480 ++++++---
+ net/ipv6/tcp_ipv6.c | 12 +-
+ net/ipv6/udp.c | 8 +-
+ net/iucv/af_iucv.c | 20 +-
+ net/key/af_key.c | 5 +-
+ net/llc/llc_conn.c | 2 +-
+ net/mac802154/iface.c | 2 +-
+ net/netfilter/nf_conncount.c | 2 +-
+ net/netfilter/nf_conntrack_ovs.c | 2 +-
+ net/netfilter/nf_conntrack_seqadj.c | 11 +-
+ net/netfilter/nf_conntrack_standalone.c | 2 +-
+ net/netfilter/nf_hooks_lwtunnel.c | 2 +-
+ net/netfilter/nf_log.c | 2 +-
+ net/netfilter/nf_nat_core.c | 5 +-
+ net/netfilter/nf_synproxy_core.c | 2 +-
+ net/netfilter/nfnetlink_acct.c | 2 +-
+ net/netfilter/nfnetlink_cthelper.c | 3 +-
+ net/netfilter/nfnetlink_cttimeout.c | 8 +-
+ net/netfilter/nfnetlink_osf.c | 2 +-
+ net/netfilter/nft_ct.c | 5 +-
+ net/netfilter/nft_set_pipapo.c | 6 +-
+ net/netfilter/xt_CT.c | 6 +-
+ net/netfilter/xt_IDLETIMER.c | 8 +-
+ net/netfilter/xt_LED.c | 5 +-
+ net/netfilter/xt_RATEEST.c | 2 +-
+ net/netfilter/xt_TEE.c | 2 +-
+ net/netfilter/xt_hashlimit.c | 4 +-
+ net/netfilter/xt_limit.c | 2 +-
+ net/netfilter/xt_quota.c | 2 +-
+ net/netfilter/xt_recent.c | 3 +-
+ net/netfilter/xt_statistic.c | 2 +-
+ net/netfilter/xt_string.c | 2 +-
+ net/netlink/af_netlink.c | 5 +-
+ net/netlink/policy.c | 16 +-
+ net/openvswitch/datapath.c | 14 +-
+ net/openvswitch/datapath.h | 2 +-
+ net/packet/af_packet.c | 7 +-
+ net/phonet/socket.c | 5 +-
+ net/psp/psp.h | 13 +
+ net/psp/psp_main.c | 29 +-
+ net/psp/psp_nl.c | 51 +-
+ net/psp/psp_sock.c | 115 +-
+ net/sched/sch_fq.c | 71 +-
+ net/sctp/proc.c | 6 +-
+ net/unix/af_unix.c | 3 +-
+ tools/net/ynl/Makefile | 1 +
+ tools/net/ynl/Makefile.deps | 3 +-
+ tools/net/ynl/generated/Makefile | 3 +-
+ tools/net/ynl/lib/Makefile | 3 +-
+ tools/net/ynl/pyynl/lib/ynl.py | 8 +-
+ tools/net/ynl/tests/Makefile | 2 +-
+ tools/net/ynl/ynltool/Makefile | 10 +-
+ tools/testing/selftests/bpf/progs/tcp_ca_kfunc.c | 8 +-
+ tools/testing/selftests/drivers/net/Makefile | 10 +-
+ tools/testing/selftests/drivers/net/README.rst | 9 +
+ .../testing/selftests/drivers/net/bonding/Makefile | 3 +-
+ tools/testing/selftests/drivers/net/dsa/Makefile | 1 +
+ tools/testing/selftests/drivers/net/gro_hw.py | 13 +
+ .../selftests/drivers/net/{gro.py => gro_lib.py} | 85 +-
+ tools/testing/selftests/drivers/net/gro_lro.py | 14 +
+ tools/testing/selftests/drivers/net/gro_sw.py | 13 +
+ tools/testing/selftests/drivers/net/hds.py | 29 -
+ tools/testing/selftests/drivers/net/hw/Makefile | 17 +-
+ .../selftests/drivers/net/hw/devlink_rate_tc_bw.py | 5 +-
+ .../testing/selftests/drivers/net/hw/devmem_lib.py | 4 +-
+ .../drivers/net/hw/{gro_hw.py => gro_stats.py} | 0
+ tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 422 +++++---
+ tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 50 +-
+ .../selftests/drivers/net/hw/lib/py/__init__.py | 4 +-
+ tools/testing/selftests/drivers/net/hw/toeplitz.py | 10 +-
+ .../selftests/drivers/net/lib/py/__init__.py | 4 +-
+ tools/testing/selftests/drivers/net/lib/py/env.py | 19 +
+ .../selftests/drivers/net/netconsole/Makefile | 3 +-
+ .../selftests/drivers/net/netdevsim/Makefile | 8 +
+ tools/testing/selftests/drivers/net/pppoe_gro.py | 45 +
+ tools/testing/selftests/drivers/net/psp.py | 180 +++-
+ .../testing/selftests/drivers/net/ring_reconfig.py | 26 +-
+ tools/testing/selftests/drivers/net/ruff.toml | 4 +
+ tools/testing/selftests/drivers/net/settings | 2 +-
+ tools/testing/selftests/drivers/net/so_txtime.c | 161 ++-
+ tools/testing/selftests/drivers/net/so_txtime.py | 80 +-
+ tools/testing/selftests/drivers/net/team/Makefile | 4 +-
+ .../selftests/drivers/net/virtio_net/Makefile | 1 +
+ tools/testing/selftests/net/bind_wildcard.c | 5 +
+ tools/testing/selftests/net/forwarding/Makefile | 2 +
+ tools/testing/selftests/net/icmp_redirect.sh | 10 +-
+ tools/testing/selftests/net/lib/csum.c | 55 +-
+ .../selftests/net/lib/ksft_setup_loopback.sh | 2 +-
+ tools/testing/selftests/net/lib/py/__init__.py | 4 +-
+ tools/testing/selftests/net/lib/py/utils.py | 22 +
+ tools/testing/selftests/net/netfilter/Makefile | 2 +
+ tools/testing/selftests/net/rtnetlink.sh | 8 +-
+ tools/testing/selftests/net/ruff.toml | 4 +
+ tools/testing/selftests/net/so_incoming_cpu.c | 7 +-
+ .../selftests/net/srv6_end_dt4_l3vpn_test.sh | 21 +
+ .../selftests/net/srv6_end_dt6_l3vpn_test.sh | 21 +
+ tools/testing/selftests/net/test_neigh.sh | 66 +-
+ tools/testing/selftests/net/xfrm_policy.sh | 2 +-
+ 514 files changed, 12591 insertions(+), 4644 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/net/ultrarisc,dp1000-gmac.yaml
+ create mode 100644 Documentation/devicetree/bindings/net/x-powers,acx00-ephy-package.yaml
+ create mode 100644 drivers/net/dsa/motorcomm/Kconfig
+ create mode 100644 drivers/net/dsa/motorcomm/Makefile
+ rename drivers/net/dsa/{yt921x.c => motorcomm/chip.c} (96%)
+ rename drivers/net/dsa/{yt921x.h => motorcomm/chip.h} (99%)
+ create mode 100644 drivers/net/dsa/motorcomm/leds.c
+ create mode 100644 drivers/net/dsa/motorcomm/leds.h
+ create mode 100644 drivers/net/dsa/motorcomm/smi.c
+ create mode 100644 drivers/net/dsa/motorcomm/smi.h
+ delete mode 100644 drivers/net/ethernet/smsc/smc9194.h
+ create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-ultrarisc.c
+ create mode 100644 drivers/net/phy/xpowers/Makefile
+ create mode 100644 drivers/net/phy/xpowers/ac200.c
+ create mode 100644 drivers/net/phy/xpowers/ac300.c
+ create mode 100644 drivers/net/phy/xpowers/acx00.c
+ create mode 100644 drivers/net/phy/xpowers/acx00.h
+ delete mode 100644 include/net/phy/realtek_phy.h
+ create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py
+ rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (89%)
+ mode change 100755 => 100644
+ create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py
+ create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py
+ rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%)
+ create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.py
+ create mode 100644 tools/testing/selftests/drivers/net/ruff.toml
+ create mode 100644 tools/testing/selftests/net/ruff.toml
+Merging bpf-next/for-next (29fcf9ce4bbdf bpf, x86: Use global buffer for trampoline size generation)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git bpf-next/for-next
+Auto-merging Documentation/admin-guide/kernel-parameters.txt
+Auto-merging Documentation/bpf/kfuncs.rst
+Auto-merging arch/arm64/net/bpf_jit_comp.c
+Auto-merging include/linux/btf.h
+Auto-merging kernel/bpf/btf.c
+Auto-merging kernel/bpf/helpers.c
+Auto-merging kernel/bpf/syscall.c
+Auto-merging kernel/bpf/verifier.c
+Auto-merging tools/testing/selftests/bpf/prog_tests/verifier.c
+CONFLICT (content): Merge conflict in tools/testing/selftests/bpf/prog_tests/verifier.c
+Resolved 'tools/testing/selftests/bpf/prog_tests/verifier.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 744beca0a5626] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
+$ git diff -M --stat --summary HEAD^..
+ Documentation/admin-guide/kernel-parameters.txt | 16 +
+ Documentation/bpf/btf.rst | 2 +-
+ Documentation/bpf/kfuncs.rst | 76 +-
+ Documentation/bpf/signing.rst | 283 +-
+ arch/arm64/net/bpf_jit_comp.c | 151 +-
+ arch/riscv/net/bpf_jit.h | 4 +
+ arch/riscv/net/bpf_jit_comp64.c | 109 +-
+ arch/riscv/net/bpf_jit_core.c | 7 +
+ arch/riscv/net/bpf_timed_may_goto.S | 8 +-
+ arch/x86/Kconfig | 1 +
+ arch/x86/net/bpf_jit_comp.c | 409 ++-
+ include/linux/bpf.h | 66 +-
+ include/linux/bpf_verifier.h | 44 +-
+ include/linux/btf.h | 1 +
+ include/linux/filter.h | 33 +
+ include/linux/key.h | 2 +
+ include/uapi/linux/keyctl.h | 1 +
+ kernel/bpf/Kconfig | 17 +
+ kernel/bpf/Makefile | 3 +
+ kernel/bpf/backtrack.c | 32 +-
+ kernel/bpf/btf.c | 235 +-
+ kernel/bpf/cnum_defs.h | 37 +-
+ kernel/bpf/core.c | 99 +
+ kernel/bpf/diagnostics.c | 29 +
+ kernel/bpf/diagnostics.h | 1 +
+ kernel/bpf/fixups.c | 38 +-
+ kernel/bpf/helpers.c | 1 +
+ kernel/bpf/keys.c | 73 +
+ kernel/bpf/liveness.c | 30 +-
+ kernel/bpf/queue_stack_maps.c | 3 +
+ kernel/bpf/stream.c | 55 +-
+ kernel/bpf/syscall.c | 2 +-
+ kernel/bpf/verifier.c | 2758 +++++++++++---------
+ security/keys/process_keys.c | 25 +
+ tools/bpf/bpftool/btf.c | 6 +-
+ tools/bpf/bpftool/main.c | 30 +-
+ tools/bpf/bpftool/main.h | 2 +-
+ tools/bpf/bpftool/prog.c | 2 +-
+ tools/bpf/bpftool/sign.c | 24 +-
+ tools/lib/bpf/btf.c | 16 +-
+ tools/lib/bpf/libbpf.c | 56 +-
+ tools/lib/bpf/libbpf_internal.h | 4 +-
+ tools/lib/bpf/libbpf_probes.c | 11 +-
+ tools/lib/bpf/usdt.c | 4 +
+ tools/testing/selftests/bpf/.gitignore | 1 -
+ tools/testing/selftests/bpf/Makefile | 31 +-
+ tools/testing/selftests/bpf/bench.c | 6 +
+ .../testing/selftests/bpf/benchs/bench_libarena.c | 210 ++
+ .../selftests/bpf/benchs/run_bench_libarena.sh | 31 +
+ .../selftests/bpf/bpftool_btf_dump_sorted.expected | 48 +
+ .../bpf/bpftool_btf_dump_unsorted.expected | 48 +
+ tools/testing/selftests/bpf/bpftool_helpers.c | 7 +-
+ tools/testing/selftests/bpf/config | 2 +
+ tools/testing/selftests/bpf/libarena/Makefile | 31 +-
+ .../bpf/libarena/benchs/bench_malloc.bpf.c | 51 +
+ .../bpf/libarena/include/bpf_arena_spin_lock.h | 2 +-
+ .../selftests/bpf/libarena/include/bpf_atomic.h | 2 +-
+ .../selftests/bpf/libarena/include/bpf_may_goto.h | 1 +
+ .../bpf/libarena/include/libarena/bitmap.h | 30 +-
+ .../bpf/libarena/include/libarena/common.h | 71 +
+ .../bpf/libarena/selftests/test_bitmap.bpf.c | 3 +
+ .../testing/selftests/bpf/libarena/src/asan.bpf.c | 21 +-
+ .../selftests/bpf/libarena/src/bitmap.bpf.c | 18 -
+ .../testing/selftests/bpf/libarena/src/buddy.bpf.c | 44 +-
+ .../selftests/bpf/libarena/src/common.bpf.c | 27 +-
+ tools/testing/selftests/bpf/network_helpers.c | 46 +-
+ .../selftests/bpf/prog_tests/aggregate_arg.c | 11 +
+ .../selftests/bpf/prog_tests/aggregate_ret.c | 53 +
+ .../selftests/bpf/prog_tests/attach_probe.c | 6 +-
+ tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 14 +-
+ .../selftests/bpf/prog_tests/bpf_verif_scale.c | 2 +-
+ .../selftests/bpf/prog_tests/bpftool_btf_dump.c | 178 ++
+ tools/testing/selftests/bpf/prog_tests/btf.c | 126 +
+ tools/testing/selftests/bpf/prog_tests/btf_dump.c | 127 +-
+ tools/testing/selftests/bpf/prog_tests/cb_refs.c | 4 +-
+ .../testing/selftests/bpf/prog_tests/core_reloc.c | 10 +-
+ .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 16 +
+ .../selftests/bpf/prog_tests/global_data_init.c | 96 +-
+ tools/testing/selftests/bpf/prog_tests/kasan.c | 479 ++++
+ .../testing/selftests/bpf/prog_tests/kernel_flag.c | 3 +
+ .../testing/selftests/bpf/prog_tests/kfunc_call.c | 2 +-
+ .../selftests/bpf/prog_tests/kprobe_multi_test.c | 2 +-
+ .../testing/selftests/bpf/prog_tests/lirc_mode2.c | 334 +++
+ .../bpf/prog_tests/prog_tests_framework.c | 23 +
+ .../selftests/bpf/prog_tests/queue_stack_map.c | 29 +
+ .../selftests/bpf/prog_tests/signed_loader.c | 600 ++++-
+ tools/testing/selftests/bpf/prog_tests/stream.c | 67 +
+ .../bpf/prog_tests/test_struct_ops_multi_args.c | 57 +-
+ tools/testing/selftests/bpf/prog_tests/usdt.c | 54 +
+ tools/testing/selftests/bpf/prog_tests/verifier.c | 6 +
+ .../selftests/bpf/prog_tests/verify_pkcs7_sig.c | 4 +-
+ .../selftests/bpf/prog_tests/xdp_adjust_frags.c | 3 +
+ .../selftests/bpf/prog_tests/xdp_devmap_attach.c | 5 +
+ .../selftests/bpf/prog_tests/xdp_metadata.c | 4 +-
+ tools/testing/selftests/bpf/prog_tests/xsk.c | 2 +-
+ .../selftests/bpf/progs/aggregate_arg_func.c | 188 ++
+ .../selftests/bpf/progs/aggregate_arg_kfunc.c | 168 ++
+ .../selftests/bpf/progs/aggregate_ret_func.c | 383 +++
+ .../selftests/bpf/progs/aggregate_ret_kfunc.c | 203 ++
+ .../bpf/progs/aggregate_ret_kfunc_arena.c | 121 +
+ .../selftests/bpf/progs/aggregate_ret_target.c | 29 +
+ tools/testing/selftests/bpf/progs/arena_kfunc.c | 20 +-
+ tools/testing/selftests/bpf/progs/bpf_misc.h | 10 +-
+ .../selftests/bpf/progs/btf__stack_arg_precision.c | 3 +-
+ .../bpf/progs/btf__verifier_stack_arg_order.c | 3 +-
+ .../selftests/bpf/progs/cgrp_kfunc_failure.c | 8 +-
+ .../selftests/bpf/progs/compute_live_registers.c | 36 +
+ .../testing/selftests/bpf/progs/cpumask_failure.c | 4 +-
+ .../testing/selftests/bpf/progs/exceptions_fail.c | 2 +-
+ .../selftests/bpf/progs/freplace_ret_pair.c | 12 +
+ tools/testing/selftests/bpf/progs/irq.c | 4 +-
+ tools/testing/selftests/bpf/progs/iters.c | 6 +-
+ tools/testing/selftests/bpf/progs/iters_testmod.c | 7 +-
+ tools/testing/selftests/bpf/progs/kasan.c | 502 ++++
+ tools/testing/selftests/bpf/progs/kasan_harden.c | 52 +
+ tools/testing/selftests/bpf/progs/lirc_mode2.c | 32 +
+ tools/testing/selftests/bpf/progs/map_kptr_fail.c | 10 +-
+ .../selftests/bpf/progs/mem_rdonly_untrusted.c | 3 +-
+ .../selftests/bpf/progs/percpu_alloc_fail.c | 35 +
+ tools/testing/selftests/bpf/progs/rbtree_fail.c | 4 +-
+ .../selftests/bpf/progs/refcounted_kptr_fail.c | 9 +-
+ .../selftests/bpf/progs/res_spin_lock_fail.c | 2 +-
+ tools/testing/selftests/bpf/progs/stack_arg.c | 3 +-
+ tools/testing/selftests/bpf/progs/stack_arg_fail.c | 13 +-
+ .../testing/selftests/bpf/progs/stack_arg_kfunc.c | 3 +-
+ .../selftests/bpf/progs/stack_arg_precision.c | 4 +-
+ tools/testing/selftests/bpf/progs/stream.c | 28 +
+ tools/testing/selftests/bpf/progs/stream_fail.c | 2 +-
+ .../selftests/bpf/progs/struct_ops_multi_args.c | 14 +-
+ .../selftests/bpf/progs/task_kfunc_failure.c | 10 +-
+ tools/testing/selftests/bpf/progs/task_work_fail.c | 2 +-
+ .../selftests/bpf/progs/test_global_percpu_data.c | 10 +-
+ .../selftests/bpf/progs/test_kfunc_dynptr_param.c | 2 +-
+ .../selftests/bpf/progs/test_lirc_mode2_kern.c | 26 -
+ .../selftests/bpf/progs/verifier_aggregate_arg.c | 200 ++
+ .../selftests/bpf/progs/verifier_aggregate_ret.c | 179 ++
+ tools/testing/selftests/bpf/progs/verifier_arena.c | 48 +
+ tools/testing/selftests/bpf/progs/verifier_bswap.c | 3 +-
+ tools/testing/selftests/bpf/progs/verifier_ctx.c | 2 +-
+ .../selftests/bpf/progs/verifier_global_ptr_args.c | 2 +-
+ tools/testing/selftests/bpf/progs/verifier_gotol.c | 1 +
+ .../bpf/progs/verifier_helper_access_var_len.c | 4 +-
+ .../bpf/progs/verifier_helper_packet_access.c | 4 +-
+ .../selftests/bpf/progs/verifier_jit_inline.c | 2 +-
+ .../bpf/progs/verifier_kfunc_packet_access.c | 47 +
+ tools/testing/selftests/bpf/progs/verifier_ldsx.c | 36 +-
+ .../selftests/bpf/progs/verifier_live_stack.c | 2 +-
+ .../selftests/bpf/progs/verifier_load_acquire.c | 1 +
+ .../selftests/bpf/progs/verifier_map_in_map.c | 3 +-
+ .../bpf/progs/verifier_map_lookup_refine.c | 2 +-
+ tools/testing/selftests/bpf/progs/verifier_movsx.c | 3 +-
+ .../selftests/bpf/progs/verifier_percpu_addr.c | 1 +
+ .../selftests/bpf/progs/verifier_private_stack.c | 1 +
+ .../selftests/bpf/progs/verifier_ref_tracking.c | 6 +-
+ tools/testing/selftests/bpf/progs/verifier_sdiv.c | 3 +-
+ tools/testing/selftests/bpf/progs/verifier_sock.c | 10 +-
+ .../selftests/bpf/progs/verifier_stack_arg.c | 4 +-
+ .../selftests/bpf/progs/verifier_stack_arg_order.c | 8 +-
+ .../selftests/bpf/progs/verifier_store_release.c | 1 +
+ .../selftests/bpf/progs/verifier_vfs_reject.c | 6 +-
+ .../selftests/bpf/progs/wakeup_source_fail.c | 2 +-
+ tools/testing/selftests/bpf/progs/wq_failures.c | 4 +-
+ tools/testing/selftests/bpf/test_btf.h | 2 +-
+ .../testing/selftests/bpf/test_kmods/bpf_testmod.c | 251 +-
+ .../testing/selftests/bpf/test_kmods/bpf_testmod.h | 5 +
+ .../selftests/bpf/test_kmods/bpf_testmod_kfunc.h | 128 +
+ tools/testing/selftests/bpf/test_lirc_mode2.sh | 41 -
+ tools/testing/selftests/bpf/test_lirc_mode2_user.c | 177 --
+ tools/testing/selftests/bpf/test_loader.c | 9 +
+ tools/testing/selftests/bpf/testing_helpers.c | 43 +
+ tools/testing/selftests/bpf/testing_helpers.h | 3 +
+ tools/testing/selftests/bpf/unpriv_helpers.c | 19 +-
+ tools/testing/selftests/bpf/unpriv_helpers.h | 2 +
+ tools/testing/selftests/bpf/usdt_2.c | 16 +
+ tools/testing/selftests/bpf/verifier/calls.c | 10 +-
+ tools/testing/selftests/bpf/verifier/map_kptr.c | 4 +-
+ tools/testing/selftests/bpf/verify_sig_setup.sh | 63 +-
+ tools/testing/selftests/bpf/vmtest.sh | 16 +-
+ tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +-
+ 179 files changed, 8980 insertions(+), 2223 deletions(-)
+ create mode 100644 kernel/bpf/keys.c
+ create mode 100644 tools/testing/selftests/bpf/benchs/bench_libarena.c
+ create mode 100755 tools/testing/selftests/bpf/benchs/run_bench_libarena.sh
+ create mode 100644 tools/testing/selftests/bpf/bpftool_btf_dump_sorted.expected
+ create mode 100644 tools/testing/selftests/bpf/bpftool_btf_dump_unsorted.expected
+ create mode 100644 tools/testing/selftests/bpf/libarena/benchs/bench_malloc.bpf.c
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/aggregate_arg.c
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/aggregate_ret.c
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_btf_dump.c
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/kasan.c
+ create mode 100644 tools/testing/selftests/bpf/prog_tests/lirc_mode2.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_arg_func.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_ret_func.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_ret_kfunc.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_ret_kfunc_arena.c
+ create mode 100644 tools/testing/selftests/bpf/progs/aggregate_ret_target.c
+ create mode 100644 tools/testing/selftests/bpf/progs/freplace_ret_pair.c
+ create mode 100644 tools/testing/selftests/bpf/progs/kasan.c
+ create mode 100644 tools/testing/selftests/bpf/progs/kasan_harden.c
+ create mode 100644 tools/testing/selftests/bpf/progs/lirc_mode2.c
+ delete mode 100644 tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
+ create mode 100644 tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c
+ create mode 100644 tools/testing/selftests/bpf/progs/verifier_aggregate_ret.c
+ create mode 100644 tools/testing/selftests/bpf/progs/verifier_kfunc_packet_access.c
+ delete mode 100755 tools/testing/selftests/bpf/test_lirc_mode2.sh
+ delete mode 100644 tools/testing/selftests/bpf/test_lirc_mode2_user.c
+$ git am -3 ../patches/0001-perf-Fixup-for-btf_vlan-API-change.patch
+Applying: perf: Fixup for btf_vlan() API change
+Using index info to reconstruct a base tree...
+M tools/perf/builtin-trace.c
+M tools/perf/util/btf.c
+Falling back to patching base and 3-way merge...
+Auto-merging tools/perf/builtin-trace.c
+No changes -- Patch already applied.
+Merging ipsec-next/master (6ebcf5074cff0 net: openvswitch: don't schedule rebalancing if there are no datapaths)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git ipsec-next/master
+Already up to date.
+Merging mlx5-next/mlx5-next (36b1d3299d0b6 net/mlx5: Add qp_latency_sensitive_disable cap bit)
+$ git merge -m Merge branch 'mlx5-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git mlx5-next/mlx5-next
+Already up to date.
+Merging netfilter-next/main (87b80c2f6b05c net: txgbe: free the fixed-rate clock on cleanup)
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git netfilter-next/main
+Already up to date.
+Merging ipvs-next/main (6ebcf5074cff0 net: openvswitch: don't schedule rebalancing if there are no datapaths)
+$ git merge -m Merge branch 'main' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs-next/main
+Already up to date.
+Merging bluetooth/master (2e63b55654e0e Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git bluetooth/master
+Auto-merging net/bluetooth/hci_sock.c
+Auto-merging net/bluetooth/l2cap_sock.c
+Merge made by the 'ort' strategy.
+ .../bindings/net/bluetooth/brcm,bluetooth.yaml | 1 +
+ drivers/bluetooth/Kconfig | 15 +
+ drivers/bluetooth/Makefile | 3 +
+ drivers/bluetooth/btbcm.c | 6 +-
+ drivers/bluetooth/btintel.c | 7 +
+ drivers/bluetooth/btintel.h | 3 +
+ drivers/bluetooth/btintel_pcie.c | 1389 +++++-
+ drivers/bluetooth/btintel_pcie.h | 254 +-
+ drivers/bluetooth/btmrvl_main.c | 4 +-
+ drivers/bluetooth/btmtk.c | 104 +-
+ drivers/bluetooth/btmtk.h | 9 +
+ drivers/bluetooth/btmtksdio.c | 57 +-
+ drivers/bluetooth/{btusb.c => btusb_main.c} | 354 +-
+ drivers/bluetooth/btusb_qcom.c | 4557 ++++++++++++++++++++
+ drivers/bluetooth/btusb_qcom.h | 99 +
+ drivers/bluetooth/hci_bcm.c | 1 +
+ drivers/bluetooth/hci_bcsp.c | 26 +-
+ drivers/bluetooth/hci_h4.c | 123 +-
+ drivers/bluetooth/hci_h5.c | 11 +-
+ drivers/bluetooth/hci_ll.c | 2 +-
+ drivers/bluetooth/hci_serdev.c | 46 +-
+ drivers/bluetooth/hci_uart.h | 39 +-
+ drivers/bluetooth/virtio_bt.c | 21 +-
+ include/net/bluetooth/hci_core.h | 49 +
+ include/net/bluetooth/hci_h4.h | 60 +
+ include/net/bluetooth/hci_mon.h | 2 +
+ include/net/bluetooth/l2cap.h | 102 +-
+ net/bluetooth/6lowpan.c | 44 +-
+ net/bluetooth/Makefile | 2 +-
+ net/bluetooth/bnep/core.c | 16 +-
+ net/bluetooth/hci_core.c | 47 +-
+ net/bluetooth/hci_event.c | 37 +-
+ net/bluetooth/hci_h4.c | 160 +
+ net/bluetooth/hci_sock.c | 8 +
+ net/bluetooth/hci_sync.c | 64 +-
+ net/bluetooth/l2cap_core.c | 284 +-
+ net/bluetooth/l2cap_sock.c | 96 +-
+ net/bluetooth/mgmt.c | 14 +-
+ net/bluetooth/smp.c | 4 +-
+ scripts/context-analysis-suppression.txt | 1 +
+ 40 files changed, 7473 insertions(+), 648 deletions(-)
+ rename drivers/bluetooth/{btusb.c => btusb_main.c} (94%)
+ create mode 100644 drivers/bluetooth/btusb_qcom.c
+ create mode 100644 drivers/bluetooth/btusb_qcom.h
+ create mode 100644 include/net/bluetooth/hci_h4.h
+ create mode 100644 net/bluetooth/hci_h4.c
+$ git am -3 ../patches/0001-bluetooth-Fix-up-mismerge-due-to-drivers-bluetooth-b.patch
+Applying: bluetooth: Fix up mismerge due to drivers/bluetooth/btusb_main.c
+Using index info to reconstruct a base tree...
+M drivers/bluetooth/btusb_main.c
+Falling back to patching base and 3-way merge...
+No changes -- Patch already applied.
+Merging wireless-next/for-next (3b35f726c20d1 wifi: mac80211: pass error station if non-STA transmit was requested)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git wireless-next/for-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/net/wireless/marvell/mwifiex/cfg80211.c
+Auto-merging drivers/net/wireless/virtual/mac80211_hwsim_main.c
+CONFLICT (content): Merge conflict in drivers/net/wireless/virtual/mac80211_hwsim_main.c
+Auto-merging include/net/mac80211.h
+CONFLICT (content): Merge conflict in include/net/mac80211.h
+Auto-merging net/mac80211/debugfs.c
+Auto-merging net/mac80211/debugfs_netdev.c
+Auto-merging net/mac80211/ieee80211_i.h
+Auto-merging net/mac80211/iface.c
+CONFLICT (content): Merge conflict in net/mac80211/iface.c
+Auto-merging net/mac80211/offchannel.c
+Auto-merging net/mac80211/rate.c
+Auto-merging net/mac80211/scan.c
+Auto-merging net/mac80211/tdls.c
+Auto-merging net/mac80211/tx.c
+CONFLICT (content): Merge conflict in net/mac80211/tx.c
+Auto-merging net/wireless/nl80211.c
+Resolved 'drivers/net/wireless/virtual/mac80211_hwsim_main.c' using previous resolution.
+Resolved 'include/net/mac80211.h' using previous resolution.
+Resolved 'net/mac80211/iface.c' using previous resolution.
+Resolved 'net/mac80211/tx.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 69870d733a751] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
+$ git diff -M --stat --summary HEAD^..
+ .../bindings/net/wireless/marvell,sd8787.yaml | 6 +
+ .../bindings/net/wireless/silabs,wfx.yaml | 3 +
+ MAINTAINERS | 40 +-
+ drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
+ drivers/net/wireless/ath/ath12k/dp_mon.c | 2 -
+ drivers/net/wireless/ath/ath12k/dp_rx.c | 20 +-
+ drivers/net/wireless/ath/ath12k/hw.h | 20 +-
+ drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c | 20 +-
+ drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h | 12 +-
+ drivers/net/wireless/ath/ath12k/wifi7/hw.c | 6 +-
+ drivers/net/wireless/ath/ath12k/wmi.c | 6 -
+ drivers/net/wireless/broadcom/b43legacy/dma.c | 24 +-
+ drivers/net/wireless/broadcom/b43legacy/dma.h | 4 +-
+ .../broadcom/brcm80211/brcmfmac/cfg80211.c | 129 +++++-
+ .../broadcom/brcm80211/brcmfmac/cfg80211.h | 5 +-
+ .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 2 +
+ .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +-
+ drivers/net/wireless/intel/iwlwifi/mld/agg.c | 17 +-
+ drivers/net/wireless/intel/iwlwifi/mld/agg.h | 4 +-
+ drivers/net/wireless/intel/iwlwifi/mld/rx.c | 50 +--
+ drivers/net/wireless/intel/iwlwifi/mld/rx.h | 2 +-
+ drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c | 7 +-
+ drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 +-
+ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 6 +-
+ drivers/net/wireless/marvell/libertas/if_usb.c | 10 +-
+ drivers/net/wireless/marvell/libertas_tf/if_usb.c | 10 +-
+ .../net/wireless/marvell/mwifiex/11n_rxreorder.c | 20 +-
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c | 7 +
+ drivers/net/wireless/marvell/mwifiex/main.h | 2 +-
+ drivers/net/wireless/mediatek/mt76/mac80211.c | 25 +-
+ drivers/net/wireless/ralink/rt2x00/rt2x00pci.c | 104 ++---
+ drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 67 +--
+ drivers/net/wireless/realtek/rtw89/core.c | 7 -
+ drivers/net/wireless/silabs/wfx/bh.c | 6 +-
+ drivers/net/wireless/silabs/wfx/bus_sdio.c | 1 +
+ drivers/net/wireless/silabs/wfx/main.c | 37 +-
+ drivers/net/wireless/virtual/mac80211_hwsim.h | 5 +-
+ drivers/net/wireless/virtual/mac80211_hwsim_main.c | 98 +++--
+ include/linux/ieee80211-eht.h | 18 +-
+ include/linux/ieee80211-uhr.h | 101 +++--
+ include/net/cfg80211.h | 6 +-
+ include/net/ieee80211_radiotap.h | 66 +++
+ include/net/mac80211.h | 66 ++-
+ include/uapi/linux/nl80211.h | 16 +
+ net/mac80211/agg-tx.c | 4 +-
+ net/mac80211/ap.c | 3 -
+ net/mac80211/debugfs.c | 2 +-
+ net/mac80211/debugfs_netdev.c | 8 +-
+ net/mac80211/ht.c | 2 +-
+ net/mac80211/ieee80211_i.h | 30 +-
+ net/mac80211/iface.c | 12 +-
+ net/mac80211/mesh_pathtbl.c | 2 +-
+ net/mac80211/mlme.c | 24 +-
+ net/mac80211/offchannel.c | 13 +-
+ net/mac80211/rate.c | 1 -
+ net/mac80211/rx.c | 465 +++++++++++----------
+ net/mac80211/s1g.c | 8 -
+ net/mac80211/scan.c | 10 +-
+ net/mac80211/tdls.c | 4 +-
+ net/mac80211/tx.c | 422 ++++++++++---------
+ net/wireless/chan.c | 11 +-
+ net/wireless/nl80211.c | 32 +-
+ 62 files changed, 1204 insertions(+), 914 deletions(-)
+Merging ath-next/for-next (c3bace8584ca7 wifi: ath12k: add support to load shared firmware on multiPD)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git ath-next/for-next
+Auto-merging .mailmap
+Auto-merging drivers/net/wireless/ath/ath11k/dp_rx.c
+Auto-merging drivers/net/wireless/ath/ath12k/ahb.c
+Auto-merging drivers/net/wireless/ath/ath12k/wifi7/ahb.c
+CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath12k/wifi7/ahb.c
+Auto-merging drivers/net/wireless/ath/ath12k/wifi7/hw.c
+Auto-merging drivers/net/wireless/ath/ath12k/wmi.c
+Resolved 'drivers/net/wireless/ath/ath12k/wifi7/ahb.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master f750c159c19d5] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
+$ git diff -M --stat --summary HEAD^..
+ .mailmap | 13 +-
+ .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 7 -
+ drivers/net/wireless/ath/ath11k/Kconfig | 3 +
+ drivers/net/wireless/ath/ath11k/ahb.c | 16 +-
+ drivers/net/wireless/ath/ath11k/ce.c | 2 +-
+ drivers/net/wireless/ath/ath11k/core.c | 10 ++
+ drivers/net/wireless/ath/ath11k/dp.c | 2 +
+ drivers/net/wireless/ath/ath11k/dp_rx.c | 19 ++-
+ drivers/net/wireless/ath/ath12k/ahb.c | 166 ++++++++++++++++++---
+ drivers/net/wireless/ath/ath12k/ahb.h | 9 ++
+ drivers/net/wireless/ath/ath12k/ce.c | 2 +-
+ drivers/net/wireless/ath/ath12k/core.c | 23 +++
+ drivers/net/wireless/ath/ath12k/dp.c | 2 +-
+ drivers/net/wireless/ath/ath12k/mac.c | 45 +++++-
+ drivers/net/wireless/ath/ath12k/pci.c | 55 ++++---
+ drivers/net/wireless/ath/ath12k/qmi.c | 4 +
+ drivers/net/wireless/ath/ath12k/wifi7/ahb.c | 3 +
+ drivers/net/wireless/ath/ath12k/wifi7/dp_mon.c | 23 +--
+ drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c | 17 ++-
+ drivers/net/wireless/ath/ath12k/wifi7/hal_tx.c | 2 +-
+ drivers/net/wireless/ath/ath12k/wifi7/hw.c | 3 +-
+ drivers/net/wireless/ath/ath12k/wmi.c | 16 +-
+ drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
+ 23 files changed, 346 insertions(+), 98 deletions(-)
+Merging iwlwifi-next/next (4a2610a5a9fcf wifi: iwlwifi: bump core version for BZ/SC/DR)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git iwlwifi-next/next
+Already up to date.
+Merging wpan-next/master (a6bfdfcc6711d ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next.git wpan-next/master
+Already up to date.
+Merging wpan-staging/staging (a6bfdfcc6711d ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation)
+$ git merge -m Merge branch 'staging' of https://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next.git wpan-staging/staging
+Already up to date.
+Merging mtd/mtd/next (8fcbb04ee5152 mtd: docg3: use devm_platform_ioremap_resource())
+$ git merge -m Merge branch 'mtd/next' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/mtd/next
+Merge made by the 'ort' strategy.
+ drivers/mtd/devices/docg3.c | 20 +++++---------------
+ drivers/mtd/devices/powernv_flash.c | 2 +-
+ drivers/mtd/nand/onenand/onenand_base.c | 2 +-
+ drivers/mtd/nand/raw/fsmc_nand.c | 2 +-
+ drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
+ drivers/mtd/nand/raw/mtk_nand.c | 2 +-
+ drivers/mtd/nand/raw/nand_base.c | 2 +-
+ drivers/mtd/nand/raw/nand_legacy.c | 4 ++--
+ drivers/mtd/spi-nor/otp.c | 2 +-
+ include/linux/mtd/bbm.h | 2 +-
+ include/linux/mtd/rawnand.h | 2 +-
+ include/linux/mtd/sh_flctl.h | 4 ++--
+ 12 files changed, 18 insertions(+), 28 deletions(-)
+Merging nand/nand/next (7e874b1750a40 mtd: spinand: Fix spinand_manufacturer_ops kernel-doc)
+$ git merge -m Merge branch 'nand/next' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/nand/next
+Auto-merging drivers/mtd/nand/spi/core.c
+Merge made by the 'ort' strategy.
+ drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +
+ drivers/mtd/nand/raw/fsl_ifc_nand.c | 30 ++---
+ drivers/mtd/nand/raw/lpc32xx_mlc.c | 21 +---
+ drivers/mtd/nand/raw/lpc32xx_slc.c | 21 +---
+ drivers/mtd/nand/raw/ndfc.c | 21 ++--
+ drivers/mtd/nand/raw/omap2.c | 4 +-
+ drivers/mtd/nand/raw/stm32_fmc2_nand.c | 8 +-
+ drivers/mtd/nand/raw/sunxi_nand.c | 37 ++++--
+ drivers/mtd/nand/spi/Makefile | 2 +-
+ drivers/mtd/nand/spi/core.c | 1 +
+ drivers/mtd/nand/spi/issi.c | 187 +++++++++++++++++++++++++++++++
+ drivers/mtd/nand/spi/winbond.c | 35 +++++-
+ include/linux/mtd/lpc32xx_mlc.h | 17 ---
+ include/linux/mtd/lpc32xx_slc.h | 17 ---
+ include/linux/mtd/spinand.h | 3 +-
+ 15 files changed, 276 insertions(+), 130 deletions(-)
+ create mode 100644 drivers/mtd/nand/spi/issi.c
+ delete mode 100644 include/linux/mtd/lpc32xx_mlc.h
+ delete mode 100644 include/linux/mtd/lpc32xx_slc.h
+Merging spi-nor/spi-nor/next (a96edc3f0b4f0 mtd: spi-nor: spansion: Assign .fixups to s25fs256s1)
+$ git merge -m Merge branch 'spi-nor/next' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/spi-nor/next
+Auto-merging drivers/mtd/spi-nor/core.c
+Auto-merging drivers/mtd/spi-nor/otp.c
+Merge made by the 'ort' strategy.
+ Documentation/driver-api/mtd/spi-nor.rst | 2 +-
+ drivers/mtd/spi-nor/atmel.c | 75 ++-
+ drivers/mtd/spi-nor/core.c | 1035 ++++++++++++------------------
+ drivers/mtd/spi-nor/core.h | 144 +++--
+ drivers/mtd/spi-nor/debugfs.c | 31 +-
+ drivers/mtd/spi-nor/everspin.c | 7 +-
+ drivers/mtd/spi-nor/gigadevice.c | 15 +-
+ drivers/mtd/spi-nor/issi.c | 29 +-
+ drivers/mtd/spi-nor/macronix.c | 73 ++-
+ drivers/mtd/spi-nor/micron-st.c | 70 +-
+ drivers/mtd/spi-nor/otp.c | 16 +-
+ drivers/mtd/spi-nor/sfdp.c | 231 +++++--
+ drivers/mtd/spi-nor/sfdp.h | 23 +-
+ drivers/mtd/spi-nor/spansion.c | 109 ++--
+ drivers/mtd/spi-nor/sst.c | 16 +-
+ drivers/mtd/spi-nor/swp.c | 133 ++--
+ drivers/mtd/spi-nor/sysfs.c | 4 +-
+ drivers/mtd/spi-nor/winbond.c | 241 +++++--
+ drivers/mtd/spi-nor/xmc.c | 1 +
+ include/linux/mtd/spi-nor.h | 10 +-
+ 20 files changed, 1221 insertions(+), 1044 deletions(-)
+Merging crypto/master (75ed7550da436 crypto: ccp - repair all kernel-doc comments)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git crypto/master
+Auto-merging Documentation/devicetree/bindings/trivial-devices.yaml
+Auto-merging MAINTAINERS
+Auto-merging arch/arm64/crypto/aes-neonbs-glue.c
+Auto-merging lib/Kconfig.debug
+Auto-merging lib/test_rhashtable.c
+Auto-merging lib/tests/Makefile
+Merge made by the 'ort' strategy.
+ Documentation/ABI/testing/sysfs-driver-qat_kpt | 3 +-
+ .../bindings/crypto/hisilicon,hip06-sec.yaml | 134 --
+ .../devicetree/bindings/trivial-devices.yaml | 2 +
+ MAINTAINERS | 10 +
+ arch/arm/crypto/aes-neonbs-glue.c | 2 +-
+ arch/arm64/boot/dts/hisilicon/hip07.dtsi | 280 -----
+ arch/arm64/crypto/aes-neonbs-glue.c | 2 +-
+ crypto/asymmetric_keys/Kconfig | 12 +
+ crypto/asymmetric_keys/Makefile | 2 +
+ crypto/asymmetric_keys/verify_pefile.c | 5 +
+ crypto/asymmetric_keys/verify_pefile_test.c | 100 ++
+ crypto/lskcipher.c | 6 +-
+ crypto/rsassa-pkcs1.c | 4 +-
+ crypto/zstd.c | 40 +-
+ drivers/char/hw_random/cctrng.c | 7 +-
+ drivers/char/hw_random/imx-rngc.c | 8 +-
+ drivers/char/hw_random/omap-rng.c | 8 +-
+ drivers/crypto/amcc/crypto4xx_core.c | 29 +-
+ drivers/crypto/amlogic/amlogic-gxl-cipher.c | 25 +-
+ drivers/crypto/aspeed/aspeed-hace-crypto.c | 3 +-
+ drivers/crypto/atmel-aes.c | 2 +-
+ drivers/crypto/atmel-ecc.c | 12 +-
+ drivers/crypto/atmel-tdes.c | 2 +-
+ drivers/crypto/ccp/dbc.c | 4 +-
+ drivers/crypto/ccree/cc_aead.c | 4 +-
+ drivers/crypto/hisilicon/Kconfig | 14 -
+ drivers/crypto/hisilicon/Makefile | 1 -
+ drivers/crypto/hisilicon/sec/Makefile | 3 -
+ drivers/crypto/hisilicon/sec/sec_algs.c | 1122 -----------------
+ drivers/crypto/hisilicon/sec/sec_drv.c | 1307 --------------------
+ drivers/crypto/hisilicon/sec/sec_drv.h | 428 -------
+ drivers/crypto/hisilicon/zip/dae_main.c | 23 +-
+ drivers/crypto/inside-secure/eip93/eip93-aead.c | 3 +-
+ drivers/crypto/inside-secure/safexcel_cipher.c | 16 +-
+ drivers/crypto/inside-secure/safexcel_hash.c | 6 +-
+ .../crypto/intel/qat/qat_common/adf_sysfs_kpt.c | 24 +-
+ drivers/crypto/intel/qat/qat_common/qat_algs.c | 3 +-
+ .../crypto/intel/qat/qat_common/qat_asym_algs.c | 12 +-
+ drivers/crypto/marvell/octeontx/otx_cptvf_algs.c | 7 +-
+ drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 7 +-
+ drivers/crypto/mxs-dcp.c | 3 +
+ drivers/crypto/padlock-aes.c | 22 +-
+ drivers/crypto/qce/aead.c | 9 +-
+ drivers/crypto/qce/sha.c | 9 +-
+ drivers/crypto/qce/skcipher.c | 9 +-
+ drivers/crypto/rockchip/rk3288_crypto.c | 4 +-
+ drivers/crypto/s5p-sss.c | 5 +-
+ drivers/crypto/sa2ul.c | 2 +-
+ drivers/crypto/starfive/jh7110-cryp.c | 11 +-
+ include/crypto/aes.h | 13 +
+ include/linux/ccp.h | 58 +-
+ include/linux/rhashtable-types.h | 3 +
+ include/linux/rhashtable.h | 22 +-
+ lib/842/842_decompress.c | 7 +-
+ lib/Kconfig.debug | 15 +
+ lib/rhashtable.c | 14 +-
+ lib/test_rhashtable.c | 2 +-
+ lib/tests/842_decompress_kunit.c | 144 +++
+ lib/tests/Makefile | 1 +
+ 59 files changed, 571 insertions(+), 3464 deletions(-)
+ delete mode 100644 Documentation/devicetree/bindings/crypto/hisilicon,hip06-sec.yaml
+ create mode 100644 crypto/asymmetric_keys/verify_pefile_test.c
+ delete mode 100644 drivers/crypto/hisilicon/sec/Makefile
+ delete mode 100644 drivers/crypto/hisilicon/sec/sec_algs.c
+ delete mode 100644 drivers/crypto/hisilicon/sec/sec_drv.c
+ delete mode 100644 drivers/crypto/hisilicon/sec/sec_drv.h
+ create mode 100644 lib/tests/842_decompress_kunit.c
+Merging libcrypto/libcrypto-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'libcrypto-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto/libcrypto-next
+Already up to date.
+Merging drm/drm-next (14d6074f52d3a Merge tag 'drm-misc-next-2026-09-10' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next)
+$ git merge -m Merge branch 'drm-next' of https://gitlab.freedesktop.org/drm/kernel.git drm/drm-next
+Auto-merging MAINTAINERS
+Auto-merging drivers/accel/ethosu/ethosu_job.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
+Auto-merging drivers/gpu/drm/bridge/ti-sn65dsi83.c
+Auto-merging drivers/gpu/drm/drm_atomic_uapi.c
+Auto-merging drivers/gpu/drm/i915/display/intel_cursor.c
+Auto-merging drivers/gpu/drm/i915/display/intel_display_types.h
+Auto-merging drivers/gpu/drm/i915/display/intel_dp.c
+Auto-merging drivers/gpu/drm/qxl/qxl_display.c
+Auto-merging drivers/gpu/drm/scheduler/sched_entity.c
+Auto-merging drivers/gpu/drm/ttm/ttm_bo.c
+Auto-merging drivers/gpu/drm/vboxvideo/vbox_mode.c
+Auto-merging drivers/gpu/drm/verisilicon/vs_cursor_plane.c
+Auto-merging drivers/gpu/drm/verisilicon/vs_primary_plane.c
+Auto-merging drivers/gpu/drm/xe/xe_pagefault.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_pagefault.c
+Auto-merging drivers/gpu/drm/xe/xe_pagefault_types.h
+Resolved 'drivers/gpu/drm/xe/xe_pagefault.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 188eb000b809a] Merge branch 'drm-next' of https://gitlab.freedesktop.org/drm/kernel.git
+$ git diff -M --stat --summary HEAD^..
+ .../bindings/display/bridge/analogix,dp.yaml | 19 +-
+ .../bindings/display/panel/ilitek,ili7836a.yaml | 58 +
+ .../bindings/display/panel/novatek,nt36532.yaml | 83 ++
+ .../panel/samsung,s6e8aa5x01-ams561ra01.yaml | 2 +-
+ .../display/rockchip/rockchip,analogix-dp.yaml | 1 +
+ Documentation/gpu/drm-ras.rst | 39 +
+ Documentation/gpu/drm-uapi.rst | 93 +-
+ Documentation/gpu/todo.rst | 15 -
+ Documentation/gpu/xe/index.rst | 1 +
+ Documentation/gpu/xe/xe_sigid.rst | 14 +
+ Documentation/netlink/specs/drm_ras.yaml | 80 ++
+ MAINTAINERS | 35 +
+ drivers/accel/amdxdna/aie2_ctx.c | 9 +-
+ drivers/accel/amdxdna/amdxdna_gem.c | 197 ++-
+ drivers/accel/amdxdna/amdxdna_gem.h | 5 +-
+ drivers/accel/ethosu/ethosu_job.c | 4 +-
+ drivers/accel/ivpu/ivpu_drv.h | 2 +-
+ drivers/accel/qaic/qaic_data.c | 8 +-
+ drivers/accel/qaic/qaic_debugfs.c | 1 +
+ drivers/accel/qaic/qaic_drv.c | 1 +
+ drivers/accel/qaic/qaic_ras.c | 1 +
+ drivers/accel/qaic/qaic_ssr.c | 1 +
+ drivers/accel/qaic/qaic_timesync.c | 1 +
+ drivers/accel/qaic/sahara.c | 1 +
+ drivers/dma-buf/dma-buf.c | 2 +-
+ drivers/dma-buf/dma-resv.c | 2 +-
+ drivers/firmware/efi/sysfb_efi.c | 9 -
+ drivers/gpu/buddy.c | 1342 ++++++++++++++------
+ drivers/gpu/drm/adp/adp_drv.c | 2 +-
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 +-
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 85 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 27 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 1 +
+ .../amd/display/amdgpu_dm/amdgpu_dm_connector.c | 255 +---
+ .../amd/display/amdgpu_dm/amdgpu_dm_connector.h | 3 -
+ .../amdgpu_dm/tests/amdgpu_dm_connector_test.c | 73 --
+ .../amd/display/amdgpu_dm/tests/amdgpu_dm_test.c | 16 +-
+ drivers/gpu/drm/amd/display/dc/Makefile | 1 -
+ drivers/gpu/drm/amd/display/dc/dc_edid_parser.c | 80 --
+ drivers/gpu/drm/amd/display/dc/dc_edid_parser.h | 44 -
+ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 121 --
+ drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 10 -
+ drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 71 --
+ .../drm/amd/display/modules/color/color_gamma.c | 3 +-
+ .../gpu/drm/arm/display/include/malidp_product.h | 10 +-
+ drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 27 +-
+ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 18 +-
+ .../drm/arm/display/komeda/komeda_wb_connector.c | 33 +
+ drivers/gpu/drm/arm/hdlcd_crtc.c | 4 +-
+ drivers/gpu/drm/arm/malidp_crtc.c | 18 +-
+ drivers/gpu/drm/arm/malidp_planes.c | 18 +-
+ drivers/gpu/drm/armada/armada_crtc.c | 2 +-
+ drivers/gpu/drm/ast/ast_dp.c | 24 +-
+ drivers/gpu/drm/ast/ast_mode.c | 18 +-
+ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 19 +-
+ drivers/gpu/drm/bridge/Kconfig | 7 +-
+ drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 88 +-
+ drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 4 +-
+ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 15 +-
+ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h | 4 +
+ .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 1 -
+ drivers/gpu/drm/bridge/chipone-icn6211.c | 8 +-
+ drivers/gpu/drm/bridge/ite-it6505.c | 4 +-
+ drivers/gpu/drm/bridge/lontium-lt8713sx.c | 2 +-
+ drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
+ drivers/gpu/drm/bridge/lontium-lt9611.c | 6 +-
+ drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
+ drivers/gpu/drm/bridge/samsung-dsim.c | 4 +-
+ drivers/gpu/drm/bridge/sil-sii8620.c | 3 +-
+ drivers/gpu/drm/bridge/synopsys/dw-dp.c | 4 +-
+ drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 209 +--
+ drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
+ drivers/gpu/drm/bridge/tc358767.c | 4 +-
+ drivers/gpu/drm/bridge/ti-sn65dsi83.c | 79 +-
+ drivers/gpu/drm/clients/drm_log.c | 54 +-
+ drivers/gpu/drm/display/drm_bridge_connector.c | 3 +
+ drivers/gpu/drm/display/drm_hdmi_state_helper.c | 156 +++
+ drivers/gpu/drm/display/drm_scdc_helper.c | 289 ++++-
+ drivers/gpu/drm/drm_atomic.c | 4 +
+ drivers/gpu/drm/drm_atomic_uapi.c | 7 +
+ drivers/gpu/drm/drm_buddy.c | 3 +-
+ drivers/gpu/drm/drm_colorop.c | 107 ++
+ drivers/gpu/drm/drm_debugfs.c | 157 ---
+ drivers/gpu/drm/drm_drv.c | 31 +-
+ drivers/gpu/drm/drm_edid.c | 236 +++-
+ drivers/gpu/drm/drm_gem.c | 14 +-
+ drivers/gpu/drm/drm_gem_atomic_helper.c | 80 +-
+ drivers/gpu/drm/drm_of.c | 38 +-
+ drivers/gpu/drm/drm_ras.c | 278 +++-
+ drivers/gpu/drm/drm_ras_nl.c | 33 +
+ drivers/gpu/drm/drm_ras_nl.h | 8 +
+ drivers/gpu/drm/drm_simple_kms_helper.c | 37 +-
+ drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +-
+ drivers/gpu/drm/exynos/exynos_drm_dpi.c | 3 +-
+ drivers/gpu/drm/exynos/exynos_drm_vidi.c | 3 +-
+ drivers/gpu/drm/exynos/exynos_hdmi.c | 3 +-
+ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +-
+ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 10 +-
+ drivers/gpu/drm/gma500/psb_intel_display.c | 34 +-
+ drivers/gpu/drm/gud/gud_drv.c | 2 +-
+ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 18 +-
+ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +-
+ drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 9 +-
+ drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +-
+ drivers/gpu/drm/hyperv/hyperv_drm.h | 1 -
+ drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 +-
+ drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 44 +-
+ drivers/gpu/drm/i915/display/intel_atomic.c | 1 +
+ drivers/gpu/drm/i915/display/intel_audio.c | 153 +++
+ drivers/gpu/drm/i915/display/intel_audio_regs.h | 16 +-
+ drivers/gpu/drm/i915/display/intel_cdclk.c | 326 +++--
+ drivers/gpu/drm/i915/display/intel_cmtg.c | 2 +-
+ .../gpu/drm/i915/display/intel_crtc_state_dump.c | 3 +
+ drivers/gpu/drm/i915/display/intel_cursor.c | 296 +++--
+ drivers/gpu/drm/i915/display/intel_cursor_regs.h | 8 +-
+ drivers/gpu/drm/i915/display/intel_ddi.c | 36 +-
+ drivers/gpu/drm/i915/display/intel_display.c | 76 +-
+ drivers/gpu/drm/i915/display/intel_display.h | 3 +-
+ .../drm/i915/display/intel_display_clock_gating.c | 67 +-
+ .../drm/i915/display/intel_display_clock_gating.h | 16 +-
+ .../gpu/drm/i915/display/intel_display_debugfs.c | 21 +-
+ .../drm/i915/display/intel_display_power_well.c | 6 +-
+ drivers/gpu/drm/i915/display/intel_display_regs.h | 18 +-
+ drivers/gpu/drm/i915/display/intel_display_types.h | 17 +-
+ drivers/gpu/drm/i915/display/intel_display_wa.c | 4 +-
+ drivers/gpu/drm/i915/display/intel_display_wa.h | 9 -
+ drivers/gpu/drm/i915/display/intel_dp.c | 52 +-
+ drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +
+ drivers/gpu/drm/i915/display/intel_dpll.c | 22 +-
+ drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 221 +++-
+ drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 22 +
+ drivers/gpu/drm/i915/display/intel_frontbuffer.c | 3 +-
+ drivers/gpu/drm/i915/display/intel_hdmi.c | 53 +-
+ drivers/gpu/drm/i915/display/intel_hdmi.h | 11 +-
+ drivers/gpu/drm/i915/display/intel_hti.c | 3 -
+ .../gpu/drm/i915/display/intel_modeset_verify.c | 1 -
+ drivers/gpu/drm/i915/display/intel_parent.c | 10 +-
+ drivers/gpu/drm/i915/display/intel_parent.h | 3 +-
+ drivers/gpu/drm/i915/display/intel_psr.c | 18 +-
+ drivers/gpu/drm/i915/display/intel_snps_phy.c | 60 +-
+ drivers/gpu/drm/i915/display/intel_snps_phy.h | 2 +
+ drivers/gpu/drm/i915/display/intel_tdf.h | 25 -
+ drivers/gpu/drm/i915/display/intel_vrr.c | 395 ++++--
+ drivers/gpu/drm/i915/display/intel_vrr.h | 2 +
+ drivers/gpu/drm/i915/gvt/handlers.c | 2 +-
+ drivers/gpu/drm/i915/i915_dpt.c | 1 -
+ drivers/gpu/drm/i915/i915_reg.h | 2 +-
+ drivers/gpu/drm/i915/intel_clock_gating.c | 30 +-
+ drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 2 +-
+ drivers/gpu/drm/i915/intel_pcode.c | 14 +-
+ drivers/gpu/drm/i915/intel_pcode.h | 2 +-
+ drivers/gpu/drm/imx/dc/dc-crtc.c | 2 +-
+ drivers/gpu/drm/imx/dc/dc-kms.c | 8 +-
+ drivers/gpu/drm/imx/dcss/dcss-crtc.c | 2 +-
+ drivers/gpu/drm/imx/dcss/dcss-plane.c | 2 +-
+ drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 18 +-
+ drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 +-
+ drivers/gpu/drm/ingenic/ingenic-ipu.c | 2 +-
+ drivers/gpu/drm/kmb/kmb_crtc.c | 2 +-
+ drivers/gpu/drm/kmb/kmb_dsi.c | 9 +-
+ drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +-
+ drivers/gpu/drm/meson/meson_crtc.c | 2 +-
+ drivers/gpu/drm/meson/meson_encoder_cvbs.c | 11 +-
+ drivers/gpu/drm/meson/meson_encoder_dsi.c | 11 +-
+ drivers/gpu/drm/meson/meson_encoder_hdmi.c | 11 +-
+ drivers/gpu/drm/meson/meson_overlay.c | 2 +-
+ drivers/gpu/drm/meson/meson_plane.c | 2 +-
+ drivers/gpu/drm/mgag200/mgag200_drv.h | 4 +-
+ drivers/gpu/drm/mgag200/mgag200_mode.c | 15 +-
+ drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 18 +-
+ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 18 +-
+ drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 2 +-
+ drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 2 +-
+ drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 20 +-
+ drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 16 +-
+ drivers/gpu/drm/msm/msm_gem_shrinker.c | 22 +-
+ drivers/gpu/drm/mxsfb/lcdif_kms.c | 17 +-
+ drivers/gpu/drm/mxsfb/mxsfb_kms.c | 4 +-
+ drivers/gpu/drm/nouveau/dispnv04/dfp.c | 5 +-
+ drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +-
+ drivers/gpu/drm/nouveau/dispnv50/head.c | 14 +-
+ drivers/gpu/drm/nouveau/dispnv50/headca7d.c | 21 +-
+ .../gpu/drm/nouveau/include/nvhw/class/clca7d.h | 4 +
+ drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 +
+ drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 +
+ drivers/gpu/drm/nouveau/nouveau_acpi.c | 32 +-
+ drivers/gpu/drm/nouveau/nouveau_acpi.h | 10 +-
+ drivers/gpu/drm/nouveau/nouveau_connector.c | 151 ++-
+ drivers/gpu/drm/nouveau/nouveau_connector.h | 12 +-
+ drivers/gpu/drm/nouveau/nouveau_dp.c | 4 +-
+ drivers/gpu/drm/nouveau/nouveau_drm.c | 114 +-
+ drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
+ drivers/gpu/drm/nouveau/nouveau_svm.c | 13 +
+ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +-
+ drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.h | 4 +-
+ drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 +
+ drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c | 35 +
+ drivers/gpu/drm/omapdrm/dss/dsi.c | 63 +-
+ drivers/gpu/drm/omapdrm/dss/hdmi.h | 6 +
+ drivers/gpu/drm/omapdrm/dss/hdmi4.c | 29 +-
+ drivers/gpu/drm/omapdrm/dss/hdmi5.c | 37 +-
+ drivers/gpu/drm/omapdrm/dss/hdmi_common.c | 14 +
+ drivers/gpu/drm/omapdrm/omap_crtc.c | 17 +-
+ drivers/gpu/drm/panel/Kconfig | 25 +
+ drivers/gpu/drm/panel/Makefile | 2 +
+ drivers/gpu/drm/panel/panel-edp.c | 3 +
+ drivers/gpu/drm/panel/panel-himax-hx83102.c | 24 +-
+ drivers/gpu/drm/panel/panel-himax-hx83112a.c | 26 +-
+ drivers/gpu/drm/panel/panel-himax-hx83112b.c | 23 +-
+ drivers/gpu/drm/panel/panel-himax-hx8394.c | 26 +-
+ drivers/gpu/drm/panel/panel-ilitek-ili7836a.c | 297 +++++
+ drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 21 +-
+ drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c | 12 +-
+ drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.h | 1 -
+ drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c | 16 +-
+ drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c | 6 -
+ drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 15 +-
+ drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 24 +-
+ drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 19 +-
+ drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 32 +-
+ drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 20 +-
+ drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 20 +-
+ drivers/gpu/drm/panel/panel-novatek-nt36532.c | 431 +++++++
+ drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 74 +-
+ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 20 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c | 20 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 20 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 30 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 20 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 31 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c | 13 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 6 -
+ drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 12 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e63m0.h | 1 -
+ .../drm/panel/panel-samsung-s6e88a0-ams427ap24.c | 20 +-
+ .../drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 20 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 19 +-
+ .../gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c | 23 +-
+ drivers/gpu/drm/panel/panel-samsung-sofef00.c | 20 +-
+ drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 31 +-
+ drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c | 20 +-
+ drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 20 +-
+ .../gpu/drm/panel/panel-sony-tulip-truly-nt35521.c | 20 +-
+ drivers/gpu/drm/panel/panel-visionox-r66451.c | 23 +-
+ drivers/gpu/drm/panel/panel-visionox-rm69299.c | 21 +-
+ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
+ drivers/gpu/drm/panfrost/panfrost_device.c | 1 -
+ drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
+ drivers/gpu/drm/panthor/panthor_device.h | 286 ++---
+ drivers/gpu/drm/panthor/panthor_fw.c | 22 +-
+ drivers/gpu/drm/panthor/panthor_gem.c | 14 +-
+ drivers/gpu/drm/panthor/panthor_gpu.c | 117 +-
+ drivers/gpu/drm/panthor/panthor_mmu.c | 44 +-
+ drivers/gpu/drm/panthor/panthor_mmu.h | 3 +-
+ drivers/gpu/drm/panthor/panthor_pwr.c | 24 +-
+ drivers/gpu/drm/panthor/panthor_sched.c | 518 ++++----
+ drivers/gpu/drm/panthor/panthor_trace.h | 38 +
+ drivers/gpu/drm/qxl/qxl_display.c | 2 +-
+ drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c | 17 +-
+ drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c | 15 +-
+ drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 12 +-
+ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 18 +-
+ drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 18 +-
+ drivers/gpu/drm/scheduler/sched_entity.c | 10 +-
+ drivers/gpu/drm/scheduler/tests/tests_basic.c | 2 +-
+ drivers/gpu/drm/sitronix/st7571.c | 2 +-
+ drivers/gpu/drm/sitronix/st7920.c | 12 +-
+ drivers/gpu/drm/solomon/ssd130x.c | 22 +-
+ drivers/gpu/drm/sprd/sprd_dpu.c | 2 +-
+ drivers/gpu/drm/sti/sti_crtc.c | 2 +-
+ drivers/gpu/drm/stm/ltdc.c | 4 +-
+ drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +-
+ drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 +
+ drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 2 +-
+ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 2 +-
+ drivers/gpu/drm/sysfb/drm_sysfb_helper.h | 8 +-
+ drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 64 +-
+ drivers/gpu/drm/sysfb/efidrm.c | 17 +-
+ drivers/gpu/drm/sysfb/ofdrm.c | 18 +-
+ drivers/gpu/drm/sysfb/vesadrm.c | 17 +-
+ drivers/gpu/drm/tegra/dc.c | 18 +-
+ drivers/gpu/drm/tegra/dsi.c | 16 +-
+ drivers/gpu/drm/tegra/plane.c | 28 +-
+ drivers/gpu/drm/tegra/rgb.c | 15 +-
+ drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 +-
+ drivers/gpu/drm/tidss/tidss_dispc.c | 38 +-
+ drivers/gpu/drm/tidss/tidss_dispc.h | 2 +-
+ drivers/gpu/drm/tidss/tidss_encoder.c | 10 +-
+ drivers/gpu/drm/tiny/appletbdrm.c | 14 +-
+ drivers/gpu/drm/tiny/bochs.c | 2 +-
+ drivers/gpu/drm/tiny/cirrus-qemu.c | 2 +-
+ drivers/gpu/drm/tiny/pixpaper.c | 2 +-
+ drivers/gpu/drm/tiny/sharp-memory.c | 2 +-
+ drivers/gpu/drm/ttm/ttm_bo.c | 3 +-
+ drivers/gpu/drm/udl/udl_modeset.c | 2 +-
+ drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +-
+ drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c | 2 +-
+ drivers/gpu/drm/vc4/vc4_crtc.c | 14 +-
+ drivers/gpu/drm/vc4/vc4_drv.h | 2 +-
+ drivers/gpu/drm/vc4/vc4_hdmi.c | 1 +
+ drivers/gpu/drm/vc4/vc4_plane.c | 15 +-
+ drivers/gpu/drm/vc4/vc4_txp.c | 2 +-
+ drivers/gpu/drm/verisilicon/vs_crtc.c | 2 +-
+ drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 8 +-
+ drivers/gpu/drm/verisilicon/vs_plane.c | 20 -
+ drivers/gpu/drm/verisilicon/vs_plane.h | 2 -
+ drivers/gpu/drm/verisilicon/vs_primary_plane.c | 7 +-
+ drivers/gpu/drm/virtio/virtgpu_display.c | 14 +-
+ drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py | 87 ++
+ drivers/gpu/drm/vkms/tests/vkms_format_test.c | 40 +-
+ drivers/gpu/drm/vkms/vkms_colorop.c | 66 +-
+ drivers/gpu/drm/vkms/vkms_composer.c | 6 +
+ drivers/gpu/drm/vkms/vkms_crtc.c | 18 +-
+ drivers/gpu/drm/vkms/vkms_formats.c | 64 +-
+ drivers/gpu/drm/vkms/vkms_formats.h | 2 +-
+ drivers/gpu/drm/vkms/vkms_plane.c | 55 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 22 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 2 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 +-
+ drivers/gpu/drm/xe/Makefile | 4 +-
+ drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h | 1 +
+ drivers/gpu/drm/xe/abi/xe_log_abi.h | 199 +++
+ drivers/gpu/drm/xe/abi/xe_sigid_abi.h | 172 +++
+ drivers/gpu/drm/xe/display/xe_display.c | 22 +-
+ drivers/gpu/drm/xe/display/xe_display_pcode.c | 4 +-
+ drivers/gpu/drm/xe/display/xe_display_rpm.c | 2 -
+ drivers/gpu/drm/xe/display/xe_display_wa.c | 13 +-
+ drivers/gpu/drm/xe/display/xe_display_wa.h | 9 +
+ drivers/gpu/drm/xe/display/xe_tdf.c | 15 -
+ drivers/gpu/drm/xe/regs/xe_gt_regs.h | 6 +
+ drivers/gpu/drm/xe/regs/xe_lrc_layout.h | 2 +
+ drivers/gpu/drm/xe/tests/Makefile | 1 +
+ drivers/gpu/drm/xe/tests/xe_any_kunit.c | 213 ++++
+ drivers/gpu/drm/xe/tests/xe_kunit_helpers.c | 4 +
+ drivers/gpu/drm/xe/tests/xe_log_kunit.c | 553 ++++++++
+ drivers/gpu/drm/xe/xe_any.h | 137 ++
+ drivers/gpu/drm/xe/xe_debugfs.c | 15 +
+ drivers/gpu/drm/xe/xe_debugfs.h | 2 +
+ drivers/gpu/drm/xe/xe_defaults.h | 1 +
+ drivers/gpu/drm/xe/xe_device.c | 30 +-
+ drivers/gpu/drm/xe/xe_device_types.h | 23 +-
+ drivers/gpu/drm/xe/xe_drm_ras.c | 65 +
+ drivers/gpu/drm/xe/xe_drm_ras.h | 3 +
+ drivers/gpu/drm/xe/xe_exec_queue.c | 6 +-
+ drivers/gpu/drm/xe/xe_exec_queue_types.h | 21 +-
+ drivers/gpu/drm/xe/xe_ggtt.c | 74 +-
+ drivers/gpu/drm/xe/xe_gsc.c | 3 +-
+ drivers/gpu/drm/xe/xe_gt.c | 13 +-
+ drivers/gpu/drm/xe/xe_gt.h | 13 +
+ drivers/gpu/drm/xe/xe_gt_debugfs.c | 146 +++
+ drivers/gpu/drm/xe/xe_gt_idle.c | 45 +-
+ drivers/gpu/drm/xe/xe_gt_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 191 ++-
+ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 6 +
+ drivers/gpu/drm/xe/xe_gt_sriov_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_gt_stats.c | 7 +
+ drivers/gpu/drm/xe/xe_gt_stats_types.h | 22 +
+ drivers/gpu/drm/xe/xe_gt_types.h | 29 +
+ drivers/gpu/drm/xe/xe_guc.c | 18 +-
+ drivers/gpu/drm/xe/xe_guc_ct.c | 95 +-
+ drivers/gpu/drm/xe/xe_guc_ct.h | 38 +-
+ drivers/gpu/drm/xe/xe_guc_exec_queue_types.h | 32 +-
+ drivers/gpu/drm/xe/xe_guc_pagefault.c | 39 +-
+ drivers/gpu/drm/xe/xe_guc_pc.c | 15 +-
+ drivers/gpu/drm/xe/xe_guc_submit.c | 267 +++-
+ drivers/gpu/drm/xe/xe_guc_tlb_inval.c | 29 +
+ drivers/gpu/drm/xe/xe_guc_types.h | 6 +
+ drivers/gpu/drm/xe/xe_hwmon.c | 88 +-
+ drivers/gpu/drm/xe/xe_i2c.c | 22 +-
+ drivers/gpu/drm/xe/xe_i2c.h | 1 +
+ drivers/gpu/drm/xe/xe_log.c | 235 ++++
+ drivers/gpu/drm/xe/xe_log.h | 194 +++
+ drivers/gpu/drm/xe/xe_lrc.c | 33 +
+ drivers/gpu/drm/xe/xe_mert.c | 2 +-
+ drivers/gpu/drm/xe/xe_migrate.c | 2 -
+ drivers/gpu/drm/xe/xe_module.c | 4 +
+ drivers/gpu/drm/xe/xe_module.h | 1 +
+ drivers/gpu/drm/xe/xe_oa.c | 7 +-
+ drivers/gpu/drm/xe/xe_pagefault.c | 717 +++++++++--
+ drivers/gpu/drm/xe/xe_pagefault.h | 74 ++
+ drivers/gpu/drm/xe/xe_pagefault_types.h | 114 +-
+ drivers/gpu/drm/xe/xe_pci.c | 32 +-
+ drivers/gpu/drm/xe/xe_pci_error.c | 13 +-
+ drivers/gpu/drm/xe/xe_pcode.c | 27 +-
+ drivers/gpu/drm/xe/xe_pcode.h | 2 +-
+ drivers/gpu/drm/xe/xe_pm.c | 5 +
+ drivers/gpu/drm/xe/xe_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_pt.c | 6 +
+ drivers/gpu/drm/xe/xe_pxp_submit.c | 5 +-
+ drivers/gpu/drm/xe/xe_ras.c | 236 +++-
+ drivers/gpu/drm/xe/xe_ras.h | 2 +
+ drivers/gpu/drm/xe/xe_ras_types.h | 50 +
+ drivers/gpu/drm/xe/xe_sriov_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_sriov_vf_ccs.c | 1 -
+ drivers/gpu/drm/xe/xe_survivability_mode.c | 85 +-
+ drivers/gpu/drm/xe/xe_svm.c | 146 ++-
+ drivers/gpu/drm/xe/xe_svm.h | 59 +-
+ drivers/gpu/drm/xe/xe_sysctrl_event.c | 28 +-
+ drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h | 4 +
+ drivers/gpu/drm/xe/xe_tile_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_tile_sriov_printk.h | 3 +
+ drivers/gpu/drm/xe/xe_tlb_inval.c | 42 +-
+ drivers/gpu/drm/xe/xe_tlb_inval.h | 1 +
+ drivers/gpu/drm/xe/xe_tlb_inval_types.h | 10 +
+ drivers/gpu/drm/xe/xe_userptr.c | 19 +-
+ drivers/gpu/drm/xe/xe_vm.c | 301 +++--
+ drivers/gpu/drm/xe/xe_vm_types.h | 42 +-
+ drivers/gpu/drm/xe/xe_wa.c | 4 +-
+ drivers/gpu/drm/xlnx/zynqmp_kms.c | 16 +-
+ drivers/gpu/tests/gpu_buddy_test.c | 160 ++-
+ include/drm/display/drm_dp.h | 1 +
+ include/drm/display/drm_dp_helper.h | 6 +
+ include/drm/display/drm_hdmi_state_helper.h | 3 +
+ include/drm/display/drm_scdc.h | 21 +-
+ include/drm/display/drm_scdc_helper.h | 103 +-
+ include/drm/drm_colorop.h | 127 ++
+ include/drm/drm_connector.h | 69 +-
+ include/drm/drm_device.h | 1 +
+ include/drm/drm_edid.h | 2 +
+ include/drm/drm_gem.h | 3 +-
+ include/drm/drm_gem_atomic_helper.h | 11 +-
+ include/drm/drm_mipi_dbi.h | 2 +-
+ include/drm/drm_print.h | 3 +
+ include/drm/drm_ras.h | 34 +
+ include/drm/drm_simple_kms_helper.h | 6 +-
+ include/drm/intel/display_parent_interface.h | 15 +-
+ include/linux/gpu_buddy.h | 101 +-
+ include/sound/omap-hdmi-audio.h | 1 +
+ include/uapi/drm/drm_mode.h | 12 +
+ include/uapi/drm/drm_ras.h | 18 +
+ kernel/cgroup/dmem.c | 4 +-
+ sound/soc/ti/omap-hdmi.c | 51 +-
+ 435 files changed, 12556 insertions(+), 4979 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili7836a.yaml
+ create mode 100644 Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
+ create mode 100644 Documentation/gpu/xe/xe_sigid.rst
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/dc_edid_parser.c
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/dc_edid_parser.h
+ delete mode 100644 drivers/gpu/drm/i915/display/intel_tdf.h
+ create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c
+ create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili7836a.c
+ create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
+ create mode 100755 drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py
+ create mode 100644 drivers/gpu/drm/xe/abi/xe_log_abi.h
+ create mode 100644 drivers/gpu/drm/xe/abi/xe_sigid_abi.h
+ create mode 100644 drivers/gpu/drm/xe/display/xe_display_wa.h
+ delete mode 100644 drivers/gpu/drm/xe/display/xe_tdf.c
+ create mode 100644 drivers/gpu/drm/xe/tests/xe_any_kunit.c
+ create mode 100644 drivers/gpu/drm/xe/tests/xe_log_kunit.c
+ create mode 100644 drivers/gpu/drm/xe/xe_any.h
+ create mode 100644 drivers/gpu/drm/xe/xe_log.c
+ create mode 100644 drivers/gpu/drm/xe/xe_log.h
+Merging drm-exynos/for-linux-next (3a8660878839f Linux 6.18-rc1)
+$ git merge -m Merge branch 'for-linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git drm-exynos/for-linux-next
+Already up to date.
+Merging drm-misc/for-linux-next (f1bcb90506a9a drm/crtc: Remove reset)
+$ git merge -m Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc/for-linux-next
+Auto-merging drivers/gpu/drm/qxl/qxl_display.c
+Auto-merging drivers/gpu/drm/vboxvideo/vbox_mode.c
+Auto-merging drivers/gpu/drm/verisilicon/vs_cursor_plane.c
+Auto-merging drivers/gpu/drm/verisilicon/vs_primary_plane.c
+Auto-merging drivers/gpu/drm/virtio/virtgpu_plane.c
+Auto-merging drivers/video/fbdev/core/fbcon.c
+Auto-merging include/linux/dma-fence.h
+Merge made by the 'ort' strategy.
+ .../display/bridge/renesas,r8a779g0-dsc.yaml | 96 +++
+ .../bindings/display/solomon,ssd1351.yaml | 42 +
+ drivers/accel/amdxdna/amdxdna_gem.c | 185 ++++-
+ drivers/accel/ivpu/ivpu_drv.c | 13 +
+ drivers/accel/ivpu/ivpu_job.c | 85 ++
+ drivers/accel/ivpu/ivpu_job.h | 5 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 31 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 2 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 28 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 2 +-
+ .../display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 23 +-
+ .../display/amdgpu_dm/tests/amdgpu_dm_plane_test.c | 30 +-
+ drivers/gpu/drm/armada/armada_overlay.c | 39 +-
+ drivers/gpu/drm/armada/armada_plane.c | 15 +-
+ drivers/gpu/drm/armada/armada_plane.h | 2 +-
+ drivers/gpu/drm/aspeed/aspeed_gfx.h | 11 +-
+ drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 203 +++--
+ drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-
+ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 33 +-
+ drivers/gpu/drm/clients/drm_fbdev_client.c | 23 +-
+ drivers/gpu/drm/drm_atomic.c | 32 +-
+ drivers/gpu/drm/drm_atomic_helper.c | 8 +-
+ drivers/gpu/drm/drm_atomic_state_helper.c | 45 -
+ drivers/gpu/drm/drm_bridge.c | 21 +
+ drivers/gpu/drm/drm_client_event.c | 18 +
+ drivers/gpu/drm/drm_edid.c | 1 +
+ drivers/gpu/drm/drm_gem_atomic_helper.c | 20 -
+ drivers/gpu/drm/drm_mode_config.c | 17 +-
+ drivers/gpu/drm/drm_sysfs.c | 32 -
+ drivers/gpu/drm/exynos/exynos_drm_plane.c | 22 +-
+ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 2 +-
+ drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +-
+ drivers/gpu/drm/i915/i915_switcheroo.c | 11 +-
+ drivers/gpu/drm/imagination/pvr_ccb.c | 43 +-
+ drivers/gpu/drm/imagination/pvr_device.c | 25 +-
+ drivers/gpu/drm/imagination/pvr_fw.c | 23 +-
+ drivers/gpu/drm/imagination/pvr_fw.h | 2 +-
+ drivers/gpu/drm/imagination/pvr_fw_meta.c | 18 +-
+ drivers/gpu/drm/imagination/pvr_fw_riscv.c | 40 +-
+ drivers/gpu/drm/imagination/pvr_fw_startstop.c | 22 +-
+ drivers/gpu/drm/imagination/pvr_fw_trace.c | 1 -
+ drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h | 920 +++------------------
+ drivers/gpu/drm/imagination/pvr_rogue_defs.h | 22 +-
+ drivers/gpu/drm/imagination/pvr_rogue_riscv.h | 2 -
+ drivers/gpu/drm/imx/dc/dc-plane.c | 2 +-
+ drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 19 +-
+ drivers/gpu/drm/kmb/kmb_plane.c | 2 +-
+ drivers/gpu/drm/logicvc/logicvc_crtc.c | 2 +-
+ drivers/gpu/drm/logicvc/logicvc_layer.c | 2 +-
+ drivers/gpu/drm/loongson/lsdc_crtc.c | 30 +-
+ drivers/gpu/drm/loongson/lsdc_plane.c | 2 +-
+ drivers/gpu/drm/mcde/mcde_display.c | 272 +++---
+ drivers/gpu/drm/mcde/mcde_drm.h | 12 +-
+ drivers/gpu/drm/mcde/mcde_drv.c | 3 +-
+ drivers/gpu/drm/mcde/mcde_dsi.c | 8 +-
+ drivers/gpu/drm/mediatek/mtk_crtc.c | 18 +-
+ drivers/gpu/drm/mediatek/mtk_plane.c | 21 +-
+ drivers/gpu/drm/mxsfb/lcdif_kms.c | 2 +-
+ drivers/gpu/drm/mxsfb/mxsfb_kms.c | 2 +-
+ drivers/gpu/drm/nouveau/dispnv50/wndw.c | 15 +-
+ drivers/gpu/drm/nouveau/nouveau_vga.c | 28 +-
+ drivers/gpu/drm/omapdrm/omap_plane.c | 13 +-
+ drivers/gpu/drm/panel/panel-edp.c | 1 +
+ drivers/gpu/drm/panel/panel-samsung-dsi.h | 38 +
+ drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 71 +-
+ drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 70 +-
+ .../drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 6 +-
+ .../gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c | 23 +-
+ drivers/gpu/drm/panel/panel-samsung-sofef00.c | 15 +-
+ drivers/gpu/drm/pl111/pl111_display.c | 207 +++--
+ drivers/gpu/drm/pl111/pl111_drm.h | 5 +-
+ drivers/gpu/drm/pl111/pl111_drv.c | 19 +-
+ drivers/gpu/drm/pl111/pl111_versatile.c | 18 -
+ drivers/gpu/drm/qxl/qxl_display.c | 4 +-
+ drivers/gpu/drm/radeon/radeon_device.c | 9 +-
+ drivers/gpu/drm/renesas/rcar-du/Kconfig | 12 +
+ drivers/gpu/drm/renesas/rcar-du/Makefile | 1 +
+ drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c | 153 ++++
+ drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c | 17 +-
+ drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 17 +-
+ drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c | 17 +-
+ drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 51 +-
+ drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 15 +-
+ drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 17 +-
+ drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 66 +-
+ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +-
+ drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
+ drivers/gpu/drm/scheduler/sched_fence.c | 3 +-
+ drivers/gpu/drm/scheduler/sched_internal.h | 3 +-
+ drivers/gpu/drm/scheduler/sched_main.c | 2 +-
+ drivers/gpu/drm/sitronix/st7920.c | 12 +-
+ drivers/gpu/drm/solomon/ssd130x-spi.c | 25 +-
+ drivers/gpu/drm/solomon/ssd130x.c | 421 ++++++++--
+ drivers/gpu/drm/solomon/ssd130x.h | 10 +-
+ drivers/gpu/drm/sprd/sprd_dpu.c | 2 +-
+ drivers/gpu/drm/sti/sti_cursor.c | 2 +-
+ drivers/gpu/drm/sti/sti_gdp.c | 2 +-
+ drivers/gpu/drm/sti/sti_hqvdp.c | 2 +-
+ drivers/gpu/drm/stm/ltdc.c | 2 +-
+ drivers/gpu/drm/sun4i/sun4i_layer.c | 21 +-
+ drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 8 +-
+ drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 54 --
+ drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 +-
+ drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +-
+ drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +-
+ drivers/gpu/drm/tiny/arcpgu.c | 201 +++--
+ drivers/gpu/drm/tiny/gm12u320.c | 138 +++-
+ drivers/gpu/drm/tiny/repaper.c | 138 +++-
+ drivers/gpu/drm/ttm/ttm_module.c | 1 -
+ drivers/gpu/drm/tve200/tve200_display.c | 219 +++--
+ drivers/gpu/drm/tve200/tve200_drm.h | 6 +-
+ drivers/gpu/drm/tve200/tve200_drv.c | 12 +-
+ drivers/gpu/drm/v3d/v3d_drv.h | 6 -
+ drivers/gpu/drm/v3d/v3d_gem.c | 3 -
+ drivers/gpu/drm/v3d/v3d_sched.c | 4 -
+ drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +-
+ drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 2 +-
+ drivers/gpu/drm/verisilicon/vs_plane.c | 14 +-
+ drivers/gpu/drm/verisilicon/vs_plane.h | 2 +-
+ drivers/gpu/drm/verisilicon/vs_primary_plane.c | 2 +-
+ drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +-
+ drivers/gpu/drm/vkms/vkms_composer.c | 30 +-
+ drivers/gpu/drm/vkms/vkms_drv.h | 2 +-
+ drivers/gpu/drm/vkms/vkms_formats.c | 48 +-
+ drivers/gpu/drm/vkms/vkms_plane.c | 36 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 17 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 +-
+ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 +-
+ drivers/gpu/drm/xen/xen_drm_front.h | 6 +-
+ drivers/gpu/drm/xen/xen_drm_front_kms.c | 188 +++--
+ drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +-
+ drivers/gpu/vga/vga_switcheroo.c | 41 +-
+ drivers/video/fbdev/core/fbcon.c | 8 -
+ include/drm/drm_atomic.h | 89 +-
+ include/drm/drm_atomic_state_helper.h | 3 -
+ include/drm/drm_client.h | 14 +
+ include/drm/drm_client_event.h | 3 +
+ include/drm/drm_crtc.h | 12 -
+ include/drm/drm_gem_atomic_helper.h | 2 -
+ include/drm/drm_modeset_helper_vtables.h | 14 +
+ include/drm/drm_simple_kms_helper.h | 1 -
+ include/drm/drm_sysfs.h | 4 -
+ include/linux/dma-fence.h | 2 +-
+ include/linux/vga_switcheroo.h | 29 +-
+ include/uapi/drm/ivpu_accel.h | 17 +-
+ 149 files changed, 3151 insertions(+), 2305 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,r8a779g0-dsc.yaml
+ create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd1351.yaml
+ create mode 100644 drivers/gpu/drm/panel/panel-samsung-dsi.h
+ create mode 100644 drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
+$ git am -3 ../patches/0001-drm-bridge-microchip-lvds-Rename-drm_atomic_state-to.patch
+Applying: drm/bridge: microchip-lvds: Rename drm_atomic_state to drm_atomic_commit
+Using index info to reconstruct a base tree...
+M drivers/gpu/drm/bridge/microchip-lvds.c
+Falling back to patching base and 3-way merge...
+Auto-merging drivers/gpu/drm/bridge/microchip-lvds.c
+No changes -- Patch already applied.
+Merging amdgpu/drm-next (9f725dd80ae78 rust/drm/gem: initialize callbacks with ..pin_init::zeroed())
+$ git merge -m Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git amdgpu/drm-next
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+Auto-merging drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+Auto-merging drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_helpers_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_irq_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c
+Auto-merging drivers/gpu/drm/amd/display/dc/Makefile
+Auto-merging drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
+Auto-merging drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
+Auto-merging drivers/gpu/drm/amd/display/dc/core/dc.c
+Auto-merging drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c
+Auto-merging drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c
+Auto-merging drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.c
+Auto-merging drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h
+Auto-merging drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_translation_helper.c
+Auto-merging drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
+Auto-merging drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+Auto-merging drivers/gpu/drm/amd/pm/amdgpu_dpm.c
+Auto-merging drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
+Auto-merging drivers/gpu/drm/amd/ras/core/cmd.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/ras/core/cmd.c
+Auto-merging drivers/gpu/drm/drm_edid.c
+Auto-merging drivers/gpu/drm/drm_gem.c
+Auto-merging include/drm/drm_connector.h
+Auto-merging include/drm/drm_gem.h
+Auto-merging include/uapi/drm/amdgpu_drm.h
+Auto-merging rust/kernel/drm/gem/mod.rs
+Resolved 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c' using previous resolution.
+Resolved 'drivers/gpu/drm/amd/ras/core/cmd.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 39627c409d12f] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git
+$ git diff -M --stat --summary HEAD^..
+ Documentation/gpu/amdgpu/index.rst | 1 +
+ Documentation/gpu/amdgpu/ualink.rst | 75 +
+ drivers/gpu/drm/amd/amdgpu/Makefile | 5 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 3 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h | 3 +-
+ .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c | 36 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h | 3 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 14 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 8 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 337 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 13 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 5 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 31 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 15 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 124 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 33 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 27 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 35 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 11 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 38 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | 2 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c | 20 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h | 4 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c | 6 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 99 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 11 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h | 3 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 587 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 86 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 105 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 3 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 8 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 7 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 3 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 12 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 58 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 6299 ++
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.h | 427 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 46 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 8 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 40 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 68 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 39 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 52 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 122 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_internal.h | 155 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 35 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 6 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c | 4 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 34 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 11 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h | 7 +
+ drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 49 +-
+ drivers/gpu/drm/amd/amdgpu/cik.c | 7 -
+ drivers/gpu/drm/amd/amdgpu/cik_ih.c | 12 -
+ drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 35 +-
+ drivers/gpu/drm/amd/amdgpu/cz_ih.c | 12 -
+ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 44 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 44 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 44 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 307 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v12_1_pkt.h | 39 -
+ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 26 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 39 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 153 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 146 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 28 +-
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 33 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c | 41 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 2 +
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 9 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 11 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 17 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 58 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 175 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v12_1.h | 2 +
+ drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 7 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 7 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 19 +-
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 13 +-
+ drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 12 -
+ drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 39 +-
+ drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 16 +-
+ drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 43 +-
+ drivers/gpu/drm/amd/amdgpu/imu_v12_1.c | 91 +-
+ drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 3 +-
+ drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.h | 8 -
+ drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c | 265 +-
+ drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/lsdma_v7_1.c | 27 +-
+ drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 59 +-
+ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 20 +-
+ drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 75 +-
+ drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c | 372 +-
+ drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 11 +-
+ drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 155 +-
+ drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 2 +-
+ drivers/gpu/drm/amd/amdgpu/nbio_v6_3_2.c | 18 +-
+ drivers/gpu/drm/amd/amdgpu/nbio_v7_11_5.c | 351 +
+ drivers/gpu/drm/amd/amdgpu/nbio_v7_11_5.h | 32 +
+ drivers/gpu/drm/amd/amdgpu/nv.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 162 +
+ drivers/gpu/drm/amd/amdgpu/psp_v15_0_8.c | 146 +
+ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 50 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 50 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 53 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 53 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 52 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 51 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 84 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 84 +-
+ drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c | 80 +-
+ drivers/gpu/drm/amd/amdgpu/si.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/si_dma.c | 31 +-
+ drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/soc15.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/soc21.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/soc24.c | 6 -
+ drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 482 +-
+ drivers/gpu/drm/amd/amdgpu/soc_v1_0.h | 3 +
+ drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 1 +
+ drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 12 -
+ drivers/gpu/drm/amd/amdgpu/ualink_v1_0.c | 143 +
+ drivers/gpu/drm/amd/amdgpu/ualink_v1_0.h | 30 +
+ drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 8 -
+ drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 8 -
+ drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 8 -
+ drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/vce_v1_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 +-
+ drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 16 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 23 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 21 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 23 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 23 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 19 -
+ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c | 351 +-
+ drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 -
+ drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 7 -
+ drivers/gpu/drm/amd/amdgpu/vi.c | 6 -
+ drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 1290 +-
+ .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm | 135 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 +-
+ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 86 +-
+ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 1 +
+ drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 51 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c | 30 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 3 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 44 +-
+ .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 10 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +-
+ drivers/gpu/drm/amd/display/Kconfig | 9 +
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 333 +-
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 145 +-
+ .../amd/display/amdgpu_dm/amdgpu_dm_backlight.c | 33 +-
+ .../amd/display/amdgpu_dm/amdgpu_dm_backlight.h | 1 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 110 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 28 +
+ .../amd/display/amdgpu_dm/amdgpu_dm_connector.c | 256 +-
+ .../amd/display/amdgpu_dm/amdgpu_dm_connector.h | 20 +
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 50 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 7 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c | 63 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.h | 6 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 88 +
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 47 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 15 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c | 47 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 32 +
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 8 +
+ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 12 +-
+ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 4 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 48 +-
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 12 +
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 35 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 72 +-
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.h | 16 +
+ .../gpu/drm/amd/display/amdgpu_dm/tests/Makefile | 4 +-
+ .../amdgpu_dm/tests/amdgpu_dm_backlight_test.c | 53 +-
+ .../amdgpu_dm/tests/amdgpu_dm_colorop_test.c | 232 +-
+ .../amdgpu_dm/tests/amdgpu_dm_connector_test.c | 3581 ++
+ .../display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 745 +
+ .../amdgpu_dm/tests/amdgpu_dm_cursor_test.c | 732 +
+ .../display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c | 578 +-
+ .../amdgpu_dm/tests/amdgpu_dm_freesync_test.c | 407 +
+ .../amdgpu_dm/tests/amdgpu_dm_helpers_test.c | 879 +-
+ .../display/amdgpu_dm/tests/amdgpu_dm_irq_test.c | 1300 +-
+ .../display/amdgpu_dm/tests/amdgpu_dm_ism_test.c | 367 +-
+ .../amdgpu_dm/tests/amdgpu_dm_mst_types_test.c | 741 +
+ .../display/amdgpu_dm/tests/amdgpu_dm_plane_test.c | 703 +-
+ .../amdgpu_dm/tests/amdgpu_dm_services_test.c | 228 +-
+ .../amd/display/amdgpu_dm/tests/amdgpu_dm_test.c | 4224 +-
+ .../display/amdgpu_dm/tests/amdgpu_dm_wb_test.c | 330 +
+ drivers/gpu/drm/amd/display/dc/Makefile | 1 +
+ .../drm/amd/display/dc/bios/command_table_helper.c | 7 +-
+ .../amd/display/dc/bios/command_table_helper2.c | 2 +
+ drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 8 +
+ drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 4 +
+ .../amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c | 12 +-
+ .../amd/display/dc/clk_mgr/dcn10/dcn10_clk_mgr.c | 181 +
+ .../amd/display/dc/clk_mgr/dcn10/dcn10_clk_mgr.h | 29 +
+ .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 9 +-
+ .../drm/amd/display/dc/clk_mgr/dcn10/rv2_clk_mgr.c | 6 +-
+ .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 12 +-
+ .../amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c | 6 +-
+ .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 5 +-
+ .../amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 8 +-
+ .../drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 +-
+ .../amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 10 +-
+ .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 10 +-
+ .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 14 +-
+ .../amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 10 +-
+ .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 18 +-
+ .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 12 +-
+ .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 18 +-
+ .../amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 26 +-
+ .../amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 5 +
+ .../amd/display/dc/clk_mgr/dcn42b/dcn42b_clk_mgr.c | 51 +-
+ .../gpu/drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h | 344 +-
+ .../amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 339 +-
+ .../amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h | 17 +-
+ .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c | 214 +-
+ .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h | 167 +-
+ .../display/dc/clk_mgr/dcn60/dcn60_smu_driver_if.h | 78 +
+ drivers/gpu/drm/amd/display/dc/core/dc.c | 33 +-
+ drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 +
+ .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 488 +-
+ .../gpu/drm/amd/display/dc/core/dc_link_exports.c | 25 +-
+ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 92 +-
+ drivers/gpu/drm/amd/display/dc/core/dc_state.c | 4 +-
+ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 21 +-
+ drivers/gpu/drm/amd/display/dc/dc.h | 18 +-
+ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 117 +-
+ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 46 +-
+ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 18 +-
+ drivers/gpu/drm/amd/display/dc/dc_probe.h | 1 +
+ drivers/gpu/drm/amd/display/dc/dc_types.h | 4 +-
+ .../gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c | 1 +
+ .../gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c | 14 +-
+ .../gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.h | 2 +-
+ drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 12 +-
+ .../gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c | 8 +-
+ .../amd/display/dc/dio/dcn10/dcn10_link_encoder.c | 10 +-
+ .../display/dc/dio/dcn42/dcn42_dio_link_encoder.c | 4 +-
+ .../gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c | 1 -
+ .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 18 +-
+ .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2 +-
+ .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 2 +-
+ .../gpu/drm/amd/display/dc/dml/dml1_frl_cap_chk.c | 8 +-
+ .../gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 1 -
+ drivers/gpu/drm/amd/display/dc/dml2_0/Makefile | 17 +-
+ .../amd/display/dc/dml2_0/dml21/dml21_wrapper.h | 106 -
+ .../dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h | 39 +-
+ .../dml21/inc/bounding_boxes/dcn42b_soc_bb.h | 35 +-
+ .../dml2_0/dml21/inc/bounding_boxes/dcn4_soc_bb.h | 25 +-
+ .../dml2_0/dml21/inc/bounding_boxes/dcn6_soc_bb.h | 12 +
+ .../dc/dml2_0/dml21/inc/dml_top_dchub_registers.h | 1 +
+ .../dml2_0/dml21/inc/dml_top_display_cfg_types.h | 1 +
+ .../dml2_0/dml21/inc/dml_top_soc_parameter_types.h | 28 +-
+ .../display/dc/dml2_0/dml21/inc/dml_top_types.h | 14 +
+ .../dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c | 4 +-
+ .../dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c | 4 +
+ .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 72 +-
+ .../dml21/src/dml2_core/dml2_core_dcn4_calcs.h | 1 +
+ .../src/dml2_core/dml2_core_dcn5_calcs_dchub.c | 18 +-
+ .../src/dml2_core/dml2_core_dcn5_calcs_dchub.h | 23 +
+ .../dml2_core/dml2_core_dcn5_calcs_display_pipe.c | 2 +-
+ .../dml2_core/dml2_core_dcn5_funcs_initialize.c | 2 +-
+ .../dml2_core_dcn5_funcs_mode_programming.c | 4 +
+ .../dml2_core/dml2_core_dcn5_funcs_mode_support.c | 32 +-
+ .../dml21/src/dml2_core/dml2_core_dcn6_calcs.c | 63 +-
+ .../dml21/src/dml2_core/dml2_core_dcn6_calcs.h | 468 +
+ .../src/dml2_core/dml2_core_dcn6_calcs_dchub.c | 86 +-
+ .../dml2_core/dml2_core_dcn6_funcs_initialize.c | 4 +
+ .../dml2_core_dcn6_funcs_mode_programming.c | 52 +-
+ .../dml2_core_dcn6_funcs_mode_programming.h | 31 +
+ .../dml2_core/dml2_core_dcn6_funcs_mode_support.c | 350 +-
+ .../dml2_core/dml2_core_dcn6_funcs_mode_support.h | 324 +
+ .../dml21/src/dml2_core/dml2_core_shared_types.h | 8 +-
+ .../dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 106 +-
+ .../dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 2 +-
+ .../src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c | 13 +
+ .../dml21/src/inc/dml2_internal_shared_types.h | 19 +
+ .../gpu/drm/amd/display/dc/dml2_wrapper/Makefile | 61 +
+ .../dml21_wrapper}/dml21_translation_helper.c | 45 +-
+ .../dml21_wrapper}/dml21_translation_helper.h | 7 +-
+ .../dml21_wrapper}/dml21_utils.c | 24 +-
+ .../dml21_wrapper}/dml21_utils.h | 7 +-
+ .../dml21_wrapper}/dml21_wrapper.c | 2 +-
+ .../dc/dml2_wrapper/dml21_wrapper/dml21_wrapper.h | 107 +
+ .../dml21_wrapper}/dml21_wrapper_fpu.c | 19 +-
+ .../dml21_wrapper}/dml21_wrapper_fpu.h | 7 +-
+ .../dml2_dc_resource_mgmt.c | 60 +-
+ .../dml2_dc_resource_mgmt.h | 0
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_dc_types.h | 0
+ .../{dml2_0 => dml2_wrapper}/dml2_internal_types.h | 2 +-
+ .../{dml2_0 => dml2_wrapper}/dml2_mall_phantom.c | 70 +-
+ .../{dml2_0 => dml2_wrapper}/dml2_mall_phantom.h | 0
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_policy.c | 2 +-
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_policy.h | 0
+ .../dml2_translation_helper.c | 20 +-
+ .../dml2_translation_helper.h | 0
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_utils.c | 28 +-
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_utils.h | 0
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_wrapper.c | 6 +-
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_wrapper.h | 0
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_wrapper_fpu.c | 45 +-
+ .../dc/{dml2_0 => dml2_wrapper}/dml2_wrapper_fpu.h | 0
+ .../gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h | 11 +-
+ .../gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h | 7 +-
+ drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 8 +
+ .../gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c | 4 +-
+ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 7 +-
+ drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 +
+ drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 4 +
+ .../dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.c | 131 +-
+ .../drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h | 11 +-
+ .../drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c | 5 +-
+ .../drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c | 7 +
+ .../drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.c | 209 +-
+ .../drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.h | 19 +-
+ .../gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c | 6 +-
+ .../gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.h | 2 +-
+ .../gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 2 +-
+ .../gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c | 3 +
+ drivers/gpu/drm/amd/display/dc/hwss/Makefile | 6 +
+ .../gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.c | 46 +-
+ .../gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.h | 12 +-
+ .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 25 +-
+ .../drm/amd/display/dc/hwss/dce60/dce60_hwseq.c | 8 +-
+ .../drm/amd/display/dc/hwss/dce80/dce80_hwseq.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 152 +-
+ .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.h | 13 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn10/dcn10_init.c | 4 +-
+ .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 237 +-
+ .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.h | 21 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn20/dcn20_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c | 34 +-
+ .../drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.h | 5 +-
+ .../drm/amd/display/dc/hwss/dcn201/dcn201_init.c | 4 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn21/dcn21_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 57 +-
+ .../drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.h | 8 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn30/dcn30_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn301/dcn301_init.c | 3 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn31/dcn31_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 8 +-
+ .../drm/amd/display/dc/hwss/dcn314/dcn314_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 71 +-
+ .../drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.h | 10 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn32/dcn32_init.c | 3 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn351/dcn351_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 204 +-
+ .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 12 +-
+ .../drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 49 +-
+ .../drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 12 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn42/dcn42_init.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.c | 3 +-
+ .../drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 50 +-
+ .../gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.c | 3 +-
+ drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 114 +-
+ .../drm/amd/display/dc/hwss/hw_sequencer_private.h | 21 +-
+ drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 +
+ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 9 +
+ drivers/gpu/drm/amd/display/dc/inc/custom_float.h | 21 +-
+ drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 1 +
+ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 10 -
+ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 14 +-
+ drivers/gpu/drm/amd/display/dc/inc/link_service.h | 7 +-
+ drivers/gpu/drm/amd/display/dc/irq/Makefile | 2 +
+ .../amd/display/dc/irq/dce110/irq_service_dce110.c | 21 -
+ .../amd/display/dc/irq/dce110/irq_service_dce110.h | 9 -
+ drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 28 +
+ drivers/gpu/drm/amd/display/dc/irq/irq_service.h | 9 +
+ .../amd/display/dc/link/hwss/link_hwss_hpo_dp.c | 23 +-
+ .../gpu/drm/amd/display/dc/link/link_detection.c | 4 +-
+ drivers/gpu/drm/amd/display/dc/link/link_factory.c | 6 +-
+ .../display/dc/link/protocols/link_dp_capability.c | 3 +-
+ .../dc/link/protocols/link_dp_panel_replay.c | 36 +-
+ .../dc/link/protocols/link_dp_panel_replay.h | 2 +-
+ .../dc/link/protocols/link_edp_panel_control.c | 81 +-
+ .../dc/link/protocols/link_edp_panel_control.h | 4 +
+ .../amd/display/dc/link/protocols/link_hdmi_frl.c | 32 +-
+ .../gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c | 2 +
+ drivers/gpu/drm/amd/display/dc/os_types.h | 18 +
+ drivers/gpu/drm/amd/display/dc/resource/Makefile | 4 +
+ .../display/dc/resource/dce112/dce112_resource.c | 62 -
+ .../amd/display/dc/resource/dcn32/dcn32_resource.c | 2 +-
+ .../amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +-
+ .../display/dc/resource/dcn351/dcn351_resource.c | 2 +-
+ .../amd/display/dc/resource/dcn36/dcn36_resource.c | 2 +-
+ .../display/dc/resource/dcn401/dcn401_resource.c | 2 +-
+ .../amd/display/dc/resource/dcn42/dcn42_resource.c | 6 +-
+ .../display/dc/resource/dcn42b/dcn42b_resource.c | 6 +-
+ .../amd/display/dc/resource/dcn60/dcn60_resource.c | 42 +-
+ .../amd/display/dc/resource/dcn60/dcn60_resource.h | 9 +-
+ .../dcn401/dcn401_soc_and_ip_translator.c | 6 +-
+ .../dcn60/dcn60_soc_and_ip_translator.c | 6 +-
+ drivers/gpu/drm/amd/display/dc/sspl/Makefile | 5 +-
+ drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 130 +-
+ .../amd/display/dc/sspl/dc_spl_isharp_filters.c | 10 +-
+ .../amd/display/dc/sspl/dc_spl_scl_easf_filters.c | 88 +-
+ .../drm/amd/display/dc/sspl/dc_spl_scl_filters.c | 24 +-
+ drivers/gpu/drm/amd/display/dc/sspl/dc_spl_types.h | 60 +-
+ .../gpu/drm/amd/display/dc/sspl/spl_custom_float.c | 152 -
+ .../gpu/drm/amd/display/dc/sspl/spl_custom_float.h | 29 -
+ .../gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.c | 495 -
+ .../gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h | 526 -
+ .../gpu/drm/amd/display/dc/sspl/spl_namespace.h | 17 +
+ drivers/gpu/drm/amd/display/dc/sspl/spl_os_types.h | 43 +-
+ drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 65 +
+ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 2 +-
+ drivers/gpu/drm/amd/display/include/dal_asic_id.h | 5 +
+ .../drm/amd/display/modules/inc/mod_info_packet.h | 4 +
+ .../gpu/drm/amd/display/modules/inc/mod_power.h | 1 +
+ .../amd/display/modules/info_packet/info_packet.c | 109 +
+ drivers/gpu/drm/amd/include/amd_shared.h | 6 +-
+ .../drm/amd/include/asic_reg/gc/gc_12_1_0_offset.h | 2 +
+ .../amd/include/asic_reg/gc/gc_12_1_0_sh_mask.h | 4 +-
+ .../amd/include/asic_reg/nbio/nbio_7_11_5_offset.h | 11074 ++++
+ .../include/asic_reg/nbio/nbio_7_11_5_sh_mask.h | 63248 +++++++++++++++++++
+ drivers/gpu/drm/amd/include/discovery.h | 179 +-
+ .../amd/include/ivsrcid/mpnht/irqsrcs_mpnht_15_0.h | 30 +
+ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 3 +-
+ drivers/gpu/drm/amd/include/v12_structs.h | 2 +-
+ drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 -
+ drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 6 -
+ drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 7 -
+ drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 6 -
+ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 38 +-
+ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 15 +-
+ .../pm/swsmu/inc/pmfw_if/smu15_driver_if_v15_0_0.h | 46 -
+ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v15_0.h | 6 -
+ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 7 +-
+ drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c | 166 -
+ .../gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c | 270 +-
+ .../gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 11 +-
+ drivers/gpu/drm/amd/ras/core/Makefile | 9 +-
+ drivers/gpu/drm/amd/ras/core/aca.c | 353 +-
+ drivers/gpu/drm/amd/ras/core/aca.h | 44 +-
+ drivers/gpu/drm/amd/ras/core/aca_v1_0.c | 41 +-
+ drivers/gpu/drm/amd/ras/core/aca_v5_0.c | 448 +
+ drivers/gpu/drm/amd/ras/core/aca_v5_0.h | 62 +
+ drivers/gpu/drm/amd/ras/core/cmd.c | 147 +-
+ drivers/gpu/drm/amd/ras/core/cmd.h | 32 +-
+ drivers/gpu/drm/amd/ras/core/core.c | 309 +-
+ drivers/gpu/drm/amd/ras/core/eeprom.c | 504 +-
+ drivers/gpu/drm/amd/ras/core/eeprom.h | 27 +-
+ drivers/gpu/drm/amd/ras/core/eeprom_fw.c | 640 +-
+ drivers/gpu/drm/amd/ras/core/eeprom_fw.h | 67 +-
+ drivers/gpu/drm/amd/ras/core/log_ring.c | 56 +-
+ drivers/gpu/drm/amd/ras/core/log_ring.h | 46 +-
+ drivers/gpu/drm/amd/ras/core/ras.h | 129 +-
+ drivers/gpu/drm/amd/ras/core/ras_bert.c | 546 +
+ drivers/gpu/drm/amd/ras/core/ras_bert.h | 33 +
+ drivers/gpu/drm/amd/ras/core/ras_cper.c | 844 +-
+ drivers/gpu/drm/amd/ras/core/ras_cper.h | 177 +-
+ drivers/gpu/drm/amd/ras/core/ras_eeprom_mgr.c | 418 +
+ drivers/gpu/drm/amd/ras/core/ras_eeprom_mgr.h | 124 +
+ drivers/gpu/drm/amd/ras/core/ras_gfx.c | 10 +-
+ drivers/gpu/drm/amd/ras/core/ras_mce.c | 151 +
+ drivers/gpu/drm/amd/ras/core/ras_mce.h | 51 +
+ drivers/gpu/drm/amd/ras/core/ras_mp1.c | 156 +-
+ drivers/gpu/drm/amd/ras/core/ras_mp1.h | 52 +-
+ drivers/gpu/drm/amd/ras/core/ras_mp1_v13_0.c | 12 +-
+ drivers/gpu/drm/amd/ras/core/ras_mp1_v15_0.c | 249 +
+ drivers/gpu/drm/amd/ras/core/ras_mp1_v15_0.h | 30 +
+ drivers/gpu/drm/amd/ras/core/ras_nbio.c | 9 +-
+ drivers/gpu/drm/amd/ras/core/ras_process.c | 36 +-
+ drivers/gpu/drm/amd/ras/core/ras_psp.c | 599 +-
+ drivers/gpu/drm/amd/ras/core/ras_psp.h | 111 +-
+ drivers/gpu/drm/amd/ras/core/ras_psp_v13_0.c | 76 +
+ drivers/gpu/drm/amd/ras/core/ras_psp_v15_0.c | 133 +
+ drivers/gpu/drm/amd/ras/core/ras_psp_v15_0.h | 31 +
+ drivers/gpu/drm/amd/ras/core/ras_umc.c | 635 +-
+ drivers/gpu/drm/amd/ras/core/ras_umc.h | 52 +-
+ drivers/gpu/drm/amd/ras/core/ras_umc_v12_0.c | 143 +-
+ drivers/gpu/drm/amd/ras/core/ras_umc_v12_0.h | 3 -
+ drivers/gpu/drm/amd/ras/core/ras_umc_v15_0.c | 220 +
+ drivers/gpu/drm/amd/ras/core/ras_umc_v15_0.h | 69 +
+ drivers/gpu/drm/amd/ras/core/ta_if.h | 35 +
+ drivers/gpu/drm/amd/ras/ras_mgr/Makefile | 5 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_bert.c | 191 +
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_bert.h | 30 +
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_cmd.c | 38 +
+ .../drm/amd/ras/ras_mgr/amdgpu_ras_eeprom_i2c.c | 141 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mce.c | 267 +
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mce.h | 31 +
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 348 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.h | 8 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mp1.c | 71 +
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mp1.h | 30 +
+ .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mp1_v13_0.c | 21 +-
+ .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c | 9 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c | 100 +-
+ .../gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c | 42 +-
+ drivers/gpu/drm/amd/ras/ras_mgr/ras_sys.h | 2 +
+ drivers/gpu/drm/drm_gem.c | 5 +-
+ include/drm/drm_gem.h | 11 +
+ include/drm/ttm/ttm_resource.h | 2 +-
+ include/uapi/drm/amdgpu_drm.h | 41 +
+ rust/kernel/drm/gem/mod.rs | 13 +-
+ rust/kernel/drm/gem/shmem.rs | 5 +-
+ 551 files changed, 116599 insertions(+), 9610 deletions(-)
+ create mode 100644 Documentation/gpu/amdgpu/ualink.rst
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.h
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_internal.h
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_11_5.c
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_11_5.h
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/ualink_v1_0.c
+ create mode 100644 drivers/gpu/drm/amd/amdgpu/ualink_v1_0.h
+ create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/dcn10_clk_mgr.c
+ create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/dcn10_clk_mgr.h
+ create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_smu_driver_if.h
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h
+ create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_wrapper/Makefile
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_translation_helper.c (96%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_translation_helper.h (94%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_utils.c (97%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_utils.h (96%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_wrapper.c (100%)
+ create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml21_wrapper/dml21_wrapper.h
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_wrapper_fpu.c (96%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0/dml21 => dml2_wrapper/dml21_wrapper}/dml21_wrapper_fpu.h (95%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_dc_resource_mgmt.c (96%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_dc_resource_mgmt.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_dc_types.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_internal_types.h (99%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_mall_phantom.c (97%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_mall_phantom.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_policy.c (99%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_policy.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_translation_helper.c (99%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_translation_helper.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_utils.c (98%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_utils.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_wrapper.c (97%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_wrapper.h (100%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_wrapper_fpu.c (93%)
+ rename drivers/gpu/drm/amd/display/dc/{dml2_0 => dml2_wrapper}/dml2_wrapper_fpu.h (100%)
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/sspl/spl_custom_float.c
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/sspl/spl_custom_float.h
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.c
+ delete mode 100644 drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h
+ create mode 100644 drivers/gpu/drm/amd/display/dc/sspl/spl_namespace.h
+ create mode 100644 drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_11_5_offset.h
+ create mode 100644 drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_11_5_sh_mask.h
+ create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/mpnht/irqsrcs_mpnht_15_0.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/aca_v5_0.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/aca_v5_0.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_bert.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_bert.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_eeprom_mgr.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_eeprom_mgr.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_mce.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_mce.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_mp1_v15_0.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_mp1_v15_0.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_psp_v15_0.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_psp_v15_0.h
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_umc_v15_0.c
+ create mode 100644 drivers/gpu/drm/amd/ras/core/ras_umc_v15_0.h
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_bert.c
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_bert.h
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mce.c
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mce.h
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mp1.c
+ create mode 100644 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mp1.h
+$ git am -3 ../patches/0001-drm-amd-Problematic-merge-fixup.patch
+Applying: drm: amd: Problematic merge fixup
+Using index info to reconstruct a base tree...
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c
+Falling back to patching base and 3-way merge...
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+$ git reset HEAD^
+Unstaged changes after reset:
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 54d60496351aa] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git
+ Date: Wed Sep 16 13:24:12 2026 +0100
+$ git am -3 ../patches/0001-drm-amdgpu-More-merge-resolution-fallout-cleanup.patch
+Applying: drm: amdgpu: More merge resolution fallout cleanup
+$ git reset HEAD^
+Unstaged changes after reset:
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+M drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+M drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
+M drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 12ce70acc811c] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git
+ Date: Wed Sep 16 13:24:12 2026 +0100
+$ git am -3 ../patches/0001-amdgpu-Reset-vs-destroy-fixup.patch
+Applying: amdgpu: Reset vs destroy fixup
+$ git reset HEAD^
+Unstaged changes after reset:
+M drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 26f391f66e5a1] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git
+ Date: Wed Sep 16 13:24:12 2026 +0100
+Merging drm-intel/for-linux-next (ee00f8fbb2b20 drm/i915/dp_mst: Fix configuring TUs for a disconnected stream)
+ d393529394167 ("Revert "drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable"")
+ fe05cb9b9fb0e ("drm/i915/display: check configuration index before shifting")
+$ git merge -m Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/i915/kernel.git drm-intel/for-linux-next
+Auto-merging drivers/gpu/drm/i915/display/intel_cursor.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_cursor.c
+Auto-merging drivers/gpu/drm/i915/display/skl_universal_plane.c
+CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/skl_universal_plane.c
+Recorded preimage for 'drivers/gpu/drm/i915/display/intel_cursor.c'
+Recorded preimage for 'drivers/gpu/drm/i915/display/skl_universal_plane.c'
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+Recorded resolution for 'drivers/gpu/drm/i915/display/intel_cursor.c'.
+Recorded resolution for 'drivers/gpu/drm/i915/display/skl_universal_plane.c'.
+[master c638063548dea] Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/i915/kernel.git
+$ git diff -M --stat --summary HEAD^..
+ drivers/gpu/drm/i915/display/intel_alpm.c | 154 ++++++++++--
+ drivers/gpu/drm/i915/display/intel_alpm.h | 3 +
+ drivers/gpu/drm/i915/display/intel_bios.c | 262 ++++++++++++++++++++-
+ drivers/gpu/drm/i915/display/intel_bios.h | 14 ++
+ drivers/gpu/drm/i915/display/intel_color.c | 76 ++++--
+ .../gpu/drm/i915/display/intel_color_pipeline.c | 34 ++-
+ drivers/gpu/drm/i915/display/intel_cursor.c | 7 +-
+ drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 90 ++++++-
+ drivers/gpu/drm/i915/display/intel_display.c | 18 ++
+ drivers/gpu/drm/i915/display/intel_display_core.h | 7 +
+ .../gpu/drm/i915/display/intel_display_limits.h | 1 +
+ .../gpu/drm/i915/display/intel_display_params.h | 5 +
+ drivers/gpu/drm/i915/display/intel_display_power.c | 9 +
+ drivers/gpu/drm/i915/display/intel_display_types.h | 6 +
+ drivers/gpu/drm/i915/display/intel_dp_mst.c | 24 +-
+ drivers/gpu/drm/i915/display/intel_dp_mst.h | 2 +
+ drivers/gpu/drm/i915/display/intel_fb.c | 2 +-
+ drivers/gpu/drm/i915/display/intel_link_bw.c | 3 +-
+ drivers/gpu/drm/i915/display/intel_plane.c | 53 ++++-
+ drivers/gpu/drm/i915/display/intel_psr.c | 15 ++
+ drivers/gpu/drm/i915/display/intel_psr_regs.h | 2 +
+ drivers/gpu/drm/i915/display/intel_quirks.c | 3 +
+ drivers/gpu/drm/i915/display/skl_universal_plane.c | 66 +++---
+ drivers/gpu/drm/i915/gt/intel_reset.c | 8 +-
+ drivers/gpu/drm/i915/i915_dpt.c | 2 -
+ drivers/gpu/drm/i915/i915_drv.h | 2 -
+ drivers/gpu/drm/i915/i915_fb_pin.c | 6 -
+ drivers/gpu/drm/i915/i915_overlay.c | 5 -
+ 28 files changed, 768 insertions(+), 111 deletions(-)
+Merging drm-msm/msm-next (a15fac810c763 dt-bindings: display/msm: Use consistent indentation in the example)
+$ git merge -m Merge branch 'msm-next' of https://gitlab.freedesktop.org/drm/msm.git drm-msm/msm-next
+Already up to date.
+Merging drm-msm-lumag/msm-next-lumag (140b134753026 drm/msm: detach the ARM DMA mapping before attaching our own domain)
+$ git merge -m Merge branch 'msm-next-lumag' of https://gitlab.freedesktop.org/lumag/msm.git drm-msm-lumag/msm-next-lumag
+Already up to date.
+Merging drm-xe/drm-xe-next (9c8ed39238517 drm/xe/pf: Add _locked variant of the fair sched config function)
+$ git merge -m Merge branch 'drm-xe-next' of https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe/drm-xe-next
+Auto-merging drivers/gpu/drm/xe/xe_pagefault.c
+Auto-merging drivers/gpu/drm/xe/xe_pagefault_types.h
+Auto-merging drivers/gpu/drm/xe/xe_vm.c
+Auto-merging drivers/gpu/drm/xe/xe_vram.c
+Merge made by the 'ort' strategy.
+ drivers/gpu/drm/drm_gpusvm.c | 410 +++++++++++++-----
+ drivers/gpu/drm/xe/abi/xe_log_abi.h | 1 +
+ drivers/gpu/drm/xe/display/xe_dsb_buffer.c | 2 +-
+ drivers/gpu/drm/xe/display/xe_fb_pin.c | 2 +-
+ drivers/gpu/drm/xe/display/xe_panic.c | 3 +-
+ drivers/gpu/drm/xe/tests/xe_pci.c | 25 +-
+ drivers/gpu/drm/xe/xe_bo.c | 76 +++-
+ drivers/gpu/drm/xe/xe_bo.h | 3 +-
+ drivers/gpu/drm/xe/xe_bo_types.h | 8 +
+ drivers/gpu/drm/xe/xe_configfs.c | 72 +++-
+ drivers/gpu/drm/xe/xe_configfs.h | 2 +
+ drivers/gpu/drm/xe/xe_debugfs.c | 51 +++
+ drivers/gpu/drm/xe/xe_debugfs.h | 2 +
+ drivers/gpu/drm/xe/xe_device.c | 120 +-----
+ drivers/gpu/drm/xe/xe_device.h | 2 +-
+ drivers/gpu/drm/xe/xe_device_types.h | 19 +
+ drivers/gpu/drm/xe/xe_dma_buf.c | 3 +
+ drivers/gpu/drm/xe/xe_drm_ras_types.h | 3 +
+ drivers/gpu/drm/xe/xe_exec_queue.c | 72 +++-
+ drivers/gpu/drm/xe/xe_exec_queue_types.h | 7 +-
+ drivers/gpu/drm/xe/xe_execlist.c | 4 +-
+ drivers/gpu/drm/xe/xe_gt.c | 11 +-
+ drivers/gpu/drm/xe/xe_gt_debugfs.c | 54 +++
+ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 108 +++--
+ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 4 +
+ drivers/gpu/drm/xe/xe_guc_pagefault.c | 8 +-
+ drivers/gpu/drm/xe/xe_guc_submit.c | 115 ++++-
+ drivers/gpu/drm/xe/xe_guc_submit.h | 5 +
+ drivers/gpu/drm/xe/xe_hwmon.c | 7 +-
+ drivers/gpu/drm/xe/xe_i2c.c | 3 +
+ drivers/gpu/drm/xe/xe_log.c | 42 +-
+ drivers/gpu/drm/xe/xe_lrc.c | 6 +-
+ drivers/gpu/drm/xe/xe_lrc.h | 1 +
+ drivers/gpu/drm/xe/xe_migrate.c | 121 +++++-
+ drivers/gpu/drm/xe/xe_migrate.h | 6 +
+ drivers/gpu/drm/xe/xe_mmio_gem.c | 115 +++--
+ drivers/gpu/drm/xe/xe_mmio_gem.h | 2 +-
+ drivers/gpu/drm/xe/xe_pagefault.c | 24 +-
+ drivers/gpu/drm/xe/xe_pagefault_types.h | 9 +-
+ drivers/gpu/drm/xe/xe_pci.c | 29 +-
+ drivers/gpu/drm/xe/xe_pci_sriov.c | 27 +-
+ drivers/gpu/drm/xe/xe_pcode.c | 2 +-
+ drivers/gpu/drm/xe/xe_pcode.h | 4 +-
+ drivers/gpu/drm/xe/xe_pt.c | 28 +-
+ drivers/gpu/drm/xe/xe_ras.c | 9 +
+ drivers/gpu/drm/xe/xe_res_cursor.h | 5 +-
+ drivers/gpu/drm/xe/xe_shrinker.c | 124 +++---
+ drivers/gpu/drm/xe/xe_svm.c | 15 +-
+ drivers/gpu/drm/xe/xe_svm.h | 20 +
+ drivers/gpu/drm/xe/xe_sysctrl.c | 92 ++++
+ drivers/gpu/drm/xe/xe_sysctrl.h | 2 +
+ drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h | 45 ++
+ drivers/gpu/drm/xe/xe_tile_types.h | 4 +
+ drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 600 ++++++++++++++++++++++++--
+ drivers/gpu/drm/xe/xe_ttm_vram_mgr.h | 3 +
+ drivers/gpu/drm/xe/xe_ttm_vram_mgr_types.h | 40 ++
+ drivers/gpu/drm/xe/xe_userptr.c | 2 +-
+ drivers/gpu/drm/xe/xe_vm.c | 12 +
+ drivers/gpu/drm/xe/xe_vm_types.h | 2 +
+ drivers/gpu/drm/xe/xe_vram.c | 255 ++++++++++-
+ drivers/gpu/drm/xe/xe_vram.h | 10 +
+ include/drm/drm_gpusvm.h | 71 ++-
+ include/uapi/drm/xe_drm.h | 22 +-
+ 63 files changed, 2430 insertions(+), 521 deletions(-)
+$ git am -3 ../patches/0001-drm-xe-Fix-up-merge-issue.patch
+Applying: drm: xe: Fix up merge issue
+Using index info to reconstruct a base tree...
+M drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
+Falling back to patching base and 3-way merge...
+Auto-merging drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
+No changes -- Patch already applied.
+Merging drm-rust/for-linux-next (66a2c223b620d Documentation: nova: Fix bracket)
+$ git merge -m Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust/for-linux-next
+Auto-merging MAINTAINERS
+Auto-merging rust/bindings/bindings_helper.h
+Merge made by the 'ort' strategy.
+ Documentation/gpu/nova/core/pramin.rst | 128 +++
+ Documentation/gpu/nova/core/todo.rst | 2 +-
+ Documentation/gpu/nova/index.rst | 1 +
+ MAINTAINERS | 6 +
+ drivers/gpu/drm/tyr/driver.rs | 1 +
+ drivers/gpu/drm/tyr/fw.rs | 5 +-
+ drivers/gpu/drm/tyr/regs.rs | 45 +-
+ drivers/gpu/nova-core/Kconfig | 10 +
+ drivers/gpu/nova-core/driver.rs | 49 +-
+ drivers/gpu/nova-core/falcon.rs | 164 ++--
+ drivers/gpu/nova-core/falcon/fsp.rs | 63 +-
+ drivers/gpu/nova-core/falcon/gsp.rs | 51 +-
+ drivers/gpu/nova-core/falcon/hal/ga102.rs | 59 +-
+ drivers/gpu/nova-core/falcon/hal/tu102.rs | 9 +-
+ drivers/gpu/nova-core/falcon/sec2.rs | 37 +-
+ drivers/gpu/nova-core/fb.rs | 4 +-
+ drivers/gpu/nova-core/fb/hal/gb100.rs | 59 +-
+ drivers/gpu/nova-core/fb/regs.rs | 34 +-
+ drivers/gpu/nova-core/firmware.rs | 2 +-
+ drivers/gpu/nova-core/firmware/booter.rs | 2 +-
+ drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 30 +-
+ drivers/gpu/nova-core/firmware/gsp.rs | 14 +-
+ .../gpu/nova-core/firmware/{fsp.rs => gsp_fmc.rs} | 59 +-
+ drivers/gpu/nova-core/firmware/riscv.rs | 8 +-
+ drivers/gpu/nova-core/fsp.rs | 45 +-
+ drivers/gpu/nova-core/gpu.rs | 97 +-
+ drivers/gpu/nova-core/gpu/regs.rs | 86 ++
+ drivers/gpu/nova-core/gsp.rs | 30 +-
+ drivers/gpu/nova-core/gsp/boot.rs | 20 +-
+ drivers/gpu/nova-core/gsp/cmdq.rs | 74 +-
+ drivers/gpu/nova-core/gsp/commands.rs | 9 +-
+ drivers/gpu/nova-core/gsp/fw.rs | 12 +-
+ drivers/gpu/nova-core/gsp/fw/commands.rs | 13 +
+ drivers/gpu/nova-core/gsp/hal.rs | 14 +-
+ drivers/gpu/nova-core/gsp/hal/gh100.rs | 16 +-
+ drivers/gpu/nova-core/gsp/hal/tu102.rs | 41 +-
+ drivers/gpu/nova-core/gsp/regs.rs | 9 +-
+ drivers/gpu/nova-core/gsp/sequencer.rs | 6 +-
+ drivers/gpu/nova-core/mm.rs | 336 +++++++
+ drivers/gpu/nova-core/mm/bar_user.rs | 424 ++++++++
+ drivers/gpu/nova-core/mm/hal.rs | 56 ++
+ drivers/gpu/nova-core/mm/hal/gb100.rs | 35 +
+ drivers/gpu/nova-core/mm/hal/gh100.rs | 35 +
+ drivers/gpu/nova-core/mm/hal/tu102.rs | 37 +
+ drivers/gpu/nova-core/mm/pagetable.rs | 424 ++++++++
+ drivers/gpu/nova-core/mm/pagetable/map.rs | 345 +++++++
+ drivers/gpu/nova-core/mm/pagetable/ver2.rs | 275 ++++++
+ drivers/gpu/nova-core/mm/pagetable/ver3.rs | 421 ++++++++
+ drivers/gpu/nova-core/mm/pagetable/walk.rs | 244 +++++
+ drivers/gpu/nova-core/mm/pramin.rs | 312 ++++++
+ drivers/gpu/nova-core/mm/regs.rs | 70 ++
+ drivers/gpu/nova-core/mm/tlb.rs | 120 +++
+ drivers/gpu/nova-core/mm/vmm.rs | 346 +++++++
+ drivers/gpu/nova-core/nova_core.rs | 3 +
+ drivers/gpu/nova-core/regs.rs | 257 ++---
+ drivers/gpu/nova-core/selftest.rs | 64 ++
+ drivers/gpu/nova-core/vbios.rs | 11 +-
+ rust/bindings/bindings_helper.h | 1 +
+ rust/helpers/dma_fence.c | 49 +
+ rust/helpers/helpers.c | 1 +
+ rust/helpers/pci.c | 6 +
+ rust/kernel/bitfield.rs | 9 +
+ rust/kernel/debugfs.rs | 26 +-
+ rust/kernel/debugfs/entry.rs | 4 +-
+ rust/kernel/debugfs/file_ops.rs | 29 +-
+ rust/kernel/device_id.rs | 3 +-
+ rust/kernel/dma.rs | 141 ++-
+ rust/kernel/dma_buf/dma_fence.rs | 1022 ++++++++++++++++++++
+ rust/kernel/dma_buf/mod.rs | 14 +
+ rust/kernel/io.rs | 220 +++--
+ rust/kernel/io/register.rs | 803 ++++-----------
+ rust/kernel/io/resource.rs | 8 +
+ rust/kernel/lib.rs | 3 +
+ rust/kernel/maple_tree.rs | 30 +-
+ rust/kernel/mem.rs | 234 +++++
+ rust/kernel/pci.rs | 14 +
+ rust/kernel/sync/atomic.rs | 4 +-
+ rust/kernel/uaccess.rs | 4 +-
+ rust/macros/io/mod.rs | 3 +
+ rust/macros/io/register.rs | 296 ++++++
+ rust/macros/lib.rs | 9 +
+ samples/rust/rust_dma.rs | 30 +-
+ samples/rust/rust_driver_pci.rs | 4 +
+ 83 files changed, 6730 insertions(+), 1366 deletions(-)
+ create mode 100644 Documentation/gpu/nova/core/pramin.rst
+ rename drivers/gpu/nova-core/firmware/{fsp.rs => gsp_fmc.rs} (67%)
+ create mode 100644 drivers/gpu/nova-core/gpu/regs.rs
+ create mode 100644 drivers/gpu/nova-core/mm.rs
+ create mode 100644 drivers/gpu/nova-core/mm/bar_user.rs
+ create mode 100644 drivers/gpu/nova-core/mm/hal.rs
+ create mode 100644 drivers/gpu/nova-core/mm/hal/gb100.rs
+ create mode 100644 drivers/gpu/nova-core/mm/hal/gh100.rs
+ create mode 100644 drivers/gpu/nova-core/mm/hal/tu102.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pagetable.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pagetable/map.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pagetable/ver2.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pagetable/ver3.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pagetable/walk.rs
+ create mode 100644 drivers/gpu/nova-core/mm/pramin.rs
+ create mode 100644 drivers/gpu/nova-core/mm/regs.rs
+ create mode 100644 drivers/gpu/nova-core/mm/tlb.rs
+ create mode 100644 drivers/gpu/nova-core/mm/vmm.rs
+ create mode 100644 drivers/gpu/nova-core/selftest.rs
+ create mode 100644 rust/helpers/dma_fence.c
+ create mode 100644 rust/kernel/dma_buf/dma_fence.rs
+ create mode 100644 rust/kernel/dma_buf/mod.rs
+ create mode 100644 rust/kernel/mem.rs
+ create mode 100644 rust/macros/io/mod.rs
+ create mode 100644 rust/macros/io/register.rs
+Merging drm-nova/nova-next (93296e9d9528f gpu: nova-core: vbios: store reference to Device where relevant)
+$ git merge -m Merge branch 'nova-next' of https://gitlab.freedesktop.org/drm/nova.git drm-nova/nova-next
+Already up to date.
+Merging etnaviv/etnaviv/next (6bde14ba5f7ef drm/etnaviv: add optional reset support)
+$ git merge -m Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux etnaviv/etnaviv/next
+Already up to date.
+Merging fbdev/for-next (7bb1d95a44f20 fbdev: atyfb_base: fix typos in comments)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git fbdev/for-next
+Merge made by the 'ort' strategy.
+ drivers/video/fbdev/acornfb.c | 57 ++++++-------------------
+ drivers/video/fbdev/acornfb.h | 9 +---
+ drivers/video/fbdev/aty/aty128fb.c | 2 +-
+ drivers/video/fbdev/aty/atyfb_base.c | 4 +-
+ drivers/video/fbdev/aty/mach64_cursor.c | 2 +-
+ drivers/video/fbdev/aty/radeon_base.c | 4 +-
+ drivers/video/fbdev/aty/radeon_monitor.c | 4 +-
+ drivers/video/fbdev/aty/radeonfb.h | 2 +-
+ drivers/video/fbdev/au1100fb.c | 2 +-
+ drivers/video/fbdev/core/Kconfig | 6 ---
+ drivers/video/fbdev/efifb.c | 4 +-
+ drivers/video/fbdev/grvga.c | 2 +-
+ drivers/video/fbdev/gxt4500.c | 1 +
+ drivers/video/fbdev/kyro/STG4000OverlayDevice.c | 2 +-
+ drivers/video/fbdev/kyro/fbdev.c | 4 +-
+ drivers/video/fbdev/maxinefb.c | 2 +-
+ drivers/video/fbdev/mmp/core.c | 2 +-
+ drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 4 +-
+ drivers/video/fbdev/mmp/hw/mmp_ctrl.h | 4 +-
+ drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +-
+ drivers/video/fbdev/nvidia/nvidia.c | 1 +
+ drivers/video/fbdev/ocfb.c | 2 +-
+ drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 4 +-
+ drivers/video/fbdev/pm2fb.c | 2 +-
+ drivers/video/fbdev/s1d13xxxfb.c | 6 +--
+ drivers/video/fbdev/sh_mobile_lcdcfb.c | 37 ++++++++++------
+ drivers/video/fbdev/skeletonfb.c | 6 +--
+ drivers/video/fbdev/sstfb.c | 5 ++-
+ drivers/video/fbdev/tgafb.c | 6 +--
+ drivers/video/fbdev/tridentfb.c | 2 +-
+ drivers/video/fbdev/udlfb.c | 5 +++
+ drivers/video/fbdev/via/dvi.c | 6 +--
+ drivers/video/fbdev/via/hw.c | 2 +-
+ drivers/video/fbdev/via/viafbdev.c | 4 +-
+ drivers/video/sticore.c | 2 +-
+ include/video/mmp_disp.h | 6 +--
+ 36 files changed, 98 insertions(+), 117 deletions(-)
+$ git am -3 ../patches/0001-fix-up-for-drm-hyperv-Remove-reference-to-hyperv_fb-.patch
+Applying: fix up for "drm/hyperv: Remove reference to hyperv_fb driver"
+$ git reset HEAD^
+Unstaged changes after reset:
+M drivers/gpu/drm/hyperv/Kconfig
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 0b4ebe52022d2] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git
+ Date: Wed Sep 16 13:28:51 2026 +0100
+Merging regmap/for-next (070a698c9b230 Merge remote-tracking branch 'regmap/for-7.4' into regmap-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git regmap/for-next
+Merge made by the 'ort' strategy.
+ drivers/base/regmap/internal.h | 1 +
+ drivers/base/regmap/regmap-kunit.c | 98 ++++++++++++++++++++++++++++++++++--
+ drivers/base/regmap/regmap-ram.c | 26 +++++++---
+ drivers/base/regmap/regmap-raw-ram.c | 21 +++++---
+ drivers/base/regmap/regmap.c | 2 +-
+ 5 files changed, 130 insertions(+), 18 deletions(-)
+Merging sound/for-next (ad563e61f576b ALSA: vx: fix typos in comments)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git sound/for-next
+Auto-merging sound/core/pcm_native.c
+Auto-merging sound/core/rawmidi.c
+Auto-merging sound/hda/codecs/realtek/alc269.c
+Auto-merging sound/hda/common/codec.c
+Auto-merging sound/pci/cs46xx/cs46xx_lib.c
+Auto-merging sound/usb/midi.c
+Auto-merging sound/usb/quirks.c
+Auto-merging tools/testing/selftests/alsa/mixer-test.c
+Merge made by the 'ort' strategy.
+ include/sound/control.h | 2 +-
+ include/sound/emu10k1.h | 4 +-
+ include/sound/emux_legacy.h | 2 +-
+ include/sound/rawmidi.h | 1 +
+ sound/core/pcm_native.c | 2 +-
+ sound/core/rawmidi.c | 18 ++-
+ sound/core/seq/oss/seq_oss_init.c | 2 +-
+ sound/firewire/bebob/bebob_hwdep.c | 2 +-
+ sound/hda/codecs/hdmi/hdmi.c | 2 +-
+ sound/hda/codecs/realtek/alc269.c | 50 ++++++
+ sound/hda/codecs/realtek/alc882.c | 2 +-
+ sound/hda/codecs/sigmatel.c | 6 +-
+ sound/hda/common/codec.c | 2 +-
+ sound/hda/controllers/acpi.c | 41 +++++
+ sound/i2c/other/ak4113.c | 2 +-
+ sound/i2c/other/ak4114.c | 2 +-
+ sound/i2c/other/ak4xxx-adda.c | 2 +-
+ sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
+ sound/mips/hal2.c | 4 +-
+ sound/pci/ac97/ac97_codec.c | 2 +-
+ sound/pci/ac97/ac97_patch.c | 2 +-
+ sound/pci/au88x0/au88x0.h | 2 +-
+ sound/pci/au88x0/au88x0_mpu401.c | 2 +-
+ sound/pci/aw2/aw2-saa7146.c | 4 +-
+ sound/pci/cs4281.c | 2 +-
+ sound/pci/cs46xx/cs46xx_lib.c | 6 +-
+ sound/pci/cs46xx/dsp_spos_scb_lib.c | 8 +-
+ sound/pci/echoaudio/echoaudio.c | 4 +-
+ sound/pci/echoaudio/echoaudio.h | 4 +-
+ sound/pci/lx6464es/lx_core.c | 2 +-
+ sound/pci/lx6464es/lx_defs.h | 2 +-
+ sound/pci/pcxhr/pcxhr_core.c | 4 +-
+ sound/pci/riptide/riptide.c | 4 +-
+ sound/pci/rme32.c | 2 +-
+ sound/pci/rme9652/hdsp.c | 2 +-
+ sound/pci/trident/trident_memory.c | 2 +-
+ sound/pci/vx222/vx222_ops.c | 2 +-
+ sound/pcmcia/vx/vxp_ops.c | 2 +-
+ sound/ppc/tumbler.c | 2 +-
+ sound/usb/midi.c | 13 +-
+ sound/usb/mixer.c | 4 +-
+ sound/usb/mixer_us16x08.h | 2 +-
+ sound/usb/quirks-table.h | 253 ++++++++++++++++++++++++++++-
+ sound/usb/quirks.c | 186 +++++++++++++++++++++-
+ tools/testing/selftests/alsa/mixer-test.c | 255 ++++++++++++++++++++++++++++++
+ 45 files changed, 848 insertions(+), 73 deletions(-)
+Merging ieee1394/for-next (a20545fbf9226 firewire: core: correct comment about execution context)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git ieee1394/for-next
+Merge made by the 'ort' strategy.
+ drivers/firewire/.kunitconfig | 1 +
+ drivers/firewire/Kconfig | 16 ++
+ drivers/firewire/config-rom-generator-test.c | 407 +++++++++++++++++++++++++++
+ drivers/firewire/config-rom-parser-test.c | 355 +++++++++++++++++++++++
+ drivers/firewire/core-card.c | 4 +
+ drivers/firewire/core-device.c | 4 +
+ drivers/firewire/core-transaction.c | 4 +
+ drivers/firewire/ohci-serdes-test.c | 4 +-
+ drivers/firewire/ohci.c | 158 ++++++-----
+ drivers/firewire/ohci.h | 2 +-
+ include/linux/firewire.h | 10 +-
+ include/uapi/linux/firewire-cdev.h | 4 +-
+ tools/firewire/nosy-dump.c | 10 +-
+ 13 files changed, 897 insertions(+), 82 deletions(-)
+ create mode 100644 drivers/firewire/config-rom-generator-test.c
+ create mode 100644 drivers/firewire/config-rom-parser-test.c
+Merging sound-asoc/for-next (3e96ebae30f71 Merge remote-tracking branch 'asoc/for-7.4' into asoc-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git sound-asoc/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/sound/adi,adau1372.yaml | 10 +-
+ .../devicetree/bindings/sound/adi,adau7118.yaml | 22 +-
+ .../bindings/sound/amlogic,gx-sound-card.yaml | 20 +-
+ .../bindings/sound/asahi-kasei,ak4619.yaml | 6 +-
+ .../devicetree/bindings/sound/cirrus,cs35l45.yaml | 44 +--
+ .../devicetree/bindings/sound/cirrus,cs4270.yaml | 12 +-
+ .../devicetree/bindings/sound/cirrus,cs42l42.yaml | 42 +--
+ .../devicetree/bindings/sound/cirrus,cs42l84.yaml | 18 +-
+ .../devicetree/bindings/sound/cirrus,cs42xx8.yaml | 56 ++--
+ .../devicetree/bindings/sound/dialog,da7219.yaml | 62 ++--
+ .../devicetree/bindings/sound/fsl,imx-asrc.yaml | 2 +-
+ .../devicetree/bindings/sound/fsl,sai.yaml | 14 +-
+ .../devicetree/bindings/sound/imx-audio-card.yaml | 4 +-
+ .../bindings/sound/invensense,ics43432.yaml | 8 +-
+ .../bindings/sound/loongson,ls-audio-card.yaml | 4 +-
+ .../bindings/sound/mediatek,mt8173-afe-pcm.yaml | 22 +-
+ .../bindings/sound/mediatek,mt8183-audio.yaml | 82 ++---
+ .../sound/mt8186-mt6366-da7219-max98357.yaml | 36 +--
+ .../sound/mt8186-mt6366-rt1019-rt5682s.yaml | 36 +--
+ .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 46 +--
+ .../devicetree/bindings/sound/mt8195-mt6359.yaml | 50 +--
+ .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 12 +-
+ .../devicetree/bindings/sound/renesas,rsnd.yaml | 16 +-
+ .../devicetree/bindings/sound/renesas,rz-ssi.yaml | 32 +-
+ .../devicetree/bindings/sound/ti,tas5805m.yaml | 10 +-
+ .../bindings/sound/ti,tlv320dac3100.yaml | 2 +-
+ .../devicetree/bindings/sound/ti,tpa6130a2.yaml | 2 +-
+ include/sound/simple_card_utils.h | 2 +
+ include/sound/soc-dai.h | 156 ++++------
+ include/sound/soc.h | 16 +-
+ sound/soc/codecs/88pm860x-codec.c | 6 +
+ sound/soc/codecs/ab8500-codec.c | 13 +
+ sound/soc/codecs/adau1372.c | 12 +
+ sound/soc/codecs/adau1373.c | 12 +
+ sound/soc/codecs/adau1701.c | 11 +
+ sound/soc/codecs/adau17x1.c | 13 +
+ sound/soc/codecs/adau1977.c | 13 +
+ sound/soc/codecs/adau7118.c | 12 +
+ sound/soc/codecs/ak4104.c | 7 +
+ sound/soc/codecs/ak4118.c | 7 +
+ sound/soc/codecs/ak4458.c | 9 +
+ sound/soc/codecs/ak4535.c | 6 +
+ sound/soc/codecs/ak4642.c | 6 +
+ sound/soc/codecs/ak4671.c | 7 +
+ sound/soc/codecs/ak5386.c | 6 +
+ sound/soc/codecs/ak5558.c | 7 +
+ sound/soc/codecs/alc5623.c | 11 +
+ sound/soc/codecs/alc5632.c | 13 +
+ sound/soc/codecs/arizona.c | 23 ++
+ sound/soc/codecs/cpcap.c | 15 +
+ sound/soc/codecs/cs35l33.c | 6 +
+ sound/soc/codecs/cs35l35.c | 7 +
+ sound/soc/codecs/cs35l36.c | 12 +
+ sound/soc/codecs/cs35l41.c | 10 +
+ sound/soc/codecs/cs35l45.c | 10 +
+ sound/soc/codecs/cs35l56-shared-test.c | 56 ++++
+ sound/soc/codecs/cs35l56.c | 10 +
+ sound/soc/codecs/cs40l50-codec.c | 9 +
+ sound/soc/codecs/cs4234.c | 9 +
+ sound/soc/codecs/cs4265.c | 12 +
+ sound/soc/codecs/cs4270.c | 6 +
+ sound/soc/codecs/cs4271.c | 6 +
+ sound/soc/codecs/cs42l42.c | 9 +
+ sound/soc/codecs/cs42l43.c | 12 +
+ sound/soc/codecs/cs42l51.c | 7 +
+ sound/soc/codecs/cs42l52.c | 22 +-
+ sound/soc/codecs/cs42l56.c | 17 +-
+ sound/soc/codecs/cs42l73.c | 7 +
+ sound/soc/codecs/cs42l84.c | 6 +
+ sound/soc/codecs/cs42xx8.c | 8 +
+ sound/soc/codecs/cs43130.c | 14 +
+ sound/soc/codecs/cs4341.c | 8 +
+ sound/soc/codecs/cs4349.c | 12 +
+ sound/soc/codecs/cs48l32.c | 23 ++
+ sound/soc/codecs/cs530x.c | 9 +
+ sound/soc/codecs/cs53l30.c | 8 +
+ sound/soc/codecs/cx2072x.c | 12 +
+ sound/soc/codecs/da7210.c | 7 +
+ sound/soc/codecs/da7218.c | 12 +
+ sound/soc/codecs/da7219.c | 12 +
+ sound/soc/codecs/da732x.c | 17 +
+ sound/soc/codecs/da9055.c | 8 +
+ sound/soc/codecs/es7134.c | 6 +
+ sound/soc/codecs/es7241.c | 7 +
+ sound/soc/codecs/es8311.c | 17 +
+ sound/soc/codecs/es8316.c | 9 +
+ sound/soc/codecs/es8323.c | 13 +
+ sound/soc/codecs/es8326.c | 9 +
+ sound/soc/codecs/es8328.c | 7 +
+ sound/soc/codecs/es8375.c | 12 +
+ sound/soc/codecs/es8389.c | 9 +
+ sound/soc/codecs/hda.c | 7 +-
+ sound/soc/codecs/inno_rk3036.c | 12 +
+ sound/soc/codecs/isabelle.c | 13 +
+ sound/soc/codecs/lm49453.c | 15 +
+ sound/soc/codecs/max98088.c | 12 +
+ sound/soc/codecs/max98090.c | 25 ++
+ sound/soc/codecs/max98095.c | 14 +
+ sound/soc/codecs/max98371.c | 7 +
+ sound/soc/codecs/max98373-i2c.c | 10 +
+ sound/soc/codecs/max98388.c | 10 +
+ sound/soc/codecs/max98390.c | 10 +
+ sound/soc/codecs/max98396.c | 12 +
+ sound/soc/codecs/max9850.c | 11 +
+ sound/soc/codecs/max98520.c | 10 +
+ sound/soc/codecs/max9860.c | 23 ++
+ sound/soc/codecs/max9867.c | 10 +
+ sound/soc/codecs/max98925.c | 8 +
+ sound/soc/codecs/max98926.c | 8 +
+ sound/soc/codecs/max98927.c | 10 +
+ sound/soc/codecs/mc13783.c | 12 +
+ sound/soc/codecs/ml26124.c | 6 +
+ sound/soc/codecs/nau8325.c | 11 +
+ sound/soc/codecs/nau8540.c | 11 +
+ sound/soc/codecs/nau8810.c | 12 +
+ sound/soc/codecs/nau8821.c | 11 +
+ sound/soc/codecs/nau8822.c | 27 +-
+ sound/soc/codecs/nau8824.c | 11 +
+ sound/soc/codecs/nau8825.c | 11 +
+ sound/soc/codecs/ntp8835.c | 7 +
+ sound/soc/codecs/ntp8918.c | 7 +
+ sound/soc/codecs/pcm5102a.c | 30 +-
+ sound/soc/codecs/rk3308_codec.c | 11 +
+ sound/soc/codecs/rk3328_codec.c | 9 +
+ sound/soc/codecs/rt1011.c | 10 +
+ sound/soc/codecs/rt1015.c | 10 +
+ sound/soc/codecs/rt1016.c | 10 +
+ sound/soc/codecs/rt1019.c | 10 +
+ sound/soc/codecs/rt1305.c | 10 +
+ sound/soc/codecs/rt1308.c | 10 +
+ sound/soc/codecs/rt1318.c | 10 +
+ sound/soc/codecs/rt1320-sdw.c | 2 +-
+ sound/soc/codecs/rt274.c | 8 +
+ sound/soc/codecs/rt286.c | 8 +
+ sound/soc/codecs/rt298.c | 8 +
+ sound/soc/codecs/rt5514.c | 12 +
+ sound/soc/codecs/rt5616.c | 10 +
+ sound/soc/codecs/rt5631.c | 10 +
+ sound/soc/codecs/rt5640.c | 10 +
+ sound/soc/codecs/rt5645.c | 10 +
+ sound/soc/codecs/rt5651.c | 10 +
+ sound/soc/codecs/rt5659.c | 10 +
+ sound/soc/codecs/rt5660.c | 10 +
+ sound/soc/codecs/rt5663.c | 10 +
+ sound/soc/codecs/rt5665.c | 10 +
+ sound/soc/codecs/rt5668.c | 22 ++
+ sound/soc/codecs/rt5670.c | 10 +
+ sound/soc/codecs/rt5677.c | 10 +
+ sound/soc/codecs/rt5682.c | 22 ++
+ sound/soc/codecs/rt5682s.c | 22 ++
+ sound/soc/codecs/rt721-sdca-sdw.c | 12 +
+ sound/soc/codecs/rt721-sdca.c | 313 +++++++++++--------
+ sound/soc/codecs/rt721-sdca.h | 5 +
+ sound/soc/codecs/rt9120.c | 9 +
+ sound/soc/codecs/rt9123.c | 13 +
+ sound/soc/codecs/rtq9124.c | 9 +
+ sound/soc/codecs/rtq9128.c | 9 +
+ sound/soc/codecs/sgtl5000.c | 11 +
+ sound/soc/codecs/si476x.c | 18 ++
+ sound/soc/codecs/sma1303.c | 13 +
+ sound/soc/codecs/sma1307.c | 13 +
+ sound/soc/codecs/src4xxx.c | 8 +
+ sound/soc/codecs/ssm2518.c | 13 +
+ sound/soc/codecs/ssm2602.c | 13 +
+ sound/soc/codecs/ssm3515.c | 10 +
+ sound/soc/codecs/ssm4567.c | 13 +
+ sound/soc/codecs/sta32x.c | 9 +
+ sound/soc/codecs/sta350.c | 9 +
+ sound/soc/codecs/sta529.c | 7 +
+ sound/soc/codecs/tas2552.c | 14 +
+ sound/soc/codecs/tas2562.c | 10 +
+ sound/soc/codecs/tas2764.c | 12 +
+ sound/soc/codecs/tas2770.c | 12 +
+ sound/soc/codecs/tas2780.c | 10 +
+ sound/soc/codecs/tas5086.c | 7 +
+ sound/soc/codecs/tas571x.c | 7 +
+ sound/soc/codecs/tas5720.c | 9 +
+ sound/soc/codecs/tas6424.c | 9 +
+ sound/soc/codecs/tfa9879.c | 9 +
+ sound/soc/codecs/tlv320adc3xxx.c | 14 +
+ sound/soc/codecs/tlv320adcx140.c | 12 +
+ sound/soc/codecs/tlv320aic23.c | 9 +
+ sound/soc/codecs/tlv320aic26.c | 8 +
+ sound/soc/codecs/tlv320aic31xx.c | 41 ++-
+ sound/soc/codecs/tlv320aic32x4.c | 8 +
+ sound/soc/codecs/tlv320aic3x.c | 42 ++-
+ sound/soc/codecs/tlv320dac33.c | 8 +
+ sound/soc/codecs/tscs454.c | 15 +
+ sound/soc/codecs/twl4030.c | 12 +
+ sound/soc/codecs/uda1334.c | 6 +
+ sound/soc/codecs/uda1342.c | 7 +
+ sound/soc/codecs/uda1380.c | 11 +
+ sound/soc/codecs/wm2200.c | 10 +
+ sound/soc/codecs/wm5100.c | 10 +
+ sound/soc/codecs/wm8350.c | 24 ++
+ sound/soc/codecs/wm8400.c | 9 +
+ sound/soc/codecs/wm8510.c | 12 +
+ sound/soc/codecs/wm8523.c | 13 +
+ sound/soc/codecs/wm8524.c | 6 +
+ sound/soc/codecs/wm8580.c | 20 ++
+ sound/soc/codecs/wm8711.c | 13 +
+ sound/soc/codecs/wm8728.c | 9 +
+ sound/soc/codecs/wm8731.c | 13 +
+ sound/soc/codecs/wm8737.c | 11 +
+ sound/soc/codecs/wm8741.c | 13 +
+ sound/soc/codecs/wm8750.c | 13 +
+ sound/soc/codecs/wm8753.c | 20 ++
+ sound/soc/codecs/wm8770.c | 11 +
+ sound/soc/codecs/wm8776.c | 13 +
+ sound/soc/codecs/wm8804.c | 15 +-
+ sound/soc/codecs/wm8900.c | 18 ++
+ sound/soc/codecs/wm8903.c | 18 ++
+ sound/soc/codecs/wm8904.c | 18 ++
+ sound/soc/codecs/wm8940.c | 13 +
+ sound/soc/codecs/wm8955.c | 18 ++
+ sound/soc/codecs/wm8960.c | 13 +
+ sound/soc/codecs/wm8961.c | 18 ++
+ sound/soc/codecs/wm8962.c | 70 +++--
+ sound/soc/codecs/wm8971.c | 13 +
+ sound/soc/codecs/wm8974.c | 17 +
+ sound/soc/codecs/wm8978.c | 12 +
+ sound/soc/codecs/wm8983.c | 12 +
+ sound/soc/codecs/wm8985.c | 18 ++
+ sound/soc/codecs/wm8988.c | 13 +
+ sound/soc/codecs/wm8990.c | 9 +
+ sound/soc/codecs/wm8991.c | 9 +
+ sound/soc/codecs/wm8993.c | 18 ++
+ sound/soc/codecs/wm8994.c | 20 ++
+ sound/soc/codecs/wm8995.c | 61 +++-
+ sound/soc/codecs/wm8996.c | 12 +
+ sound/soc/codecs/wm9081.c | 18 ++
+ sound/soc/codecs/wm9713.c | 13 +
+ sound/soc/codecs/zl38060.c | 6 +
+ sound/soc/dwc/dwc-i2s.c | 9 +
+ sound/soc/generic/audio-graph-card.c | 1 +
+ sound/soc/generic/audio-graph-card2.c | 1 +
+ sound/soc/generic/simple-card-utils.c | 23 +-
+ sound/soc/generic/simple-card.c | 13 +-
+ sound/soc/hisilicon/hi6210-i2s.c | 7 +
+ sound/soc/img/img-i2s-in.c | 12 +-
+ sound/soc/img/img-i2s-out.c | 13 +-
+ sound/soc/img/img-parallel-out.c | 8 +-
+ sound/soc/intel/avs/boards/hdaudio.c | 8 +-
+ sound/soc/intel/avs/pcm.c | 11 +-
+ sound/soc/intel/avs/topology.c | 25 --
+ sound/soc/intel/avs/topology.h | 3 -
+ sound/soc/jz4740/jz4740-i2s.c | 7 +
+ sound/soc/kirkwood/kirkwood-i2s.c | 7 +
+ sound/soc/loongson/loongson_i2s.c | 6 +
+ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +-
+ sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 13 +-
+ sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 2 +-
+ sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 2 +-
+ sound/soc/mediatek/mt8189/mt8189-afe-pcm.c | 16 +-
+ sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 11 +-
+ sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 2 +-
+ sound/soc/mediatek/mt8196/mt8196-afe-pcm.c | 14 +-
+ sound/soc/mxs/mxs-saif.c | 10 +
+ sound/soc/pxa/mmp-sspa.c | 6 +
+ sound/soc/pxa/pxa-ssp.c | 11 +
+ sound/soc/pxa/pxa2xx-i2s.c | 6 +
+ sound/soc/renesas/rz-ssi.c | 9 +
+ sound/soc/renesas/siu_dai.c | 6 +
+ sound/soc/renesas/ssi.c | 13 +
+ sound/soc/rockchip/rockchip_i2s.c | 25 +-
+ sound/soc/rockchip/rockchip_i2s_tdm.c | 27 +-
+ sound/soc/rockchip/rockchip_pdm.c | 14 +-
+ sound/soc/rockchip/rockchip_sai.c | 31 +-
+ sound/soc/sdca/sdca_functions.c | 1 -
+ sound/soc/soc-compress.c | 5 +-
+ sound/soc/soc-core.c | 173 +----------
+ sound/soc/soc-dai.c | 342 +++++++++++++++++++++
+ sound/soc/soc-internal.h | 36 +++
+ sound/soc/soc-pcm.c | 123 +-------
+ sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
+ sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +-
+ sound/soc/sprd/sprd-pcm-dma.c | 3 +-
+ sound/soc/sti/uniperif_player.c | 29 +-
+ sound/soc/sti/uniperif_reader.c | 27 +-
+ sound/soc/stm/stm32_i2s.c | 12 +
+ sound/soc/stm/stm32_sai_sub.c | 15 +
+ sound/soc/sunxi/sun4i-i2s.c | 13 +
+ sound/soc/sunxi/sun8i-codec.c | 13 +
+ sound/soc/tegra/tegra20_i2s.c | 10 +
+ sound/soc/tegra/tegra210_i2s.c | 13 +
+ sound/soc/tegra/tegra30_i2s.c | 10 +
+ sound/soc/ti/davinci-i2s.c | 14 +-
+ sound/soc/ti/davinci-mcasp.c | 14 +
+ sound/soc/ti/omap-mcbsp.c | 12 +
+ sound/soc/uniphier/aio-cpu.c | 9 +
+ sound/soc/ux500/ux500_msp_dai.c | 33 +-
+ sound/soc/xtensa/xtfpga-i2s.c | 12 +-
+ 292 files changed, 3894 insertions(+), 1086 deletions(-)
+ create mode 100644 sound/soc/soc-internal.h
+Merging modules/modules-next (a22f1497700e1 module/kallsyms: Ignore local labels and mapping symbols during module load)
+$ git merge -m Merge branch 'modules-next' of https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git modules/modules-next
+Merge made by the 'ort' strategy.
+ include/linux/module_symbol.h | 7 +++--
+ kernel/module/kallsyms.c | 59 +++++++++++++++++++++++--------------------
+ scripts/faddr2line | 2 +-
+ scripts/mod/modpost.h | 2 +-
+ tools/perf/util/symbol.h | 4 +--
+ 5 files changed, 39 insertions(+), 35 deletions(-)
+Merging input/next (fcc1d6eab4ce4 Input: st-keyscan - improve probe error handling)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git input/next
+Merge made by the 'ort' strategy.
+ drivers/input/keyboard/snvs_pwrkey.c | 9 ++++-----
+ drivers/input/keyboard/st-keyscan.c | 13 +++++--------
+ 2 files changed, 9 insertions(+), 13 deletions(-)
+Merging block/for-next (2dd9768a37dbb Merge branch 'for-7.4/block' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git block/for-next
+Auto-merging fs/iomap/direct-io.c
+Merge made by the 'ort' strategy.
+ block/bdev.c | 2 +-
+ block/bio-integrity-fs.c | 15 +-
+ block/bio-integrity.c | 1 +
+ block/bio.c | 219 ++++-------
+ block/blk-cgroup.c | 5 +-
+ block/blk-core.c | 7 +-
+ block/blk-map.c | 2 +-
+ block/blk-settings.c | 12 +-
+ block/blk-zoned.c | 856 ++++++++++++++++++++++++++---------------
+ block/blk.h | 6 +
+ block/fops.c | 43 ++-
+ block/partitions/efi.h | 8 +-
+ drivers/nvme/host/ioctl.c | 19 +-
+ fs/iomap/bio.c | 4 +-
+ fs/iomap/direct-io.c | 44 +--
+ fs/iomap/ioend.c | 122 +++++-
+ fs/xfs/libxfs/xfs_errortag.h | 6 +-
+ fs/xfs/xfs_aops.c | 13 +-
+ fs/xfs/xfs_buf.c | 11 +
+ fs/xfs/xfs_file.c | 11 +-
+ fs/xfs/xfs_ioend.c | 137 ++++++-
+ fs/xfs/xfs_ioend.h | 2 +
+ fs/xfs/xfs_mount.h | 8 +
+ fs/xfs/xfs_super.c | 1 +
+ fs/xfs/xfs_sysfs.c | 78 +++-
+ fs/xfs/xfs_trace.h | 1 +
+ fs/xfs/xfs_zone_alloc.c | 4 +
+ include/linux/bio-integrity.h | 3 +-
+ include/linux/bio.h | 11 +-
+ include/linux/blkdev.h | 19 +-
+ include/linux/io_uring.h | 32 ++
+ include/linux/io_uring/cmd.h | 34 +-
+ include/linux/io_uring_types.h | 2 +
+ include/linux/iomap.h | 38 +-
+ io_uring/cancel.c | 89 ++++-
+ io_uring/cancel.h | 13 +-
+ io_uring/fdinfo.c | 11 +-
+ io_uring/io_uring.c | 222 ++++++++---
+ io_uring/io_uring.h | 31 --
+ io_uring/notif.c | 2 +
+ io_uring/refs.h | 27 ++
+ io_uring/rw.c | 4 +
+ io_uring/timeout.c | 18 +
+ io_uring/timeout.h | 2 +
+ io_uring/uring_cmd.c | 23 +-
+ io_uring/uring_cmd.h | 2 +-
+ 46 files changed, 1517 insertions(+), 703 deletions(-)
+$ git am -3 ../patches/0001-Revert-block-remove-bio_last_bvec_all.patch
+Applying: Revert "block: remove bio_last_bvec_all"
+$ git reset HEAD^
+Unstaged changes after reset:
+M Documentation/block/biovecs.rst
+M include/linux/bio.h
+$ git add -A .
+$ git commit -v -a --amend
+warning: notes ref refs/notes/commits is invalid
+[master 1498ccc0cc3d6] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
+ Date: Wed Sep 16 13:29:04 2026 +0100
+Merging device-mapper/for-next (db0e36567224b dm-crypt: Reject malformed raw keys in crypt_set_key())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git device-mapper/for-next
+Merge made by the 'ort' strategy.
+ drivers/md/dm-clone-metadata.c | 3 ---
+ drivers/md/dm-crypt.c | 21 ++++++++++++---------
+ drivers/md/dm-delay.c | 3 ++-
+ drivers/md/dm-vdo/indexer/chapter-index.c | 15 +++++++++++----
+ drivers/md/dm-vdo/indexer/delta-index.c | 17 ++++++++++++++---
+ drivers/md/dm-vdo/indexer/volume.c | 6 ------
+ 6 files changed, 39 insertions(+), 26 deletions(-)
+Merging libata/for-next (52d19459ca79f ata: libata-core: Fix the ata_host_register() kdoc)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux libata/for-next
+Auto-merging drivers/ata/ahci.c
+Auto-merging drivers/ata/libata-scsi.c
+Merge made by the 'ort' strategy.
+ drivers/ata/Kconfig | 17 +-
+ drivers/ata/Makefile | 2 +-
+ drivers/ata/ahci.c | 1 +
+ drivers/ata/ahci_brcm.c | 1 +
+ drivers/ata/ahci_ceva.c | 1 +
+ drivers/ata/ahci_da850.c | 6 +-
+ drivers/ata/ahci_qoriq.c | 1 +
+ drivers/ata/ahci_st.c | 78 +--
+ drivers/ata/ata_generic.c | 16 +
+ drivers/ata/libahci.c | 29 +-
+ drivers/ata/libahci_platform.c | 4 +
+ drivers/ata/libata-core.c | 81 ++-
+ drivers/ata/libata-scsi.c | 2 +-
+ drivers/ata/libata-sff.c | 5 +
+ drivers/ata/pata_cswarp.c | 183 +++++++
+ drivers/ata/pata_parport/pata_parport.c | 7 +-
+ drivers/ata/sata_fsl.c | 26 +-
+ drivers/ata/sata_inic162x.c | 903 --------------------------------
+ drivers/ata/sata_qstor.c | 8 +-
+ include/linux/libata.h | 1 +
+ 20 files changed, 397 insertions(+), 975 deletions(-)
+ create mode 100644 drivers/ata/pata_cswarp.c
+ delete mode 100644 drivers/ata/sata_inic162x.c
+Merging pcmcia/pcmcia-next (b3c26ea81ccc5 pcmcia: remove obsolete host controller drivers)
+$ git merge -m Merge branch 'pcmcia-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git pcmcia/pcmcia-next
+Already up to date.
+Merging mmc/next (ddcec9ed9f24e mmc: vub300: Remove the driver for the obsolete HW)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git mmc/next
+Auto-merging CREDITS
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ CREDITS | 5 +
+ .../bindings/mmc/amlogic,meson-gx-mmc.yaml | 29 +-
+ .../devicetree/bindings/mmc/cdns,sd6hc.yaml | 105 +
+ .../bindings/mmc/mmc-controller-common.yaml | 10 +
+ .../devicetree/bindings/mmc/qcom,sdhci-msm.yaml | 1 +
+ MAINTAINERS | 12 +-
+ drivers/memstick/core/ms_block.c | 2 +-
+ drivers/memstick/host/r592.c | 2 +-
+ drivers/mmc/core/block.c | 2 +-
+ drivers/mmc/core/core.c | 4 +-
+ drivers/mmc/core/core.h | 8 +
+ drivers/mmc/core/crypto.c | 2 +-
+ drivers/mmc/core/host.c | 4 +
+ drivers/mmc/core/mmc.c | 2 +-
+ drivers/mmc/core/sdio_cis.c | 5 +-
+ drivers/mmc/host/Kconfig | 31 -
+ drivers/mmc/host/Makefile | 2 +-
+ drivers/mmc/host/bcm2835.c | 2 +-
+ drivers/mmc/host/davinci_mmc.c | 6 +-
+ drivers/mmc/host/dw_mmc.c | 316 ++-
+ drivers/mmc/host/dw_mmc.h | 18 +-
+ drivers/mmc/host/meson-gx-mmc.c | 31 +-
+ drivers/mmc/host/mvsdio.c | 2 +-
+ drivers/mmc/host/rtsx_usb_sdmmc.c | 5 +
+ .../host/{sdhci-cadence.c => sdhci-cadence-core.c} | 303 ++-
+ drivers/mmc/host/sdhci-cadence-phy-v6.c | 975 ++++++++
+ drivers/mmc/host/sdhci-cadence.h | 118 +
+ drivers/mmc/host/sdhci-msm.c | 34 +-
+ drivers/mmc/host/sdhci-of-arasan.c | 4 +-
+ drivers/mmc/host/sdhci-of-esdhc.c | 2 +-
+ drivers/mmc/host/sdhci-omap.c | 2 +-
+ drivers/mmc/host/sdhci-pxav3.c | 13 +-
+ drivers/mmc/host/sdhci.h | 2 +-
+ drivers/mmc/host/vub300.c | 2493 --------------------
+ include/linux/mmc/host.h | 2 +
+ 35 files changed, 1751 insertions(+), 2803 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/mmc/cdns,sd6hc.yaml
+ rename drivers/mmc/host/{sdhci-cadence.c => sdhci-cadence-core.c} (67%)
+ create mode 100644 drivers/mmc/host/sdhci-cadence-phy-v6.c
+ create mode 100644 drivers/mmc/host/sdhci-cadence.h
+ delete mode 100644 drivers/mmc/host/vub300.c
+Merging mfd/for-mfd-next (5a5f978cf3cd2 mfd: wcd934x: set DMA mask on parent to silence "DMA mask not set")
+$ git merge -m Merge branch 'for-mfd-next' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git mfd/for-mfd-next
+Merge made by the 'ort' strategy.
+ .../leds/backlight/ti,lm3533-backlight.yaml | 69 ++++
+ .../devicetree/bindings/leds/ti,lm3533-leds.yaml | 67 ++++
+ .../devicetree/bindings/leds/ti,lm3533.yaml | 169 +++++++++
+ .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
+ .../devicetree/bindings/mfd/stericsson,ab8500.yaml | 122 ++++++-
+ .../devicetree/bindings/mfd/ti,tps61050.yaml | 92 +++++
+ Documentation/devicetree/bindings/mfd/tps6105x.txt | 62 ----
+ drivers/iio/light/lm3533-als.c | 185 +++++-----
+ drivers/leds/leds-lm3533.c | 121 +++----
+ drivers/mfd/Kconfig | 2 +
+ drivers/mfd/cs42l43-i2c.c | 2 +
+ drivers/mfd/cs42l43-sdw.c | 1 +
+ drivers/mfd/cs42l43.c | 18 +-
+ drivers/mfd/da903x.c | 34 +-
+ drivers/mfd/da9062-core.c | 24 +-
+ drivers/mfd/iqs62x.c | 8 +-
+ drivers/mfd/lm3533-core.c | 386 ++++++++-------------
+ drivers/mfd/lm3533-ctrlbank.c | 33 +-
+ drivers/mfd/max77843.c | 8 +-
+ drivers/mfd/mt6360-core.c | 8 +-
+ drivers/mfd/rk8xx-i2c.c | 4 +-
+ drivers/mfd/rn5t618.c | 8 +-
+ drivers/mfd/ti_am335x_tscadc.c | 8 +-
+ drivers/mfd/tps6586x.c | 8 +-
+ drivers/mfd/twl-core.c | 8 +-
+ drivers/mfd/wcd934x.c | 6 +
+ drivers/mfd/wm831x-auxadc.c | 2 +-
+ drivers/video/backlight/lm3533_bl.c | 188 +++++-----
+ include/linux/mfd/cs42l43-regs.h | 1 +
+ include/linux/mfd/lm3533.h | 75 +---
+ 30 files changed, 1020 insertions(+), 700 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lm3533-backlight.yaml
+ create mode 100644 Documentation/devicetree/bindings/leds/ti,lm3533-leds.yaml
+ create mode 100644 Documentation/devicetree/bindings/leds/ti,lm3533.yaml
+ create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps61050.yaml
+ delete mode 100644 Documentation/devicetree/bindings/mfd/tps6105x.txt
+Merging backlight/for-backlight-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-backlight-next' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git backlight/for-backlight-next
+Already up to date.
+Merging battery/for-next (4fc88ba435dad power: supply: cros_charge-control: adopt EC charge state on probe)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git battery/for-next
+Auto-merging drivers/power/supply/max17042_battery.c
+Auto-merging include/linux/power_supply.h
+Merge made by the 'ort' strategy.
+ Documentation/ABI/testing/sysfs-class-power | 39 ++++-
+ .../ABI/testing/sysfs-class-power-ltc4162l | 2 +
+ Documentation/ABI/testing/sysfs-class-power-mp2629 | 2 +-
+ Documentation/ABI/testing/sysfs-class-power-rt9467 | 2 +
+ Documentation/ABI/testing/sysfs-class-power-rt9471 | 2 +
+ .../devicetree/bindings/power/supply/bq27xxx.yaml | 2 +-
+ drivers/power/reset/keystone-reset.c | 3 +-
+ drivers/power/supply/bq24190_charger.c | 71 +++++++++-
+ drivers/power/supply/bq24257_charger.c | 43 +++++-
+ drivers/power/supply/bq2515x_charger.c | 15 +-
+ drivers/power/supply/bq25630_charger.c | 84 +++++++++++
+ drivers/power/supply/bq25890_charger.c | 2 +-
+ drivers/power/supply/bq27xxx_battery.c | 18 ++-
+ drivers/power/supply/bq27xxx_battery_i2c.c | 2 +
+ drivers/power/supply/charger-manager.c | 2 +-
+ drivers/power/supply/cros_charge-control.c | 157 ++++++++++++++++++---
+ drivers/power/supply/da9030_battery.c | 2 +-
+ drivers/power/supply/ltc4162-l-charger.c | 56 +++++++-
+ drivers/power/supply/max17042_battery.c | 2 +-
+ drivers/power/supply/mm8013.c | 1 +
+ drivers/power/supply/power_supply_sysfs.c | 17 +++
+ drivers/power/supply/qcom_smbx.c | 98 ++++++++++---
+ drivers/power/supply/rt9467-charger.c | 54 ++++++-
+ drivers/power/supply/rt9471.c | 54 ++++++-
+ drivers/power/supply/s2mu005-battery.c | 4 +-
+ drivers/power/supply/sbs-charger.c | 4 +-
+ drivers/power/supply/smb347-charger.c | 4 +-
+ include/linux/power/bq27xxx_battery.h | 1 +
+ include/linux/power_supply.h | 18 ++-
+ 29 files changed, 671 insertions(+), 90 deletions(-)
+Merging regulator/for-next (44064abfb5405 Merge remote-tracking branch 'regulator/for-7.4' into regulator-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git regulator/for-next
+Auto-merging MAINTAINERS
+Auto-merging kernel/softirq.c
+Merge made by the 'ort' strategy.
+ .../bindings/regulator/maxim,max77826.yaml | 4 +-
+ .../bindings/regulator/maxim,max77838.yaml | 4 +-
+ .../devicetree/bindings/regulator/mps,mp5416.yaml | 38 +-
+ .../devicetree/bindings/regulator/mps,mp886x.yaml | 30 +-
+ .../devicetree/bindings/regulator/mps,mpq4210.yaml | 68 ++
+ .../devicetree/bindings/regulator/mps,mpq7920.yaml | 46 +-
+ .../devicetree/bindings/regulator/nxp,pf0900.yaml | 2 +-
+ .../bindings/regulator/onnn,fan53880.yaml | 4 +-
+ .../bindings/regulator/pwm-regulator.yaml | 2 +-
+ .../bindings/regulator/qcom,rpmh-regulator.yaml | 16 +
+ .../regulator/richtek,rtmv20-regulator.yaml | 6 +-
+ .../bindings/regulator/silergy,sy8824x.yaml | 8 +-
+ .../bindings/regulator/silergy,sy8827n.yaml | 4 +-
+ .../devicetree/bindings/regulator/ti,tps65023.yaml | 90 +++
+ .../devicetree/bindings/regulator/tps65023.txt | 60 --
+ MAINTAINERS | 6 +
+ drivers/regulator/Kconfig | 13 +-
+ drivers/regulator/Makefile | 1 +
+ drivers/regulator/ab8500-ext.c | 2 +-
+ drivers/regulator/ab8500.c | 748 +++++++++++++++++++--
+ drivers/regulator/core.c | 2 +-
+ drivers/regulator/fixed.c | 4 +
+ drivers/regulator/mp886x.c | 23 +-
+ drivers/regulator/mpq4210.c | 243 +++++++
+ drivers/regulator/pca9450-regulator.c | 81 ++-
+ drivers/regulator/pf1550-regulator.c | 19 +-
+ drivers/regulator/pv88080-regulator.c | 4 +-
+ drivers/regulator/qcom-rpmh-regulator.c | 55 +-
+ drivers/regulator/tps6105x-regulator.c | 2 +-
+ drivers/regulator/tps65185.c | 6 +-
+ include/linux/regulator/driver.h | 2 +-
+ include/linux/regulator/pca9450.h | 4 +-
+ kernel/irq/irqdesc.c | 10 +-
+ kernel/softirq.c | 4 +-
+ 34 files changed, 1363 insertions(+), 248 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/regulator/mps,mpq4210.yaml
+ create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps65023.yaml
+ delete mode 100644 Documentation/devicetree/bindings/regulator/tps65023.txt
+ create mode 100644 drivers/regulator/mpq4210.c
+Merging security/next (63b4c8561b436 selftests/landlock: Check full ioctl commands in audit records)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git security/next
+Auto-merging fs/namei.c
+CONFLICT (content): Merge conflict in fs/namei.c
+Auto-merging fs/namespace.c
+Auto-merging include/linux/lsm_hook_defs.h
+Auto-merging include/linux/ns/ns_common_types.h
+CONFLICT (content): Merge conflict in include/linux/ns/ns_common_types.h
+Auto-merging include/linux/sched.h
+Auto-merging include/linux/security.h
+Auto-merging security/security.c
+Auto-merging security/selinux/hooks.c
+Resolved 'fs/namei.c' using previous resolution.
+Resolved 'include/linux/ns/ns_common_types.h' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master f95b2a0bf3233] Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git
+$ git diff -M --stat --summary HEAD^..
+ Documentation/admin-guide/LSM/index.rst | 20 +-
+ fs/cachefiles/security.c | 4 +-
+ fs/namei.c | 20 +-
+ fs/namespace.c | 3 +-
+ include/linux/cred.h | 17 +-
+ include/linux/lsm_audit.h | 7 +-
+ include/linux/lsm_hook_defs.h | 26 +--
+ include/linux/lsm_hooks.h | 1 +
+ include/linux/ns/ns_common_types.h | 3 +
+ include/linux/sched.h | 8 +-
+ include/linux/security.h | 78 +++++---
+ include/uapi/linux/nsfs.h | 1 +
+ init/init_task.c | 2 +-
+ kernel/auditsc.c | 5 +-
+ kernel/cred.c | 5 +-
+ kernel/nscommon.c | 17 +-
+ kernel/nsproxy.c | 6 +
+ rust/kernel/security.rs | 3 +-
+ security/lsm_audit.c | 8 +-
+ security/lsm_init.c | 6 +-
+ security/security.c | 115 +++++++++--
+ security/selinux/hooks.c | 25 ++-
+ security/smack/smack_lsm.c | 9 +-
+ tools/testing/selftests/bpf/prog_tests/test_lsm.c | 231 ++++++++++++++++++++++
+ tools/testing/selftests/bpf/progs/lsm.c | 79 ++++++++
+ tools/testing/selftests/landlock/fs_test.c | 10 +-
+ 26 files changed, 599 insertions(+), 110 deletions(-)
+Merging apparmor/apparmor-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'apparmor-next' of https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor apparmor/apparmor-next
+Already up to date.
+Merging integrity/next-integrity (6903878d4654b ima: allow users to specify the pcr index with IMA_MEASURE_PCR_IDX)
+$ git merge -m Merge branch 'next-integrity' of https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity integrity/next-integrity
+Already up to date.
+Merging selinux/next (7f0636181232e Automated merge of 'dev' into 'next')
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git selinux/next
+Auto-merging security/selinux/hooks.c
+Merge made by the 'ort' strategy.
+ security/selinux/avc.c | 5 +-
+ security/selinux/hooks.c | 158 +++++++++++++++++++++++++++++++++-----
+ security/selinux/include/objsec.h | 10 ++-
+ security/selinux/selinuxfs.c | 59 ++++++++------
+ security/selinux/ss/mls.c | 38 ---------
+ security/selinux/ss/mls.h | 3 -
+ security/selinux/ss/mls_types.h | 3 -
+ security/selinux/ss/policydb.c | 11 +--
+ 8 files changed, 188 insertions(+), 99 deletions(-)
+Merging smack/next (fedc88e38ce97 smack: fix cred UAF in smack_file_send_sigiotask())
+$ git merge -m Merge branch 'next' of https://github.com/cschaufler/smack-next smack/next
+Already up to date.
+Merging tomoyo/master (1fc5a74b108fc Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux)
+$ git merge -m Merge branch 'master' of git://git.code.sf.net/p/tomoyo/tomoyo.git tomoyo/master
+Already up to date.
+Merging tpmdd-tpm/for-next-tpm (b5f1b25b21f56 char: tpm: Use SIMPLE_DEV_PM_OPS for ibmvtpm power management)
+$ git merge -m Merge branch 'for-next-tpm' of https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpmdd-tpm/for-next-tpm
+Merge made by the 'ort' strategy.
+ drivers/char/tpm/tpm-chip.c | 24 ------------------------
+ drivers/char/tpm/tpm-interface.c | 23 ++++++++++++++++++++++-
+ drivers/char/tpm/tpm2-cmd.c | 6 ++++--
+ drivers/char/tpm/tpm_atmel.c | 4 ++--
+ drivers/char/tpm/tpm_i2c_atmel.c | 4 ++--
+ drivers/char/tpm/tpm_i2c_infineon.c | 4 ++--
+ drivers/char/tpm/tpm_i2c_nuvoton.c | 4 ++--
+ drivers/char/tpm/tpm_ibmvtpm.c | 5 +----
+ drivers/char/tpm/tpm_infineon.c | 4 ++--
+ drivers/char/tpm/tpm_nsc.c | 4 ++--
+ drivers/char/tpm/tpm_tis.c | 4 ++--
+ drivers/char/tpm/tpm_tis_i2c.c | 4 ++--
+ drivers/char/tpm/tpm_tis_i2c_cr50.c | 4 ++--
+ drivers/char/tpm/tpm_tis_spi_main.c | 4 ++--
+ drivers/char/tpm/tpm_tis_synquacer.c | 4 ++--
+ include/keys/request_key_auth-type.h | 2 +-
+ security/keys/encrypted-keys/encrypted.c | 20 ++++++++++++++------
+ security/keys/gc.c | 4 +---
+ security/keys/request_key_auth.c | 12 +++++++++---
+ security/keys/trusted-keys/trusted_tpm2.c | 12 +++++++-----
+ 20 files changed, 81 insertions(+), 71 deletions(-)
+Merging tpmdd-keys/for-next-keys (8697c431e297e KEYS: encrypted: fix integer overflow of datablob_len)
+$ git merge -m Merge branch 'for-next-keys' of https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpmdd-keys/for-next-keys
+Already up to date.
+Merging watchdog/watchdog-next (385c2df077683 watchdog: sp805_wdt: fix suspend/resume handling of HW_RUNNING watchdog)
+$ git merge -m Merge branch 'watchdog-next' of https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git watchdog/watchdog-next
+Merge made by the 'ort' strategy.
+ .../bindings/watchdog/mediatek,mtk-wdt.yaml | 1 +
+ .../bindings/watchdog/renesas,r9a09g057-wdt.yaml | 29 ++++++++-
+ .../devicetree/bindings/watchdog/samsung-wdt.yaml | 23 +++++++-
+ Documentation/watchdog/watchdog-parameters.rst | 2 +
+ drivers/watchdog/cadence_wdt.c | 8 +--
+ drivers/watchdog/da9062_wdt.c | 8 +--
+ drivers/watchdog/davinci_wdt.c | 2 +-
+ drivers/watchdog/i6300esb.c | 19 ++++--
+ drivers/watchdog/keembay_wdt.c | 8 +--
+ drivers/watchdog/max63xx_wdt.c | 2 +-
+ drivers/watchdog/msc313e_wdt.c | 12 ++--
+ drivers/watchdog/mtk_wdt.c | 69 +++++++++++++++++++---
+ drivers/watchdog/of_xilinx_wdt.c | 8 +--
+ drivers/watchdog/pc87413_wdt.c | 2 +-
+ drivers/watchdog/pcwd_pci.c | 2 +-
+ drivers/watchdog/pcwd_usb.c | 2 +-
+ drivers/watchdog/pm8916_wdt.c | 8 +--
+ drivers/watchdog/s3c2410_wdt.c | 16 +++++
+ drivers/watchdog/sbsa_gwdt.c | 19 +++++-
+ drivers/watchdog/sp5100_tco.c | 61 +++++++++++++++++--
+ drivers/watchdog/sp805_wdt.c | 14 +++--
+ drivers/watchdog/stmp3xxx_rtc_wdt.c | 8 +--
+ drivers/watchdog/watchdog_dev.c | 4 ++
+ drivers/watchdog/wdt.c | 4 +-
+ drivers/watchdog/wdt977.c | 2 +-
+ drivers/watchdog/wdt_pci.c | 4 +-
+ 26 files changed, 270 insertions(+), 67 deletions(-)
+Merging iommu/next (b63c3c2672657 iommu/amd: Remove unused macro)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git iommu/next
+Already up to date.
+Merging audit/next (ca12826b4aac8 audit: Fix filter rule accounting after automatic removal)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git audit/next
+Auto-merging kernel/auditsc.c
+Merge made by the 'ort' strategy.
+ include/linux/audit.h | 6 ++--
+ kernel/audit.c | 2 +-
+ kernel/audit.h | 5 +++
+ kernel/audit_tree.c | 1 +
+ kernel/audit_watch.c | 2 ++
+ kernel/auditfilter.c | 86 +++++++++++++++++++++++++--------------------------
+ kernel/auditsc.c | 2 ++
+ 7 files changed, 56 insertions(+), 48 deletions(-)
+Merging devicetree/for-next (8273a4059c417 dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git devicetree/for-next
+Auto-merging Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml
+Auto-merging Documentation/devicetree/bindings/trivial-devices.yaml
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/arm/arm,coresight-cti.yaml | 2 +-
+ .../bindings/arm/mediatek/mediatek,g3dsys.txt | 30 -
+ Documentation/devicetree/bindings/arm/omap/mpu.txt | 54 --
+ .../devicetree/bindings/arm/ti/ti,omap-mpu.yaml | 58 ++
+ .../devicetree/bindings/bus/omap-ocp2scp.txt | 29 -
+ .../devicetree/bindings/bus/ti,omap-ocp2scp.yaml | 74 ++
+ .../bindings/display/bridge/sil,sii9022.yaml | 2 +-
+ .../devicetree/bindings/gpio/delta,tn48m-gpio.yaml | 2 +-
+ .../devicetree/bindings/hwmon/adi,ltc2991.yaml | 2 +-
+ .../bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 4 +-
+ .../bindings/iio/light/upisemi,us5182.yaml | 2 +-
+ .../devicetree/bindings/input/matrix-keymap.yaml | 3 +-
+ .../devicetree/bindings/input/ti,tca8418.yaml | 21 +-
+ .../bindings/interrupt-controller/qcom,pdc.yaml | 1 +
+ .../devicetree/bindings/media/nxp,imx8-jpeg.yaml | 4 +-
+ .../devicetree/bindings/mfd/ti,tps65910.yaml | 2 +-
+ .../bindings/nvmem/zii,rave-sp-eeprom.yaml | 2 +-
+ .../bindings/pci/hisilicon,kirin-pcie.yaml | 4 +-
+ .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml | 2 +-
+ .../soc/mediatek/mediatek,mt2701-g3dsys.yaml | 58 ++
+ .../bindings/spi/aspeed,ast2600-fmc.yaml | 6 +-
+ .../devicetree/bindings/thermal/thermal-idle.yaml | 2 +-
+ .../devicetree/bindings/trivial-devices.yaml | 4 +-
+ MAINTAINERS | 2 +
+ drivers/of/property.c | 6 +-
+ include/dt-bindings/clock/agilex-clock.h | 1 +
+ scripts/dtc/dt-check-style | 854 ++++++++++++---------
+ .../bad/dts-child-name-order.dtso | 33 +
+ .../dtc/dt-style-selftest/bad/dts-cont-align.dts | 26 +
+ .../dt-style-selftest/bad/dts-digit-node-order.dts | 40 +
+ .../bad/dts-digit-node-order.dtso | 41 +
+ .../bad/dts-extend-node-child-name-order.dtso | 26 +
+ .../bad/dts-extend-node-digit-node-order.dtso | 34 +
+ .../dtc/dt-style-selftest/bad/dts-line-length.dts | 21 +
+ .../dtc/dt-style-selftest/bad/dts-node-name.dts | 60 ++
+ .../dt-style-selftest/bad/dts-property-name.dts | 28 +
+ .../dt-style-selftest/bad/dts-property-order.dts | 15 +
+ .../dt-style-selftest/bad/dts-property-order.dtso | 59 ++
+ .../bad/dts-redundant-ws-strict.dts | 27 +
+ .../dtc/dt-style-selftest/bad/dts-redundant-ws.dts | 28 +
+ .../dt-style-selftest/bad/dts-redundant-ws.dtso | 9 +
+ .../dtc/dt-style-selftest/bad/dts-trailing-ws.dts | 8 +
+ .../dtc/dt-style-selftest/bad/dts-unused-label.dts | 21 +
+ .../bad/yaml-child-addr-order.yaml | 2 +-
+ .../bad/yaml-child-name-order.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-cont-align.yaml | 8 +-
+ .../bad/yaml-digit-node-order.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-hex-case.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-indent-strict.yaml | 2 +-
+ .../bad/yaml-label-in-string.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-line-length.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-mixed-indent.yaml | 4 +-
+ .../dt-style-selftest/bad/yaml-multi-close.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-node-close.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-node-name.yaml | 54 ++
+ .../bad/yaml-prop-order-device-type.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-prop-order.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-prop-pairing.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-property-name.yaml | 46 ++
+ .../bad/yaml-redundant-ws-strict.yaml | 31 +
+ .../dt-style-selftest/bad/yaml-redundant-ws.yaml | 35 +
+ .../dt-style-selftest/bad/yaml-required-blank.yaml | 2 +-
+ scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml | 2 +-
+ .../bad/yaml-trailing-comment.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-trailing-ws.yaml | 2 +-
+ .../bad/yaml-unclosed-comment.yaml | 2 +-
+ .../bad/yaml-unit-addr-prefix.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-unit-addr.yaml | 2 +-
+ .../dt-style-selftest/bad/yaml-unused-label.yaml | 2 +-
+ .../bad/yaml-value-ws-multiline.yaml | 2 +-
+ .../dtc/dt-style-selftest/bad/yaml-value-ws.yaml | 2 +-
+ .../expected/dts-child-name-order.dts.txt | 1 +
+ .../expected/dts-child-name-order.dtso.txt | 3 +
+ .../expected/dts-cont-align.dts.txt | 10 +
+ .../expected/dts-digit-node-order.dts.txt | 2 +
+ .../expected/dts-digit-node-order.dtso.txt | 2 +
+ .../dts-extend-node-child-name-order.dtso.txt | 2 +
+ .../dts-extend-node-digit-node-order.dtso.txt | 2 +
+ .../expected/dts-line-length.dts.txt | 2 +
+ .../expected/dts-mixed-indent.dts.txt | 1 +
+ .../expected/dts-node-name.dts.txt | 13 +
+ .../expected/dts-property-name.dts.txt | 14 +
+ .../expected/dts-property-order.dts.txt | 15 +-
+ .../expected/dts-property-order.dtso.txt | 11 +
+ .../expected/dts-redundant-ws-strict.dts.txt | 13 +
+ .../expected/dts-redundant-ws.dts.txt | 10 +
+ .../expected/dts-redundant-ws.dtso.txt | 2 +
+ .../expected/dts-trailing-ws.dts.txt | 2 +
+ .../expected/dts-unused-label.dts.txt | 2 +
+ .../expected/yaml-cont-align.yaml.txt | 3 +-
+ .../expected/yaml-mixed-indent.yaml.txt | 1 +
+ .../expected/yaml-node-name.yaml.txt | 7 +
+ .../expected/yaml-property-name.yaml.txt | 14 +
+ .../expected/yaml-redundant-ws-strict.yaml.txt | 5 +
+ .../expected/yaml-redundant-ws.yaml.txt | 4 +
+ .../expected/yaml-value-ws-multiline.yaml.txt | 1 +
+ .../good/dts-child-name-order.dtso | 44 ++
+ .../dtc/dt-style-selftest/good/dts-cont-align.dts | 13 +-
+ .../good/dts-digit-node-order.dts | 3 -
+ .../good/dts-digit-node-order.dtso | 59 ++
+ .../good/dts-extend-node-child-name-order.dtso | 26 +
+ .../good/dts-extend-node-digit-node-order.dtso | 34 +
+ .../dt-style-selftest/good/dts-property-order.dts | 5 +
+ .../dt-style-selftest/good/dts-property-order.dtso | 47 ++
+ .../dtc/dt-style-selftest/good/yaml-4space.yaml | 2 +-
+ .../dt-style-selftest/good/yaml-cont-align.yaml | 32 +
+ .../good/yaml-tricky-parsing.yaml | 2 +-
+ scripts/dtc/dt-style-selftest/run.sh | 2 +-
+ 108 files changed, 1797 insertions(+), 543 deletions(-)
+ delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
+ delete mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt
+ create mode 100644 Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
+ delete mode 100644 Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
+ create mode 100644 Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
+ create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt2701-g3dsys.yaml
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-line-length.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-node-name.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-property-name.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml
+ create mode 100644 scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-order.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-order.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt
+ create mode 100644 scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/good/dts-property-order.dtso
+ create mode 100644 scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml
+Merging dt-krzk/for-next (6bd34d56818cc Merge branches 'next/dt' and 'next/dt64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git dt-krzk/for-next
+Merge made by the 'ort' strategy.
+Merging mailbox/for-next (14af7a96afa39 mailbox: add Axiado AX3005 mailbox driver)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox.git mailbox/for-next
+Already up to date.
+Merging spi/for-next (bfbb7ef974fa0 Merge remote-tracking branch 'spi/for-7.4' into spi-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git spi/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/spi/amlogic,a4-spisg.yaml | 30 +-
+ Documentation/spi/multiple-data-lanes.rst | 10 +-
+ drivers/spi/Kconfig | 364 +++++++--------
+ drivers/spi/spi-amlogic-spisg.c | 116 ++++-
+ drivers/spi/spi-ar934x.c | 13 +-
+ drivers/spi/spi-bcm63xx.c | 2 +-
+ drivers/spi/spi-geni-qcom.c | 93 +++-
+ drivers/spi/spi-imx.c | 2 +-
+ drivers/spi/spi-ingenic.c | 5 +-
+ drivers/spi/spi-ma35d1-qspi.c | 27 +-
+ drivers/spi/spi-mem.c | 6 +-
+ drivers/spi/spi-mtk-nor.c | 1 +
+ drivers/spi/spi-omap2-mcspi.c | 4 +-
+ drivers/spi/spi-orion.c | 9 +
+ drivers/spi/spi-pic32.c | 2 +-
+ drivers/spi/spi-qpic-snand.c | 9 +-
+ drivers/spi/spi-rockchip-sfc.c | 5 +
+ drivers/spi/spi-s3c64xx.c | 2 +-
+ drivers/spi/spi-sh-msiof.c | 5 +-
+ drivers/spi/spi-stm32.c | 2 +-
+ drivers/spi/spi-sun6i.c | 2 +-
+ drivers/spi/spi-sunplus-sp7021.c | 13 +-
+ drivers/spi/spi-tegra210-quad.c | 517 ++++++++++++++++++---
+ drivers/spi/spi-virtio.c | 2 -
+ drivers/spi/spi-xilinx.c | 2 +-
+ drivers/spi/spi.c | 2 +-
+ 26 files changed, 905 insertions(+), 340 deletions(-)
+Merging tip/master (9d957098a0d4c Merge branch into tip/master: 'x86/tdx')
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tip/master
+Auto-merging Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
+Auto-merging arch/Kconfig
+Auto-merging arch/arm64/Kconfig.platforms
+Auto-merging arch/arm64/configs/defconfig
+Auto-merging arch/powerpc/Kconfig
+Auto-merging arch/s390/Kconfig
+Auto-merging arch/x86/Kconfig
+Auto-merging include/linux/sched.h
+Merge made by the 'ort' strategy.
+ Documentation/arch/arm64/silicon-errata.rst | 3 +
+ Documentation/arch/x86/tdx.rst | 21 +
+ .../bindings/interrupt-controller/qcom,pdc.yaml | 1 +
+ Documentation/filesystems/resctrl.rst | 17 +-
+ arch/Kconfig | 38 --
+ arch/arm/kernel/perf_regs.c | 8 +-
+ arch/arm64/Kconfig | 10 +-
+ arch/arm64/Kconfig.platforms | 1 +
+ arch/arm64/boot/dts/qcom/purwa.dtsi | 5 +
+ arch/arm64/configs/defconfig | 2 -
+ arch/arm64/include/asm/preempt.h | 10 -
+ arch/arm64/kernel/paravirt.c | 4 +-
+ arch/arm64/kernel/perf_regs.c | 8 +-
+ arch/csky/kernel/perf_regs.c | 8 +-
+ arch/loongarch/Kconfig | 1 -
+ arch/loongarch/kernel/paravirt.c | 4 +-
+ arch/loongarch/kernel/perf_regs.c | 8 +-
+ arch/mips/kernel/perf_regs.c | 8 +-
+ arch/parisc/kernel/perf_regs.c | 8 +-
+ arch/powerpc/Kconfig | 1 -
+ arch/powerpc/perf/perf_regs.c | 2 +-
+ arch/powerpc/platforms/pseries/setup.c | 4 +-
+ arch/riscv/Kconfig | 1 -
+ arch/riscv/include/asm/smp.h | 12 +
+ arch/riscv/kernel/paravirt.c | 4 +-
+ arch/riscv/kernel/perf_regs.c | 8 +-
+ arch/riscv/kernel/sbi-ipi.c | 4 +-
+ arch/riscv/kernel/smp.c | 12 -
+ arch/s390/Kconfig | 1 -
+ arch/s390/include/asm/preempt.h | 11 -
+ arch/s390/kernel/perf_regs.c | 2 +-
+ arch/x86/Kconfig | 1 -
+ arch/x86/boot/early_serial_console.c | 13 +-
+ arch/x86/events/core.c | 483 ++++++++++++++++++++-
+ arch/x86/events/intel/core.c | 108 ++++-
+ arch/x86/events/intel/ds.c | 232 +++++++---
+ arch/x86/events/perf_event.h | 208 ++++++++-
+ arch/x86/include/asm/cpufeatures.h | 3 +
+ arch/x86/include/asm/fpu/sched.h | 5 +-
+ arch/x86/include/asm/fpu/xstate.h | 3 +
+ arch/x86/include/asm/kvm-x86-ops.h | 1 +
+ arch/x86/include/asm/kvm_host.h | 1 +
+ arch/x86/include/asm/msr-index.h | 7 +
+ arch/x86/include/asm/perf_event.h | 35 +-
+ arch/x86/include/asm/preempt.h | 28 --
+ arch/x86/include/asm/tdx.h | 23 +
+ arch/x86/include/asm/tdx_global_metadata.h | 9 +-
+ arch/x86/include/uapi/asm/perf_regs.h | 53 +++
+ arch/x86/kernel/cpu/amd.c | 21 +-
+ arch/x86/kernel/cpu/bugs.c | 18 +-
+ arch/x86/kernel/cpu/common.c | 4 +-
+ arch/x86/kernel/cpu/mtrr/amd.c | 9 +-
+ arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 6 +
+ arch/x86/kernel/cpu/scattered.c | 1 +
+ arch/x86/kernel/cpu/sgx/main.c | 8 +-
+ arch/x86/kernel/cpu/vmware.c | 4 +-
+ arch/x86/kernel/crash.c | 6 +-
+ arch/x86/kernel/fpu/core.c | 33 +-
+ arch/x86/kernel/fpu/xstate.c | 25 +-
+ arch/x86/kernel/kvm.c | 4 +-
+ arch/x86/kernel/perf_regs.c | 172 +++++++-
+ arch/x86/kernel/shstk.c | 2 +-
+ arch/x86/kvm/mmu/mmu.c | 4 +
+ arch/x86/kvm/vmx/tdx.c | 99 +++--
+ arch/x86/kvm/vmx/tdx.h | 2 +
+ arch/x86/virt/vmx/tdx/tdx.c | 434 +++++++++++++++---
+ arch/x86/virt/vmx/tdx/tdx.h | 2 +
+ arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 23 +-
+ arch/x86/xen/pmu.c | 5 +-
+ drivers/clocksource/timer-clint.c | 4 +-
+ drivers/irqchip/Kconfig | 6 +-
+ drivers/irqchip/irq-aclint-sswi.c | 4 +-
+ drivers/irqchip/irq-al-fic.c | 2 +-
+ drivers/irqchip/irq-gic-v3-its.c | 6 +-
+ drivers/irqchip/irq-gic-v3.c | 12 +-
+ drivers/irqchip/irq-gic-v5.c | 9 +-
+ drivers/irqchip/irq-gic.c | 8 +-
+ drivers/irqchip/irq-lan966x-oic.c | 1 -
+ drivers/irqchip/irq-mtk-cirq.c | 2 +-
+ drivers/irqchip/irq-pruss-intc.c | 38 +-
+ drivers/irqchip/irq-riscv-imsic-early.c | 4 +-
+ drivers/irqchip/irq-riscv-imsic-state.c | 13 +-
+ drivers/irqchip/irq-riscv-imsic-state.h | 1 -
+ drivers/irqchip/irq-sifive-plic.c | 2 +-
+ drivers/irqchip/irq-vic.c | 2 +-
+ drivers/irqchip/qcom-pdc.c | 3 +
+ drivers/resctrl/mpam_resctrl.c | 5 +
+ drivers/soc/fsl/qe/qe_ports_ic.c | 1 -
+ drivers/xen/time.c | 4 +-
+ fs/resctrl/ctrlmondata.c | 6 +-
+ include/asm-generic/preempt.h | 10 -
+ include/linux/irq-entry-common.h | 17 +-
+ include/linux/kernel.h | 20 -
+ include/linux/perf_event.h | 23 +
+ include/linux/perf_regs.h | 36 +-
+ include/linux/preempt.h | 20 +-
+ include/linux/resctrl.h | 19 +
+ include/linux/sched.h | 31 +-
+ include/linux/sched/cputime.h | 6 +-
+ include/uapi/linux/perf_event.h | 49 ++-
+ kernel/Kconfig.kexec | 2 +-
+ kernel/Kconfig.preempt | 9 +-
+ kernel/crash_core.c | 2 +-
+ kernel/entry/common.c | 17 +-
+ kernel/events/core.c | 177 +++++++-
+ kernel/irq/irqdomain.c | 1 +
+ kernel/sched/core.c | 221 ++--------
+ kernel/sched/cputime.c | 4 +-
+ kernel/sched/deadline.c | 2 +-
+ kernel/sched/debug.c | 20 +-
+ kernel/sched/fair.c | 23 +-
+ kernel/sched/sched.h | 38 +-
+ 112 files changed, 2320 insertions(+), 882 deletions(-)
+Merging kexec/kexec-next (4d17a004cfd54 Merge branch 'kexec-7.4' into kexec-next)
+$ git merge -m Merge branch 'kexec-next' of https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git kexec/kexec-next
+Merge made by the 'ort' strategy.
+ arch/riscv/kernel/kexec_elf.c | 2 +-
+ include/linux/kexec.h | 15 ---------------
+ include/linux/mm.h | 14 ++++++++++++++
+ kernel/kexec_core.c | 10 ++++++++++
+ kernel/kexec_file.c | 22 ++++++++++++++++++++--
+ mm/memory-failure.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 85 insertions(+), 18 deletions(-)
+Merging liveupdate/next (25c3605f49188 Merge branch 'luo-internal-api' into next)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git liveupdate/next
+Merge made by the 'ort' strategy.
+ Documentation/admin-guide/mm/kho.rst | 2 +-
+ include/linux/liveupdate.h | 22 ++++++++++
+ kernel/liveupdate/kexec_handover.c | 7 +++
+ kernel/liveupdate/luo_file.c | 84 ++++++++++++++++++++++++++++++++++++
+ kernel/liveupdate/luo_internal.h | 17 ++++++++
+ 5 files changed, 131 insertions(+), 1 deletion(-)
+Merging clockevents/timers/drivers/next (1b8b356b4b06e clocksource/drivers/armada: Unwind timer clock on init failure)
+$ git merge -m Merge branch 'timers/drivers/next' of https://git.kernel.org/pub/scm/linux/kernel/git/daniel.lezcano/linux.git clockevents/timers/drivers/next
+Auto-merging drivers/clocksource/timer-ti-dm.c
+Auto-merging drivers/pwm/pwm-samsung.c
+Merge made by the 'ort' strategy.
+Merging edac/edac-for-next (ff2ba4ce4abcd Merge ras/edac-drivers into for-next)
+$ git merge -m Merge branch 'edac-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac/edac-for-next
+Auto-merging MAINTAINERS
+Auto-merging arch/x86/include/asm/msr-index.h
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 10 +-
+ arch/x86/include/asm/mce.h | 5 +
+ arch/x86/include/asm/msr-index.h | 2 +
+ drivers/base/cacheinfo.c | 17 +++
+ drivers/edac/Kconfig | 22 +++
+ drivers/edac/Makefile | 5 +-
+ drivers/edac/bluefield_edac.c | 4 +-
+ drivers/edac/dummy_edac.c | 191 +++++++++++++++++++++++++
+ drivers/edac/i10nm_base.c | 1 +
+ drivers/edac/ie31200_edac.c | 4 +-
+ drivers/edac/intel-bff.c | 295 +++++++++++++++++++++++++++++++++++++++
+ drivers/edac/loongson_edac.c | 4 +-
+ include/linux/cacheinfo.h | 12 +-
+ 13 files changed, 553 insertions(+), 19 deletions(-)
+ create mode 100644 drivers/edac/dummy_edac.c
+ create mode 100644 drivers/edac/intel-bff.c
+Merging ftrace/for-next (6dc993d4520fd tools/bootconfig: remove unused PAGE_SIZE macro)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git ftrace/for-next
+Auto-merging lib/bootconfig.c
+Auto-merging tools/bootconfig/main.c
+Merge made by the 'ort' strategy.
+ include/linux/bootconfig.h | 7 +------
+ lib/bootconfig.c | 22 +++++++++-------------
+ tools/bootconfig/main.c | 2 --
+ 3 files changed, 10 insertions(+), 21 deletions(-)
+$ git am -3 ../patches/0001-ftrace-Fix-semantic-conflict-with-mm-tree.patch
+Applying: ftrace: Fix semantic conflict with mm tree
+Using index info to reconstruct a base tree...
+M kernel/trace/trace_printk.c
+Falling back to patching base and 3-way merge...
+Auto-merging kernel/trace/trace_printk.c
+No changes -- Patch already applied.
+Merging rcu/next (9cc63f8bcd560 Merge branches 'expcb.2026.07.24a', 'misc.2026.07.30a', 'rcu-tasks.2026.07.30a', 'srcu.2026.08.11a' and 'torture.2026.08.14a' into HEAD)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux rcu/next
+Already up to date.
+Merging paulmck/non-rcu/next (d60bdc9903087 Merge branches 'csd-lock.2026.09.03a', 'hazptr.2026.09.03a' and 'hrtimer_sleeper.2026.09.03a' into HEAD)
+$ git merge -m Merge branch 'non-rcu/next' of https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git paulmck/non-rcu/next
+Auto-merging Documentation/admin-guide/kernel-parameters.txt
+Auto-merging fs/aio.c
+Auto-merging init/main.c
+Auto-merging io_uring/rw.c
+Auto-merging kernel/Makefile
+Auto-merging kernel/futex/requeue.c
+Auto-merging kernel/sched/core.c
+Auto-merging kernel/time/hrtimer.c
+Auto-merging lib/Kconfig.debug
+Merge made by the 'ort' strategy.
+ Documentation/admin-guide/kernel-parameters.txt | 96 +++
+ fs/aio.c | 2 +-
+ include/linux/hazptr.h | 325 +++++++
+ include/linux/hrtimer.h | 10 +-
+ include/linux/torture.h | 6 +-
+ include/linux/wait.h | 2 +-
+ init/main.c | 2 +
+ io_uring/rw.c | 2 +-
+ kernel/Makefile | 2 +-
+ kernel/futex/requeue.c | 2 +-
+ kernel/futex/waitwake.c | 8 +-
+ kernel/hazptr.c | 284 +++++++
+ kernel/locking/rtmutex.c | 2 +-
+ kernel/rcu/Kconfig.debug | 21 +
+ kernel/rcu/Makefile | 1 +
+ kernel/rcu/hazptrtorture.c | 946 +++++++++++++++++++++
+ kernel/rcu/refscale.c | 43 +
+ kernel/rcu/update.c | 3 +-
+ kernel/sched/core.c | 2 +
+ kernel/smp.c | 77 +-
+ kernel/time/hrtimer.c | 23 +-
+ kernel/time/sleep_timeout.c | 4 +-
+ kernel/torture.c | 38 +-
+ lib/Kconfig.debug | 12 +
+ lib/Makefile | 1 +
+ lib/test_csd_lock.c | 173 ++++
+ net/core/pktgen.c | 4 +-
+ tools/testing/selftests/rcutorture/bin/kvm.sh | 6 +-
+ .../selftests/rcutorture/configs/hazptr/CFLIST | 2 +
+ .../selftests/rcutorture/configs/hazptr/CFcommon | 2 +
+ .../selftests/rcutorture/configs/hazptr/NOPREEMPT | 19 +
+ .../rcutorture/configs/hazptr/NOPREEMPT.boot | 1 +
+ .../selftests/rcutorture/configs/hazptr/PREEMPT | 16 +
+ .../rcutorture/configs/hazptr/ver_functions.sh | 40 +
+ 34 files changed, 2118 insertions(+), 59 deletions(-)
+ create mode 100644 include/linux/hazptr.h
+ create mode 100644 kernel/hazptr.c
+ create mode 100644 kernel/rcu/hazptrtorture.c
+ create mode 100644 lib/test_csd_lock.c
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/CFLIST
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/CFcommon
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/NOPREEMPT
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/NOPREEMPT.boot
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/PREEMPT
+ create mode 100644 tools/testing/selftests/rcutorture/configs/hazptr/ver_functions.sh
+Merging kvm/next (d4b7fb647204f Merge branch 'kvm-xen-longmode' into HEAD)
+$ git merge -m Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm/next
+Auto-merging arch/x86/include/asm/kvm_host.h
+Merge made by the 'ort' strategy.
+ arch/x86/include/asm/kvm_host.h | 3 +-
+ arch/x86/kvm/xen.c | 212 ++++++++++++++++++++++++----------------
+ arch/x86/kvm/xen.h | 5 +
+ include/linux/kvm_host.h | 2 +
+ virt/kvm/kvm_main.c | 10 ++
+ virt/kvm/pfncache.c | 18 ++--
+ 6 files changed, 157 insertions(+), 93 deletions(-)
+$ git am -3 ../patches/kvm-x86-static-cpu-has
+Applying: Signed-off-by: Mark Brown <broonie@kernel.org>
+Using index info to reconstruct a base tree...
+M arch/x86/kvm/msrs.c
+Falling back to patching base and 3-way merge...
+Auto-merging arch/x86/kvm/msrs.c
+No changes -- Patch already applied.
+Merging kvm-arm/next (8476ce1f1e949 Merge branch kvm-arm64/selftests-7.4 into kvmarm-master/next)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm/next
+Auto-merging arch/arm64/include/asm/kvm_host.h
+Auto-merging arch/arm64/kvm/arm.c
+Auto-merging arch/arm64/kvm/hyp/nvhe/pkvm.c
+Auto-merging arch/arm64/kvm/vgic/vgic-its.c
+Auto-merging drivers/irqchip/irq-gic-v5.c
+Merge made by the 'ort' strategy.
+ Documentation/virt/kvm/api.rst | 21 +-
+ Documentation/virt/kvm/devices/arm-vgic-v5.rst | 271 ++-
+ Documentation/virt/kvm/devices/vcpu.rst | 2 +-
+ arch/arm64/include/asm/kvm_asm.h | 3 +
+ arch/arm64/include/asm/kvm_hcall.h | 247 +++
+ arch/arm64/include/asm/kvm_host.h | 49 +-
+ arch/arm64/include/asm/kvm_hyp.h | 3 +
+ arch/arm64/include/asm/kvm_mmu.h | 10 +
+ arch/arm64/include/asm/kvm_pgtable.h | 2 +-
+ arch/arm64/include/asm/stacktrace/nvhe.h | 10 +-
+ arch/arm64/include/asm/sysreg.h | 13 +-
+ arch/arm64/include/uapi/asm/kvm.h | 15 +
+ arch/arm64/kernel/pi/Makefile | 1 +
+ arch/arm64/kvm/Makefile | 3 +-
+ arch/arm64/kvm/arm.c | 10 +-
+ arch/arm64/kvm/hyp/entry.S | 2 +-
+ arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 7 +-
+ arch/arm64/kvm/hyp/include/nvhe/trace.h | 5 +-
+ arch/arm64/kvm/hyp/nvhe/Makefile | 1 +
+ arch/arm64/kvm/hyp/nvhe/events.c | 2 +
+ arch/arm64/kvm/hyp/nvhe/ffa.c | 220 ++-
+ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 485 +++--
+ arch/arm64/kvm/hyp/nvhe/pkvm.c | 12 +-
+ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 3 +-
+ arch/arm64/kvm/hyp/nvhe/trace.c | 6 +-
+ arch/arm64/kvm/hyp/vgic-v5-sr.c | 45 +
+ arch/arm64/kvm/hyp_trace.c | 2 +-
+ arch/arm64/kvm/pauth.c | 2 +-
+ arch/arm64/kvm/stacktrace.c | 3 -
+ arch/arm64/kvm/sys_regs.c | 6 +-
+ arch/arm64/kvm/vgic-sys-reg-v5.c | 519 ++++++
+ arch/arm64/kvm/vgic/vgic-init.c | 154 +-
+ arch/arm64/kvm/vgic/vgic-irqfd.c | 18 +-
+ arch/arm64/kvm/vgic/vgic-irs-v5.c | 1217 +++++++++++++
+ arch/arm64/kvm/vgic/vgic-its.c | 6 +-
+ arch/arm64/kvm/vgic/vgic-kvm-device.c | 272 ++-
+ arch/arm64/kvm/vgic/vgic-mmio.c | 6 +
+ arch/arm64/kvm/vgic/vgic-mmio.h | 2 +
+ arch/arm64/kvm/vgic/vgic-v5-tables.c | 1875 ++++++++++++++++++++
+ arch/arm64/kvm/vgic/vgic-v5-tables.h | 140 ++
+ arch/arm64/kvm/vgic/vgic-v5.c | 1152 +++++++++++-
+ arch/arm64/kvm/vgic/vgic.c | 39 +-
+ arch/arm64/kvm/vgic/vgic.h | 21 +
+ drivers/irqchip/irq-gic-v5-irs.c | 19 +-
+ drivers/irqchip/irq-gic-v5.c | 111 +-
+ include/kvm/arm_vgic.h | 213 ++-
+ include/linux/irqchip/arm-gic-v5.h | 254 ++-
+ include/linux/irqchip/arm-vgic-info.h | 5 +
+ include/linux/trace_remote_event.h | 2 +
+ tools/arch/arm64/include/uapi/asm/kvm.h | 15 +
+ .../testing/selftests/kvm/arm64/debug-exceptions.c | 2 +-
+ .../testing/selftests/kvm/arm64/external_aborts.c | 3 +-
+ tools/testing/selftests/kvm/arm64/hypercalls.c | 4 +-
+ tools/testing/selftests/kvm/arm64/sea_to_user.c | 75 +-
+ tools/testing/selftests/kvm/arm64/vgic_v5.c | 1849 ++++++++++++++++++-
+ tools/testing/selftests/kvm/include/arm64/gic_v5.h | 105 ++
+ tools/testing/selftests/kvm/include/test_util.h | 1 +
+ tools/testing/selftests/kvm/lib/test_util.c | 15 +
+ 58 files changed, 9032 insertions(+), 523 deletions(-)
+ create mode 100644 arch/arm64/include/asm/kvm_hcall.h
+ create mode 100644 arch/arm64/kvm/vgic-sys-reg-v5.c
+ create mode 100644 arch/arm64/kvm/vgic/vgic-irs-v5.c
+ create mode 100644 arch/arm64/kvm/vgic/vgic-v5-tables.c
+ create mode 100644 arch/arm64/kvm/vgic/vgic-v5-tables.h
+Merging kvms390/next (dd6f4ef6f8a37 s390/vfio-ap: Fix NULL deref in status_show() during queue probe)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git kvms390/next
+Already up to date.
+Merging kvm-ppc/topic/ppc-kvm (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'topic/ppc-kvm' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git kvm-ppc/topic/ppc-kvm
+Already up to date.
+Merging kvm-riscv/riscv_kvm_next (b5060a4aa33d7 RISC-V: KVM: fix vcpu vector context handling for kernel-mode vector)
+$ git merge -m Merge branch 'riscv_kvm_next' of https://github.com/kvm-riscv/linux.git kvm-riscv/riscv_kvm_next
+Already up to date.
+Merging kvm-x86/next (70c944caf570f Merge branches 'clocks', 'coco', 'fixes', 'misc', 'mmu', 'selftests', 'svm' and 'vmx')
+$ git merge -m Merge branch 'next' of https://github.com/kvm-x86/linux.git kvm-x86/next
+Auto-merging arch/arm64/kvm/arm.c
+Auto-merging arch/arm64/kvm/mmu.c
+Auto-merging arch/arm64/kvm/nested.c
+Auto-merging arch/x86/include/asm/kvm_host.h
+Auto-merging arch/x86/kvm/mmu/mmu.c
+Auto-merging arch/x86/kvm/vmx/tdx.c
+Auto-merging tools/testing/selftests/kvm/arm64/hypercalls.c
+Auto-merging tools/testing/selftests/kvm/steal_time.c
+Merge made by the 'ort' strategy.
+ arch/arm64/kvm/arm.c | 2 +-
+ arch/arm64/kvm/mmu.c | 4 +-
+ arch/arm64/kvm/nested.c | 4 +-
+ arch/x86/include/asm/kvm_host.h | 9 +-
+ arch/x86/include/asm/svm.h | 4 +-
+ arch/x86/kvm/cpuid.c | 17 +-
+ arch/x86/kvm/cpuid.h | 1 -
+ arch/x86/kvm/hyperv.c | 2 +
+ arch/x86/kvm/lapic.c | 4 +-
+ arch/x86/kvm/lapic.h | 2 +-
+ arch/x86/kvm/mmu/mmu.c | 130 ++++--
+ arch/x86/kvm/mmu/paging_tmpl.h | 17 +-
+ arch/x86/kvm/msrs.c | 3 +-
+ arch/x86/kvm/pmu.c | 8 -
+ arch/x86/kvm/regs.c | 8 +-
+ arch/x86/kvm/reverse_cpuid.h | 2 +-
+ arch/x86/kvm/svm/nested.c | 5 +
+ arch/x86/kvm/svm/sev.c | 53 ++-
+ arch/x86/kvm/svm/svm.c | 3 +-
+ arch/x86/kvm/vmx/common.h | 60 ++-
+ arch/x86/kvm/vmx/main.c | 94 +++-
+ arch/x86/kvm/vmx/nested.c | 60 +--
+ arch/x86/kvm/vmx/pmu_intel.c | 3 +
+ arch/x86/kvm/vmx/posted_intr.c | 24 +-
+ arch/x86/kvm/vmx/posted_intr.h | 8 +-
+ arch/x86/kvm/vmx/tdx.c | 64 +--
+ arch/x86/kvm/vmx/vmx.c | 168 ++-----
+ arch/x86/kvm/vmx/vmx.h | 37 --
+ arch/x86/kvm/vmx/x86_ops.h | 1 -
+ arch/x86/kvm/x86.c | 481 ++++++++++-----------
+ arch/x86/kvm/x86.h | 3 +-
+ include/linux/kvm_host.h | 15 +-
+ tools/testing/selftests/kvm/arm64/hypercalls.c | 2 +-
+ .../testing/selftests/kvm/arm64/page_fault_test.c | 18 +-
+ .../testing/selftests/kvm/arm64/vgic_lpi_stress.c | 21 +-
+ tools/testing/selftests/kvm/demand_paging_test.c | 3 +-
+ tools/testing/selftests/kvm/guest_memfd_test.c | 2 +-
+ .../testing/selftests/kvm/hardware_disable_test.c | 6 +-
+ tools/testing/selftests/kvm/include/kvm_util.h | 106 ++++-
+ tools/testing/selftests/kvm/include/numaif.h | 43 ++
+ tools/testing/selftests/kvm/include/x86/evmcs.h | 78 +---
+ .../testing/selftests/kvm/include/x86/processor.h | 12 +-
+ tools/testing/selftests/kvm/include/x86/smm.h | 2 +-
+ tools/testing/selftests/kvm/include/x86/vmx.h | 186 +++-----
+ tools/testing/selftests/kvm/lib/arm64/processor.c | 4 +-
+ tools/testing/selftests/kvm/lib/kvm_util.c | 128 +++---
+ .../selftests/kvm/lib/loongarch/processor.c | 5 +-
+ tools/testing/selftests/kvm/lib/riscv/processor.c | 4 +-
+ tools/testing/selftests/kvm/lib/s390/processor.c | 7 +-
+ tools/testing/selftests/kvm/lib/userfaultfd_util.c | 6 +-
+ tools/testing/selftests/kvm/lib/x86/memstress.c | 8 +-
+ tools/testing/selftests/kvm/lib/x86/processor.c | 23 +-
+ tools/testing/selftests/kvm/lib/x86/vmx.c | 159 ++++---
+ tools/testing/selftests/kvm/memslot_perf_test.c | 5 +-
+ tools/testing/selftests/kvm/s390/cmma_test.c | 19 +-
+ tools/testing/selftests/kvm/s390/irq_routing.c | 2 +-
+ .../testing/selftests/kvm/set_memory_region_test.c | 8 +-
+ tools/testing/selftests/kvm/steal_time.c | 20 +-
+ tools/testing/selftests/kvm/x86/amx_test.c | 2 +-
+ tools/testing/selftests/kvm/x86/aperfmperf_test.c | 10 +-
+ tools/testing/selftests/kvm/x86/cpuid_test.c | 2 +-
+ .../selftests/kvm/x86/evmcs_smm_controls_test.c | 6 +-
+ .../testing/selftests/kvm/x86/feature_msrs_test.c | 2 +-
+ .../testing/selftests/kvm/x86/fix_hypercall_test.c | 2 +-
+ tools/testing/selftests/kvm/x86/hyperv_clock.c | 2 +-
+ tools/testing/selftests/kvm/x86/hyperv_evmcs.c | 87 ++--
+ tools/testing/selftests/kvm/x86/hyperv_svm_test.c | 2 +-
+ tools/testing/selftests/kvm/x86/kvm_buslock_test.c | 8 +-
+ .../selftests/kvm/x86/nested_close_kvm_test.c | 6 +-
+ .../selftests/kvm/x86/nested_dirty_log_test.c | 8 +-
+ .../selftests/kvm/x86/nested_emulation_test.c | 23 +-
+ .../selftests/kvm/x86/nested_exceptions_test.c | 33 +-
+ .../selftests/kvm/x86/nested_invalid_cr3_test.c | 14 +-
+ .../selftests/kvm/x86/nested_tdp_fault_test.c | 16 +-
+ .../selftests/kvm/x86/nested_tsc_adjust_test.c | 10 +-
+ .../selftests/kvm/x86/nested_tsc_scaling_test.c | 12 +-
+ .../testing/selftests/kvm/x86/nx_huge_pages_test.c | 3 +-
+ .../kvm/x86/save_restore_pf_stress_test.c | 14 +-
+ tools/testing/selftests/kvm/x86/set_boot_cpu_id.c | 2 +-
+ tools/testing/selftests/kvm/x86/set_sregs_test.c | 11 +
+ tools/testing/selftests/kvm/x86/sev_dbg_test.c | 6 +-
+ tools/testing/selftests/kvm/x86/sev_smoke_test.c | 3 +-
+ .../kvm/x86/smaller_maxphyaddr_emulation_test.c | 9 +-
+ tools/testing/selftests/kvm/x86/smm_test.c | 4 +-
+ tools/testing/selftests/kvm/x86/state_test.c | 74 ++--
+ .../selftests/kvm/x86/triple_fault_event_test.c | 8 +-
+ tools/testing/selftests/kvm/x86/tsc_msrs_test.c | 2 +-
+ .../selftests/kvm/x86/vmx_apic_access_test.c | 22 +-
+ .../selftests/kvm/x86/vmx_apicv_updates_test.c | 16 +-
+ .../x86/vmx_exception_with_invalid_guest_state.c | 2 +-
+ .../kvm/x86/vmx_invalid_nested_guest_state.c | 12 +-
+ .../selftests/kvm/x86/vmx_nested_la57_state_test.c | 12 +-
+ .../selftests/kvm/x86/vmx_preemption_timer_test.c | 28 +-
+ tools/testing/selftests/kvm/x86/xapic_ipi_test.c | 78 ++--
+ virt/kvm/guest_memfd.c | 113 +++--
+ virt/kvm/kvm_main.c | 2 +-
+ 96 files changed, 1528 insertions(+), 1311 deletions(-)
+$ git am -3 ../patches/0001-KVM-selftests-Fix-up-semantic-changes.patch
+Applying: KVM: selftests: Fix up semantic changes
+Using index info to reconstruct a base tree...
+M tools/testing/selftests/kvm/lib/kvm_util.c
+Falling back to patching base and 3-way merge...
+Auto-merging tools/testing/selftests/kvm/lib/kvm_util.c
+No changes -- Patch already applied.
+Merging xen-tip/linux-next (d330fb86a7170 xenbus: Unregister reboot notifier on init failure)
+$ git merge -m Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git xen-tip/linux-next
+Already up to date.
+Merging percpu/for-next (8f0b4cce4481f Linux 6.19-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git percpu/for-next
+Already up to date.
+Merging workqueues/for-next (9d4815c14f7fa workqueue: BUG_ON() a pwq release before workqueue_init())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git workqueues/for-next
+Auto-merging kernel/workqueue.c
+Merge made by the 'ort' strategy.
+ include/trace/events/workqueue.h | 146 ++++++++++
+ kernel/workqueue.c | 601 ++++++++++++++++++++++++++-------------
+ 2 files changed, 546 insertions(+), 201 deletions(-)
+Merging sched-ext/for-next (55019197345f6 Merge branch 'for-7.3-fixes' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git sched-ext/for-next
+Auto-merging kernel/sched/ext/ext.c
+Auto-merging kernel/sched/ext/sub.c
+Merge made by the 'ort' strategy.
+ include/linux/sched/ext.h | 4 +-
+ kernel/sched/ext/ext.c | 67 +++++++----
+ kernel/sched/ext/ext.h | 20 ++--
+ kernel/sched/ext/idle.c | 14 ++-
+ kernel/sched/ext/internal.h | 25 +++++
+ kernel/sched/ext/sub.c | 7 +-
+ tools/sched_ext/Makefile | 2 +-
+ tools/sched_ext/include/scx/common.bpf.h | 2 +-
+ tools/sched_ext/scx_flatcg.bpf.c | 2 +-
+ tools/testing/selftests/sched_ext/Makefile | 4 +-
+ .../testing/selftests/sched_ext/allowed_cpus.bpf.c | 24 +++-
+ tools/testing/selftests/sched_ext/allowed_cpus.c | 123 +++++++++++++++++++--
+ tools/testing/selftests/sched_ext/create_dsq.bpf.c | 35 ++++++
+ tools/testing/selftests/sched_ext/create_dsq.c | 4 +-
+ tools/testing/selftests/sched_ext/hotplug.c | 34 ++++--
+ tools/testing/selftests/sched_ext/runner.c | 2 +-
+ 16 files changed, 295 insertions(+), 74 deletions(-)
+Merging drivers-x86/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git drivers-x86/for-next
+Already up to date.
+Merging chrome-platform/for-next (5859f97c6f404 platform/chrome: cros_ec_rpmsg: Fix repeated word 'from' in comment)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git chrome-platform/for-next
+Merge made by the 'ort' strategy.
+ drivers/platform/chrome/cros_ec_ishtp.c | 2 +-
+ drivers/platform/chrome/cros_ec_proto.c | 43 +++++--
+ drivers/platform/chrome/cros_ec_proto_test.c | 158 ++++++++++++++++++++++++-
+ drivers/platform/chrome/cros_ec_rpmsg.c | 2 +-
+ drivers/platform/chrome/cros_usbpd_notify.c | 4 +-
+ include/linux/platform_data/cros_ec_commands.h | 72 +++++++++++
+ 6 files changed, 262 insertions(+), 19 deletions(-)
+Merging chrome-platform-firmware/for-firmware-next (0e30b98a54599 firmware: coreboot: Use named initializers for acpi_device_id)
+$ git merge -m Merge branch 'for-firmware-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git chrome-platform-firmware/for-firmware-next
+Auto-merging MAINTAINERS
+Merge made by the 'ort' strategy.
+ MAINTAINERS | 20 +++---
+ drivers/firmware/Kconfig | 2 +-
+ drivers/firmware/Makefile | 2 +-
+ drivers/firmware/{google => coreboot}/Kconfig | 74 ++++++++++++++++------
+ drivers/firmware/{google => coreboot}/Makefile | 10 +--
+ drivers/firmware/{google => coreboot}/cbmem.c | 0
+ .../firmware/{google => coreboot}/coreboot_table.c | 4 +-
+ .../firmware/{google => coreboot}/coreboot_table.h | 0
+ .../{google => coreboot}/framebuffer-coreboot.c | 0
+ drivers/firmware/{google => coreboot}/gsmi.c | 0
+ .../{google => coreboot}/memconsole-coreboot.c | 0
+ .../{google => coreboot}/memconsole-x86-legacy.c | 0
+ drivers/firmware/{google => coreboot}/memconsole.c | 0
+ drivers/firmware/{google => coreboot}/memconsole.h | 6 +-
+ drivers/firmware/{google => coreboot}/vpd.c | 0
+ drivers/firmware/{google => coreboot}/vpd_decode.c | 0
+ drivers/firmware/{google => coreboot}/vpd_decode.h | 0
+ 17 files changed, 78 insertions(+), 40 deletions(-)
+ rename drivers/firmware/{google => coreboot}/Kconfig (64%)
+ rename drivers/firmware/{google => coreboot}/Makefile (51%)
+ rename drivers/firmware/{google => coreboot}/cbmem.c (100%)
+ rename drivers/firmware/{google => coreboot}/coreboot_table.c (99%)
+ rename drivers/firmware/{google => coreboot}/coreboot_table.h (100%)
+ rename drivers/firmware/{google => coreboot}/framebuffer-coreboot.c (100%)
+ rename drivers/firmware/{google => coreboot}/gsmi.c (100%)
+ rename drivers/firmware/{google => coreboot}/memconsole-coreboot.c (100%)
+ rename drivers/firmware/{google => coreboot}/memconsole-x86-legacy.c (100%)
+ rename drivers/firmware/{google => coreboot}/memconsole.c (100%)
+ rename drivers/firmware/{google => coreboot}/memconsole.h (82%)
+ rename drivers/firmware/{google => coreboot}/vpd.c (100%)
+ rename drivers/firmware/{google => coreboot}/vpd_decode.c (100%)
+ rename drivers/firmware/{google => coreboot}/vpd_decode.h (100%)
+Merging hsi/for-next (e81250ec6b692 hsi: omap_ssi_core: fix missing DMA mask setup for SSI controller device)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git hsi/for-next
+Already up to date.
+Merging leds-lj/for-leds-next (4805e5ec50d0b leds: max77705: Use fwnode_for_each_child_node_scoped() in max77705_add_led())
+$ git merge -m Merge branch 'for-leds-next' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git leds-lj/for-leds-next
+Merge made by the 'ort' strategy.
+ drivers/leds/leds-max77705.c | 3 +-
+ drivers/leds/leds-st1202.c | 89 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 90 insertions(+), 2 deletions(-)
+Merging ipmi/for-next (89a312991dc6e Merge tag 'cifs-fixes-7.3-rc2' of https://git.manguebit.org/linux)
+$ git merge -m Merge branch 'for-next' of https://github.com/cminyard/linux-ipmi.git ipmi/for-next
+Already up to date.
+Merging driver-core/driver-core-next (d3bdf70cf0e86 driver core: fix typos in comments)
+$ git merge -m Merge branch 'driver-core-next' of https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git driver-core/driver-core-next
+Merge made by the 'ort' strategy.
+ drivers/base/node.c | 17 ++++++++---------
+ drivers/base/property.c | 2 +-
+ drivers/base/transport_class.c | 2 +-
+ include/linux/kernfs.h | 2 +-
+ 4 files changed, 11 insertions(+), 12 deletions(-)
+Merging usb/usb-next (600334ef2f29b usb: fotg210: guard host shutdown in gadget-only builds)
+$ git merge -m Merge branch 'usb-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb/usb-next
+Auto-merging arch/arm/boot/dts/st/stm32mp131.dtsi
+Auto-merging arch/arm/boot/dts/st/stm32mp151.dtsi
+Auto-merging arch/arm64/boot/dts/st/stm32mp231.dtsi
+Auto-merging arch/arm64/boot/dts/st/stm32mp251.dtsi
+Auto-merging drivers/net/usb/r8152.c
+Auto-merging drivers/usb/core/hub.c
+Auto-merging drivers/usb/dwc2/hcd.c
+Auto-merging drivers/usb/typec/tipd/core.c
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/dma/ti/ti,cppi41.yaml | 109 +
+ .../devicetree/bindings/phy/ti,am335x-usb-phy.yaml | 49 +
+ .../devicetree/bindings/usb/am33xx-usb.txt | 200 -
+ .../devicetree/bindings/usb/da8xx-usb.txt | 81 -
+ .../devicetree/bindings/usb/generic-ehci.yaml | 24 +
+ .../devicetree/bindings/usb/generic-ohci.yaml | 24 +
+ .../devicetree/bindings/usb/gpio-sbu-mux.yaml | 1 +
+ .../devicetree/bindings/usb/ohci-da8xx.txt | 23 -
+ .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 19 +
+ .../bindings/usb/ti,am335x-usb-ctrl-module.yaml | 38 +
+ .../devicetree/bindings/usb/ti,am33xx-usb.yaml | 103 +
+ .../devicetree/bindings/usb/ti,da830-musb.yaml | 113 +
+ .../devicetree/bindings/usb/ti,da830-ohci.yaml | 61 +
+ .../devicetree/bindings/usb/ti,hd3ss3220.yaml | 11 +
+ .../devicetree/bindings/usb/ti,musb-am33xx.yaml | 113 +
+ Documentation/usb/usbmon.rst | 2 +-
+ arch/arm/boot/dts/st/stm32mp131.dtsi | 4 +-
+ arch/arm/boot/dts/st/stm32mp151.dtsi | 4 +-
+ arch/arm64/boot/dts/st/stm32mp231.dtsi | 64 +
+ arch/arm64/boot/dts/st/stm32mp251.dtsi | 63 +
+ drivers/net/usb/r8152.c | 2 +-
+ drivers/usb/cdns3/core.c | 4 +-
+ drivers/usb/cdns3/drd.c | 4 +-
+ drivers/usb/chipidea/ci_hdrc_imx.c | 8 +-
+ drivers/usb/chipidea/otg_fsm.c | 2 +-
+ drivers/usb/chipidea/udc.c | 2 +-
+ drivers/usb/common/ulpi.c | 4 +-
+ drivers/usb/common/usb-conn-gpio.c | 8 +-
+ drivers/usb/core/driver.c | 10 +-
+ drivers/usb/core/hub.c | 2 +-
+ drivers/usb/core/usb.c | 2 +-
+ drivers/usb/dwc2/core.c | 2 +-
+ drivers/usb/dwc2/core.h | 2 +-
+ drivers/usb/dwc2/debugfs.c | 6 +-
+ drivers/usb/dwc2/gadget.c | 98 +-
+ drivers/usb/dwc2/hcd.c | 4 +-
+ drivers/usb/dwc2/hcd_ddma.c | 2 +-
+ drivers/usb/dwc3/debugfs.c | 6 +-
+ drivers/usb/dwc3/dwc3-google.c | 4 +-
+ drivers/usb/dwc3/dwc3-imx.c | 2 +-
+ drivers/usb/dwc3/dwc3-imx8mp.c | 4 +-
+ drivers/usb/dwc3/dwc3-keystone.c | 5 +-
+ drivers/usb/dwc3/dwc3-omap.c | 5 +-
+ drivers/usb/fotg210/Kconfig | 5 +
+ drivers/usb/fotg210/fotg210-core.c | 273 +-
+ drivers/usb/fotg210/fotg210-hcd.c | 5666 +-------------------
+ drivers/usb/fotg210/fotg210-hcd.h | 689 ---
+ drivers/usb/fotg210/fotg210-udc.c | 97 +-
+ drivers/usb/fotg210/fotg210-udc.h | 2 +-
+ drivers/usb/fotg210/fotg210.h | 26 +-
+ drivers/usb/gadget/composite.c | 2 +-
+ drivers/usb/gadget/function/f_mass_storage.c | 7 +-
+ drivers/usb/gadget/udc/aspeed-vhub/core.c | 4 +-
+ drivers/usb/gadget/udc/aspeed-vhub/dev.c | 2 -
+ drivers/usb/gadget/udc/aspeed_udc.c | 5 +-
+ drivers/usb/gadget/udc/at91_udc.c | 1 -
+ drivers/usb/gadget/udc/atmel_usba_udc.c | 5 +-
+ drivers/usb/gadget/udc/bcm63xx_udc.c | 1 -
+ drivers/usb/gadget/udc/fsl_udc_core.c | 3 -
+ drivers/usb/gadget/udc/lpc32xx_udc.c | 1 -
+ drivers/usb/gadget/udc/r8a66597-udc.c | 4 +-
+ drivers/usb/gadget/udc/renesas_usbf.c | 8 +-
+ drivers/usb/gadget/udc/snps_udc_plat.c | 4 +-
+ drivers/usb/gadget/udc/tegra-xudc.c | 5 +-
+ drivers/usb/host/Kconfig | 13 +
+ drivers/usb/host/ehci-dbg.c | 3 +-
+ drivers/usb/host/ehci-hcd.c | 31 +-
+ drivers/usb/host/ehci-hub.c | 104 +-
+ drivers/usb/host/ehci-ppc-of.c | 47 +-
+ drivers/usb/host/ehci-timer.c | 3 +-
+ drivers/usb/host/ehci.h | 55 +-
+ drivers/usb/host/ohci-dbg.c | 2 +-
+ drivers/usb/host/ohci-hub.c | 2 +-
+ drivers/usb/host/ohci-ppc-of.c | 44 +-
+ drivers/usb/host/pci-quirks.c | 1 +
+ drivers/usb/host/xhci-tegra.c | 8 +-
+ drivers/usb/image/microtek.c | 1 +
+ drivers/usb/misc/apple-mfi-fastcharge.c | 2 +-
+ drivers/usb/misc/brcmstb-usb-pinmap.c | 9 +-
+ drivers/usb/misc/onboard_usb_dev.c | 2 +-
+ drivers/usb/misc/qcom_eud.c | 2 +-
+ drivers/usb/mon/mon_main.c | 3 +
+ drivers/usb/mtu3/mtu3_core.c | 4 +-
+ drivers/usb/musb/da8xx.c | 8 +-
+ drivers/usb/musb/musb_dsps.c | 25 +
+ drivers/usb/phy/phy-ab8500-usb.c | 12 +-
+ drivers/usb/phy/phy-generic.c | 3 +-
+ drivers/usb/phy/phy-gpio-vbus-usb.c | 5 +-
+ drivers/usb/renesas_usbhs/mod.c | 4 +-
+ drivers/usb/storage/alauda.c | 95 +-
+ drivers/usb/storage/ene_ub6250.c | 2 +
+ drivers/usb/storage/sddr09.c | 9 +
+ drivers/usb/storage/usb.c | 6 +-
+ drivers/usb/typec/anx7411.c | 4 +-
+ drivers/usb/typec/bus.c | 4 +-
+ drivers/usb/typec/hd3ss3220.c | 36 +-
+ drivers/usb/typec/mux/gpio-sbu-mux.c | 13 +-
+ drivers/usb/typec/mux/it5205.c | 2 +-
+ drivers/usb/typec/tcpm/tcpci_maxim_core.c | 3 +-
+ drivers/usb/typec/tcpm/tcpci_mt6360.c | 1 -
+ drivers/usb/typec/tcpm/tcpci_mt6370.c | 2 +-
+ drivers/usb/typec/tipd/core.c | 3 +
+ drivers/usb/typec/ucsi/ucsi.c | 52 +-
+ drivers/usb/typec/ucsi/ucsi.h | 3 +-
+ drivers/usb/usbip/stub_main.c | 2 +-
+ include/linux/ulpi/driver.h | 4 +-
+ include/linux/usb.h | 6 +-
+ include/linux/usb/typec_altmode.h | 4 +-
+ 108 files changed, 1742 insertions(+), 7006 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/dma/ti/ti,cppi41.yaml
+ create mode 100644 Documentation/devicetree/bindings/phy/ti,am335x-usb-phy.yaml
+ delete mode 100644 Documentation/devicetree/bindings/usb/am33xx-usb.txt
+ delete mode 100644 Documentation/devicetree/bindings/usb/da8xx-usb.txt
+ delete mode 100644 Documentation/devicetree/bindings/usb/ohci-da8xx.txt
+ create mode 100644 Documentation/devicetree/bindings/usb/ti,am335x-usb-ctrl-module.yaml
+ create mode 100644 Documentation/devicetree/bindings/usb/ti,am33xx-usb.yaml
+ create mode 100644 Documentation/devicetree/bindings/usb/ti,da830-musb.yaml
+ create mode 100644 Documentation/devicetree/bindings/usb/ti,da830-ohci.yaml
+ create mode 100644 Documentation/devicetree/bindings/usb/ti,musb-am33xx.yaml
+ delete mode 100644 drivers/usb/fotg210/fotg210-hcd.h
+Merging thunderbolt/next (5da91c3694b80 thunderbolt: stream: Check the Rx ring before task starts sleeping)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git thunderbolt/next
+Auto-merging drivers/thunderbolt/nhi.c
+Auto-merging drivers/thunderbolt/nhi.h
+Auto-merging drivers/thunderbolt/pci.c
+Auto-merging drivers/thunderbolt/stream.c
+Auto-merging drivers/thunderbolt/switch.c
+Auto-merging drivers/thunderbolt/tb.c
+Auto-merging include/linux/thunderbolt.h
+Merge made by the 'ort' strategy.
+ drivers/net/thunderbolt/main.c | 6 +-
+ drivers/thunderbolt/dma_test.c | 10 +-
+ drivers/thunderbolt/eeprom.c | 23 +++--
+ drivers/thunderbolt/nhi.c | 222 ++++++++++++++++++++++++++++++-----------
+ drivers/thunderbolt/nhi.h | 2 +
+ drivers/thunderbolt/path.c | 2 +-
+ drivers/thunderbolt/pci.c | 113 +++++++++++++++++++++
+ drivers/thunderbolt/quirks.c | 18 ++++
+ drivers/thunderbolt/stream.c | 131 +++++++++++++++++-------
+ drivers/thunderbolt/switch.c | 4 +
+ drivers/thunderbolt/tb.c | 78 ---------------
+ drivers/thunderbolt/tb.h | 3 +
+ include/linux/thunderbolt.h | 47 ++++++++-
+ 13 files changed, 469 insertions(+), 190 deletions(-)
+Merging usb-serial/usb-next (6583f9741341b USB: serial: wwan: replace __get_free_page() with kmalloc())
+$ git merge -m Merge branch 'usb-next' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git usb-serial/usb-next
+Merge made by the 'ort' strategy.
+ drivers/usb/serial/usb_wwan.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+Merging tty/tty-next (fd73f4a665989 Linux 7.3-rc3)
+$ git merge -m Merge branch 'tty-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty/tty-next
+Already up to date.
+Merging char-misc/char-misc-next (df2908090cda3 Linux 7.3-rc2)
+$ git merge -m Merge branch 'char-misc-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc/char-misc-next
+Already up to date.
+Merging coresight/next (9e3604d7369cf coresight: etm4x: remove redundant fields in etmv4_save_state)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git coresight/next
+Already up to date.
+Merging fastrpc/for-next (ef071c4906eb4 Merge branches 'fastrpc-fixes' and 'fastrpc-for-7.4' into fastrpc-for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/srini/fastrpc.git fastrpc/for-next
+Auto-merging drivers/misc/fastrpc.c
+Merge made by the 'ort' strategy.
+ drivers/misc/fastrpc.c | 200 ++++++++++++++++++++++++++-----------------------
+ 1 file changed, 107 insertions(+), 93 deletions(-)
+Merging fpga/for-next (a0906012699dd fpga: dfl: Drop #include for <linux/mod_devicetable.h>)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git fpga/for-next
+Merge made by the 'ort' strategy.
+ drivers/fpga/dfl.h | 1 -
+ 1 file changed, 1 deletion(-)
+Merging icc/icc-next (7ae6fbdd96517 Merge branch 'icc-kuno' into icc-next)
+$ git merge -m Merge branch 'icc-next' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc.git icc/icc-next
+Merge made by the 'ort' strategy.
+ .../bindings/interconnect/qcom,kuno-rpmh.yaml | 118 +++
+ drivers/interconnect/qcom/Kconfig | 57 ++
+ drivers/interconnect/qcom/Makefile | 2 +
+ drivers/interconnect/qcom/eliza.c | 18 +-
+ drivers/interconnect/qcom/icc-rpm.c | 4 +-
+ drivers/interconnect/qcom/icc-rpm.h | 4 +-
+ drivers/interconnect/qcom/kuno.c | 988 +++++++++++++++++++++
+ drivers/interconnect/qcom/milos.c | 66 +-
+ drivers/interconnect/qcom/sm6350.c | 56 +-
+ drivers/interconnect/qcom/sm8650.c | 70 +-
+ drivers/interconnect/qcom/smd-rpm.c | 8 +-
+ include/dt-bindings/interconnect/qcom,kuno.h | 89 ++
+ 12 files changed, 1367 insertions(+), 113 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,kuno-rpmh.yaml
+ create mode 100644 drivers/interconnect/qcom/kuno.c
+ create mode 100644 include/dt-bindings/interconnect/qcom,kuno.h
+Merging iio/togreg (746ce4dd0ea41 dt-bindings: iio: Use consistent indentation in the example)
+$ git merge -m Merge branch 'togreg' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git iio/togreg
+Auto-merging Documentation/devicetree/bindings/trivial-devices.yaml
+Auto-merging MAINTAINERS
+Auto-merging drivers/iio/accel/kionix-kx022a.c
+Auto-merging drivers/iio/adc/ade9000.c
+CONFLICT (content): Merge conflict in drivers/iio/adc/ade9000.c
+Auto-merging drivers/iio/buffer/industrialio-buffer-dmaengine.c
+Auto-merging drivers/iio/imu/adis16400.c
+Auto-merging drivers/iio/light/lm3533-als.c
+Auto-merging drivers/iio/pressure/rohm-bm1390.c
+Auto-merging drivers/iio/proximity/aw96103.c
+Resolved 'drivers/iio/adc/ade9000.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master 91e863897f7da] Merge branch 'togreg' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
+$ git diff -M --stat --summary HEAD^..
+ Documentation/ABI/testing/sysfs-bus-iio | 6 +
+ .../devicetree/bindings/iio/accel/adi,adxl367.yaml | 13 +-
+ .../devicetree/bindings/iio/adc/adi,ad4080.yaml | 36 +-
+ .../devicetree/bindings/iio/adc/adi,ad4130.yaml | 3 +-
+ .../devicetree/bindings/iio/adc/adi,ad4851.yaml | 8 +-
+ .../devicetree/bindings/iio/adc/adi,ad7173.yaml | 2 +-
+ .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml | 6 +-
+ .../devicetree/bindings/iio/adc/adi,ad7779.yaml | 30 +-
+ .../devicetree/bindings/iio/adc/adi,ade9000.yaml | 58 ++-
+ .../devicetree/bindings/iio/adc/adi,max40080.yaml | 65 +++
+ .../bindings/iio/adc/axiado,ax3000-saradc.yaml | 63 +++
+ .../bindings/iio/adc/maxim,max34408.yaml | 28 +-
+ .../bindings/iio/adc/nxp,lpc1850-adc.yaml | 2 +-
+ .../devicetree/bindings/iio/adc/ti,ads1100.yaml | 10 +-
+ .../devicetree/bindings/iio/adc/ti,ads112c04.yaml | 149 ++++++
+ .../devicetree/bindings/iio/adc/ti,ads1298.yaml | 18 +-
+ .../devicetree/bindings/iio/addac/adi,ad74115.yaml | 3 +-
+ .../bindings/iio/addac/adi,ad74413r.yaml | 3 +-
+ .../devicetree/bindings/iio/dac/adi,ad5529r.yaml | 254 +++++++++
+ .../devicetree/bindings/iio/dac/adi,ad5710r.yaml | 145 ++++++
+ .../bindings/iio/imu/invensense,icm42600.yaml | 24 +-
+ .../devicetree/bindings/iio/light/adux1020.yaml | 8 +-
+ .../bindings/iio/light/amstaos,tsl2591.yaml | 2 +-
+ .../devicetree/bindings/iio/light/isl29018.yaml | 6 +-
+ .../bindings/iio/light/liteon,ltr501.yaml | 32 +-
+ .../devicetree/bindings/iio/light/noa1305.yaml | 4 +-
+ .../devicetree/bindings/iio/light/stk33xx.yaml | 19 +-
+ .../devicetree/bindings/iio/light/tsl2583.yaml | 4 +-
+ .../devicetree/bindings/iio/light/tsl2772.yaml | 14 +-
+ .../bindings/iio/light/vishay,veml6030.yaml | 8 +-
+ .../bindings/iio/pressure/infineon,dps310.yaml | 10 +-
+ .../iio/proximity/pulsedlight,lidar-lite-v2.yaml | 71 +++
+ .../bindings/iio/proximity/vishay,vcnl3020.yaml | 6 +-
+ .../bindings/spi/spi-peripheral-props.yaml | 7 +
+ .../devicetree/bindings/trivial-devices.yaml | 4 +-
+ Documentation/iio/ade9000.rst | 26 +-
+ Documentation/iio/adxl380.rst | 8 +-
+ MAINTAINERS | 39 ++
+ drivers/iio/accel/adxl367.c | 59 ++-
+ drivers/iio/accel/adxl380.c | 7 +
+ drivers/iio/accel/bma400_core.c | 2 -
+ drivers/iio/accel/kionix-kx022a.c | 20 +-
+ drivers/iio/accel/kionix-kx022a.h | 2 +-
+ drivers/iio/accel/mma8452.c | 145 ++----
+ drivers/iio/adc/Kconfig | 57 +-
+ drivers/iio/adc/Makefile | 3 +
+ drivers/iio/adc/ad4080.c | 13 +-
+ drivers/iio/adc/ade9000.c | 180 +++++--
+ drivers/iio/adc/axiado_saradc.c | 277 ++++++++++
+ drivers/iio/adc/bcm_iproc_adc.c | 46 +-
+ drivers/iio/adc/max40080.c | 574 +++++++++++++++++++++
+ drivers/iio/adc/meson_saradc.c | 2 +-
+ drivers/iio/adc/pac1934.c | 9 +-
+ drivers/iio/adc/rockchip_saradc.c | 16 +
+ drivers/iio/adc/sophgo-cv1800b-adc.c | 2 +
+ drivers/iio/adc/ti-ads1100.c | 188 ++++++-
+ drivers/iio/adc/ti-ads112c04.c | 524 +++++++++++++++++++
+ drivers/iio/buffer/industrialio-buffer-dmaengine.c | 3 -
+ drivers/iio/chemical/sps30.c | 11 +-
+ .../iio/common/cros_ec_sensors/cros_ec_sensors.c | 2 +-
+ .../common/cros_ec_sensors/cros_ec_sensors_core.c | 5 +-
+ drivers/iio/dac/Kconfig | 17 +
+ drivers/iio/dac/Makefile | 1 +
+ drivers/iio/dac/ad3530r.c | 300 ++++++++++-
+ drivers/iio/dac/ad5529r.c | 546 ++++++++++++++++++++
+ drivers/iio/dac/ad8460.c | 2 +-
+ drivers/iio/dummy/iio_simple_dummy.c | 2 +-
+ drivers/iio/frequency/adf4350.c | 2 +-
+ drivers/iio/gyro/adxrs290.c | 4 +-
+ drivers/iio/gyro/bmg160_core.c | 4 +-
+ drivers/iio/gyro/itg3200_buffer.c | 3 +-
+ drivers/iio/humidity/Kconfig | 8 +-
+ drivers/iio/humidity/am2315.c | 34 +-
+ drivers/iio/humidity/ens210.c | 4 +-
+ drivers/iio/humidity/hts221_core.c | 168 +++---
+ drivers/iio/humidity/hts221_i2c.c | 11 +-
+ drivers/iio/humidity/hts221_spi.c | 11 +-
+ drivers/iio/imu/adis16400.c | 5 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600.h | 4 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c | 24 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 112 ++--
+ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 17 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c | 24 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 16 +-
+ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 16 +-
+ drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 6 +-
+ drivers/iio/industrialio-core.c | 6 +-
+ drivers/iio/industrialio-gts-helper.c | 2 +-
+ drivers/iio/light/apds9999.c | 12 +-
+ drivers/iio/light/cros_ec_light_prox.c | 2 +-
+ drivers/iio/light/iqs621-als.c | 24 +-
+ drivers/iio/light/isl29018.c | 7 +-
+ drivers/iio/light/lm3533-als.c | 11 +-
+ drivers/iio/light/ltr390.c | 6 -
+ drivers/iio/light/ltr501.c | 113 ++--
+ drivers/iio/light/stk3310.c | 203 ++++++--
+ drivers/iio/light/tsl2583.c | 15 +-
+ drivers/iio/light/tsl2772.c | 16 +-
+ drivers/iio/light/vcnl4000.c | 3 +-
+ drivers/iio/light/veml3328.c | 53 +-
+ drivers/iio/position/iqs624-pos.c | 24 +-
+ drivers/iio/pressure/cros_ec_baro.c | 2 +-
+ drivers/iio/pressure/rohm-bm1390.c | 6 +-
+ drivers/iio/proximity/aw96103.c | 2 +-
+ drivers/iio/temperature/iqs620at-temp.c | 9 +-
+ drivers/iio/temperature/ltc2983.c | 19 +-
+ drivers/iio/temperature/mlx90632.c | 10 +-
+ drivers/iio/temperature/mlx90635.c | 11 +-
+ drivers/iio/temperature/tmp117.c | 18 +-
+ drivers/iio/temperature/tsys01.c | 17 +-
+ drivers/iio/temperature/tsys02d.c | 12 +-
+ drivers/iio/test/iio-test-rescale.c | 4 +-
+ .../iio/Documentation/sysfs-bus-iio-adc-ad7280a | 2 +-
+ drivers/staging/iio/frequency/ad9832.c | 6 +
+ drivers/staging/iio/frequency/ad9834.c | 6 +
+ include/linux/iio/iio-gts-helper.h | 1 +
+ include/linux/iio/iio.h | 2 +-
+ include/linux/notifier.h | 7 +
+ kernel/notifier.c | 105 ++++
+ 119 files changed, 4540 insertions(+), 878 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max40080.yaml
+ create mode 100644 Documentation/devicetree/bindings/iio/adc/axiado,ax3000-saradc.yaml
+ create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
+ create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5529r.yaml
+ create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5710r.yaml
+ create mode 100644 Documentation/devicetree/bindings/iio/proximity/pulsedlight,lidar-lite-v2.yaml
+ create mode 100644 drivers/iio/adc/axiado_saradc.c
+ create mode 100644 drivers/iio/adc/max40080.c
+ create mode 100644 drivers/iio/adc/ti-ads112c04.c
+ create mode 100644 drivers/iio/dac/ad5529r.c
+Merging nfc/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://codeberg.org/linux-nfc/linux.git nfc/for-next
+Already up to date.
+Merging phy-next/next (8bc74189b12e3 phy: phy-mtk-dp: drop unused variables)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git phy-next/next
+Merge made by the 'ort' strategy.
+ .../bindings/phy/mediatek,mt8195-dp-phy.yaml | 77 ++
+ .../devicetree/bindings/phy/mediatek,tphy.yaml | 1 +
+ .../bindings/phy/qcom,m31-eusb2-phy.yaml | 1 +
+ .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 +
+ .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 59 +-
+ drivers/phy/apple/atc.c | 2 -
+ drivers/phy/broadcom/phy-brcm-usb.c | 29 +-
+ drivers/phy/cadence/phy-cadence-sierra.c | 11 +-
+ drivers/phy/hisilicon/phy-hi3670-pcie.c | 2 +
+ drivers/phy/mediatek/phy-mtk-dp.c | 826 ++++++++++++++++++---
+ drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 402 ++++++++--
+ drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 73 ++
+ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v8_50.h | 4 +-
+ drivers/phy/samsung/phy-exynos5-usbdrd.c | 78 +-
+ drivers/phy/socionext/phy-uniphier-usb3hs.c | 3 +-
+ drivers/phy/starfive/phy-jh7110-dphy-tx.c | 16 +-
+ include/dt-bindings/phy/phy-qcom-qmp.h | 1 +
+ include/linux/phy/phy-thunderbolt.h | 14 +
+ include/linux/phy/phy.h | 2 +
+ 19 files changed, 1382 insertions(+), 221 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/phy/mediatek,mt8195-dp-phy.yaml
+ create mode 100644 include/linux/phy/phy-thunderbolt.h
+Merging soundwire/next (90b63b309fd6c soundwire: Intel: stop sdw clock in system suspend)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git soundwire/next
+Auto-merging drivers/soundwire/dmi-quirks.c
+Merge made by the 'ort' strategy.
+ drivers/soundwire/bus.c | 54 +++++++++++++++++++++++-------------
+ drivers/soundwire/bus_type.c | 16 +++++++----
+ drivers/soundwire/dmi-quirks.c | 14 ++++++++++
+ drivers/soundwire/intel.h | 6 ++--
+ drivers/soundwire/intel_auxdevice.c | 11 +++++---
+ drivers/soundwire/intel_bus_common.c | 8 +++---
+ drivers/soundwire/qcom.c | 38 ++++++++++++++++++-------
+ drivers/soundwire/slave.c | 28 +++++++++++++------
+ drivers/soundwire/stream.c | 8 +++---
+ include/linux/soundwire/sdw.h | 4 +++
+ include/linux/soundwire/sdw_intel.h | 2 +-
+ 11 files changed, 129 insertions(+), 60 deletions(-)
+Merging extcon/extcon-next (8d3ae59288f1e Linux 7.2)
+$ git merge -m Merge branch 'extcon-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon/extcon-next
+Already up to date.
+Merging gnss/gnss-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'gnss-next' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git gnss/gnss-next
+Already up to date.
+Merging vfio/next (4e3c1fc8abcb8 vfio/pci: Remove the pcie check for VFIO_PCI_ERR_IRQ_INDEX)
+$ git merge -m Merge branch 'next' of https://github.com/awilliam/linux-vfio.git vfio/next
+Already up to date.
+Merging w1/for-next (813a5b9a3c9f6 w1: fix spelling mistakes in comments across the subsystem)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1.git w1/for-next
+Merge made by the 'ort' strategy.
+ drivers/w1/masters/ds2482.c | 2 +-
+ drivers/w1/masters/ds2490.c | 4 ++--
+ drivers/w1/masters/omap_hdq.c | 2 +-
+ drivers/w1/slaves/w1_ds28e17.c | 2 +-
+ drivers/w1/slaves/w1_therm.c | 2 +-
+ drivers/w1/w1.c | 2 +-
+ drivers/w1/w1_family.c | 2 +-
+ drivers/w1/w1_netlink.h | 2 +-
+ 8 files changed, 9 insertions(+), 9 deletions(-)
+Merging spmi/spmi-next (8cdeaa50eae8d Linux 7.2-rc2)
+$ git merge -m Merge branch 'spmi-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git spmi/spmi-next
+Already up to date.
+Merging staging/staging-next (8444548bd905f staging: rtl8723bs: remove unused SSIZE_PTR definition)
+$ git merge -m Merge branch 'staging-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging/staging-next
+Merge made by the 'ort' strategy.
+ drivers/staging/axis-fifo/axis-fifo.c | 6 +-
+ drivers/staging/fbtft/fb_bd663474.c | 4 +-
+ drivers/staging/greybus/loopback.c | 5 +-
+ drivers/staging/most/video/video.c | 1 -
+ drivers/staging/octeon/ethernet-tx.c | 2 +-
+ drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +-
+ drivers/staging/rtl8723bs/core/rtw_cmd.c | 25 +-
+ drivers/staging/rtl8723bs/core/rtw_efuse.c | 147 +--
+ drivers/staging/rtl8723bs/core/rtw_mlme.c | 1006 ++++++++++----------
+ drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 111 +--
+ drivers/staging/rtl8723bs/core/rtw_recv.c | 49 +-
+ drivers/staging/rtl8723bs/core/rtw_security.c | 4 +-
+ drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 6 +-
+ drivers/staging/rtl8723bs/core/rtw_xmit.c | 48 +-
+ drivers/staging/rtl8723bs/hal/HalPhyRf.c | 5 +-
+ drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 75 --
+ drivers/staging/rtl8723bs/hal/hal_com.c | 6 +-
+ drivers/staging/rtl8723bs/hal/hal_intf.c | 9 +-
+ drivers/staging/rtl8723bs/hal/odm.h | 9 -
+ drivers/staging/rtl8723bs/hal/odm_DIG.h | 1 -
+ drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h | 1 -
+ drivers/staging/rtl8723bs/hal/odm_precomp.h | 1 -
+ drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -
+ drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 2 +-
+ drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 3 +-
+ drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 -
+ drivers/staging/rtl8723bs/hal/sdio_halinit.c | 24 -
+ drivers/staging/rtl8723bs/include/basic_types.h | 4 -
+ drivers/staging/rtl8723bs/include/cmd_osdep.h | 6 +-
+ drivers/staging/rtl8723bs/include/hal_com.h | 2 +-
+ drivers/staging/rtl8723bs/include/hal_data.h | 16 -
+ drivers/staging/rtl8723bs/include/hal_intf.h | 2 +-
+ drivers/staging/rtl8723bs/include/hal_pg.h | 2 +-
+ drivers/staging/rtl8723bs/include/hal_phy.h | 16 -
+ drivers/staging/rtl8723bs/include/osdep_service.h | 4 +-
+ .../rtl8723bs/include/osdep_service_linux.h | 2 +-
+ drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 +-
+ drivers/staging/rtl8723bs/include/rtw_cmd.h | 58 +-
+ drivers/staging/rtl8723bs/include/rtw_efuse.h | 5 +-
+ drivers/staging/rtl8723bs/include/rtw_io.h | 14 +-
+ drivers/staging/rtl8723bs/include/rtw_ioctl_set.h | 2 -
+ drivers/staging/rtl8723bs/include/rtw_mlme.h | 78 +-
+ drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 38 +-
+ drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 20 +-
+ drivers/staging/rtl8723bs/include/rtw_recv.h | 69 +-
+ drivers/staging/rtl8723bs/include/rtw_xmit.h | 8 +-
+ drivers/staging/rtl8723bs/include/sdio_ops.h | 21 +-
+ drivers/staging/rtl8723bs/include/sta_info.h | 84 +-
+ drivers/staging/rtl8723bs/include/wlan_bssdef.h | 8 +-
+ drivers/staging/rtl8723bs/include/xmit_osdep.h | 14 +-
+ drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 86 +-
+ drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +-
+ drivers/staging/sm750fb/sm750.c | 12 +-
+ drivers/staging/sm750fb/sm750_accel.h | 4 +-
+ drivers/staging/vme_user/vme_tsi148.c | 3 +-
+ 55 files changed, 929 insertions(+), 1212 deletions(-)
+Merging counter-next/counter-next (353b2e09f44a9 counter: ti-eqep: Remove redundant dev_err_probe())
+$ git merge -m Merge branch 'counter-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git counter-next/counter-next
+Already up to date.
+Merging mux/for-next (ac7bde3c53166 mux: Add driver for Renesas RZ/V2H VBENCTL VBUS_SEL mux)
+$ git merge -m Merge branch 'for-next' of https://gitlab.com/peda-linux/mux.git mux/for-next
+Merge made by the 'ort' strategy.
+ drivers/mux/Kconfig | 13 ++++++++
+ drivers/mux/Makefile | 2 ++
+ drivers/mux/rzv2h-vbenctl.c | 81 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 96 insertions(+)
+ create mode 100644 drivers/mux/rzv2h-vbenctl.c
+Merging dmaengine/next (0a8dda0a15d39 dmaengine: bestcomm: use devm_platform_get_and_ioremap_resource() to simplify code)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git dmaengine/next
+CONFLICT (modify/delete): Documentation/devicetree/bindings/usb/am33xx-usb.txt deleted in HEAD and modified in dmaengine/next. Version dmaengine/next of Documentation/devicetree/bindings/usb/am33xx-usb.txt left in tree.
+CONFLICT (modify/delete): Documentation/devicetree/bindings/usb/da8xx-usb.txt deleted in HEAD and modified in dmaengine/next. Version dmaengine/next of Documentation/devicetree/bindings/usb/da8xx-usb.txt left in tree.
+Auto-merging MAINTAINERS
+Auto-merging drivers/dma/dmaengine.c
+Auto-merging drivers/dma/mmp_pdma.c
+Auto-merging drivers/dma/pxa_dma.c
+Auto-merging drivers/dma/sprd-dma.c
+Auto-merging drivers/dma/sun6i-dma.c
+Auto-merging drivers/dma/switchtec_dma.c
+Auto-merging drivers/dma/xilinx/xilinx_dma.c
+Automatic merge failed; fix conflicts and then commit the result.
+$ git rm -f Documentation/devicetree/bindings/usb/am33xx-usb.txt
+rm 'Documentation/devicetree/bindings/usb/am33xx-usb.txt'
+$ git commit --no-edit -v -a
+[master 5d9b35ef103f8] Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
+$ git diff -M --stat --summary HEAD^..
+ .../devicetree/bindings/dma/apple,admac.yaml | 10 +-
+ .../devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 22 ++
+ .../bindings/dma/ti,dra7-dma-crossbar.yaml | 94 ++++++
+ .../devicetree/bindings/dma/ti-dma-crossbar.txt | 68 ----
+ Documentation/driver-api/dmaengine/provider.rst | 2 +-
+ MAINTAINERS | 2 +-
+ drivers/dma/altera-msgdma.c | 10 +-
+ drivers/dma/amba-pl08x.c | 4 +-
+ drivers/dma/apple-admac.c | 24 ++
+ drivers/dma/arm-dma350.c | 2 +-
+ drivers/dma/at_hdmac.c | 139 ++++----
+ drivers/dma/at_xdmac.c | 159 +++++-----
+ drivers/dma/bestcomm/ata.c | 2 -
+ drivers/dma/bestcomm/bestcomm.c | 46 +--
+ drivers/dma/bestcomm/gen_bd.c | 23 +-
+ drivers/dma/dma-jz4780.c | 10 +-
+ drivers/dma/dmaengine.c | 34 +-
+ drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 151 +++++----
+ drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 57 ++--
+ drivers/dma/dw-edma/dw-edma-core.c | 349 ++++++++++++++-------
+ drivers/dma/dw-edma/dw-edma-core.h | 67 +++-
+ drivers/dma/dw-edma/dw-edma-pcie.c | 18 ++
+ drivers/dma/dw-edma/dw-edma-v0-core.c | 59 ++--
+ drivers/dma/dw-edma/dw-hdma-v0-core.c | 82 +++--
+ drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 17 +-
+ drivers/dma/dw-edma/dw-hdma-v0-regs.h | 10 -
+ drivers/dma/dw/core.c | 47 ++-
+ drivers/dma/ep93xx_dma.c | 37 +--
+ drivers/dma/fsl-edma-main.c | 5 +-
+ drivers/dma/fsl_raid.c | 38 ++-
+ drivers/dma/fsldma.c | 22 +-
+ drivers/dma/idma64.c | 10 +-
+ drivers/dma/img-mdc-dma.c | 2 +-
+ drivers/dma/loongson/loongson1-apb-dma.c | 23 +-
+ drivers/dma/loongson/loongson2-apb-cmc-dma.c | 19 +-
+ drivers/dma/loongson/loongson2-apb-dma.c | 9 +-
+ drivers/dma/mediatek/mtk-hsdma.c | 26 +-
+ drivers/dma/mmp_pdma.c | 3 +-
+ drivers/dma/moxart-dma.c | 23 +-
+ drivers/dma/mv_xor.c | 8 +-
+ drivers/dma/nbpfaxi.c | 2 +-
+ drivers/dma/owl-dma.c | 21 +-
+ drivers/dma/pch_dma.c | 41 ++-
+ drivers/dma/pl330.c | 4 +-
+ drivers/dma/pxa_dma.c | 52 +--
+ drivers/dma/qcom/gpi.c | 9 +-
+ drivers/dma/sprd-dma.c | 45 +--
+ drivers/dma/st_fdma.c | 2 +-
+ drivers/dma/ste_dma40.c | 15 +-
+ drivers/dma/stm32/stm32-dma.c | 69 ++--
+ drivers/dma/stm32/stm32-dma3.c | 99 +++---
+ drivers/dma/stm32/stm32-mdma.c | 96 +++---
+ drivers/dma/sun4i-dma.c | 17 +-
+ drivers/dma/sun6i-dma.c | 62 ++--
+ drivers/dma/switchtec_dma.c | 14 +-
+ drivers/dma/tegra186-gpc-dma.c | 4 +-
+ drivers/dma/tegra20-apb-dma.c | 2 +-
+ drivers/dma/ti/k3-udma.c | 6 +-
+ drivers/dma/timb_dma.c | 63 ++--
+ drivers/dma/txx9dmac.c | 89 +++---
+ drivers/dma/virt-dma.h | 16 +
+ drivers/dma/xilinx/xilinx_dma.c | 85 ++++-
+ drivers/dma/xilinx/zynqmp_dma.c | 74 +++--
+ drivers/pci/controller/dwc/pcie-designware.c | 1 +
+ include/linux/dma/edma.h | 3 +-
+ include/linux/dma/imx-dma.h | 5 -
+ include/linux/dmaengine.h | 23 +-
+ include/linux/fsl/bestcomm/gen_bd.h | 8 -
+ include/trace/events/tegra_apb_dma.h | 6 +-
+ 69 files changed, 1481 insertions(+), 1185 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/dma/ti,dra7-dma-crossbar.yaml
+ delete mode 100644 Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
+Merging cgroup/for-next (02f890299bd9a Merge branch 'for-7.3-fixes' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git cgroup/for-next
+Auto-merging kernel/cgroup/dmem.c
+Merge made by the 'ort' strategy.
+ kernel/cgroup/cgroup-internal.h | 2 +-
+ kernel/cgroup/cgroup-v1.c | 16 ++++--
+ kernel/cgroup/cgroup.c | 121 ++++++++++++++++++++++++----------------
+ kernel/cgroup/debug.c | 10 ++--
+ kernel/cgroup/dmem.c | 4 +-
+ kernel/cgroup/namespace.c | 2 -
+ 6 files changed, 91 insertions(+), 64 deletions(-)
+Merging scsi/for-next (c037ebe671f86 Merge branch 'misc' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi/for-next
+Auto-merging drivers/scsi/scsi_scan.c
+Merge made by the 'ort' strategy.
+ Documentation/scsi/scsi_mid_low_api.rst | 8 +-
+ drivers/ata/libata-eh.c | 4 +-
+ drivers/message/fusion/mptfc.c | 8 +-
+ drivers/s390/scsi/zfcp_erp.c | 30 +--
+ drivers/s390/scsi/zfcp_sysfs.c | 4 +-
+ drivers/scsi/3w-9xxx.c | 20 +-
+ drivers/scsi/3w-sas.c | 28 +--
+ drivers/scsi/3w-xxxx.c | 24 +--
+ drivers/scsi/53c700.c | 16 +-
+ drivers/scsi/BusLogic.c | 20 +-
+ drivers/scsi/a100u2w.c | 4 +-
+ drivers/scsi/a2091.c | 4 +-
+ drivers/scsi/a3000.c | 4 +-
+ drivers/scsi/aacraid/commsup.c | 8 +-
+ drivers/scsi/advansys.c | 8 +-
+ drivers/scsi/aha1542.c | 20 +-
+ drivers/scsi/aha1740.c | 12 +-
+ drivers/scsi/arm/eesox.c | 8 +-
+ drivers/scsi/arm/fas216.c | 20 +-
+ drivers/scsi/atp870u.c | 12 +-
+ drivers/scsi/bfa/bfad_bsg.c | 4 +-
+ drivers/scsi/csiostor/csio_attr.c | 4 +-
+ drivers/scsi/csiostor/csio_scsi.c | 4 +-
+ drivers/scsi/dc395x.c | 8 +-
+ drivers/scsi/esp_scsi.c | 32 +--
+ drivers/scsi/fcoe/fcoe.c | 4 +-
+ drivers/scsi/fdomain.c | 16 +-
+ drivers/scsi/gvp11.c | 4 +-
+ drivers/scsi/hosts.c | 17 +-
+ drivers/scsi/hptiop.c | 8 +-
+ drivers/scsi/ibmvscsi/ibmvfc-core.c | 262 ++++++++++++------------
+ drivers/scsi/ibmvscsi/ibmvfc-nvme.c | 8 +-
+ drivers/scsi/ibmvscsi/ibmvscsi.c | 86 ++++----
+ drivers/scsi/imm.c | 4 +-
+ drivers/scsi/initio.c | 8 +-
+ drivers/scsi/ipr.c | 324 +++++++++++++++---------------
+ drivers/scsi/ips.c | 26 +--
+ drivers/scsi/libfc/fc_fcp.c | 8 +-
+ drivers/scsi/libsas/sas_scsi_host.c | 10 +-
+ drivers/scsi/lpfc/lpfc_els.c | 30 +--
+ drivers/scsi/lpfc/lpfc_hbadisc.c | 44 ++--
+ drivers/scsi/lpfc/lpfc_init.c | 16 +-
+ drivers/scsi/lpfc/lpfc_scsi.c | 8 +-
+ drivers/scsi/lpfc/lpfc_sli.c | 4 +-
+ drivers/scsi/mac53c94.c | 8 +-
+ drivers/scsi/megaraid/megaraid_sas_base.c | 18 +-
+ drivers/scsi/mesh.c | 24 +--
+ drivers/scsi/mvumi.c | 26 +--
+ drivers/scsi/nsp32.c | 8 +-
+ drivers/scsi/pcmcia/sym53c500_cs.c | 8 +-
+ drivers/scsi/pmcraid.c | 84 ++++----
+ drivers/scsi/qla1280.c | 44 ++--
+ drivers/scsi/qla2xxx/qla_attr.c | 4 +-
+ drivers/scsi/qla2xxx/qla_init.c | 4 +-
+ drivers/scsi/qlogicfas408.c | 8 +-
+ drivers/scsi/qlogicpti.c | 20 +-
+ drivers/scsi/scsi.c | 12 +-
+ drivers/scsi/scsi_debugfs.c | 2 +-
+ drivers/scsi/scsi_devinfo.c | 5 +-
+ drivers/scsi/scsi_error.c | 70 +++----
+ drivers/scsi/scsi_lib.c | 46 ++---
+ drivers/scsi/scsi_proc.c | 9 +-
+ drivers/scsi/scsi_scan.c | 16 +-
+ drivers/scsi/scsi_sysfs.c | 28 +--
+ drivers/scsi/scsi_transport_fc.c | 136 ++++++-------
+ drivers/scsi/sgiwd93.c | 4 +-
+ drivers/scsi/snic/snic_disc.c | 16 +-
+ drivers/scsi/stex.c | 48 ++---
+ drivers/scsi/sym53c8xx_2/sym_glue.c | 56 +++---
+ drivers/scsi/sym53c8xx_2/sym_hipd.h | 4 +-
+ drivers/scsi/wd33c93.c | 4 +-
+ drivers/scsi/wd719x.c | 24 +--
+ drivers/scsi/xen-scsifront.c | 40 ++--
+ drivers/target/target_core_file.c | 4 +-
+ drivers/target/target_core_pscsi.c | 16 +-
+ drivers/ufs/core/ufs-debugfs.c | 4 +-
+ drivers/ufs/core/ufs-sysfs.c | 12 +-
+ drivers/ufs/core/ufshcd.c | 152 +++++++-------
+ drivers/ufs/host/ufs-mediatek.c | 4 +-
+ drivers/ufs/host/ufs-sprd.c | 4 +-
+ drivers/usb/storage/uas.c | 12 +-
+ drivers/usb/storage/usb.h | 4 +-
+ include/scsi/scsi_host.h | 9 +-
+ 83 files changed, 1097 insertions(+), 1101 deletions(-)
+Merging scsi-mkp/for-next (f07317a8d57f3 scsi: ufs: ufs-qcom: Enable only lane clocks in lane clock APIs)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git scsi-mkp/for-next
+Auto-merging drivers/scsi/mpi3mr/mpi3mr_os.c
+Auto-merging drivers/scsi/mpi3mr/mpi3mr_transport.c
+Auto-merging drivers/ufs/host/ufs-qcom.c
+Auto-merging drivers/ufs/host/ufs-qcom.h
+Merge made by the 'ort' strategy.
+ drivers/scsi/mpi3mr/mpi3mr_app.c | 43 +++++---
+ drivers/scsi/mpi3mr/mpi3mr_fw.c | 17 ++-
+ drivers/scsi/mpi3mr/mpi3mr_os.c | 95 ++++++++++++++---
+ drivers/scsi/mpi3mr/mpi3mr_transport.c | 7 ++
+ drivers/scsi/scsi_debug.c | 182 +++++++++++++++++++++++++++++++--
+ drivers/scsi/zorro7xx.c | 31 +++---
+ drivers/ufs/Kconfig | 1 +
+ drivers/ufs/core/ufs-rpmb.c | 29 +++++-
+ drivers/ufs/core/ufshcd.c | 37 +++++--
+ drivers/ufs/host/ufs-qcom.c | 47 +++++++--
+ drivers/ufs/host/ufs-qcom.h | 5 +-
+ 11 files changed, 427 insertions(+), 67 deletions(-)
+$ git am -3 ../patches/device-id-zorro
+Applying: foofof
+Using index info to reconstruct a base tree...
+M include/linux/device-id/zorro.h
+Falling back to patching base and 3-way merge...
+No changes -- Patch already applied.
+Merging vhost/linux-next (dd886653d2038 virtio_vdpa: implement synchronize_cbs())
+$ git merge -m Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost/linux-next
+Merge made by the 'ort' strategy.
+ arch/um/drivers/virtio_uml.c | 10 ++++++++
+ drivers/platform/mellanox/mlxbf-tmfifo.c | 15 ++++++++++++
+ drivers/remoteproc/remoteproc_core.c | 12 ++++++++++
+ drivers/remoteproc/remoteproc_virtio.c | 39 +++++++++++++++++++++++++-------
+ drivers/s390/virtio/virtio_ccw.c | 6 +----
+ drivers/virtio/virtio_vdpa.c | 34 +++++++++++++++++++++++++---
+ include/linux/remoteproc.h | 3 +++
+ 7 files changed, 103 insertions(+), 16 deletions(-)
+Merging rpmsg/for-next (da48e73dfe057 Merge branches 'rproc-next' and 'rpmsg-next', branch 'rproc-fixes' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rpmsg/for-next
+Auto-merging drivers/remoteproc/remoteproc_core.c
+Merge made by the 'ort' strategy.
+ .../bindings/remoteproc/ti,am3352-wkup-m3.yaml | 1 -
+ Documentation/staging/rpmsg.rst | 17 +++
+ drivers/remoteproc/Kconfig | 10 +-
+ drivers/remoteproc/imx_dsp_rproc.c | 7 +-
+ drivers/remoteproc/imx_rproc.c | 51 ++-----
+ drivers/remoteproc/omap_remoteproc.c | 12 +-
+ drivers/remoteproc/qcom_q6v5_adsp.c | 10 +-
+ drivers/remoteproc/qcom_q6v5_mss.c | 11 +-
+ drivers/remoteproc/qcom_q6v5_pas.c | 12 +-
+ drivers/remoteproc/remoteproc_core.c | 3 +
+ drivers/remoteproc/remoteproc_elf_loader.c | 23 ++-
+ drivers/remoteproc/remoteproc_sysfs.c | 7 +-
+ drivers/remoteproc/stm32_rproc.c | 2 +-
+ drivers/remoteproc/ti_k3_common.c | 10 +-
+ drivers/remoteproc/ti_k3_common.h | 4 +
+ drivers/remoteproc/ti_k3_dsp_remoteproc.c | 7 +-
+ drivers/remoteproc/ti_k3_m4_remoteproc.c | 4 +-
+ drivers/remoteproc/ti_k3_r5_remoteproc.c | 9 +-
+ drivers/remoteproc/xlnx_r5_remoteproc.c | 13 +-
+ drivers/rpmsg/virtio_rpmsg_bus.c | 156 ++++++++++++++-------
+ include/linux/omap-mailbox.h | 5 +-
+ include/linux/rpmsg/virtio_rpmsg.h | 41 ++++++
+ include/uapi/linux/rpmsg.h | 15 +-
+ samples/rpmsg/rpmsg_client_sample.c | 20 ++-
+ 24 files changed, 303 insertions(+), 147 deletions(-)
+ create mode 100644 include/linux/rpmsg/virtio_rpmsg.h
+Merging gpio-brgl/gpio/for-next (ea4f5a734cd76 gpio: ad7768: Add AD7768 GPIO auxiliary driver)
+$ git merge -m Merge branch 'gpio/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio-brgl/gpio/for-next
+Auto-merging drivers/gpio/gpiolib-cdev.c
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/gpio/fsl,qoriq-gpio.yaml | 7 ++
+ .../devicetree/bindings/gpio/gpio-zynq.yaml | 6 +
+ .../bindings/gpio/nvidia,tegra186-gpio.yaml | 9 ++
+ .../bindings/gpio/realtek,otto-gpio.yaml | 2 +
+ Documentation/driver-api/gpio/board.rst | 2 +-
+ drivers/gpio/Kconfig | 12 ++
+ drivers/gpio/Makefile | 1 +
+ drivers/gpio/gpio-ad7768.c | 121 +++++++++++++++++++++
+ drivers/gpio/gpio-adp5585.c | 20 +---
+ drivers/gpio/gpio-altera.c | 5 +-
+ drivers/gpio/gpio-eic-sprd.c | 17 +--
+ drivers/gpio/gpio-mlxbf2.c | 4 +-
+ drivers/gpio/gpio-mlxbf3.c | 4 +-
+ drivers/gpio/gpio-mmio.c | 5 +
+ drivers/gpio/gpio-mvebu.c | 19 +++-
+ drivers/gpio/gpio-omap.c | 11 +-
+ drivers/gpio/gpio-pcf857x.c | 16 ++-
+ drivers/gpio/gpio-realtek-otto.c | 21 +++-
+ drivers/gpio/gpio-regmap.c | 98 ++++++++++++++---
+ drivers/gpio/gpio-rtd1625.c | 26 +++--
+ drivers/gpio/gpio-sloppy-logic-analyzer.c | 4 +-
+ drivers/gpio/gpio-tegra186.c | 74 +++++++++++++
+ drivers/gpio/gpiolib-acpi-quirks.c | 13 +++
+ drivers/gpio/gpiolib-cdev.c | 2 +
+ drivers/gpio/gpiolib-kunit.c | 14 +--
+ include/linux/gpio/regmap.h | 2 +
+ tools/gpio/gpio-hammer.c | 2 +-
+ 27 files changed, 422 insertions(+), 95 deletions(-)
+ create mode 100644 drivers/gpio/gpio-ad7768.c
+Merging gpio-intel/for-next (32c7f7f80e5f7 gpio: crystalcove: add missing MODULE_ALIAS())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git gpio-intel/for-next
+Already up to date.
+Merging pinctrl/for-next (c4ac5623606be Merge branch 'devel' into for-next)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git pinctrl/for-next
+Merge made by the 'ort' strategy.
+ .../bindings/pinctrl/econet,en7528-pinctrl.yaml | 190 +++
+ .../bindings/pinctrl/fsl,imx35-pinctrl.yaml | 4 +-
+ .../bindings/pinctrl/fsl,imx7d-pinctrl.yaml | 8 +-
+ .../bindings/pinctrl/fsl,imx8m-pinctrl.yaml | 4 +-
+ .../bindings/pinctrl/fsl,imx8ulp-pinctrl.yaml | 4 +-
+ .../bindings/pinctrl/fsl,imx9-pinctrl.yaml | 4 +-
+ .../devicetree/bindings/pinctrl/fsl,imxrt1050.yaml | 4 +-
+ .../devicetree/bindings/pinctrl/fsl,imxrt1170.yaml | 4 +-
+ .../devicetree/bindings/pinctrl/pinctrl-palmas.txt | 105 --
+ .../bindings/pinctrl/ti,palmas-pinctrl.yaml | 170 +++
+ drivers/pinctrl/airoha/Kconfig | 15 +-
+ drivers/pinctrl/airoha/Makefile | 1 +
+ drivers/pinctrl/airoha/airoha-common.h | 3 +
+ drivers/pinctrl/airoha/pinctrl-airoha.c | 33 +-
+ drivers/pinctrl/airoha/pinctrl-an7563.c | 1 +
+ drivers/pinctrl/airoha/pinctrl-an7581.c | 1 +
+ drivers/pinctrl/airoha/pinctrl-an7583.c | 1 +
+ drivers/pinctrl/airoha/pinctrl-en7523.c | 1 +
+ drivers/pinctrl/airoha/pinctrl-en7528.c | 1204 ++++++++++++++++++++
+ drivers/pinctrl/meson/pinctrl-meson-s4.c | 2 +-
+ drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 8 +-
+ drivers/pinctrl/pinctrl-amd.c | 8 +-
+ drivers/pinctrl/pinctrl-generic.c | 4 +
+ 23 files changed, 1643 insertions(+), 136 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/pinctrl/econet,en7528-pinctrl.yaml
+ delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt
+ create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,palmas-pinctrl.yaml
+ create mode 100644 drivers/pinctrl/airoha/pinctrl-en7528.c
+Merging pinctrl-intel/for-next (c016587866e57 pinctrl: intel: Try to retrieve driver data for pure platform drivers)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git pinctrl-intel/for-next
+Merge made by the 'ort' strategy.
+ drivers/pinctrl/intel/pinctrl-intel.c | 51 ++++++++++++++++++++++++-----------
+ drivers/pinctrl/intel/pinctrl-intel.h | 2 +-
+ 2 files changed, 36 insertions(+), 17 deletions(-)
+Merging pinctrl-renesas/renesas-pinctrl (0cd4a7b3a4883 pinctrl: renesas: rzt2h: Add a helper for reading PFC)
+$ git merge -m Merge branch 'renesas-pinctrl' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git pinctrl-renesas/renesas-pinctrl
+Merge made by the 'ort' strategy.
+ .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 4 +-
+ drivers/pinctrl/renesas/pinctrl-rzg2l.c | 412 ++++++++++++++-------
+ drivers/pinctrl/renesas/pinctrl-rzt2h.c | 182 +++++----
+ 3 files changed, 404 insertions(+), 194 deletions(-)
+Merging pinctrl-samsung/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git pinctrl-samsung/for-next
+Already up to date.
+Merging pinctrl-qcom/pinctrl-qcom/for-next (d29bfb93a1977 pinctrl: qcom: lpass-lpi: Include value in debugfs output)
+$ git merge -m Merge branch 'pinctrl-qcom/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git pinctrl-qcom/pinctrl-qcom/for-next
+Merge made by the 'ort' strategy.
+ .../pinctrl/qcom,hawi-lpass-lpi-pinctrl.yaml | 109 ++
+ .../bindings/pinctrl/qcom,kuno-tlmm.yaml | 110 ++
+ .../bindings/pinctrl/qcom,msm8952-pinctrl.yaml | 146 +++
+ .../bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +
+ .../bindings/pinctrl/qcom,sc8280xp-tlmm.yaml | 3 +
+ drivers/pinctrl/qcom/Kconfig | 10 +
+ drivers/pinctrl/qcom/Kconfig.msm | 19 +
+ drivers/pinctrl/qcom/Makefile | 3 +
+ drivers/pinctrl/qcom/pinctrl-apq8064.c | 188 +--
+ drivers/pinctrl/qcom/pinctrl-apq8084.c | 502 ++++----
+ drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c | 244 ++++
+ drivers/pinctrl/qcom/pinctrl-ipq4019.c | 208 ++--
+ drivers/pinctrl/qcom/pinctrl-ipq8064.c | 208 ++--
+ drivers/pinctrl/qcom/pinctrl-kuno.c | 801 +++++++++++++
+ drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 6 +-
+ drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 17 +
+ drivers/pinctrl/qcom/pinctrl-msm.h | 25 -
+ drivers/pinctrl/qcom/pinctrl-msm8952.c | 1257 ++++++++++++++++++++
+ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
+ 19 files changed, 3281 insertions(+), 579 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,hawi-lpass-lpi-pinctrl.yaml
+ create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,kuno-tlmm.yaml
+ create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,msm8952-pinctrl.yaml
+ create mode 100644 drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c
+ create mode 100644 drivers/pinctrl/qcom/pinctrl-kuno.c
+ create mode 100644 drivers/pinctrl/qcom/pinctrl-msm8952.c
+Merging pwm/pwm/for-next (17dbb6938d3ab pwm: lp3943: fix NULL pointer dereference for an unconfigured channel)
+$ git merge -m Merge branch 'pwm/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/pwm/for-next
+Merge made by the 'ort' strategy.
+ .../devicetree/bindings/pwm/pwm-tipwmss.txt | 58 ---------------
+ .../devicetree/bindings/pwm/ti,am33xx-pwmss.yaml | 82 ++++++++++++++++++++++
+ Documentation/driver-api/pwm.rst | 2 +-
+ drivers/pwm/pwm-brcmstb.c | 2 +-
+ drivers/pwm/pwm-ipq.c | 2 +-
+ drivers/pwm/pwm-iqs620a.c | 23 +-----
+ drivers/pwm/pwm-loongson.c | 2 +
+ drivers/pwm/pwm-lp3943.c | 3 +
+ drivers/pwm/pwm-mtk-disp.c | 4 +-
+ drivers/pwm/pwm-pca9685.c | 2 +-
+ drivers/pwm/pwm-renesas-tpu.c | 23 ++++--
+ 11 files changed, 114 insertions(+), 89 deletions(-)
+ delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
+ create mode 100644 Documentation/devicetree/bindings/pwm/ti,am33xx-pwmss.yaml
+Merging ktest/for-next (932cdaf3e273a ktest: Add logfile to failure directory)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git ktest/for-next
+Already up to date.
+Merging kselftest/next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git kselftest/next
+Already up to date.
+Merging kunit/test (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'test' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git kunit/test
+Already up to date.
+Merging kunit-next/kunit (e38f53f048246 kunit: Return void from kunit_run_all_tests())
+$ git merge -m Merge branch 'kunit' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git kunit-next/kunit
+Merge made by the 'ort' strategy.
+ include/kunit/test.h | 5 ++---
+ lib/kunit/executor.c | 5 ++---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+Merging livepatching/for-next (5d791d3396ca4 selftests/livepatch: filter debug messages in check_result())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git livepatching/for-next
+Merge made by the 'ort' strategy.
+ include/linux/livepatch.h | 4 ++++
+ kernel/livepatch/core.c | 10 ++++++++++
+ tools/testing/selftests/livepatch/functions.sh | 12 +++++++++---
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+Merging rtc/rtc-next (afce9701d6423 MAINTAINERS: update rtc subsystem patchwork location)
+$ git merge -m Merge branch 'rtc-next' of https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc/rtc-next
+Already up to date.
+Merging nvdimm/libnvdimm-for-next (e99cb3ecd8334 nvdimm-btt: clean up kernel-doc warnings)
+$ git merge -m Merge branch 'libnvdimm-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git nvdimm/libnvdimm-for-next
+Already up to date.
+Merging at24/at24/for-next (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'at24/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git at24/at24/for-next
+Already up to date.
+Merging ntb/ntb-next (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'ntb-next' of https://github.com/jonmason/ntb.git ntb/ntb-next
+Already up to date.
+Merging seccomp/for-next/seccomp (41fa043273841 selftests/seccomp: Add hard-coded __NR_uprobe for x86_64)
+$ git merge -m Merge branch 'for-next/seccomp' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp/for-next/seccomp
+Already up to date.
+Merging slimbus/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/srini/slimbus.git slimbus/for-next
+Already up to date.
+Merging nvmem/for-next (8f596c13b6b7f dt-bindings: nvmem: qfprom: Add compatible for Qualcomm Maili)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git nvmem/for-next
+Merge made by the 'ort' strategy.
+ Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
+ 1 file changed, 1 insertion(+)
+Merging hyperv/hyperv-next (be0cfab740e58 clocksource: hyper-v: Remove support for stimer interrupts in message mode)
+$ git merge -m Merge branch 'hyperv-next' of https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv/hyperv-next
+Already up to date.
+Merging auxdisplay/for-next (c868291c2b3d7 auxdisplay: arm-charlcd: Use DEFINE_SIMPLE_DEV_PM_OPS for power management)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git auxdisplay/for-next
+Merge made by the 'ort' strategy.
+ drivers/auxdisplay/arm-charlcd.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+Merging kgdb/kgdb/for-next (fdbdd0ccb30af kdb: remove redundant check for scancode 0xe0)
+$ git merge -m Merge branch 'kgdb/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux.git kgdb/kgdb/for-next
+Already up to date.
+Merging hmm/hmm (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'hmm' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git hmm/hmm
+Already up to date.
+Merging cfi/cfi/next (dc59e4fea9d83 Linux 7.2-rc1)
+$ git merge -m Merge branch 'cfi/next' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git cfi/cfi/next
+Already up to date.
+Merging mhi/mhi-next (83c29a55b89e0 bus: mhi: host: pci_generic: Add IP_CTRL channel for Sierra EM919x/EM929x)
+$ git merge -m Merge branch 'mhi-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git mhi/mhi-next
+Merge made by the 'ort' strategy.
+ drivers/bus/mhi/host/pci_generic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+$ git am -3 ../patches/0001-fix-up-for-net-qrtr-Drop-the-MHI-auto_queue-feature-.patch
+Applying: fix up for "net: qrtr: Drop the MHI auto_queue feature for IPCR DL channels"
+Using index info to reconstruct a base tree...
+M drivers/net/wireless/ath/ath12k/wifi7/mhi.c
+Falling back to patching base and 3-way merge...
+No changes -- Patch already applied.
+Merging cxl/next (d7ed7d0fd69c4 Merge branch 'for-7.4/cxl-zero-size-decoder' into cxl-for-next)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git cxl/next
+Auto-merging MAINTAINERS
+Auto-merging drivers/cxl/core/ras.c
+Merge made by the 'ort' strategy.
+ .../driver-api/cxl/platform/acpi/dsdt.rst | 3 +-
+ MAINTAINERS | 1 +
+ drivers/cxl/core/cdat.c | 8 +-
+ drivers/cxl/core/core.h | 8 +-
+ drivers/cxl/core/edac.c | 30 ++++--
+ drivers/cxl/core/features.c | 58 ++++++----
+ drivers/cxl/core/hdm.c | 58 ++++++----
+ drivers/cxl/core/mbox.c | 3 +
+ drivers/cxl/core/mce.c | 8 +-
+ drivers/cxl/core/pci.c | 11 +-
+ drivers/cxl/core/port.c | 11 +-
+ drivers/cxl/core/ras.c | 6 +-
+ drivers/cxl/core/region.c | 76 ++++++++-----
+ drivers/cxl/core/region_pmem.c | 6 +-
+ drivers/cxl/core/regs.c | 14 +++
+ drivers/cxl/cxl.h | 10 ++
+ drivers/cxl/port.c | 3 +
+ tools/testing/cxl/Kbuild | 16 +--
+ tools/testing/cxl/test/cxl.c | 117 +++++++++++++++++----
+ 19 files changed, 330 insertions(+), 117 deletions(-)
+Merging zstd/zstd-next (65d1f5507ed2c zstd: Import upstream v1.5.7)
+$ git merge -m Merge branch 'zstd-next' of https://github.com/terrelln/linux.git zstd/zstd-next
+Already up to date.
+Merging efi/next (bb6cbbb42c3a4 efi/libstub: Fix grammar in efi_kaslr_relocate_kernel() comment)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi/next
+Merge made by the 'ort' strategy.
+ drivers/firmware/efi/capsule-loader.c | 6 ++---
+ drivers/firmware/efi/capsule.c | 4 +--
+ drivers/firmware/efi/efi.c | 33 +++++++++++++++++++++++-
+ drivers/firmware/efi/libstub/efi-stub-entry.c | 2 +-
+ drivers/firmware/efi/libstub/efi-stub-helper.c | 10 +++----
+ drivers/firmware/efi/libstub/efi-stub.c | 2 +-
+ drivers/firmware/efi/libstub/efistub.h | 4 +--
+ drivers/firmware/efi/libstub/file.c | 8 +++---
+ drivers/firmware/efi/libstub/gop.c | 17 +++++++-----
+ drivers/firmware/efi/libstub/kaslr.c | 19 ++++++--------
+ drivers/firmware/efi/libstub/mem.c | 2 +-
+ drivers/firmware/efi/libstub/pci.c | 2 +-
+ drivers/firmware/efi/libstub/random.c | 8 +++---
+ drivers/firmware/efi/libstub/riscv.c | 2 +-
+ drivers/firmware/efi/libstub/smbios.c | 3 ++-
+ drivers/firmware/efi/libstub/tpm.c | 8 +++---
+ drivers/firmware/efi/libstub/unaccepted_memory.c | 2 +-
+ drivers/firmware/efi/libstub/x86-stub.c | 17 ++++++------
+ drivers/firmware/efi/libstub/zboot.c | 3 ++-
+ drivers/firmware/efi/runtime-wrappers.c | 28 ++++++++++++++++++++
+ include/linux/efi.h | 1 +
+ 21 files changed, 122 insertions(+), 59 deletions(-)
+Merging unicode/for-next (a511442085c14 unicode: Properly reject invalid encoding version strings)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git unicode/for-next
+Already up to date.
+Merging random/master (703749b069d53 random: fix vgetrandom_opaque_params kernel-doc)
+$ git merge -m Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git random/master
+Merge made by the 'ort' strategy.
+ drivers/virt/vmgenid.c | 11 +++++++----
+ include/linux/siphash.h | 8 ++++++--
+ include/uapi/linux/random.h | 2 +-
+ include/vdso/getrandom.h | 2 +-
+ 4 files changed, 15 insertions(+), 8 deletions(-)
+Merging landlock/next (e26307d830488 lsm: add LSM_AUDIT_DATA_NS for namespace audit records)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git landlock/next
+Already up to date.
+Merging sysctl/sysctl-next (c5c4ca25387e3 sysctl: Rewrite selftests on top of KTAP helpers)
+$ git merge -m Merge branch 'sysctl-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git sysctl/sysctl-next
+Auto-merging fs/dcache.c
+Merge made by the 'ort' strategy.
+ drivers/parport/procfs.c | 6 +-
+ fs/dcache.c | 2 +-
+ fs/file_table.c | 2 +-
+ kernel/sysctl.c | 427 +++++----
+ tools/testing/selftests/sysctl/sysctl.sh | 1523 ++++++++++++------------------
+ 5 files changed, 844 insertions(+), 1116 deletions(-)
+Merging execve/for-next/execve (ab11176bd3a76 x86/elf: Correct comment for STACK_RND_MASK())
+$ git merge -m Merge branch 'for-next/execve' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git execve/for-next/execve
+Already up to date.
+Merging bitmap/bitmap-for-next (cf72cbb39da84 Merge tag 'io_uring-7.3-20260828' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux)
+$ git merge -m Merge branch 'bitmap-for-next' of https://github.com/norov/linux.git bitmap/bitmap-for-next
+Already up to date.
+Merging hte/for-next (30167fadbf87f hte: tegra194-test: shut down timer before GPIO release)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux.git hte/for-next
+Merge made by the 'ort' strategy.
+ drivers/hte/hte-tegra194-test.c | 2 +-
+ drivers/hte/hte-tegra194.c | 14 ++++++--------
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+Merging kspp/for-next/kspp (7cada81883e82 Merge branch 'for-next/hardening' into for-next/kspp)
+$ git merge -m Merge branch 'for-next/kspp' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/for-next/kspp
+Merge made by the 'ort' strategy.
+ drivers/misc/lkdtm/core.c | 16 +++----
+ fs/signalfd.c | 28 +++++++++---
+ include/linux/fortify-string.h | 2 -
+ scripts/gcc-plugins/randomize_layout_plugin.c | 63 +++++++++++++++++++++++++--
+ 4 files changed, 89 insertions(+), 20 deletions(-)
+Merging nolibc/for-next (319b153f400a5 selftests/nolibc: validate ENOTDIR return values from opendir()/fdopendir())
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git nolibc/for-next
+Merge made by the 'ort' strategy.
+ tools/include/nolibc/Makefile | 19 ++-
+ tools/include/nolibc/arch-hexagon.h | 164 +++++++++++++++++++++++++
+ tools/include/nolibc/arch.h | 2 +
+ tools/include/nolibc/dirent.h | 18 ++-
+ tools/include/nolibc/nolibc.h | 1 +
+ tools/include/nolibc/sys/sendfile.h | 41 +++++++
+ tools/testing/selftests/nolibc/Makefile.nolibc | 10 +-
+ tools/testing/selftests/nolibc/nolibc-test.c | 70 +++++++++++
+ tools/testing/selftests/nolibc/run-tests.sh | 24 +++-
+ 9 files changed, 341 insertions(+), 8 deletions(-)
+ create mode 100644 tools/include/nolibc/arch-hexagon.h
+ create mode 100644 tools/include/nolibc/sys/sendfile.h
+Merging iommufd/for-next (fe85c40e992be iommu/vt-d: Convert nested cache invalidation to the core array loop)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git iommufd/for-next
+Merge made by the 'ort' strategy.
+ .../iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 199 ++++++++++++++++-----
+ drivers/iommu/intel/nested.c | 50 +++---
+ drivers/iommu/iommufd/hw_pagetable.c | 25 +--
+ drivers/iommu/iommufd/selftest.c | 163 ++++++++---------
+ include/linux/iommu.h | 6 +-
+ include/linux/iommufd.h | 2 +
+ include/uapi/linux/iommufd.h | 4 +-
+ tools/testing/selftests/iommu/iommufd.c | 14 +-
+ tools/testing/selftests/iommu/iommufd_fail_nth.c | 14 +-
+ 9 files changed, 314 insertions(+), 163 deletions(-)
+Merging turbostat/next (1c996a37fd244 tools/power turbostat: pmt: Improve sscanf() hygiene)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat/next
+Merge made by the 'ort' strategy.
+ tools/power/x86/turbostat/turbostat.8 | 6 +-
+ tools/power/x86/turbostat/turbostat.c | 567 ++++++++++++++++------------------
+ 2 files changed, 266 insertions(+), 307 deletions(-)
+Merging pwrseq/pwrseq/for-next (935ecc5c86c5a power: sequencing: pwrseq-pcie-m2: Support PCIe switch topologies)
+$ git merge -m Merge branch 'pwrseq/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git pwrseq/pwrseq/for-next
+Auto-merging drivers/power/sequencing/Kconfig
+Auto-merging drivers/power/sequencing/pwrseq-pcie-m2.c
+Merge made by the 'ort' strategy.
+ drivers/power/sequencing/Kconfig | 9 ++
+ drivers/power/sequencing/Makefile | 1 +
+ drivers/power/sequencing/pwrseq-pcie-m2.c | 19 ++-
+ drivers/power/sequencing/pwrseq-renesas-pwrrdy.c | 142 +++++++++++++++++++++++
+ 4 files changed, 169 insertions(+), 2 deletions(-)
+ create mode 100644 drivers/power/sequencing/pwrseq-renesas-pwrrdy.c
+Merging capabilities-next/caps-next (9b0ee13b80798 capability: remove non-kernel-doc comments)
+$ git merge -m Merge branch 'caps-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git capabilities-next/caps-next
+Already up to date.
+$ git am -3 ../patches/0001-sign-file-Fix-up-merge-issue.patch
+Applying: sign-file: Fix up merge issue
+Using index info to reconstruct a base tree...
+M scripts/sign-file.c
+Falling back to patching base and 3-way merge...
+Auto-merging scripts/sign-file.c
+No changes -- Patch already applied.
+Merging ipe/next (87c77c3cd372f ipe: fix invalid sgid value in audit event documentation)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe.git ipe/next
+Merge made by the 'ort' strategy.
+ Documentation/admin-guide/LSM/ipe.rst | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+Merging kcsan/next (a8488ecbd7ba4 kcsan: avoid unintended access checking in NMIs)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git kcsan/next
+Already up to date.
+Merging crc/crc-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'crc-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc/crc-next
+Already up to date.
+Merging keys-next/keys-next (965e9a2cf23b0 pkcs7: Change a pr_warn() to pr_warn_once())
+$ git merge -m Merge branch 'keys-next' of https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-next/keys-next
+Already up to date.
+Merging fwctl/for-next (cee9395acd804 Linux 7.3-rc1)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl.git fwctl/for-next
+Already up to date.
+Merging devsec-tsm/next (3177779ae17db virt: coco: change tsm_class to a const struct)
+$ git merge -m Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git devsec-tsm/next
+Already up to date.
+Merging hisilicon/for-next (a5db65458a911 Merge branch 'next/dt64' into for-next)
+$ git merge -m Merge branch 'for-next' of https://github.com/hisilicon/linux-hisi.git hisilicon/for-next
+Merge made by the 'ort' strategy.
+Merging device-id/device-id-rework (995832b2cebe6 Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files))
+$ git merge -m Merge branch 'device-id-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git device-id/device-id-rework
+Already up to date.
+Merging kthread/for-next (fa39ec4f89f26 doc: Add housekeeping documentation)
+$ git merge -m Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git kthread/for-next
+Already up to date.
+Merging pagemap-headers/headers (e02cb91d4644d ksm: Remove pagemap.h include)
+$ git merge -m Merge branch 'headers' of git://git.infradead.org/users/willy/pagecache.git pagemap-headers/headers
+Auto-merging arch/x86/virt/vmx/tdx/tdx.c
+Auto-merging block/fops.c
+Auto-merging drivers/dma/ste_dma40.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+Auto-merging drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+Auto-merging drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+Auto-merging drivers/gpu/drm/i915/display/intel_display_power.c
+Auto-merging drivers/gpu/drm/msm/msm_fb.c
+Auto-merging drivers/gpu/drm/msm/msm_gem_shrinker.c
+Auto-merging drivers/gpu/drm/nouveau/nouveau_dmem.c
+Auto-merging drivers/gpu/drm/omapdrm/dss/hdmi4.c
+Auto-merging drivers/gpu/drm/omapdrm/dss/hdmi5.c
+Auto-merging drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c
+Auto-merging drivers/gpu/drm/panthor/panthor_gem.c
+Auto-merging drivers/hwmon/pmbus/pmbus_core.c
+Auto-merging drivers/i2c/busses/i2c-amd-asf-plat.c
+Auto-merging drivers/i2c/busses/i2c-gxp.c
+Auto-merging drivers/i2c/busses/i2c-k1.c
+Auto-merging drivers/iio/accel/fxls8962af-core.c
+Auto-merging drivers/iio/adc/ti-ads1298.c
+Auto-merging drivers/iio/light/rohm-bu27034.c
+Auto-merging drivers/iio/pressure/bmp280-core.c
+Auto-merging drivers/media/platform/st/stm32/stm32-csi.c
+Auto-merging drivers/media/usb/gspca/gspca.c
+Auto-merging drivers/mfd/88pm886.c
+Auto-merging drivers/mfd/cs42l43.c
+Auto-merging drivers/mfd/twl-core.c
+Auto-merging drivers/mmc/core/core.c
+Auto-merging drivers/mmc/core/host.c
+Auto-merging drivers/mmc/host/sh_mmcif.c
+Auto-merging drivers/net/ethernet/atheros/atl1e/atl1e.h
+Auto-merging drivers/pinctrl/pinctrl-sx150x.c
+Auto-merging drivers/power/supply/bq25630_charger.c
+Auto-merging drivers/regulator/fixed.c
+Auto-merging drivers/regulator/tps65185.c
+Auto-merging drivers/ufs/host/ufs-mediatek.c
+Auto-merging drivers/ufs/host/ufs-qcom.c
+Auto-merging drivers/usb/typec/mux/it5205.c
+Auto-merging fs/aio.c
+Auto-merging fs/buffer.c
+Auto-merging fs/file_table.c
+Auto-merging fs/inode.c
+Auto-merging fs/nfs/nfstrace.h
+Auto-merging fs/nfs/pnfs.c
+Auto-merging fs/nfsd/nfs4proc.c
+Auto-merging include/drm/drm_print.h
+Auto-merging include/linux/ceph/libceph.h
+Auto-merging include/linux/i3c/master.h
+Auto-merging include/linux/nfs_fs.h
+Auto-merging include/linux/swap.h
+Auto-merging net/ceph/osd_client.c
+CONFLICT (content): Merge conflict in net/ceph/osd_client.c
+Auto-merging net/ceph/pagevec.c
+Auto-merging net/sunrpc/auth_gss/gss_krb5_crypto.c
+Auto-merging net/sunrpc/xdr.c
+Auto-merging net/sunrpc/xprtsock.c
+Auto-merging security/selinux/hooks.c
+Auto-merging security/selinux/selinuxfs.c
+Auto-merging security/smack/smack_lsm.c
+Resolved 'net/ceph/osd_client.c' using previous resolution.
+Automatic merge failed; fix conflicts and then commit the result.
+$ git commit --no-edit -v -a
+[master e411494241ee8] Merge branch 'headers' of git://git.infradead.org/users/willy/pagecache.git
+$ git diff -M --stat --summary HEAD^..
+ arch/alpha/include/asm/pgtable.h | 2 +-
+ arch/arc/include/asm/Kbuild | 1 +
+ arch/arc/include/asm/pgtable-levels.h | 2 ++
+ arch/arc/include/asm/tlb.h | 12 ----------
+ arch/arm/include/asm/pgalloc.h | 2 --
+ arch/arm/include/asm/tlb.h | 2 --
+ arch/arm/mach-pxa/pxa3xx.c | 1 +
+ arch/arm64/include/asm/tlb.h | 3 ---
+ arch/hexagon/include/asm/tlb.h | 1 -
+ arch/microblaze/include/asm/pgtable.h | 2 +-
+ arch/nios2/include/asm/tlb.h | 1 -
+ arch/openrisc/include/asm/Kbuild | 1 +
+ arch/openrisc/include/asm/tlb.h | 26 ----------------------
+ arch/powerpc/include/asm/tlb.h | 2 --
+ arch/sh/include/asm/pgtable.h | 2 +-
+ arch/sh/include/asm/tlb.h | 1 -
+ arch/sparc/include/asm/pgtable_64.h | 2 +-
+ arch/sparc/include/asm/tlb_64.h | 1 -
+ arch/x86/include/asm/pgalloc.h | 1 -
+ arch/x86/virt/vmx/tdx/tdx.c | 1 +
+ arch/xtensa/kernel/hibernate.c | 1 +
+ block/fops.c | 1 +
+ drivers/char/agp/backend.c | 1 -
+ drivers/char/agp/generic.c | 1 -
+ drivers/char/agp/intel-agp.c | 1 -
+ drivers/char/agp/intel-gtt.c | 1 -
+ drivers/char/agp/uninorth-agp.c | 3 ++-
+ drivers/dma/ste_dma40.c | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 -
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +--
+ drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 1 +
+ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 -
+ drivers/gpu/drm/display/drm_dp_cec.c | 1 +
+ drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 +
+ drivers/gpu/drm/i915/display/intel_display_power.c | 1 +
+ drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 1 +
+ drivers/gpu/drm/msm/msm_fb.c | 2 ++
+ drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 ++
+ drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 +
+ drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 +
+ drivers/gpu/drm/omapdrm/dss/hdmi5.c | 1 +
+ drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c | 1 +
+ drivers/gpu/drm/panfrost/panfrost_gem.c | 2 ++
+ drivers/gpu/drm/panthor/panthor_gem.c | 3 +++
+ drivers/hwmon/pmbus/pmbus_core.c | 1 +
+ drivers/i2c/busses/i2c-amd-asf-plat.c | 1 +
+ drivers/i2c/busses/i2c-gxp.c | 1 +
+ drivers/i2c/busses/i2c-k1.c | 1 +
+ drivers/i2c/busses/i2c-pasemi-platform.c | 1 +
+ drivers/iio/accel/fxls8962af-core.c | 1 +
+ drivers/iio/adc/nct7201.c | 1 +
+ drivers/iio/adc/ti-ads1298.c | 1 +
+ drivers/iio/light/rohm-bu27034.c | 1 +
+ drivers/iio/pressure/bmp280-core.c | 1 +
+ drivers/iio/pressure/bmp280.h | 1 +
+ drivers/input/misc/aw86927.c | 1 +
+ drivers/input/touchscreen/goodix_berlin_core.c | 1 +
+ drivers/input/touchscreen/hynitron_cstxxx.c | 1 +
+ drivers/input/touchscreen/imagis.c | 1 +
+ drivers/leds/leds-turris-omnia.c | 1 +
+ drivers/media/common/videobuf2/frame_vector.c | 1 -
+ drivers/media/pci/cx18/cx18-driver.h | 1 -
+ drivers/media/pci/ivtv/ivtv-driver.h | 2 +-
+ drivers/media/platform/st/stm32/stm32-csi.c | 1 +
+ drivers/media/platform/ti/omap3isp/ispvideo.c | 1 -
+ drivers/media/usb/go7007/go7007-v4l2.c | 1 -
+ drivers/media/usb/gspca/gspca.c | 1 -
+ drivers/mfd/88pm886.c | 1 +
+ drivers/mfd/abx500-core.c | 1 +
+ drivers/mfd/adp5585.c | 1 +
+ drivers/mfd/cs40l50-core.c | 1 +
+ drivers/mfd/cs42l43.c | 1 +
+ drivers/mfd/rt5120.c | 1 +
+ drivers/mfd/tps65219.c | 1 +
+ drivers/mfd/twl-core.c | 2 +-
+ drivers/mmc/core/core.c | 1 -
+ drivers/mmc/core/host.c | 1 -
+ drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 -
+ drivers/mmc/host/renesas_sdhi_sys_dmac.c | 1 -
+ drivers/mmc/host/sh_mmcif.c | 1 -
+ drivers/mmc/host/tmio_mmc.h | 1 -
+ drivers/mmc/host/tmio_mmc_core.c | 1 -
+ drivers/mmc/host/usdhi6rol0.c | 1 -
+ drivers/net/ethernet/atheros/atl1c/atl1c.h | 1 -
+ drivers/net/ethernet/atheros/atl1e/atl1e.h | 1 -
+ drivers/net/ethernet/intel/e1000/e1000.h | 1 -
+ drivers/net/ethernet/intel/e1000e/netdev.c | 1 -
+ drivers/net/ethernet/intel/igb/igb_main.c | 1 -
+ drivers/net/ethernet/intel/igbvf/netdev.c | 1 -
+ drivers/phy/st/phy-stm32-combophy.c | 1 +
+ drivers/pinctrl/pinctrl-sx150x.c | 1 +
+ drivers/platform/arm64/huawei-gaokun-ec.c | 1 +
+ drivers/platform/arm64/lenovo-yoga-c630.c | 2 +-
+ .../platform/x86/intel/int3472/clk_and_regulator.c | 1 +
+ drivers/power/supply/bq25630_charger.c | 1 +
+ drivers/power/supply/rk817_charger.c | 2 +-
+ drivers/regulator/fixed.c | 1 +
+ drivers/regulator/fp9931.c | 1 +
+ drivers/regulator/mt6360-regulator.c | 1 +
+ drivers/regulator/qcom-labibb-regulator.c | 1 +
+ drivers/regulator/rtq2208-regulator.c | 1 +
+ drivers/regulator/tps65185.c | 1 +
+ drivers/regulator/tps65219-regulator.c | 1 +
+ drivers/regulator/tps6594-regulator.c | 1 +
+ drivers/soc/xilinx/zynqmp_power.c | 1 +
+ drivers/ufs/host/ufs-mediatek.c | 1 +
+ drivers/ufs/host/ufs-qcom.c | 1 +
+ drivers/usb/core/hcd.c | 1 +
+ drivers/usb/typec/mux/it5205.c | 1 +
+ drivers/usb/typec/wusb3801.c | 1 +
+ drivers/video/fbdev/core/fb_procfs.c | 1 +
+ drivers/xen/balloon.c | 1 +
+ fs/aio.c | 1 +
+ fs/buffer.c | 1 +
+ fs/file_table.c | 1 +
+ fs/inode.c | 1 +
+ fs/nfs/blocklayout/blocklayout.c | 1 +
+ fs/nfs/nfs42proc.c | 1 +
+ fs/nfs/nfstrace.h | 1 +
+ fs/nfs/pnfs.c | 1 +
+ fs/nfsd/nfs4proc.c | 1 +
+ include/drm/drm_print.h | 1 +
+ include/drm/ttm/ttm_tt.h | 1 -
+ include/linux/balloon.h | 1 -
+ include/linux/ceph/libceph.h | 1 -
+ include/linux/i3c/master.h | 1 +
+ include/linux/ksm.h | 1 -
+ include/linux/mempolicy.h | 1 -
+ include/linux/nfs_fs.h | 1 -
+ include/linux/nfs_page.h | 1 -
+ include/linux/suspend.h | 1 -
+ include/linux/swap.h | 1 -
+ include/sound/cs35l41.h | 1 +
+ kernel/power/snapshot.c | 1 +
+ net/ceph/osd_client.c | 1 -
+ net/ceph/pagevec.c | 1 +
+ net/core/datagram.c | 1 -
+ net/rds/rdma.c | 1 -
+ net/sunrpc/auth_gss/auth_gss.c | 1 -
+ net/sunrpc/auth_gss/gss_krb5_crypto.c | 1 -
+ net/sunrpc/auth_gss/gss_krb5_wrap.c | 1 -
+ net/sunrpc/auth_gss/svcauth_gss.c | 1 -
+ net/sunrpc/cache.c | 1 -
+ net/sunrpc/rpc_pipe.c | 1 -
+ net/sunrpc/socklib.c | 1 -
+ net/sunrpc/xdr.c | 1 -
+ net/sunrpc/xprtsock.c | 1 -
+ security/commoncap.c | 3 ---
+ security/inode.c | 1 -
+ security/selinux/hooks.c | 1 -
+ security/selinux/selinuxfs.c | 1 -
+ security/smack/smack_lsm.c | 1 -
+ sound/soc/codecs/cs35l41-lib.c | 1 +
+ 155 files changed, 98 insertions(+), 118 deletions(-)
+ delete mode 100644 arch/arc/include/asm/tlb.h
+ delete mode 100644 arch/openrisc/include/asm/tlb.h
diff --git a/arch/Kconfig b/arch/Kconfig
index 1163736de1f9..3bb2e568f5b1 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -526,6 +526,13 @@ config HAVE_ARCH_JUMP_LABEL
config HAVE_ARCH_JUMP_LABEL_RELATIVE
bool
+config MMU_GATHER_TABLE_FREE
+ bool
+
+config MMU_GATHER_RCU_TABLE_FREE
+ bool
+ select MMU_GATHER_TABLE_FREE
+
config MMU_GATHER_PAGE_SIZE
bool
@@ -541,6 +548,7 @@ config MMU_GATHER_MERGE_VMAS
config MMU_GATHER_NO_GATHER
bool
+ depends on MMU_GATHER_TABLE_FREE
config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
bool
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 9063c7bda4e4..e53ef2d88463 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -42,6 +42,7 @@ config ALPHA
select ARCH_STACKWALK
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
select MMU_GATHER_NO_RANGE
+ select MMU_GATHER_RCU_TABLE_FREE
select SPARSEMEM_EXTREME if SPARSEMEM
select ZONE_DMA
select TRACE_IRQFLAGS_SUPPORT
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index 05885a692244..0ba22c8c2ff2 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -357,6 +357,13 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
return pte;
}
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
+
extern void paging_init(void);
/* We have our own get_unmapped_area */
diff --git a/arch/arc/include/asm/pgalloc.h b/arch/arc/include/asm/pgalloc.h
index 9b6c37f92e97..dfae070fe8d5 100644
--- a/arch/arc/include/asm/pgalloc.h
+++ b/arch/arc/include/asm/pgalloc.h
@@ -72,7 +72,7 @@ static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4dp, pud_t *pudp)
set_p4d(p4dp, __p4d((unsigned long)pudp));
}
-#define __pud_free_tlb(tlb, pmd, addr) tlb_remove_ptdesc((tlb), virt_to_ptdesc(pmd))
+#define __pud_free_tlb(tlb, pmd, addr) pud_free((tlb)->mm, pmd)
#endif
@@ -83,10 +83,10 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmdp)
set_pud(pudp, __pud((unsigned long)pmdp));
}
-#define __pmd_free_tlb(tlb, pmd, addr) tlb_remove_ptdesc((tlb), virt_to_ptdesc(pmd))
+#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
#endif
-#define __pte_free_tlb(tlb, pte, addr) tlb_remove_ptdesc((tlb), page_ptdesc(pte))
+#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
#endif /* _ASM_ARC_PGALLOC_H */
diff --git a/arch/arc/include/asm/pgtable-levels.h b/arch/arc/include/asm/pgtable-levels.h
index 7e16b7fa17bc..82544e671011 100644
--- a/arch/arc/include/asm/pgtable-levels.h
+++ b/arch/arc/include/asm/pgtable-levels.h
@@ -100,6 +100,8 @@
/*
* 1st level paging: pgd
*/
+#define pgd_ERROR(e) \
+ pr_crit("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
#if CONFIG_PGTABLE_LEVELS > 3
@@ -115,6 +117,9 @@
/*
* 2nd level paging: pud
*/
+#define pud_ERROR(e) \
+ pr_crit("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e))
+
#endif
#if CONFIG_PGTABLE_LEVELS > 2
@@ -134,6 +139,9 @@
/*
* 3rd level paging: pmd
*/
+#define pmd_ERROR(e) \
+ pr_crit("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+
#define pmd_pfn(pmd) ((pmd_val(pmd) & PMD_MASK) >> PAGE_SHIFT)
#define pfn_pmd(pfn,prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
@@ -159,6 +167,9 @@
/*
* 4th level paging: pte
*/
+#define pte_ERROR(e) \
+ pr_crit("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+
#define PFN_PTE_SHIFT PAGE_SHIFT
#define pte_none(x) (!pte_val(x))
#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0cc289a7184a..ffbc7f386131 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -42,6 +42,7 @@ config ARM
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_CFI
select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_SUPPORTS_RT
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF
@@ -134,6 +135,7 @@ config ARM
select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP
select HAVE_POSIX_CPU_TIMERS_TASK_WORK
+ select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_RSEQ
select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7 && !KASAN
diff --git a/arch/arm/arm-soc-for-next-contents.txt b/arch/arm/arm-soc-for-next-contents.txt
new file mode 100644
index 000000000000..2f1c655335b5
--- /dev/null
+++ b/arch/arm/arm-soc-for-next-contents.txt
@@ -0,0 +1,22 @@
+soc/arm
+
+soc/dt
+
+soc/drivers
+
+soc/defconfig
+
+soc/late
+
+arm/fixes
+ <no branch> (cfc1e9a543e3589ba200795b6e7fd8ef4314efdf)
+ git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux tags/socfpga_fix_for_v7.3
+ socfpga/fix
+ git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux tags/socfpga_dts_fix_for_v7.3
+ renesas/fixes
+ git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel tags/renesas-fixes-for-v7.3-tag1
+ scmi/fixes
+ git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux tags/scmi-ffa-fixes-7.3
+ <no branch> (406292fd75f95aa3010fec95b5beb5a8b7e3ba3a)
+ https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux tags/amlogic-fixes-v7.3-rc
+
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 8dd17d20faa3..982795cf4563 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -44,6 +44,13 @@
#define LIBRARY_TEXT_START 0x0c000000
#ifndef __ASSEMBLY__
+extern void __pte_error(const char *file, int line, pte_t);
+extern void __pmd_error(const char *file, int line, pmd_t);
+extern void __pgd_error(const char *file, int line, pgd_t);
+
+#define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte)
+#define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd)
+#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd)
/*
* This is the lowest virtual address we can permit any user space
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index ad04c806cc9d..afbd2ebe5c39 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -753,6 +753,23 @@ void __readwrite_bug(const char *fn)
}
EXPORT_SYMBOL(__readwrite_bug);
+#ifdef CONFIG_MMU
+void __pte_error(const char *file, int line, pte_t pte)
+{
+ pr_err("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte));
+}
+
+void __pmd_error(const char *file, int line, pmd_t pmd)
+{
+ pr_err("%s:%d: bad pmd %08llx.\n", file, line, (long long)pmd_val(pmd));
+}
+
+void __pgd_error(const char *file, int line, pgd_t pgd)
+{
+ pr_err("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd));
+}
+#endif
+
asmlinkage void __div0(void)
{
pr_err("Division by zero in kernel.\n");
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 54c344d39830..bf8c3f54afad 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -81,6 +81,7 @@ config ARM64
select ARCH_HAS_PTE_PROTNONE
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
select ARCH_SUPPORTS_RT
select ARCH_SUPPORTS_SCHED_SMT
@@ -220,6 +221,7 @@ config ARM64
select HAVE_RELIABLE_STACKTRACE
select HAVE_POSIX_CPU_TIMERS_TASK_WORK
select HAVE_FUNCTION_ARG_ACCESS_API
+ select MMU_GATHER_RCU_TABLE_FREE
select HAVE_RSEQ
select HAVE_RUST if RUSTC_SUPPORTS_ARM64
select HAVE_STACKPROTECTOR
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 719e111bc3dd..8f3f1c0579a0 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -762,8 +762,9 @@
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_A>,
<&clkc_periphs CLKID_SD_EMMC_A>,
- <&scmi_clk CLKID_FCLK_DIV2>;
- clock-names = "core", "clkin0", "clkin1";
+ <&scmi_clk CLKID_FCLK_DIV2>,
+ <&clkc_periphs CLKID_SYS_AMPIPE_NAND>;
+ clock-names = "core", "clkin0", "clkin1", "pipeline";
resets = <&reset RESET_SD_EMMC_A>;
assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_A_SEL>;
assigned-clock-parents = <&xtal>;
@@ -776,8 +777,9 @@
interrupts = <GIC_SPI 177 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_B>,
<&clkc_periphs CLKID_SD_EMMC_B>,
- <&scmi_clk CLKID_FCLK_DIV2>;
- clock-names = "core", "clkin0", "clkin1";
+ <&scmi_clk CLKID_FCLK_DIV2>,
+ <&clkc_periphs CLKID_SYS_AMPIPE_NAND>;
+ clock-names = "core", "clkin0", "clkin1", "pipeline";
resets = <&reset RESET_SD_EMMC_B>;
assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_B_SEL>;
assigned-clock-parents = <&xtal>;
@@ -790,8 +792,9 @@
interrupts = <GIC_SPI 178 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_C>,
<&clkc_periphs CLKID_SD_EMMC_C>,
- <&scmi_clk CLKID_FCLK_DIV2>;
- clock-names = "core", "clkin0", "clkin1";
+ <&scmi_clk CLKID_FCLK_DIV2>,
+ <&clkc_periphs CLKID_SYS_AMPIPE_NAND>;
+ clock-names = "core", "clkin0", "clkin1", "pipeline";
resets = <&reset RESET_SD_EMMC_C>;
assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_C_SEL>;
assigned-clock-parents = <&xtal>;
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
index 637e5567c1e0..70c693fd0c52 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -140,6 +140,19 @@
tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>;
};
+
+ reserved-memory {
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ no-map;
+ record-size = <0x2000>;
+ console-size = <0x8000>;
+ ftrace-size = <0x2000>;
+ pmsg-size = <0x2000>;
+ ecc-size = <16>;
+ };
+ };
};
&cpu_thermal {
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index 0ff69dae45d3..75f59407794f 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -66,6 +66,19 @@
regulator-always-on;
};
+ reserved-memory {
+ ramoops@42f00000 {
+ compatible = "ramoops";
+ reg = <0 0x42f00000 0 0x100000>;
+ no-map;
+ record-size = <0x20000>;
+ console-size = <0x40000>;
+ ftrace-size = <0x10000>;
+ pmsg-size = <0x10000>;
+ ecc-size = <16>;
+ };
+ };
+
/* SFP1 cage (WAN) */
sfp1: sfp1 {
compatible = "sff,sfp";
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 766c5cb32f54..6b0fce265320 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -322,7 +322,7 @@ struct kvm_arch {
* Stage 2 paging state for VMs with nested S2 using a virtual
* VMID.
*/
- struct kvm_s2_mmu *nested_mmus;
+ struct kvm_s2_mmu **nested_mmus;
size_t nested_mmus_size;
int nested_mmus_next;
diff --git a/arch/arm64/include/asm/kvm_nested.h b/arch/arm64/include/asm/kvm_nested.h
index 1ed708335809..586026e85903 100644
--- a/arch/arm64/include/asm/kvm_nested.h
+++ b/arch/arm64/include/asm/kvm_nested.h
@@ -66,7 +66,8 @@ static inline u64 translate_ttbr0_el2_to_ttbr0_el1(u64 ttbr0)
extern bool forward_smc_trap(struct kvm_vcpu *vcpu);
extern bool forward_debug_exception(struct kvm_vcpu *vcpu);
-extern void kvm_init_nested(struct kvm *kvm);
+extern int kvm_init_nested(struct kvm *kvm);
+extern void kvm_destroy_nested(struct kvm *kvm);
extern int kvm_vcpu_init_nested(struct kvm_vcpu *vcpu);
extern void kvm_init_nested_s2_mmu(struct kvm_s2_mmu *mmu);
extern struct kvm_s2_mmu *lookup_s2_mmu(struct kvm_vcpu *vcpu);
diff --git a/arch/arm64/include/asm/kvm_pkvm.h b/arch/arm64/include/asm/kvm_pkvm.h
index beea00e693a0..cad60569f061 100644
--- a/arch/arm64/include/asm/kvm_pkvm.h
+++ b/arch/arm64/include/asm/kvm_pkvm.h
@@ -65,8 +65,7 @@ static inline bool kvm_pkvm_ioctl_allowed(struct kvm *kvm, unsigned int ioctl)
int r;
r = kvm_get_cap_for_kvm_ioctl(ioctl, &ext);
-
- if (WARN_ON_ONCE(r < 0))
+ if (r < 0)
return false;
return kvm_pkvm_ext_allowed(kvm, ext);
diff --git a/arch/arm64/include/asm/mte.h b/arch/arm64/include/asm/mte.h
index 83f3b05fc784..7f7b97e09996 100644
--- a/arch/arm64/include/asm/mte.h
+++ b/arch/arm64/include/asm/mte.h
@@ -23,7 +23,9 @@ unsigned long mte_copy_tags_from_user(void *to, const void __user *from,
unsigned long n);
unsigned long mte_copy_tags_to_user(void __user *to, void *from,
unsigned long n);
+int mte_save_tags(struct page *page);
void mte_save_page_tags(const void *page_addr, void *tag_storage);
+void mte_restore_tags(swp_entry_t entry, struct page *page);
void mte_restore_page_tags(void *page_addr, const void *tag_storage);
void mte_invalidate_tags(int type, pgoff_t offset);
void mte_invalidate_tags_area(int type);
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e89ec5f4787b..6000905a2e86 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -107,6 +107,9 @@ static inline void arch_leave_lazy_mmu_mode(void)
__flush_tlb_range(vma, address, address + PMD_SIZE, PMD_SIZE, 2, \
TLBF_NOBROADCAST | TLBF_NONOTIFY | TLBF_NOWALKCACHE)
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %016llx.\n", __FILE__, __LINE__, pte_val(e))
+
#ifdef CONFIG_ARM64_PA_BITS_52
static inline phys_addr_t __pte_to_phys(pte_t pte)
{
@@ -863,6 +866,9 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
#if CONFIG_PGTABLE_LEVELS > 2
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
+
#define pud_none(pud) (!pud_val(pud))
#define pud_bad(pud) ((pud_val(pud) & PUD_TYPE_MASK) != \
PUD_TYPE_TABLE)
@@ -954,6 +960,9 @@ static inline bool mm_pud_folded(const struct mm_struct *mm)
}
#define mm_pud_folded mm_pud_folded
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %016llx.\n", __FILE__, __LINE__, pud_val(e))
+
#define p4d_none(p4d) (pgtable_l4_enabled() && !p4d_val(p4d))
#define p4d_bad(p4d) (pgtable_l4_enabled() && \
((p4d_val(p4d) & P4D_TYPE_MASK) != \
@@ -1079,6 +1088,9 @@ static inline bool mm_p4d_folded(const struct mm_struct *mm)
}
#define mm_p4d_folded mm_p4d_folded
+#define p4d_ERROR(e) \
+ pr_err("%s:%d: bad p4d %016llx.\n", __FILE__, __LINE__, p4d_val(e))
+
#define pgd_none(pgd) (pgtable_l5_enabled() && !pgd_val(pgd))
#define pgd_bad(pgd) (pgtable_l5_enabled() && \
((pgd_val(pgd) & PGD_TYPE_MASK) != \
@@ -1205,6 +1217,9 @@ p4d_t *p4d_offset_lockless_folded(pgd_t *pgdp, pgd_t pgd, unsigned long addr)
#endif /* CONFIG_PGTABLE_LEVELS > 4 */
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %016llx.\n", __FILE__, __LINE__, pgd_val(e))
+
#define pgd_set_fixmap(addr) ((pgd_t *)set_fixmap_offset(FIX_PGD, addr))
#define pgd_clear_fixmap() clear_fixmap(FIX_PGD)
diff --git a/arch/arm64/include/asm/set_memory.h b/arch/arm64/include/asm/set_memory.h
index 0091ba12200e..90f61b17275e 100644
--- a/arch/arm64/include/asm/set_memory.h
+++ b/arch/arm64/include/asm/set_memory.h
@@ -11,8 +11,9 @@ bool can_set_direct_map(void);
int set_memory_valid(unsigned long addr, int numpages, int enable);
-int set_direct_map_invalid_noflush(struct page *page, unsigned int numpages);
-int set_direct_map_default_noflush(struct page *page, unsigned int numpages);
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_default_noflush(struct page *page);
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid);
bool kernel_page_present(struct page *page);
int set_memory_encrypted(unsigned long addr, int numpages);
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 89325827cc34..d0b1eff2fc35 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -236,8 +236,6 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
mutex_unlock(&kvm->lock);
#endif
- kvm_init_nested(kvm);
-
ret = kvm_share_hyp(kvm, kvm + 1);
if (ret)
return ret;
@@ -252,6 +250,10 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
if (ret)
goto err_free_cpumask;
+ ret = kvm_init_nested(kvm);
+ if (ret)
+ goto err_uninit_mmu;
+
if (is_protected_kvm_enabled()) {
/*
* If any failures occur after this is successful, make sure to
@@ -280,6 +282,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
err_uninit_mmu:
kvm_uninit_stage2_mmu(kvm);
+ kvm_destroy_nested(kvm);
err_free_cpumask:
free_cpumask_var(kvm->arch.supported_cpus);
err_unshare_kvm:
@@ -337,6 +340,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
kvm_unshare_hyp(kvm, kvm + 1);
+ kvm_destroy_nested(kvm);
kvm_arm_teardown_hypercalls(kvm);
}
diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c
index 625604019fb3..3806ff0920fe 100644
--- a/arch/arm64/kvm/emulate-nested.c
+++ b/arch/arm64/kvm/emulate-nested.c
@@ -1445,7 +1445,7 @@ static const struct encoding_to_trap_config encoding_to_fgt[] __initconst = {
SR_FGT(OP_AT_S1E1A, HFGITR, ATS1E1A, 1),
SR_FGT(OP_COSP_RCTX, HFGITR, COSPRCTX, 1),
SR_FGT(OP_GCSPUSHX, HFGITR, nGCSEPP, 0),
- SR_FGT(OP_GCSPOPX, HFGITR, nGCSEPP, 0),
+ SR_FGT(OP_GCSPOPCX, HFGITR, nGCSEPP, 0),
SR_FGT(OP_GCSPUSHM, HFGITR, nGCSPUSHM_EL1, 0),
SR_FGT(OP_BRB_IALL, HFGITR, nBRBIALL, 0),
SR_FGT(OP_BRB_INJ, HFGITR, nBRBINJ, 0),
diff --git a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
index 29935c7da1de..ec85a9547120 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
@@ -52,8 +52,10 @@ int __pkvm_host_test_clear_young_guest(u64 gfn, u64 nr_pages, bool mkold, struct
int __pkvm_host_mkyoung_guest(u64 gfn, struct pkvm_hyp_vcpu *vcpu);
bool addr_is_memory(phys_addr_t phys);
+bool addr_is_hyp_text(phys_addr_t phys);
int host_stage2_idmap_locked(phys_addr_t addr, u64 size, enum kvm_pgtable_prot prot);
int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id);
+bool host_stage2_pte_is_hyp_owned(kvm_pte_t pte);
int kvm_host_prepare_stage2(void *pgt_pool_base);
int kvm_guest_prepare_stage2(struct pkvm_hyp_vm *vm, void *pgd);
void kvm_guest_destroy_stage2(struct pkvm_hyp_vm *vm);
diff --git a/arch/arm64/kvm/hyp/include/nvhe/mm.h b/arch/arm64/kvm/hyp/include/nvhe/mm.h
index 6e83ce35c2f2..31cae95ddb71 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/mm.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/mm.h
@@ -29,6 +29,7 @@ int __pkvm_create_private_mapping(phys_addr_t phys, size_t size,
enum kvm_pgtable_prot prot,
unsigned long *haddr);
int pkvm_create_stack(phys_addr_t phys, unsigned long *haddr);
+int pkvm_check_host_ownership(void);
int pkvm_alloc_private_va_range(size_t size, unsigned long *haddr);
#endif /* __KVM_HYP_MM_H */
diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
index 39aa8911f62c..a6a47c1e058b 100644
--- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c
+++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
@@ -450,6 +450,14 @@ bool addr_is_memory(phys_addr_t phys)
return !!find_mem_range(phys, &range);
}
+bool addr_is_hyp_text(phys_addr_t phys)
+{
+ phys_addr_t start = ALIGN_DOWN(__hyp_pa(__hyp_text_start), PAGE_SIZE);
+ phys_addr_t end = PAGE_ALIGN(__hyp_pa(__hyp_text_end));
+
+ return phys >= start && phys < end;
+}
+
static bool is_in_mem_range(u64 addr, struct kvm_mem_range *range)
{
return range->start <= addr && addr < range->end;
@@ -633,6 +641,18 @@ int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id)
return ret;
}
+bool host_stage2_pte_is_hyp_owned(kvm_pte_t pte)
+{
+ if (kvm_pte_valid(pte))
+ return false;
+
+ if (FIELD_GET(KVM_INVALID_PTE_TYPE_MASK, pte) !=
+ KVM_HOST_INVALID_PTE_TYPE_DONATION)
+ return false;
+
+ return FIELD_GET(KVM_HOST_DONATION_PTE_OWNER_MASK, pte) == PKVM_ID_HYP;
+}
+
#define KVM_HOST_PTE_OWNER_GUEST_HANDLE_MASK GENMASK(15, 0)
/* We need 40 bits for the GFN to cover a 52-bit IPA with 4k pages and LPA2 */
#define KVM_HOST_PTE_OWNER_GUEST_GFN_MASK GENMASK(55, 16)
diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c
index 3b0bee496bff..29ab5ee9d57f 100644
--- a/arch/arm64/kvm/hyp/nvhe/mm.c
+++ b/arch/arm64/kvm/hyp/nvhe/mm.c
@@ -25,6 +25,7 @@ struct memblock_region hyp_memory[HYP_MEMBLOCK_REGIONS];
unsigned int hyp_memblock_nr;
static u64 __io_map_base;
+static u64 __io_map_next;
struct hyp_fixmap_slot {
u64 addr;
@@ -50,7 +51,7 @@ static int __pkvm_alloc_private_va_range(unsigned long start, size_t size)
hyp_assert_lock_held(&pkvm_pgd_lock);
- if (!start || start < __io_map_base)
+ if (!start || start < __io_map_next)
return -EINVAL;
/* The allocated size is always a multiple of PAGE_SIZE */
@@ -60,7 +61,7 @@ static int __pkvm_alloc_private_va_range(unsigned long start, size_t size)
if (cur > __hyp_vmemmap)
return -ENOMEM;
- __io_map_base = cur;
+ __io_map_next = cur;
return 0;
}
@@ -70,7 +71,7 @@ static int __pkvm_alloc_private_va_range(unsigned long start, size_t size)
* @size: The size of the VA range to reserve.
* @haddr: The hypervisor virtual start address of the allocation.
*
- * The private virtual address (VA) range is allocated above __io_map_base
+ * The private virtual address (VA) range is allocated above __io_map_next
* and aligned based on the order of @size.
*
* Return: 0 on success or negative error code on failure.
@@ -81,7 +82,7 @@ int pkvm_alloc_private_va_range(size_t size, unsigned long *haddr)
int ret;
hyp_spin_lock(&pkvm_pgd_lock);
- addr = __io_map_base;
+ addr = __io_map_next;
ret = __pkvm_alloc_private_va_range(addr, size);
hyp_spin_unlock(&pkvm_pgd_lock);
@@ -341,7 +342,7 @@ static int create_fixblock(void)
return -EINVAL;
hyp_spin_lock(&pkvm_pgd_lock);
- addr = ALIGN(__io_map_base, PMD_SIZE);
+ addr = ALIGN(__io_map_next, PMD_SIZE);
ret = __pkvm_alloc_private_va_range(addr, PMD_SIZE);
if (ret)
goto unlock;
@@ -426,6 +427,7 @@ int hyp_create_idmap(u32 hyp_va_bits)
*/
__io_map_base = start & BIT(hyp_va_bits - 2);
__io_map_base ^= BIT(hyp_va_bits - 2);
+ __io_map_next = __io_map_base;
__hyp_vmemmap = __io_map_base | BIT(hyp_va_bits - 3);
return __pkvm_create_mappings(start, end - start, start, PAGE_HYP_EXEC);
@@ -433,19 +435,19 @@ int hyp_create_idmap(u32 hyp_va_bits)
int pkvm_create_stack(phys_addr_t phys, unsigned long *haddr)
{
- unsigned long addr, prev_base;
+ unsigned long addr, prev_next;
size_t size;
int ret;
hyp_spin_lock(&pkvm_pgd_lock);
- prev_base = __io_map_base;
+ prev_next = __io_map_next;
/*
* Efficient stack verification using the NVHE_STACK_SHIFT bit implies
* an alignment of our allocation on the order of the size.
*/
size = NVHE_STACK_SIZE * 2;
- addr = ALIGN(__io_map_base, size);
+ addr = ALIGN(__io_map_next, size);
ret = __pkvm_alloc_private_va_range(addr, size);
if (!ret) {
@@ -461,7 +463,7 @@ int pkvm_create_stack(phys_addr_t phys, unsigned long *haddr)
ret = kvm_pgtable_hyp_map(&pkvm_pgtable, addr + NVHE_STACK_SIZE,
NVHE_STACK_SIZE, phys, PAGE_HYP);
if (ret)
- __io_map_base = prev_base;
+ __io_map_next = prev_next;
}
hyp_spin_unlock(&pkvm_pgd_lock);
@@ -470,6 +472,65 @@ int pkvm_create_stack(phys_addr_t phys, unsigned long *haddr)
return ret;
}
+static int check_page_ownership(phys_addr_t phys)
+{
+ kvm_pte_t pte;
+ bool host_ok;
+ int ret;
+
+ if (addr_is_memory(phys)) {
+ struct hyp_page *page = hyp_phys_to_page(phys);
+
+ if (get_hyp_state(page) != PKVM_PAGE_OWNED ||
+ get_host_state(page) != PKVM_NOPAGE)
+ return -EPERM;
+ }
+
+ ret = kvm_pgtable_get_leaf(&host_mmu.pgt, phys, &pte, NULL);
+ if (ret)
+ return ret;
+
+ /* Hyp text may stay host-readable, see fix_host_ownership_walker(). */
+ if (kvm_pte_valid(pte) && addr_is_hyp_text(phys))
+ host_ok = !(kvm_pgtable_stage2_pte_prot(pte) & KVM_PGTABLE_PROT_W);
+ else
+ host_ok = host_stage2_pte_is_hyp_owned(pte);
+
+ return host_ok ? 0 : -EPERM;
+}
+
+static int check_host_ownership_walker(const struct kvm_pgtable_visit_ctx *ctx,
+ enum kvm_pgtable_walk_flags visit)
+{
+ phys_addr_t phys, end;
+ int ret;
+
+ if (!kvm_pte_valid(ctx->old))
+ return 0;
+
+ phys = kvm_pte_to_phys(ctx->old);
+ end = phys + kvm_granule_size(ctx->level);
+ for (; phys < end; phys += PAGE_SIZE) {
+ ret = check_page_ownership(phys);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
+int pkvm_check_host_ownership(void)
+{
+ struct kvm_pgtable_walker walker = {
+ .cb = check_host_ownership_walker,
+ .flags = KVM_PGTABLE_WALK_LEAF,
+ };
+
+ /* The private range and the vmemmap share one quarter of the VA space. */
+ return kvm_pgtable_walk(&pkvm_pgtable, __io_map_base,
+ BIT(pkvm_pgtable.ia_bits - 2), &walker);
+}
+
static void *admit_host_page(void *arg)
{
struct kvm_hyp_memcache *host_mc = arg;
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index 5cdb0318fa7b..1151a4aafbeb 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -360,7 +360,7 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
if (test_bit(KVM_ARCH_FLAG_WRITABLE_IMP_ID_REGS, &host_arch_flags))
hyp_vm->kvm.arch.midr_el1 = host_kvm->arch.midr_el1;
- return;
+ goto out;
}
if (kvm_pkvm_ext_allowed(kvm, KVM_CAP_ARM_MTE))
@@ -379,13 +379,14 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
if (kvm_pkvm_ext_allowed(kvm, KVM_CAP_ARM_PTRAUTH_GENERIC))
set_bit(KVM_ARM_VCPU_PTRAUTH_GENERIC, allowed_features);
- if (kvm_pkvm_ext_allowed(kvm, KVM_CAP_ARM_SVE)) {
+ if (kvm_pkvm_ext_allowed(kvm, KVM_CAP_ARM_SVE))
set_bit(KVM_ARM_VCPU_SVE, allowed_features);
- kvm->arch.flags |= host_arch_flags & BIT(KVM_ARCH_FLAG_GUEST_HAS_SVE);
- }
bitmap_and(kvm->arch.vcpu_features, host_kvm->arch.vcpu_features,
allowed_features, KVM_VCPU_MAX_FEATURES);
+out:
+ __assign_bit(KVM_ARCH_FLAG_GUEST_HAS_SVE, &kvm->arch.flags,
+ kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_SVE));
}
static void unpin_host_vcpu(struct kvm_vcpu *host_vcpu)
@@ -398,10 +399,10 @@ static void unpin_host_sve_state(struct pkvm_hyp_vcpu *hyp_vcpu)
{
void *sve_state;
- if (!vcpu_has_feature(&hyp_vcpu->vcpu, KVM_ARM_VCPU_SVE))
+ sve_state = hyp_vcpu->vcpu.arch.sve_state;
+ if (!sve_state)
return;
- sve_state = hyp_vcpu->vcpu.arch.sve_state;
hyp_unpin_shared_mem(sve_state,
sve_state + vcpu_sve_state_size(&hyp_vcpu->vcpu));
}
@@ -450,7 +451,7 @@ static int pkvm_vcpu_init_sve(struct pkvm_hyp_vcpu *hyp_vcpu, struct kvm_vcpu *h
unsigned int sve_max_vl;
size_t sve_state_size;
void *sve_state;
- int ret = 0;
+ int ret;
if (!vcpu_has_feature(vcpu, KVM_ARM_VCPU_SVE)) {
vcpu_clear_flag(vcpu, VCPU_SVE_FINALIZED);
@@ -459,25 +460,21 @@ static int pkvm_vcpu_init_sve(struct pkvm_hyp_vcpu *hyp_vcpu, struct kvm_vcpu *h
/* Limit guest vector length to the maximum supported by the host. */
sve_max_vl = min(READ_ONCE(host_vcpu->arch.sve_max_vl), kvm_host_sve_max_vl);
- sve_state_size = sve_state_size_from_vl(sve_max_vl);
sve_state = kern_hyp_va(READ_ONCE(host_vcpu->arch.sve_state));
- if (!sve_state || !sve_state_size) {
- ret = -EINVAL;
- goto err;
- }
+ if (!sve_vl_valid(sve_max_vl) || !sve_state)
+ return -EINVAL;
+
+ sve_state_size = sve_state_size_from_vl(sve_max_vl);
ret = hyp_pin_shared_mem(sve_state, sve_state + sve_state_size);
if (ret)
- goto err;
+ return ret;
vcpu->arch.sve_state = sve_state;
vcpu->arch.sve_max_vl = sve_max_vl;
return 0;
-err:
- clear_bit(KVM_ARM_VCPU_SVE, vcpu->kvm->arch.vcpu_features);
- return ret;
}
static int vm_copy_id_regs(struct pkvm_hyp_vcpu *hyp_vcpu)
diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
index 75b00c323310..45ac5f2ba4f7 100644
--- a/arch/arm64/kvm/hyp/nvhe/setup.c
+++ b/arch/arm64/kvm/hyp/nvhe/setup.c
@@ -217,7 +217,7 @@ static int fix_host_ownership_walker(const struct kvm_pgtable_visit_ctx *ctx,
case PKVM_PAGE_OWNED:
set_hyp_state(page, PKVM_PAGE_OWNED);
/* hyp text is RO in the host stage-2 to be inspected on panic. */
- if (prot == PAGE_HYP_EXEC) {
+ if (addr_is_hyp_text(phys)) {
set_host_state(page, PKVM_NOPAGE);
return host_stage2_idmap_locked(phys, PAGE_SIZE, KVM_PGTABLE_PROT_R);
} else {
@@ -269,6 +269,16 @@ static int fix_host_ownership(void)
return ret;
}
+ /* The stacks sit in the private VA range, not the linear map. */
+ for (i = 0; i < hyp_nr_cpus; i++) {
+ struct kvm_nvhe_init_params *params = per_cpu_ptr(&kvm_init_params, i);
+ u64 start = params->stack_hyp_va - NVHE_STACK_SIZE;
+
+ ret = kvm_pgtable_walk(&pkvm_pgtable, start, NVHE_STACK_SIZE, &walker);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
@@ -324,6 +334,10 @@ void __noreturn __pkvm_init_finalise(void)
if (ret)
goto out;
+ ret = pkvm_check_host_ownership();
+ if (ret)
+ goto out;
+
ret = hyp_ffa_init(ffa_proxy_pages);
if (ret)
goto out;
diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c
index b11b8821c9fb..dfa25bb6f25d 100644
--- a/arch/arm64/kvm/hypercalls.c
+++ b/arch/arm64/kvm/hypercalls.c
@@ -185,7 +185,8 @@ static int kvm_smccc_set_filter(struct kvm *kvm, struct kvm_smccc_filter __user
start = filter.base;
end = start + filter.nr_functions - 1;
- if (end < start || filter.action >= NR_SMCCC_FILTER_ACTIONS)
+ if (!filter.nr_functions || end < start ||
+ filter.action >= NR_SMCCC_FILTER_ACTIONS)
return -EINVAL;
mutex_lock(&kvm->arch.config_lock);
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index d57f8181f1b7..df48df8d8980 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -59,27 +59,36 @@ static phys_addr_t stage2_range_addr_end(phys_addr_t addr, phys_addr_t end)
* long will also starve other vCPUs. We have to also make sure that the page
* tables are not freed while we released the lock.
*/
-static int stage2_apply_range(struct kvm_s2_mmu *mmu, phys_addr_t addr,
+static int stage2_apply_range(struct kvm_s2_mmu *mmu, phys_addr_t start,
phys_addr_t end,
int (*fn)(struct kvm_pgtable *, u64, u64),
bool resched)
{
struct kvm *kvm = kvm_s2_mmu_to_kvm(mmu);
+ bool lock_dropped = false;
+ phys_addr_t addr = start;
int ret;
u64 next;
do {
struct kvm_pgtable *pgt = mmu->pgt;
+ /*
+ * We may be raced on PGT teardown when we release the
+ * kvm->mmu_lock. That's fine as the PGT is legitimately no
+ * longer present.
+ */
if (!pgt)
- return -EINVAL;
+ return lock_dropped ? 0 : -EINVAL;
next = stage2_range_addr_end(addr, end);
ret = fn(pgt, addr, next - addr);
if (ret)
break;
- if (resched && next != end)
+ if (resched && next != end) {
cond_resched_rwlock_write(&kvm->mmu_lock);
+ lock_dropped = true;
+ }
} while (addr = next, addr != end);
return ret;
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index 68acedc526c4..cb88eea3438d 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -45,11 +45,24 @@ struct vncr_tlb {
*/
#define S2_MMU_PER_VCPU 2
-void kvm_init_nested(struct kvm *kvm)
+int kvm_init_nested(struct kvm *kvm)
{
- kvm->arch.nested_mmus = NULL;
+ kvm->arch.nested_mmus = kvmalloc_objs(struct kvm_s2_mmu *,
+ KVM_MAX_VCPUS * S2_MMU_PER_VCPU,
+ GFP_KERNEL_ACCOUNT);
kvm->arch.nested_mmus_size = 0;
atomic_set(&kvm->arch.vncr_tlb_count, 0);
+
+ return kvm->arch.nested_mmus ? 0 : -ENOMEM;
+}
+
+void kvm_destroy_nested(struct kvm *kvm)
+{
+ for (int i = 0; i < kvm->arch.nested_mmus_size; i+= S2_MMU_PER_VCPU)
+ kvfree(kvm->arch.nested_mmus[i]);
+
+ kvm->arch.nested_mmus_size = 0;
+ kvfree(kvm->arch.nested_mmus);
}
static int init_nested_s2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu)
@@ -70,8 +83,9 @@ static int init_nested_s2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu)
int kvm_vcpu_init_nested(struct kvm_vcpu *vcpu)
{
struct kvm *kvm = vcpu->kvm;
- struct kvm_s2_mmu *tmp;
- int num_mmus, ret = 0;
+ int num_mmus;
+
+ lockdep_assert_held(&kvm->arch.config_lock);
if (test_bit(KVM_ARM_VCPU_HAS_EL2_E2H0, kvm->arch.vcpu_features) &&
!cpus_have_final_cap(ARM64_HAS_HCR_NV1))
@@ -84,51 +98,40 @@ int kvm_vcpu_init_nested(struct kvm_vcpu *vcpu)
if (!vcpu->arch.ctxt.vncr_array)
return -ENOMEM;
- /*
- * Let's treat memory allocation failures as benign: If we fail to
- * allocate anything, return an error and keep the allocated array
- * alive. Userspace may try to recover by initializing the vcpu
- * again, and there is no reason to affect the whole VM for this.
- */
num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
if (num_mmus > kvm->arch.nested_mmus_size) {
- tmp = kvzalloc_objs(*tmp, num_mmus, GFP_KERNEL_ACCOUNT);
- if (!tmp)
- return -ENOMEM;
+ struct kvm_s2_mmu *tmp;
+ int i, ret = 0;
- write_lock(&kvm->mmu_lock);
-
- if (kvm->arch.nested_mmus_size) {
- memcpy(tmp, kvm->arch.nested_mmus,
- size_mul(sizeof(*tmp), kvm->arch.nested_mmus_size));
+ tmp = kvzalloc_objs(*tmp, S2_MMU_PER_VCPU, GFP_KERNEL_ACCOUNT);
+ if (!tmp)
+ ret = -ENOMEM;
- for (int i = 0; i < kvm->arch.nested_mmus_size; i++)
- tmp[i].pgt->mmu = &tmp[i];
+ for (i = 0; !ret && i < S2_MMU_PER_VCPU; i++) {
+ ret = init_nested_s2_mmu(kvm, &tmp[i]);
+ if (ret)
+ break;
}
- swap(kvm->arch.nested_mmus, tmp);
-
- write_unlock(&kvm->mmu_lock);
-
- kvfree(tmp);
- }
+ if (ret) {
+ while (--i >= 0)
+ kvm_free_stage2_pgd(&tmp[i]);
- for (int i = kvm->arch.nested_mmus_size; !ret && i < num_mmus; i++)
- ret = init_nested_s2_mmu(kvm, &kvm->arch.nested_mmus[i]);
+ kvfree(tmp);
+ free_page((unsigned long)vcpu->arch.ctxt.vncr_array);
+ vcpu->arch.ctxt.vncr_array = NULL;
+ return ret;
+ }
- if (ret) {
- for (int i = kvm->arch.nested_mmus_size; i < num_mmus; i++)
- kvm_free_stage2_pgd(&kvm->arch.nested_mmus[i]);
+ guard(write_lock)(&kvm->mmu_lock);
- free_page((unsigned long)vcpu->arch.ctxt.vncr_array);
- vcpu->arch.ctxt.vncr_array = NULL;
+ for (i = 0; i < S2_MMU_PER_VCPU; i++)
+ kvm->arch.nested_mmus[i + kvm->arch.nested_mmus_size] = &tmp[i];
- return ret;
+ kvm->arch.nested_mmus_size += S2_MMU_PER_VCPU;
}
- kvm->arch.nested_mmus_size = num_mmus;
-
return 0;
}
@@ -742,7 +745,7 @@ void kvm_s2_mmu_iterate_by_vmid(struct kvm *kvm, u16 vmid,
write_lock(&kvm->mmu_lock);
for (int i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (!kvm_s2_mmu_valid(mmu))
continue;
@@ -784,7 +787,7 @@ struct kvm_s2_mmu *lookup_s2_mmu(struct kvm_vcpu *vcpu)
* if S2 translation is disabled.
*/
for (int i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (!kvm_s2_mmu_valid(mmu))
continue;
@@ -823,7 +826,7 @@ static struct kvm_s2_mmu *get_s2_mmu_nested(struct kvm_vcpu *vcpu)
for (i = kvm->arch.nested_mmus_next;
i < (kvm->arch.nested_mmus_size + kvm->arch.nested_mmus_next);
i++) {
- s2_mmu = &kvm->arch.nested_mmus[i % kvm->arch.nested_mmus_size];
+ s2_mmu = kvm->arch.nested_mmus[i % kvm->arch.nested_mmus_size];
if (atomic_read(&s2_mmu->refcnt) == 0)
break;
@@ -1260,6 +1263,17 @@ void kvm_handle_s1e2_tlbi(struct kvm_vcpu *vcpu, u32 inst, u64 val)
invalidate_vncr_va(vcpu->kvm, &scope);
}
+static void kvm_invalidate_vncr_ipa_all(struct kvm *kvm)
+{
+ struct kvm_pgtable *pgt = kvm->arch.mmu.pgt;
+
+ lockdep_assert_held_write(&kvm->mmu_lock);
+
+ /* if the mmu lock was dropped, pgt teardown may have raced. */
+ if (pgt)
+ kvm_invalidate_vncr_ipa(kvm, 0, BIT(pgt->ia_bits));
+}
+
void kvm_nested_s2_wp(struct kvm *kvm)
{
int i;
@@ -1270,13 +1284,13 @@ void kvm_nested_s2_wp(struct kvm *kvm)
return;
for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (kvm_s2_mmu_valid(mmu))
kvm_stage2_wp_range(mmu, 0, kvm_phys_size(mmu));
}
- kvm_invalidate_vncr_ipa(kvm, 0, BIT(kvm->arch.mmu.pgt->ia_bits));
+ kvm_invalidate_vncr_ipa_all(kvm);
}
void kvm_nested_s2_unmap(struct kvm *kvm, bool may_block)
@@ -1289,13 +1303,13 @@ void kvm_nested_s2_unmap(struct kvm *kvm, bool may_block)
return;
for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (kvm_s2_mmu_valid(mmu))
kvm_stage2_unmap_range(mmu, 0, kvm_phys_size(mmu), may_block);
}
- kvm_invalidate_vncr_ipa(kvm, 0, BIT(kvm->arch.mmu.pgt->ia_bits));
+ kvm_invalidate_vncr_ipa_all(kvm);
}
void kvm_nested_s2_flush(struct kvm *kvm)
@@ -1308,7 +1322,7 @@ void kvm_nested_s2_flush(struct kvm *kvm)
return;
for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (kvm_s2_mmu_valid(mmu))
kvm_stage2_flush_range(mmu, 0, kvm_phys_size(mmu));
@@ -1317,17 +1331,12 @@ void kvm_nested_s2_flush(struct kvm *kvm)
void kvm_arch_flush_shadow_all(struct kvm *kvm)
{
- int i;
-
- for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
- struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
+ for (int i = 0; i < kvm->arch.nested_mmus_size; i++) {
+ struct kvm_s2_mmu *mmu = kvm->arch.nested_mmus[i];
if (!WARN_ON(atomic_read(&mmu->refcnt)))
kvm_free_stage2_pgd(mmu);
}
- kvfree(kvm->arch.nested_mmus);
- kvm->arch.nested_mmus = NULL;
- kvm->arch.nested_mmus_size = 0;
kvm_uninit_stage2_mmu(kvm);
}
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 9ceecb45995a..be0f19856e85 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -1658,7 +1658,7 @@ static void vgic_mmio_write_its_baser(struct kvm *kvm,
unsigned long val)
{
const struct vgic_its_abi *abi = vgic_its_get_abi(its);
- u64 entry_size, table_type;
+ u64 old, entry_size, table_type;
u64 reg, *regptr, clearbits = 0;
/* When GITS_CTLR.Enable is 1, we ignore write accesses. */
@@ -1681,7 +1681,9 @@ static void vgic_mmio_write_its_baser(struct kvm *kvm,
return;
}
- reg = update_64bit_reg(*regptr, addr & 7, len, val);
+ old = *regptr;
+
+ reg = update_64bit_reg(old, addr & 7, len, val);
reg &= ~GITS_BASER_RO_MASK;
reg &= ~clearbits;
@@ -1691,7 +1693,8 @@ static void vgic_mmio_write_its_baser(struct kvm *kvm,
*regptr = reg;
- if (!(reg & GITS_BASER_VALID)) {
+ /* The ITS driver rewrites an unchanged GITS_BASER<n> on resume. */
+ if (reg != old) {
/* Take the its_lock to prevent a race with a save/restore */
mutex_lock(&its->its_lock);
switch (table_type) {
@@ -1702,6 +1705,8 @@ static void vgic_mmio_write_its_baser(struct kvm *kvm,
vgic_its_free_collection_list(kvm, its);
break;
}
+ /* A concurrent injection may have cached a translation. */
+ vgic_its_invalidate_cache(its);
mutex_unlock(&its->its_lock);
}
}
@@ -2019,18 +2024,22 @@ out:
return ret;
}
-static u32 compute_next_devid_offset(struct list_head *h,
+static u32 compute_next_devid_offset(struct vgic_its *its, u64 baser,
struct its_device *dev)
{
- struct its_device *next;
- u32 next_offset;
+ struct its_device *next = dev;
- if (list_is_last(&dev->dev_list, h))
- return 0;
- next = list_next_entry(dev, dev_list);
- next_offset = next->device_id - dev->device_id;
+ /*
+ * Point at the next device vgic_its_save_device_tables() saves. It
+ * sorts device_list first, so the subtraction cannot underflow.
+ */
+ list_for_each_entry_continue(next, &its->device_list, dev_list) {
+ if (vgic_its_check_id(its, baser, next->device_id, NULL))
+ return min_t(u32, next->device_id - dev->device_id,
+ VITS_DTE_MAX_DEVID_OFFSET);
+ }
- return min_t(u32, next_offset, VITS_DTE_MAX_DEVID_OFFSET);
+ return 0;
}
static u32 compute_next_eventid_offset(struct list_head *h, struct its_ite *ite)
@@ -2271,17 +2280,18 @@ static int vgic_its_restore_itt(struct vgic_its *its, struct its_device *dev)
* vgic_its_save_dte - Save a device table entry at a given GPA
*
* @its: ITS handle
+ * @baser: GITS_BASER<dev> the caller is saving against
* @dev: ITS device
* @ptr: GPA
*/
-static int vgic_its_save_dte(struct vgic_its *its, struct its_device *dev,
- gpa_t ptr)
+static int vgic_its_save_dte(struct vgic_its *its, u64 baser,
+ struct its_device *dev, gpa_t ptr)
{
u64 val, itt_addr_field;
u32 next_offset;
itt_addr_field = dev->itt_addr >> 8;
- next_offset = compute_next_devid_offset(&its->device_list, dev);
+ next_offset = compute_next_devid_offset(its, baser, dev);
val = (1ULL << KVM_ITS_DTE_VALID_SHIFT |
((u64)next_offset << KVM_ITS_DTE_NEXT_SHIFT) |
(itt_addr_field << KVM_ITS_DTE_ITTADDR_SHIFT) |
@@ -2380,15 +2390,16 @@ static int vgic_its_save_device_tables(struct vgic_its *its)
int ret;
gpa_t eaddr;
+ /* Don't fail a save that userspace must be able to issue. */
if (!vgic_its_check_id(its, baser,
dev->device_id, &eaddr))
- return -EINVAL;
+ continue;
ret = vgic_its_save_itt(its, dev);
if (ret)
return ret;
- ret = vgic_its_save_dte(its, dev, eaddr);
+ ret = vgic_its_save_dte(its, baser, dev, eaddr);
if (ret)
return ret;
}
@@ -2541,9 +2552,6 @@ static int vgic_its_save_collection_table(struct vgic_its *its)
max_size = GITS_BASER_NR_PAGES(baser) * SZ_64K;
list_for_each_entry(collection, &its->collection_list, coll_list) {
- if (!vgic_its_check_id(its, baser, collection->collection_id, NULL))
- return -EINVAL;
-
ret = vgic_its_save_cte(its, collection, gpa);
if (ret)
return ret;
diff --git a/arch/arm64/mm/mteswap.c b/arch/arm64/mm/mteswap.c
index f64202b69309..63e8d72f202a 100644
--- a/arch/arm64/mm/mteswap.c
+++ b/arch/arm64/mm/mteswap.c
@@ -20,17 +20,22 @@ void mte_free_tag_storage(char *storage)
kfree(storage);
}
-static int mte_save_tags(swp_entry_t entry, struct page *page)
+int mte_save_tags(struct page *page)
{
void *tag_storage, *ret;
+ if (!page_mte_tagged(page))
+ return 0;
+
tag_storage = mte_allocate_tag_storage();
if (!tag_storage)
return -ENOMEM;
mte_save_page_tags(page_address(page), tag_storage);
- ret = xa_store(&mte_pages, entry.val, tag_storage, GFP_KERNEL);
+ /* lookup the swap entry.val from the page */
+ ret = xa_store(&mte_pages, page_swap_entry(page).val, tag_storage,
+ GFP_KERNEL);
if (WARN(xa_is_err(ret), "Failed to store MTE tags")) {
mte_free_tag_storage(tag_storage);
return xa_err(ret);
@@ -42,7 +47,7 @@ static int mte_save_tags(swp_entry_t entry, struct page *page)
return 0;
}
-static void mte_restore_tags(swp_entry_t entry, struct page *page)
+void mte_restore_tags(swp_entry_t entry, struct page *page)
{
void *tags = xa_load(&mte_pages, entry.val);
@@ -63,6 +68,13 @@ void mte_invalidate_tags(int type, pgoff_t offset)
mte_free_tag_storage(tags);
}
+static inline void __mte_invalidate_tags(struct page *page)
+{
+ swp_entry_t entry = page_swap_entry(page);
+
+ mte_invalidate_tags(swp_type(entry), swp_offset(entry));
+}
+
void mte_invalidate_tags_area(int type)
{
swp_entry_t entry = swp_entry(type, 0);
@@ -90,23 +102,15 @@ int arch_prepare_to_swap(struct folio *folio)
nr = folio_nr_pages(folio);
for (i = 0; i < nr; i++) {
- struct page *page = folio_page(folio, i);
-
- if (!page_mte_tagged(page))
- continue;
-
- err = mte_save_tags(folio_swap_entry(folio, i), page);
+ err = mte_save_tags(folio_page(folio, i));
if (err)
goto out;
}
return 0;
out:
- while (i--) {
- swp_entry_t swap = folio_swap_entry(folio, i);
-
- mte_invalidate_tags(swp_type(swap), swp_offset(swap));
- }
+ while (i--)
+ __mte_invalidate_tags(folio_page(folio, i));
return err;
}
diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
index 132938b32eb1..bbe98ac9ad8c 100644
--- a/arch/arm64/mm/pageattr.c
+++ b/arch/arm64/mm/pageattr.c
@@ -251,7 +251,7 @@ int set_memory_valid(unsigned long addr, int numpages, int enable)
__pgprot(PTE_PRESENT_VALID_KERNEL));
}
-int set_direct_map_invalid_noflush(struct page *page, unsigned int numpages)
+int set_direct_map_invalid_noflush(struct page *page)
{
pgprot_t clear_mask = __pgprot(PTE_PRESENT_VALID_KERNEL);
pgprot_t set_mask = __pgprot(PTE_PRESENT_INVALID);
@@ -260,10 +260,10 @@ int set_direct_map_invalid_noflush(struct page *page, unsigned int numpages)
return 0;
return update_range_prot((unsigned long)page_address(page),
- PAGE_SIZE * numpages, set_mask, clear_mask);
+ PAGE_SIZE, set_mask, clear_mask);
}
-int set_direct_map_default_noflush(struct page *page, unsigned int numpages)
+int set_direct_map_default_noflush(struct page *page)
{
pgprot_t set_mask = __pgprot(PTE_PRESENT_VALID_KERNEL | PTE_WRITE);
pgprot_t clear_mask = __pgprot(PTE_PRESENT_INVALID | PTE_RDONLY);
@@ -272,7 +272,7 @@ int set_direct_map_default_noflush(struct page *page, unsigned int numpages)
return 0;
return update_range_prot((unsigned long)page_address(page),
- PAGE_SIZE * numpages, set_mask, clear_mask);
+ PAGE_SIZE, set_mask, clear_mask);
}
static int __set_memory_enc_dec(unsigned long addr,
@@ -355,7 +355,23 @@ int realm_register_memory_enc_ops(void)
return arm64_mem_crypt_ops_register(&realm_crypt_ops);
}
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
+{
+ unsigned long addr = (unsigned long)page_address(page);
+
+ if (!can_set_direct_map())
+ return 0;
+
+ return set_memory_valid(addr, nr, valid);
+}
+
#ifdef CONFIG_DEBUG_PAGEALLOC
+/*
+ * This is - apart from the return value - doing the same
+ * thing as the new set_direct_map_valid_noflush() function.
+ *
+ * Unify? Explain the conceptual differences?
+ */
void __kernel_map_pages(struct page *page, int numpages, int enable)
{
if (!can_set_direct_map())
diff --git a/arch/csky/include/asm/pgtable.h b/arch/csky/include/asm/pgtable.h
index 5ca77ff89ef9..bafcd5823531 100644
--- a/arch/csky/include/asm/pgtable.h
+++ b/arch/csky/include/asm/pgtable.h
@@ -23,6 +23,10 @@
#define PTRS_PER_PMD 1
#define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t))
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
#define PFN_PTE_SHIFT PAGE_SHIFT
#define pmd_pfn(pmd) (pmd_phys(pmd) >> PAGE_SHIFT)
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
index 2fdb27afe703..27b269e2870d 100644
--- a/arch/hexagon/include/asm/pgtable.h
+++ b/arch/hexagon/include/asm/pgtable.h
@@ -94,6 +94,9 @@
#endif
/* Any bigger and the PTE disappears. */
+#define pgd_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__,\
+ pgd_val(e))
/*
* Page Protection Constants. Includes (in this variant) cache attributes.
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 0aad0004b010..c346a9229542 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -69,6 +69,7 @@ config LOONGARCH
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
select ARCH_HAS_PTE_PROTNONE if 64BIT
select ARCH_SUPPORTS_NUMA_BALANCING if NUMA
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_SUPPORTS_RT
select ARCH_SUPPORTS_SCHED_SMT if SMP
select ARCH_SUPPORTS_SCHED_MC if SMP
@@ -187,6 +188,7 @@ config LOONGARCH
select IRQ_LOONGARCH_CPU
select LOCK_MM_AND_FIND_VMA
select MMU_GATHER_MERGE_VMAS if MMU
+ select MMU_GATHER_RCU_TABLE_FREE
select MODULES_USE_ELF_RELA if MODULES
select NEED_PER_CPU_EMBED_FIRST_CHUNK
select NEED_PER_CPU_PAGE_FIRST_CHUNK
diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h
index cf29a4c8ac59..a05f6a4928dc 100644
--- a/arch/loongarch/include/asm/pgtable.h
+++ b/arch/loongarch/include/asm/pgtable.h
@@ -135,6 +135,19 @@ struct vm_area_struct;
#define ptep_get(ptep) READ_ONCE(*(ptep))
#define pmdp_get(pmdp) READ_ONCE(*(pmdp))
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
+#ifndef __PAGETABLE_PMD_FOLDED
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
+#endif
+#ifndef __PAGETABLE_PUD_FOLDED
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %016lx.\n", __FILE__, __LINE__, pud_val(e))
+#endif
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
+
extern pte_t invalid_pte_table[PTRS_PER_PTE];
#ifndef __PAGETABLE_PUD_FOLDED
diff --git a/arch/loongarch/include/asm/set_memory.h b/arch/loongarch/include/asm/set_memory.h
index 4bb01172fbc2..55dfaefd02c8 100644
--- a/arch/loongarch/include/asm/set_memory.h
+++ b/arch/loongarch/include/asm/set_memory.h
@@ -15,7 +15,8 @@ int set_memory_ro(unsigned long addr, int numpages);
int set_memory_rw(unsigned long addr, int numpages);
bool kernel_page_present(struct page *page);
-int set_direct_map_default_noflush(struct page *page, unsigned int nr);
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr);
+int set_direct_map_default_noflush(struct page *page);
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid);
#endif /* _ASM_LOONGARCH_SET_MEMORY_H */
diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index f801f7097f03..4b46c5d30708 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -197,15 +197,13 @@ void __init __set_fixmap(enum fixed_addresses idx,
phys_addr_t phys, pgprot_t flags)
{
unsigned long addr = __fix_to_virt(idx);
- char str[PTVAL_STR_MAX];
pte_t *ptep;
BUG_ON(idx <= FIX_HOLE || idx >= __end_of_fixed_addresses);
ptep = populate_kernel_pte(addr);
if (!pte_none(ptep_get(ptep))) {
- ptval_to_str(str, pte_val(*ptep));
- pr_err("unexpected set PTE at %lx in %s: %s\n", addr, __func__, str);
+ pte_ERROR(*ptep);
return;
}
diff --git a/arch/loongarch/mm/pageattr.c b/arch/loongarch/mm/pageattr.c
index a7dcff40f759..614ccc7afccb 100644
--- a/arch/loongarch/mm/pageattr.c
+++ b/arch/loongarch/mm/pageattr.c
@@ -198,22 +198,41 @@ bool kernel_page_present(struct page *page)
return pte_present(ptep_get(pte));
}
-int set_direct_map_default_noflush(struct page *page, unsigned int nr)
+int set_direct_map_default_noflush(struct page *page)
{
unsigned long addr = (unsigned long)page_address(page);
if (addr < vm_map_base)
return 0;
- return __set_memory(addr, nr, PAGE_KERNEL, __pgprot(0));
+ return __set_memory(addr, 1, PAGE_KERNEL, __pgprot(0));
}
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr)
+int set_direct_map_invalid_noflush(struct page *page)
{
unsigned long addr = (unsigned long)page_address(page);
if (addr < vm_map_base)
return 0;
- return __set_memory(addr, nr, __pgprot(0), __pgprot(_PAGE_PRESENT | _PAGE_VALID));
+ return __set_memory(addr, 1, __pgprot(0), __pgprot(_PAGE_PRESENT | _PAGE_VALID));
+}
+
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
+{
+ unsigned long addr = (unsigned long)page_address(page);
+ pgprot_t set, clear;
+
+ if (addr < vm_map_base)
+ return 0;
+
+ if (valid) {
+ set = PAGE_KERNEL;
+ clear = __pgprot(0);
+ } else {
+ set = __pgprot(0);
+ clear = __pgprot(_PAGE_PRESENT | _PAGE_VALID);
+ }
+
+ return __set_memory(addr, nr, set, clear);
}
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index eb84c3af92c0..11835eb59d94 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -29,7 +29,6 @@ config M68K
select HAVE_ARCH_LIBGCC_H
select HAVE_ARCH_SECCOMP
select HAVE_ARCH_SECCOMP_FILTER
- select HAVE_ARCH_TLB_REMOVE_TABLE if MMU_MOTOROLA
select HAVE_ASM_MODVERSIONS
select HAVE_DEBUG_BUGVERBOSE
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_HAS_NO_UNALIGNED
diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h
index b53ff0950db2..fc5454d37da3 100644
--- a/arch/m68k/include/asm/mcf_pgalloc.h
+++ b/arch/m68k/include/asm/mcf_pgalloc.h
@@ -39,7 +39,10 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable,
unsigned long address)
{
- tlb_remove_ptdesc(tlb, virt_to_ptdesc(pgtable));
+ struct ptdesc *ptdesc = virt_to_ptdesc(pgtable);
+
+ pagetable_dtor(ptdesc);
+ pagetable_free(ptdesc);
}
static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h
index f45a882238db..189bb7b1e663 100644
--- a/arch/m68k/include/asm/mcf_pgtable.h
+++ b/arch/m68k/include/asm/mcf_pgtable.h
@@ -137,6 +137,12 @@ static inline int pmd_bad2(pmd_t *pmd) { return 0; }
#define pmd_present(pmd) (!pmd_none2(&(pmd)))
static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = 0; }
+#define pte_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pte %08lx.\n", \
+ __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", \
+ __FILE__, __LINE__, pgd_val(e))
/*
* The following only work if pte_present() is true.
diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h
index dcde40e8b5c6..1091fb0affbe 100644
--- a/arch/m68k/include/asm/motorola_pgalloc.h
+++ b/arch/m68k/include/asm/motorola_pgalloc.h
@@ -17,7 +17,6 @@ enum m68k_table_types {
extern void init_pointer_table(void *table, int type);
extern void *get_pointer_table(struct mm_struct *mm, int type);
extern int free_pointer_table(void *table, int type);
-extern void __tlb_remove_table(void *table);
/*
* Allocate and free page tables. The xxx_kernel() versions are
@@ -48,7 +47,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pgtable)
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable,
unsigned long address)
{
- tlb_remove_table(tlb, (void *)((unsigned long)pgtable | TABLE_PTE));
+ free_pointer_table(pgtable, TABLE_PTE);
}
@@ -62,10 +61,10 @@ static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd)
return free_pointer_table(pmd, TABLE_PMD);
}
-static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
- unsigned long address)
+static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
+ unsigned long address)
{
- tlb_remove_table(tlb, (void *)((unsigned long)pmd | TABLE_PMD));
+ return free_pointer_table(pmd, TABLE_PMD);
}
diff --git a/arch/m68k/include/asm/motorola_pgtable.h b/arch/m68k/include/asm/motorola_pgtable.h
index d9393b310add..dcf6829b3eab 100644
--- a/arch/m68k/include/asm/motorola_pgtable.h
+++ b/arch/m68k/include/asm/motorola_pgtable.h
@@ -131,6 +131,14 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp)
#define pud_clear(pudp) ({ pud_val(*pudp) = 0; })
#define pud_page(pud) (mem_map + ((unsigned long)(__va(pud_val(pud)) - PAGE_OFFSET) >> PAGE_SHIFT))
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
+
/*
* The following only work if pte_present() is true.
* Undefined behaviour if not..
diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h
index 704442a391fd..80ca185a18a1 100644
--- a/arch/m68k/include/asm/sun3_pgtable.h
+++ b/arch/m68k/include/asm/sun3_pgtable.h
@@ -119,6 +119,13 @@ static inline int pmd_present2 (pmd_t *pmd) { return pmd_val (*pmd) & SUN3_PMD_V
#define pmd_present(pmd) (!pmd_none2(&(pmd)))
static inline void pmd_clear (pmd_t *pmdp) { pmd_val (*pmdp) = 0; }
+
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
+
/*
* The following only work if pte_present() is true.
* Undefined behaviour if not...
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index ffc80483440b..b30aa69a73a6 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -20,7 +20,6 @@
#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/gfp.h>
-#include <linux/cleanup.h>
#include <asm/setup.h>
#include <linux/uaccess.h>
@@ -104,8 +103,6 @@ static struct list_head ptable_list[3] = {
LIST_HEAD_INIT(ptable_list[2]),
};
-static DEFINE_SPINLOCK(ptable_lock);
-
#define PD_PTABLE(ptdesc) ((ptable_desc *)&(virt_to_ptdesc((void *)(ptdesc))->pt_list))
#define PD_PTDESC(ptable) (list_entry(ptable, struct ptdesc, pt_list))
#define PD_MARKBITS(dp) (*(unsigned int *)&PD_PTDESC(dp)->pt_index)
@@ -142,66 +139,52 @@ void __init init_pointer_table(void *table, int type)
return;
}
-/*
- * For a pointer table for a user process address space, a
- * table is taken from a ptdesc allocated for the purpose. Each
- * ptdesc can hold 8 pointer tables. The ptdesc is remapped in
- * virtual address space to be noncacheable.
- */
-static void *add_pointer_table(struct mm_struct *mm, int type)
-{
- struct ptdesc *ptdesc;
- ptable_desc *new;
- void *pt_addr;
-
- ptdesc = pagetable_alloc(GFP_KERNEL | __GFP_ZERO, 0);
- if (!ptdesc)
- return NULL;
-
- pt_addr = ptdesc_address(ptdesc);
-
- switch (type) {
- case TABLE_PTE:
- /*
- * m68k doesn't have SPLIT_PTE_PTLOCKS for not having
- * SMP.
- */
- pagetable_pte_ctor(mm, ptdesc);
- break;
- case TABLE_PMD:
- pagetable_pmd_ctor(mm, ptdesc);
- break;
- case TABLE_PGD:
- pagetable_pgd_ctor(ptdesc);
- break;
- }
-
- mmu_page_ctor(pt_addr);
-
- new = PD_PTABLE(pt_addr);
-
- PD_MARKBITS(new) = ptable_mask(type) - 1;
- scoped_guard(spinlock_irqsave, &ptable_lock)
- list_add(new, &ptable_list[type]);
-
- return (pmd_t *)pt_addr;
-}
-
void *get_pointer_table(struct mm_struct *mm, int type)
{
+ ptable_desc *dp = ptable_list[type].next;
+ unsigned int mask = list_empty(&ptable_list[type]) ? 0 : PD_MARKBITS(dp);
unsigned int tmp, off;
- unsigned long mask;
- unsigned long flags;
- ptable_desc *dp;
- void *ret;
-
- spin_lock_irqsave(&ptable_lock, flags);
- dp = ptable_list[type].next;
- mask = list_empty(&ptable_list[type]) ? 0 : PD_MARKBITS(dp);
+ /*
+ * For a pointer table for a user process address space, a
+ * table is taken from a ptdesc allocated for the purpose. Each
+ * ptdesc can hold 8 pointer tables. The ptdesc is remapped in
+ * virtual address space to be noncacheable.
+ */
if (mask == 0) {
- spin_unlock_irqrestore(&ptable_lock, flags);
- return add_pointer_table(mm, type);
+ struct ptdesc *ptdesc;
+ ptable_desc *new;
+ void *pt_addr;
+
+ ptdesc = pagetable_alloc(GFP_KERNEL | __GFP_ZERO, 0);
+ if (!ptdesc)
+ return NULL;
+
+ pt_addr = ptdesc_address(ptdesc);
+
+ switch (type) {
+ case TABLE_PTE:
+ /*
+ * m68k doesn't have SPLIT_PTE_PTLOCKS for not having
+ * SMP.
+ */
+ pagetable_pte_ctor(mm, ptdesc);
+ break;
+ case TABLE_PMD:
+ pagetable_pmd_ctor(mm, ptdesc);
+ break;
+ case TABLE_PGD:
+ pagetable_pgd_ctor(ptdesc);
+ break;
+ }
+
+ mmu_page_ctor(pt_addr);
+
+ new = PD_PTABLE(pt_addr);
+ PD_MARKBITS(new) = ptable_mask(type) - 1;
+ list_add_tail(new, dp);
+
+ return (pmd_t *)pt_addr;
}
for (tmp = 1, off = 0; (mask & tmp) == 0; tmp <<= 1, off += ptable_size(type))
@@ -211,10 +194,7 @@ void *get_pointer_table(struct mm_struct *mm, int type)
/* move to end of list */
list_move_tail(dp, &ptable_list[type]);
}
-
- ret = ptdesc_address(PD_PTDESC(dp)) + off;
- spin_unlock_irqrestore(&ptable_lock, flags);
- return ret;
+ return ptdesc_address(PD_PTDESC(dp)) + off;
}
int free_pointer_table(void *table, int type)
@@ -223,9 +203,6 @@ int free_pointer_table(void *table, int type)
unsigned long ptable = (unsigned long)table;
unsigned long pt_addr = ptable & PAGE_MASK;
unsigned int mask = 1U << ((ptable - pt_addr)/ptable_size(type));
- unsigned long flags;
-
- spin_lock_irqsave(&ptable_lock, flags);
dp = PD_PTABLE(pt_addr);
if (PD_MARKBITS (dp) & mask)
@@ -236,8 +213,6 @@ int free_pointer_table(void *table, int type)
if (PD_MARKBITS(dp) == ptable_mask(type)) {
/* all tables in ptdesc are free, free ptdesc */
list_del(dp);
- spin_unlock_irqrestore(&ptable_lock, flags);
-
mmu_page_dtor((void *)pt_addr);
pagetable_dtor_free(virt_to_ptdesc((void *)pt_addr));
return 1;
@@ -248,21 +223,9 @@ int free_pointer_table(void *table, int type)
*/
list_move(dp, &ptable_list[type]);
}
-
- spin_unlock_irqrestore(&ptable_lock, flags);
return 0;
}
-void __tlb_remove_table(void *table)
-{
- /* The bottom 2 bits are used to encode page table type. */
- const unsigned long encoded = (unsigned long)table;
- void *addr = (void *)(encoded & ~3UL);
- const int type = encoded & 3;
-
- free_pointer_table(addr, type);
-}
-
/* size of memory already mapped in head.S */
extern __initdata unsigned long m68k_init_mapped_size;
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h
index ffee6a009219..084a8a0dc239 100644
--- a/arch/microblaze/include/asm/pgalloc.h
+++ b/arch/microblaze/include/asm/pgalloc.h
@@ -25,7 +25,7 @@ extern void __bad_pte(pmd_t *pmd);
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
-#define __pte_free_tlb(tlb, pte, addr) tlb_remove_ptdesc((tlb), page_ptdesc(pte))
+#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
#define pmd_populate(mm, pmd, pte) \
(pmd_val(*(pmd)) = (unsigned long)page_address(pte))
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h
index b10273a3d0a4..6d42c18a0d4b 100644
--- a/arch/microblaze/include/asm/pgtable.h
+++ b/arch/microblaze/include/asm/pgtable.h
@@ -103,6 +103,13 @@ extern pte_t *va_to_pte(unsigned long address);
#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
+#define pte_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pte "PTE_FMT".\n", \
+ __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", \
+ __FILE__, __LINE__, pgd_val(e))
+
/*
* Bits in a linux-style PTE. These match the bits in the
* (hardware-defined) PTE as closely as possible.
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ed17c9b1624c..d7c67cebe065 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -97,6 +97,7 @@ config MIPS
select IRQ_FORCED_THREADING
select ISA if EISA
select LOCK_MM_AND_FIND_VMA
+ select MMU_GATHER_RCU_TABLE_FREE
select MODULES_USE_ELF_REL if MODULES
select MODULES_USE_ELF_RELA if MODULES && 64BIT
select PERF_USE_VMALLOC
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
index ef1001ab09c5..92b7591aac2a 100644
--- a/arch/mips/include/asm/pgtable-32.h
+++ b/arch/mips/include/asm/pgtable-32.h
@@ -104,6 +104,16 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
# define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
#endif
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %016Lx.\n", __FILE__, __LINE__, pte_val(e))
+#else
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#endif
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
extern void load_pgd(unsigned long pg_dir);
extern pte_t invalid_pte_table[PTRS_PER_PTE];
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 785fc37bab94..6e854bb11f37 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -151,6 +151,19 @@
#define MODULES_END (FIXADDR_START-2*PAGE_SIZE)
#endif
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
+#ifndef __PAGETABLE_PMD_FOLDED
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
+#endif
+#ifndef __PAGETABLE_PUD_FOLDED
+#define pud_ERROR(e) \
+ printk("%s:%d: bad pud %016lx.\n", __FILE__, __LINE__, pud_val(e))
+#endif
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
+
extern pte_t invalid_pte_table[PTRS_PER_PTE];
#ifndef __PAGETABLE_PUD_FOLDED
diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h
index 272707d48f1b..d389aa9ca57c 100644
--- a/arch/nios2/include/asm/pgtable.h
+++ b/arch/nios2/include/asm/pgtable.h
@@ -223,6 +223,13 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
return pmd_val(pmd);
}
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %08lx.\n", \
+ __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", \
+ __FILE__, __LINE__, pgd_val(e))
+
/*
* Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that
* are !pte_none() && !pte_present().
diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
index 13afcc0bd863..6b89996d0b62 100644
--- a/arch/openrisc/include/asm/pgtable.h
+++ b/arch/openrisc/include/asm/pgtable.h
@@ -338,6 +338,13 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
#define pte_pfn(x) ((unsigned long)(((x).pte)) >> PAGE_SHIFT)
#define pfn_pte(pfn, prot) __pte((((pfn) << PAGE_SHIFT)) | pgprot_val(prot))
+#define pte_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pte %p(%08lx).\n", \
+ __FILE__, __LINE__, &(e), pte_val(e))
+#define pgd_ERROR(e) \
+ printk(KERN_ERR "%s:%d: bad pgd %p(%08lx).\n", \
+ __FILE__, __LINE__, &(e), pgd_val(e))
+
extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
struct vm_area_struct;
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 77f67028ad89..d3afac2f0d9b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -80,6 +80,7 @@ config PARISC
select GENERIC_CLOCKEVENTS
select CPU_NO_EFFICIENT_FFS
select THREAD_INFO_IN_TASK
+ select MMU_GATHER_RCU_TABLE_FREE
select NEED_DMA_MAP_STATE
select NEED_SG_DMA_LENGTH
select HAVE_ARCH_KGDB
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index f6899375cb43..467b8547ac8b 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -75,6 +75,15 @@ extern void __update_cache(pte_t pte);
#endif /* !__ASSEMBLER__ */
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#if CONFIG_PGTABLE_LEVELS == 3
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, (unsigned long)pmd_val(e))
+#endif
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
+
/* This is the size of the initially mapped kernel memory */
#if defined(CONFIG_64BIT) || defined(CONFIG_KALLSYMS)
#define KERNEL_INITIAL_ORDER 26 /* 1<<26 = 64MB */
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index 84e7309a8266..bf9f192c826e 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -160,7 +160,8 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr,
if (pmd_none(*pmd))
return;
if (pmd_bad(*pmd)) {
- pmd_clear_bad(pmd);
+ pmd_ERROR(*pmd);
+ pmd_clear(pmd);
return;
}
pte = pte_offset_kernel(pmd, vaddr);
@@ -195,7 +196,8 @@ static inline void unmap_uncached_pmd(pgd_t * dir, unsigned long vaddr,
if (pgd_none(*dir))
return;
if (pgd_bad(*dir)) {
- pgd_clear_bad(dir);
+ pgd_ERROR(*dir);
+ pgd_clear(dir);
return;
}
pmd = pmd_offset(pud_offset(p4d_offset(dir, vaddr), vaddr), vaddr);
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1b5ab1963be2..7f7910f38a67 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -305,6 +305,7 @@ config PPC
select KASAN_VMALLOC if KASAN && EXECMEM
select LOCK_MM_AND_FIND_VMA
select MMU_GATHER_PAGE_SIZE
+ select MMU_GATHER_RCU_TABLE_FREE
select HAVE_ARCH_TLB_REMOVE_TABLE
select MMU_GATHER_MERGE_VMAS
select MMU_LAZY_TLB_SHOOTDOWN if PPC_BOOK3S_64
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index 835e84caee13..e18a4fa282a1 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -203,6 +203,8 @@ void unmap_kernel_page(unsigned long va);
/* Bits to mask out from a PGD to get to the PUD page */
#define PGD_MASKED_BITS 0
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
/*
* Bits in a linux-style PTE. These match the bits in the
* (hardware-defined) PowerPC PTE as closely as possible.
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index dff8790a047d..f4db7d7fbd5c 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -991,6 +991,13 @@ static inline pmd_t *pud_pgtable(pud_t pud)
return (pmd_t *)__va(pud_val(pud) & ~PUD_MASKED_BITS);
}
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
static inline int map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot)
{
if (radix_enabled()) {
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
index f17afde89fa1..496ecc65ac25 100644
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
@@ -51,6 +51,8 @@
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08llx.\n", __FILE__, __LINE__, (unsigned long long)pgd_val(e))
/*
* This is the bottom of the PKMAP area with HIGHMEM or an arbitrary
diff --git a/arch/powerpc/include/asm/nohash/64/pgtable-4k.h b/arch/powerpc/include/asm/nohash/64/pgtable-4k.h
index 75cf3c331b92..fb6fa1d4e074 100644
--- a/arch/powerpc/include/asm/nohash/64/pgtable-4k.h
+++ b/arch/powerpc/include/asm/nohash/64/pgtable-4k.h
@@ -82,6 +82,9 @@ extern struct page *p4d_page(p4d_t p4d);
#endif /* !__ASSEMBLER__ */
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e))
+
/*
* On all 4K setups, remap_4k_pfn() equates to remap_pfn_range() */
#define remap_4k_pfn(vma, addr, pfn, prot) \
diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h
index 446dde8b6ead..661eb3820d12 100644
--- a/arch/powerpc/include/asm/nohash/64/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/64/pgtable.h
@@ -159,6 +159,11 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
__young; \
})
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
/*
* Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that
* are !pte_none() && !pte_present().
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index ee1b5cb557c9..1ae8384637b5 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1076,7 +1076,7 @@ int iommu_tce_check_ioba(unsigned long page_shift,
if (ioba < offset)
return -EINVAL;
- if ((ioba + 1) > (offset + size))
+ if ((ioba + npages < ioba) || (ioba - offset + npages > size))
return -EINVAL;
return 0;
diff --git a/arch/powerpc/kvm/book3s_hv_nested.c b/arch/powerpc/kvm/book3s_hv_nested.c
index 22e616662255..a6ff42d7666c 100644
--- a/arch/powerpc/kvm/book3s_hv_nested.c
+++ b/arch/powerpc/kvm/book3s_hv_nested.c
@@ -1204,8 +1204,10 @@ static void kvmhv_emulate_tlbie_all_lpid(struct kvm_vcpu *vcpu, int ric)
spin_lock(&kvm->mmu_lock);
idr_for_each_entry(&kvm->arch.kvm_nested_guest_idr, gp, lpid) {
+ ++gp->refcnt;
spin_unlock(&kvm->mmu_lock);
kvmhv_emulate_tlbie_lpid(vcpu, gp, ric);
+ kvmhv_put_nested(gp);
spin_lock(&kvm->mmu_lock);
}
spin_unlock(&kvm->mmu_lock);
diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_hv_uvmem.c
index 5fbb95d90e99..463aef870c4e 100644
--- a/arch/powerpc/kvm/book3s_hv_uvmem.c
+++ b/arch/powerpc/kvm/book3s_hv_uvmem.c
@@ -779,8 +779,11 @@ static int kvmppc_svm_page_in(struct vm_area_struct *vma,
if (spage) {
ret = uv_page_in(kvm->arch.lpid, pfn << page_shift,
gpa, 0, page_shift);
- if (ret)
+ if (ret) {
+ unlock_page(dpage);
+ put_page(dpage);
goto out_finalize;
+ }
}
}
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 9ca28e4a610a..cf692b2b5f7b 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -19,7 +19,6 @@
#include <linux/string_helpers.h>
#include <linux/memory.h>
#include <linux/kfence.h>
-#include <linux/vmemmap-optimization.h>
#include <asm/pgalloc.h>
#include <asm/mmu_context.h>
@@ -1218,6 +1217,92 @@ base_mapping:
return 0;
}
+static pte_t * __meminit radix__vmemmap_populate_address(unsigned long addr, int node,
+ struct vmem_altmap *altmap,
+ struct page *reuse)
+{
+ pgd_t *pgd;
+ p4d_t *p4d;
+ pud_t *pud;
+ pmd_t *pmd;
+ pte_t *pte;
+
+ pgd = pgd_offset_k(addr);
+ p4d = p4d_offset(pgd, addr);
+ pud = vmemmap_pud_alloc(p4d, node, addr);
+ if (!pud)
+ return NULL;
+ pmd = vmemmap_pmd_alloc(pud, node, addr);
+ if (!pmd)
+ return NULL;
+ if (pmd_leaf(*pmd))
+ /*
+ * The second page is mapped as a hugepage due to a nearby request.
+ * Force our mapping to page size without deduplication
+ */
+ return NULL;
+ pte = vmemmap_pte_alloc(pmd, node, addr);
+ if (!pte)
+ return NULL;
+ radix__vmemmap_pte_populate(pmd, addr, node, NULL, NULL);
+ vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
+
+ return pte;
+}
+
+static pte_t * __meminit vmemmap_compound_tail_page(unsigned long addr,
+ unsigned long pfn_offset, int node)
+{
+ pgd_t *pgd;
+ p4d_t *p4d;
+ pud_t *pud;
+ pmd_t *pmd;
+ pte_t *pte;
+ unsigned long map_addr;
+
+ /* the second vmemmap page which we use for duplication */
+ map_addr = addr - pfn_offset * sizeof(struct page) + PAGE_SIZE;
+ pgd = pgd_offset_k(map_addr);
+ p4d = p4d_offset(pgd, map_addr);
+ pud = vmemmap_pud_alloc(p4d, node, map_addr);
+ if (!pud)
+ return NULL;
+ pmd = vmemmap_pmd_alloc(pud, node, map_addr);
+ if (!pmd)
+ return NULL;
+ if (pmd_leaf(*pmd))
+ /*
+ * The second page is mapped as a hugepage due to a nearby request.
+ * Force our mapping to page size without deduplication
+ */
+ return NULL;
+ pte = vmemmap_pte_alloc(pmd, node, map_addr);
+ if (!pte)
+ return NULL;
+ /*
+ * Check if there exist a mapping to the left
+ */
+ if (pte_none(*pte)) {
+ /*
+ * Populate the head page vmemmap page.
+ * It can fall in different pmd, hence
+ * vmemmap_populate_address()
+ */
+ pte = radix__vmemmap_populate_address(map_addr - PAGE_SIZE, node, NULL, NULL);
+ if (!pte)
+ return NULL;
+ /*
+ * Populate the tail pages vmemmap page
+ */
+ pte = radix__vmemmap_pte_populate(pmd, map_addr, node, NULL, NULL);
+ if (!pte)
+ return NULL;
+ vmemmap_verify(pte, node, map_addr, map_addr + PAGE_SIZE);
+ return pte;
+ }
+ return pte;
+}
+
int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
unsigned long start,
unsigned long end, int node,
@@ -1235,12 +1320,6 @@ int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
- struct page *tail_page;
- unsigned int order = pfn_to_section_compound_order(start_pfn);
-
- tail_page = vmemmap_shared_tail_page(order, device_zone(node));
- if (!tail_page)
- return -ENOMEM;
for (addr = start; addr < end; addr = next) {
@@ -1264,15 +1343,16 @@ int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
if (!pte_none(*pte)) {
/*
* This could be because we already have a compound
- * page whose retained vmemmap page was mapped and
+ * page whose VMEMMAP_RESERVE_NR pages were mapped and
* this request fall in those pages.
*/
next = addr + PAGE_SIZE;
continue;
} else {
- unsigned long nr_pages = 1UL << order;
+ unsigned long nr_pages = pgmap_vmemmap_nr(pgmap);
unsigned long addr_pfn = page_to_pfn((struct page *)addr);
unsigned long pfn_offset = addr_pfn - ALIGN_DOWN(addr_pfn, nr_pages);
+ pte_t *tail_page_pte;
/*
* if the address is aligned to huge page size it is the
@@ -1285,11 +1365,35 @@ int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
return -ENOMEM;
vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
+ /*
+ * Populate the tail pages vmemmap page
+ * It can fall in different pmd, hence
+ * vmemmap_populate_address()
+ */
+ pte = radix__vmemmap_populate_address(addr + PAGE_SIZE, node, NULL, NULL);
+ if (!pte)
+ return -ENOMEM;
+
+ next = addr + 2 * PAGE_SIZE;
+ continue;
+ }
+ /*
+ * get the 2nd mapping details
+ * Also create it if that doesn't exist
+ */
+ tail_page_pte = vmemmap_compound_tail_page(addr, pfn_offset, node);
+ if (!tail_page_pte) {
+
+ pte = radix__vmemmap_pte_populate(pmd, addr, node, NULL, NULL);
+ if (!pte)
+ return -ENOMEM;
+ vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
+
next = addr + PAGE_SIZE;
continue;
}
- pte = radix__vmemmap_pte_populate(pmd, addr, node, NULL, tail_page);
+ pte = radix__vmemmap_pte_populate(pmd, addr, node, NULL, pte_page(*tail_page_pte));
if (!pte)
return -ENOMEM;
vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
index dd8f6060fb7a..b5ad7c173ef0 100644
--- a/arch/powerpc/platforms/powernv/Kconfig
+++ b/arch/powerpc/platforms/powernv/Kconfig
@@ -17,6 +17,7 @@ config PPC_POWERNV
select PPC_DOORBELL
select MMU_NOTIFIER
select FORCE_SMP
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
default y
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 7d125e288f6e..74910ce3a541 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -23,6 +23,7 @@ config PPC_PSERIES
select HOTPLUG_CPU
select FORCE_SMP
select SWIOTLB
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
default y
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a590db7687c8..de1923dc6137 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -72,6 +72,7 @@ config RISCV
select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
+ select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
select ARCH_HAS_PTE_PROTNONE if MMU
select ARCH_SUPPORTS_RT
select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
@@ -207,6 +208,7 @@ config RISCV
select IRQ_FORCED_THREADING
select KASAN_VMALLOC if KASAN
select LOCK_MM_AND_FIND_VMA
+ select MMU_GATHER_RCU_TABLE_FREE if SMP && MMU
select MODULES_USE_ELF_RELA if MODULES
select OF
select OF_EARLY_FLATTREE
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index 37627963a649..92dea8639779 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -58,6 +58,23 @@
};
};
+&i2c6_1_cfg {
+ i2c6-1-pins {
+ power-source = <3300>;
+ };
+};
+
+&i2c6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c6_1_cfg>;
+ status = "okay";
+
+ temperature-sensor@4c {
+ compatible = "sensylink,ctf2301";
+ reg = <0x4c>;
+ };
+};
+
&i2c8 {
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
diff --git a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
index 6482d24be139..cb4f4f4e33af 100644
--- a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
@@ -102,6 +102,17 @@
};
/omit-if-no-ref/
+ i2c6_1_cfg: i2c6-1-cfg {
+ i2c6-1-pins {
+ pinmux = <K3_PADCONF(7, 6)>, /* i2c6 scl */
+ <K3_PADCONF(8, 6)>; /* i2c6 sda */
+
+ bias-pull-up = <0>;
+ drive-strength = <25>;
+ };
+ };
+
+ /omit-if-no-ref/
i2c8_cfg: i2c8-cfg {
i2c8-pins {
pinmux = <K3_PADCONF(128, 0)>, /* i2c8 scl */
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index 86ccfb82e295..b9977e78e096 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -1140,6 +1140,85 @@
status = "disabled";
};
+ i2s0: i2s@d4026000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4026000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S0_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S0_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S0_BUS>,
+ <&syscon_apbc CLK_APBC_I2S0>,
+ <&syscon_mpmu CLK_MPMU_I2S0_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA0_TX>, <&pdma K3_PDMA_SSPA0_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S0>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s1: i2s@d4026800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4026800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S1_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S1_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S1_BUS>,
+ <&syscon_apbc CLK_APBC_I2S1>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA1_TX>, <&pdma K3_PDMA_SSPA1_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S1>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s2: i2s@d4027000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4027000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S2_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S2_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S2_BUS>,
+ <&syscon_apbc CLK_APBC_I2S2>,
+ <&syscon_mpmu CLK_MPMU_I2S2_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA2_TX>, <&pdma K3_PDMA_SSPA2_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S2>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s3: i2s@d4027800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4027800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S3_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S3_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S3_BUS>,
+ <&syscon_apbc CLK_APBC_I2S3>,
+ <&syscon_mpmu CLK_MPMU_I2S3_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA3_TX>, <&pdma K3_PDMA_SSPA3_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S3>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
spi0: spi@d4040000 {
compatible = "spacemit,k3-spi", "spacemit,k1-spi";
reg = <0x0 0xd4040000 0x0 0x30>;
@@ -1170,6 +1249,46 @@
status = "disabled";
};
+ i2s4: i2s@d4041000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4041000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S4_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S4_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S4_BUS>,
+ <&syscon_apbc CLK_APBC_I2S4>,
+ <&syscon_mpmu CLK_MPMU_I2S4_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA4_TX>, <&pdma K3_PDMA_SSPA4_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S4>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s5: i2s@d4041800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4041800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S5_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S5_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S5_BUS>,
+ <&syscon_apbc CLK_APBC_I2S5>,
+ <&syscon_mpmu CLK_MPMU_I2S5_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma K3_PDMA_SSPA5_TX>, <&pdma K3_PDMA_SSPA5_RX>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S5>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
syscon_mpmu: system-controller@d4050000 {
compatible = "spacemit,k3-syscon-mpmu";
reg = <0x0 0xd4050000 0x0 0x10000>;
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
index b4bbae55e931..709a36fb4323 100644
--- a/arch/riscv/include/asm/page.h
+++ b/arch/riscv/include/asm/page.h
@@ -76,6 +76,12 @@ typedef struct page *pgtable_t;
#define __pgd(x) ((pgd_t) { (x) })
#define __pgprot(x) ((pgprot_t) { (x) })
+#ifdef CONFIG_64BIT
+#define PTE_FMT "%016lx"
+#else
+#define PTE_FMT "%08lx"
+#endif
+
#if defined(CONFIG_64BIT) && defined(CONFIG_MMU)
/*
* We override this value as its generic definition uses __pa too early in
diff --git a/arch/riscv/include/asm/pgtable-64.h b/arch/riscv/include/asm/pgtable-64.h
index ae23182b572c..6e789fa58514 100644
--- a/arch/riscv/include/asm/pgtable-64.h
+++ b/arch/riscv/include/asm/pgtable-64.h
@@ -264,6 +264,15 @@ static inline unsigned long _pmd_pfn(pmd_t pmd)
return __page_val_to_pfn(pmd_val(pmd));
}
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
+
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %016lx.\n", __FILE__, __LINE__, pud_val(e))
+
+#define p4d_ERROR(e) \
+ pr_err("%s:%d: bad p4d %016lx.\n", __FILE__, __LINE__, p4d_val(e))
+
static inline void set_p4d(p4d_t *p4dp, p4d_t p4d)
{
if (pgtable_l4_enabled)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 4c8fc6845503..40b1ed4f3ea8 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -556,6 +556,10 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | newprot_val);
}
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd " PTE_FMT ".\n", __FILE__, __LINE__, pgd_val(e))
+
+
/* Commit new configuration to MMU hardware */
static inline void update_mmu_cache_range(struct vm_fault *vmf,
struct vm_area_struct *vma, unsigned long address,
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h
index e9f9960c1947..ef59e1716a2c 100644
--- a/arch/riscv/include/asm/set_memory.h
+++ b/arch/riscv/include/asm/set_memory.h
@@ -40,8 +40,9 @@ static inline int set_kernel_memory(char *startp, char *endp,
}
#endif
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr);
-int set_direct_map_default_noflush(struct page *page, unsigned int nr);
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_default_noflush(struct page *page);
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid);
bool kernel_page_present(struct page *page);
#endif /* __ASSEMBLER__ */
diff --git a/arch/riscv/mm/pageattr.c b/arch/riscv/mm/pageattr.c
index 5b3cf326455d..3f76db3d2769 100644
--- a/arch/riscv/mm/pageattr.c
+++ b/arch/riscv/mm/pageattr.c
@@ -374,18 +374,33 @@ int set_memory_nx(unsigned long addr, int numpages)
return __set_memory(addr, numpages, __pgprot(0), __pgprot(_PAGE_EXEC));
}
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr)
+int set_direct_map_invalid_noflush(struct page *page)
{
- return __set_memory((unsigned long)page_address(page), nr,
+ return __set_memory((unsigned long)page_address(page), 1,
__pgprot(0), __pgprot(_PAGE_PRESENT));
}
-int set_direct_map_default_noflush(struct page *page, unsigned int nr)
+int set_direct_map_default_noflush(struct page *page)
{
- return __set_memory((unsigned long)page_address(page), nr,
+ return __set_memory((unsigned long)page_address(page), 1,
PAGE_KERNEL, __pgprot(_PAGE_EXEC));
}
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
+{
+ pgprot_t set, clear;
+
+ if (valid) {
+ set = PAGE_KERNEL;
+ clear = __pgprot(_PAGE_EXEC);
+ } else {
+ set = __pgprot(0);
+ clear = __pgprot(_PAGE_PRESENT);
+ }
+
+ return __set_memory((unsigned long)page_address(page), nr, set, clear);
+}
+
#ifdef CONFIG_DEBUG_PAGEALLOC
static int debug_pagealloc_set_page(pte_t *pte, unsigned long addr, void *data)
{
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 75468d9b11cf..bade84e1eee2 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -156,6 +156,7 @@ config S390
select ARCH_HAS_PTE_PROTNONE
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_USES_CFI_GENERIC_LLVM_PASS if CC_IS_CLANG
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF
@@ -266,6 +267,7 @@ config S390
select LOCK_MM_AND_FIND_VMA
select MMU_GATHER_MERGE_VMAS
select MMU_GATHER_NO_GATHER
+ select MMU_GATHER_RCU_TABLE_FREE
select MODULES_USE_ELF_RELA
select NEED_DMA_MAP_STATE if PCI
select NEED_PER_CPU_EMBED_FIRST_CHUNK
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 2d5c2ab06de9..e882663a58e7 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -68,6 +68,17 @@ extern unsigned long zero_page_mask;
/* TODO: s390 cannot support io_remap_pfn_range... */
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %016lx.\n", __FILE__, __LINE__, pud_val(e))
+#define p4d_ERROR(e) \
+ pr_err("%s:%d: bad p4d %016lx.\n", __FILE__, __LINE__, p4d_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
+
/*
* The vmalloc and module area will always be on the topmost area of the
* kernel mapping. 512GB are reserved for vmalloc by default.
diff --git a/arch/s390/include/asm/set_memory.h b/arch/s390/include/asm/set_memory.h
index e3562bf0c1aa..94092f4ae764 100644
--- a/arch/s390/include/asm/set_memory.h
+++ b/arch/s390/include/asm/set_memory.h
@@ -60,8 +60,9 @@ __SET_MEMORY_FUNC(set_memory_rox, SET_MEMORY_RO | SET_MEMORY_X)
__SET_MEMORY_FUNC(set_memory_rwnx, SET_MEMORY_RW | SET_MEMORY_NX)
__SET_MEMORY_FUNC(set_memory_4k, SET_MEMORY_4K)
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr);
-int set_direct_map_default_noflush(struct page *page, unsigned int nr);
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_default_noflush(struct page *page);
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid);
bool kernel_page_present(struct page *page);
#endif
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c
index 80e834e8b8e1..1e202e3d08e7 100644
--- a/arch/s390/mm/pageattr.c
+++ b/arch/s390/mm/pageattr.c
@@ -382,14 +382,26 @@ out:
return rc;
}
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr)
+int set_direct_map_invalid_noflush(struct page *page)
{
- return __set_memory((unsigned long)page_to_virt(page), nr, SET_MEMORY_INV);
+ return __set_memory((unsigned long)page_to_virt(page), 1, SET_MEMORY_INV);
}
-int set_direct_map_default_noflush(struct page *page, unsigned int nr)
+int set_direct_map_default_noflush(struct page *page)
{
- return __set_memory((unsigned long)page_to_virt(page), nr, SET_MEMORY_DEF);
+ return __set_memory((unsigned long)page_to_virt(page), 1, SET_MEMORY_DEF);
+}
+
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
+{
+ unsigned long flags;
+
+ if (valid)
+ flags = SET_MEMORY_DEF;
+ else
+ flags = SET_MEMORY_INV;
+
+ return __set_memory((unsigned long)page_to_virt(page), nr, flags);
}
bool kernel_page_present(struct page *page)
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index fe859def918c..d60f1d5a94c0 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -33,7 +33,6 @@ config SUPERH
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_KGDB
select HAVE_ARCH_SECCOMP_FILTER
- select HAVE_ARCH_TLB_REMOVE_TABLE if X2TLB
select HAVE_ARCH_TRACEHOOK
select HAVE_DEBUG_BUGVERBOSE
select HAVE_DEBUG_KMEMLEAK
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h
index 67ce7fa23fa1..6fe7123d38fa 100644
--- a/arch/sh/include/asm/pgalloc.h
+++ b/arch/sh/include/asm/pgalloc.h
@@ -17,11 +17,7 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
extern void pmd_free(struct mm_struct *mm, pmd_t *pmd);
-extern void __tlb_remove_table(void *table);
-
-/* PMDs are slab-allocated, tag so they are freed correctly. */
-#define __pmd_free_tlb(tlb, pmdp, addr) \
- tlb_remove_table((tlb), (void *)((unsigned long)(pmdp) | 1))
+#define __pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, (pmdp))
#endif
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h
index 3f4d747f30f4..d1ce73f3bd85 100644
--- a/arch/sh/include/asm/pgtable-3level.h
+++ b/arch/sh/include/asm/pgtable-3level.h
@@ -25,6 +25,9 @@
#define PTRS_PER_PMD ((1 << PGDIR_SHIFT) / PMD_SIZE)
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
+
typedef union {
struct {
unsigned long pmd_low;
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h
index cde1bf0c6734..5f51af18997b 100644
--- a/arch/sh/include/asm/pgtable_32.h
+++ b/arch/sh/include/asm/pgtable_32.h
@@ -400,6 +400,19 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
#define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT)
#define pmd_page(pmd) (virt_to_page(pmd_val(pmd)))
+#ifdef CONFIG_X2TLB
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %p(%08lx%08lx).\n", __FILE__, __LINE__, \
+ &(e), (e).pte_high, (e).pte_low)
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %016llx.\n", __FILE__, __LINE__, pgd_val(e))
+#else
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+#endif
+
/*
* Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that
* are !pte_none() && !pte_present().
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 93921109f4e6..110308bdef01 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -52,24 +52,26 @@ static pte_t *__get_pte_phys(unsigned long addr)
pmd_t *pmd;
pgd = pgd_offset_k(addr);
- if (pgd_none(*pgd))
+ if (pgd_none(*pgd)) {
+ pgd_ERROR(*pgd);
return NULL;
+ }
p4d = p4d_alloc(NULL, pgd, addr);
if (unlikely(!p4d)) {
- pr_err("allocating p4d table failed\n");
+ p4d_ERROR(*p4d);
return NULL;
}
pud = pud_alloc(NULL, p4d, addr);
if (unlikely(!pud)) {
- pr_err("allocating pud table failed\n");
+ pud_ERROR(*pud);
return NULL;
}
pmd = pmd_alloc(NULL, pud, addr);
if (unlikely(!pmd)) {
- pr_err("allocating pmd table failed\n");
+ pmd_ERROR(*pmd);
return NULL;
}
@@ -82,11 +84,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
pte = __get_pte_phys(addr);
if (!pte_none(*pte)) {
- char str[PTVAL_STR_MAX];
-
- ptval_to_str(str, pte_val(*pte));
- pr_err("unexpected set PTE at %lx in %s: bad pte %p(%s).\n",
- addr, __func__, pte, str);
+ pte_ERROR(*pte);
return;
}
diff --git a/arch/sh/mm/pgtable.c b/arch/sh/mm/pgtable.c
index f6184b86b89c..3a4085ea0161 100644
--- a/arch/sh/mm/pgtable.c
+++ b/arch/sh/mm/pgtable.c
@@ -56,24 +56,4 @@ void pmd_free(struct mm_struct *mm, pmd_t *pmd)
{
kmem_cache_free(pmd_cachep, pmd);
}
-
-static void __tlb_remove_table_slab(void *table)
-{
- kmem_cache_free(pmd_cachep, table);
-}
-
-static void __tlb_remove_table_pgtable(void *table)
-{
- pagetable_dtor_free(table);
-}
-
-void __tlb_remove_table(void *table)
-{
- const unsigned long addr = (unsigned long)table;
-
- if (addr & 1)
- __tlb_remove_table_slab((void *)(addr & ~1UL));
- else
- __tlb_remove_table_pgtable(table);
-}
#endif /* PAGETABLE_LEVELS > 2 */
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 742ffff8c37f..ab77d3f2536e 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -64,7 +64,6 @@ config SPARC32
select HAVE_UID16
select HAVE_PAGE_SIZE_4KB
select LOCK_MM_AND_FIND_VMA
- select HAVE_ARCH_TLB_REMOVE_TABLE
select OLD_SIGACTION
select ZONE_DMA
@@ -76,7 +75,8 @@ config SPARC64
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_KRETPROBES
select HAVE_KPROBES
- select HAVE_ARCH_TLB_REMOVE_TABLE
+ select MMU_GATHER_RCU_TABLE_FREE if SMP
+ select HAVE_ARCH_TLB_REMOVE_TABLE if SMP
select MMU_GATHER_MERGE_VMAS
select MMU_GATHER_NO_FLUSH_CACHE
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index 36010852ba0c..4f73e87b22a3 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -48,9 +48,7 @@ static inline void free_pmd_fast(pmd_t * pmd)
}
#define pmd_free(mm, pmd) free_pmd_fast(pmd)
-
-#define __pmd_free_tlb(tlb, pmd, addr) \
- tlb_remove_table((tlb), (void *)((unsigned long)(pmd) | 1UL))
+#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
#define pmd_populate(mm, pmd, pte) pmd_set(pmd, pte)
@@ -74,7 +72,6 @@ static inline void free_pte_fast(pte_t *pte)
#define pte_free_kernel(mm, pte) free_pte_fast(pte)
void pte_free(struct mm_struct * mm, pgtable_t pte);
-void __tlb_remove_table(void *table);
-#define __pte_free_tlb(tlb, pte, addr) tlb_remove_table((tlb), (void *)(pte))
+#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
#endif /* _SPARC_PGALLOC_H */
diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h
index b5055d259b74..caa7632be4c2 100644
--- a/arch/sparc/include/asm/pgalloc_64.h
+++ b/arch/sparc/include/asm/pgalloc_64.h
@@ -74,6 +74,8 @@ void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable);
void pgtable_free(void *table, bool is_page);
+#ifdef CONFIG_SMP
+
struct mmu_gather;
void tlb_remove_table(struct mmu_gather *, void *);
@@ -94,6 +96,12 @@ static inline void __tlb_remove_table(void *_table)
is_page = true;
pgtable_free(table, is_page);
}
+#else /* CONFIG_SMP */
+static inline void pgtable_free_tlb(struct mmu_gather *tlb, void *table, bool is_page)
+{
+ pgtable_free(table, is_page);
+}
+#endif /* !CONFIG_SMP */
static inline void __pte_free_tlb(struct mmu_gather *tlb, pte_t *pte,
unsigned long address)
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 5a5f54a090f5..f89b1250661d 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -40,6 +40,9 @@ void load_mmu(void);
unsigned long calc_highpages(void);
unsigned long __init bootmem_init(unsigned long *pages_avail);
+#define pte_ERROR(e) __builtin_trap()
+#define pmd_ERROR(e) __builtin_trap()
+#define pgd_ERROR(e) __builtin_trap()
#define PTRS_PER_PTE 64
#define PTRS_PER_PMD 64
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 35a217bf6e5c..c548dcca0e8c 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -96,6 +96,16 @@ bool kern_addr_valid(unsigned long addr);
#define PTRS_PER_PUD (1UL << PUD_BITS)
#define PTRS_PER_PGD (1UL << PGDIR_BITS)
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
+ __FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %p(%016lx) seen at (%pS)\n", \
+ __FILE__, __LINE__, &(e), pud_val(e), __builtin_return_address(0))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n", \
+ __FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0))
+
#endif /* !(__ASSEMBLER__) */
/* PTE bits which are the same in SUN4U and SUN4V format. */
diff --git a/arch/sparc/include/asm/tlb_64.h b/arch/sparc/include/asm/tlb_64.h
index dc83d92786a9..73208fa963a5 100644
--- a/arch/sparc/include/asm/tlb_64.h
+++ b/arch/sparc/include/asm/tlb_64.h
@@ -28,7 +28,9 @@ void flush_tlb_pending(void);
* and therefore we don't need a TLBI when freeing page-table pages.
*/
+#ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE
#define tlb_needs_table_invalidate() (false)
+#endif
#include <asm-generic/tlb.h>
diff --git a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c
index c309e27973ce..32a5c1d9459c 100644
--- a/arch/sparc/lib/bitext.c
+++ b/arch/sparc/lib/bitext.c
@@ -22,6 +22,8 @@
* @align: requested alignment
*
* Returns offset in the map or -1 if out of space.
+ *
+ * Not safe to call from an interrupt (uses spin_lock).
*/
int bit_map_string_get(struct bit_map *t, int len, int align)
{
@@ -29,7 +31,6 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
int off_new;
int align1;
int i, color;
- unsigned long flags;
if (t->num_colors) {
/* align is overloaded to be the page color */
@@ -49,7 +50,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
BUG();
color &= align1;
- spin_lock_irqsave(&t->lock, flags);
+ spin_lock(&t->lock);
if (len < t->last_size)
offset = t->first_free;
else
@@ -63,7 +64,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
if (offset >= t->size)
offset = 0;
if (count + len > t->size) {
- spin_unlock_irqrestore(&t->lock, flags);
+ spin_unlock(&t->lock);
/* P3 */ printk(KERN_ERR
"bitmap out: size %d used %d off %d len %d align %d count %d\n",
t->size, t->used, offset, len, align, count);
@@ -89,7 +90,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
t->last_off = 0;
t->used += len;
t->last_size = len;
- spin_unlock_irqrestore(&t->lock, flags);
+ spin_unlock(&t->lock);
return offset;
}
}
@@ -102,11 +103,10 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
void bit_map_clear(struct bit_map *t, int offset, int len)
{
int i;
- unsigned long flags;
if (t->used < len)
BUG(); /* Much too late to do any good, but alas... */
- spin_lock_irqsave(&t->lock, flags);
+ spin_lock(&t->lock);
for (i = 0; i < len; i++) {
if (test_bit(offset + i, t->map) == 0)
BUG();
@@ -115,7 +115,7 @@ void bit_map_clear(struct bit_map *t, int offset, int len)
if (offset < t->first_free)
t->first_free = offset;
t->used -= len;
- spin_unlock_irqrestore(&t->lock, flags);
+ spin_unlock(&t->lock);
}
void bit_map_init(struct bit_map *t, unsigned long *map, int size)
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 1c277ab3cdb8..9a74902ad181 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -340,60 +340,38 @@ pgd_t *get_pgd_fast(void)
* Alignments up to the page size are the same for physical and virtual
* addresses of the nocache area.
*/
-
-static DEFINE_SPINLOCK(pte_page_lock);
-
pgtable_t pte_alloc_one(struct mm_struct *mm)
{
- unsigned long flags;
pte_t *ptep;
struct page *page;
if (!(ptep = pte_alloc_one_kernel(mm)))
return NULL;
page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT);
- spin_lock_irqsave(&pte_page_lock, flags);
+ spin_lock(&mm->page_table_lock);
if (page_ref_inc_return(page) == 2 &&
!pagetable_pte_ctor(mm, page_ptdesc(page))) {
page_ref_dec(page);
ptep = NULL;
}
- spin_unlock_irqrestore(&pte_page_lock, flags);
+ spin_unlock(&mm->page_table_lock);
return ptep;
}
-static void __pte_free(pgtable_t ptep)
+void pte_free(struct mm_struct *mm, pgtable_t ptep)
{
struct page *page;
- unsigned long flags;
page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT);
- spin_lock_irqsave(&pte_page_lock, flags);
+ spin_lock(&mm->page_table_lock);
if (page_ref_dec_return(page) == 1)
pagetable_dtor(page_ptdesc(page));
- spin_unlock_irqrestore(&pte_page_lock, flags);
+ spin_unlock(&mm->page_table_lock);
srmmu_free_nocache(ptep, SRMMU_PTE_TABLE_SIZE);
}
-void pte_free(struct mm_struct *mm, pgtable_t ptep)
-{
- __pte_free(ptep);
-}
-
-void __tlb_remove_table(void *table)
-{
- const unsigned long encoded = (unsigned long)table;
- const unsigned long addr = encoded & ~1UL;
- const bool is_pmd = encoded & 1;
-
- if (is_pmd)
- free_pmd_fast((pmd_t *)addr);
- else
- __pte_free((pgtable_t)addr);
-}
-
/* context handling - a dynamically sized pool is used */
#define NO_CONTEXT -1
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index 94b8ff70f578..d9541d13d9eb 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -44,6 +44,7 @@ config UML
select HAVE_SYSCALL_TRACEPOINTS
select THREAD_INFO_IN_TASK
select SPARSE_IRQ
+ select MMU_GATHER_RCU_TABLE_FREE
config MMU
bool
diff --git a/arch/um/include/asm/pgtable-2level.h b/arch/um/include/asm/pgtable-2level.h
index fa625f5b5ef7..14ec16f92ce4 100644
--- a/arch/um/include/asm/pgtable-2level.h
+++ b/arch/um/include/asm/pgtable-2level.h
@@ -24,6 +24,13 @@
#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
#define PTRS_PER_PGD 1024
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), \
+ pte_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), \
+ pgd_val(e))
+
static inline int pgd_needsync(pgd_t pgd) { return 0; }
static inline void pgd_mkuptodate(pgd_t pgd) { }
diff --git a/arch/um/include/asm/pgtable-4level.h b/arch/um/include/asm/pgtable-4level.h
index ff82f99c80fa..7a271b7b83d2 100644
--- a/arch/um/include/asm/pgtable-4level.h
+++ b/arch/um/include/asm/pgtable-4level.h
@@ -42,6 +42,19 @@
#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), \
+ pte_val(e))
+#define pmd_ERROR(e) \
+ printk("%s:%d: bad pmd %p(%016lx).\n", __FILE__, __LINE__, &(e), \
+ pmd_val(e))
+#define pud_ERROR(e) \
+ printk("%s:%d: bad pud %p(%016lx).\n", __FILE__, __LINE__, &(e), \
+ pud_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), \
+ pgd_val(e))
+
#define pud_none(x) (!(pud_val(x) & ~_PAGE_NEEDSYNC))
#define pud_bad(x) ((pud_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
#define pud_present(x) (pud_val(x) & _PAGE_PRESENT)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5ea019152824..8e78b83f4981 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -27,6 +27,7 @@ config X86_64
select ARCH_HAS_GIGANTIC_PAGE
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
+ select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
select HAVE_ARCH_SOFT_DIRTY
select MODULES_USE_ELF_RELA
@@ -149,6 +150,7 @@ config X86
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if X86_64
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP if X86_64
+ select ARCH_WANT_HUGETLB_VMEMMAP_PREINIT if X86_64
select ARCH_WANTS_THP_SWAP if X86_64
select ARCH_HAS_PARANOID_L1D_FLUSH
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
@@ -284,6 +286,7 @@ config X86
select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP
select ASYNC_KERNEL_PGTABLE_FREE if IOMMU_SVA
+ select MMU_GATHER_RCU_TABLE_FREE
select MMU_GATHER_MERGE_VMAS
select HAVE_POSIX_CPU_TIMERS_TASK_WORK
select HAVE_REGS_AND_STACK_ACCESS_API
@@ -1846,6 +1849,7 @@ config X86_USER_SHADOW_STACK
bool "X86 userspace shadow stack"
depends on AS_WRUSS
depends on X86_64
+ depends on PER_VMA_LOCK
select ARCH_USES_HIGH_VMA_FLAGS
select ARCH_HAS_USER_SHADOW_STACK
select X86_CET
diff --git a/arch/x86/entry/vdso/vdso32/fake_32bit_build.h b/arch/x86/entry/vdso/vdso32/fake_32bit_build.h
index 5f8424eade2b..bc3e549795c3 100644
--- a/arch/x86/entry/vdso/vdso32/fake_32bit_build.h
+++ b/arch/x86/entry/vdso/vdso32/fake_32bit_build.h
@@ -11,7 +11,7 @@
#undef CONFIG_PGTABLE_LEVELS
#undef CONFIG_ILLEGAL_POINTER_VALUE
#undef CONFIG_SPARSEMEM_VMEMMAP
-#undef CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION
+#undef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
#undef CONFIG_NR_CPUS
#undef CONFIG_PARAVIRT_XXL
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
index 83427765cfbf..e9482a11ac52 100644
--- a/arch/x86/include/asm/pgtable-2level.h
+++ b/arch/x86/include/asm/pgtable-2level.h
@@ -2,6 +2,11 @@
#ifndef _ASM_X86_PGTABLE_2LEVEL_H
#define _ASM_X86_PGTABLE_2LEVEL_H
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %08lx\n", __FILE__, __LINE__, (e).pte_low)
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %08lx\n", __FILE__, __LINE__, pgd_val(e))
+
/*
* Certain architectures need to do special things when PTEs
* within a page table are directly modified. Thus, the following
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index d6729911e09a..dabafba957ea 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -8,6 +8,17 @@
*
* Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
*/
+
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %p(%08lx%08lx)\n", \
+ __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %p(%016Lx)\n", \
+ __FILE__, __LINE__, &(e), pmd_val(e))
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %p(%016Lx)\n", \
+ __FILE__, __LINE__, &(e), pgd_val(e))
+
#define pxx_xchg64(_pxx, _ptr, _val) ({ \
_pxx##val_t *_p = (_pxx##val_t *)_ptr; \
_pxx##val_t _o = *_p; \
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index c861f3832bed..ce45882ccd07 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -29,6 +29,24 @@ extern pgd_t init_top_pgt[];
extern void paging_init(void);
static inline void sync_initial_page_table(void) { }
+#define pte_ERROR(e) \
+ pr_err("%s:%d: bad pte %p(%016lx)\n", \
+ __FILE__, __LINE__, &(e), pte_val(e))
+#define pmd_ERROR(e) \
+ pr_err("%s:%d: bad pmd %p(%016lx)\n", \
+ __FILE__, __LINE__, &(e), pmd_val(e))
+#define pud_ERROR(e) \
+ pr_err("%s:%d: bad pud %p(%016lx)\n", \
+ __FILE__, __LINE__, &(e), pud_val(e))
+
+#define p4d_ERROR(e) \
+ pr_err("%s:%d: bad p4d %p(%016lx)\n", \
+ __FILE__, __LINE__, &(e), p4d_val(e))
+
+#define pgd_ERROR(e) \
+ pr_err("%s:%d: bad pgd %p(%016lx)\n", \
+ __FILE__, __LINE__, &(e), pgd_val(e))
+
struct mm_struct;
#define mm_p4d_folded mm_p4d_folded
diff --git a/arch/x86/include/asm/set_memory.h b/arch/x86/include/asm/set_memory.h
index 39271a5ea925..4362c26aa992 100644
--- a/arch/x86/include/asm/set_memory.h
+++ b/arch/x86/include/asm/set_memory.h
@@ -86,8 +86,9 @@ int set_pages_wb(struct page *page, int numpages);
int set_pages_ro(struct page *page, int numpages);
int set_pages_rw(struct page *page, int numpages);
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr);
-int set_direct_map_default_noflush(struct page *page, unsigned int nr);
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_default_noflush(struct page *page);
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid);
bool kernel_page_present(struct page *page);
extern int kernel_set_to_readonly;
diff --git a/arch/x86/include/asm/string_64.h b/arch/x86/include/asm/string_64.h
index 831d3dda3b38..4635616863f5 100644
--- a/arch/x86/include/asm/string_64.h
+++ b/arch/x86/include/asm/string_64.h
@@ -82,77 +82,24 @@ int strcmp(const char *cs, const char *ct);
#ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE
#define __HAVE_ARCH_MEMCPY_FLUSHCACHE 1
void __memcpy_flushcache(void *dst, const void *src, size_t cnt);
-
-static __always_inline void movnti_4(void *dst, const void *src)
-{
- asm volatile("movntil %1, %0"
- : "=m"(*(u32 *)dst)
- : "r"(*(const u32 *)src)
- : "memory");
-}
-
-static __always_inline void movnti_8(void *dst, const void *src)
-{
- asm volatile("movntiq %1, %0"
- : "=m"(*(u64 *)dst)
- : "r"(*(const u64 *)src)
- : "memory");
-}
-
-static __always_inline void movnti_16(void *dst, const void *src)
-{
- movnti_8(dst, src);
- movnti_8(dst + 8, src + 8);
-}
-
-static __always_inline void movnti_32(void *dst, const void *src)
+static __always_inline void memcpy_flushcache(void *dst, const void *src, size_t cnt)
{
- movnti_16(dst, src);
- movnti_16(dst + 16, src + 16);
-}
-
-static __always_inline void movnti_64(void *dst, const void *src)
-{
- movnti_32(dst, src);
- movnti_32(dst + 32, src + 32);
-}
-
-static __always_inline void memcpy_flushcache(void *dst, const void *src,
- size_t cnt)
-{
- if (!__builtin_constant_p(cnt))
- return __memcpy_flushcache(dst, src, cnt);
-
- /*
- * The relevant fixed-size copies here are the x86_64 struct page sizes:
- * 64, 80, and 96 bytes. Keep 32-byte and 48-byte copies inline as well
- * instead of sending those nearby fixed-size cases back to
- * __memcpy_flushcache().
- */
- switch (cnt) {
- case 4: movnti_4(dst, src); break;
- case 8: movnti_8(dst, src); break;
- case 16: movnti_16(dst, src); break;
- case 32: movnti_32(dst, src); break;
- case 48: movnti_32(dst, src); movnti_16(dst + 32, src + 32); break;
- case 64: movnti_64(dst, src); break;
- case 80: movnti_64(dst, src); movnti_16(dst + 64, src + 64); break;
- case 96: movnti_64(dst, src); movnti_32(dst + 64, src + 64); break;
- default: __memcpy_flushcache(dst, src, cnt); break;
+ if (__builtin_constant_p(cnt)) {
+ switch (cnt) {
+ case 4:
+ asm ("movntil %1, %0" : "=m"(*(u32 *)dst) : "r"(*(u32 *)src));
+ return;
+ case 8:
+ asm ("movntiq %1, %0" : "=m"(*(u64 *)dst) : "r"(*(u64 *)src));
+ return;
+ case 16:
+ asm ("movntiq %1, %0" : "=m"(*(u64 *)dst) : "r"(*(u64 *)src));
+ asm ("movntiq %1, %0" : "=m"(*(u64 *)(dst + 8)) : "r"(*(u64 *)(src + 8)));
+ return;
+ }
}
+ __memcpy_flushcache(dst, src, cnt);
}
-
-#define memcpy_nontemporal memcpy_nontemporal
-/*
- * Reuse the existing x86 flushcache backend as the non-temporal copy
- * primitive.
- */
-static __always_inline void memcpy_nontemporal(void *dst, const void *src,
- size_t cnt)
-{
- memcpy_flushcache(dst, src, cnt);
-}
-
#endif
#endif /* __KERNEL__ */
diff --git a/arch/x86/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
index a73715d6f05c..9e440e30c179 100644
--- a/arch/x86/kernel/cpu/mtrr/amd.c
+++ b/arch/x86/kernel/cpu/mtrr/amd.c
@@ -51,11 +51,10 @@ amd_get_mtrr(unsigned int reg, unsigned long *base,
/**
* amd_set_mtrr - Set variable MTRR register on the local CPU.
- *
- * @reg The register to set.
- * @base The base address of the region.
- * @size The size of the region. If this is 0 the region is disabled.
- * @type The type of the region.
+ * @reg: The register to set.
+ * @base: The base address of the region.
+ * @size: The size of the region. If this is 0 the region is disabled.
+ * @type: The type of the region.
*
* Returns nothing.
*/
diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index 443ef477f746..226660973d51 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -2685,14 +2685,22 @@ static int __set_pages_np(struct page *page, int numpages, unsigned int cpa_flag
return __change_page_attr_set_clr(&cpa, 1);
}
-int set_direct_map_invalid_noflush(struct page *page, unsigned int nr)
+int set_direct_map_invalid_noflush(struct page *page)
{
- return __set_pages_np(page, nr, 0);
+ return __set_pages_np(page, 1, 0);
+}
+
+int set_direct_map_default_noflush(struct page *page)
+{
+ return __set_pages_p(page, 1, 0);
}
-int set_direct_map_default_noflush(struct page *page, unsigned int nr)
+int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
{
- return __set_pages_p(page, nr, 0);
+ if (valid)
+ return __set_pages_p(page, nr, 0);
+
+ return __set_pages_np(page, nr, 0);
}
#ifdef CONFIG_DEBUG_PAGEALLOC
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h
index 60fb67a99729..f00a879dc298 100644
--- a/arch/xtensa/include/asm/pgtable.h
+++ b/arch/xtensa/include/asm/pgtable.h
@@ -204,6 +204,10 @@
*/
#ifndef __ASSEMBLER__
+#define pte_ERROR(e) \
+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+ printk("%s:%d: bad pgd entry %08lx.\n", __FILE__, __LINE__, pgd_val(e))
#ifdef CONFIG_MMU
extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
diff --git a/arch/xtensa/include/asm/tlb.h b/arch/xtensa/include/asm/tlb.h
index 6fb7b78154f6..8c3ceb427018 100644
--- a/arch/xtensa/include/asm/tlb.h
+++ b/arch/xtensa/include/asm/tlb.h
@@ -16,7 +16,7 @@
#include <asm-generic/tlb.h>
-#define __pte_free_tlb(tlb, pte, address) tlb_remove_ptdesc((tlb), page_ptdesc(pte))
+#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
void check_tlb_sanity(void);
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 862cb94a8b43..f10bbf13c242 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -639,10 +639,8 @@ static int acpi_sbs_probe(struct platform_device *pdev)
return -ENODEV;
sbs = kzalloc_obj(struct acpi_sbs);
- if (!sbs) {
- result = -ENOMEM;
- goto end;
- }
+ if (!sbs)
+ return -ENOMEM;
mutex_init(&sbs->lock);
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index e3b69f876d24..3037fd18d420 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -929,6 +929,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN515-46"),
},
},
+ {
+ .callback = video_detect_force_native,
+ /* Acer Nitro AN515-58 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN515-58"),
+ },
+ },
/*
* x86 android tablets which directly control the backlight through
diff --git a/drivers/android/binder/page_range.rs b/drivers/android/binder/page_range.rs
index 71febd3d5b07..52ffbf3504e7 100644
--- a/drivers/android/binder/page_range.rs
+++ b/drivers/android/binder/page_range.rs
@@ -439,9 +439,22 @@ impl ShrinkablePageRange {
// workqueue.
let mm = MmWithUser::into_mmput_async(self.mm.mmget_not_zero().ok_or(ESRCH)?);
{
- let vma_read_guard = mm.vma_start_read_unlocked(vma_addr).ok_or(ESRCH)?;
- let vma = check_vma(&vma_read_guard, self).ok_or(ESRCH)?;
- vma.vm_insert_page(user_page_addr, &new_page)?;
+ let vma_read;
+ let mmap_read;
+ let vma = if let Some(ret) = mm.lock_vma_under_rcu(vma_addr) {
+ vma_read = ret;
+ check_vma(&vma_read, self)
+ } else {
+ mmap_read = mm.mmap_read_lock();
+ mmap_read
+ .vma_lookup(vma_addr)
+ .and_then(|vma| check_vma(vma, self))
+ };
+
+ match vma {
+ Some(vma) => vma.vm_insert_page(user_page_addr, &new_page)?,
+ None => return Err(ESRCH),
+ }
}
let inner = self.lock.lock();
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index d6eae0aa7085..e4488ad86a65 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -259,14 +259,21 @@ static int binder_page_insert(struct binder_alloc *alloc,
struct vm_area_struct *vma;
int ret = -ESRCH;
- vma = vma_start_read_unlocked(mm, addr);
- if (!vma)
+ /* attempt per-vma lock first */
+ vma = lock_vma_under_rcu(mm, addr);
+ if (vma) {
+ if (binder_alloc_is_mapped(alloc))
+ ret = vm_insert_page(vma, addr, page);
+ vma_end_read(vma);
return ret;
+ }
- if (binder_alloc_is_mapped(alloc))
+ /* fall back to mmap_lock */
+ mmap_read_lock(mm);
+ vma = vma_lookup(mm, addr);
+ if (vma && binder_alloc_is_mapped(alloc))
ret = vm_insert_page(vma, addr, page);
-
- vma_end_read(vma);
+ mmap_read_unlock(mm);
return ret;
}
@@ -1135,6 +1142,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
struct vm_area_struct *vma;
struct page *page_to_free;
unsigned long page_addr;
+ int mm_locked = 0;
size_t index;
if (!mmget_not_zero(mm))
@@ -1143,25 +1151,27 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
index = mdata->page_index;
page_addr = alloc->vm_start + index * PAGE_SIZE;
- /*
- * Attempt per-vma lock. This is essentially a
- * "trylock". It can fail even if the VMA exists
- * for 'page_addr'.
- */
+ /* attempt per-vma lock first */
vma = lock_vma_under_rcu(mm, page_addr);
if (!vma) {
- /*
- * If the vma exists, we can't continue because we cannot
- * remove the page from the vma. However, if the vma was
- * unmapped, it's okay to continue.
- */
- if (binder_alloc_is_mapped(alloc))
- goto err_vma_lock_failed;
+ /* fall back to mmap_lock */
+ if (!mmap_read_trylock(mm))
+ goto err_mmap_read_lock_failed;
+ mm_locked = 1;
+ vma = vma_lookup(mm, page_addr);
}
if (!mutex_trylock(&alloc->mutex))
goto err_get_alloc_mutex_failed;
+ /*
+ * Since a binder_alloc can only be mapped once, we ensure
+ * the vma corresponds to this mapping by checking whether
+ * the binder_alloc is still mapped.
+ */
+ if (vma && !binder_alloc_is_mapped(alloc))
+ goto err_invalid_vma;
+
trace_binder_unmap_kernel_start(alloc, index);
page_to_free = alloc->pages[index];
@@ -1172,12 +1182,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
list_lru_isolate(lru, item);
spin_unlock(&lru->lock);
- /*
- * Since a binder_alloc can only be mapped once, we ensure
- * the vma corresponds to this mapping by checking whether
- * the binder_alloc is still mapped.
- */
- if (vma && binder_alloc_is_mapped(alloc)) {
+ if (vma) {
trace_binder_unmap_user_start(alloc, index);
zap_vma_range(vma, page_addr, PAGE_SIZE);
@@ -1186,17 +1191,23 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
}
mutex_unlock(&alloc->mutex);
- if (vma)
+ if (mm_locked)
+ mmap_read_unlock(mm);
+ else
vma_end_read(vma);
mmput_async(mm);
binder_free_page(page_to_free);
return LRU_REMOVED_RETRY;
+err_invalid_vma:
+ mutex_unlock(&alloc->mutex);
err_get_alloc_mutex_failed:
- if (vma)
+ if (mm_locked)
+ mmap_read_unlock(mm);
+ else
vma_end_read(vma);
-err_vma_lock_failed:
+err_mmap_read_lock_failed:
mmput_async(mm);
err_mmget:
return LRU_SKIP;
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
index 028e2f0f587e..974c4691887e 100644
--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -7,8 +7,6 @@
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/cpuhotplug.h>
-#include <linux/highmem.h>
-#include <linux/scatterlist.h>
#include <linux/vmalloc.h>
#include <linux/sysfs.h>
@@ -160,32 +158,17 @@ int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
}
int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm,
- struct scatterlist *sg, unsigned int src_len, void *dst)
+ const void *src, unsigned int src_len, void *dst)
{
struct zcomp_req req = {
+ .src = src,
.dst = dst,
.src_len = src_len,
.dst_len = PAGE_SIZE,
};
- void *src = NULL;
- int ret;
might_sleep();
-
- if (sg_is_last(sg)) {
- /* the object is contained within one page, read it in-place */
- src = kmap_local_page(sg_page(sg));
- req.src = src + sg->offset;
- } else {
- /* the object spans two pages, linearize it into local copy */
- sg_copy_to_buffer(sg, 2, zstrm->local_copy, src_len);
- req.src = zstrm->local_copy;
- }
-
- ret = comp->ops->decompress(comp->params, &zstrm->ctx, &req);
- if (src)
- kunmap_local(src);
- return ret;
+ return comp->ops->decompress(comp->params, &zstrm->ctx, &req);
}
int zcomp_cpu_up_prepare(unsigned int cpu, struct hlist_node *node)
diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h
index f38fd31f9e4e..81a0f3f6ff48 100644
--- a/drivers/block/zram/zcomp.h
+++ b/drivers/block/zram/zcomp.h
@@ -5,8 +5,6 @@
#include <linux/mutex.h>
-struct scatterlist;
-
#define ZCOMP_PARAM_NOT_SET INT_MIN
struct deflate_params {
@@ -93,6 +91,6 @@ void zcomp_stream_put(struct zcomp_strm *zstrm);
int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
const void *src, unsigned int *dst_len);
int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm,
- struct scatterlist *sg, unsigned int src_len, void *dst);
+ const void *src, unsigned int src_len, void *dst);
#endif /* _ZCOMP_H_ */
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 024402438bd1..a9b3bb1d3bef 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -32,7 +32,6 @@
#include <linux/debugfs.h>
#include <linux/cpuhotplug.h>
#include <linux/part_stat.h>
-#include <linux/scatterlist.h>
#include <linux/kernel_read_file.h>
#include <linux/rcupdate.h>
@@ -416,7 +415,7 @@ static ssize_t mem_used_max_store(struct device *dev,
* Mark all pages which are older than or equal to cutoff as IDLE.
* Callers should hold the zram init lock in read mode
*/
-static void mark_idle(struct zram *zram, time64_t cutoff)
+static void mark_idle(struct zram *zram, ktime_t cutoff)
{
int is_idle = 1;
unsigned long nr_pages = zram->disksize >> PAGE_SHIFT;
@@ -440,7 +439,7 @@ static void mark_idle(struct zram *zram, time64_t cutoff)
#ifdef CONFIG_ZRAM_TRACK_ENTRY_ACTIME
is_idle = !cutoff ||
- cutoff > zram->table[index].attr.ac_time;
+ ktime_after(cutoff, zram->table[index].attr.ac_time);
#endif
if (is_idle)
set_slot_flag(zram, index, ZRAM_IDLE);
@@ -454,26 +453,21 @@ static ssize_t idle_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t len)
{
struct zram *zram = dev_to_zram(dev);
- time64_t cutoff = 0;
+ ktime_t cutoff = 0;
if (!sysfs_streq(buf, "all")) {
/*
* If it did not parse as 'all' try to treat it as an integer
* when we have memory tracking enabled.
*/
- time64_t uptime;
u32 age_sec;
- if (!IS_ENABLED(CONFIG_ZRAM_TRACK_ENTRY_ACTIME) ||
- kstrtouint(buf, 0, &age_sec))
+ if (IS_ENABLED(CONFIG_ZRAM_TRACK_ENTRY_ACTIME) &&
+ !kstrtouint(buf, 0, &age_sec))
+ cutoff = ktime_sub((u32)ktime_get_boottime_seconds(),
+ age_sec);
+ else
return -EINVAL;
-
- /* No slot can be older than the system uptime */
- uptime = ktime_get_boottime_seconds();
- if (age_sec >= uptime)
- return len;
-
- cutoff = uptime - age_sec;
}
guard(rwsem_read)(&zram->dev_lock);
@@ -1348,9 +1342,9 @@ static int decompress_bdev_page(struct zram *zram, struct page *page,
unsigned long index)
{
struct zcomp_strm *zstrm;
- struct scatterlist sg[1];
unsigned int size;
int ret, prio;
+ void *src;
slot_lock(zram, index);
/* Since slot was unlocked we need to make sure it's still ZRAM_WB */
@@ -1369,18 +1363,13 @@ static int decompress_bdev_page(struct zram *zram, struct page *page,
size = get_slot_size(zram, index);
prio = get_slot_comp_priority(zram, index);
- sg_init_table(sg, 1);
- sg_set_page(sg, page, size, 0);
-
zstrm = zcomp_stream_get(zram->comps[prio]);
- ret = zcomp_decompress(zram->comps[prio], zstrm, sg, size,
+ src = kmap_local_page(page);
+ ret = zcomp_decompress(zram->comps[prio], zstrm, src, size,
zstrm->local_copy);
- if (!ret) {
- void *dst = kmap_local_page(page);
-
- copy_page(dst, zstrm->local_copy);
- kunmap_local(dst);
- }
+ if (!ret)
+ copy_page(src, zstrm->local_copy);
+ kunmap_local(src);
zcomp_stream_put(zstrm);
slot_unlock(zram, index);
@@ -1728,6 +1717,11 @@ static int comp_params_store(struct zram *zram, u32 prio, s32 level,
dict_path, sz);
return sz;
}
+ if (sz == 0) {
+ pr_err("failed to load dictionary %s (empty file)\n",
+ dict_path);
+ return -EINVAL;
+ }
}
zram->params[prio].dict_sz = sz;
@@ -2092,19 +2086,15 @@ static int read_same_filled_page(struct zram *zram, struct page *page,
static int read_incompressible_page(struct zram *zram, struct page *page,
unsigned long index)
{
- struct scatterlist sg[2];
unsigned long handle;
void *src, *dst;
handle = get_slot_handle(zram, index);
- zs_obj_read_sg_begin(zram->mem_pool, handle, sg, PAGE_SIZE);
- /* an incompressible object never spans two pages */
- src = kmap_local_page(sg_page(sg));
+ src = zs_obj_read_begin(zram->mem_pool, handle, PAGE_SIZE, NULL);
dst = kmap_local_page(page);
copy_page(dst, src);
kunmap_local(dst);
- kunmap_local(src);
- zs_obj_read_sg_end(zram->mem_pool, handle);
+ zs_obj_read_end(zram->mem_pool, handle, PAGE_SIZE, src);
return 0;
}
@@ -2113,10 +2103,9 @@ static int read_compressed_page(struct zram *zram, struct page *page,
unsigned long index)
{
struct zcomp_strm *zstrm;
- struct scatterlist sg[2];
unsigned long handle;
unsigned int size;
- void *dst;
+ void *src, *dst;
int ret, prio;
handle = get_slot_handle(zram, index);
@@ -2124,11 +2113,12 @@ static int read_compressed_page(struct zram *zram, struct page *page,
prio = get_slot_comp_priority(zram, index);
zstrm = zcomp_stream_get(zram->comps[prio]);
- zs_obj_read_sg_begin(zram->mem_pool, handle, sg, size);
+ src = zs_obj_read_begin(zram->mem_pool, handle, size,
+ zstrm->local_copy);
dst = kmap_local_page(page);
- ret = zcomp_decompress(zram->comps[prio], zstrm, sg, size, dst);
+ ret = zcomp_decompress(zram->comps[prio], zstrm, src, size, dst);
kunmap_local(dst);
- zs_obj_read_sg_end(zram->mem_pool, handle);
+ zs_obj_read_end(zram->mem_pool, handle, size, src);
zcomp_stream_put(zstrm);
return ret;
@@ -2138,23 +2128,25 @@ static int read_compressed_page(struct zram *zram, struct page *page,
static int read_from_zspool_raw(struct zram *zram, struct page *page,
unsigned long index)
{
- struct scatterlist sg[2];
+ struct zcomp_strm *zstrm;
unsigned long handle;
unsigned int size;
- void *dst;
+ void *src;
handle = get_slot_handle(zram, index);
size = get_slot_size(zram, index);
/*
- * No decompression takes place here, we copy out raw compressed
- * data directly into the destination page.
+ * We need to get stream just for ->local_copy buffer, in
+ * case if object spans two physical pages. No decompression
+ * takes place here, as we read raw compressed data.
*/
- zs_obj_read_sg_begin(zram->mem_pool, handle, sg, size);
- dst = kmap_local_page(page);
- sg_copy_to_buffer(sg, sg_nents(sg), dst, size);
- kunmap_local(dst);
- zs_obj_read_sg_end(zram->mem_pool, handle);
+ zstrm = zcomp_stream_get(zram->comps[ZRAM_PRIMARY_COMP]);
+ src = zs_obj_read_begin(zram->mem_pool, handle, size,
+ zstrm->local_copy);
+ memcpy_to_page(page, 0, src, size);
+ zs_obj_read_end(zram->mem_pool, handle, size, src);
+ zcomp_stream_put(zstrm);
memzero_page(page, size, PAGE_SIZE - size);
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index bb3bf66937b3..a46d7bf7c4c8 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -3,7 +3,7 @@
# Makefile for the kernel character device drivers.
#
-obj-y += random.o
+obj-y += mem.o random.o
obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o
obj-y += misc.o
obj-$(CONFIG_TEST_MISC_MINOR) += misc_minor_kunit.o
diff --git a/mm/char-mem.c b/drivers/char/mem.c
index c0b5fb019223..63253d1de5d7 100644
--- a/mm/char-mem.c
+++ b/drivers/char/mem.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * mm/char-mem.c
+ * linux/drivers/char/mem.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*
@@ -31,8 +31,6 @@
#include <linux/uaccess.h>
#include <linux/security.h>
-#include "internal.h"
-
#define DEVMEM_MINOR 1
#define DEVPORT_MINOR 4
@@ -508,7 +506,11 @@ static int mmap_zero_prepare(struct vm_area_desc *desc)
if (vma_desc_test(desc, VMA_SHARED_BIT))
return shmem_zero_setup_desc(desc);
- /* MAP_PRIVATE semantics are taken care of for us by core mm. */
+ /*
+ * This is a highly unique situation where we mark a MAP_PRIVATE mapping
+ * of /dev/zero anonymous, despite it not being.
+ */
+ vma_desc_set_anonymous(desc);
return 0;
}
@@ -705,17 +707,6 @@ static const struct memdev {
#endif
};
-/**
- * file_is_dev_zero() - is the specified @file associated with the /dev/zero
- * driver?
- * @file: File to test.
- * Returns: true if it is, false otherwise.
- */
-bool file_is_dev_zero(const struct file *file)
-{
- return file && file->f_op == &zero_fops;
-}
-
static int memory_open(struct inode *inode, struct file *filp)
{
int minor;
diff --git a/drivers/clk/spacemit/ccu-k3.c b/drivers/clk/spacemit/ccu-k3.c
index 92b930d5ff30..39df15c8a3e6 100644
--- a/drivers/clk/spacemit/ccu-k3.c
+++ b/drivers/clk/spacemit/ccu-k3.c
@@ -30,14 +30,87 @@ static const struct ccu_pll_rate_tbl pll2_rate_tbl[] = {
};
static const struct ccu_pll_rate_tbl pll3_rate_tbl[] = {
+ CCU_PLLA_RATE(1050000000UL, 0x0b2b3000, 0x00000000, 0xa0458080),
+ CCU_PLLA_RATE(1100000000UL, 0x0b2d3555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1150000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0458181),
+ CCU_PLLA_RATE(1200000000UL, 0x0b320000, 0x00000000, 0xa0458181),
+ CCU_PLLA_RATE(1250000000UL, 0x0b340555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1300000000UL, 0x0b360aaa, 0x0000ab00, 0xa0458282),
+ CCU_PLLA_RATE(1350000000UL, 0x0b381000, 0x00000000, 0xa0458282),
+ CCU_PLLA_RATE(1400000000UL, 0x0b3a1555, 0x00005500, 0xa0458282),
+ CCU_PLLA_RATE(1450000000UL, 0x0b3c1aaa, 0x0000ab00, 0xa0458383),
+ CCU_PLLA_RATE(1500000000UL, 0x0b3e2000, 0x00000000, 0xa0458383),
+ CCU_PLLA_RATE(1550000000UL, 0x0b402555, 0x00005500, 0xa0458383),
+ CCU_PLLA_RATE(1600000000UL, 0x0b422aaa, 0x0000ab00, 0xa0458484),
+ CCU_PLLA_RATE(1650000000UL, 0x0b443000, 0x00000000, 0xa0458484),
+ CCU_PLLA_RATE(1700000000UL, 0x0b463555, 0x00005500, 0xa0458484),
+ CCU_PLLA_RATE(1750000000UL, 0x0b483aaa, 0x0000ab00, 0xa0458585),
+ CCU_PLLA_RATE(1800000000UL, 0x0b4b0000, 0x00000000, 0xa0458585),
+ CCU_PLLA_RATE(1850000000UL, 0x0b4d0555, 0x00005500, 0xa0458585),
+ CCU_PLLA_RATE(1900000000UL, 0x0b4f0aaa, 0x0000ab00, 0xa0458686),
+ CCU_PLLA_RATE(1950000000UL, 0x0b511000, 0x00000000, 0xa0458686),
+ CCU_PLLA_RATE(2000000000UL, 0x0b292aaa, 0x0000ab00, 0xa0558686),
+ CCU_PLLA_RATE(2050000000UL, 0x0b2a2d55, 0x00005500, 0xa0558686),
+ CCU_PLLA_RATE(2100000000UL, 0x0b2b3000, 0x00000000, 0xa0558787),
+ CCU_PLLA_RATE(2150000000UL, 0x0b2c32aa, 0x0000ab00, 0xa0558787),
CCU_PLLA_RATE(2200000000UL, 0x0b2d3555, 0x00005500, 0xa0558787),
+ CCU_PLLA_RATE(2250000000UL, 0x0b2e3800, 0x00000000, 0xa0558888),
+ CCU_PLLA_RATE(2300000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0558888),
+ CCU_PLLA_RATE(2350000000UL, 0x0b303d55, 0x00005500, 0xa0558888),
+ CCU_PLLA_RATE(2400000000UL, 0x0b320000, 0x00000000, 0xa0558989),
};
static const struct ccu_pll_rate_tbl pll4_rate_tbl[] = {
+ CCU_PLLA_RATE(1050000000UL, 0x0b2b3000, 0x00000000, 0xa0458080),
+ CCU_PLLA_RATE(1100000000UL, 0x0b2d3555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1150000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0458181),
+ CCU_PLLA_RATE(1200000000UL, 0x0b320000, 0x00000000, 0xa0458181),
+ CCU_PLLA_RATE(1250000000UL, 0x0b340555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1300000000UL, 0x0b360aaa, 0x0000ab00, 0xa0458282),
+ CCU_PLLA_RATE(1350000000UL, 0x0b381000, 0x00000000, 0xa0458282),
+ CCU_PLLA_RATE(1400000000UL, 0x0b3a1555, 0x00005500, 0xa0458282),
+ CCU_PLLA_RATE(1450000000UL, 0x0b3c1aaa, 0x0000ab00, 0xa0458383),
+ CCU_PLLA_RATE(1500000000UL, 0x0b3e2000, 0x00000000, 0xa0458383),
+ CCU_PLLA_RATE(1550000000UL, 0x0b402555, 0x00005500, 0xa0458383),
+ CCU_PLLA_RATE(1600000000UL, 0x0b422aaa, 0x0000ab00, 0xa0458484),
+ CCU_PLLA_RATE(1650000000UL, 0x0b443000, 0x00000000, 0xa0458484),
+ CCU_PLLA_RATE(1700000000UL, 0x0b463555, 0x00005500, 0xa0458484),
+ CCU_PLLA_RATE(1750000000UL, 0x0b483aaa, 0x0000ab00, 0xa0458585),
+ CCU_PLLA_RATE(1800000000UL, 0x0b4b0000, 0x00000000, 0xa0458585),
+ CCU_PLLA_RATE(1850000000UL, 0x0b4d0555, 0x00005500, 0xa0458585),
+ CCU_PLLA_RATE(1900000000UL, 0x0b4f0aaa, 0x0000ab00, 0xa0458686),
+ CCU_PLLA_RATE(1950000000UL, 0x0b511000, 0x00000000, 0xa0458686),
+ CCU_PLLA_RATE(2000000000UL, 0x0b292aaa, 0x0000ab00, 0xa0558686),
+ CCU_PLLA_RATE(2050000000UL, 0x0b2a2d55, 0x00005500, 0xa0558686),
+ CCU_PLLA_RATE(2100000000UL, 0x0b2b3000, 0x00000000, 0xa0558787),
+ CCU_PLLA_RATE(2150000000UL, 0x0b2c32aa, 0x0000ab00, 0xa0558787),
CCU_PLLA_RATE(2200000000UL, 0x0b2d3555, 0x00005500, 0xa0558787),
+ CCU_PLLA_RATE(2250000000UL, 0x0b2e3800, 0x00000000, 0xa0558888),
+ CCU_PLLA_RATE(2300000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0558888),
+ CCU_PLLA_RATE(2350000000UL, 0x0b303d55, 0x00005500, 0xa0558888),
+ CCU_PLLA_RATE(2400000000UL, 0x0b320000, 0x00000000, 0xa0558989),
};
static const struct ccu_pll_rate_tbl pll5_rate_tbl[] = {
+ CCU_PLLA_RATE(1050000000UL, 0x0b2b3000, 0x00000000, 0xa0458080),
+ CCU_PLLA_RATE(1100000000UL, 0x0b2d3555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1150000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0458181),
+ CCU_PLLA_RATE(1200000000UL, 0x0b320000, 0x00000000, 0xa0458181),
+ CCU_PLLA_RATE(1250000000UL, 0x0b340555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1300000000UL, 0x0b360aaa, 0x0000ab00, 0xa0458282),
+ CCU_PLLA_RATE(1350000000UL, 0x0b381000, 0x00000000, 0xa0458282),
+ CCU_PLLA_RATE(1400000000UL, 0x0b3a1555, 0x00005500, 0xa0458282),
+ CCU_PLLA_RATE(1450000000UL, 0x0b3c1aaa, 0x0000ab00, 0xa0458383),
+ CCU_PLLA_RATE(1500000000UL, 0x0b3e2000, 0x00000000, 0xa0458383),
+ CCU_PLLA_RATE(1550000000UL, 0x0b402555, 0x00005500, 0xa0458383),
+ CCU_PLLA_RATE(1600000000UL, 0x0b422aaa, 0x0000ab00, 0xa0458484),
+ CCU_PLLA_RATE(1650000000UL, 0x0b443000, 0x00000000, 0xa0458484),
+ CCU_PLLA_RATE(1700000000UL, 0x0b463555, 0x00005500, 0xa0458484),
+ CCU_PLLA_RATE(1750000000UL, 0x0b483aaa, 0x0000ab00, 0xa0458585),
+ CCU_PLLA_RATE(1800000000UL, 0x0b4b0000, 0x00000000, 0xa0458585),
+ CCU_PLLA_RATE(1850000000UL, 0x0b4d0555, 0x00005500, 0xa0458585),
+ CCU_PLLA_RATE(1900000000UL, 0x0b4f0aaa, 0x0000ab00, 0xa0458686),
+ CCU_PLLA_RATE(1950000000UL, 0x0b511000, 0x00000000, 0xa0458686),
CCU_PLLA_RATE(2000000000UL, 0x0b292aaa, 0x0000ab00, 0xa0558686),
};
@@ -50,6 +123,25 @@ static const struct ccu_pll_rate_tbl pll7_rate_tbl[] = {
};
static const struct ccu_pll_rate_tbl pll8_rate_tbl[] = {
+ CCU_PLLA_RATE(1050000000UL, 0x0b2b3000, 0x00000000, 0xa0458080),
+ CCU_PLLA_RATE(1100000000UL, 0x0b2d3555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1150000000UL, 0x0b2f3aaa, 0x0000ab00, 0xa0458181),
+ CCU_PLLA_RATE(1200000000UL, 0x0b320000, 0x00000000, 0xa0458181),
+ CCU_PLLA_RATE(1250000000UL, 0x0b340555, 0x00005500, 0xa0458181),
+ CCU_PLLA_RATE(1300000000UL, 0x0b360aaa, 0x0000ab00, 0xa0458282),
+ CCU_PLLA_RATE(1350000000UL, 0x0b381000, 0x00000000, 0xa0458282),
+ CCU_PLLA_RATE(1400000000UL, 0x0b3a1555, 0x00005500, 0xa0458282),
+ CCU_PLLA_RATE(1450000000UL, 0x0b3c1aaa, 0x0000ab00, 0xa0458383),
+ CCU_PLLA_RATE(1500000000UL, 0x0b3e2000, 0x00000000, 0xa0458383),
+ CCU_PLLA_RATE(1550000000UL, 0x0b402555, 0x00005500, 0xa0458383),
+ CCU_PLLA_RATE(1600000000UL, 0x0b422aaa, 0x0000ab00, 0xa0458484),
+ CCU_PLLA_RATE(1650000000UL, 0x0b443000, 0x00000000, 0xa0458484),
+ CCU_PLLA_RATE(1700000000UL, 0x0b463555, 0x00005500, 0xa0458484),
+ CCU_PLLA_RATE(1750000000UL, 0x0b483aaa, 0x0000ab00, 0xa0458585),
+ CCU_PLLA_RATE(1800000000UL, 0x0b4b0000, 0x00000000, 0xa0458585),
+ CCU_PLLA_RATE(1850000000UL, 0x0b4d0555, 0x00005500, 0xa0458585),
+ CCU_PLLA_RATE(1900000000UL, 0x0b4f0aaa, 0x0000ab00, 0xa0458686),
+ CCU_PLLA_RATE(1950000000UL, 0x0b511000, 0x00000000, 0xa0458686),
CCU_PLLA_RATE(2000000000UL, 0x0b292aaa, 0x0000ab00, 0xa0558686),
};
diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c
index c897ad7e681e..aedbe78bf1e4 100644
--- a/drivers/clk/ti/clockdomain.c
+++ b/drivers/clk/ti/clockdomain.c
@@ -104,7 +104,7 @@ int omap2_init_clk_clkdm(struct clk_hw *hw)
if (!clk->clkdm_name)
return 0;
- clk_name = __clk_get_name(hw->clk);
+ clk_name = clk_hw_get_name(hw);
clkdm = ti_clk_ll_ops->clkdm_lookup(clk->clkdm_name);
if (clkdm) {
diff --git a/drivers/crypto/atmel-ecc.c b/drivers/crypto/atmel-ecc.c
index 0904bb47fd0a..b538e818a26f 100644
--- a/drivers/crypto/atmel-ecc.c
+++ b/drivers/crypto/atmel-ecc.c
@@ -177,16 +177,14 @@ static int atmel_ecdh_compute_shared_secret(struct kpp_request *req)
work_data->client = ctx->client;
ret = atmel_i2c_init_ecdh_cmd(&work_data->cmd, req->src);
- if (ret)
- goto free_work_data;
+ if (ret) {
+ kfree(work_data);
+ return ret;
+ }
atmel_i2c_enqueue(work_data, atmel_ecdh_done, req);
return -EINPROGRESS;
-
-free_work_data:
- kfree(work_data);
- return ret;
}
static struct i2c_client *atmel_ecc_i2c_client_alloc(void)
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 239469f6882e..cf725a6ac0fb 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -583,12 +583,29 @@ static int caam_jr_probe(struct platform_device *pdev)
struct caam_drv_private_jr *jrpriv;
static int total_jobrs;
void __iomem *ctrl;
+ struct resource *r;
int error;
int irq;
- ctrl = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(ctrl))
- return PTR_ERR(ctrl);
+ /*
+ * The job rings live inside the register window of their parent
+ * fsl,sec-v4.0 node, which caam_probe() already reserves (and maps)
+ * via devm_of_iomap(). A requested region that overlaps that
+ * reservation, e.g. from devm_platform_ioremap_resource(), would
+ * therefore fail with -EBUSY, so map the registers without claiming
+ * the region here.
+ */
+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!r) {
+ dev_err(&pdev->dev, "platform_get_resource() failed\n");
+ return -EINVAL;
+ }
+
+ ctrl = devm_ioremap(&pdev->dev, r->start, resource_size(r));
+ if (!ctrl) {
+ dev_err(&pdev->dev, "devm_ioremap() failed\n");
+ return -ENOMEM;
+ }
irq = platform_get_irq(pdev, 0);
if (irq < 0)
diff --git a/drivers/crypto/intel/qat/qat_common/adf_sysfs_kpt.c b/drivers/crypto/intel/qat/qat_common/adf_sysfs_kpt.c
index 1f733ae80bdf..a0db98f33f1f 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_sysfs_kpt.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_sysfs_kpt.c
@@ -31,6 +31,7 @@ static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
struct adf_hw_device_data *hw_data;
struct adf_accel_dev *accel_dev;
bool enable;
+ int svc;
int ret;
accel_dev = adf_devmgr_pci_to_accel_dev(to_pci_dev(dev));
@@ -38,14 +39,25 @@ static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
return -EINVAL;
if (adf_dev_started(accel_dev)) {
- dev_info(dev, "Device qat_dev%d must be down before enabling KPT\n",
+ dev_info(dev, "Device qat_dev%d must be down before changing KPT state\n",
accel_dev->accel_id);
return -EINVAL;
}
- if (adf_get_service_enabled(accel_dev) != SVC_ASYM) {
- dev_info(dev, "KPT can only be enabled when the asymmetric service is enabled\n");
- return -EINVAL;
+ ret = kstrtobool(buf, &enable);
+ if (ret)
+ return ret;
+
+ if (enable) {
+ svc = adf_get_service_enabled(accel_dev);
+ if (svc < 0)
+ return svc;
+
+ if (svc != SVC_ASYM) {
+ dev_info(dev,
+ "KPT can only be enabled when the asymmetric crypto service is enabled\n");
+ return -EINVAL;
+ }
}
hw_data = GET_HW_DATA(accel_dev);
@@ -59,10 +71,6 @@ static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
if (!hw_data->accel_capabilities_mask)
return -EINVAL;
- ret = kstrtobool(buf, &enable);
- if (ret)
- return ret;
-
user_data = GET_KPT_USER_DATA(accel_dev);
user_data->enable = enable;
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index 0c80b76a5f9b..39fe283cbc74 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -240,6 +240,18 @@ static resource_size_t __adjust_skip(struct cxl_dev_state *cxlds,
}
#define release_skip(c, b, l) __adjust_skip((c), (b), (l), NULL)
+static void cxl_dpa_release_region(struct resource *parent,
+ struct resource *res)
+{
+ /* zero sized decoders are not tracked in the resource tree */
+ if (resource_size(res) == 0) {
+ kfree(res);
+ return;
+ }
+
+ __release_region(parent, res->start, resource_size(res));
+}
+
/*
* Must be called in a context that synchronizes against this decoder's
* port ->remove() callback (like an endpoint decoder sysfs attribute)
@@ -256,7 +268,7 @@ static void __cxl_dpa_release(struct cxl_endpoint_decoder *cxled)
/* save @skip_start, before @res is released */
skip_start = res->start - cxled->skip;
- __release_region(&cxlds->dpa_res, res->start, resource_size(res));
+ cxl_dpa_release_region(&cxlds->dpa_res, res);
if (cxled->skip)
release_skip(cxlds, skip_start, cxled->skip);
cxled->skip = 0;
@@ -336,6 +348,27 @@ static int request_skip(struct cxl_dev_state *cxlds,
return -EBUSY;
}
+static struct resource *cxl_dpa_request_region(struct resource *parent,
+ resource_size_t start,
+ resource_size_t n,
+ const char *name)
+{
+ struct resource *res;
+
+ if (!n) {
+ res = kmalloc_obj(*res);
+ if (!res)
+ return ERR_PTR(-ENOMEM);
+
+ *res = DEFINE_RES_NAMED(start, 0, name, IORESOURCE_MEM);
+
+ return res;
+ }
+
+ res = __request_region(parent, start, n, name, 0);
+ return res ?: ERR_PTR(-EBUSY);
+}
+
static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
resource_size_t base, resource_size_t len,
resource_size_t skipped)
@@ -349,12 +382,6 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
lockdep_assert_held_write(&cxl_rwsem.dpa);
- if (!len) {
- dev_warn(dev, "decoder%d.%d: empty reservation attempted\n",
- port->id, cxled->cxld.id);
- return -EINVAL;
- }
-
if (cxled->dpa_res) {
dev_dbg(dev, "decoder%d.%d: existing allocation %pr assigned\n",
port->id, cxled->cxld.id, cxled->dpa_res);
@@ -378,14 +405,14 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
if (rc)
return rc;
}
- res = __request_region(&cxlds->dpa_res, base, len,
- dev_name(&cxled->cxld.dev), 0);
- if (!res) {
+ res = cxl_dpa_request_region(&cxlds->dpa_res, base, len,
+ dev_name(&cxled->cxld.dev));
+ if (IS_ERR(res)) {
dev_dbg(dev, "decoder%d.%d: failed to reserve allocation\n",
port->id, cxled->cxld.id);
if (skipped)
release_skip(cxlds, base - skipped, skipped);
- return -EBUSY;
+ return PTR_ERR(res);
}
cxled->dpa_res = res;
cxled->skip = skipped;
@@ -402,7 +429,8 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
break;
}
- if (cxled->part < 0)
+ /* Empty decoders may not be contained by a partition boundary */
+ if (cxled->part < 0 && resource_size(res))
dev_warn(dev, "decoder%d.%d: %pr does not map any partition\n",
port->id, cxled->cxld.id, res);
@@ -1031,12 +1059,6 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
return -ENXIO;
}
- if (size == 0) {
- dev_warn(&port->dev,
- "decoder%d.%d: Committed with zero size\n",
- port->id, cxld->id);
- return -ENXIO;
- }
port->commit_end = cxld->id;
} else {
if (cxled) {
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index 55828a836c01..1a2553332801 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -1386,6 +1386,9 @@ int cxl_mem_get_poison(struct cxl_memdev *cxlmd, u64 offset, u64 len,
int nr_records = 0;
int rc;
+ if (!len)
+ return 0;
+
ACQUIRE(mutex_intr, lock)(&mds->poison.mutex);
if ((rc = ACQUIRE_ERR(mutex_intr, &lock)))
return rc;
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 4f6069451fed..f54acbf68e84 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -2113,7 +2113,7 @@ static int cxl_region_attach(struct cxl_region *cxlr,
return -ENXIO;
}
- if (!cxled->dpa_res) {
+ if (cxled_empty(cxled)) {
dev_dbg(&cxlr->dev, "%s:%s: missing DPA allocation.\n",
dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev));
return -ENXIO;
@@ -2903,6 +2903,16 @@ struct cxl_poison_context {
u64 offset;
};
+/*
+ * A device may answer a Get Poison List request with "physical address
+ * specified is invalid" (-EFAULT). That answer is tolerated for a RAM
+ * partition and the poison walk continues.
+ */
+static inline bool poison_efault_forgiven(int rc, enum cxl_partition_mode mode)
+{
+ return rc == -EFAULT && mode == CXL_PARTMODE_RAM;
+}
+
static int cxl_get_poison_unmapped(struct cxl_memdev *cxlmd,
struct cxl_poison_context *ctx)
{
@@ -2931,7 +2941,7 @@ static int cxl_get_poison_unmapped(struct cxl_memdev *cxlmd,
if (!length)
break;
rc = cxl_mem_get_poison(cxlmd, offset, length, NULL);
- if (rc == -EFAULT && cxlds->part[i].mode == CXL_PARTMODE_RAM)
+ if (poison_efault_forgiven(rc, cxlds->part[i].mode))
continue;
if (rc)
break;
@@ -2948,37 +2958,40 @@ static int poison_by_decoder(struct device *dev, void *arg)
struct cxl_dev_state *cxlds;
struct cxl_memdev *cxlmd;
u64 offset, length;
- int rc = 0;
+ int rc;
if (!is_endpoint_decoder(dev))
- return rc;
+ return 0;
cxled = to_cxl_endpoint_decoder(dev);
if (!cxled->dpa_res)
- return rc;
+ return 0;
- cxlmd = cxled_to_memdev(cxled);
- cxlds = cxlmd->cxlds;
- mode = cxlds->part[cxled->part].mode;
+ /*
+ * Handle the degenerate case of a device with only empty decoders. An
+ * empty decoder can still map a non-zero skip range, so advance the
+ * walk to commit_end either way.
+ */
+ if (cxled->part >= 0) {
+ cxlmd = cxled_to_memdev(cxled);
+ cxlds = cxlmd->cxlds;
+ mode = cxlds->part[cxled->part].mode;
- if (cxled->skip) {
- offset = cxled->dpa_res->start - cxled->skip;
- length = cxled->skip;
- rc = cxl_mem_get_poison(cxlmd, offset, length, NULL);
- if (rc == -EFAULT && mode == CXL_PARTMODE_RAM)
- rc = 0;
- if (rc)
+ if (cxled->skip) {
+ offset = cxled->dpa_res->start - cxled->skip;
+ length = cxled->skip;
+ rc = cxl_mem_get_poison(cxlmd, offset, length, NULL);
+ if (rc && !poison_efault_forgiven(rc, mode))
+ return rc;
+ }
+
+ offset = cxled->dpa_res->start;
+ length = cxled->dpa_res->end - offset + 1;
+ rc = cxl_mem_get_poison(cxlmd, offset, length, cxled->cxld.region);
+ if (rc && !poison_efault_forgiven(rc, mode))
return rc;
}
- offset = cxled->dpa_res->start;
- length = cxled->dpa_res->end - offset + 1;
- rc = cxl_mem_get_poison(cxlmd, offset, length, cxled->cxld.region);
- if (rc == -EFAULT && mode == CXL_PARTMODE_RAM)
- rc = 0;
- if (rc)
- return rc;
-
/* Iterate until commit_end is reached */
if (cxled->cxld.id == ctx->port->commit_end) {
ctx->offset = cxled->dpa_res->end + 1;
@@ -3000,9 +3013,17 @@ int cxl_get_poison_by_endpoint(struct cxl_port *port)
};
rc = device_for_each_child(&port->dev, &ctx, poison_by_decoder);
- if (rc == 1)
+ if (rc == 1) {
+ /*
+ * No decoder with a sized DPA reservation was walked
+ * (every committed decoder is zero-size): scan all
+ * partitions in full.
+ */
+ if (ctx.part < 0)
+ ctx.part = 0;
rc = cxl_get_poison_unmapped(to_cxl_memdev(port->uport_dev),
&ctx);
+ }
return rc;
}
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index cab8ce39f465..3ef0810ab86b 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -336,6 +336,16 @@ struct cxl_endpoint_decoder {
int pos;
};
+/*
+ * The common case is decoders with no reservation, but also handle
+ * decoders with a zero-sized reservation that firmware may install for
+ * security lockdown purposes.
+ */
+static inline bool cxled_empty(struct cxl_endpoint_decoder *cxled)
+{
+ return !cxled->dpa_res || !resource_size(cxled->dpa_res);
+}
+
/**
* struct cxl_switch_decoder - Switch specific CXL HDM Decoder
* @cxld: base cxl_decoder object
diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c
index 99cf77b6b699..c12fd0b89883 100644
--- a/drivers/cxl/port.c
+++ b/drivers/cxl/port.c
@@ -46,6 +46,9 @@ static int discover_region(struct device *dev, void *unused)
if (cxled->state != CXL_DECODER_STATE_AUTO)
return 0;
+ if (cxled_empty(cxled))
+ return 0;
+
/*
* Region enumeration is opportunistic, if this add-event fails,
* continue to the next endpoint decoder.
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index 6250954b0fa7..602f9a0839a9 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -8,8 +8,6 @@ if DAX
config DEV_DAX
tristate "Device DAX: direct access mapping device"
depends on TRANSPARENT_HUGEPAGE
- depends on ZONE_DEVICE
- select SPARSEMEM_VMEMMAP_OPTIMIZATION if ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
help
Support raw access to differentiated (persistence, bandwidth,
latency...) memory via an mmap(2) capable character
diff --git a/drivers/dma/arm-dma350.c b/drivers/dma/arm-dma350.c
index 09403aca8bb0..52f5242ea332 100644
--- a/drivers/dma/arm-dma350.c
+++ b/drivers/dma/arm-dma350.c
@@ -512,7 +512,7 @@ static int d350_alloc_chan_resources(struct dma_chan *chan)
{
struct d350_chan *dch = to_d350_chan(chan);
int ret = request_irq(dch->irq, d350_irq, IRQF_SHARED,
- dev_name(&dch->vc.chan.dev->device), dch);
+ vchan_chan_name(&dch->vc), dch);
if (!ret)
writel_relaxed(CH_INTREN_DONE | CH_INTREN_ERR, dch->base + CH_INTREN);
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index cae26ea890fa..3fedc907db63 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -381,23 +381,18 @@ static inline struct at_dma *to_at_dma(struct dma_device *ddev)
/*-- Helper functions ------------------------------------------------*/
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
#if defined(VERBOSE_DEBUG)
static void vdbg_dump_regs(struct at_dma_chan *atchan)
{
struct at_dma *atdma = to_at_dma(atchan->vc.chan.device);
- dev_err(chan2dev(&atchan->vc.chan),
+ dev_err(vchan_chan_dev(&atchan->vc),
" channel %d : imr = 0x%x, chsr = 0x%x\n",
atchan->vc.chan.chan_id,
dma_readl(atdma, EBCIMR),
dma_readl(atdma, CHSR));
- dev_err(chan2dev(&atchan->vc.chan),
+ dev_err(vchan_chan_dev(&atchan->vc),
" channel: s0x%x d0x%x ctrl0x%x:0x%x cfg0x%x l0x%x\n",
channel_readl(atchan, SADDR),
channel_readl(atchan, DADDR),
@@ -412,7 +407,7 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
{
- dev_crit(chan2dev(&atchan->vc.chan),
+ dev_crit(vchan_chan_dev(&atchan->vc),
"desc: s%pad d%pad ctrl0x%x:0x%x l%pad\n",
&lli->saddr, &lli->daddr,
lli->ctrla, lli->ctrlb, &lli->dscr);
@@ -790,8 +785,8 @@ static void atc_handle_error(struct at_dma_chan *atchan, unsigned int i)
* controller flagged an error instead of scribbling over
* random memory locations.
*/
- dev_crit(chan2dev(&atchan->vc.chan), "Bad descriptor submitted for DMA!\n");
- dev_crit(chan2dev(&atchan->vc.chan), "cookie: %d\n",
+ dev_crit(vchan_chan_dev(&atchan->vc), "Bad descriptor submitted for DMA!\n");
+ dev_crit(vchan_chan_dev(&atchan->vc), "cookie: %d\n",
desc->vd.tx.cookie);
for (i = 0; i < desc->sglen; i++)
atc_dump_lli(atchan, desc->sg[i].lli);
@@ -886,7 +881,7 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
first = xt->sgl;
- dev_info(chan2dev(chan),
+ dev_info(dmaengine_chan_dev(chan),
"%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
__func__, &xt->src_start, &xt->dst_start, xt->numf,
xt->frame_size, flags);
@@ -903,7 +898,7 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
if ((chunk->size != xt->sgl->size) ||
(dmaengine_get_dst_icg(xt, chunk) != dmaengine_get_dst_icg(xt, first)) ||
(dmaengine_get_src_icg(xt, chunk) != dmaengine_get_src_icg(xt, first))) {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"%s: the controller can transfer only identical chunks\n",
__func__);
return NULL;
@@ -916,7 +911,7 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
xfer_count = len >> dwidth;
if (xfer_count > ATC_BTSIZE_MAX) {
- dev_err(chan2dev(chan), "%s: buffer is too big\n", __func__);
+ dev_err(dmaengine_chan_dev(chan), "%s: buffer is too big\n", __func__);
return NULL;
}
@@ -983,11 +978,11 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
u32 ctrla;
u32 ctrlb;
- dev_dbg(chan2dev(chan), "prep_dma_memcpy: d%pad s%pad l0x%zx f0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "prep_dma_memcpy: d%pad s%pad l0x%zx f0x%lx\n",
&dest, &src, len, flags);
if (unlikely(!len)) {
- dev_err(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
+ dev_err(dmaengine_chan_dev(chan), "prep_dma_memcpy: length is zero!\n");
return NULL;
}
@@ -1062,7 +1057,7 @@ static int atdma_create_memset_lli(struct dma_chan *chan,
xfer_count = len >> 2;
if (xfer_count > ATC_BTSIZE_MAX) {
- dev_err(chan2dev(chan), "%s: buffer is too big\n", __func__);
+ dev_err(dmaengine_chan_dev(chan), "%s: buffer is too big\n", __func__);
return -EINVAL;
}
@@ -1102,23 +1097,23 @@ atc_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value,
char fill_pattern;
int ret;
- dev_vdbg(chan2dev(chan), "%s: d%pad v0x%x l0x%zx f0x%lx\n", __func__,
+ dev_vdbg(dmaengine_chan_dev(chan), "%s: d%pad v0x%x l0x%zx f0x%lx\n", __func__,
&dest, value, len, flags);
if (unlikely(!len)) {
- dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: length is zero!\n", __func__);
return NULL;
}
if (!is_dma_fill_aligned(chan->device, dest, 0, len)) {
- dev_dbg(chan2dev(chan), "%s: buffer is not aligned\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: buffer is not aligned\n",
__func__);
return NULL;
}
vaddr = dma_pool_alloc(atdma->memset_pool, GFP_NOWAIT, &paddr);
if (!vaddr) {
- dev_err(chan2dev(chan), "%s: couldn't allocate buffer\n",
+ dev_err(dmaengine_chan_dev(chan), "%s: couldn't allocate buffer\n",
__func__);
return NULL;
}
@@ -1174,18 +1169,18 @@ atc_prep_dma_memset_sg(struct dma_chan *chan,
int i;
int ret;
- dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%x f0x%lx\n", __func__,
+ dev_vdbg(dmaengine_chan_dev(chan), "%s: v0x%x l0x%x f0x%lx\n", __func__,
value, sg_len, flags);
if (unlikely(!sgl || !sg_len)) {
- dev_dbg(chan2dev(chan), "%s: scatterlist is empty!\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: scatterlist is empty!\n",
__func__);
return NULL;
}
vaddr = dma_pool_alloc(atdma->memset_pool, GFP_NOWAIT, &paddr);
if (!vaddr) {
- dev_err(chan2dev(chan), "%s: couldn't allocate buffer\n",
+ dev_err(dmaengine_chan_dev(chan), "%s: couldn't allocate buffer\n",
__func__);
return NULL;
}
@@ -1200,11 +1195,11 @@ atc_prep_dma_memset_sg(struct dma_chan *chan,
dma_addr_t dest = sg_dma_address(sg);
size_t len = sg_dma_len(sg);
- dev_vdbg(chan2dev(chan), "%s: d%pad, l0x%zx\n",
+ dev_vdbg(dmaengine_chan_dev(chan), "%s: d%pad, l0x%zx\n",
__func__, &dest, len);
if (!is_dma_fill_aligned(chan->device, dest, 0, len)) {
- dev_err(chan2dev(chan), "%s: buffer is not aligned\n",
+ dev_err(dmaengine_chan_dev(chan), "%s: buffer is not aligned\n",
__func__);
goto err_free_desc;
}
@@ -1264,13 +1259,13 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
struct scatterlist *sg;
size_t total_len = 0;
- dev_vdbg(chan2dev(chan), "prep_slave_sg (%d): %s f0x%lx\n",
+ dev_vdbg(dmaengine_chan_dev(chan), "prep_slave_sg (%d): %s f0x%lx\n",
sg_len,
direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
flags);
if (unlikely(!atslave || !sg_len)) {
- dev_dbg(chan2dev(chan), "prep_slave_sg: sg length is zero!\n");
+ dev_dbg(dmaengine_chan_dev(chan), "prep_slave_sg: sg length is zero!\n");
return NULL;
}
@@ -1310,7 +1305,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
mem = sg_dma_address(sg);
len = sg_dma_len(sg);
if (unlikely(!len)) {
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"prep_slave_sg: sg(%d) data length is zero\n", i);
goto err;
}
@@ -1359,7 +1354,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
mem = sg_dma_address(sg);
len = sg_dma_len(sg);
if (unlikely(!len)) {
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"prep_slave_sg: sg(%d) data length is zero\n", i);
goto err;
}
@@ -1392,7 +1387,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
return vchan_tx_prep(&atchan->vc, &desc->vd, flags);
err_desc_get:
- dev_err(chan2dev(chan), "not enough descriptors available\n");
+ dev_err(dmaengine_chan_dev(chan), "not enough descriptors available\n");
err:
atdma_desc_free(&desc->vd);
return NULL;
@@ -1503,19 +1498,19 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
unsigned int periods = buf_len / period_len;
unsigned int i;
- dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%zu/%zu)\n",
+ dev_vdbg(dmaengine_chan_dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%zu/%zu)\n",
direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
&buf_addr,
periods, buf_len, period_len);
if (unlikely(!atslave || !buf_len || !period_len)) {
- dev_dbg(chan2dev(chan), "prep_dma_cyclic: length is zero!\n");
+ dev_dbg(dmaengine_chan_dev(chan), "prep_dma_cyclic: length is zero!\n");
return NULL;
}
was_cyclic = test_and_set_bit(ATC_IS_CYCLIC, &atchan->status);
if (was_cyclic) {
- dev_dbg(chan2dev(chan), "prep_dma_cyclic: channel in use!\n");
+ dev_dbg(dmaengine_chan_dev(chan), "prep_dma_cyclic: channel in use!\n");
return NULL;
}
@@ -1561,7 +1556,7 @@ static int atc_config(struct dma_chan *chan,
{
struct at_dma_chan *atchan = to_at_dma_chan(chan);
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
/* Check if it is chan is configured for slave transfers */
if (!chan->private)
@@ -1582,7 +1577,7 @@ static int atc_pause(struct dma_chan *chan)
int chan_id = atchan->vc.chan.chan_id;
unsigned long flags;
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
spin_lock_irqsave(&atchan->vc.lock, flags);
@@ -1601,7 +1596,7 @@ static int atc_resume(struct dma_chan *chan)
int chan_id = atchan->vc.chan.chan_id;
unsigned long flags;
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
if (!atc_chan_is_paused(atchan))
return 0;
@@ -1625,7 +1620,7 @@ static int atc_terminate_all(struct dma_chan *chan)
LIST_HEAD(list);
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
/*
* This is only called when something went wrong elsewhere, so
@@ -1691,13 +1686,13 @@ atc_tx_status(struct dma_chan *chan,
spin_unlock_irqrestore(&atchan->vc.lock, flags);
if (unlikely(ret < 0)) {
- dev_vdbg(chan2dev(chan), "get residual bytes error\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "get residual bytes error\n");
return DMA_ERROR;
} else {
dma_set_residue(txstate, residue);
}
- dev_vdbg(chan2dev(chan), "tx_status %d: cookie = %d residue = %u\n",
+ dev_vdbg(dmaengine_chan_dev(chan), "tx_status %d: cookie = %d residue = %u\n",
dma_status, cookie, residue);
return dma_status;
@@ -1729,11 +1724,11 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
struct at_dma_slave *atslave;
u32 cfg;
- dev_vdbg(chan2dev(chan), "alloc_chan_resources\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "alloc_chan_resources\n");
/* ASSERT: channel is idle */
if (atc_chan_is_enabled(atchan)) {
- dev_dbg(chan2dev(chan), "DMA channel not idle ?\n");
+ dev_dbg(dmaengine_chan_dev(chan), "DMA channel not idle ?\n");
return -EIO;
}
@@ -1782,7 +1777,7 @@ static void atc_free_chan_resources(struct dma_chan *chan)
chan->private = NULL;
}
- dev_vdbg(chan2dev(chan), "free_chan_resources: done\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "free_chan_resources: done\n");
}
#ifdef CONFIG_OF
@@ -2171,7 +2166,7 @@ static void atc_suspend_cyclic(struct at_dma_chan *atchan)
/* Channel should be paused by user
* do it anyway even if it is not done already */
if (!atc_chan_is_paused(atchan)) {
- dev_warn(chan2dev(chan),
+ dev_warn(dmaengine_chan_dev(chan),
"cyclic channel not paused, should be done by channel user\n");
atc_pause(chan);
}
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 901971e8bae6..d40a8b40dddc 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -324,11 +324,6 @@ static inline struct at_xdmac_chan *to_at_xdmac_chan(struct dma_chan *dchan)
return container_of(dchan, struct at_xdmac_chan, chan);
}
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline struct at_xdmac *to_at_xdmac(struct dma_device *ddev)
{
return container_of(ddev, struct at_xdmac, dma);
@@ -459,7 +454,7 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
if (ret < 0)
return;
- dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);
/* Set transfer as active to not try to start it again. */
first->active_xfer = true;
@@ -496,7 +491,7 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
| AT_XDMAC_CNDC_NDE;
at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, reg);
- dev_vdbg(chan2dev(&atchan->chan),
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan),
"%s: CC=0x%08x CNDA=0x%08x, CNDC=0x%08x, CSA=0x%08x, CDA=0x%08x, CUBC=0x%08x\n",
__func__, at_xdmac_chan_read(atchan, AT_XDMAC_CC),
at_xdmac_chan_read(atchan, AT_XDMAC_CNDA),
@@ -524,12 +519,12 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
at_xdmac_chan_write(atchan, AT_XDMAC_CIE,
reg | AT_XDMAC_CIE_LIE);
at_xdmac_write(atxdmac, AT_XDMAC_GIE, atchan->mask);
- dev_vdbg(chan2dev(&atchan->chan),
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan),
"%s: enable channel (0x%08x)\n", __func__, atchan->mask);
wmb();
at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask);
- dev_vdbg(chan2dev(&atchan->chan),
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan),
"%s: CC=0x%08x CNDA=0x%08x, CNDC=0x%08x, CSA=0x%08x, CDA=0x%08x, CUBC=0x%08x\n",
__func__, at_xdmac_chan_read(atchan, AT_XDMAC_CC),
at_xdmac_chan_read(atchan, AT_XDMAC_CNDA),
@@ -552,7 +547,7 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx)
list_add_tail(&desc->xfer_node, &atchan->xfers_list);
spin_unlock_irqrestore(&atchan->lock, irqflags);
- dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
+ dev_vdbg(dmaengine_chan_dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
__func__, atchan, desc);
return cookie;
@@ -612,7 +607,7 @@ static void at_xdmac_queue_desc(struct dma_chan *chan,
prev->lld.mbr_nda = desc->tx_dma_desc.phys;
prev->lld.mbr_ubc |= AT_XDMAC_MBR_UBC_NDE;
- dev_dbg(chan2dev(chan), "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
__func__, prev, &prev->lld.mbr_nda);
}
@@ -624,7 +619,7 @@ static inline void at_xdmac_increment_block_count(struct dma_chan *chan,
desc->lld.mbr_bc++;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: incrementing the block count of the desc 0x%p\n",
__func__, desc);
}
@@ -680,13 +675,13 @@ static int at_xdmac_compute_chan_conf(struct dma_chan *chan,
csize = ffs(atchan->sconfig.src_maxburst) - 1;
if (csize < 0) {
- dev_err(chan2dev(chan), "invalid src maxburst value\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid src maxburst value\n");
return -EINVAL;
}
atchan->cfg |= AT_XDMAC_CC_CSIZE(csize);
dwidth = ffs(atchan->sconfig.src_addr_width) - 1;
if (dwidth < 0) {
- dev_err(chan2dev(chan), "invalid src addr width value\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid src addr width value\n");
return -EINVAL;
}
atchan->cfg |= AT_XDMAC_CC_DWIDTH(dwidth);
@@ -705,19 +700,19 @@ static int at_xdmac_compute_chan_conf(struct dma_chan *chan,
csize = ffs(atchan->sconfig.dst_maxburst) - 1;
if (csize < 0) {
- dev_err(chan2dev(chan), "invalid src maxburst value\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid src maxburst value\n");
return -EINVAL;
}
atchan->cfg |= AT_XDMAC_CC_CSIZE(csize);
dwidth = ffs(atchan->sconfig.dst_addr_width) - 1;
if (dwidth < 0) {
- dev_err(chan2dev(chan), "invalid dst addr width value\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid dst addr width value\n");
return -EINVAL;
}
atchan->cfg |= AT_XDMAC_CC_DWIDTH(dwidth);
}
- dev_dbg(chan2dev(chan), "%s: cfg=0x%08x\n", __func__, atchan->cfg);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: cfg=0x%08x\n", __func__, atchan->cfg);
return 0;
}
@@ -746,7 +741,7 @@ static int at_xdmac_set_slave_config(struct dma_chan *chan,
struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan);
if (at_xdmac_check_slave_config(sconfig)) {
- dev_err(chan2dev(chan), "invalid slave configuration\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid slave configuration\n");
return -EINVAL;
}
@@ -772,11 +767,11 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
return NULL;
if (!is_slave_direction(direction)) {
- dev_err(chan2dev(chan), "invalid DMA direction\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid DMA direction\n");
return NULL;
}
- dev_dbg(chan2dev(chan), "%s: sg_len=%d, dir=%s, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: sg_len=%d, dir=%s, flags=0x%lx\n",
__func__, sg_len,
direction == DMA_MEM_TO_DEV ? "to device" : "from device",
flags);
@@ -795,15 +790,15 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
len = sg_dma_len(sg);
mem = sg_dma_address(sg);
if (unlikely(!len)) {
- dev_err(chan2dev(chan), "sg data length is zero\n");
+ dev_err(dmaengine_chan_dev(chan), "sg data length is zero\n");
goto spin_unlock;
}
- dev_dbg(chan2dev(chan), "%s: * sg%d len=%u, mem=0x%08x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: * sg%d len=%u, mem=0x%08x\n",
__func__, i, len, mem);
desc = at_xdmac_get_desc(atchan);
if (!desc) {
- dev_err(chan2dev(chan), "can't get descriptor\n");
+ dev_err(dmaengine_chan_dev(chan), "can't get descriptor\n");
if (first)
list_splice_tail_init(&first->descs_list,
&atchan->free_descs_list);
@@ -828,7 +823,7 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
| (len >> fixed_dwidth); /* microblock length */
desc->lld.mbr_cfg = (atchan->cfg & ~AT_XDMAC_CC_DWIDTH_MASK) |
AT_XDMAC_CC_DWIDTH(fixed_dwidth);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x\n",
__func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc);
@@ -840,7 +835,7 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
if (!first)
first = desc;
- dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, desc, first);
list_add_tail(&desc->desc_node, &first->descs_list);
xfer_size += len;
@@ -869,17 +864,17 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
int i;
unsigned long irqflags;
- dev_dbg(chan2dev(chan), "%s: buf_addr=%pad, buf_len=%zd, period_len=%zd, dir=%s, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: buf_addr=%pad, buf_len=%zd, period_len=%zd, dir=%s, flags=0x%lx\n",
__func__, &buf_addr, buf_len, period_len,
direction == DMA_MEM_TO_DEV ? "mem2per" : "per2mem", flags);
if (!is_slave_direction(direction)) {
- dev_err(chan2dev(chan), "invalid DMA direction\n");
+ dev_err(dmaengine_chan_dev(chan), "invalid DMA direction\n");
return NULL;
}
if (test_and_set_bit(AT_XDMAC_CHAN_IS_CYCLIC, &atchan->status)) {
- dev_err(chan2dev(chan), "channel currently used\n");
+ dev_err(dmaengine_chan_dev(chan), "channel currently used\n");
return NULL;
}
@@ -892,7 +887,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
spin_lock_irqsave(&atchan->lock, irqflags);
desc = at_xdmac_get_desc(atchan);
if (!desc) {
- dev_err(chan2dev(chan), "can't get descriptor\n");
+ dev_err(dmaengine_chan_dev(chan), "can't get descriptor\n");
if (first)
list_splice_tail_init(&first->descs_list,
&atchan->free_descs_list);
@@ -900,7 +895,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
return NULL;
}
spin_unlock_irqrestore(&atchan->lock, irqflags);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: desc=0x%p, tx_dma_desc.phys=%pad\n",
__func__, desc, &desc->tx_dma_desc.phys);
@@ -917,7 +912,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
| AT_XDMAC_MBR_UBC_NSEN
| period_len >> at_xdmac_get_dwidth(desc->lld.mbr_cfg);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x\n",
__func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc);
@@ -929,7 +924,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
if (!first)
first = desc;
- dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, desc, first);
list_add_tail(&desc->desc_node, &first->descs_list);
}
@@ -956,16 +951,16 @@ static inline u32 at_xdmac_align_width(struct dma_chan *chan, dma_addr_t addr)
*/
if (!(addr & 7)) {
width = AT_XDMAC_CC_DWIDTH_DWORD;
- dev_dbg(chan2dev(chan), "%s: dwidth: double word\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dwidth: double word\n", __func__);
} else if (!(addr & 3)) {
width = AT_XDMAC_CC_DWIDTH_WORD;
- dev_dbg(chan2dev(chan), "%s: dwidth: word\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dwidth: word\n", __func__);
} else if (!(addr & 1)) {
width = AT_XDMAC_CC_DWIDTH_HALFWORD;
- dev_dbg(chan2dev(chan), "%s: dwidth: half word\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dwidth: half word\n", __func__);
} else {
width = AT_XDMAC_CC_DWIDTH_BYTE;
- dev_dbg(chan2dev(chan), "%s: dwidth: byte\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dwidth: byte\n", __func__);
}
return width;
@@ -1005,7 +1000,7 @@ at_xdmac_interleaved_queue_desc(struct dma_chan *chan,
dwidth = at_xdmac_align_width(chan, src | dst | chunk->size);
if (chunk->size >= (AT_XDMAC_MBR_UBC_UBLEN_MAX << dwidth)) {
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: chunk too big (%zu, max size %lu)...\n",
__func__, chunk->size,
AT_XDMAC_MBR_UBC_UBLEN_MAX << dwidth);
@@ -1013,7 +1008,7 @@ at_xdmac_interleaved_queue_desc(struct dma_chan *chan,
}
if (prev)
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"Adding items at the end of desc 0x%p\n", prev);
if (xt->src_inc) {
@@ -1034,7 +1029,7 @@ at_xdmac_interleaved_queue_desc(struct dma_chan *chan,
desc = at_xdmac_get_desc(atchan);
spin_unlock_irqrestore(&atchan->lock, flags);
if (!desc) {
- dev_err(chan2dev(chan), "can't get descriptor\n");
+ dev_err(dmaengine_chan_dev(chan), "can't get descriptor\n");
return NULL;
}
@@ -1053,7 +1048,7 @@ at_xdmac_interleaved_queue_desc(struct dma_chan *chan,
| ublen;
desc->lld.mbr_cfg = chan_cc;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
__func__, &desc->lld.mbr_sa, &desc->lld.mbr_da,
desc->lld.mbr_ubc, desc->lld.mbr_cfg);
@@ -1087,7 +1082,7 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
if ((xt->numf > 1) && (xt->frame_size > 1))
return NULL;
- dev_dbg(chan2dev(chan), "%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
__func__, &xt->src_start, &xt->dst_start, xt->numf,
xt->frame_size, flags);
@@ -1106,7 +1101,7 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
for (i = 0; i < xt->numf - 1; i++)
at_xdmac_increment_block_count(chan, first);
- dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, first, first);
list_add_tail(&first->desc_node, &first->descs_list);
} else {
@@ -1122,7 +1117,7 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
src_skip = chunk->size + src_icg;
dst_skip = chunk->size + dst_icg;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: chunk size=%zu, src icg=%zu, dst icg=%zu\n",
__func__, chunk->size, src_icg, dst_icg);
@@ -1140,7 +1135,7 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
if (!first)
first = desc;
- dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, desc, first);
list_add_tail(&desc->desc_node, &first->descs_list);
@@ -1193,7 +1188,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
| AT_XDMAC_CC_TYPE_MEM_TRAN;
unsigned long irqflags;
- dev_dbg(chan2dev(chan), "%s: src=%pad, dest=%pad, len=%zd, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: src=%pad, dest=%pad, len=%zd, flags=0x%lx\n",
__func__, &src, &dest, len, flags);
if (unlikely(!len))
@@ -1205,13 +1200,13 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
while (remaining_size) {
struct at_xdmac_desc *desc = NULL;
- dev_dbg(chan2dev(chan), "%s: remaining_size=%zu\n", __func__, remaining_size);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: remaining_size=%zu\n", __func__, remaining_size);
spin_lock_irqsave(&atchan->lock, irqflags);
desc = at_xdmac_get_desc(atchan);
spin_unlock_irqrestore(&atchan->lock, irqflags);
if (!desc) {
- dev_err(chan2dev(chan), "can't get descriptor\n");
+ dev_err(dmaengine_chan_dev(chan), "can't get descriptor\n");
if (first)
list_splice_tail_init(&first->descs_list,
&atchan->free_descs_list);
@@ -1227,7 +1222,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
else
xfer_size = remaining_size;
- dev_dbg(chan2dev(chan), "%s: xfer_size=%zu\n", __func__, xfer_size);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: xfer_size=%zu\n", __func__, xfer_size);
/* Check remaining length and change data width if needed. */
dwidth = at_xdmac_align_width(chan,
@@ -1246,7 +1241,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
| ublen;
desc->lld.mbr_cfg = chan_cc;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
__func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc, desc->lld.mbr_cfg);
@@ -1258,7 +1253,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
if (!first)
first = desc;
- dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, desc, first);
list_add_tail(&desc->desc_node, &first->descs_list);
}
@@ -1306,7 +1301,7 @@ static struct at_xdmac_desc *at_xdmac_memset_create_desc(struct dma_chan *chan,
dwidth = at_xdmac_align_width(chan, dst_addr);
if (len >= (AT_XDMAC_MBR_UBC_UBLEN_MAX << dwidth)) {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"%s: Transfer too large, aborting...\n",
__func__);
return NULL;
@@ -1316,7 +1311,7 @@ static struct at_xdmac_desc *at_xdmac_memset_create_desc(struct dma_chan *chan,
desc = at_xdmac_get_desc(atchan);
spin_unlock_irqrestore(&atchan->lock, flags);
if (!desc) {
- dev_err(chan2dev(chan), "can't get descriptor\n");
+ dev_err(dmaengine_chan_dev(chan), "can't get descriptor\n");
return NULL;
}
@@ -1338,7 +1333,7 @@ static struct at_xdmac_desc *at_xdmac_memset_create_desc(struct dma_chan *chan,
| ublen;
desc->lld.mbr_cfg = chan_cc;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: lld: mbr_da=%pad, mbr_ds=0x%08x, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
__func__, &desc->lld.mbr_da, desc->lld.mbr_ds, desc->lld.mbr_ubc,
desc->lld.mbr_cfg);
@@ -1353,7 +1348,7 @@ at_xdmac_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value,
struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan);
struct at_xdmac_desc *desc;
- dev_dbg(chan2dev(chan), "%s: dest=%pad, len=%zu, pattern=0x%x, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dest=%pad, len=%zu, pattern=0x%x, flags=0x%lx\n",
__func__, &dest, len, value, flags);
if (unlikely(!len))
@@ -1386,12 +1381,12 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
if (!sgl)
return NULL;
- dev_dbg(chan2dev(chan), "%s: sg_len=%d, value=0x%x, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: sg_len=%d, value=0x%x, flags=0x%lx\n",
__func__, sg_len, value, flags);
/* Prepare descriptors. */
for_each_sg(sgl, sg, sg_len, i) {
- dev_dbg(chan2dev(chan), "%s: dest=%pad, len=%d, pattern=0x%x, flags=0x%lx\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: dest=%pad, len=%d, pattern=0x%x, flags=0x%lx\n",
__func__, &sg_dma_address(sg), sg_dma_len(sg),
value, flags);
desc = at_xdmac_memset_create_desc(chan, atchan,
@@ -1433,7 +1428,7 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
if (ppdesc && pdesc) {
if ((stride == pstride) &&
(sg_dma_len(ppsg) == sg_dma_len(psg))) {
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: desc 0x%p can be merged with desc 0x%p\n",
__func__, pdesc, ppdesc);
@@ -1481,7 +1476,7 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
*/
list_add_tail(&desc->desc_node,
&first->descs_list);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: add desc 0x%p to descs_list 0x%p\n",
__func__, desc, first);
}
@@ -1496,7 +1491,7 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
*/
if ((i == (sg_len - 1)) &&
sg_dma_len(psg) == sg_dma_len(sg)) {
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: desc 0x%p can be merged with desc 0x%p\n",
__func__, desc, pdesc);
@@ -1667,7 +1662,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
dma_set_residue(txstate, residue);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s: desc=0x%p, tx_dma_desc.phys=%pad, tx_status=%d, cookie=%d, residue=%d\n",
__func__, desc, &desc->tx_dma_desc.phys, ret, cookie, residue);
@@ -1690,7 +1685,7 @@ static void at_xdmac_advance_work(struct at_xdmac_chan *atchan)
desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc,
xfer_node);
- dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
if (!desc->active_xfer)
at_xdmac_start_xfer(atchan, desc);
}
@@ -1701,7 +1696,7 @@ static void at_xdmac_handle_cyclic(struct at_xdmac_chan *atchan)
struct dma_async_tx_descriptor *txd;
spin_lock_irq(&atchan->lock);
- dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
+ dev_dbg(dmaengine_chan_dev(&atchan->chan), "%s: status=0x%08x\n",
__func__, atchan->irq_status);
if (list_empty(&atchan->xfers_list)) {
spin_unlock_irq(&atchan->lock);
@@ -1733,11 +1728,11 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan)
* descriptors queued (if any).
*/
if (atchan->irq_status & AT_XDMAC_CIS_RBEIS)
- dev_err(chan2dev(&atchan->chan), "read bus error!!!");
+ dev_err(dmaengine_chan_dev(&atchan->chan), "read bus error!!!");
if (atchan->irq_status & AT_XDMAC_CIS_WBEIS)
- dev_err(chan2dev(&atchan->chan), "write bus error!!!");
+ dev_err(dmaengine_chan_dev(&atchan->chan), "write bus error!!!");
if (atchan->irq_status & AT_XDMAC_CIS_ROIS)
- dev_err(chan2dev(&atchan->chan), "request overflow error!!!");
+ dev_err(dmaengine_chan_dev(&atchan->chan), "request overflow error!!!");
/* Channel must be disabled first as it's not done automatically */
at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask);
@@ -1749,7 +1744,7 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan)
xfer_node);
/* Print bad descriptor's details if needed */
- dev_dbg(chan2dev(&atchan->chan),
+ dev_dbg(dmaengine_chan_dev(&atchan->chan),
"%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x\n",
__func__, &bad_desc->lld.mbr_sa, &bad_desc->lld.mbr_da,
bad_desc->lld.mbr_ubc);
@@ -1775,7 +1770,7 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
spin_lock_irq(&atchan->lock);
- dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
+ dev_dbg(dmaengine_chan_dev(&atchan->chan), "%s: status=0x%08x\n",
__func__, atchan->irq_status);
if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) &&
@@ -1789,9 +1784,9 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc,
xfer_node);
- dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
if (!desc->active_xfer) {
- dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
+ dev_err(dmaengine_chan_dev(&atchan->chan), "Xfer not active: exiting");
spin_unlock_irq(&atchan->lock);
return;
}
@@ -1852,7 +1847,7 @@ static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
dev_vdbg(atxdmac->dma.dev,
"%s: chan%d: imr=0x%x, status=0x%x\n",
__func__, i, chan_imr, chan_status);
- dev_vdbg(chan2dev(&atchan->chan),
+ dev_vdbg(dmaengine_chan_dev(&atchan->chan),
"%s: CC=0x%08x CNDA=0x%08x, CNDC=0x%08x, CSA=0x%08x, CDA=0x%08x, CUBC=0x%08x\n",
__func__,
at_xdmac_chan_read(atchan, AT_XDMAC_CC),
@@ -1879,7 +1874,7 @@ static void at_xdmac_issue_pending(struct dma_chan *chan)
struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan);
unsigned long flags;
- dev_dbg(chan2dev(&atchan->chan), "%s\n", __func__);
+ dev_dbg(dmaengine_chan_dev(&atchan->chan), "%s\n", __func__);
spin_lock_irqsave(&atchan->lock, flags);
at_xdmac_advance_work(atchan);
@@ -1895,7 +1890,7 @@ static int at_xdmac_device_config(struct dma_chan *chan,
int ret;
unsigned long flags;
- dev_dbg(chan2dev(chan), "%s\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s\n", __func__);
spin_lock_irqsave(&atchan->lock, flags);
ret = at_xdmac_set_slave_config(chan, config);
@@ -1931,7 +1926,7 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
unsigned long flags;
int ret;
- dev_dbg(chan2dev(chan), "%s\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s\n", __func__);
if (test_and_set_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status))
return 0;
@@ -1971,7 +1966,7 @@ static int at_xdmac_device_resume(struct dma_chan *chan)
unsigned long flags;
int ret;
- dev_dbg(chan2dev(chan), "%s\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s\n", __func__);
ret = pm_runtime_resume_and_get(atxdmac->dev);
if (ret < 0)
@@ -2004,7 +1999,7 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
unsigned long flags;
int ret;
- dev_dbg(chan2dev(chan), "%s\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s\n", __func__);
ret = pm_runtime_resume_and_get(atxdmac->dev);
if (ret < 0)
@@ -2045,13 +2040,13 @@ static int at_xdmac_alloc_chan_resources(struct dma_chan *chan)
int i;
if (at_xdmac_chan_is_enabled(atchan)) {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"can't allocate channel resources (channel enabled)\n");
return -EIO;
}
if (!list_empty(&atchan->free_descs_list)) {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"can't allocate channel resources (channel not free from a previous use)\n");
return -EIO;
}
@@ -2060,11 +2055,11 @@ static int at_xdmac_alloc_chan_resources(struct dma_chan *chan)
desc = at_xdmac_alloc_desc(chan, GFP_KERNEL);
if (!desc) {
if (i == 0) {
- dev_warn(chan2dev(chan),
+ dev_warn(dmaengine_chan_dev(chan),
"can't allocate any descriptors\n");
return -EIO;
}
- dev_warn(chan2dev(chan),
+ dev_warn(dmaengine_chan_dev(chan),
"only %d descriptors have been allocated\n", i);
break;
}
@@ -2073,7 +2068,7 @@ static int at_xdmac_alloc_chan_resources(struct dma_chan *chan)
dma_cookie_init(chan);
- dev_dbg(chan2dev(chan), "%s: allocated %d descriptors\n", __func__, i);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: allocated %d descriptors\n", __func__, i);
return i;
}
@@ -2085,7 +2080,7 @@ static void at_xdmac_free_chan_resources(struct dma_chan *chan)
struct at_xdmac_desc *desc, *_desc;
list_for_each_entry_safe(desc, _desc, &atchan->free_descs_list, desc_node) {
- dev_dbg(chan2dev(chan), "%s: freeing descriptor %p\n", __func__, desc);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: freeing descriptor %p\n", __func__, desc);
list_del(&desc->desc_node);
dma_pool_free(atxdmac->at_xdmac_desc_pool, desc, desc->tx_dma_desc.phys);
}
@@ -2148,7 +2143,7 @@ static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
atchan->save_cc = at_xdmac_chan_read(atchan, AT_XDMAC_CC);
if (at_xdmac_chan_is_cyclic(atchan)) {
if (!at_xdmac_chan_is_paused(atchan)) {
- dev_warn(chan2dev(chan), "%s: channel %d not paused\n",
+ dev_warn(dmaengine_chan_dev(chan), "%s: channel %d not paused\n",
__func__, chan->chan_id);
at_xdmac_device_pause_internal(atchan);
at_xdmac_runtime_suspend_descriptors(atchan);
diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c
index ec58d2c6573f..241a91936fe8 100644
--- a/drivers/dma/bestcomm/bestcomm.c
+++ b/drivers/dma/bestcomm/bestcomm.c
@@ -13,7 +13,6 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/of.h>
-#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <asm/io.h>
@@ -365,13 +364,19 @@ bcom_engine_cleanup(void)
static int mpc52xx_bcom_probe(struct platform_device *op)
{
struct device_node *ofn_sram;
- struct resource res_bcom;
+ struct resource *res_bcom;
+ void __iomem *regs;
int rv;
/* Inform user we're ok so far */
printk(KERN_INFO "DMA: MPC52xx BestComm driver\n");
+ /* Get, reserve & map io */
+ regs = devm_platform_get_and_ioremap_resource(op, 0, &res_bcom);
+ if (IS_ERR(regs))
+ return PTR_ERR(regs);
+
/* Get the bestcomm node */
of_node_get(op->dev.of_node);
@@ -402,35 +407,13 @@ static int mpc52xx_bcom_probe(struct platform_device *op)
/* Save the node */
bcom_eng->ofnode = op->dev.of_node;
- /* Get, reserve & map io */
- if (of_address_to_resource(op->dev.of_node, 0, &res_bcom)) {
- printk(KERN_ERR DRIVER_NAME ": "
- "Can't get resource\n");
- rv = -EINVAL;
- goto error_sramclean;
- }
-
- if (!request_mem_region(res_bcom.start, resource_size(&res_bcom),
- DRIVER_NAME)) {
- printk(KERN_ERR DRIVER_NAME ": "
- "Can't request registers region\n");
- rv = -EBUSY;
- goto error_sramclean;
- }
-
- bcom_eng->regs_base = res_bcom.start;
- bcom_eng->regs = ioremap(res_bcom.start, sizeof(struct mpc52xx_sdma));
- if (!bcom_eng->regs) {
- printk(KERN_ERR DRIVER_NAME ": "
- "Can't map registers\n");
- rv = -ENOMEM;
- goto error_release;
- }
+ bcom_eng->regs = regs;
+ bcom_eng->regs_base = res_bcom->start;
/* Now, do the real init */
rv = bcom_engine_init();
if (rv)
- goto error_unmap;
+ goto error_sramclean;
/* Done ! */
printk(KERN_INFO "DMA: MPC52xx BestComm engine @%08lx ok !\n",
@@ -439,10 +422,6 @@ static int mpc52xx_bcom_probe(struct platform_device *op)
return 0;
/* Error path */
-error_unmap:
- iounmap(bcom_eng->regs);
-error_release:
- release_mem_region(res_bcom.start, sizeof(struct mpc52xx_sdma));
error_sramclean:
kfree(bcom_eng);
bcom_eng = NULL;
@@ -464,10 +443,6 @@ static void mpc52xx_bcom_remove(struct platform_device *op)
/* Cleanup SRAM */
bcom_sram_cleanup();
- /* Release regs */
- iounmap(bcom_eng->regs);
- release_mem_region(bcom_eng->regs_base, sizeof(struct mpc52xx_sdma));
-
/* Release the node */
of_node_put(bcom_eng->ofnode);
diff --git a/drivers/dma/bestcomm/gen_bd.c b/drivers/dma/bestcomm/gen_bd.c
index 61b5746e1a97..3b4fabb4d12b 100644
--- a/drivers/dma/bestcomm/gen_bd.c
+++ b/drivers/dma/bestcomm/gen_bd.c
@@ -81,7 +81,7 @@ struct bcom_gen_bd_priv {
/* Task support code */
/* ======================================================================== */
-struct bcom_task *
+static struct bcom_task *
bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo,
int initiator, int ipr, int maxbufsize)
{
@@ -108,7 +108,6 @@ bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo,
return tsk;
}
-EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_init);
int
bcom_gen_bd_rx_reset(struct bcom_task *tsk)
@@ -166,7 +165,7 @@ bcom_gen_bd_rx_release(struct bcom_task *tsk)
EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_release);
-extern struct bcom_task *
+static struct bcom_task *
bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo,
int initiator, int ipr)
{
@@ -192,7 +191,6 @@ bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo,
return tsk;
}
-EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_init);
int
bcom_gen_bd_tx_reset(struct bcom_task *tsk)
@@ -321,7 +319,7 @@ static const struct bcom_psc_params bcom_psc_params[] = {
struct bcom_task * bcom_psc_gen_bd_rx_init(unsigned psc_num, int queue_len,
phys_addr_t fifo, int maxbufsize)
{
- if (psc_num >= MPC52xx_PSC_MAXNUM)
+ if (psc_num >= ARRAY_SIZE(bcom_psc_params))
return NULL;
return bcom_gen_bd_rx_init(queue_len, fifo,
@@ -342,6 +340,9 @@ EXPORT_SYMBOL_GPL(bcom_psc_gen_bd_rx_init);
struct bcom_task *
bcom_psc_gen_bd_tx_init(unsigned psc_num, int queue_len, phys_addr_t fifo)
{
+ if (psc_num >= ARRAY_SIZE(bcom_psc_params))
+ return NULL;
+
struct psc;
return bcom_gen_bd_tx_init(queue_len, fifo,
bcom_psc_params[psc_num].tx_initiator,
diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index 6070dfdb7114..ac2094e65ecf 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -687,12 +687,12 @@ static bool jz4780_dma_chan_irq(struct jz4780_dma_dev *jzdma,
jz4780_dma_chn_writel(jzdma, jzchan->id, JZ_DMA_REG_DCS, 0);
if (dcs & JZ_DMA_DCS_AR) {
- dev_warn(&jzchan->vchan.chan.dev->device,
+ dev_warn(vchan_chan_dev(&jzchan->vchan),
"address error (DCS=0x%x)\n", dcs);
}
if (dcs & JZ_DMA_DCS_HLT) {
- dev_warn(&jzchan->vchan.chan.dev->device,
+ dev_warn(vchan_chan_dev(&jzchan->vchan),
"channel halt (DCS=0x%x)\n", dcs);
}
@@ -721,7 +721,7 @@ static bool jz4780_dma_chan_irq(struct jz4780_dma_dev *jzdma,
}
}
} else {
- dev_err(&jzchan->vchan.chan.dev->device,
+ dev_err(vchan_chan_dev(&jzchan->vchan),
"channel IRQ with no active transfer\n");
}
@@ -760,12 +760,12 @@ static int jz4780_dma_alloc_chan_resources(struct dma_chan *chan)
{
struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
- jzchan->desc_pool = dma_pool_create(dev_name(&chan->dev->device),
+ jzchan->desc_pool = dma_pool_create(dma_chan_name(chan),
chan->device->dev,
JZ_DMA_DESC_BLOCK_SIZE,
PAGE_SIZE, 0);
if (!jzchan->desc_pool) {
- dev_err(&chan->dev->device,
+ dev_err(dmaengine_chan_dev(chan),
"failed to allocate descriptor pool\n");
return -ENOMEM;
}
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index c71763047126..cc1c0a7c9f33 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -879,10 +879,10 @@ found:
return chan;
chan->slave = dev;
- if (sysfs_create_link(&chan->dev->device.kobj, &dev->kobj,
+ if (sysfs_create_link(&dmaengine_chan_dev(chan)->kobj, &dev->kobj,
DMA_SLAVE_NAME))
dev_warn(dev, "Cannot create DMA %s symlink\n", DMA_SLAVE_NAME);
- if (sysfs_create_link(&dev->kobj, &chan->dev->device.kobj, chan->name))
+ if (sysfs_create_link(&dev->kobj, &dmaengine_chan_dev(chan)->kobj, chan->name))
dev_warn(dev, "Cannot create DMA %s symlink\n", chan->name);
return chan;
@@ -928,7 +928,7 @@ void dma_release_channel(struct dma_chan *chan)
dma_chan_put(chan);
if (chan->slave) {
- sysfs_remove_link(&chan->dev->device.kobj, DMA_SLAVE_NAME);
+ sysfs_remove_link(&dmaengine_chan_dev(chan)->kobj, DMA_SLAVE_NAME);
sysfs_remove_link(&chan->slave->kobj, chan->name);
kfree(chan->name);
chan->name = NULL;
@@ -1094,8 +1094,8 @@ static int __dma_async_device_channel_register(struct dma_device *device,
chan->local = alloc_percpu(typeof(*chan->local));
if (!chan->local)
return -ENOMEM;
- chan->dev = kzalloc_obj(*chan->dev);
- if (!chan->dev) {
+ chan->chan_dev = kzalloc_obj(*chan->chan_dev);
+ if (!chan->chan_dev) {
rc = -ENOMEM;
goto err_free_local;
}
@@ -1112,17 +1112,17 @@ static int __dma_async_device_channel_register(struct dma_device *device,
goto err_free_dev;
}
- chan->dev->device.class = &dma_devclass;
- chan->dev->device.parent = device->dev;
- chan->dev->chan = chan;
- chan->dev->dev_id = device->dev_id;
+ dmaengine_chan_dev(chan)->class = &dma_devclass;
+ dmaengine_chan_dev(chan)->parent = device->dev;
+ chan->chan_dev->chan = chan;
+ chan->chan_dev->dev_id = device->dev_id;
spin_lock_init(&chan->lock);
if (!name)
- dev_set_name(&chan->dev->device, "dma%dchan%d", device->dev_id, chan->chan_id);
+ dev_set_name(dmaengine_chan_dev(chan), "dma%dchan%d", device->dev_id, chan->chan_id);
else
- dev_set_name(&chan->dev->device, "%s", name);
- rc = device_register(&chan->dev->device);
+ dev_set_name(dmaengine_chan_dev(chan), "%s", name);
+ rc = device_register(dmaengine_chan_dev(chan));
if (rc)
goto err_out_ida;
chan->client_count = 0;
@@ -1133,7 +1133,7 @@ static int __dma_async_device_channel_register(struct dma_device *device,
err_out_ida:
ida_free(&device->chan_ida, chan->chan_id);
err_free_dev:
- kfree(chan->dev);
+ kfree(chan->chan_dev);
err_free_local:
free_percpu(chan->local);
chan->local = NULL;
@@ -1166,10 +1166,10 @@ static void __dma_async_device_channel_unregister(struct dma_device *device,
__func__, chan->client_count);
mutex_lock(&dma_list_mutex);
device->chancnt--;
- chan->dev->chan = NULL;
+ chan->chan_dev->chan = NULL;
mutex_unlock(&dma_list_mutex);
ida_free(&device->chan_ida, chan->chan_id);
- device_unregister(&chan->dev->device);
+ device_unregister(dmaengine_chan_dev(chan));
free_percpu(chan->local);
}
@@ -1301,9 +1301,9 @@ err_out:
if (chan->local == NULL)
continue;
mutex_lock(&dma_list_mutex);
- chan->dev->chan = NULL;
+ chan->chan_dev->chan = NULL;
mutex_unlock(&dma_list_mutex);
- device_unregister(&chan->dev->device);
+ device_unregister(dmaengine_chan_dev(chan));
free_percpu(chan->local);
}
return rc;
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 8baf303a314d..7520c78f55cc 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -319,7 +319,7 @@ static struct axi_dma_lli *axi_desc_get(struct axi_dma_chan *chan,
lli = dma_pool_zalloc(chan->desc_pool, GFP_NOWAIT, &phys);
if (unlikely(!lli)) {
- dev_err(chan2dev(chan), "%s: not enough descriptors available\n",
+ dev_err(vchan_chan_dev(&chan->vc), "%s: not enough descriptors available\n",
axi_chan_name(chan));
return NULL;
}
@@ -345,7 +345,7 @@ static void axi_desc_put(struct axi_dma_desc *desc)
kfree(desc->hw_desc);
kfree(desc);
atomic_sub(descs_put, &chan->descs_allocated);
- dev_vdbg(chan2dev(chan), "%s: %d descs put, %d still allocated\n",
+ dev_vdbg(vchan_chan_dev(&chan->vc), "%s: %d descs put, %d still allocated\n",
axi_chan_name(chan), descs_put,
atomic_read(&chan->descs_allocated));
}
@@ -434,7 +434,7 @@ static void axi_chan_block_xfer_start(struct axi_dma_chan *chan,
u8 lms = 0; /* Select AXI0 master for LLI fetching */
if (unlikely(axi_chan_is_hw_enable(chan))) {
- dev_err(chan2dev(chan), "%s is non-idle!\n",
+ dev_err(vchan_chan_dev(&chan->vc), "%s is non-idle!\n",
axi_chan_name(chan));
return;
@@ -493,7 +493,7 @@ static void axi_chan_start_first_queued(struct axi_dma_chan *chan)
return;
desc = vd_to_axi_desc(vd);
- dev_vdbg(chan2dev(chan), "%s: started %u\n", axi_chan_name(chan),
+ dev_vdbg(vchan_chan_dev(&chan->vc), "%s: started %u\n", axi_chan_name(chan),
vd->tx.cookie);
axi_chan_block_xfer_start(chan, desc);
}
@@ -527,23 +527,22 @@ static int dma_chan_alloc_chan_resources(struct dma_chan *dchan)
/* ASSERT: channel is idle */
if (axi_chan_is_hw_enable(chan)) {
- dev_err(chan2dev(chan), "%s is non-idle!\n",
+ dev_err(vchan_chan_dev(&chan->vc), "%s is non-idle!\n",
axi_chan_name(chan));
pm_runtime_put(chan->chip->dev);
return -EBUSY;
}
/* LLI address must be aligned to a 64-byte boundary */
- chan->desc_pool = dma_pool_create(dev_name(chan2dev(chan)),
- chan->chip->dev,
+ chan->desc_pool = dma_pool_create(dma_chan_name(dchan), chan->chip->dev,
sizeof(struct axi_dma_lli),
64, 0);
if (!chan->desc_pool) {
- dev_err(chan2dev(chan), "No memory for descriptors\n");
+ dev_err(vchan_chan_dev(&chan->vc), "No memory for descriptors\n");
pm_runtime_put(chan->chip->dev);
return -ENOMEM;
}
- dev_vdbg(dchan2dev(dchan), "%s: allocating\n", axi_chan_name(chan));
+ dev_vdbg(dmaengine_chan_dev(dchan), "%s: allocating\n", axi_chan_name(chan));
return 0;
}
@@ -554,7 +553,7 @@ static void dma_chan_free_chan_resources(struct dma_chan *dchan)
/* ASSERT: channel is idle */
if (axi_chan_is_hw_enable(chan))
- dev_err(dchan2dev(dchan), "%s is non-idle!\n",
+ dev_err(dmaengine_chan_dev(dchan), "%s is non-idle!\n",
axi_chan_name(chan));
axi_chan_disable(chan);
@@ -564,7 +563,7 @@ static void dma_chan_free_chan_resources(struct dma_chan *dchan)
dma_pool_destroy(chan->desc_pool);
chan->desc_pool = NULL;
- dev_vdbg(dchan2dev(dchan),
+ dev_vdbg(dmaengine_chan_dev(dchan),
"%s: free resources, descriptor still allocated: %u\n",
axi_chan_name(chan), atomic_read(&chan->descs_allocated));
@@ -933,7 +932,7 @@ dma_chan_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dst_adr,
u64 llp = 0;
u8 lms = 0; /* Select AXI0 master for LLI fetching */
- dev_dbg(chan2dev(chan), "%s: memcpy: src: %pad dst: %pad length: %zd flags: %#lx",
+ dev_dbg(vchan_chan_dev(&chan->vc), "%s: memcpy: src: %pad dst: %pad length: %zd flags: %#lx",
axi_chan_name(chan), &src_adr, &dst_adr, len, flags);
max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
@@ -1038,11 +1037,11 @@ static void axi_chan_dump_lli(struct axi_dma_chan *chan,
struct axi_dma_hw_desc *desc)
{
if (!desc->lli) {
- dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n");
+ dev_err(vchan_chan_dev(&chan->vc), "NULL LLI\n");
return;
}
- dev_err(dchan2dev(&chan->vc.chan),
+ dev_err(vchan_chan_dev(&chan->vc),
"SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x",
le64_to_cpu(desc->lli->sar),
le64_to_cpu(desc->lli->dar),
@@ -1071,7 +1070,7 @@ static noinline void axi_chan_handle_err(struct axi_dma_chan *chan, u32 status)
/* The bad descriptor currently is in the head of vc list */
vd = vchan_next_desc(&chan->vc);
if (!vd) {
- dev_err(chan2dev(chan), "BUG: %s, IRQ with no descriptors\n",
+ dev_err(vchan_chan_dev(&chan->vc), "BUG: %s, IRQ with no descriptors\n",
axi_chan_name(chan));
goto out;
}
@@ -1079,7 +1078,7 @@ static noinline void axi_chan_handle_err(struct axi_dma_chan *chan, u32 status)
list_del(&vd->node);
/* WARN about bad descriptor */
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vc),
"Bad descriptor submitted for %s, cookie: %d, irq: 0x%08x\n",
axi_chan_name(chan), vd->tx.cookie, status);
axi_chan_list_dump_lli(chan, vd_to_axi_desc(vd));
@@ -1105,7 +1104,7 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
spin_lock_irqsave(&chan->vc.lock, flags);
if (unlikely(axi_chan_is_hw_enable(chan))) {
- dev_err(chan2dev(chan), "BUG: %s caught DWAXIDMAC_IRQ_DMA_TRF, but channel not idle!\n",
+ dev_err(vchan_chan_dev(&chan->vc), "BUG: %s caught DWAXIDMAC_IRQ_DMA_TRF, but channel not idle!\n",
axi_chan_name(chan));
axi_chan_disable(chan);
}
@@ -1113,7 +1112,7 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
/* The completed descriptor currently is in the head of vc list */
vd = vchan_next_desc(&chan->vc);
if (!vd) {
- dev_err(chan2dev(chan), "BUG: %s, IRQ with no descriptors\n",
+ dev_err(vchan_chan_dev(&chan->vc), "BUG: %s, IRQ with no descriptors\n",
axi_chan_name(chan));
goto out;
}
@@ -1193,7 +1192,7 @@ static int dma_chan_terminate_all(struct dma_chan *dchan)
ret = readl_poll_timeout_atomic(chan->chip->regs + DMAC_CHEN, val,
!(val & chan_active), 1000, 50000);
if (ret == -ETIMEDOUT)
- dev_warn(dchan2dev(dchan),
+ dev_warn(dmaengine_chan_dev(dchan),
"%s failed to stop\n", axi_chan_name(chan));
if (chan->direction != DMA_MEM_TO_MEM)
@@ -1210,7 +1209,7 @@ static int dma_chan_terminate_all(struct dma_chan *dchan)
vchan_dma_desc_free_list(&chan->vc, &head);
- dev_vdbg(dchan2dev(dchan), "terminated: %s\n", axi_chan_name(chan));
+ dev_vdbg(dmaengine_chan_dev(dchan), "terminated: %s\n", axi_chan_name(chan));
return 0;
}
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
index ec83acd12a9b..d8dd07efe60f 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
@@ -118,16 +118,6 @@ struct axi_dma_chan_config {
u8 hs_sel_src;
};
-static inline struct device *dchan2dev(struct dma_chan *dchan)
-{
- return &dchan->dev->device;
-}
-
-static inline struct device *chan2dev(struct axi_dma_chan *chan)
-{
- return &chan->vc.chan.dev->device;
-}
-
static inline struct axi_dma_desc *vd_to_axi_desc(struct virt_dma_desc *vd)
{
return container_of(vd, struct axi_dma_desc, vd);
diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index 9f237ba916de..fab4faf68b77 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -33,6 +33,8 @@
#define DW_PCIE_XILINX_MDB_VSEC_ID 0x20
#define DW_PCIE_XILINX_MDB_VSEC_DMA_BAR GENMASK(10, 8)
#define DW_PCIE_XILINX_MDB_VSEC_DMA_MAP GENMASK(2, 0)
+/* AMD CPM6 (Xilinx) supported cap */
+#define DW_PCIE_XILINX_CPM6_VSEC_CH_SEP GENMASK(18, 16)
#define DW_PCIE_XILINX_MDB_VSEC_DMA_WR_CH GENMASK(9, 0)
#define DW_PCIE_XILINX_MDB_VSEC_DMA_RD_CH GENMASK(25, 16)
@@ -76,6 +78,7 @@ struct dw_edma_pcie_data {
u16 rd_ch_cnt;
u64 devmem_phys_off;
bool cfg_non_ll;
+ u32 ch_space_sz;
};
struct dw_edma_pcie_match_data {
@@ -130,6 +133,7 @@ static const struct dw_edma_pcie_data snps_edda_data = {
.irqs = 1,
.wr_ch_cnt = 2,
.rd_ch_cnt = 2,
+ .ch_space_sz = 256,
};
static const struct dw_edma_pcie_data xilinx_mdb_data = {
@@ -143,6 +147,7 @@ static const struct dw_edma_pcie_data xilinx_mdb_data = {
.irqs = 1,
.wr_ch_cnt = 8,
.rd_ch_cnt = 8,
+ .ch_space_sz = 256,
};
static const struct dw_edma_pcie_data xilinx_cpm6_dma_data = {
@@ -156,6 +161,7 @@ static const struct dw_edma_pcie_data xilinx_cpm6_dma_data = {
.irqs = 1,
.wr_ch_cnt = 8,
.rd_ch_cnt = 8,
+ .ch_space_sz = 512,
};
static void dw_edma_set_chan_region_offset(struct dw_edma_pcie_data *pdata,
@@ -208,6 +214,13 @@ static int dw_edma_pcie_irq_vector(struct device *dev, unsigned int nr)
return pci_irq_vector(to_pci_dev(dev), nr);
}
+static u32 dw_edma_get_ch_space_sz(u32 val)
+{
+ if (val > 0 && val <= 7)
+ return 256 << val;
+ return 256;
+}
+
static u64 dw_edma_pcie_address(struct device *dev, phys_addr_t cpu_addr)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -298,6 +311,10 @@ static void dw_edma_pcie_get_xilinx_dma_data(struct pci_dev *pdev,
pdata->mf = map;
pdata->rg.bar = FIELD_GET(DW_PCIE_XILINX_MDB_VSEC_DMA_BAR, val);
+ if (pdev->device == PCI_DEVICE_ID_XILINX_B00F)
+ pdata->ch_space_sz = dw_edma_get_ch_space_sz
+ (FIELD_GET(DW_PCIE_XILINX_CPM6_VSEC_CH_SEP, val));
+
pci_read_config_dword(pdev, vsec + 0xc, &val);
pdata->wr_ch_cnt = min(pdata->wr_ch_cnt,
FIELD_GET(DW_PCIE_XILINX_MDB_VSEC_DMA_WR_CH, val));
@@ -477,6 +494,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
chip->nr_irqs = nr_irqs;
chip->ops = match->plat_ops;
chip->cfg_non_ll = dma_data->cfg_non_ll;
+ chip->ch_space_sz = dma_data->ch_space_sz;
chip->ll_wr_cnt = dma_data->wr_ch_cnt;
chip->ll_rd_cnt = dma_data->rd_ch_cnt;
diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c
index 0b3c8496b0ad..d42cb4ad49a2 100644
--- a/drivers/dma/dw-edma/dw-hdma-v0-core.c
+++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c
@@ -23,18 +23,23 @@ enum dw_hdma_control {
DW_HDMA_V0_LLE = BIT(9),
};
-static inline struct dw_hdma_v0_regs __iomem *__dw_regs(struct dw_edma *dw)
-{
- return dw->chip->reg_base;
-}
-
static inline struct dw_hdma_v0_ch_regs __iomem *
__dw_ch_regs(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch)
{
- if (dir == EDMA_DIR_WRITE)
- return &(__dw_regs(dw)->ch[ch].wr);
- else
- return &(__dw_regs(dw)->ch[ch].rd);
+ u32 ch_base;
+
+ /*
+ * For Write, the channel register index starts at
+ * wr_base(ch_idx) = (2 * ch_idx) * ch_space_sz
+ *
+ * For Read channel,
+ * rd_base(ch_idx) = (2 * ch_idx + 1) * ch_space_sz
+ */
+ ch_base = 2 * ch;
+ if (dir == EDMA_DIR_READ)
+ ch_base += 1;
+
+ return dw->chip->reg_base + (ch_base * dw->chip->ch_space_sz);
}
#define SET_CH_32(dw, dir, ch, name, value) \
diff --git a/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c b/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c
index dcdc57fe976c..3fa16e045a58 100644
--- a/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c
+++ b/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c
@@ -13,22 +13,17 @@
#include "dw-hdma-v0-regs.h"
#include "dw-edma-core.h"
-#define REGS_ADDR(dw, name) \
- ({ \
- struct dw_hdma_v0_regs __iomem *__regs = (dw)->chip->reg_base; \
- \
- (void __iomem *)&__regs->name; \
- })
-
#define REGS_CH_ADDR(dw, name, _dir, _ch) \
({ \
- struct dw_hdma_v0_ch_regs __iomem *__ch_regs; \
+ struct dw_hdma_v0_ch_regs __iomem *__ch_regs; \
+ off_t __off = (dw)->chip->ch_space_sz; \
\
- if (_dir == EDMA_DIR_READ) \
- __ch_regs = REGS_ADDR(dw, ch[_ch].rd); \
+ if ((_dir) == EDMA_DIR_READ) \
+ __off *= (2 * (_ch) + 1); \
else \
- __ch_regs = REGS_ADDR(dw, ch[_ch].wr); \
+ __off *= (2 * (_ch)); \
\
+ __ch_regs = ((dw)->chip->reg_base + __off); \
(void __iomem *)&__ch_regs->name; \
})
diff --git a/drivers/dma/dw-edma/dw-hdma-v0-regs.h b/drivers/dma/dw-edma/dw-hdma-v0-regs.h
index 2124c162a62f..b88226cdd791 100644
--- a/drivers/dma/dw-edma/dw-hdma-v0-regs.h
+++ b/drivers/dma/dw-edma/dw-hdma-v0-regs.h
@@ -85,16 +85,6 @@ struct dw_hdma_v0_ch_regs {
};
} msi_abort;
u32 msi_msgdata; /* 0x00a8 */
- u32 padding_2[21]; /* 0x00ac..0x00fc */
-} __packed;
-
-struct dw_hdma_v0_ch {
- struct dw_hdma_v0_ch_regs wr; /* 0x0000 */
- struct dw_hdma_v0_ch_regs rd; /* 0x0100 */
-} __packed;
-
-struct dw_hdma_v0_regs {
- struct dw_hdma_v0_ch ch[HDMA_V0_MAX_NR_CH]; /* 0x0000..0x0fa8 */
} __packed;
struct dw_hdma_v0_lli {
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index dd75f97a33b3..575b7bb6af9a 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -41,11 +41,6 @@
/*----------------------------------------------------------------------*/
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static struct dw_desc *dwc_first_active(struct dw_dma_chan *dwc)
{
return to_dw_desc(dwc->active_list.next);
@@ -69,7 +64,7 @@ static dma_cookie_t dwc_tx_submit(struct dma_async_tx_descriptor *tx)
list_add_tail(&desc->desc_node, &dwc->queue);
spin_unlock_irqrestore(&dwc->lock, flags);
- dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n",
+ dev_vdbg(dmaengine_chan_dev(tx->chan), "%s: queued %u\n",
__func__, desc->txd.cookie);
return cookie;
@@ -127,7 +122,7 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
static inline void dwc_dump_chan_regs(struct dw_dma_chan *dwc)
{
- dev_err(chan2dev(&dwc->chan),
+ dev_err(dmaengine_chan_dev(&dwc->chan),
" SAR: 0x%x DAR: 0x%x LLP: 0x%x CTL: 0x%x:%08x\n",
channel_readl(dwc, SAR),
channel_readl(dwc, DAR),
@@ -177,7 +172,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
/* ASSERT: channel is idle */
if (dma_readl(dw, CH_EN) & dwc->mask) {
- dev_err(chan2dev(&dwc->chan),
+ dev_err(dmaengine_chan_dev(&dwc->chan),
"%s: BUG: Attempted to start non-idle channel\n",
__func__);
dwc_dump_chan_regs(dwc);
@@ -190,7 +185,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
was_soft_llp = test_and_set_bit(DW_DMA_IS_SOFT_LLP,
&dwc->flags);
if (was_soft_llp) {
- dev_err(chan2dev(&dwc->chan),
+ dev_err(dmaengine_chan_dev(&dwc->chan),
"BUG: Attempted to start new LLP transfer inside ongoing one\n");
return;
}
@@ -223,7 +218,7 @@ static void dwc_dostart_first_queued(struct dw_dma_chan *dwc)
list_move(dwc->queue.next, &dwc->active_list);
desc = dwc_first_active(dwc);
- dev_vdbg(chan2dev(&dwc->chan), "%s: started %u\n", __func__, desc->txd.cookie);
+ dev_vdbg(dmaengine_chan_dev(&dwc->chan), "%s: started %u\n", __func__, desc->txd.cookie);
dwc_dostart(dwc, desc);
}
@@ -238,7 +233,7 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
unsigned long flags;
struct dmaengine_desc_callback cb;
- dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie);
+ dev_vdbg(dmaengine_chan_dev(&dwc->chan), "descriptor %u complete\n", txd->cookie);
spin_lock_irqsave(&dwc->lock, flags);
dma_cookie_complete(txd);
@@ -265,7 +260,7 @@ static void dwc_complete_all(struct dw_dma *dw, struct dw_dma_chan *dwc)
spin_lock_irqsave(&dwc->lock, flags);
if (dma_readl(dw, CH_EN) & dwc->mask) {
- dev_err(chan2dev(&dwc->chan),
+ dev_err(dmaengine_chan_dev(&dwc->chan),
"BUG: XFER bit set, but channel not idle!\n");
/* Try to continue after resetting the channel... */
@@ -353,12 +348,12 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
}
if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
- dev_vdbg(chan2dev(&dwc->chan), "%s: soft LLP mode\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(&dwc->chan), "%s: soft LLP mode\n", __func__);
spin_unlock_irqrestore(&dwc->lock, flags);
return;
}
- dev_vdbg(chan2dev(&dwc->chan), "%s: llp=%pad\n", __func__, &llp);
+ dev_vdbg(dmaengine_chan_dev(&dwc->chan), "%s: llp=%pad\n", __func__, &llp);
list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
/* Initial residue value */
@@ -398,7 +393,7 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
spin_lock_irqsave(&dwc->lock, flags);
}
- dev_err(chan2dev(&dwc->chan),
+ dev_err(dmaengine_chan_dev(&dwc->chan),
"BUG: All descriptors done, but channel not idle!\n");
/* Try to continue after resetting the channel... */
@@ -410,7 +405,7 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
static inline void dwc_dump_lli(struct dw_dma_chan *dwc, struct dw_desc *desc)
{
- dev_crit(chan2dev(&dwc->chan), " desc: s0x%x d0x%x l0x%x c0x%x:%x\n",
+ dev_crit(dmaengine_chan_dev(&dwc->chan), " desc: s0x%x d0x%x l0x%x c0x%x:%x\n",
lli_read(desc, sar),
lli_read(desc, dar),
lli_read(desc, llp),
@@ -449,7 +444,7 @@ static void dwc_handle_error(struct dw_dma *dw, struct dw_dma_chan *dwc)
* controller flagged an error instead of scribbling over
* random memory locations.
*/
- dev_WARN(chan2dev(&dwc->chan), "Bad descriptor submitted for DMA!\n"
+ dev_WARN(dmaengine_chan_dev(&dwc->chan), "Bad descriptor submitted for DMA!\n"
" cookie: %d\n", bad_desc->txd.cookie);
dwc_dump_lli(dwc, bad_desc);
list_for_each_entry(child, &bad_desc->tx_list, desc_node)
@@ -552,12 +547,12 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
u32 ctllo, ctlhi;
u8 lms = DWC_LLP_LMS(m_master);
- dev_vdbg(chan2dev(chan),
+ dev_vdbg(dmaengine_chan_dev(chan),
"%s: d%pad s%pad l0x%zx f0x%lx\n", __func__,
&dest, &src, len, flags);
if (unlikely(!len)) {
- dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: length is zero!\n", __func__);
return NULL;
}
@@ -630,7 +625,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
struct scatterlist *sg;
size_t total_len = 0;
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
if (unlikely(!is_slave_direction(direction) || !sg_len))
return NULL;
@@ -754,7 +749,7 @@ slave_sg_fromdev_fill_desc:
return &first->txd;
err_desc_get:
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"not enough descriptors available. Direction %d\n", direction);
dwc_desc_put(dwc, first);
return NULL;
@@ -1063,11 +1058,11 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
struct dw_dma *dw = to_dw_dma(chan->device);
- dev_vdbg(chan2dev(chan), "%s\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s\n", __func__);
/* ASSERT: channel is idle */
if (dma_readl(dw, CH_EN) & dwc->mask) {
- dev_dbg(chan2dev(chan), "DMA channel not idle?\n");
+ dev_dbg(dmaengine_chan_dev(chan), "DMA channel not idle?\n");
return -EIO;
}
@@ -1083,7 +1078,7 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
* We need controller-specific data to set up slave transfers.
*/
if (chan->private && !dw_dma_filter(chan, chan->private)) {
- dev_warn(chan2dev(chan), "Wrong controller-specific data\n");
+ dev_warn(dmaengine_chan_dev(chan), "Wrong controller-specific data\n");
return -EINVAL;
}
@@ -1101,7 +1096,7 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
struct dw_dma *dw = to_dw_dma(chan->device);
unsigned long flags;
- dev_dbg(chan2dev(chan), "%s: descs allocated=%u\n", __func__,
+ dev_dbg(dmaengine_chan_dev(chan), "%s: descs allocated=%u\n", __func__,
dwc->descs_allocated);
/* ASSERT: channel is idle */
@@ -1126,7 +1121,7 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
if (!dw->in_use)
do_dw_dma_off(dw);
- dev_vdbg(chan2dev(chan), "%s: done\n", __func__);
+ dev_vdbg(dmaengine_chan_dev(chan), "%s: done\n", __func__);
}
static void dwc_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 311e55a97ba9..cbfe74fc8d71 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -250,11 +250,6 @@ struct ep93xx_edma_data {
size_t num_channels;
};
-static inline struct device *chan2dev(struct ep93xx_dma_chan *edmac)
-{
- return &edmac->chan.dev->device;
-}
-
static struct ep93xx_dma_chan *to_ep93xx_dma_chan(struct dma_chan *chan)
{
return container_of(chan, struct ep93xx_dma_chan, chan);
@@ -415,7 +410,7 @@ static void m2p_hw_shutdown(struct ep93xx_dma_chan *edmac)
m2p_set_control(edmac, 0);
while (m2p_channel_state(edmac) != M2P_STATE_IDLE)
- dev_warn(chan2dev(edmac), "M2P: Not yet IDLE\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "M2P: Not yet IDLE\n");
}
static void m2p_fill_desc(struct ep93xx_dma_chan *edmac)
@@ -425,7 +420,7 @@ static void m2p_fill_desc(struct ep93xx_dma_chan *edmac)
desc = ep93xx_dma_get_active(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac), "M2P: empty descriptor list\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "M2P: empty descriptor list\n");
return;
}
@@ -479,7 +474,7 @@ static int m2p_hw_interrupt(struct ep93xx_dma_chan *edmac)
* Revisit this when there is a mechanism to report back the
* errors.
*/
- dev_err(chan2dev(edmac),
+ dev_err(dmaengine_chan_dev(&edmac->chan),
"DMA transfer failed! Details:\n"
"\tcookie : %d\n"
"\tsrc_addr : 0x%08x\n"
@@ -586,7 +581,7 @@ static void m2m_fill_desc(struct ep93xx_dma_chan *edmac)
desc = ep93xx_dma_get_active(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac), "M2M: empty descriptor list\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "M2M: empty descriptor list\n");
return;
}
@@ -849,7 +844,7 @@ static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id)
desc = ep93xx_dma_get_active(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac),
+ dev_warn(dmaengine_chan_dev(&edmac->chan),
"got interrupt while active list is empty\n");
spin_unlock(&edmac->lock);
return IRQ_NONE;
@@ -867,7 +862,7 @@ static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id)
break;
default:
- dev_warn(chan2dev(edmac), "unknown interrupt!\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "unknown interrupt!\n");
ret = IRQ_NONE;
break;
}
@@ -967,7 +962,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
desc = kzalloc_obj(*desc);
if (!desc) {
- dev_warn(chan2dev(edmac), "not enough descriptors\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "not enough descriptors\n");
break;
}
@@ -1044,7 +1039,7 @@ ep93xx_dma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest,
for (offset = 0; offset < len; offset += bytes) {
desc = ep93xx_dma_desc_get(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac), "couldn't get descriptor\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "couldn't get descriptor\n");
goto fail;
}
@@ -1091,13 +1086,13 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
int i;
if (!edmac->edma->m2m && dir != ep93xx_dma_chan_direction(chan)) {
- dev_warn(chan2dev(edmac),
+ dev_warn(dmaengine_chan_dev(&edmac->chan),
"channel was configured with different direction\n");
return NULL;
}
if (test_bit(EP93XX_DMA_IS_CYCLIC, &edmac->flags)) {
- dev_warn(chan2dev(edmac),
+ dev_warn(dmaengine_chan_dev(&edmac->chan),
"channel is already used for cyclic transfers\n");
return NULL;
}
@@ -1109,14 +1104,14 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
size_t len = sg_dma_len(sg);
if (len > DMA_MAX_CHAN_BYTES) {
- dev_warn(chan2dev(edmac), "too big transfer size %zu\n",
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "too big transfer size %zu\n",
len);
goto fail;
}
desc = ep93xx_dma_desc_get(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac), "couldn't get descriptor\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "couldn't get descriptor\n");
goto fail;
}
@@ -1172,19 +1167,19 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
size_t offset = 0;
if (!edmac->edma->m2m && dir != ep93xx_dma_chan_direction(chan)) {
- dev_warn(chan2dev(edmac),
+ dev_warn(dmaengine_chan_dev(&edmac->chan),
"channel was configured with different direction\n");
return NULL;
}
if (test_and_set_bit(EP93XX_DMA_IS_CYCLIC, &edmac->flags)) {
- dev_warn(chan2dev(edmac),
+ dev_warn(dmaengine_chan_dev(&edmac->chan),
"channel is already used for cyclic transfers\n");
return NULL;
}
if (period_len > DMA_MAX_CHAN_BYTES) {
- dev_warn(chan2dev(edmac), "too big period length %zu\n",
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "too big period length %zu\n",
period_len);
return NULL;
}
@@ -1196,7 +1191,7 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
for (offset = 0; offset < buf_len; offset += period_len) {
desc = ep93xx_dma_desc_get(edmac);
if (!desc) {
- dev_warn(chan2dev(edmac), "couldn't get descriptor\n");
+ dev_warn(dmaengine_chan_dev(&edmac->chan), "couldn't get descriptor\n");
goto fail;
}
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
index d9fb717b5b53..6934ac882697 100644
--- a/drivers/dma/fsl-edma-main.c
+++ b/drivers/dma/fsl-edma-main.c
@@ -326,13 +326,16 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec,
if ((dma_spec->args[2] & FSL_EDMA_ODD_CH) && !(i & 0x1))
continue;
+ chan = dma_get_slave_channel(chan);
+ if (!chan)
+ return NULL;
+
fsl_chan->srcid = dma_spec->args[0];
fsl_chan->priority = dma_spec->args[1];
fsl_chan->is_rxchan = dma_spec->args[2] & FSL_EDMA_RX;
fsl_chan->is_remote = dma_spec->args[2] & FSL_EDMA_REMOTE;
fsl_chan->is_multi_fifo = dma_spec->args[2] & FSL_EDMA_MULTI_FIFO;
- chan = dma_get_slave_channel(chan);
chan->device->privatecnt++;
return chan;
}
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index befb4bb69d54..9cc289f7129e 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -361,7 +361,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_genq(
cdb |= FSL_RE_INTR_ON_ERROR << FSL_RE_CDB_ERROR_SHIFT;
cdb |= FSL_RE_DATA_DEP << FSL_RE_CDB_DEPEND_SHIFT;
xor = desc->cdb_addr;
- xor->cdb32 = cdb;
+ xor->cdb32 = cpu_to_be32(cdb);
if (scf) {
/* compute q = src0*coef0^src1*coef1^..., * is GF(8) mult */
@@ -481,7 +481,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_pq(
cdb |= FSL_RE_DATA_DEP << FSL_RE_CDB_DEPEND_SHIFT;
pq = desc->cdb_addr;
- pq->cdb32 = cdb;
+ pq->cdb32 = cpu_to_be32(cdb);
p = pq->gfm_q1;
/* Init gfm_q1[] */
@@ -564,7 +564,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_memcpy(
cdb |= FSL_RE_DATA_DEP << FSL_RE_CDB_DEPEND_SHIFT;
move = desc->cdb_addr;
- move->cdb32 = cdb;
+ move->cdb32 = cpu_to_be32(cdb);
/* Filling frame 0 of CFD with move CDB */
cf = desc->cf_addr;
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 22d62d958abd..99a878ed1444 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -681,7 +681,7 @@ static void fsldma_cleanup_descriptors(struct fsldma_chan *chan)
/**
* fsl_dma_alloc_chan_resources - Allocate resources for DMA channel.
- * @chan : Freescale DMA channel
+ * @dchan : Freescale DMA channel
*
* This function will create a dma pool for descriptor allocation.
*
@@ -738,7 +738,7 @@ static void fsldma_free_desc_list_reverse(struct fsldma_chan *chan,
/**
* fsl_dma_free_chan_resources - Free all resources of the channel.
- * @chan : Freescale DMA channel
+ * @dchan : Freescale DMA channel
*/
static void fsl_dma_free_chan_resources(struct dma_chan *dchan)
{
@@ -873,7 +873,7 @@ static int fsl_dma_device_config(struct dma_chan *dchan,
/**
* fsl_dma_memcpy_issue_pending - Issue the DMA start command
- * @chan : Freescale DMA channel
+ * @dchan : Freescale DMA channel
*/
static void fsl_dma_memcpy_issue_pending(struct dma_chan *dchan)
{
@@ -886,7 +886,9 @@ static void fsl_dma_memcpy_issue_pending(struct dma_chan *dchan)
/**
* fsl_tx_status - Determine the DMA status
- * @chan : Freescale DMA channel
+ * @dchan : Freescale DMA channel
+ * @cookie : DMA transaction identifier
+ * @txstate : DMA transaction state
*/
static enum dma_status fsl_tx_status(struct dma_chan *dchan,
dma_cookie_t cookie,
@@ -1205,6 +1207,7 @@ out_return:
static void fsl_dma_chan_remove(struct fsldma_chan *chan)
{
+ tasklet_kill(&chan->tasklet);
irq_dispose_mapping(chan->irq);
list_del(&chan->common.device_node);
iounmap(chan->regs);
@@ -1216,8 +1219,13 @@ static int fsldma_of_probe(struct platform_device *op)
struct fsldma_device *fdev;
struct device_node *child;
unsigned int i;
+ int irq;
int err;
+ irq = platform_get_irq_optional(op, 0);
+ if (irq == -EPROBE_DEFER)
+ return irq;
+
fdev = kzalloc_obj(*fdev);
if (!fdev) {
err = -ENOMEM;
@@ -1238,7 +1246,9 @@ static int fsldma_of_probe(struct platform_device *op)
}
/* map the channel IRQ if it exists, but don't hookup the handler yet */
- fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
+ fdev->irq = irq;
+ if (fdev->irq < 0)
+ fdev->irq = 0;
dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
dma_cap_set(DMA_SLAVE, fdev->common.cap_mask);
@@ -1300,7 +1310,6 @@ out_free_fdev:
if (fdev->chan[i])
fsl_dma_chan_remove(fdev->chan[i]);
}
- irq_dispose_mapping(fdev->irq);
iounmap(fdev->regs);
out_free:
kfree(fdev);
@@ -1322,7 +1331,6 @@ static void fsldma_of_remove(struct platform_device *op)
if (fdev->chan[i])
fsl_dma_chan_remove(fdev->chan[i]);
}
- irq_dispose_mapping(fdev->irq);
iounmap(fdev->regs);
kfree(fdev);
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index 5fcd1befc92d..657629b100fa 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -25,11 +25,6 @@
/* ---------------------------------------------------------------------- */
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
/* ---------------------------------------------------------------------- */
static void idma64_off(struct idma64 *idma64)
@@ -507,11 +502,10 @@ static int idma64_alloc_chan_resources(struct dma_chan *chan)
struct idma64_chan *idma64c = to_idma64_chan(chan);
/* Create a pool of consistent memory blocks for hardware descriptors */
- idma64c->pool = dma_pool_create(dev_name(chan2dev(chan)),
- chan->device->dev,
+ idma64c->pool = dma_pool_create(dma_chan_name(chan), chan->device->dev,
sizeof(struct idma64_lli), 8, 0);
if (!idma64c->pool) {
- dev_err(chan2dev(chan), "No memory for descriptors\n");
+ dev_err(dmaengine_chan_dev(chan), "No memory for descriptors\n");
return -ENOMEM;
}
diff --git a/drivers/dma/loongson/loongson1-apb-dma.c b/drivers/dma/loongson/loongson1-apb-dma.c
index 89786cbd20ab..46b4bfef45e2 100644
--- a/drivers/dma/loongson/loongson1-apb-dma.c
+++ b/drivers/dma/loongson/loongson1-apb-dma.c
@@ -89,11 +89,6 @@ static irqreturn_t ls1x_dma_irq_handler(int irq, void *data);
#define to_ls1x_dma_desc(d) \
container_of(d, struct ls1x_dma_desc, vd)
-static inline struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline int ls1x_dma_query(struct ls1x_dma_chan *chan,
dma_addr_t *lli_phys)
{
@@ -107,7 +102,7 @@ static inline int ls1x_dma_query(struct ls1x_dma_chan *chan,
ret = readl_poll_timeout_atomic(chan->reg_base + LS1X_DMA_CTRL, val,
!(val & LS1X_DMA_ASK_VALID), 0, 3000);
if (ret)
- dev_err(chan2dev(dchan), "failed to query DMA\n");
+ dev_err(dmaengine_chan_dev(dchan), "failed to query DMA\n");
return ret;
}
@@ -116,7 +111,7 @@ static inline int ls1x_dma_start(struct ls1x_dma_chan *chan,
dma_addr_t *lli_phys)
{
struct dma_chan *dchan = &chan->vc.chan;
- struct device *dev = chan2dev(dchan);
+ struct device *dev = dmaengine_chan_dev(dchan);
int val, ret;
val = *lli_phys & LS1X_DMA_LLI_ADDR_MASK;
@@ -143,7 +138,7 @@ static inline void ls1x_dma_stop(struct ls1x_dma_chan *chan)
static void ls1x_dma_free_chan_resources(struct dma_chan *dchan)
{
struct ls1x_dma_chan *chan = to_ls1x_dma_chan(dchan);
- struct device *dev = chan2dev(dchan);
+ struct device *dev = dmaengine_chan_dev(dchan);
dma_free_coherent(dev, sizeof(struct ls1x_dma_lli),
chan->curr_lli, chan->curr_lli->phys);
@@ -156,7 +151,7 @@ static void ls1x_dma_free_chan_resources(struct dma_chan *dchan)
static int ls1x_dma_alloc_chan_resources(struct dma_chan *dchan)
{
struct ls1x_dma_chan *chan = to_ls1x_dma_chan(dchan);
- struct device *dev = chan2dev(dchan);
+ struct device *dev = dmaengine_chan_dev(dchan);
dma_addr_t phys;
int ret;
@@ -219,7 +214,7 @@ static int ls1x_dma_prep_lli(struct dma_chan *dchan, struct ls1x_dma_desc *desc,
{
struct ls1x_dma_chan *chan = to_ls1x_dma_chan(dchan);
struct ls1x_dma_lli *lli, *prev = NULL, *first = NULL;
- struct device *dev = chan2dev(dchan);
+ struct device *dev = dmaengine_chan_dev(dchan);
struct list_head *pos = NULL;
struct scatterlist *sg;
unsigned int dev_addr, cmd, i;
@@ -299,7 +294,7 @@ ls1x_dma_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,
{
struct ls1x_dma_desc *desc;
- dev_dbg(chan2dev(dchan), "sg_len=%u flags=0x%lx dir=%s\n",
+ dev_dbg(dmaengine_chan_dev(dchan), "sg_len=%u flags=0x%lx dir=%s\n",
sg_len, flags, dmaengine_get_direction_text(dir));
desc = ls1x_dma_alloc_desc();
@@ -325,7 +320,7 @@ ls1x_dma_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
unsigned int i;
int ret;
- dev_dbg(chan2dev(dchan),
+ dev_dbg(dmaengine_chan_dev(dchan),
"buf_len=%zu period_len=%zu flags=0x%lx dir=%s\n",
buf_len, period_len, flags, dmaengine_get_direction_text(dir));
@@ -450,7 +445,7 @@ static enum dma_status ls1x_dma_tx_status(struct dma_chan *dchan,
if (lli->hw[LS1X_DMADESC_NEXT] == next_phys)
break;
- dev_dbg(chan2dev(dchan), "current lli_phys=%pad",
+ dev_dbg(dmaengine_chan_dev(dchan), "current lli_phys=%pad",
&lli->phys);
/* count the residues */
@@ -489,7 +484,7 @@ static irqreturn_t ls1x_dma_irq_handler(int irq, void *data)
{
struct ls1x_dma_chan *chan = data;
struct dma_chan *dchan = &chan->vc.chan;
- struct device *dev = chan2dev(dchan);
+ struct device *dev = dmaengine_chan_dev(dchan);
struct virt_dma_desc *vd;
scoped_guard(spinlock, &chan->vc.lock) {
diff --git a/drivers/dma/loongson/loongson2-apb-cmc-dma.c b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
index 969dbc5dabe7..bc336947e31a 100644
--- a/drivers/dma/loongson/loongson2-apb-cmc-dma.c
+++ b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
@@ -134,11 +134,6 @@ static struct loongson2_cmc_dma_desc *to_lmdma_desc(struct virt_dma_desc *vdesc)
return container_of(vdesc, struct loongson2_cmc_dma_desc, vdesc);
}
-static struct device *chan2dev(struct loongson2_cmc_dma_chan *lchan)
-{
- return &lchan->vchan.chan.dev->device;
-}
-
static u32 loongson2_cmc_dma_read(struct loongson2_cmc_dma_dev *lddev, u32 reg, u32 id)
{
return readl(lddev->base + (reg + lddev->chan_reg_offset * id));
@@ -302,7 +297,7 @@ static irqreturn_t loongson2_cmc_dma_chan_irq(int irq, void *devid)
{
struct loongson2_cmc_dma_chan *lchan = devid;
struct loongson2_cmc_dma_dev *lddev = lmdma_get_dev(lchan);
- struct device *dev = chan2dev(lchan);
+ struct device *dev = vchan_chan_dev(&lchan->vchan);
u32 ists, status, ccr;
scoped_guard(spinlock, &lchan->vchan.lock) {
@@ -337,7 +332,7 @@ static void loongson2_cmc_dma_issue_pending(struct dma_chan *chan)
guard(spinlock_irqsave)(&lchan->vchan.lock);
if (vchan_issue_pending(&lchan->vchan) && !lchan->desc) {
- dev_dbg(chan2dev(lchan), "vchan %pK: issued\n", &lchan->vchan);
+ dev_dbg(vchan_chan_dev(&lchan->vchan), "vchan %pK: issued\n", &lchan->vchan);
loongson2_cmc_dma_start_transfer(lchan);
}
}
@@ -347,7 +342,7 @@ static int loongson2_cmc_dma_set_xfer_param(struct loongson2_cmc_dma_chan *lchan
enum dma_slave_buswidth *buswidth, u32 buf_len)
{
struct dma_slave_config sconfig = lchan->dma_sconfig;
- struct device *dev = chan2dev(lchan);
+ struct device *dev = vchan_chan_dev(&lchan->vchan);
int dev_width;
u32 ccr;
@@ -409,7 +404,7 @@ loongson2_cmc_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
num_items = DIV_ROUND_UP(sg_dma_len(sg), buswidth);
if (num_items >= LOONSON2_CMCDMA_MAX_DATA_ITEMS) {
- dev_err(chan2dev(lchan), "Number of items not supported\n");
+ dev_err(vchan_chan_dev(&lchan->vchan), "Number of items not supported\n");
kfree(desc);
return ERR_PTR(-EINVAL);
}
@@ -447,7 +442,7 @@ loongson2_cmc_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, si
num_items = DIV_ROUND_UP(period_len, buswidth);
if (num_items >= LOONSON2_CMCDMA_MAX_DATA_ITEMS) {
- dev_err(chan2dev(lchan), "Number of items not supported\n");
+ dev_err(vchan_chan_dev(&lchan->vchan), "Number of items not supported\n");
return ERR_PTR(-EINVAL);
}
@@ -678,7 +673,7 @@ static int loongson2_cmc_dma_probe(struct platform_device *pdev)
return lchan->irq;
ret = devm_request_irq(dev, lchan->irq, loongson2_cmc_dma_chan_irq, IRQF_SHARED,
- dev_name(chan2dev(lchan)), lchan);
+ vchan_chan_name(&lchan->vchan), lchan);
if (ret)
return ret;
}
diff --git a/drivers/dma/loongson/loongson2-apb-dma.c b/drivers/dma/loongson/loongson2-apb-dma.c
index aceb069e71fc..16a0c1c60d59 100644
--- a/drivers/dma/loongson/loongson2-apb-dma.c
+++ b/drivers/dma/loongson/loongson2-apb-dma.c
@@ -161,11 +161,6 @@ static inline struct ls2x_dma_priv *to_ldma_priv(struct dma_device *ddev)
return container_of(ddev, struct ls2x_dma_priv, ddev);
}
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static void ls2x_dma_desc_free(struct virt_dma_desc *vdesc)
{
struct ls2x_dma_chan *lchan = to_ldma_chan(vdesc->tx.chan);
@@ -282,11 +277,11 @@ static int ls2x_dma_alloc_chan_resources(struct dma_chan *chan)
struct ls2x_dma_chan *lchan = to_ldma_chan(chan);
/* Create a pool of consistent memory blocks for hardware descriptors */
- lchan->pool = dma_pool_create(dev_name(chan2dev(chan)),
+ lchan->pool = dma_pool_create(dma_chan_name(chan),
chan->device->dev, PAGE_SIZE,
__alignof__(struct ls2x_dma_hw_desc), 0);
if (!lchan->pool) {
- dev_err(chan2dev(chan), "No memory for descriptors\n");
+ dev_err(dmaengine_chan_dev(chan), "No memory for descriptors\n");
return -ENOMEM;
}
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index 78e3e07e681d..8abd24e2ffc7 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -564,8 +564,7 @@ static int mmp_pdma_alloc_chan_resources(struct dma_chan *dchan)
if (chan->desc_pool)
return 1;
- chan->desc_pool = dma_pool_create(dev_name(&dchan->dev->device),
- chan->dev,
+ chan->desc_pool = dma_pool_create(dma_chan_name(dchan), chan->dev,
sizeof(struct mmp_pdma_desc_sw),
__alignof__(struct mmp_pdma_desc_sw),
0);
@@ -712,7 +711,7 @@ mmp_pdma_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,
for_each_sg(sgl, sg, sg_len, i) {
addr = sg_dma_address(sg);
- avail = sg_dma_len(sgl);
+ avail = sg_dma_len(sg);
do {
len = min_t(size_t, avail, PDMA_MAX_DESC_BYTES);
diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c
index 442f5aa16031..28be93eed4cc 100644
--- a/drivers/dma/moxart-dma.c
+++ b/drivers/dma/moxart-dma.c
@@ -154,11 +154,6 @@ static const unsigned int es_bytes[] = {
[MOXART_DMA_DATA_TYPE_S32] = 4,
};
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline struct moxart_chan *to_moxart_dma_chan(struct dma_chan *c)
{
return container_of(c, struct moxart_chan, vc.chan);
@@ -182,7 +177,7 @@ static int moxart_terminate_all(struct dma_chan *chan)
LIST_HEAD(head);
u32 ctrl;
- dev_dbg(chan2dev(chan), "%s: ch=%p\n", __func__, ch);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: ch=%p\n", __func__, ch);
spin_lock_irqsave(&ch->vc.lock, flags);
@@ -272,7 +267,7 @@ static struct dma_async_tx_descriptor *moxart_prep_slave_sg(
unsigned int i;
if (!is_slave_direction(dir)) {
- dev_err(chan2dev(chan), "%s: invalid DMA direction\n",
+ dev_err(dmaengine_chan_dev(chan), "%s: invalid DMA direction\n",
__func__);
return NULL;
}
@@ -296,7 +291,7 @@ static struct dma_async_tx_descriptor *moxart_prep_slave_sg(
es = MOXART_DMA_DATA_TYPE_S32;
break;
default:
- dev_err(chan2dev(chan), "%s: unsupported data width (%u)\n",
+ dev_err(dmaengine_chan_dev(chan), "%s: unsupported data width (%u)\n",
__func__, dev_width);
return NULL;
}
@@ -341,7 +336,7 @@ static int moxart_alloc_chan_resources(struct dma_chan *chan)
{
struct moxart_chan *ch = to_moxart_dma_chan(chan);
- dev_dbg(chan2dev(chan), "%s: allocating channel #%u\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: allocating channel #%u\n",
__func__, ch->ch_num);
ch->allocated = 1;
@@ -354,7 +349,7 @@ static void moxart_free_chan_resources(struct dma_chan *chan)
vchan_free_chan_resources(&ch->vc);
- dev_dbg(chan2dev(chan), "%s: freeing channel #%u\n",
+ dev_dbg(dmaengine_chan_dev(chan), "%s: freeing channel #%u\n",
__func__, ch->ch_num);
ch->allocated = 0;
}
@@ -379,7 +374,7 @@ static void moxart_set_transfer_params(struct moxart_chan *ch, unsigned int len)
*/
writel(d->dma_cycles, ch->base + REG_OFF_CYCLES);
- dev_dbg(chan2dev(&ch->vc.chan), "%s: set %u DMA cycles (len=%u)\n",
+ dev_dbg(vchan_chan_dev(&ch->vc), "%s: set %u DMA cycles (len=%u)\n",
__func__, d->dma_cycles, len);
}
@@ -460,7 +455,7 @@ static size_t moxart_dma_desc_size_in_flight(struct moxart_chan *ch)
completed_cycles = (ch->desc->dma_cycles - cycles);
size -= completed_cycles << es_bytes[ch->desc->es];
- dev_dbg(chan2dev(&ch->vc.chan), "%s: size=%zu\n", __func__, size);
+ dev_dbg(vchan_chan_dev(&ch->vc), "%s: size=%zu\n", __func__, size);
return size;
}
@@ -517,7 +512,7 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid)
unsigned int i;
u32 ctrl;
- dev_dbg(chan2dev(&ch->vc.chan), "%s\n", __func__);
+ dev_dbg(vchan_chan_dev(&ch->vc), "%s\n", __func__);
for (i = 0; i < APB_DMA_MAX_CHANNEL; i++, ch++) {
if (!ch->allocated)
@@ -525,7 +520,7 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid)
ctrl = readl(ch->base + REG_OFF_CTRL);
- dev_dbg(chan2dev(&ch->vc.chan), "%s: ch=%p ch->base=%p ctrl=%x\n",
+ dev_dbg(vchan_chan_dev(&ch->vc), "%s: ch=%p ch->base=%p ctrl=%x\n",
__func__, ch, ch->base, ctrl);
if (ctrl & APB_DMA_FIN_INT_STS) {
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index dd4f150d5fb1..c4e0dce3ca64 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1167,6 +1167,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
err_free_irq:
free_irq(mv_chan->irq, mv_chan);
+ tasklet_kill(&mv_chan->irq_tasklet);
err_free_dma:
dma_free_wc(&pdev->dev, MV_XOR_POOL_SIZE,
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 05d7321629cc..744cd14d7872 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -1202,7 +1202,7 @@ static irqreturn_t nbpf_chan_irq(int irq, void *dev)
nbpf_status_ack(chan);
- dev_dbg(&chan->dma_chan.dev->device, "%s()\n", __func__);
+ dev_dbg(dmaengine_chan_dev(&chan->dma_chan), "%s()\n", __func__);
spin_lock(&chan->lock);
desc = chan->running;
diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
index 7c80572fc71d..9dc88d804a2e 100644
--- a/drivers/dma/owl-dma.c
+++ b/drivers/dma/owl-dma.c
@@ -292,11 +292,6 @@ static inline struct owl_dma *to_owl_dma(struct dma_device *dd)
return container_of(dd, struct owl_dma, dma);
}
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline struct owl_dma_vchan *to_owl_vchan(struct dma_chan *chan)
{
return container_of(chan, struct owl_dma_vchan, vc.chan);
@@ -573,7 +568,7 @@ static int owl_dma_start_next_txd(struct owl_dma_vchan *vchan)
spin_unlock_irqrestore(&od->lock, flags);
- dev_dbg(chan2dev(&vchan->vc.chan), "starting pchan %d\n", pchan->id);
+ dev_dbg(vchan_chan_dev(&vchan->vc), "starting pchan %d\n", pchan->id);
/* Start DMA transfer for this pchan */
pchan_writel(pchan, OWL_DMAX_START, 0x1);
@@ -757,7 +752,7 @@ static int owl_dma_resume(struct dma_chan *chan)
if (!vchan->pchan && !vchan->txd)
return 0;
- dev_dbg(chan2dev(chan), "vchan %p: resume\n", &vchan->vc);
+ dev_dbg(dmaengine_chan_dev(chan), "vchan %p: resume\n", &vchan->vc);
spin_lock_irqsave(&vchan->vc.lock, flags);
@@ -888,7 +883,7 @@ static struct dma_async_tx_descriptor
for (offset = 0; offset < len; offset += bytes) {
lli = owl_dma_alloc_lli(od);
if (!lli) {
- dev_warn(chan2dev(chan), "failed to allocate lli\n");
+ dev_warn(dmaengine_chan_dev(chan), "failed to allocate lli\n");
goto err_txd_free;
}
@@ -898,7 +893,7 @@ static struct dma_async_tx_descriptor
bytes, DMA_MEM_TO_MEM,
&vchan->cfg, txd->cyclic);
if (ret) {
- dev_warn(chan2dev(chan), "failed to config lli\n");
+ dev_warn(dmaengine_chan_dev(chan), "failed to config lli\n");
goto err_txd_free;
}
@@ -947,7 +942,7 @@ static struct dma_async_tx_descriptor
lli = owl_dma_alloc_lli(od);
if (!lli) {
- dev_err(chan2dev(chan), "failed to allocate lli");
+ dev_err(dmaengine_chan_dev(chan), "failed to allocate lli");
goto err_txd_free;
}
@@ -962,7 +957,7 @@ static struct dma_async_tx_descriptor
ret = owl_dma_cfg_lli(vchan, lli, src, dst, len, dir, sconfig,
txd->cyclic);
if (ret) {
- dev_warn(chan2dev(chan), "failed to config lli");
+ dev_warn(dmaengine_chan_dev(chan), "failed to config lli");
goto err_txd_free;
}
@@ -1003,7 +998,7 @@ static struct dma_async_tx_descriptor
for (i = 0; i < periods; i++) {
lli = owl_dma_alloc_lli(od);
if (!lli) {
- dev_warn(chan2dev(chan), "failed to allocate lli");
+ dev_warn(dmaengine_chan_dev(chan), "failed to allocate lli");
goto err_txd_free;
}
@@ -1018,7 +1013,7 @@ static struct dma_async_tx_descriptor
ret = owl_dma_cfg_lli(vchan, lli, src, dst, period_len,
dir, sconfig, txd->cyclic);
if (ret) {
- dev_warn(chan2dev(chan), "failed to config lli");
+ dev_warn(dmaengine_chan_dev(chan), "failed to config lli");
goto err_txd_free;
}
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index bf805f1024f6..88baf7ffec37 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -150,11 +150,6 @@ static inline struct pch_dma *to_pd(struct dma_device *ddev)
return container_of(ddev, struct pch_dma, dma);
}
-static inline struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline
struct pch_dma_desc *pdc_first_active(struct pch_dma_chan *pd_chan)
{
@@ -189,7 +184,7 @@ static void pdc_enable_irq(struct dma_chan *chan, int enable)
dma_writel(pd, CTL2, val);
- dev_dbg(chan2dev(chan), "pdc_enable_irq: chan %d -> %x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "pdc_enable_irq: chan %d -> %x\n",
chan->chan_id, val);
}
@@ -237,7 +232,7 @@ static void pdc_set_dir(struct dma_chan *chan)
dma_writel(pd, CTL3, val);
}
- dev_dbg(chan2dev(chan), "pdc_set_dir: chan %d -> %x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "pdc_set_dir: chan %d -> %x\n",
chan->chan_id, val);
}
@@ -271,7 +266,7 @@ static void pdc_set_mode(struct dma_chan *chan, u32 mode)
dma_writel(pd, CTL3, val);
}
- dev_dbg(chan2dev(chan), "pdc_set_mode: chan %d -> %x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "pdc_set_mode: chan %d -> %x\n",
chan->chan_id, val);
}
@@ -314,18 +309,18 @@ static bool pdc_is_idle(struct pch_dma_chan *pd_chan)
static void pdc_dostart(struct pch_dma_chan *pd_chan, struct pch_dma_desc* desc)
{
if (!pdc_is_idle(pd_chan)) {
- dev_err(chan2dev(&pd_chan->chan),
+ dev_err(dmaengine_chan_dev(&pd_chan->chan),
"BUG: Attempt to start non-idle channel\n");
return;
}
- dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> dev_addr: %x\n",
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "chan %d -> dev_addr: %x\n",
pd_chan->chan.chan_id, desc->regs.dev_addr);
- dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> mem_addr: %x\n",
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "chan %d -> mem_addr: %x\n",
pd_chan->chan.chan_id, desc->regs.mem_addr);
- dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> size: %x\n",
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "chan %d -> size: %x\n",
pd_chan->chan.chan_id, desc->regs.size);
- dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> next: %x\n",
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "chan %d -> next: %x\n",
pd_chan->chan.chan_id, desc->regs.next);
if (list_empty(&desc->tx_list)) {
@@ -382,8 +377,8 @@ static void pdc_handle_error(struct pch_dma_chan *pd_chan)
if (!list_empty(&pd_chan->active_list))
pdc_dostart(pd_chan, pdc_first_active(pd_chan));
- dev_crit(chan2dev(&pd_chan->chan), "Bad descriptor submitted\n");
- dev_crit(chan2dev(&pd_chan->chan), "descriptor cookie: %d\n",
+ dev_crit(dmaengine_chan_dev(&pd_chan->chan), "Bad descriptor submitted\n");
+ dev_crit(dmaengine_chan_dev(&pd_chan->chan), "descriptor cookie: %d\n",
bad_desc->txd.cookie);
pdc_chain_complete(pd_chan, bad_desc);
@@ -450,10 +445,10 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)
ret = desc;
break;
}
- dev_dbg(chan2dev(&pd_chan->chan), "desc %p not ACKed\n", desc);
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "desc %p not ACKed\n", desc);
}
spin_unlock(&pd_chan->lock);
- dev_dbg(chan2dev(&pd_chan->chan), "scanned %d descriptors\n", i);
+ dev_dbg(dmaengine_chan_dev(&pd_chan->chan), "scanned %d descriptors\n", i);
if (!ret) {
ret = pdc_alloc_desc(&pd_chan->chan, GFP_ATOMIC);
@@ -462,7 +457,7 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)
pd_chan->descs_allocated++;
spin_unlock(&pd_chan->lock);
} else {
- dev_err(chan2dev(&pd_chan->chan),
+ dev_err(dmaengine_chan_dev(&pd_chan->chan),
"failed to alloc desc\n");
}
}
@@ -489,7 +484,7 @@ static int pd_alloc_chan_resources(struct dma_chan *chan)
int i;
if (!pdc_is_idle(pd_chan)) {
- dev_dbg(chan2dev(chan), "DMA channel not idle ?\n");
+ dev_dbg(dmaengine_chan_dev(chan), "DMA channel not idle ?\n");
return -EIO;
}
@@ -500,7 +495,7 @@ static int pd_alloc_chan_resources(struct dma_chan *chan)
desc = pdc_alloc_desc(chan, GFP_KERNEL);
if (!desc) {
- dev_warn(chan2dev(chan),
+ dev_warn(dmaengine_chan_dev(chan),
"Only allocated %d initial descriptors\n", i);
break;
}
@@ -573,7 +568,7 @@ static struct dma_async_tx_descriptor *pd_prep_slave_sg(struct dma_chan *chan,
int i;
if (unlikely(!sg_len)) {
- dev_info(chan2dev(chan), "prep_slave_sg: length is zero!\n");
+ dev_info(dmaengine_chan_dev(chan), "prep_slave_sg: length is zero!\n");
return NULL;
}
@@ -639,7 +634,7 @@ static struct dma_async_tx_descriptor *pd_prep_slave_sg(struct dma_chan *chan,
return &first->txd;
err_desc_get:
- dev_err(chan2dev(chan), "failed to get desc or wrong parameters\n");
+ dev_err(dmaengine_chan_dev(chan), "failed to get desc or wrong parameters\n");
pdc_desc_put(pd_chan, first);
return NULL;
}
@@ -671,7 +666,7 @@ static void pdc_tasklet(struct tasklet_struct *t)
unsigned long flags;
if (!pdc_is_idle(pd_chan)) {
- dev_err(chan2dev(&pd_chan->chan),
+ dev_err(dmaengine_chan_dev(&pd_chan->chan),
"BUG: handle non-idle channel in tasklet\n");
return;
}
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index fc43124fefa8..4f0d1d531f01 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -149,7 +149,7 @@ struct pxad_device {
({ \
u32 _v; \
_v = readl_relaxed((phy)->base + _reg((phy)->idx)); \
- dev_vdbg(&phy->vchan->vc.chan.dev->device, \
+ dev_vdbg(vchan_chan_dev(&phy->vchan->vc), \
"%s(): readl(%s): 0x%08x\n", __func__, #_reg, \
_v); \
_v; \
@@ -157,14 +157,14 @@ struct pxad_device {
#define phy_writel(phy, val, _reg) \
do { \
writel((val), (phy)->base + _reg((phy)->idx)); \
- dev_vdbg(&phy->vchan->vc.chan.dev->device, \
+ dev_vdbg(vchan_chan_dev(&phy->vchan->vc), \
"%s(): writel(0x%08x, %s)\n", \
__func__, (u32)(val), #_reg); \
} while (0)
#define phy_writel_relaxed(phy, val, _reg) \
do { \
writel_relaxed((val), (phy)->base + _reg((phy)->idx)); \
- dev_vdbg(&phy->vchan->vc.chan.dev->device, \
+ dev_vdbg(vchan_chan_dev(&phy->vchan->vc), \
"%s(): writel_relaxed(0x%08x, %s)\n", \
__func__, (u32)(val), #_reg); \
} while (0)
@@ -396,7 +396,7 @@ static struct pxad_phy *lookup_phy(struct pxad_chan *pchan)
out_unlock:
spin_unlock_irqrestore(&pdev->phy_lock, flags);
- dev_dbg(&pchan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&pchan->vc),
"%s(): phy=%p(%d)\n", __func__, found,
found ? found->idx : -1);
@@ -409,7 +409,7 @@ static void pxad_free_phy(struct pxad_chan *chan)
unsigned long flags;
u32 reg;
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): freeing\n", __func__);
if (!chan->phy)
return;
@@ -454,7 +454,7 @@ static void phy_enable(struct pxad_phy *phy, bool misaligned)
if (!phy->vchan)
return;
- dev_dbg(&phy->vchan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&phy->vchan->vc),
"%s(); phy=%p(%d) misaligned=%d\n", __func__,
phy, phy->idx, misaligned);
@@ -483,7 +483,7 @@ static void phy_disable(struct pxad_phy *phy)
return;
dcsr = phy_readl_relaxed(phy, DCSR);
- dev_dbg(&phy->vchan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&phy->vchan->vc),
"%s(): phy=%p(%d)\n", __func__, phy, phy->idx);
phy_writel(phy, dcsr & ~PXA_DCSR_RUN & ~PXA_DCSR_STOPIRQEN, DCSR);
}
@@ -491,12 +491,12 @@ static void phy_disable(struct pxad_phy *phy)
static void pxad_launch_chan(struct pxad_chan *chan,
struct pxad_desc_sw *desc)
{
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): desc=%p\n", __func__, desc);
if (!chan->phy) {
chan->phy = lookup_phy(chan);
if (!chan->phy) {
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): no free dma channel\n", __func__);
return;
}
@@ -592,7 +592,7 @@ static unsigned int clear_chan_irq(struct pxad_phy *phy)
dcsr = phy_readl_relaxed(phy, DCSR);
phy_writel(phy, dcsr, DCSR);
if ((dcsr & PXA_DCSR_BUSERR) && (phy->vchan))
- dev_warn(&phy->vchan->vc.chan.dev->device,
+ dev_warn(vchan_chan_dev(&phy->vchan->vc),
"%s(chan=%p): PXA_DCSR_BUSERR\n",
__func__, &phy->vchan);
@@ -617,7 +617,7 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)
spin_lock(&chan->vc.lock);
list_for_each_entry_safe(vd, tmp, &chan->vc.desc_issued, node) {
vd_completed = is_desc_completed(vd);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): checking txd %p[%x]: completed=%d dcsr=0x%x\n",
__func__, vd, vd->tx.cookie, vd_completed,
dcsr);
@@ -640,7 +640,7 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)
}
if (!chan->bus_error && dcsr & PXA_DCSR_STOPSTATE) {
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): channel stopped, submitted_empty=%d issued_empty=%d",
__func__,
list_empty(&chan->vc.desc_submitted),
@@ -694,7 +694,7 @@ static int pxad_alloc_chan_resources(struct dma_chan *dchan)
__alignof__(struct pxad_desc_hw),
0);
if (!chan->desc_pool) {
- dev_err(&chan->vc.chan.dev->device,
+ dev_err(vchan_chan_dev(&chan->vc),
"%s(): unable to allocate descriptor pool\n",
__func__);
return -ENOMEM;
@@ -750,7 +750,7 @@ pxad_alloc_desc(struct pxad_chan *chan, unsigned int nb_hw_desc)
for (i = 0; i < nb_hw_desc; i++) {
desc = dma_pool_alloc(sw_desc->desc_pool, GFP_NOWAIT, &dma);
if (!desc) {
- dev_err(&chan->vc.chan.dev->device,
+ dev_err(vchan_chan_dev(&chan->vc),
"%s(): Couldn't allocate the %dth hw_desc from dma_pool %p\n",
__func__, i, sw_desc->desc_pool);
sw_desc->nb_desc = i;
@@ -787,7 +787,7 @@ static dma_cookie_t pxad_tx_submit(struct dma_async_tx_descriptor *tx)
if (list_empty(&vc->desc_submitted) && pxad_try_hotchain(vc, vd)) {
list_move_tail(&vd->node, &vc->desc_issued);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): txd %p[%x]: submitted (hot linked)\n",
__func__, vd, cookie);
goto out;
@@ -810,7 +810,7 @@ static dma_cookie_t pxad_tx_submit(struct dma_async_tx_descriptor *tx)
else
vd_chained = NULL;
}
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): txd %p[%x]: submitted (%s linked)\n",
__func__, vd, cookie, vd_chained ? "cold" : "not");
list_move_tail(&vd->node, &vc->desc_submitted);
@@ -833,7 +833,7 @@ static void pxad_issue_pending(struct dma_chan *dchan)
vd_first = list_first_entry(&chan->vc.desc_submitted,
struct virt_dma_desc, node);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): txd %p[%x]", __func__, vd_first, vd_first->tx.cookie);
vchan_issue_pending(&chan->vc);
@@ -853,7 +853,7 @@ pxad_tx_prep(struct virt_dma_chan *vc, struct virt_dma_desc *vd,
INIT_LIST_HEAD(&vd->node);
tx = vchan_tx_prep(vc, vd, tx_flags);
tx->tx_submit = pxad_tx_submit;
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): vc=%p txd=%p[%x] flags=0x%lx\n", __func__,
vc, vd, vd->tx.cookie,
tx_flags);
@@ -892,7 +892,7 @@ static void pxad_get_config(struct pxad_chan *chan,
*dcmd |= PXA_DCMD_BURST32 | PXA_DCMD_INCTRGADDR |
PXA_DCMD_INCSRCADDR;
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): dev_addr=0x%x maxburst=%d width=%d dir=%d\n",
__func__, dev_addr, maxburst, width, dir);
@@ -926,7 +926,7 @@ pxad_prep_memcpy(struct dma_chan *dchan,
if (!dchan || !len)
return NULL;
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): dma_dst=0x%lx dma_src=0x%lx len=%zu flags=%lx\n",
__func__, (unsigned long)dma_dst, (unsigned long)dma_src,
len, flags);
@@ -975,7 +975,7 @@ pxad_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,
return NULL;
pxad_get_config(chan, dir, &dcmd, &dsadr, &dtadr);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): dir=%d flags=%lx\n", __func__, dir, flags);
nb_desc = sg_nents_for_dma(sgl, sg_len, PDMA_MAX_DESC_BYTES);
@@ -1022,7 +1022,7 @@ pxad_prep_dma_cyclic(struct dma_chan *dchan,
if (!dchan || !len || !period_len)
return NULL;
if ((dir != DMA_DEV_TO_MEM) && (dir != DMA_MEM_TO_DEV)) {
- dev_err(&chan->vc.chan.dev->device,
+ dev_err(vchan_chan_dev(&chan->vc),
"Unsupported direction for cyclic DMA\n");
return NULL;
}
@@ -1033,7 +1033,7 @@ pxad_prep_dma_cyclic(struct dma_chan *dchan,
pxad_get_config(chan, dir, &dcmd, &dsadr, &dtadr);
dcmd |= PXA_DCMD_ENDIRQEN | (PXA_DCMD_LENGTH & period_len);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): buf_addr=0x%lx len=%zu period=%zu dir=%d flags=%lx\n",
__func__, (unsigned long)buf_addr, len, period_len, dir, flags);
@@ -1081,14 +1081,14 @@ static int pxad_terminate_all(struct dma_chan *dchan)
struct pxad_phy *phy;
LIST_HEAD(head);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): vchan %p: terminate all\n", __func__, &chan->vc);
spin_lock_irqsave(&chan->vc.lock, flags);
vchan_get_all_descriptors(&chan->vc, &head);
list_for_each_entry(vd, &head, node) {
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): cancelling txd %p[%x] (completed=%d)", __func__,
vd, vd->tx.cookie, is_desc_completed(vd));
}
@@ -1178,7 +1178,7 @@ static unsigned int pxad_residue(struct pxad_chan *chan,
out:
spin_unlock_irqrestore(&chan->vc.lock, flags);
- dev_dbg(&chan->vc.chan.dev->device,
+ dev_dbg(vchan_chan_dev(&chan->vc),
"%s(): txd %p[%x] sw_desc=%p: %d\n",
__func__, vd, cookie, sw_desc, residue);
return residue;
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index d9547017f3bd..35dbff5f9f1a 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -268,7 +268,7 @@ static int st_fdma_alloc_chan_res(struct dma_chan *chan)
struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
/* Create the dma pool for descriptor allocation */
- fchan->node_pool = dma_pool_create(dev_name(&chan->dev->device),
+ fchan->node_pool = dma_pool_create(dma_chan_name(chan),
fchan->fdev->dev,
sizeof(struct st_fdma_hw_node),
__alignof__(struct st_fdma_hw_node),
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 42906b394df8..cb93e97ba5f6 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -624,11 +624,6 @@ struct d40_base {
struct d40_chan phy_chans[];
};
-static struct device *chan2dev(struct d40_chan *d40c)
-{
- return &d40c->chan.dev->device;
-}
-
static bool chan_is_physical(struct d40_chan *chan)
{
return chan->log_num == D40_PHY_CHAN;
@@ -649,7 +644,7 @@ static void __iomem *chan_base(struct d40_chan *chan)
dev_err(dev, "[%s] " format, __func__, ## arg)
#define chan_err(d40c, format, arg...) \
- d40_err(chan2dev(d40c), format, ## arg)
+ d40_err(dmaengine_chan_dev(&d40c->chan), format, ## arg)
static int d40_set_runtime_config_write(struct dma_chan *chan,
struct dma_slave_config *config,
@@ -1244,7 +1239,7 @@ static void __d40_config_set_event(struct d40_chan *d40c,
}
if (tries != 99)
- dev_dbg(chan2dev(d40c),
+ dev_dbg(dmaengine_chan_dev(&d40c->chan),
"[%s] workaround enable S%cLNK (%d tries)\n",
__func__, reg == D40_CHAN_REG_SSLNK ? 'S' : 'D',
100 - tries);
@@ -1925,7 +1920,7 @@ found_phy:
i = d40c->dma_cfg.phy_channel;
if ((i != phy_num) && (i != phy_num + 1)) {
- dev_err(chan2dev(d40c),
+ dev_err(dmaengine_chan_dev(&d40c->chan),
"invalid fixed phy channel %d\n", i);
return -EINVAL;
}
@@ -1934,7 +1929,7 @@ found_phy:
is_log, first_phy_user))
goto found_log;
- dev_err(chan2dev(d40c),
+ dev_err(dmaengine_chan_dev(&d40c->chan),
"could not allocate fixed phy channel %d\n", i);
return -EINVAL;
}
@@ -2447,7 +2442,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
d40c->dst_def_cfg |= BIT(D40_SREG_CFG_LOG_GIM_POS);
}
- dev_dbg(chan2dev(d40c), "allocated %s channel (phy %d%s)\n",
+ dev_dbg(dmaengine_chan_dev(&d40c->chan), "allocated %s channel (phy %d%s)\n",
chan_is_logical(d40c) ? "logical" : "physical",
d40c->phy_chan->num,
d40c->dma_cfg.use_fixed_channel ? ", fixed" : "");
diff --git a/drivers/dma/stm32/stm32-dma.c b/drivers/dma/stm32/stm32-dma.c
index d3ad78562a14..4688cebaf7f7 100644
--- a/drivers/dma/stm32/stm32-dma.c
+++ b/drivers/dma/stm32/stm32-dma.c
@@ -248,11 +248,6 @@ static struct stm32_dma_desc *to_stm32_dma_desc(struct virt_dma_desc *vdesc)
return container_of(vdesc, struct stm32_dma_desc, vdesc);
}
-static struct device *chan2dev(struct stm32_dma_chan *chan)
-{
- return &chan->vchan.chan.dev->device;
-}
-
static u32 stm32_dma_read(struct stm32_dma_device *dmadev, u32 reg)
{
return readl_relaxed(dmadev->base + reg);
@@ -274,7 +269,7 @@ static int stm32_dma_get_width(struct stm32_dma_chan *chan,
case DMA_SLAVE_BUSWIDTH_4_BYTES:
return STM32_DMA_WORD;
default:
- dev_err(chan2dev(chan), "Dma bus width not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Dma bus width not supported\n");
return -EINVAL;
}
}
@@ -374,7 +369,7 @@ static int stm32_dma_get_burst(struct stm32_dma_chan *chan, u32 maxburst)
case 16:
return STM32_DMA_BURST_INCR16;
default:
- dev_err(chan2dev(chan), "Dma burst size not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Dma burst size not supported\n");
return -EINVAL;
}
}
@@ -487,7 +482,7 @@ static void stm32_dma_stop(struct stm32_dma_chan *chan)
/* Clear interrupt status if it is there */
status = stm32_dma_irq_status(chan);
if (status) {
- dev_dbg(chan2dev(chan), "%s(): clearing interrupt: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "%s(): clearing interrupt: 0x%08x\n",
__func__, status);
stm32_dma_irq_clear(chan, status);
}
@@ -536,12 +531,12 @@ static void stm32_dma_dump_reg(struct stm32_dma_chan *chan)
u32 sm1ar = stm32_dma_read(dmadev, STM32_DMA_SM1AR(chan->id));
u32 sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
- dev_dbg(chan2dev(chan), "SCR: 0x%08x\n", scr);
- dev_dbg(chan2dev(chan), "NDTR: 0x%08x\n", ndtr);
- dev_dbg(chan2dev(chan), "SPAR: 0x%08x\n", spar);
- dev_dbg(chan2dev(chan), "SM0AR: 0x%08x\n", sm0ar);
- dev_dbg(chan2dev(chan), "SM1AR: 0x%08x\n", sm1ar);
- dev_dbg(chan2dev(chan), "SFCR: 0x%08x\n", sfcr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "SCR: 0x%08x\n", scr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "NDTR: 0x%08x\n", ndtr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "SPAR: 0x%08x\n", spar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "SM0AR: 0x%08x\n", sm0ar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "SM1AR: 0x%08x\n", sm1ar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "SFCR: 0x%08x\n", sfcr);
}
static void stm32_dma_sg_inc(struct stm32_dma_chan *chan)
@@ -613,7 +608,7 @@ static void stm32_dma_start_transfer(struct stm32_dma_chan *chan)
reg->dma_scr |= STM32_DMA_SCR_EN;
stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), reg->dma_scr);
- dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: started\n", &chan->vchan);
}
static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan)
@@ -630,12 +625,12 @@ static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan)
if (dma_scr & STM32_DMA_SCR_CT) {
dma_sm0ar = sg_req->chan_reg.dma_sm0ar;
stm32_dma_write(dmadev, STM32_DMA_SM0AR(id), dma_sm0ar);
- dev_dbg(chan2dev(chan), "CT=1 <=> SM0AR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CT=1 <=> SM0AR: 0x%08x\n",
stm32_dma_read(dmadev, STM32_DMA_SM0AR(id)));
} else {
dma_sm1ar = sg_req->chan_reg.dma_sm1ar;
stm32_dma_write(dmadev, STM32_DMA_SM1AR(id), dma_sm1ar);
- dev_dbg(chan2dev(chan), "CT=0 <=> SM1AR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CT=0 <=> SM1AR: 0x%08x\n",
stm32_dma_read(dmadev, STM32_DMA_SM1AR(id)));
}
}
@@ -676,7 +671,7 @@ static void stm32_dma_handle_chan_paused(struct stm32_dma_chan *chan)
chan->status = DMA_PAUSED;
- dev_dbg(chan2dev(chan), "vchan %p: paused\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: paused\n", &chan->vchan);
}
static void stm32_dma_post_resume_reconfigure(struct stm32_dma_chan *chan)
@@ -728,7 +723,7 @@ static void stm32_dma_post_resume_reconfigure(struct stm32_dma_chan *chan)
dma_scr |= STM32_DMA_SCR_EN;
stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), dma_scr);
- dev_dbg(chan2dev(chan), "vchan %p: reconfigured after pause/resume\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: reconfigured after pause/resume\n", &chan->vchan);
}
static void stm32_dma_handle_chan_done(struct stm32_dma_chan *chan, u32 scr)
@@ -775,16 +770,16 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
if (sfcr & STM32_DMA_SFCR_FEIE) {
if (!(scr & STM32_DMA_SCR_EN) &&
!(status & STM32_DMA_TCI))
- dev_err(chan2dev(chan), "FIFO Error\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "FIFO Error\n");
else
- dev_dbg(chan2dev(chan), "FIFO over/underrun\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "FIFO over/underrun\n");
}
}
if (status & STM32_DMA_DMEI) {
stm32_dma_irq_clear(chan, STM32_DMA_DMEI);
status &= ~STM32_DMA_DMEI;
if (sfcr & STM32_DMA_SCR_DMEIE)
- dev_dbg(chan2dev(chan), "Direct mode overrun\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "Direct mode overrun\n");
}
if (status & STM32_DMA_TCI) {
@@ -803,9 +798,9 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
if (status) {
stm32_dma_irq_clear(chan, status);
- dev_err(chan2dev(chan), "DMA error: status=0x%08x\n", status);
+ dev_err(vchan_chan_dev(&chan->vchan), "DMA error: status=0x%08x\n", status);
if (!(scr & STM32_DMA_SCR_EN))
- dev_err(chan2dev(chan), "chan disabled by HW\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "chan disabled by HW\n");
}
spin_unlock(&chan->vchan.lock);
@@ -820,7 +815,7 @@ static void stm32_dma_issue_pending(struct dma_chan *c)
spin_lock_irqsave(&chan->vchan.lock, flags);
if (vchan_issue_pending(&chan->vchan) && !chan->desc && !chan->busy) {
- dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: issued\n", &chan->vchan);
stm32_dma_start_transfer(chan);
}
@@ -922,7 +917,7 @@ static int stm32_dma_resume(struct dma_chan *c)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
- dev_dbg(chan2dev(chan), "vchan %p: resumed\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: resumed\n", &chan->vchan);
return 0;
}
@@ -1059,7 +1054,7 @@ static int stm32_dma_set_xfer_param(struct stm32_dma_chan *chan,
break;
default:
- dev_err(chan2dev(chan), "Dma direction is not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Dma direction is not supported\n");
return -EINVAL;
}
@@ -1092,12 +1087,12 @@ static struct dma_async_tx_descriptor *stm32_dma_prep_slave_sg(
int i, ret;
if (!chan->config_init) {
- dev_err(chan2dev(chan), "dma channel is not configured\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "dma channel is not configured\n");
return NULL;
}
if (sg_len < 1) {
- dev_err(chan2dev(chan), "Invalid segment length %d\n", sg_len);
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid segment length %d\n", sg_len);
return NULL;
}
@@ -1129,7 +1124,7 @@ static struct dma_async_tx_descriptor *stm32_dma_prep_slave_sg(
nb_data_items = desc->sg_req[i].len / buswidth;
if (nb_data_items > STM32_DMA_ALIGNED_MAX_DATA_ITEMS) {
- dev_err(chan2dev(chan), "nb items not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "nb items not supported\n");
goto err;
}
@@ -1164,17 +1159,17 @@ static struct dma_async_tx_descriptor *stm32_dma_prep_dma_cyclic(
int i, ret;
if (!buf_len || !period_len) {
- dev_err(chan2dev(chan), "Invalid buffer/period len\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid buffer/period len\n");
return NULL;
}
if (!chan->config_init) {
- dev_err(chan2dev(chan), "dma channel is not configured\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "dma channel is not configured\n");
return NULL;
}
if (buf_len % period_len) {
- dev_err(chan2dev(chan), "buf_len not multiple of period_len\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "buf_len not multiple of period_len\n");
return NULL;
}
@@ -1185,7 +1180,7 @@ static struct dma_async_tx_descriptor *stm32_dma_prep_dma_cyclic(
* terminating the DMA.
*/
if (chan->busy) {
- dev_err(chan2dev(chan), "Request not allowed when dma busy\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Request not allowed when dma busy\n");
return NULL;
}
@@ -1196,7 +1191,7 @@ static struct dma_async_tx_descriptor *stm32_dma_prep_dma_cyclic(
nb_data_items = period_len / buswidth;
if (nb_data_items > STM32_DMA_ALIGNED_MAX_DATA_ITEMS) {
- dev_err(chan2dev(chan), "number of items not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "number of items not supported\n");
return NULL;
}
@@ -1478,7 +1473,7 @@ static void stm32_dma_free_chan_resources(struct dma_chan *c)
struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
unsigned long flags;
- dev_dbg(chan2dev(chan), "Freeing channel %d\n", chan->id);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "Freeing channel %d\n", chan->id);
if (chan->busy) {
spin_lock_irqsave(&chan->vchan.lock, flags);
@@ -1668,7 +1663,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
ret = devm_request_irq(&pdev->dev, chan->irq,
stm32_dma_chan_irq, 0,
- dev_name(chan2dev(chan)), chan);
+ vchan_chan_name(&chan->vchan), chan);
if (ret) {
dev_err(&pdev->dev,
"request_irq failed with err %d channel %d\n",
diff --git a/drivers/dma/stm32/stm32-dma3.c b/drivers/dma/stm32/stm32-dma3.c
index 4724e7fa0008..4fe226541efa 100644
--- a/drivers/dma/stm32/stm32-dma3.c
+++ b/drivers/dma/stm32/stm32-dma3.c
@@ -328,11 +328,6 @@ static inline struct stm32_dma3_swdesc *to_stm32_dma3_swdesc(struct virt_dma_des
return container_of(vdesc, struct stm32_dma3_swdesc, vdesc);
}
-static struct device *chan2dev(struct stm32_dma3_chan *chan)
-{
- return &chan->vchan.chan.dev->device;
-}
-
static struct device *ddata2dev(struct stm32_dma3_ddata *ddata)
{
return ddata->dma_dev.dev;
@@ -341,7 +336,7 @@ static struct device *ddata2dev(struct stm32_dma3_ddata *ddata)
static void stm32_dma3_chan_dump_reg(struct stm32_dma3_chan *chan)
{
struct stm32_dma3_ddata *ddata = to_stm32_dma3_ddata(chan);
- struct device *dev = chan2dev(chan);
+ struct device *dev = vchan_chan_dev(&chan->vchan);
u32 id = chan->id, offset;
offset = STM32_DMA3_SECCFGR;
@@ -381,21 +376,21 @@ static void stm32_dma3_chan_dump_hwdesc(struct stm32_dma3_chan *chan,
for (i = 0; i < swdesc->lli_size; i++) {
hwdesc = swdesc->lli[i].hwdesc;
if (i)
- dev_dbg(chan2dev(chan), "V\n");
- dev_dbg(chan2dev(chan), "[%d]@%pad\n", i, &swdesc->lli[i].hwdesc_addr);
- dev_dbg(chan2dev(chan), "| C%dTR1: %08x\n", chan->id, hwdesc->ctr1);
- dev_dbg(chan2dev(chan), "| C%dTR2: %08x\n", chan->id, hwdesc->ctr2);
- dev_dbg(chan2dev(chan), "| C%dBR1: %08x\n", chan->id, hwdesc->cbr1);
- dev_dbg(chan2dev(chan), "| C%dSAR: %08x\n", chan->id, hwdesc->csar);
- dev_dbg(chan2dev(chan), "| C%dDAR: %08x\n", chan->id, hwdesc->cdar);
- dev_dbg(chan2dev(chan), "| C%dLLR: %08x\n", chan->id, hwdesc->cllr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "V\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "[%d]@%pad\n", i, &swdesc->lli[i].hwdesc_addr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dTR1: %08x\n", chan->id, hwdesc->ctr1);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dTR2: %08x\n", chan->id, hwdesc->ctr2);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dBR1: %08x\n", chan->id, hwdesc->cbr1);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dSAR: %08x\n", chan->id, hwdesc->csar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dDAR: %08x\n", chan->id, hwdesc->cdar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "| C%dLLR: %08x\n", chan->id, hwdesc->cllr);
}
if (swdesc->cyclic) {
- dev_dbg(chan2dev(chan), "|\n");
- dev_dbg(chan2dev(chan), "-->[0]@%pad\n", &swdesc->lli[0].hwdesc_addr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "|\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "-->[0]@%pad\n", &swdesc->lli[0].hwdesc_addr);
} else {
- dev_dbg(chan2dev(chan), "X\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "X\n");
}
}
@@ -411,7 +406,7 @@ static struct stm32_dma3_swdesc *stm32_dma3_chan_desc_alloc(struct stm32_dma3_ch
* addressed, so abort the allocation.
*/
if ((count * 32) > CLLR_LA) {
- dev_err(chan2dev(chan), "Transfer is too big (> %luB)\n", STM32_DMA3_MAX_SEG_SIZE);
+ dev_err(vchan_chan_dev(&chan->vchan), "Transfer is too big (> %luB)\n", STM32_DMA3_MAX_SEG_SIZE);
return NULL;
}
@@ -438,7 +433,7 @@ static struct stm32_dma3_swdesc *stm32_dma3_chan_desc_alloc(struct stm32_dma3_ch
return swdesc;
err_pool_free:
- dev_err(chan2dev(chan), "Failed to alloc descriptors\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Failed to alloc descriptors\n");
while (--i >= 0)
dma_pool_free(chan->lli_pool, swdesc->lli[i].hwdesc, swdesc->lli[i].hwdesc_addr);
kfree(swdesc);
@@ -468,7 +463,7 @@ static void stm32_dma3_chan_vdesc_free(struct virt_dma_desc *vdesc)
static void stm32_dma3_check_user_setting(struct stm32_dma3_chan *chan)
{
struct stm32_dma3_ddata *ddata = to_stm32_dma3_ddata(chan);
- struct device *dev = chan2dev(chan);
+ struct device *dev = vchan_chan_dev(&chan->vchan);
u32 ctr1 = readl_relaxed(ddata->base + STM32_DMA3_CTR1(chan->id));
u32 cbr1 = readl_relaxed(ddata->base + STM32_DMA3_CBR1(chan->id));
u32 csar = readl_relaxed(ddata->base + STM32_DMA3_CSAR(chan->id));
@@ -579,7 +574,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
u32 sap = FIELD_GET(STM32_DMA3_DT_SAP, tr_conf), sap_max_dw;
u32 dap = FIELD_GET(STM32_DMA3_DT_DAP, tr_conf), dap_max_dw;
- dev_dbg(chan2dev(chan), "%s from %pad to %pad\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "%s from %pad to %pad\n",
dmaengine_get_direction_text(dir), &src_addr, &dst_addr);
sdw = chan->dma_config.src_addr_width ? : get_chan_max_dw(sap, chan->max_burst);
@@ -589,12 +584,12 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
/* Following conditions would raise User Setting Error interrupt */
if (!(dma_device.src_addr_widths & BIT(sdw)) || !(dma_device.dst_addr_widths & BIT(ddw))) {
- dev_err(chan2dev(chan), "Bus width (src=%u, dst=%u) not supported\n", sdw, ddw);
+ dev_err(vchan_chan_dev(&chan->vchan), "Bus width (src=%u, dst=%u) not supported\n", sdw, ddw);
return -EINVAL;
}
if (ddata->ports_max_dw[1] == DW_INVALID && (sap || dap)) {
- dev_err(chan2dev(chan), "Only one master port, port 1 is not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Only one master port, port 1 is not supported\n");
return -EINVAL;
}
@@ -602,7 +597,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
dap_max_dw = ddata->ports_max_dw[dap];
if ((port_is_ahb(sap_max_dw) && sdw == DMA_SLAVE_BUSWIDTH_8_BYTES) ||
(port_is_ahb(dap_max_dw) && ddw == DMA_SLAVE_BUSWIDTH_8_BYTES)) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"8 bytes buswidth (src=%u, dst=%u) not supported on port (sap=%u, dap=%u\n",
sdw, ddw, sap, dap);
return -EINVAL;
@@ -659,7 +654,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
_ctr1 |= FIELD_PREP(CTR1_PAM, CTR1_PAM_PACK_UNPACK);
/* Should never reach this case as ddw is clamped down */
if (len & (ddw - 1)) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Packing mode is enabled and len is not multiple of ddw");
return -EINVAL;
}
@@ -695,7 +690,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
_ctr1 |= FIELD_PREP(CTR1_PAM, CTR1_PAM_PACK_UNPACK);
/* Should never reach this case as ddw is clamped down */
if (len & (ddw - 1)) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Packing mode is enabled and len is not multiple of ddw\n");
return -EINVAL;
}
@@ -740,7 +735,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
_ctr1 |= FIELD_PREP(CTR1_PAM, CTR1_PAM_PACK_UNPACK);
/* Should never reach this case as ddw is clamped down */
if (len & (ddw - 1)) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Packing mode is enabled and len is not multiple of ddw");
return -EINVAL;
}
@@ -752,7 +747,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
break;
default:
- dev_err(chan2dev(chan), "Direction %s not supported\n",
+ dev_err(vchan_chan_dev(&chan->vchan), "Direction %s not supported\n",
dmaengine_get_direction_text(dir));
return -EINVAL;
}
@@ -761,7 +756,7 @@ static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transf
*ctr1 = _ctr1;
*ctr2 = _ctr2;
- dev_dbg(chan2dev(chan), "%s: sdw=%u bytes sbl=%u beats ddw=%u bytes dbl=%u beats\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "%s: sdw=%u bytes sbl=%u beats ddw=%u bytes dbl=%u beats\n",
__func__, sdw, sbl_max, ddw, dbl_max);
return 0;
@@ -807,7 +802,7 @@ static void stm32_dma3_chan_start(struct stm32_dma3_chan *chan)
chan->dma_status = DMA_IN_PROGRESS;
- dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: started\n", &chan->vchan);
}
static int stm32_dma3_chan_suspend(struct stm32_dma3_chan *chan, bool susp)
@@ -871,7 +866,7 @@ static void stm32_dma3_chan_set_residue(struct stm32_dma3_chan *chan,
struct dma_tx_state *txstate)
{
struct stm32_dma3_ddata *ddata = to_stm32_dma3_ddata(chan);
- struct device *dev = chan2dev(chan);
+ struct device *dev = vchan_chan_dev(&chan->vchan);
struct stm32_dma3_hwdesc *hwdesc;
u32 residue, curr_lli, csr, cdar, cbr1, cllr, bndt, fifol;
bool pack_unpack;
@@ -921,7 +916,7 @@ static void stm32_dma3_chan_set_residue(struct stm32_dma3_chan *chan,
/* Get current hwdesc and cumulate residue of pending hwdesc BNDT */
ret = stm32_dma3_chan_get_curr_hwdesc(swdesc, cllr, &residue);
if (ret < 0) {
- dev_err(chan2dev(chan), "Can't get residue: current hwdesc not found\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Can't get residue: current hwdesc not found\n");
return;
}
curr_lli = ret;
@@ -957,7 +952,7 @@ static void stm32_dma3_chan_set_residue(struct stm32_dma3_chan *chan,
skip_fifol_update:
if (fifol) {
- dev_dbg(chan2dev(chan), "%u byte(s) in the FIFO\n", fifol);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "%u byte(s) in the FIFO\n", fifol);
dma_set_in_flight_bytes(txstate, fifol);
/*
* Residue is already accurate for DMA_MEM_TO_DEV as BNDT reflects data read from
@@ -987,7 +982,7 @@ static int stm32_dma3_chan_stop(struct stm32_dma3_chan *chan)
/* Suspend the channel */
ret = stm32_dma3_chan_suspend(chan, true);
if (ret)
- dev_warn(chan2dev(chan), "%s: timeout, data might be lost\n", __func__);
+ dev_warn(vchan_chan_dev(&chan->vchan), "%s: timeout, data might be lost\n", __func__);
}
/*
@@ -1034,7 +1029,7 @@ static irqreturn_t stm32_dma3_chan_irq(int irq, void *devid)
}
if (csr & CSR_USEF && ccr & CCR_USEIE) {
- dev_err(chan2dev(chan), "User setting error\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "User setting error\n");
chan->dma_status = DMA_ERROR;
/* CCR.EN automatically cleared by HW */
stm32_dma3_check_user_setting(chan);
@@ -1042,14 +1037,14 @@ static irqreturn_t stm32_dma3_chan_irq(int irq, void *devid)
}
if (csr & CSR_ULEF && ccr & CCR_ULEIE) {
- dev_err(chan2dev(chan), "Update link transfer error\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Update link transfer error\n");
chan->dma_status = DMA_ERROR;
/* CCR.EN automatically cleared by HW */
stm32_dma3_chan_reset(chan);
}
if (csr & CSR_DTEF && ccr & CCR_DTEIE) {
- dev_err(chan2dev(chan), "Data transfer error\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Data transfer error\n");
chan->dma_status = DMA_ERROR;
/* CCR.EN automatically cleared by HW */
stm32_dma3_chan_reset(chan);
@@ -1087,13 +1082,13 @@ static int stm32_dma3_get_chan_sem(struct stm32_dma3_chan *chan)
goto bad_cid;
chan->semaphore_taken = true;
- dev_dbg(chan2dev(chan), "under CID1 control (semcr=0x%08x)\n", csemcr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "under CID1 control (semcr=0x%08x)\n", csemcr);
return 0;
bad_cid:
chan->semaphore_taken = false;
- dev_err(chan2dev(chan), "not under CID1 control (in-use by CID%d)\n", ccid);
+ dev_err(vchan_chan_dev(&chan->vchan), "not under CID1 control (in-use by CID%d)\n", ccid);
return -EACCES;
}
@@ -1105,7 +1100,7 @@ static void stm32_dma3_put_chan_sem(struct stm32_dma3_chan *chan)
if (chan->semaphore_taken) {
writel_relaxed(0, ddata->base + STM32_DMA3_CSEMCR(chan->id));
chan->semaphore_taken = false;
- dev_dbg(chan2dev(chan), "no more under CID1 control\n");
+ dev_dbg(vchan_chan_dev(&chan->vchan), "no more under CID1 control\n");
}
}
@@ -1126,11 +1121,11 @@ static int stm32_dma3_alloc_chan_resources(struct dma_chan *c)
goto err_put_sync;
}
- chan->lli_pool = dmam_pool_create(dev_name(&c->dev->device), c->device->dev,
+ chan->lli_pool = dmam_pool_create(dma_chan_name(c), c->device->dev,
sizeof(struct stm32_dma3_hwdesc),
__alignof__(struct stm32_dma3_hwdesc), SZ_64K);
if (!chan->lli_pool) {
- dev_err(chan2dev(chan), "Failed to create LLI pool\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Failed to create LLI pool\n");
ret = -ENOMEM;
goto err_put_sync;
}
@@ -1366,7 +1361,7 @@ static struct dma_async_tx_descriptor *stm32_dma3_prep_slave_sg(struct dma_chan
}
if (count != sg_len && chan->tcem != CTR2_TCEM_CHANNEL)
- dev_warn(chan2dev(chan), "Linked-list refactored, %d items instead of %d\n",
+ dev_warn(vchan_chan_dev(&chan->vchan), "Linked-list refactored, %d items instead of %d\n",
count, sg_len);
/* Enable Error interrupts */
@@ -1401,12 +1396,12 @@ static struct dma_async_tx_descriptor *stm32_dma3_prep_dma_cyclic(struct dma_cha
return NULL;
if (!buf_len || !period_len || period_len > STM32_DMA3_MAX_BLOCK_SIZE) {
- dev_err(chan2dev(chan), "Invalid buffer/period length\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid buffer/period length\n");
return NULL;
}
if (buf_len % period_len) {
- dev_err(chan2dev(chan), "Buffer length not multiple of period length\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Buffer length not multiple of period length\n");
return NULL;
}
@@ -1428,7 +1423,7 @@ static struct dma_async_tx_descriptor *stm32_dma3_prep_dma_cyclic(struct dma_cha
ret = stm32_dma3_chan_prep_hw(chan, DMA_DEV_TO_MEM, &swdesc->ccr, &ctr1, &ctr2,
src, dst, period_len);
} else {
- dev_err(chan2dev(chan), "Invalid direction\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid direction\n");
ret = -EINVAL;
}
@@ -1502,7 +1497,7 @@ static int stm32_dma3_pause(struct dma_chan *c)
chan->dma_status = DMA_PAUSED;
- dev_dbg(chan2dev(chan), "vchan %p: paused\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: paused\n", &chan->vchan);
return 0;
}
@@ -1515,7 +1510,7 @@ static int stm32_dma3_resume(struct dma_chan *c)
chan->dma_status = DMA_IN_PROGRESS;
- dev_dbg(chan2dev(chan), "vchan %p: resumed\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: resumed\n", &chan->vchan);
return 0;
}
@@ -1540,7 +1535,7 @@ static int stm32_dma3_terminate_all(struct dma_chan *c)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
vchan_dma_desc_free_list(&chan->vchan, &head);
- dev_dbg(chan2dev(chan), "vchan %p: terminated\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: terminated\n", &chan->vchan);
return 0;
}
@@ -1593,7 +1588,7 @@ static void stm32_dma3_issue_pending(struct dma_chan *c)
spin_lock_irqsave(&chan->vchan.lock, flags);
if (vchan_issue_pending(&chan->vchan) && !chan->swdesc) {
- dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: issued\n", &chan->vchan);
stm32_dma3_chan_start(chan);
}
@@ -1892,10 +1887,10 @@ static int stm32_dma3_probe(struct platform_device *pdev)
chan->irq = ret;
ret = devm_request_irq(&pdev->dev, chan->irq, stm32_dma3_chan_irq, 0,
- dev_name(chan2dev(chan)), chan);
+ vchan_chan_name(&chan->vchan), chan);
if (ret) {
dev_err_probe(&pdev->dev, ret, "Failed to request channel %s IRQ\n",
- dev_name(chan2dev(chan)));
+ vchan_chan_name(&chan->vchan));
goto err_clk_disable;
}
}
diff --git a/drivers/dma/stm32/stm32-mdma.c b/drivers/dma/stm32/stm32-mdma.c
index e3bbdc9ee36e..04639e4b554e 100644
--- a/drivers/dma/stm32/stm32-mdma.c
+++ b/drivers/dma/stm32/stm32-mdma.c
@@ -276,11 +276,6 @@ static struct stm32_mdma_desc *to_stm32_mdma_desc(struct virt_dma_desc *vdesc)
return container_of(vdesc, struct stm32_mdma_desc, vdesc);
}
-static struct device *chan2dev(struct stm32_mdma_chan *chan)
-{
- return &chan->vchan.chan.dev->device;
-}
-
static struct device *mdma2dev(struct stm32_mdma_device *mdma_dev)
{
return mdma_dev->ddev.dev;
@@ -334,7 +329,7 @@ static struct stm32_mdma_desc *stm32_mdma_alloc_desc(
return desc;
err:
- dev_err(chan2dev(chan), "Failed to allocate descriptor\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Failed to allocate descriptor\n");
while (--i >= 0)
dma_pool_free(chan->desc_pool, desc->node[i].hwdesc,
desc->node[i].hwdesc_phys);
@@ -364,7 +359,7 @@ static int stm32_mdma_get_width(struct stm32_mdma_chan *chan,
case DMA_SLAVE_BUSWIDTH_8_BYTES:
return ffs(width) - 1;
default:
- dev_err(chan2dev(chan), "Dma bus width %i not supported\n",
+ dev_err(vchan_chan_dev(&chan->vchan), "Dma bus width %i not supported\n",
width);
return -EINVAL;
}
@@ -422,7 +417,7 @@ static int stm32_mdma_disable_chan(struct stm32_mdma_chan *chan)
dmadev->base + STM32_MDMA_CISR(id), cisr,
(cisr & STM32_MDMA_CISR_CTCIF), 10, 1000);
if (ret) {
- dev_err(chan2dev(chan), "%s: timeout!\n", __func__);
+ dev_err(vchan_chan_dev(&chan->vchan), "%s: timeout!\n", __func__);
return -EBUSY;
}
}
@@ -444,7 +439,7 @@ static void stm32_mdma_stop(struct stm32_mdma_chan *chan)
/* Clear interrupt status if it is there */
status = stm32_mdma_read(dmadev, STM32_MDMA_CISR(chan->id));
if (status) {
- dev_dbg(chan2dev(chan), "%s(): clearing interrupt: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "%s(): clearing interrupt: 0x%08x\n",
__func__, status);
stm32_mdma_set_bits(dmadev, STM32_MDMA_CIFCR(chan->id), status);
}
@@ -513,7 +508,7 @@ static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
/* Check burst size constraints */
if (src_maxburst * src_addr_width > STM32_MDMA_MAX_BURST ||
dst_maxburst * dst_addr_width > STM32_MDMA_MAX_BURST) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"burst size * bus width higher than %d bytes\n",
STM32_MDMA_MAX_BURST);
return -EINVAL;
@@ -521,7 +516,7 @@ static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
if ((!is_power_of_2(src_maxburst) && src_maxburst > 0) ||
(!is_power_of_2(dst_maxburst) && dst_maxburst > 0)) {
- dev_err(chan2dev(chan), "burst size must be a power of 2\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "burst size must be a power of 2\n");
return -EINVAL;
}
@@ -658,7 +653,7 @@ static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
break;
default:
- dev_err(chan2dev(chan), "Dma direction is not supported\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Dma direction is not supported\n");
return -EINVAL;
}
@@ -672,16 +667,16 @@ static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
static void stm32_mdma_dump_hwdesc(struct stm32_mdma_chan *chan,
struct stm32_mdma_desc_node *node)
{
- dev_dbg(chan2dev(chan), "hwdesc: %pad\n", &node->hwdesc_phys);
- dev_dbg(chan2dev(chan), "CTCR: 0x%08x\n", node->hwdesc->ctcr);
- dev_dbg(chan2dev(chan), "CBNDTR: 0x%08x\n", node->hwdesc->cbndtr);
- dev_dbg(chan2dev(chan), "CSAR: 0x%08x\n", node->hwdesc->csar);
- dev_dbg(chan2dev(chan), "CDAR: 0x%08x\n", node->hwdesc->cdar);
- dev_dbg(chan2dev(chan), "CBRUR: 0x%08x\n", node->hwdesc->cbrur);
- dev_dbg(chan2dev(chan), "CLAR: 0x%08x\n", node->hwdesc->clar);
- dev_dbg(chan2dev(chan), "CTBR: 0x%08x\n", node->hwdesc->ctbr);
- dev_dbg(chan2dev(chan), "CMAR: 0x%08x\n", node->hwdesc->cmar);
- dev_dbg(chan2dev(chan), "CMDR: 0x%08x\n\n", node->hwdesc->cmdr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "hwdesc: %pad\n", &node->hwdesc_phys);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CTCR: 0x%08x\n", node->hwdesc->ctcr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CBNDTR: 0x%08x\n", node->hwdesc->cbndtr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CSAR: 0x%08x\n", node->hwdesc->csar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CDAR: 0x%08x\n", node->hwdesc->cdar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CBRUR: 0x%08x\n", node->hwdesc->cbrur);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CLAR: 0x%08x\n", node->hwdesc->clar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CTBR: 0x%08x\n", node->hwdesc->ctbr);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CMAR: 0x%08x\n", node->hwdesc->cmar);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CMDR: 0x%08x\n\n", node->hwdesc->cmdr);
}
static void stm32_mdma_setup_hwdesc(struct stm32_mdma_chan *chan,
@@ -739,7 +734,7 @@ static int stm32_mdma_setup_xfer(struct stm32_mdma_chan *chan,
for_each_sg(sgl, sg, sg_len, i) {
if (sg_dma_len(sg) > STM32_MDMA_MAX_BLOCK_LEN) {
- dev_err(chan2dev(chan), "Invalid block len\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid block len\n");
return -EINVAL;
}
@@ -797,7 +792,7 @@ stm32_mdma_prep_slave_sg(struct dma_chan *c, struct scatterlist *sgl,
* for allowing another request.
*/
if (chan->desc && chan->desc->cyclic) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Request not allowed when dma in cyclic mode\n");
return NULL;
}
@@ -858,18 +853,18 @@ stm32_mdma_prep_dma_cyclic(struct dma_chan *c, dma_addr_t buf_addr,
* for allowing another request.
*/
if (chan->desc && chan->desc->cyclic) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Request not allowed when dma in cyclic mode\n");
return NULL;
}
if (!buf_len || !period_len || period_len > STM32_MDMA_MAX_BLOCK_LEN) {
- dev_err(chan2dev(chan), "Invalid buffer/period len\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "Invalid buffer/period len\n");
return NULL;
}
if (buf_len % period_len) {
- dev_err(chan2dev(chan), "buf_len not multiple of period_len\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "buf_len not multiple of period_len\n");
return NULL;
}
@@ -954,7 +949,7 @@ stm32_mdma_prep_dma_memcpy(struct dma_chan *c, dma_addr_t dest, dma_addr_t src,
* to allow another request
*/
if (chan->desc && chan->desc->cyclic) {
- dev_err(chan2dev(chan),
+ dev_err(vchan_chan_dev(&chan->vchan),
"Request not allowed when dma in cyclic mode\n");
return NULL;
}
@@ -1116,25 +1111,25 @@ static void stm32_mdma_dump_reg(struct stm32_mdma_chan *chan)
{
struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
- dev_dbg(chan2dev(chan), "CCR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CCR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id)));
- dev_dbg(chan2dev(chan), "CTCR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CTCR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id)));
- dev_dbg(chan2dev(chan), "CBNDTR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CBNDTR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id)));
- dev_dbg(chan2dev(chan), "CSAR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CSAR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CSAR(chan->id)));
- dev_dbg(chan2dev(chan), "CDAR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CDAR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CDAR(chan->id)));
- dev_dbg(chan2dev(chan), "CBRUR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CBRUR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CBRUR(chan->id)));
- dev_dbg(chan2dev(chan), "CLAR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CLAR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CLAR(chan->id)));
- dev_dbg(chan2dev(chan), "CTBR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CTBR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id)));
- dev_dbg(chan2dev(chan), "CMAR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CMAR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CMAR(chan->id)));
- dev_dbg(chan2dev(chan), "CMDR: 0x%08x\n",
+ dev_dbg(vchan_chan_dev(&chan->vchan), "CMDR: 0x%08x\n",
stm32_mdma_read(dmadev, STM32_MDMA_CMDR(chan->id)));
}
@@ -1187,7 +1182,7 @@ static void stm32_mdma_start_transfer(struct stm32_mdma_chan *chan)
chan->busy = true;
- dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: started\n", &chan->vchan);
}
static void stm32_mdma_issue_pending(struct dma_chan *c)
@@ -1200,7 +1195,7 @@ static void stm32_mdma_issue_pending(struct dma_chan *c)
if (!vchan_issue_pending(&chan->vchan))
goto end;
- dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: issued\n", &chan->vchan);
if (!chan->desc && !chan->busy)
stm32_mdma_start_transfer(chan);
@@ -1220,7 +1215,7 @@ static int stm32_mdma_pause(struct dma_chan *c)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
if (!ret)
- dev_dbg(chan2dev(chan), "vchan %p: pause\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: pause\n", &chan->vchan);
return ret;
}
@@ -1261,7 +1256,7 @@ static int stm32_mdma_resume(struct dma_chan *c)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
- dev_dbg(chan2dev(chan), "vchan %p: resume\n", &chan->vchan);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "vchan %p: resume\n", &chan->vchan);
return 0;
}
@@ -1422,10 +1417,10 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid)
if (!(status & ien)) {
spin_unlock(&chan->vchan.lock);
if (chan->busy)
- dev_warn(chan2dev(chan),
+ dev_warn(vchan_chan_dev(&chan->vchan),
"spurious it (status=0x%04x, ien=0x%04x)\n", status, ien);
else
- dev_dbg(chan2dev(chan),
+ dev_dbg(vchan_chan_dev(&chan->vchan),
"spurious it (status=0x%04x, ien=0x%04x)\n", status, ien);
return IRQ_NONE;
}
@@ -1433,7 +1428,7 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid)
reg = STM32_MDMA_CIFCR(id);
if (status & STM32_MDMA_CISR_TEIF) {
- dev_err(chan2dev(chan), "Transfer Err: stat=0x%08x\n",
+ dev_err(vchan_chan_dev(&chan->vchan), "Transfer Err: stat=0x%08x\n",
readl_relaxed(dmadev->base + STM32_MDMA_CESR(id)));
stm32_mdma_set_bits(dmadev, reg, STM32_MDMA_CIFCR_CTEIF);
status &= ~STM32_MDMA_CISR_TEIF;
@@ -1468,9 +1463,9 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid)
if (status) {
stm32_mdma_set_bits(dmadev, reg, status);
- dev_err(chan2dev(chan), "DMA error: status=0x%08x\n", status);
+ dev_err(vchan_chan_dev(&chan->vchan), "DMA error: status=0x%08x\n", status);
if (!(ccr & STM32_MDMA_CCR_EN))
- dev_err(chan2dev(chan), "chan disabled by HW\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "chan disabled by HW\n");
}
spin_unlock(&chan->vchan.lock);
@@ -1484,13 +1479,12 @@ static int stm32_mdma_alloc_chan_resources(struct dma_chan *c)
struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
int ret;
- chan->desc_pool = dmam_pool_create(dev_name(&c->dev->device),
- c->device->dev,
+ chan->desc_pool = dmam_pool_create(dma_chan_name(c), c->device->dev,
sizeof(struct stm32_mdma_hwdesc),
__alignof__(struct stm32_mdma_hwdesc),
0);
if (!chan->desc_pool) {
- dev_err(chan2dev(chan), "failed to allocate descriptor pool\n");
+ dev_err(vchan_chan_dev(&chan->vchan), "failed to allocate descriptor pool\n");
return -ENOMEM;
}
@@ -1511,7 +1505,7 @@ static void stm32_mdma_free_chan_resources(struct dma_chan *c)
struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
unsigned long flags;
- dev_dbg(chan2dev(chan), "Freeing channel %d\n", chan->id);
+ dev_dbg(vchan_chan_dev(&chan->vchan), "Freeing channel %d\n", chan->id);
if (chan->busy) {
spin_lock_irqsave(&chan->vchan.lock, flags);
diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c
index d2321f7287d2..225e4a53502b 100644
--- a/drivers/dma/sun4i-dma.c
+++ b/drivers/dma/sun4i-dma.c
@@ -246,11 +246,6 @@ static struct sun4i_dma_contract *to_sun4i_dma_contract(struct virt_dma_desc *vd
return container_of(vd, struct sun4i_dma_contract, vd);
}
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static void set_dst_data_width_a10(u32 *p_cfg, s8 data_width)
{
*p_cfg |= SUN4I_DMA_CFG_DST_DATA_WIDTH(data_width);
@@ -428,7 +423,7 @@ static int __execute_vchan_pending(struct sun4i_dma_dev *priv,
* has already submitted some work, we can't do anything else
*/
if (vchan->processing) {
- dev_dbg(chan2dev(&vchan->vc.chan),
+ dev_dbg(vchan_chan_dev(&vchan->vc),
"processing something to this endpoint already\n");
ret = -EBUSY;
goto release_pchan;
@@ -438,7 +433,7 @@ static int __execute_vchan_pending(struct sun4i_dma_dev *priv,
/* Figure out which contract we're working with today */
vd = vchan_next_desc(&vchan->vc);
if (!vd) {
- dev_dbg(chan2dev(&vchan->vc.chan),
+ dev_dbg(vchan_chan_dev(&vchan->vc),
"No pending contract found");
ret = 0;
goto release_pchan;
@@ -449,7 +444,7 @@ static int __execute_vchan_pending(struct sun4i_dma_dev *priv,
/* The contract has been completed so mark it as such */
list_del(&contract->vd.node);
vchan_cookie_complete(&contract->vd);
- dev_dbg(chan2dev(&vchan->vc.chan),
+ dev_dbg(vchan_chan_dev(&vchan->vc),
"Empty contract found and marked complete");
}
} while (list_empty(&contract->demands));
@@ -542,7 +537,7 @@ generate_ndma_promise(struct dma_chan *chan, dma_addr_t src, dma_addr_t dest,
promise->cfg = SUN4I_DMA_CFG_LOADING |
SUN4I_NDMA_CFG_BYTE_COUNT_MODE_REMAIN;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"src burst %d, dst burst %d, src buswidth %d, dst buswidth %d",
sconfig->src_maxburst, sconfig->dst_maxburst,
sconfig->src_addr_width, sconfig->dst_addr_width);
@@ -769,7 +764,7 @@ sun4i_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf, size_t len,
u8 ram_type, io_mode, linear_mode;
if (!is_slave_direction(dir)) {
- dev_err(chan2dev(chan), "Invalid DMA direction\n");
+ dev_err(dmaengine_chan_dev(chan), "Invalid DMA direction\n");
return NULL;
}
@@ -894,7 +889,7 @@ sun4i_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
return NULL;
if (!is_slave_direction(dir)) {
- dev_err(chan2dev(chan), "Invalid DMA direction\n");
+ dev_err(dmaengine_chan_dev(chan), "Invalid DMA direction\n");
return NULL;
}
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index 738f2547a1b9..d4966b66b753 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -213,11 +213,6 @@ struct sun6i_dma_dev {
u32 max_request;
};
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
-
static inline struct sun6i_dma_dev *to_sun6i_dma_dev(struct dma_device *d)
{
return container_of(d, struct sun6i_dma_dev, slave);
@@ -399,7 +394,7 @@ static inline void sun6i_dma_dump_lli(struct sun6i_vchan *vchan,
struct sun6i_dma_lli *v_lli,
dma_addr_t p_lli)
{
- dev_dbg(chan2dev(&vchan->vc.chan),
+ dev_dbg(vchan_chan_dev(&vchan->vc),
"\n\tdesc:\tp - %pad v - 0x%p\n"
"\t\tc - 0x%08x s - 0x%08x d - 0x%08x\n"
"\t\tl - 0x%08x p - 0x%08x n - 0x%08x\n",
@@ -680,7 +675,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_memcpy(
dma_addr_t p_lli;
s8 burst, width;
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s; chan: %d, dest: %pad, src: %pad, len: %zu. flags: 0x%08lx\n",
__func__, vchan->vc.chan.chan_id, &dest, &src, len, flags);
@@ -741,7 +736,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
ret = set_config(sdev, sconfig, dir, &lli_cfg);
if (ret) {
- dev_err(chan2dev(chan), "Invalid DMA configuration\n");
+ dev_err(dmaengine_chan_dev(chan), "Invalid DMA configuration\n");
return NULL;
}
@@ -765,7 +760,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
sdev->cfg->set_drq(&v_lli->cfg, DRQ_SDRAM, vchan->port);
sdev->cfg->set_mode(&v_lli->cfg, LINEAR_MODE, IO_MODE);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s; chan: %d, dest: %pad, src: %pad, len: %u. flags: 0x%08lx\n",
__func__, vchan->vc.chan.chan_id,
&sconfig->dst_addr, &sg_dma_address(sg),
@@ -779,7 +774,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
sdev->cfg->set_drq(&v_lli->cfg, vchan->port, DRQ_SDRAM);
sdev->cfg->set_mode(&v_lli->cfg, IO_MODE, LINEAR_MODE);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s; chan: %d, dest: %pad, src: %pad, len: %u. flags: 0x%08lx\n",
__func__, vchan->vc.chan.chan_id,
&sg_dma_address(sg), &sconfig->src_addr,
@@ -789,7 +784,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
prev = sun6i_dma_lli_add(prev, v_lli, p_lli, txd);
}
- dev_dbg(chan2dev(chan), "First: %pad\n", &txd->p_lli);
+ dev_dbg(dmaengine_chan_dev(chan), "First: %pad\n", &txd->p_lli);
for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli;
p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next)
sun6i_dma_dump_lli(vchan, v_lli, p_lli);
@@ -821,7 +816,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic(
ret = set_config(sdev, sconfig, dir, &lli_cfg);
if (ret) {
- dev_err(chan2dev(chan), "Invalid DMA configuration\n");
+ dev_err(dmaengine_chan_dev(chan), "Invalid DMA configuration\n");
return NULL;
}
@@ -846,7 +841,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic(
v_lli->cfg = lli_cfg;
sdev->cfg->set_drq(&v_lli->cfg, DRQ_SDRAM, vchan->port);
sdev->cfg->set_mode(&v_lli->cfg, LINEAR_MODE, IO_MODE);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s; chan: %d, dest: %pad, src: %pad, len: %zu. flags: 0x%08lx\n",
__func__, vchan->vc.chan.chan_id,
&sconfig->dst_addr, &buf_addr,
@@ -858,7 +853,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic(
v_lli->cfg = lli_cfg;
sdev->cfg->set_drq(&v_lli->cfg, vchan->port, DRQ_SDRAM);
sdev->cfg->set_mode(&v_lli->cfg, IO_MODE, LINEAR_MODE);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"%s; chan: %d, dest: %pad, src: %pad, len: %zu. flags: 0x%08lx\n",
__func__, vchan->vc.chan.chan_id,
&buf_addr, &sconfig->src_addr,
@@ -895,7 +890,7 @@ static int sun6i_dma_pause(struct dma_chan *chan)
struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
struct sun6i_pchan *pchan = vchan->phy;
- dev_dbg(chan2dev(chan), "vchan %p: pause\n", &vchan->vc);
+ dev_dbg(dmaengine_chan_dev(chan), "vchan %p: pause\n", &vchan->vc);
if (pchan) {
writel(DMA_CHAN_PAUSE_PAUSE,
@@ -916,7 +911,7 @@ static int sun6i_dma_resume(struct dma_chan *chan)
struct sun6i_pchan *pchan = vchan->phy;
unsigned long flags;
- dev_dbg(chan2dev(chan), "vchan %p: resume\n", &vchan->vc);
+ dev_dbg(dmaengine_chan_dev(chan), "vchan %p: resume\n", &vchan->vc);
spin_lock_irqsave(&vchan->vc.lock, flags);
@@ -1025,13 +1020,13 @@ static void sun6i_dma_issue_pending(struct dma_chan *chan)
if (!vchan->phy && list_empty(&vchan->node)) {
list_add_tail(&vchan->node, &sdev->pending);
tasklet_schedule(&sdev->task);
- dev_dbg(chan2dev(chan), "vchan %p: issued\n",
+ dev_dbg(dmaengine_chan_dev(chan), "vchan %p: issued\n",
&vchan->vc);
}
spin_unlock(&sdev->lock);
} else {
- dev_dbg(chan2dev(chan), "vchan %p: nothing to issue\n",
+ dev_dbg(dmaengine_chan_dev(chan), "vchan %p: nothing to issue\n",
&vchan->vc);
}
diff --git a/drivers/dma/switchtec_dma.c b/drivers/dma/switchtec_dma.c
index c8e2169877e9..df58ca760176 100644
--- a/drivers/dma/switchtec_dma.c
+++ b/drivers/dma/switchtec_dma.c
@@ -406,7 +406,7 @@ static int disable_channel(struct switchtec_dma_chan *swdma_chan)
static void
switchtec_dma_cleanup_completed(struct switchtec_dma_chan *swdma_chan)
{
- struct device *chan_dev = &swdma_chan->dma_chan.dev->device;
+ struct device *chan_dev = dmaengine_chan_dev(&swdma_chan->dma_chan);
struct switchtec_dma_desc *desc;
struct switchtec_dma_hw_ce *ce;
struct dmaengine_result res;
@@ -851,7 +851,7 @@ static irqreturn_t switchtec_dma_chan_status_isr(int irq, void *dma)
list_for_each_entry(chan, &dma_dev->channels, device_node) {
swdma_chan = container_of(chan, struct switchtec_dma_chan,
dma_chan);
- chan_dev = &swdma_chan->dma_chan.dev->device;
+ chan_dev = dmaengine_chan_dev(&swdma_chan->dma_chan);
chan_hw = swdma_chan->mmio_chan_hw;
rcu_read_lock();
@@ -1009,19 +1009,19 @@ static int switchtec_dma_alloc_chan_resources(struct dma_chan *chan)
perf_cfg = readl(&swdma_chan->mmio_chan_fw->perf_cfg);
rcu_read_unlock();
- dev_dbg(&chan->dev->device, "Burst Size: 0x%x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "Burst Size: 0x%x\n",
FIELD_GET(PERF_BURST_SIZE_MASK, perf_cfg));
- dev_dbg(&chan->dev->device, "Burst Scale: 0x%x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "Burst Scale: 0x%x\n",
FIELD_GET(PERF_BURST_SCALE_MASK, perf_cfg));
- dev_dbg(&chan->dev->device, "Interval: 0x%x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "Interval: 0x%x\n",
FIELD_GET(PERF_INTERVAL_MASK, perf_cfg));
- dev_dbg(&chan->dev->device, "Arb Weight: 0x%x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "Arb Weight: 0x%x\n",
FIELD_GET(PERF_ARB_WEIGHT_MASK, perf_cfg));
- dev_dbg(&chan->dev->device, "MRRS: 0x%x\n",
+ dev_dbg(dmaengine_chan_dev(chan), "MRRS: 0x%x\n",
FIELD_GET(PERF_MRRS_MASK, perf_cfg));
return SWITCHTEC_DMA_SQ_SIZE;
diff --git a/drivers/dma/tegra186-gpc-dma.c b/drivers/dma/tegra186-gpc-dma.c
index 64cedef1050a..e76c58f213d8 100644
--- a/drivers/dma/tegra186-gpc-dma.c
+++ b/drivers/dma/tegra186-gpc-dma.c
@@ -1537,7 +1537,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
* the channels available and registered for the DMA device are used.
*/
list_for_each_entry(chan, &tdma->dma_dev.channels, device_node) {
- chdev = &chan->dev->device;
+ chdev = dmaengine_chan_dev(chan);
tdc = to_tegra_dma_chan(chan);
if (use_iommu_map) {
@@ -1554,7 +1554,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
return dev_err_probe(chdev, -EINVAL,
"Failed to get stream ID for channel %d\n", tdc->id);
- chan->dev->chan_dma_dev = true;
+ chan->chan_dev->chan_dma_dev = true;
}
/* program stream-id for this channel */
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 640b8a218c9a..7ff8c0241f61 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -256,7 +256,7 @@ txd_to_tegra_dma_desc(struct dma_async_tx_descriptor *td)
static inline struct device *tdc2dev(struct tegra_dma_channel *tdc)
{
- return &tdc->dma_chan.dev->device;
+ return dmaengine_chan_dev(&tdc->dma_chan);
}
static dma_cookie_t tegra_dma_tx_submit(struct dma_async_tx_descriptor *tx);
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fb21e0df5ab7..78a67cb9d6e0 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -422,16 +422,16 @@ static int navss_psil_unpair(struct udma_dev *ud, u32 src_thread,
static void k3_configure_chan_coherency(struct dma_chan *chan, u32 asel)
{
- struct device *chan_dev = &chan->dev->device;
+ struct device *chan_dev = dmaengine_chan_dev(chan);
if (asel == 0) {
/* No special handling for the channel */
- chan->dev->chan_dma_dev = false;
+ chan->chan_dev->chan_dma_dev = false;
dev_clear_dma_coherent(chan_dev);
chan_dev->dma_parms = NULL;
} else if (asel == 14 || asel == 15) {
- chan->dev->chan_dma_dev = true;
+ chan->chan_dev->chan_dma_dev = true;
dev_set_dma_coherent(chan_dev);
dma_coerce_mask_and_coherent(chan_dev, DMA_BIT_MASK(48));
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 4fc5119854ec..0acd7a36a3d0 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -90,14 +90,9 @@ struct timb_dma {
struct tasklet_struct tasklet;
struct timb_dma_chan channels[];
};
-
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
static struct device *chan2dmadev(struct dma_chan *chan)
{
- return chan2dev(chan)->parent->parent;
+ return dmaengine_chan_dev(chan)->parent->parent;
}
static struct timb_dma *tdchantotd(struct timb_dma_chan *td_chan)
@@ -117,7 +112,7 @@ static void __td_enable_chan_irq(struct timb_dma_chan *td_chan)
/* enable interrupt for this channel */
ier = ioread32(td->membase + TIMBDMA_IER);
ier |= 1 << id;
- dev_dbg(chan2dev(&td_chan->chan), "Enabling irq: %d, IER: 0x%x\n", id,
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "Enabling irq: %d, IER: 0x%x\n", id,
ier);
iowrite32(ier, td->membase + TIMBDMA_IER);
}
@@ -131,7 +126,7 @@ static bool __td_dma_done_ack(struct timb_dma_chan *td_chan)
u32 isr;
bool done = false;
- dev_dbg(chan2dev(&td_chan->chan), "Checking irq: %d, td: %p\n", id, td);
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "Checking irq: %d, td: %p\n", id, td);
isr = ioread32(td->membase + TIMBDMA_ISR) & (1 << id);
if (isr) {
@@ -146,18 +141,18 @@ static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc,
struct scatterlist *sg, bool last)
{
if (sg_dma_len(sg) > USHRT_MAX) {
- dev_err(chan2dev(&td_chan->chan), "Too big sg element\n");
+ dev_err(dmaengine_chan_dev(&td_chan->chan), "Too big sg element\n");
return -EINVAL;
}
/* length must be word aligned */
if (sg_dma_len(sg) % sizeof(u32)) {
- dev_err(chan2dev(&td_chan->chan), "Incorrect length: %d\n",
+ dev_err(dmaengine_chan_dev(&td_chan->chan), "Incorrect length: %d\n",
sg_dma_len(sg));
return -EINVAL;
}
- dev_dbg(chan2dev(&td_chan->chan), "desc: %p, addr: 0x%llx\n",
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "desc: %p, addr: 0x%llx\n",
dma_desc, (unsigned long long)sg_dma_address(sg));
dma_desc[7] = (sg_dma_address(sg) >> 24) & 0xff;
@@ -180,7 +175,7 @@ static void __td_start_dma(struct timb_dma_chan *td_chan)
struct timb_dma_desc *td_desc;
if (td_chan->ongoing) {
- dev_err(chan2dev(&td_chan->chan),
+ dev_err(dmaengine_chan_dev(&td_chan->chan),
"Transfer already ongoing\n");
return;
}
@@ -188,7 +183,7 @@ static void __td_start_dma(struct timb_dma_chan *td_chan)
td_desc = list_entry(td_chan->active_list.next, struct timb_dma_desc,
desc_node);
- dev_dbg(chan2dev(&td_chan->chan),
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan),
"td_chan: %p, chan: %d, membase: %p\n",
td_chan, td_chan->chan.chan_id, td_chan->membase);
@@ -230,7 +225,7 @@ static void __td_finish(struct timb_dma_chan *td_chan)
desc_node);
txd = &td_desc->txd;
- dev_dbg(chan2dev(&td_chan->chan), "descriptor %u complete\n",
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "descriptor %u complete\n",
txd->cookie);
/* make sure to stop the transfer */
@@ -284,7 +279,7 @@ static void __td_start_next(struct timb_dma_chan *td_chan)
td_desc = list_entry(td_chan->queue.next, struct timb_dma_desc,
desc_node);
- dev_dbg(chan2dev(&td_chan->chan), "%s: started %u\n",
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "%s: started %u\n",
__func__, td_desc->txd.cookie);
list_move(&td_desc->desc_node, &td_chan->active_list);
@@ -303,12 +298,12 @@ static dma_cookie_t td_tx_submit(struct dma_async_tx_descriptor *txd)
cookie = dma_cookie_assign(txd);
if (list_empty(&td_chan->active_list)) {
- dev_dbg(chan2dev(txd->chan), "%s: started %u\n", __func__,
+ dev_dbg(dmaengine_chan_dev(txd->chan), "%s: started %u\n", __func__,
txd->cookie);
list_add_tail(&td_desc->desc_node, &td_chan->active_list);
__td_start_dma(td_chan);
} else {
- dev_dbg(chan2dev(txd->chan), "tx_submit: queued %u\n",
+ dev_dbg(dmaengine_chan_dev(txd->chan), "tx_submit: queued %u\n",
txd->cookie);
list_add_tail(&td_desc->desc_node, &td_chan->queue);
@@ -344,7 +339,7 @@ static struct timb_dma_desc *td_alloc_init_desc(struct timb_dma_chan *td_chan)
err = dma_mapping_error(chan2dmadev(chan), td_desc->txd.phys);
if (err) {
- dev_err(chan2dev(chan), "DMA mapping error: %d\n", err);
+ dev_err(dmaengine_chan_dev(chan), "DMA mapping error: %d\n", err);
goto err;
}
@@ -359,7 +354,7 @@ out:
static void td_free_desc(struct timb_dma_desc *td_desc)
{
- dev_dbg(chan2dev(td_desc->txd.chan), "Freeing desc: %p\n", td_desc);
+ dev_dbg(dmaengine_chan_dev(td_desc->txd.chan), "Freeing desc: %p\n", td_desc);
dma_unmap_single(chan2dmadev(td_desc->txd.chan), td_desc->txd.phys,
td_desc->desc_list_len, DMA_TO_DEVICE);
@@ -370,7 +365,7 @@ static void td_free_desc(struct timb_dma_desc *td_desc)
static void td_desc_put(struct timb_dma_chan *td_chan,
struct timb_dma_desc *td_desc)
{
- dev_dbg(chan2dev(&td_chan->chan), "Putting desc: %p\n", td_desc);
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "Putting desc: %p\n", td_desc);
spin_lock_bh(&td_chan->lock);
list_add(&td_desc->desc_node, &td_chan->free_list);
@@ -390,7 +385,7 @@ static struct timb_dma_desc *td_desc_get(struct timb_dma_chan *td_chan)
ret = td_desc;
break;
}
- dev_dbg(chan2dev(&td_chan->chan), "desc %p not ACKed\n",
+ dev_dbg(dmaengine_chan_dev(&td_chan->chan), "desc %p not ACKed\n",
td_desc);
}
spin_unlock_bh(&td_chan->lock);
@@ -404,7 +399,7 @@ static int td_alloc_chan_resources(struct dma_chan *chan)
container_of(chan, struct timb_dma_chan, chan);
int i;
- dev_dbg(chan2dev(chan), "%s: entry\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: entry\n", __func__);
BUG_ON(!list_empty(&td_chan->free_list));
for (i = 0; i < td_chan->descs; i++) {
@@ -413,7 +408,7 @@ static int td_alloc_chan_resources(struct dma_chan *chan)
if (i)
break;
else {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"Couldn't allocate any descriptors\n");
return -ENOMEM;
}
@@ -436,7 +431,7 @@ static void td_free_chan_resources(struct dma_chan *chan)
struct timb_dma_desc *td_desc, *_td_desc;
LIST_HEAD(list);
- dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: Entry\n", __func__);
/* check that all descriptors are free */
BUG_ON(!list_empty(&td_chan->active_list));
@@ -447,7 +442,7 @@ static void td_free_chan_resources(struct dma_chan *chan)
spin_unlock_bh(&td_chan->lock);
list_for_each_entry_safe(td_desc, _td_desc, &list, desc_node) {
- dev_dbg(chan2dev(chan), "%s: Freeing desc: %p\n", __func__,
+ dev_dbg(dmaengine_chan_dev(chan), "%s: Freeing desc: %p\n", __func__,
td_desc);
td_free_desc(td_desc);
}
@@ -458,11 +453,11 @@ static enum dma_status td_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
{
enum dma_status ret;
- dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: Entry\n", __func__);
ret = dma_cookie_status(chan, cookie, txstate);
- dev_dbg(chan2dev(chan), "%s: exit, ret: %d\n", __func__, ret);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: exit, ret: %d\n", __func__, ret);
return ret;
}
@@ -472,7 +467,7 @@ static void td_issue_pending(struct dma_chan *chan)
struct timb_dma_chan *td_chan =
container_of(chan, struct timb_dma_chan, chan);
- dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: Entry\n", __func__);
spin_lock_bh(&td_chan->lock);
if (!list_empty(&td_chan->active_list))
@@ -499,20 +494,20 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
unsigned int desc_usage = 0;
if (!sgl || !sg_len) {
- dev_err(chan2dev(chan), "%s: No SG list\n", __func__);
+ dev_err(dmaengine_chan_dev(chan), "%s: No SG list\n", __func__);
return NULL;
}
/* even channels are for RX, odd for TX */
if (td_chan->direction != direction) {
- dev_err(chan2dev(chan),
+ dev_err(dmaengine_chan_dev(chan),
"Requesting channel in wrong direction\n");
return NULL;
}
td_desc = td_desc_get(td_chan);
if (!td_desc) {
- dev_err(chan2dev(chan), "Not enough descriptors available\n");
+ dev_err(dmaengine_chan_dev(chan), "Not enough descriptors available\n");
return NULL;
}
@@ -521,14 +516,14 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
for_each_sg(sgl, sg, sg_len, i) {
int err;
if (desc_usage > td_desc->desc_list_len) {
- dev_err(chan2dev(chan), "No descriptor space\n");
+ dev_err(dmaengine_chan_dev(chan), "No descriptor space\n");
return NULL;
}
err = td_fill_desc(td_chan, td_desc->desc_list + desc_usage, sg,
i == (sg_len - 1));
if (err) {
- dev_err(chan2dev(chan), "Failed to update desc: %d\n",
+ dev_err(dmaengine_chan_dev(chan), "Failed to update desc: %d\n",
err);
td_desc_put(td_chan, td_desc);
return NULL;
@@ -548,7 +543,7 @@ static int td_terminate_all(struct dma_chan *chan)
container_of(chan, struct timb_dma_chan, chan);
struct timb_dma_desc *td_desc, *_td_desc;
- dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
+ dev_dbg(dmaengine_chan_dev(chan), "%s: Entry\n", __func__);
/* first the easy part, put the queue into the free list */
spin_lock_bh(&td_chan->lock);
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index 6595a54a4b97..ecfaa6a76516 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -125,14 +125,9 @@ static struct txx9dmac_regs32 __iomem *__txx9dmac_regs32(
#define dma_writel(ddev, name, val) \
(__is_dmac64(ddev) ? \
dma64_writel(ddev, name, val) : dma32_writel(ddev, name, val))
-
-static struct device *chan2dev(struct dma_chan *chan)
-{
- return &chan->dev->device;
-}
static struct device *chan2parent(struct dma_chan *chan)
{
- return chan->dev->device.parent;
+ return dmaengine_chan_dev(chan)->parent;
}
static struct txx9dmac_desc *
@@ -218,12 +213,12 @@ static struct txx9dmac_desc *txx9dmac_desc_get(struct txx9dmac_chan *dc)
ret = desc;
break;
}
- dev_dbg(chan2dev(&dc->chan), "desc %p not ACKed\n", desc);
+ dev_dbg(dmaengine_chan_dev(&dc->chan), "desc %p not ACKed\n", desc);
i++;
}
spin_unlock_bh(&dc->lock);
- dev_vdbg(chan2dev(&dc->chan), "scanned %u descriptors on freelist\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "scanned %u descriptors on freelist\n",
i);
if (!ret) {
ret = txx9dmac_desc_alloc(dc, GFP_ATOMIC);
@@ -232,7 +227,7 @@ static struct txx9dmac_desc *txx9dmac_desc_get(struct txx9dmac_chan *dc)
dc->descs_allocated++;
spin_unlock_bh(&dc->lock);
} else
- dev_err(chan2dev(&dc->chan),
+ dev_err(dmaengine_chan_dev(&dc->chan),
"not enough descriptors available\n");
}
return ret;
@@ -267,11 +262,11 @@ static void txx9dmac_desc_put(struct txx9dmac_chan *dc,
spin_lock_bh(&dc->lock);
list_for_each_entry(child, &desc->tx_list, desc_node)
- dev_vdbg(chan2dev(&dc->chan),
+ dev_vdbg(dmaengine_chan_dev(&dc->chan),
"moving child desc %p to freelist\n",
child);
list_splice_init(&desc->tx_list, &dc->free_list);
- dev_vdbg(chan2dev(&dc->chan), "moving desc %p to freelist\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "moving desc %p to freelist\n",
desc);
list_add(&desc->desc_node, &dc->free_list);
spin_unlock_bh(&dc->lock);
@@ -283,7 +278,7 @@ static void txx9dmac_desc_put(struct txx9dmac_chan *dc,
static void txx9dmac_dump_regs(struct txx9dmac_chan *dc)
{
if (is_dmac64(dc))
- dev_err(chan2dev(&dc->chan),
+ dev_err(dmaengine_chan_dev(&dc->chan),
" CHAR: %#llx SAR: %#llx DAR: %#llx CNTR: %#x"
" SAIR: %#x DAIR: %#x CCR: %#x CSR: %#x\n",
(u64)channel64_read_CHAR(dc),
@@ -295,7 +290,7 @@ static void txx9dmac_dump_regs(struct txx9dmac_chan *dc)
channel64_readl(dc, CCR),
channel64_readl(dc, CSR));
else
- dev_err(chan2dev(&dc->chan),
+ dev_err(dmaengine_chan_dev(&dc->chan),
" CHAR: %#x SAR: %#x DAR: %#x CNTR: %#x"
" SAIR: %#x DAIR: %#x CCR: %#x CSR: %#x\n",
channel32_readl(dc, CHAR),
@@ -333,11 +328,11 @@ static void txx9dmac_dostart(struct txx9dmac_chan *dc,
struct txx9dmac_slave *ds = dc->chan.private;
u32 sai, dai;
- dev_vdbg(chan2dev(&dc->chan), "dostart %u %p\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "dostart %u %p\n",
first->txd.cookie, first);
/* ASSERT: channel is idle */
if (channel_readl(dc, CSR) & TXX9_DMA_CSR_XFACT) {
- dev_err(chan2dev(&dc->chan),
+ dev_err(dmaengine_chan_dev(&dc->chan),
"BUG: Attempted to start non-idle channel\n");
txx9dmac_dump_regs(dc);
/* The tasklet will hopefully advance the queue... */
@@ -402,7 +397,7 @@ txx9dmac_descriptor_complete(struct txx9dmac_chan *dc,
struct dmaengine_desc_callback cb;
struct dma_async_tx_descriptor *txd = &desc->txd;
- dev_vdbg(chan2dev(&dc->chan), "descriptor %u %p complete\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "descriptor %u %p complete\n",
txd->cookie, desc);
dma_cookie_complete(txd);
@@ -469,11 +464,11 @@ static void txx9dmac_dump_desc(struct txx9dmac_chan *dc,
{
if (is_dmac64(dc)) {
#ifdef TXX9_DMA_USE_SIMPLE_CHAIN
- dev_crit(chan2dev(&dc->chan),
+ dev_crit(dmaengine_chan_dev(&dc->chan),
" desc: ch%#llx s%#llx d%#llx c%#x\n",
(u64)desc->CHAR, desc->SAR, desc->DAR, desc->CNTR);
#else
- dev_crit(chan2dev(&dc->chan),
+ dev_crit(dmaengine_chan_dev(&dc->chan),
" desc: ch%#llx s%#llx d%#llx c%#x"
" si%#x di%#x cc%#x cs%#x\n",
(u64)desc->CHAR, desc->SAR, desc->DAR, desc->CNTR,
@@ -482,11 +477,11 @@ static void txx9dmac_dump_desc(struct txx9dmac_chan *dc,
} else {
struct txx9dmac_hwdesc32 *d = (struct txx9dmac_hwdesc32 *)desc;
#ifdef TXX9_DMA_USE_SIMPLE_CHAIN
- dev_crit(chan2dev(&dc->chan),
+ dev_crit(dmaengine_chan_dev(&dc->chan),
" desc: ch%#x s%#x d%#x c%#x\n",
d->CHAR, d->SAR, d->DAR, d->CNTR);
#else
- dev_crit(chan2dev(&dc->chan),
+ dev_crit(dmaengine_chan_dev(&dc->chan),
" desc: ch%#x s%#x d%#x c%#x"
" si%#x di%#x cc%#x cs%#x\n",
d->CHAR, d->SAR, d->DAR, d->CNTR,
@@ -506,7 +501,7 @@ static void txx9dmac_handle_error(struct txx9dmac_chan *dc, u32 csr)
* borked. Since we don't have any way to report errors, we'll
* just have to scream loudly and try to carry on.
*/
- dev_crit(chan2dev(&dc->chan), "Abnormal Chain Completion\n");
+ dev_crit(dmaengine_chan_dev(&dc->chan), "Abnormal Chain Completion\n");
txx9dmac_dump_regs(dc);
bad_desc = txx9dmac_first_active(dc);
@@ -523,7 +518,7 @@ static void txx9dmac_handle_error(struct txx9dmac_chan *dc, u32 csr)
if (!list_empty(&dc->active_list))
txx9dmac_dostart(dc, txx9dmac_first_active(dc));
- dev_crit(chan2dev(&dc->chan),
+ dev_crit(dmaengine_chan_dev(&dc->chan),
"Bad descriptor submitted for DMA! (cookie: %d)\n",
bad_desc->txd.cookie);
txx9dmac_dump_desc(dc, &bad_desc->hwdesc);
@@ -558,7 +553,7 @@ static void txx9dmac_scan_descriptors(struct txx9dmac_chan *dc)
if (!(csr & TXX9_DMA_CSR_CHNEN))
chain = 0; /* last descriptor of this chain */
- dev_vdbg(chan2dev(&dc->chan), "scan_descriptors: char=%#llx\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "scan_descriptors: char=%#llx\n",
(u64)chain);
list_for_each_entry_safe(desc, _desc, &dc->active_list, desc_node) {
@@ -589,7 +584,7 @@ scan_done:
return;
}
- dev_err(chan2dev(&dc->chan),
+ dev_err(dmaengine_chan_dev(&dc->chan),
"BUG: All descriptors done, but channel not idle!\n");
/* Try to continue after resetting the channel... */
@@ -609,7 +604,7 @@ static void txx9dmac_chan_tasklet(struct tasklet_struct *t)
dc = from_tasklet(dc, t, tasklet);
csr = channel_readl(dc, CSR);
- dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr);
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "tasklet: status=%x\n", csr);
spin_lock(&dc->lock);
if (csr & (TXX9_DMA_CSR_ABCHC | TXX9_DMA_CSR_NCHNC |
@@ -625,7 +620,7 @@ static irqreturn_t txx9dmac_chan_interrupt(int irq, void *dev_id)
{
struct txx9dmac_chan *dc = dev_id;
- dev_vdbg(chan2dev(&dc->chan), "interrupt: status=%#x\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "interrupt: status=%#x\n",
channel_readl(dc, CSR));
tasklet_schedule(&dc->tasklet);
@@ -654,7 +649,7 @@ static void txx9dmac_tasklet(struct tasklet_struct *t)
if ((mcr >> (24 + i)) & 0x11) {
dc = ddev->chan[i];
csr = channel_readl(dc, CSR);
- dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n",
+ dev_vdbg(dmaengine_chan_dev(&dc->chan), "tasklet: status=%x\n",
csr);
spin_lock(&dc->lock);
if (csr & (TXX9_DMA_CSR_ABCHC | TXX9_DMA_CSR_NCHNC |
@@ -696,7 +691,7 @@ static dma_cookie_t txx9dmac_tx_submit(struct dma_async_tx_descriptor *tx)
spin_lock_bh(&dc->lock);
cookie = dma_cookie_assign(tx);
- dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u %p\n",
+ dev_vdbg(dmaengine_chan_dev(tx->chan), "tx_submit: queued %u %p\n",
desc->txd.cookie, desc);
list_add_tail(&desc->desc_node, &dc->queue);
@@ -717,11 +712,11 @@ txx9dmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
size_t xfer_count;
size_t offset;
- dev_vdbg(chan2dev(chan), "prep_dma_memcpy d%#llx s%#llx l%#zx f%#lx\n",
+ dev_vdbg(dmaengine_chan_dev(chan), "prep_dma_memcpy d%#llx s%#llx l%#zx f%#lx\n",
(u64)dest, (u64)src, len, flags);
if (unlikely(!len)) {
- dev_dbg(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
+ dev_dbg(dmaengine_chan_dev(chan), "prep_dma_memcpy: length is zero!\n");
return NULL;
}
@@ -812,7 +807,7 @@ txx9dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
unsigned int i;
struct scatterlist *sg;
- dev_vdbg(chan2dev(chan), "prep_dma_slave\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "prep_dma_slave\n");
BUG_ON(!ds || !ds->reg_width);
if (ds->tx_reg)
@@ -900,7 +895,7 @@ static int txx9dmac_terminate_all(struct dma_chan *chan)
struct txx9dmac_desc *desc, *_desc;
LIST_HEAD(list);
- dev_vdbg(chan2dev(chan), "terminate_all\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "terminate_all\n");
spin_lock_bh(&dc->lock);
txx9dmac_reset_chan(dc);
@@ -988,11 +983,11 @@ static int txx9dmac_alloc_chan_resources(struct dma_chan *chan)
struct txx9dmac_desc *desc;
int i;
- dev_vdbg(chan2dev(chan), "alloc_chan_resources\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "alloc_chan_resources\n");
/* ASSERT: channel is idle */
if (channel_readl(dc, CSR) & TXX9_DMA_CSR_XFACT) {
- dev_dbg(chan2dev(chan), "DMA channel not idle?\n");
+ dev_dbg(dmaengine_chan_dev(chan), "DMA channel not idle?\n");
return -EIO;
}
@@ -1022,7 +1017,7 @@ static int txx9dmac_alloc_chan_resources(struct dma_chan *chan)
desc = txx9dmac_desc_alloc(dc, GFP_KERNEL);
if (!desc) {
- dev_info(chan2dev(chan),
+ dev_info(dmaengine_chan_dev(chan),
"only allocated %d descriptors\n", i);
spin_lock_bh(&dc->lock);
break;
@@ -1034,7 +1029,7 @@ static int txx9dmac_alloc_chan_resources(struct dma_chan *chan)
}
spin_unlock_bh(&dc->lock);
- dev_dbg(chan2dev(chan),
+ dev_dbg(dmaengine_chan_dev(chan),
"alloc_chan_resources allocated %d descriptors\n", i);
return i;
@@ -1047,7 +1042,7 @@ static void txx9dmac_free_chan_resources(struct dma_chan *chan)
struct txx9dmac_desc *desc, *_desc;
LIST_HEAD(list);
- dev_dbg(chan2dev(chan), "free_chan_resources (descs allocated=%u)\n",
+ dev_dbg(dmaengine_chan_dev(chan), "free_chan_resources (descs allocated=%u)\n",
dc->descs_allocated);
/* ASSERT: channel is idle */
@@ -1061,13 +1056,13 @@ static void txx9dmac_free_chan_resources(struct dma_chan *chan)
spin_unlock_bh(&dc->lock);
list_for_each_entry_safe(desc, _desc, &list, desc_node) {
- dev_vdbg(chan2dev(chan), " freeing descriptor %p\n", desc);
+ dev_vdbg(dmaengine_chan_dev(chan), " freeing descriptor %p\n", desc);
dma_unmap_single(chan2parent(chan), desc->txd.phys,
ddev->descsize, DMA_TO_DEVICE);
kfree(desc);
}
- dev_vdbg(chan2dev(chan), "free_chan_resources done\n");
+ dev_vdbg(dmaengine_chan_dev(chan), "free_chan_resources done\n");
}
/*----------------------------------------------------------------------*/
diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h
index 59d9eabc8b67..abf2ae737c30 100644
--- a/drivers/dma/virt-dma.h
+++ b/drivers/dma/virt-dma.h
@@ -41,6 +41,11 @@ static inline struct virt_dma_chan *to_virt_chan(struct dma_chan *chan)
return container_of(chan, struct virt_dma_chan, chan);
}
+static inline struct device *vchan_chan_dev(struct virt_dma_chan *vc)
+{
+ return dmaengine_chan_dev(&vc->chan);
+}
+
void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head);
void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev);
struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *, dma_cookie_t);
@@ -210,6 +215,17 @@ static inline void vchan_free_chan_resources(struct virt_dma_chan *vc)
}
/**
+ * vchan_chan_name - Return vchan DMA channel device name
+ * @vc: virtual channel
+ *
+ * Return: The name of the DMA channel device
+ */
+static inline const char *vchan_chan_name(struct virt_dma_chan *vc)
+{
+ return dma_chan_name(&vc->chan);
+}
+
+/**
* vchan_synchronize() - synchronize callback execution to the current context
* @vc: virtual channel to synchronize
*
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index a48586bb8edb..07b7f8ab0ccb 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1818,6 +1818,18 @@ endmenu
menu "Auxiliary Bus GPIO drivers"
depends on AUXILIARY_BUS
+config GPIO_AD7768
+ tristate "Analog Devices AD7768 GPIO support"
+ depends on AD7768
+ depends on GPIOLIB
+ select GPIO_REGMAP
+ help
+ Say yes here to expose the AD7768 utility pins as GPIOs when the
+ device tree node is marked as a GPIO controller.
+
+ To compile this driver as a module, choose M here: the module will be
+ called gpio-ad7768.
+
config GPIO_LTC4283
tristate "Analog Devices LTC4283 GPIO support"
depends on SENSORS_LTC4283
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index dc9e6d643b5b..ce56e9b3f55d 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_GPIO_104_IDI_48) += gpio-104-idi-48.o
obj-$(CONFIG_GPIO_104_IDIO_16) += gpio-104-idio-16.o
obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o
obj-$(CONFIG_GPIO_74XX_MMIO) += gpio-74xx-mmio.o
+obj-$(CONFIG_GPIO_AD7768) += gpio-ad7768.o
obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o
obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o
obj-$(CONFIG_GPIO_ADP5585) += gpio-adp5585.o
diff --git a/drivers/gpio/gpio-ad7768.c b/drivers/gpio/gpio-ad7768.c
new file mode 100644
index 000000000000..c37e1ac30612
--- /dev/null
+++ b/drivers/gpio/gpio-ad7768.c
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Analog Devices AD7768 GPIO auxiliary driver
+ *
+ * Copyright 2026 Analog Devices Inc.
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/bitops.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/gpio/driver.h>
+#include <linux/gpio/regmap.h>
+#include <linux/module.h>
+#include <linux/pm_runtime.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+
+#define AD7768_REG_GPIO_CONTROL 0x0E
+#define AD7768_GPIO_UGPIO_ENABLE BIT(7)
+
+#define AD7768_REG_GPIO_WRITE 0x0F
+#define AD7768_REG_GPIO_READ 0x10
+
+#define AD7768_NUM_GPIOS 5
+#define AD7768_FILTER_GPIO 4
+
+static int ad7768_gpio_init_valid_mask(struct gpio_chip *gc,
+ unsigned long *valid_mask,
+ unsigned int ngpios)
+{
+ if (ngpios > AD7768_FILTER_GPIO &&
+ fwnode_property_match_string(gc->fwnode, "clock-names", "mclk") < 0)
+ __clear_bit(AD7768_FILTER_GPIO, valid_mask);
+
+ return 0;
+}
+
+static int ad7768_gpio_reg_mask_xlate(struct gpio_regmap *gpio,
+ enum gpio_regmap_operation op,
+ unsigned int base, unsigned int offset,
+ unsigned int *reg, unsigned int *mask)
+{
+ struct regmap *regmap = gpio_regmap_get_drvdata(gpio);
+ int ret;
+
+ *reg = base;
+ *mask = BIT(offset);
+
+ if (op != GPIO_REGMAP_GET_OP)
+ return 0;
+
+ /*
+ * AD7768 has separate input-state and output-latch registers. For an
+ * output line, report the programmed value from the output latch;
+ * input lines continue to use the input-state register.
+ */
+ ret = regmap_test_bits(regmap, AD7768_REG_GPIO_CONTROL, *mask);
+ if (ret < 0)
+ return ret;
+ if (ret)
+ *reg = AD7768_REG_GPIO_WRITE;
+
+ return 0;
+}
+
+static int ad7768_gpio_probe(struct auxiliary_device *adev,
+ const struct auxiliary_device_id *id)
+{
+ struct gpio_regmap_config config;
+ struct device *dev = &adev->dev;
+ struct device *parent = dev->parent;
+ struct regmap *map;
+ int ret;
+
+ map = dev_get_regmap(parent, NULL);
+ if (!map)
+ return -ENODEV;
+
+ PM_RUNTIME_ACQUIRE_AUTOSUSPEND(parent, pm);
+ ret = PM_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
+ ret = regmap_set_bits(map, AD7768_REG_GPIO_CONTROL, AD7768_GPIO_UGPIO_ENABLE);
+ if (ret)
+ return ret;
+
+ config = (struct gpio_regmap_config) {
+ .parent = dev,
+ .regmap = map,
+ .label = dev_name(parent),
+ .ngpio = AD7768_NUM_GPIOS,
+ .reg_dat_base = AD7768_REG_GPIO_READ,
+ .reg_set_base = AD7768_REG_GPIO_WRITE,
+ .reg_dir_out_base = AD7768_REG_GPIO_CONTROL,
+ .pm_dev = parent,
+ .fwnode = dev_fwnode(parent),
+ .reg_mask_xlate = ad7768_gpio_reg_mask_xlate,
+ .init_valid_mask = ad7768_gpio_init_valid_mask,
+ .drvdata = map,
+ };
+
+ return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(dev, &config));
+}
+
+static const struct auxiliary_device_id ad7768_gpio_ids[] = {
+ { .name = "ad7768.gpio" },
+ { }
+};
+MODULE_DEVICE_TABLE(auxiliary, ad7768_gpio_ids);
+
+static struct auxiliary_driver ad7768_gpio_driver = {
+ .probe = ad7768_gpio_probe,
+ .id_table = ad7768_gpio_ids,
+};
+module_auxiliary_driver(ad7768_gpio_driver);
+
+MODULE_AUTHOR("Janani Sunil <janani.sunil@analog.com>");
+MODULE_DESCRIPTION("Analog Devices AD7768 GPIO auxiliary driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index fb21396e1d02..2f5f45b84cc9 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -6,11 +6,13 @@
*/
#include <linux/bits.h>
+#include <linux/cleanup.h>
#include <linux/compiler_attributes.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -23,6 +25,8 @@
struct gpio_regmap {
struct device *parent;
struct regmap *regmap;
+ struct device *pm_dev;
+
struct gpio_chip gpio_chip;
int reg_stride;
@@ -79,6 +83,33 @@ static int gpio_regmap_simple_xlate(struct gpio_regmap *gpio,
return 0;
}
+static int gpio_regmap_runtime_get(struct gpio_regmap *gpio)
+{
+ if (!gpio->pm_dev)
+ return 0;
+
+ return pm_runtime_get_active(gpio->pm_dev, RPM_TRANSPARENT);
+}
+
+static void gpio_regmap_runtime_put(struct gpio_regmap *gpio)
+{
+ if (!gpio->pm_dev)
+ return;
+
+ pm_runtime_put_autosuspend(gpio->pm_dev);
+}
+
+DEFINE_GUARD(gpio_regmap_runtime, struct gpio_regmap *,
+ gpio_regmap_runtime_get(_T), gpio_regmap_runtime_put(_T))
+DEFINE_GUARD_COND(gpio_regmap_runtime, _try,
+ gpio_regmap_runtime_get(_T), _RET == 0)
+
+#define GPIO_REGMAP_RUNTIME_ACQUIRE(_gpio, _var) \
+ ACQUIRE(gpio_regmap_runtime_try, _var)(_gpio)
+
+#define GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(_var_ptr) \
+ ACQUIRE_ERR(gpio_regmap_runtime, _var_ptr)
+
static int gpio_regmap_get(struct gpio_chip *chip, unsigned int offset)
{
struct gpio_regmap *gpio = gpiochip_get_data(chip);
@@ -91,15 +122,21 @@ static int gpio_regmap_get(struct gpio_chip *chip, unsigned int offset)
else
base = gpio_regmap_addr(gpio->reg_set_base);
- ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_GET_OP, base, offset, &reg, &mask);
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
+ ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_GET_OP, base, offset,
+ &reg, &mask);
if (ret)
return ret;
+ if (gpio->reg_dat_base != gpio->reg_set_base)
+ return regmap_test_bits(gpio->regmap, reg, mask);
+
/* ensure we don't spoil any register cache with pin input values */
- if (gpio->reg_dat_base == gpio->reg_set_base)
- ret = regmap_read_bypassed(gpio->regmap, reg, &val);
- else
- ret = regmap_read(gpio->regmap, reg, &val);
+ ret = regmap_read_bypassed(gpio->regmap, reg, &val);
if (ret)
return ret;
@@ -114,7 +151,13 @@ static int gpio_regmap_set(struct gpio_chip *chip, unsigned int offset,
unsigned int reg, mask, mask_val;
int ret;
- ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_SET_OP, base, offset, &reg, &mask);
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
+ ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_SET_OP, base, offset,
+ &reg, &mask);
if (ret)
return ret;
@@ -146,6 +189,11 @@ static int gpio_regmap_set_with_clear(struct gpio_chip *chip,
unsigned int base, reg, mask, value = 0;
int ret;
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
if (val)
base = gpio_regmap_addr(gpio->reg_set_base);
else
@@ -183,7 +231,7 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
unsigned int offset)
{
struct gpio_regmap *gpio = gpiochip_get_data(chip);
- unsigned int base, val, reg, mask;
+ unsigned int base, reg, mask;
int invert, ret;
if (gpio_regmap_fixed_direction(gpio, offset)) {
@@ -208,18 +256,24 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
return -ENOTSUPP;
}
- ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_GET_DIR_OP, base, offset, &reg, &mask);
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
if (ret)
return ret;
- ret = regmap_read(gpio->regmap, reg, &val);
+ ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_GET_DIR_OP, base, offset,
+ &reg, &mask);
if (ret)
return ret;
- if (!!(val & mask) ^ invert)
+ ret = regmap_test_bits(gpio->regmap, reg, mask);
+ if (ret < 0)
+ return ret;
+
+ if (ret ^ invert)
return GPIO_LINE_DIRECTION_OUT;
- else
- return GPIO_LINE_DIRECTION_IN;
+
+ return GPIO_LINE_DIRECTION_IN;
}
static int gpio_regmap_try_direction_fixed(struct gpio_regmap *gpio,
@@ -262,7 +316,13 @@ static int gpio_regmap_set_direction(struct gpio_chip *chip,
return -ENOTSUPP;
}
- ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_SET_DIR_OP, base, offset, &reg, &mask);
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
+ ret = gpio->reg_mask_xlate(gpio, GPIO_REGMAP_SET_DIR_OP, base, offset,
+ &reg, &mask);
if (ret)
return ret;
@@ -293,6 +353,11 @@ static int gpio_regmap_direction_output(struct gpio_chip *chip,
struct gpio_regmap *gpio = gpiochip_get_data(chip);
int ret;
+ GPIO_REGMAP_RUNTIME_ACQUIRE(gpio, pm);
+ ret = GPIO_REGMAP_RUNTIME_ACQUIRE_ERR(&pm);
+ if (ret)
+ return ret;
+
/*
* First check if this is gonna work on a fixed direction line,
* if it doesn't (i.e. this is a fixed input line), then do not
@@ -304,7 +369,9 @@ static int gpio_regmap_direction_output(struct gpio_chip *chip,
return ret;
}
- gpio_regmap_set(chip, offset, value);
+ ret = gpio_regmap_set(chip, offset, value);
+ if (ret)
+ return ret;
return gpio_regmap_set_direction(chip, offset, true);
}
@@ -399,6 +466,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
gpio->reg_clr_base = config->reg_clr_base;
gpio->reg_dir_in_base = config->reg_dir_in_base;
gpio->reg_dir_out_base = config->reg_dir_out_base;
+ gpio->pm_dev = config->pm_dev;
chip = &gpio->gpio_chip;
chip->parent = config->parent;
@@ -406,7 +474,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
chip->base = -1;
chip->names = config->names;
chip->label = config->label ?: dev_name(config->parent);
- chip->can_sleep = regmap_might_sleep(config->regmap);
+ chip->can_sleep = config->pm_dev || regmap_might_sleep(config->regmap);
chip->init_valid_mask = config->init_valid_mask;
chip->request = gpiochip_generic_request;
diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
index 3a15bb6465e4..617bc1932524 100644
--- a/drivers/gpu/drm/amd/display/Kconfig
+++ b/drivers/gpu/drm/amd/display/Kconfig
@@ -68,7 +68,6 @@ config DRM_AMD_SECURE_DISPLAY
config DRM_AMD_DC_KUNIT_TEST
tristate "KUnit tests for the AMD DC display driver" if !KUNIT_ALL_TESTS
depends on DRM_AMD_DC && KUNIT && DEBUG_FS && DRM_KUNIT_TEST_HELPERS
- depends on BROKEN
default KUNIT_ALL_TESTS
help
This option enables KUnit tests for the AMD Display Core driver.
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
index 37d1508d656b..d76ebf145dfc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
@@ -3603,6 +3603,107 @@ void dm_restore_drm_connector_state(struct drm_device *dev,
}
EXPORT_IF_KUNIT(dm_restore_drm_connector_state);
+STATIC_IFN_KUNIT bool dm_edid_parser_send_cea(struct amdgpu_display_manager *dm,
+ unsigned int offset,
+ unsigned int total_length,
+ u8 *data,
+ unsigned int length,
+ struct amdgpu_hdmi_vsdb_info *vsdb)
+{
+ bool res;
+ union dmub_rb_cmd cmd;
+ struct dmub_cmd_send_edid_cea *input;
+ struct dmub_cmd_edid_cea_output *output;
+
+ if (length > DMUB_EDID_CEA_DATA_CHUNK_BYTES)
+ return false;
+
+ memset(&cmd, 0, sizeof(cmd));
+
+ input = &cmd.edid_cea.data.input;
+
+ cmd.edid_cea.header.type = DMUB_CMD__EDID_CEA;
+ cmd.edid_cea.header.sub_type = 0;
+ cmd.edid_cea.header.payload_bytes =
+ sizeof(cmd.edid_cea) - sizeof(cmd.edid_cea.header);
+ input->offset = offset;
+ input->length = length;
+ input->cea_total_length = total_length;
+ memcpy(input->payload, data, length);
+
+ res = dc_wake_and_execute_dmub_cmd(dm->dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY);
+ if (!res) {
+ drm_err(adev_to_drm(dm->adev), "EDID CEA parser failed\n");
+ return false;
+ }
+
+ output = &cmd.edid_cea.data.output;
+
+ if (output->type == DMUB_CMD__EDID_CEA_ACK) {
+ if (!output->ack.success) {
+ drm_err(adev_to_drm(dm->adev), "EDID CEA ack failed at offset %d\n",
+ output->ack.offset);
+ }
+ } else if (output->type == DMUB_CMD__EDID_CEA_AMD_VSDB) {
+ if (!output->amd_vsdb.vsdb_found)
+ return false;
+
+ vsdb->freesync_supported = output->amd_vsdb.freesync_supported;
+ vsdb->amd_vsdb_version = output->amd_vsdb.amd_vsdb_version;
+ vsdb->min_refresh_rate_hz = output->amd_vsdb.min_frame_rate;
+ vsdb->max_refresh_rate_hz = output->amd_vsdb.max_frame_rate;
+ vsdb->freesync_mccs_vcp_code = output->amd_vsdb.freesync_mccs_vcp_code;
+ } else {
+ drm_warn(adev_to_drm(dm->adev), "Unknown EDID CEA parser results\n");
+ return false;
+ }
+
+ return true;
+}
+EXPORT_IF_KUNIT(dm_edid_parser_send_cea);
+
+STATIC_IFN_KUNIT bool parse_edid_cea_dmcu(struct amdgpu_display_manager *dm,
+ u8 *edid_ext, int len,
+ struct amdgpu_hdmi_vsdb_info *vsdb_info)
+{
+ return false;
+}
+EXPORT_IF_KUNIT(parse_edid_cea_dmcu);
+
+STATIC_IFN_KUNIT bool parse_edid_cea_dmub(struct amdgpu_display_manager *dm,
+ u8 *edid_ext, int len,
+ struct amdgpu_hdmi_vsdb_info *vsdb_info)
+{
+ int i;
+
+ /* send extension block to DMCU for parsing */
+ for (i = 0; i < len; i += 8) {
+ /* send 8 bytes a time */
+ if (!dm_edid_parser_send_cea(dm, i, len, &edid_ext[i], 8, vsdb_info))
+ return false;
+ }
+
+ return vsdb_info->freesync_supported;
+}
+EXPORT_IF_KUNIT(parse_edid_cea_dmub);
+
+STATIC_IFN_KUNIT bool parse_edid_cea(struct amdgpu_dm_connector *aconnector,
+ u8 *edid_ext, int len,
+ struct amdgpu_hdmi_vsdb_info *vsdb_info)
+{
+ struct amdgpu_device *adev = drm_to_adev(aconnector->base.dev);
+ bool ret;
+
+ mutex_lock(&adev->dm.dc_lock);
+ if (adev->dm.dmub_srv)
+ ret = parse_edid_cea_dmub(&adev->dm, edid_ext, len, vsdb_info);
+ else
+ ret = parse_edid_cea_dmcu(&adev->dm, edid_ext, len, vsdb_info);
+ mutex_unlock(&adev->dm.dc_lock);
+ return ret;
+}
+EXPORT_IF_KUNIT(parse_edid_cea);
+
STATIC_IFN_KUNIT void parse_edid_displayid_vrr(struct drm_connector *connector,
const struct edid *edid)
{
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c
index 6e0888049030..1b0d3f16ef1a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c
@@ -2946,7 +2946,7 @@ static const struct drm_plane_funcs dm_test_plane_reset_funcs = {
*/
static void dm_test_plane_create_state_initializes_state(struct kunit *test)
{
- struct dm_plane_state *old_state;
+ struct drm_plane_state *plane_state;
struct dm_plane_state *new_state;
struct drm_plane *plane;
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
index e8c9a6040d75..31e11322b2ab 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
@@ -277,7 +277,7 @@ static const struct drm_crtc_helper_funcs aspeed_gfx_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs aspeed_gfx_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index a2ef272e9f27..eb9de78c4d85 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -80,51 +80,6 @@ __drm_atomic_helper_crtc_state_init(struct drm_crtc_state *crtc_state,
EXPORT_SYMBOL(__drm_atomic_helper_crtc_state_init);
/**
- * __drm_atomic_helper_crtc_reset - reset state on CRTC
- * @crtc: drm CRTC
- * @crtc_state: CRTC state to assign
- *
- * Initializes the newly allocated @crtc_state and assigns it to
- * the &drm_crtc->state pointer of @crtc, usually required when
- * initializing the drivers or when called from the &drm_crtc_funcs.reset
- * hook.
- *
- * This is useful for drivers that subclass the CRTC state.
- */
-void
-__drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
- struct drm_crtc_state *crtc_state)
-{
- if (crtc_state)
- __drm_atomic_helper_crtc_state_init(crtc_state, crtc);
-
- if (drm_dev_has_vblank(crtc->dev))
- drm_crtc_vblank_reset(crtc);
-
- crtc->state = crtc_state;
-}
-EXPORT_SYMBOL(__drm_atomic_helper_crtc_reset);
-
-/**
- * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
- * @crtc: drm CRTC
- *
- * Resets the atomic state for @crtc by freeing the state pointer (which might
- * be NULL, e.g. at driver load time) and allocating a new empty state object.
- */
-void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc)
-{
- struct drm_crtc_state *crtc_state =
- kzalloc_obj(*crtc->state);
-
- if (crtc->state)
- crtc->funcs->atomic_destroy_state(crtc, crtc->state);
-
- __drm_atomic_helper_crtc_reset(crtc, crtc_state);
-}
-EXPORT_SYMBOL(drm_atomic_helper_crtc_reset);
-
-/**
* drm_atomic_helper_crtc_create_state - default &drm_crtc_funcs.atomic_create_state hook for crtcs
* @crtc: crtc object
*
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index f95cd9695b43..c7c8e38b192d 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -307,9 +307,7 @@ void drm_mode_config_reset(struct drm_device *dev)
}
drm_for_each_crtc(crtc, dev) {
- if (crtc->funcs->reset)
- crtc->funcs->reset(crtc);
- else if (crtc->funcs->atomic_create_state)
+ if (crtc->funcs->atomic_create_state)
drm_mode_config_crtc_reset_with_create_state(crtc);
}
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 6a869d0f6ffc..0c362784afe4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -856,7 +856,8 @@ static u8 get_pipes_downstream_of_mst_port(struct intel_atomic_state *state,
if (&connector->mst.dp->mst.mgr != mst_mgr)
continue;
- if (connector->mst.port != parent_port &&
+ if (parent_port &&
+ connector->mst.port != parent_port &&
!drm_dp_mst_port_downstream_of_parent(mst_mgr,
connector->mst.port,
parent_port))
@@ -2171,6 +2172,27 @@ bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
return false;
}
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc)
+{
+ struct intel_connector *connector;
+
+ connector = get_connector_in_state_for_crtc(state, crtc);
+ if (!connector)
+ return false;
+
+ if (!connector->mst.dp)
+ return false;
+
+ if (!connector->mst.dp->mst.mgr.mst_state)
+ return true;
+
+ if (drm_connector_is_unregistered(&connector->base))
+ return true;
+
+ return false;
+}
+
/**
* intel_dp_mst_prepare_probe - Prepare an MST link for topology probing
* @intel_dp: DP port object
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
index ab09b487c6bb..8ce89242c05c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@ -28,6 +28,8 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
struct intel_link_bw_limits *limits);
bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
struct intel_crtc *crtc);
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc);
void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
index b47474a3e9fe..e71e76d6fd3e 100644
--- a/drivers/gpu/drm/i915/display/intel_link_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
@@ -64,7 +64,8 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
intel_atomic_get_new_crtc_state(state, crtc);
int forced_bpp_x16 = get_forced_link_bpp_x16(state, crtc);
- if (state->base.duplicated && crtc_state) {
+ if ((state->base.duplicated && crtc_state) ||
+ intel_dp_mst_stream_disconnected(state, crtc)) {
limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
if (intel_dsc_enabled_on_link(crtc_state))
limits->link_dsc_pipes |= BIT(pipe);
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index 33245f44c0d5..7d7db774d8c7 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -257,6 +257,9 @@ static struct intel_quirk intel_quirks[] = {
/* Dell XPS 13 7390 2-in-1 */
{ 0x8a52, 0x1028, 0x08b0, quirk_edp_limit_rate_hbr2 },
+ /* HP Pavilion Plus Laptop 14-ew1xxx */
+ { 0x7d55, 0x103c, 0x8c31, quirk_edp_limit_rate_hbr2 },
+
/* Xiaomi Book Pro 14 2026 */
{ 0xb081, 0x1d72, 0x2424, quirk_disable_psr2 },
};
diff --git a/drivers/gpu/drm/imagination/pvr_ccb.c b/drivers/gpu/drm/imagination/pvr_ccb.c
index b702d122d791..e408df74853d 100644
--- a/drivers/gpu/drm/imagination/pvr_ccb.c
+++ b/drivers/gpu/drm/imagination/pvr_ccb.c
@@ -17,6 +17,7 @@
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
+#include <linux/overflow.h>
#include <linux/types.h>
#include <linux/workqueue.h>
@@ -82,11 +83,6 @@ pvr_ccb_init(struct pvr_device *pvr_dev, struct pvr_ccb *pvr_ccb,
pvr_fw_object_get_fw_addr(pvr_ccb->ctrl_obj, &pvr_ccb->ctrl_fw_addr);
pvr_fw_object_get_fw_addr(pvr_ccb->ccb_obj, &pvr_ccb->ccb_fw_addr);
- WRITE_ONCE(pvr_ccb->ctrl->write_offset, 0);
- WRITE_ONCE(pvr_ccb->ctrl->read_offset, 0);
- WRITE_ONCE(pvr_ccb->ctrl->wrap_mask, num_cmds - 1);
- WRITE_ONCE(pvr_ccb->ctrl->cmd_size, cmd_size);
-
return 0;
err_free_ctrl:
@@ -527,6 +523,7 @@ out_unlock:
*/
void pvr_kccb_fini(struct pvr_device *pvr_dev)
{
+ pvr_fw_object_unmap_and_destroy(pvr_dev->kccb.rtn_obj);
pvr_ccb_fini(&pvr_dev->kccb.ccb);
WARN_ON(!list_empty(&pvr_dev->kccb.waiters));
WARN_ON(pvr_dev->kccb.reserved_count);
@@ -543,14 +540,42 @@ void pvr_kccb_fini(struct pvr_device *pvr_dev)
int
pvr_kccb_init(struct pvr_device *pvr_dev)
{
- pvr_dev->kccb.slot_count = 1 << ROGUE_FWIF_KCCB_NUMCMDS_LOG2_DEFAULT;
+ const u32 num_slots_log2 = ROGUE_FWIF_KCCB_NUMCMDS_LOG2_DEFAULT;
+ const u32 num_slots = 1 << num_slots_log2;
+ u32 rtn_size;
+ int err;
+
+ /*
+ * The inputs here are compile-time constants; there's no reason to try
+ * to gracefully handle overflow at runtime.
+ */
+ BUILD_BUG_ON(check_mul_overflow(num_slots, sizeof(*pvr_dev->kccb.rtn), &rtn_size));
+
+ pvr_dev->kccb.slot_count = num_slots;
INIT_LIST_HEAD(&pvr_dev->kccb.waiters);
pvr_dev->kccb.fence_ctx.id = dma_fence_context_alloc(1);
spin_lock_init(&pvr_dev->kccb.fence_ctx.lock);
- return pvr_ccb_init(pvr_dev, &pvr_dev->kccb.ccb,
- ROGUE_FWIF_KCCB_NUMCMDS_LOG2_DEFAULT,
- sizeof(struct rogue_fwif_kccb_cmd));
+ err = pvr_ccb_init(pvr_dev, &pvr_dev->kccb.ccb, num_slots_log2,
+ sizeof(struct rogue_fwif_kccb_cmd));
+ if (err)
+ return err;
+
+ /* Allocate memory for KCCB return slots. */
+ pvr_dev->kccb.rtn = pvr_fw_object_create_and_map(pvr_dev, rtn_size,
+ PVR_BO_FW_FLAGS_DEVICE_UNCACHED,
+ NULL, NULL, &pvr_dev->kccb.rtn_obj);
+ if (IS_ERR(pvr_dev->kccb.rtn)) {
+ err = PTR_ERR(pvr_dev->kccb.rtn);
+ goto err_ccb_fini;
+ }
+
+ return 0;
+
+err_ccb_fini:
+ pvr_ccb_fini(&pvr_dev->kccb.ccb);
+
+ return err;
}
/**
diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c
index 54fe4180c73c..35eaa54f75ed 100644
--- a/drivers/gpu/drm/imagination/pvr_device.c
+++ b/drivers/gpu/drm/imagination/pvr_device.c
@@ -697,25 +697,7 @@ pvr_device_gpu_init(struct pvr_device *pvr_dev)
if (err)
return err;
- if (pvr_dev->fw_dev.processor_type != PVR_FW_PROCESSOR_TYPE_MIPS) {
- pvr_dev->kernel_vm_ctx = pvr_vm_create_context(pvr_dev, false);
- if (IS_ERR(pvr_dev->kernel_vm_ctx))
- return PTR_ERR(pvr_dev->kernel_vm_ctx);
- }
-
- err = pvr_fw_init(pvr_dev);
- if (err)
- goto err_vm_ctx_put;
-
- return 0;
-
-err_vm_ctx_put:
- if (pvr_dev->fw_dev.processor_type != PVR_FW_PROCESSOR_TYPE_MIPS) {
- pvr_vm_context_put(pvr_dev->kernel_vm_ctx);
- pvr_dev->kernel_vm_ctx = NULL;
- }
-
- return err;
+ return pvr_fw_init(pvr_dev);
}
/**
@@ -726,11 +708,6 @@ static void
pvr_device_gpu_fini(struct pvr_device *pvr_dev)
{
pvr_fw_fini(pvr_dev);
-
- if (pvr_dev->fw_dev.processor_type != PVR_FW_PROCESSOR_TYPE_MIPS) {
- WARN_ON(!pvr_vm_context_put(pvr_dev->kernel_vm_ctx));
- pvr_dev->kernel_vm_ctx = NULL;
- }
}
/**
diff --git a/drivers/gpu/drm/imagination/pvr_fw.c b/drivers/gpu/drm/imagination/pvr_fw.c
index 850a3ec8e775..c6c77b152342 100644
--- a/drivers/gpu/drm/imagination/pvr_fw.c
+++ b/drivers/gpu/drm/imagination/pvr_fw.c
@@ -945,8 +945,6 @@ pvr_fw_init(struct pvr_device *pvr_dev)
[PVR_FW_PROCESSOR_TYPE_RISCV] = &pvr_fw_defs_riscv,
};
- u32 kccb_size_log2 = ROGUE_FWIF_KCCB_NUMCMDS_LOG2_DEFAULT;
- u32 kccb_rtn_size = (1 << kccb_size_log2) * sizeof(*pvr_dev->kccb.rtn);
struct pvr_fw_device *fw_dev = &pvr_dev->fw_dev;
int err;
@@ -981,18 +979,9 @@ pvr_fw_init(struct pvr_device *pvr_dev)
if (err)
goto err_kccb_fini;
- /* Allocate memory for KCCB return slots. */
- pvr_dev->kccb.rtn = pvr_fw_object_create_and_map(pvr_dev, kccb_rtn_size,
- PVR_BO_FW_FLAGS_DEVICE_UNCACHED,
- NULL, NULL, &pvr_dev->kccb.rtn_obj);
- if (IS_ERR(pvr_dev->kccb.rtn)) {
- err = PTR_ERR(pvr_dev->kccb.rtn);
- goto err_fwccb_fini;
- }
-
err = pvr_fw_create_structures(pvr_dev);
if (err)
- goto err_kccb_rtn_release;
+ goto err_fwccb_fini;
err = pvr_fw_start(pvr_dev);
if (err)
@@ -1014,9 +1003,6 @@ err_fw_stop:
err_destroy_structures:
pvr_fw_destroy_structures(pvr_dev);
-err_kccb_rtn_release:
- pvr_fw_object_unmap_and_destroy(pvr_dev->kccb.rtn_obj);
-
err_fwccb_fini:
pvr_ccb_fini(&pvr_dev->fwccb);
@@ -1029,8 +1015,7 @@ err_fw_cleanup:
err_mm_takedown:
drm_mm_takedown(&fw_dev->fw_mm);
- if (fw_dev->defs->fini)
- fw_dev->defs->fini(pvr_dev);
+ fw_dev->defs->fini(pvr_dev);
return err;
}
@@ -1047,7 +1032,6 @@ pvr_fw_fini(struct pvr_device *pvr_dev)
WRITE_ONCE(fw_dev->initialised, false);
pvr_fw_destroy_structures(pvr_dev);
- pvr_fw_object_unmap_and_destroy(pvr_dev->kccb.rtn_obj);
/*
* Ensure FWCCB worker has finished executing before destroying FWCCB. The IRQ handler has
@@ -1063,8 +1047,7 @@ pvr_fw_fini(struct pvr_device *pvr_dev)
drm_mm_takedown(&fw_dev->fw_mm);
- if (fw_dev->defs->fini)
- fw_dev->defs->fini(pvr_dev);
+ fw_dev->defs->fini(pvr_dev);
}
/**
diff --git a/drivers/gpu/drm/imagination/pvr_fw.h b/drivers/gpu/drm/imagination/pvr_fw.h
index 3390c84e4fd3..4b25291135b6 100644
--- a/drivers/gpu/drm/imagination/pvr_fw.h
+++ b/drivers/gpu/drm/imagination/pvr_fw.h
@@ -86,7 +86,7 @@ struct pvr_fw_defs {
* FW processor specific finalisation.
* @pvr_dev: Target PowerVR device.
*
- * This function is optional.
+ * This function is mandatory.
*/
void (*fini)(struct pvr_device *pvr_dev);
diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c
index 9ff03bc60a08..84f568b5510f 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_meta.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c
@@ -500,18 +500,33 @@ pvr_meta_init(struct pvr_device *pvr_dev)
{
pvr_fw_heap_info_init(pvr_dev, ROGUE_FW_HEAP_META_SHIFT, 0);
+ pvr_dev->kernel_vm_ctx = pvr_vm_create_context(pvr_dev, false);
+ if (IS_ERR(pvr_dev->kernel_vm_ctx))
+ return PTR_ERR(pvr_dev->kernel_vm_ctx);
+
return 0;
}
+static void
+pvr_meta_fini(struct pvr_device *pvr_dev)
+{
+ WARN_ON(!pvr_vm_context_put(pvr_dev->kernel_vm_ctx));
+ pvr_dev->kernel_vm_ctx = NULL;
+}
+
static u32
pvr_meta_get_fw_addr_with_offset(struct pvr_fw_object *fw_obj, u32 offset)
{
u32 fw_addr = fw_obj->fw_addr_offset + offset + ROGUE_FW_SEGMMU_DATA_BASE_ADDRESS;
/* META cacheability is determined by address. */
- if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED)
+ if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED) {
fw_addr |= ROGUE_FW_SEGMMU_DATA_META_UNCACHED |
ROGUE_FW_SEGMMU_DATA_VIVT_SLC_UNCACHED;
+ } else {
+ fw_addr |= ROGUE_FW_SEGMMU_DATA_META_CACHED |
+ ROGUE_FW_SEGMMU_DATA_VIVT_SLC_CACHED;
+ }
return fw_addr;
}
@@ -550,6 +565,7 @@ pvr_meta_irq_clear(struct pvr_device *pvr_dev)
const struct pvr_fw_defs pvr_fw_defs_meta = {
.init = pvr_meta_init,
+ .fini = pvr_meta_fini,
.fw_process = pvr_meta_fw_process,
.vm_map = pvr_meta_vm_map,
.vm_unmap = pvr_meta_vm_unmap,
diff --git a/drivers/gpu/drm/imagination/pvr_fw_riscv.c b/drivers/gpu/drm/imagination/pvr_fw_riscv.c
index fc13d483be9a..cd84635bb88d 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_riscv.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_riscv.c
@@ -23,27 +23,33 @@ static int
pvr_riscv_wrapper_init(struct pvr_device *pvr_dev)
{
const u64 common_opts =
- ((u64)(ROGUE_FW_HEAP_RISCV_SIZE >> FWCORE_ADDR_REMAP_CONFIG0_SIZE_ALIGNSHIFT)
- << ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_SIZE_SHIFT) |
+ ((u64)(ROGUE_FW_HEAP_RISCV_SIZE
+ >> ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_ALIGNSHIFT)
+ << ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_SHIFT) |
((u64)MMU_CONTEXT_MAPPING_FWPRIV
- << FWCORE_ADDR_REMAP_CONFIG0_MMU_CONTEXT_SHIFT);
+ << ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_CBASE_SHIFT);
u64 code_addr = pvr_fw_obj_get_gpu_addr(pvr_dev->fw_dev.mem.code_obj);
u64 data_addr = pvr_fw_obj_get_gpu_addr(pvr_dev->fw_dev.mem.data_obj);
/* This condition allows us to OR the addresses into the register directly. */
- static_assert(ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_SHIFT ==
- ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_ALIGNSHIFT);
+ static_assert(ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_SHIFT ==
+ ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_ALIGNSHIFT);
- WARN_ON(code_addr & ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_CLRMSK);
- WARN_ON(data_addr & ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_CLRMSK);
+ WARN_ON(code_addr & ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_CLRMSK);
+ WARN_ON(data_addr & ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_CLRMSK);
- pvr_cr_write64(pvr_dev, ROGUE_RISCVFW_REGION_REMAP_CR(BOOTLDR_CODE),
- code_addr | common_opts | ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_FETCH_EN_EN);
+ pvr_cr_write64(pvr_dev,
+ PVR_CR_REPEAT_X(ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG,
+ ROGUE_RISCV_REGION_BOOTLDR_CODE),
+ code_addr | common_opts |
+ ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_FETCH_EN_EN);
- pvr_cr_write64(pvr_dev, ROGUE_RISCVFW_REGION_REMAP_CR(BOOTLDR_DATA),
+ pvr_cr_write64(pvr_dev,
+ PVR_CR_REPEAT_X(ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG,
+ ROGUE_RISCV_REGION_BOOTLDR_DATA),
data_addr | common_opts |
- ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_LOAD_STORE_EN_EN);
+ ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_LOAD_STORE_EN_EN);
/* Garten IDLE bit controlled by RISC-V. */
pvr_cr_write64(pvr_dev, ROGUE_CR_MTS_GARTEN_WRAPPER_CONFIG,
@@ -103,9 +109,20 @@ pvr_riscv_init(struct pvr_device *pvr_dev)
{
pvr_fw_heap_info_init(pvr_dev, ROGUE_FW_HEAP_RISCV_SHIFT, 0);
+ pvr_dev->kernel_vm_ctx = pvr_vm_create_context(pvr_dev, false);
+ if (IS_ERR(pvr_dev->kernel_vm_ctx))
+ return PTR_ERR(pvr_dev->kernel_vm_ctx);
+
return 0;
}
+static void
+pvr_riscv_fini(struct pvr_device *pvr_dev)
+{
+ WARN_ON(!pvr_vm_context_put(pvr_dev->kernel_vm_ctx));
+ pvr_dev->kernel_vm_ctx = NULL;
+}
+
static u32
pvr_riscv_get_fw_addr_with_offset(struct pvr_fw_object *fw_obj, u32 offset)
{
@@ -154,6 +171,7 @@ pvr_riscv_irq_clear(struct pvr_device *pvr_dev)
const struct pvr_fw_defs pvr_fw_defs_riscv = {
.init = pvr_riscv_init,
+ .fini = pvr_riscv_fini,
.fw_process = pvr_riscv_fw_process,
.vm_map = pvr_riscv_vm_map,
.vm_unmap = pvr_riscv_vm_unmap,
diff --git a/drivers/gpu/drm/imagination/pvr_fw_startstop.c b/drivers/gpu/drm/imagination/pvr_fw_startstop.c
index e24ed6fc4362..98ca2692239d 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_startstop.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_startstop.c
@@ -43,19 +43,25 @@ rogue_bif_init(struct pvr_device *pvr_dev)
pc_dma_addr = pvr_vm_get_page_table_root_addr(pvr_dev->kernel_vm_ctx);
/* Write the kernel catalogue base. */
- pc_addr = ((((u64)pc_dma_addr >> ROGUE_CR_BIF_CAT_BASE0_ADDR_ALIGNSHIFT)
- << ROGUE_CR_BIF_CAT_BASE0_ADDR_SHIFT) &
- ~ROGUE_CR_BIF_CAT_BASE0_ADDR_CLRMSK);
+ pc_addr = ((((u64)pc_dma_addr >> ROGUE_CR_BIF_CAT_BASEx_ADDR_ALIGNSHIFT)
+ << ROGUE_CR_BIF_CAT_BASEx_ADDR_SHIFT) &
+ ~ROGUE_CR_BIF_CAT_BASEx_ADDR_CLRMSK);
- pvr_cr_write64(pvr_dev, BIF_CAT_BASEX(MMU_CONTEXT_MAPPING_FWPRIV),
+ pvr_cr_write64(pvr_dev,
+ PVR_CR_REPEAT_X(ROGUE_CR_BIF_CAT_BASE,
+ MMU_CONTEXT_MAPPING_FWPRIV),
pc_addr);
if (pvr_dev->fw_dev.processor_type == PVR_FW_PROCESSOR_TYPE_RISCV) {
- pc_addr = (((u64)pc_dma_addr >> ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_ALIGNSHIFT)
- << ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_SHIFT) &
- ~ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_CLRMSK;
-
- pvr_cr_write64(pvr_dev, FWCORE_MEM_CAT_BASEX(MMU_CONTEXT_MAPPING_FWPRIV), pc_addr);
+ pc_addr = (((u64)pc_dma_addr
+ >> ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_ALIGNSHIFT)
+ << ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_SHIFT) &
+ ~ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_CLRMSK;
+
+ pvr_cr_write64(pvr_dev,
+ PVR_CR_REPEAT_X(ROGUE_CR_FWCORE_MEM_CAT_BASE,
+ MMU_CONTEXT_MAPPING_FWPRIV),
+ pc_addr);
}
}
diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index 805d9f9bc1dd..6fe478f64f02 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -101,7 +101,6 @@ tracebuf_ctrl_init(void *cpu_ptr, void *priv)
pvr_fw_object_get_fw_addr(trace_buffer->buf_obj,
&tracebuf_space->trace_buffer_fw_addr);
- tracebuf_space->trace_buffer = trace_buffer->buf;
tracebuf_space->trace_pointer = 0;
}
}
diff --git a/drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h b/drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h
index 790c97f80a2a..45d784f2a82c 100644
--- a/drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h
+++ b/drivers/gpu/drm/imagination/pvr_rogue_cr_defs.h
@@ -2344,101 +2344,48 @@
#define ROGUE_CR_ISP_STATUS_EOR_EN 0x00000001U
/* Register group: ROGUE_CR_ISP_XTP_RESUME, with 64 repeats */
-#define ROGUE_CR_ISP_XTP_RESUME_REPEATCOUNT 64U
-/* Register ROGUE_CR_ISP_XTP_RESUME0 */
-#define ROGUE_CR_ISP_XTP_RESUME0 0x3A00U
-#define ROGUE_CR_ISP_XTP_RESUME0_MASKFULL 0x00000000003FF3FFULL
-#define ROGUE_CR_ISP_XTP_RESUME0_TILE_X_SHIFT 12U
-#define ROGUE_CR_ISP_XTP_RESUME0_TILE_X_CLRMSK 0xFFC00FFFU
-#define ROGUE_CR_ISP_XTP_RESUME0_TILE_Y_SHIFT 0U
-#define ROGUE_CR_ISP_XTP_RESUME0_TILE_Y_CLRMSK 0xFFFFFC00U
+#define ROGUE_CR_ISP_XTP_RESUME_REPEAT_COUNT 64U
+#define ROGUE_CR_ISP_XTP_RESUME_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_ISP_XTP_RESUME_REPEAT_BASE 0x3A00U
+/* Register ROGUE_CR_ISP_XTP_RESUMEx */
+#define ROGUE_CR_ISP_XTP_RESUMEx_MASKFULL 0x00000000003FF3FFULL
+#define ROGUE_CR_ISP_XTP_RESUMEx_TILE_X_SHIFT 12U
+#define ROGUE_CR_ISP_XTP_RESUMEx_TILE_X_CLRMSK 0xFFC00FFFU
+#define ROGUE_CR_ISP_XTP_RESUMEx_TILE_Y_SHIFT 0U
+#define ROGUE_CR_ISP_XTP_RESUMEx_TILE_Y_CLRMSK 0xFFFFFC00U
/* Register group: ROGUE_CR_ISP_XTP_STORE, with 32 repeats */
-#define ROGUE_CR_ISP_XTP_STORE_REPEATCOUNT 32U
-/* Register ROGUE_CR_ISP_XTP_STORE0 */
-#define ROGUE_CR_ISP_XTP_STORE0 0x3C00U
-#define ROGUE_CR_ISP_XTP_STORE0_MASKFULL 0x000000007F3FF3FFULL
-#define ROGUE_CR_ISP_XTP_STORE0_ACTIVE_SHIFT 30U
-#define ROGUE_CR_ISP_XTP_STORE0_ACTIVE_CLRMSK 0xBFFFFFFFU
-#define ROGUE_CR_ISP_XTP_STORE0_ACTIVE_EN 0x40000000U
-#define ROGUE_CR_ISP_XTP_STORE0_EOR_SHIFT 29U
-#define ROGUE_CR_ISP_XTP_STORE0_EOR_CLRMSK 0xDFFFFFFFU
-#define ROGUE_CR_ISP_XTP_STORE0_EOR_EN 0x20000000U
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_LAST_SHIFT 28U
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_LAST_CLRMSK 0xEFFFFFFFU
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_LAST_EN 0x10000000U
-#define ROGUE_CR_ISP_XTP_STORE0_MT_SHIFT 24U
-#define ROGUE_CR_ISP_XTP_STORE0_MT_CLRMSK 0xF0FFFFFFU
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_X_SHIFT 12U
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_X_CLRMSK 0xFFC00FFFU
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_Y_SHIFT 0U
-#define ROGUE_CR_ISP_XTP_STORE0_TILE_Y_CLRMSK 0xFFFFFC00U
+#define ROGUE_CR_ISP_XTP_STORE_REPEAT_COUNT 32U
+#define ROGUE_CR_ISP_XTP_STORE_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_ISP_XTP_STORE_REPEAT_BASE 0x3C00U
+/* Register ROGUE_CR_ISP_XTP_STOREx */
+#define ROGUE_CR_ISP_XTP_STOREx_MASKFULL 0x000000007F3FF3FFULL
+#define ROGUE_CR_ISP_XTP_STOREx_ACTIVE_SHIFT 30U
+#define ROGUE_CR_ISP_XTP_STOREx_ACTIVE_CLRMSK 0xBFFFFFFFU
+#define ROGUE_CR_ISP_XTP_STOREx_ACTIVE_EN 0x40000000U
+#define ROGUE_CR_ISP_XTP_STOREx_EOR_SHIFT 29U
+#define ROGUE_CR_ISP_XTP_STOREx_EOR_CLRMSK 0xDFFFFFFFU
+#define ROGUE_CR_ISP_XTP_STOREx_EOR_EN 0x20000000U
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_LAST_SHIFT 28U
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_LAST_CLRMSK 0xEFFFFFFFU
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_LAST_EN 0x10000000U
+#define ROGUE_CR_ISP_XTP_STOREx_MT_SHIFT 24U
+#define ROGUE_CR_ISP_XTP_STOREx_MT_CLRMSK 0xF0FFFFFFU
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_X_SHIFT 12U
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_X_CLRMSK 0xFFC00FFFU
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_Y_SHIFT 0U
+#define ROGUE_CR_ISP_XTP_STOREx_TILE_Y_CLRMSK 0xFFFFFC00U
/* Register group: ROGUE_CR_BIF_CAT_BASE, with 8 repeats */
-#define ROGUE_CR_BIF_CAT_BASE_REPEATCOUNT 8U
-/* Register ROGUE_CR_BIF_CAT_BASE0 */
-#define ROGUE_CR_BIF_CAT_BASE0 0x1200U
-#define ROGUE_CR_BIF_CAT_BASE0_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE0_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE0_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE0_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE0_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE1 */
-#define ROGUE_CR_BIF_CAT_BASE1 0x1208U
-#define ROGUE_CR_BIF_CAT_BASE1_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE1_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE1_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE1_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE1_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE2 */
-#define ROGUE_CR_BIF_CAT_BASE2 0x1210U
-#define ROGUE_CR_BIF_CAT_BASE2_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE2_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE2_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE2_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE2_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE3 */
-#define ROGUE_CR_BIF_CAT_BASE3 0x1218U
-#define ROGUE_CR_BIF_CAT_BASE3_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE3_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE3_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE3_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE3_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE4 */
-#define ROGUE_CR_BIF_CAT_BASE4 0x1220U
-#define ROGUE_CR_BIF_CAT_BASE4_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE4_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE4_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE4_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE4_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE5 */
-#define ROGUE_CR_BIF_CAT_BASE5 0x1228U
-#define ROGUE_CR_BIF_CAT_BASE5_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE5_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE5_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE5_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE5_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE6 */
-#define ROGUE_CR_BIF_CAT_BASE6 0x1230U
-#define ROGUE_CR_BIF_CAT_BASE6_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE6_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE6_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE6_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE6_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_CAT_BASE7 */
-#define ROGUE_CR_BIF_CAT_BASE7 0x1238U
-#define ROGUE_CR_BIF_CAT_BASE7_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_BIF_CAT_BASE7_ADDR_SHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE7_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_BIF_CAT_BASE7_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_CAT_BASE7_ADDR_ALIGNSIZE 4096U
+#define ROGUE_CR_BIF_CAT_BASE_REPEAT_COUNT 8U
+#define ROGUE_CR_BIF_CAT_BASE_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_BIF_CAT_BASE_REPEAT_BASE 0x1200U
+/* Register ROGUE_CR_BIF_CAT_BASEx */
+#define ROGUE_CR_BIF_CAT_BASEx_MASKFULL 0x000000FFFFFFF000ULL
+#define ROGUE_CR_BIF_CAT_BASEx_ADDR_SHIFT 12U
+#define ROGUE_CR_BIF_CAT_BASEx_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
+#define ROGUE_CR_BIF_CAT_BASEx_ADDR_ALIGNSHIFT 12U
+#define ROGUE_CR_BIF_CAT_BASEx_ADDR_ALIGNSIZE 4096U
/* Register ROGUE_CR_BIF_CAT_BASE_INDEX */
#define ROGUE_CR_BIF_CAT_BASE_INDEX 0x1240U
@@ -2715,142 +2662,24 @@
#define ROGUE_CR_BIF_MMU_STATUS_BUSY_EN 0x00000001U
/* Register group: ROGUE_CR_BIF_TILING_CFG, with 8 repeats */
-#define ROGUE_CR_BIF_TILING_CFG_REPEATCOUNT 8U
-/* Register ROGUE_CR_BIF_TILING_CFG0 */
-#define ROGUE_CR_BIF_TILING_CFG0 0x12D8U
-#define ROGUE_CR_BIF_TILING_CFG0_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG0_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG0_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG0_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG0_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG0_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG0_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG0_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG0_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG0_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG0_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG0_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG0_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG0_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG1 */
-#define ROGUE_CR_BIF_TILING_CFG1 0x12E0U
-#define ROGUE_CR_BIF_TILING_CFG1_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG1_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG1_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG1_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG1_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG1_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG1_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG1_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG1_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG1_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG1_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG1_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG1_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG1_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG2 */
-#define ROGUE_CR_BIF_TILING_CFG2 0x12E8U
-#define ROGUE_CR_BIF_TILING_CFG2_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG2_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG2_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG2_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG2_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG2_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG2_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG2_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG2_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG2_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG2_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG2_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG2_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG2_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG3 */
-#define ROGUE_CR_BIF_TILING_CFG3 0x12F0U
-#define ROGUE_CR_BIF_TILING_CFG3_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG3_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG3_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG3_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG3_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG3_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG3_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG3_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG3_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG3_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG3_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG3_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG3_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG3_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG4 */
-#define ROGUE_CR_BIF_TILING_CFG4 0x12F8U
-#define ROGUE_CR_BIF_TILING_CFG4_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG4_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG4_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG4_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG4_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG4_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG4_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG4_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG4_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG4_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG4_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG4_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG4_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG4_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG5 */
-#define ROGUE_CR_BIF_TILING_CFG5 0x1300U
-#define ROGUE_CR_BIF_TILING_CFG5_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG5_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG5_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG5_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG5_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG5_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG5_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG5_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG5_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG5_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG5_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG5_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG5_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG5_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG6 */
-#define ROGUE_CR_BIF_TILING_CFG6 0x1308U
-#define ROGUE_CR_BIF_TILING_CFG6_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG6_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG6_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG6_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG6_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG6_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG6_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG6_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG6_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG6_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG6_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG6_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG6_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG6_MIN_ADDRESS_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_BIF_TILING_CFG7 */
-#define ROGUE_CR_BIF_TILING_CFG7 0x1310U
-#define ROGUE_CR_BIF_TILING_CFG7_MASKFULL 0xFFFFFFFF0FFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG7_XSTRIDE_SHIFT 61U
-#define ROGUE_CR_BIF_TILING_CFG7_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG7_ENABLE_SHIFT 60U
-#define ROGUE_CR_BIF_TILING_CFG7_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG7_ENABLE_EN 0x1000000000000000ULL
-#define ROGUE_CR_BIF_TILING_CFG7_MAX_ADDRESS_SHIFT 32U
-#define ROGUE_CR_BIF_TILING_CFG7_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
-#define ROGUE_CR_BIF_TILING_CFG7_MAX_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG7_MAX_ADDRESS_ALIGNSIZE 4096U
-#define ROGUE_CR_BIF_TILING_CFG7_MIN_ADDRESS_SHIFT 0U
-#define ROGUE_CR_BIF_TILING_CFG7_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
-#define ROGUE_CR_BIF_TILING_CFG7_MIN_ADDRESS_ALIGNSHIFT 12U
-#define ROGUE_CR_BIF_TILING_CFG7_MIN_ADDRESS_ALIGNSIZE 4096U
+#define ROGUE_CR_BIF_TILING_CFG_REPEAT_COUNT 8U
+#define ROGUE_CR_BIF_TILING_CFG_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_BIF_TILING_CFG_REPEAT_BASE 0x12D8U
+/* Register ROGUE_CR_BIF_TILING_CFGx */
+#define ROGUE_CR_BIF_TILING_CFGx_MASKFULL 0xFFFFFFFF0FFFFFFFULL
+#define ROGUE_CR_BIF_TILING_CFGx_XSTRIDE_SHIFT 61U
+#define ROGUE_CR_BIF_TILING_CFGx_XSTRIDE_CLRMSK 0x1FFFFFFFFFFFFFFFULL
+#define ROGUE_CR_BIF_TILING_CFGx_ENABLE_SHIFT 60U
+#define ROGUE_CR_BIF_TILING_CFGx_ENABLE_CLRMSK 0xEFFFFFFFFFFFFFFFULL
+#define ROGUE_CR_BIF_TILING_CFGx_ENABLE_EN 0x1000000000000000ULL
+#define ROGUE_CR_BIF_TILING_CFGx_MAX_ADDRESS_SHIFT 32U
+#define ROGUE_CR_BIF_TILING_CFGx_MAX_ADDRESS_CLRMSK 0xF0000000FFFFFFFFULL
+#define ROGUE_CR_BIF_TILING_CFGx_MAX_ADDRESS_ALIGNSHIFT 12U
+#define ROGUE_CR_BIF_TILING_CFGx_MAX_ADDRESS_ALIGNSIZE 4096U
+#define ROGUE_CR_BIF_TILING_CFGx_MIN_ADDRESS_SHIFT 0U
+#define ROGUE_CR_BIF_TILING_CFGx_MIN_ADDRESS_CLRMSK 0xFFFFFFFFF0000000ULL
+#define ROGUE_CR_BIF_TILING_CFGx_MIN_ADDRESS_ALIGNSHIFT 12U
+#define ROGUE_CR_BIF_TILING_CFGx_MIN_ADDRESS_ALIGNSIZE 4096U
/* Register ROGUE_CR_BIF_READS_EXT_STATUS */
#define ROGUE_CR_BIF_READS_EXT_STATUS 0x1320U
@@ -2951,102 +2780,13 @@
#define ROGUE_CR_MCU_FENCE_ADDR_ALIGNSIZE 32U
/* Register group: ROGUE_CR_SCRATCH, with 16 repeats */
-#define ROGUE_CR_SCRATCH_REPEATCOUNT 16U
-/* Register ROGUE_CR_SCRATCH0 */
-#define ROGUE_CR_SCRATCH0 0x1A00U
-#define ROGUE_CR_SCRATCH0_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH0_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH0_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH1 */
-#define ROGUE_CR_SCRATCH1 0x1A08U
-#define ROGUE_CR_SCRATCH1_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH1_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH1_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH2 */
-#define ROGUE_CR_SCRATCH2 0x1A10U
-#define ROGUE_CR_SCRATCH2_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH2_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH2_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH3 */
-#define ROGUE_CR_SCRATCH3 0x1A18U
-#define ROGUE_CR_SCRATCH3_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH3_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH3_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH4 */
-#define ROGUE_CR_SCRATCH4 0x1A20U
-#define ROGUE_CR_SCRATCH4_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH4_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH4_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH5 */
-#define ROGUE_CR_SCRATCH5 0x1A28U
-#define ROGUE_CR_SCRATCH5_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH5_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH5_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH6 */
-#define ROGUE_CR_SCRATCH6 0x1A30U
-#define ROGUE_CR_SCRATCH6_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH6_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH6_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH7 */
-#define ROGUE_CR_SCRATCH7 0x1A38U
-#define ROGUE_CR_SCRATCH7_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH7_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH7_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH8 */
-#define ROGUE_CR_SCRATCH8 0x1A40U
-#define ROGUE_CR_SCRATCH8_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH8_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH8_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH9 */
-#define ROGUE_CR_SCRATCH9 0x1A48U
-#define ROGUE_CR_SCRATCH9_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH9_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH9_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH10 */
-#define ROGUE_CR_SCRATCH10 0x1A50U
-#define ROGUE_CR_SCRATCH10_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH10_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH10_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH11 */
-#define ROGUE_CR_SCRATCH11 0x1A58U
-#define ROGUE_CR_SCRATCH11_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH11_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH11_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH12 */
-#define ROGUE_CR_SCRATCH12 0x1A60U
-#define ROGUE_CR_SCRATCH12_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH12_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH12_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH13 */
-#define ROGUE_CR_SCRATCH13 0x1A68U
-#define ROGUE_CR_SCRATCH13_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH13_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH13_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH14 */
-#define ROGUE_CR_SCRATCH14 0x1A70U
-#define ROGUE_CR_SCRATCH14_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH14_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH14_DATA_CLRMSK 0x00000000U
-
-/* Register ROGUE_CR_SCRATCH15 */
-#define ROGUE_CR_SCRATCH15 0x1A78U
-#define ROGUE_CR_SCRATCH15_MASKFULL 0x00000000FFFFFFFFULL
-#define ROGUE_CR_SCRATCH15_DATA_SHIFT 0U
-#define ROGUE_CR_SCRATCH15_DATA_CLRMSK 0x00000000U
+#define ROGUE_CR_SCRATCH_REPEAT_COUNT 16U
+#define ROGUE_CR_SCRATCH_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_SCRATCH_REPEAT_BASE 0x1A00U
+/* Register ROGUE_CR_SCRATCHx */
+#define ROGUE_CR_SCRATCHx_MASKFULL 0x00000000FFFFFFFFULL
+#define ROGUE_CR_SCRATCHx_DATA_SHIFT 0U
+#define ROGUE_CR_SCRATCHx_DATA_CLRMSK 0x00000000U
/* Register group: ROGUE_CR_OS0_SCRATCH, with 2 repeats */
#define ROGUE_CR_OS0_SCRATCH_REPEATCOUNT 2U
@@ -3273,342 +3013,30 @@
#define ROGUE_CR_SPFILTER_SIGNAL_DESCR_MIN_ADDR_ALIGNSIZE 16U
/* Register group: ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG, with 16 repeats */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG_REPEATCOUNT 16U
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0 0x3000U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1 0x3008U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG1_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2 0x3010U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG2_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3 0x3018U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG3_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4 0x3020U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG4_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5 0x3028U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG5_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6 0x3030U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG6_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7 0x3038U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG7_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8 0x3040U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG8_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9 0x3048U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG9_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10 0x3050U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG10_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11 0x3058U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG11_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12 0x3060U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG12_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13 0x3068U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG13_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14 0x3070U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG14_DEVVADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15 */
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15 0x3078U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_MASKFULL 0x7FFFF7FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_TRUSTED_SHIFT 62U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_TRUSTED_EN 0x4000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_LOAD_STORE_EN_SHIFT 61U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_LOAD_STORE_EN_EN 0x2000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_FETCH_EN_SHIFT 60U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_FETCH_EN_EN 0x1000000000000000ULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_SIZE_SHIFT 44U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_CBASE_SHIFT 40U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_DEVVADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_DEVVADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG15_DEVVADDR_ALIGNSIZE 4096U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG_REPEAT_COUNT 16U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG_REPEAT_BASE 0x3000U
+/* Register ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx */
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_MASKFULL 0x7FFFF7FFFFFFF000ULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_TRUSTED_SHIFT 62U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_TRUSTED_CLRMSK 0xBFFFFFFFFFFFFFFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_TRUSTED_EN 0x4000000000000000ULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_LOAD_STORE_EN_SHIFT 61U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_LOAD_STORE_EN_CLRMSK 0xDFFFFFFFFFFFFFFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_LOAD_STORE_EN_EN 0x2000000000000000ULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_FETCH_EN_SHIFT 60U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_FETCH_EN_CLRMSK 0xEFFFFFFFFFFFFFFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_FETCH_EN_EN 0x1000000000000000ULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_SHIFT 44U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_CLRMSK 0xF0000FFFFFFFFFFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_ALIGNSHIFT 12U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_SIZE_ALIGNSIZE 4096U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_CBASE_SHIFT 40U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_CBASE_CLRMSK 0xFFFFF8FFFFFFFFFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_SHIFT 12U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_CLRMSK 0xFFFFFF0000000FFFULL
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_ALIGNSHIFT 12U
+#define ROGUE_CR_FWCORE_ADDR_REMAP_CONFIGx_DEVVADDR_ALIGNSIZE 4096U
/* Register ROGUE_CR_FWCORE_BOOT */
#define ROGUE_CR_FWCORE_BOOT 0x3090U
@@ -3726,70 +3154,15 @@
#define ROGUE_CR_FWCORE_WRAPPER_FENCE_ID_EN 0x00000001U
/* Register group: ROGUE_CR_FWCORE_MEM_CAT_BASE, with 8 repeats */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE_REPEATCOUNT 8U
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE0 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0 0x30F0U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE0_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE1 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1 0x30F8U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE1_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE2 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2 0x3100U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE2_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE3 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3 0x3108U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE3_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE4 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4 0x3110U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE4_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE5 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5 0x3118U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE5_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE6 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6 0x3120U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE6_ADDR_ALIGNSIZE 4096U
-
-/* Register ROGUE_CR_FWCORE_MEM_CAT_BASE7 */
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7 0x3128U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7_MASKFULL 0x000000FFFFFFF000ULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7_ADDR_SHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7_ADDR_ALIGNSHIFT 12U
-#define ROGUE_CR_FWCORE_MEM_CAT_BASE7_ADDR_ALIGNSIZE 4096U
+#define ROGUE_CR_FWCORE_MEM_CAT_BASE_REPEAT_COUNT 8U
+#define ROGUE_CR_FWCORE_MEM_CAT_BASE_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_MEM_CAT_BASE_REPEAT_BASE 0x30F0U
+/* Register ROGUE_CR_FWCORE_MEM_CAT_BASEx */
+#define ROGUE_CR_FWCORE_MEM_CAT_BASEx_MASKFULL 0x000000FFFFFFF000ULL
+#define ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_SHIFT 12U
+#define ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_CLRMSK 0xFFFFFF0000000FFFULL
+#define ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_ALIGNSHIFT 12U
+#define ROGUE_CR_FWCORE_MEM_CAT_BASEx_ADDR_ALIGNSIZE 4096U
/* Register ROGUE_CR_FWCORE_WDT_RESET */
#define ROGUE_CR_FWCORE_WDT_RESET 0x3130U
@@ -3816,22 +3189,11 @@
#define ROGUE_CR_FWCORE_WDT_COUNT_VALUE_CLRMSK 0x00000000U
/* Register group: ROGUE_CR_FWCORE_DMI_RESERVED0, with 4 repeats */
-#define ROGUE_CR_FWCORE_DMI_RESERVED0_REPEATCOUNT 4U
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED00 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED00 0x3400U
-#define ROGUE_CR_FWCORE_DMI_RESERVED00_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED01 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED01 0x3408U
-#define ROGUE_CR_FWCORE_DMI_RESERVED01_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED02 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED02 0x3410U
-#define ROGUE_CR_FWCORE_DMI_RESERVED02_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED03 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED03 0x3418U
-#define ROGUE_CR_FWCORE_DMI_RESERVED03_MASKFULL 0x0000000000000000ULL
+#define ROGUE_CR_FWCORE_DMI_RESERVED0_REPEAT_COUNT 4U
+#define ROGUE_CR_FWCORE_DMI_RESERVED0_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_DMI_RESERVED0_REPEAT_BASE 0x3400U
+/* Register ROGUE_CR_FWCORE_DMI_RESERVED0x */
+#define ROGUE_CR_FWCORE_DMI_RESERVED0x_MASKFULL 0x0000000000000000ULL
/* Register ROGUE_CR_FWCORE_DMI_DATA0 */
#define ROGUE_CR_FWCORE_DMI_DATA0 0x3420U
@@ -3842,26 +3204,11 @@
#define ROGUE_CR_FWCORE_DMI_DATA1_MASKFULL 0x0000000000000000ULL
/* Register group: ROGUE_CR_FWCORE_DMI_RESERVED1, with 5 repeats */
-#define ROGUE_CR_FWCORE_DMI_RESERVED1_REPEATCOUNT 5U
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED10 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED10 0x3430U
-#define ROGUE_CR_FWCORE_DMI_RESERVED10_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED11 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED11 0x3438U
-#define ROGUE_CR_FWCORE_DMI_RESERVED11_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED12 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED12 0x3440U
-#define ROGUE_CR_FWCORE_DMI_RESERVED12_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED13 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED13 0x3448U
-#define ROGUE_CR_FWCORE_DMI_RESERVED13_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED14 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED14 0x3450U
-#define ROGUE_CR_FWCORE_DMI_RESERVED14_MASKFULL 0x0000000000000000ULL
+#define ROGUE_CR_FWCORE_DMI_RESERVED1_REPEAT_COUNT 5U
+#define ROGUE_CR_FWCORE_DMI_RESERVED1_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_DMI_RESERVED1_REPEAT_BASE 0x3430U
+/* Register ROGUE_CR_FWCORE_DMI_RESERVED1x */
+#define ROGUE_CR_FWCORE_DMI_RESERVED1x_MASKFULL 0x0000000000000000ULL
/* Register ROGUE_CR_FWCORE_DMI_DMCONTROL */
#define ROGUE_CR_FWCORE_DMI_DMCONTROL 0x3480U
@@ -3872,22 +3219,11 @@
#define ROGUE_CR_FWCORE_DMI_DMSTATUS_MASKFULL 0x0000000000000000ULL
/* Register group: ROGUE_CR_FWCORE_DMI_RESERVED2, with 4 repeats */
-#define ROGUE_CR_FWCORE_DMI_RESERVED2_REPEATCOUNT 4U
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED20 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED20 0x3490U
-#define ROGUE_CR_FWCORE_DMI_RESERVED20_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED21 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED21 0x3498U
-#define ROGUE_CR_FWCORE_DMI_RESERVED21_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED22 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED22 0x34A0U
-#define ROGUE_CR_FWCORE_DMI_RESERVED22_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED23 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED23 0x34A8U
-#define ROGUE_CR_FWCORE_DMI_RESERVED23_MASKFULL 0x0000000000000000ULL
+#define ROGUE_CR_FWCORE_DMI_RESERVED2_REPEAT_COUNT 4U
+#define ROGUE_CR_FWCORE_DMI_RESERVED2_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_DMI_RESERVED2_REPEAT_BASE 0x3490U
+/* Register ROGUE_CR_FWCORE_DMI_RESERVED2x */
+#define ROGUE_CR_FWCORE_DMI_RESERVED2x_MASKFULL 0x0000000000000000ULL
/* Register ROGUE_CR_FWCORE_DMI_ABSTRACTCS */
#define ROGUE_CR_FWCORE_DMI_ABSTRACTCS 0x34B0U
@@ -3906,32 +3242,18 @@
#define ROGUE_CR_FWCORE_DMI_SBADDRESS0_MASKFULL 0x0000000000000000ULL
/* Register group: ROGUE_CR_FWCORE_DMI_RESERVED3, with 2 repeats */
-#define ROGUE_CR_FWCORE_DMI_RESERVED3_REPEATCOUNT 2U
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED30 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED30 0x34D0U
-#define ROGUE_CR_FWCORE_DMI_RESERVED30_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_RESERVED31 */
-#define ROGUE_CR_FWCORE_DMI_RESERVED31 0x34D8U
-#define ROGUE_CR_FWCORE_DMI_RESERVED31_MASKFULL 0x0000000000000000ULL
+#define ROGUE_CR_FWCORE_DMI_RESERVED3_REPEAT_COUNT 2U
+#define ROGUE_CR_FWCORE_DMI_RESERVED3_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_DMI_RESERVED3_REPEAT_BASE 0x34D0U
+/* Register ROGUE_CR_FWCORE_DMI_RESERVED3x */
+#define ROGUE_CR_FWCORE_DMI_RESERVED3x_MASKFULL 0x0000000000000000ULL
/* Register group: ROGUE_CR_FWCORE_DMI_SBDATA, with 4 repeats */
-#define ROGUE_CR_FWCORE_DMI_SBDATA_REPEATCOUNT 4U
-/* Register ROGUE_CR_FWCORE_DMI_SBDATA0 */
-#define ROGUE_CR_FWCORE_DMI_SBDATA0 0x35E0U
-#define ROGUE_CR_FWCORE_DMI_SBDATA0_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_SBDATA1 */
-#define ROGUE_CR_FWCORE_DMI_SBDATA1 0x35E8U
-#define ROGUE_CR_FWCORE_DMI_SBDATA1_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_SBDATA2 */
-#define ROGUE_CR_FWCORE_DMI_SBDATA2 0x35F0U
-#define ROGUE_CR_FWCORE_DMI_SBDATA2_MASKFULL 0x0000000000000000ULL
-
-/* Register ROGUE_CR_FWCORE_DMI_SBDATA3 */
-#define ROGUE_CR_FWCORE_DMI_SBDATA3 0x35F8U
-#define ROGUE_CR_FWCORE_DMI_SBDATA3_MASKFULL 0x0000000000000000ULL
+#define ROGUE_CR_FWCORE_DMI_SBDATA_REPEAT_COUNT 4U
+#define ROGUE_CR_FWCORE_DMI_SBDATA_REPEAT_OFFSET 0x0008U
+#define ROGUE_CR_FWCORE_DMI_SBDATA_REPEAT_BASE 0x35E0U
+/* Register ROGUE_CR_FWCORE_DMI_SBDATAx */
+#define ROGUE_CR_FWCORE_DMI_SBDATAx_MASKFULL 0x0000000000000000ULL
/* Register ROGUE_CR_FWCORE_DMI_HALTSUM0 */
#define ROGUE_CR_FWCORE_DMI_HALTSUM0 0x3600U
diff --git a/drivers/gpu/drm/imagination/pvr_rogue_defs.h b/drivers/gpu/drm/imagination/pvr_rogue_defs.h
index 932b01686008..f09ab85e590a 100644
--- a/drivers/gpu/drm/imagination/pvr_rogue_defs.h
+++ b/drivers/gpu/drm/imagination/pvr_rogue_defs.h
@@ -93,26 +93,8 @@
#define MMU_CONTEXT_MAPPING_FWPRIV (0x0) /* FW code/private data */
#define MMU_CONTEXT_MAPPING_FWIF (0x0) /* Host/FW data */
-/*
- * Utility macros to calculate CAT_BASE register addresses
- */
-#define BIF_CAT_BASEX(n) \
- (ROGUE_CR_BIF_CAT_BASE0 + \
- (n) * (ROGUE_CR_BIF_CAT_BASE1 - ROGUE_CR_BIF_CAT_BASE0))
-
-#define FWCORE_MEM_CAT_BASEX(n) \
- (ROGUE_CR_FWCORE_MEM_CAT_BASE0 + \
- (n) * (ROGUE_CR_FWCORE_MEM_CAT_BASE1 - \
- ROGUE_CR_FWCORE_MEM_CAT_BASE0))
-
-/*
- * FWCORE wrapper register defines
- */
-#define FWCORE_ADDR_REMAP_CONFIG0_MMU_CONTEXT_SHIFT \
- ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_CBASE_SHIFT
-#define FWCORE_ADDR_REMAP_CONFIG0_MMU_CONTEXT_CLRMSK \
- ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0_CBASE_CLRMSK
-#define FWCORE_ADDR_REMAP_CONFIG0_SIZE_ALIGNSHIFT (12U)
+/* Utility macro for accessing instances of repeated registers */
+#define PVR_CR_REPEAT_X(REG, N) ((REG##_REPEAT_BASE) + (N) * (REG##_REPEAT_OFFSET))
#define ROGUE_MAX_COMPUTE_SHARED_REGISTERS (2 * 1024)
#define ROGUE_MAX_VERTEX_SHARED_REGISTERS 1024
diff --git a/drivers/gpu/drm/imagination/pvr_rogue_riscv.h b/drivers/gpu/drm/imagination/pvr_rogue_riscv.h
index 9a070e24fa6a..d971729e18a4 100644
--- a/drivers/gpu/drm/imagination/pvr_rogue_riscv.h
+++ b/drivers/gpu/drm/imagination/pvr_rogue_riscv.h
@@ -35,7 +35,5 @@ enum rogue_riscvfw_region {
};
#define ROGUE_RISCVFW_REGION_BASE(r) ((u32)(ROGUE_RISCV_REGION_##r) << ROGUE_RISCVFW_REGION_SHIFT)
-#define ROGUE_RISCVFW_REGION_REMAP_CR(r) \
- (ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0 + (u32)(ROGUE_RISCV_REGION_##r) * 8U)
#endif /* PVR_ROGUE_RISCV_H */
diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c
index 50c90cf84a9a..d1d01f3d8ab4 100644
--- a/drivers/gpu/drm/mcde/mcde_display.c
+++ b/drivers/gpu/drm/mcde/mcde_display.c
@@ -1508,7 +1508,7 @@ static int mcde_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomi
}
static const struct drm_crtc_funcs mcde_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index ca5e4e560cde..5832dc25d6bf 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -1261,6 +1261,8 @@ void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)
for (i = 0; i < ARRAY_SIZE(adreno_gpu->info->fw); i++)
release_firmware(adreno_gpu->fw[i]);
+ pm_runtime_dont_use_autosuspend(&gpu->pdev->dev);
+
if (priv && pm_runtime_enabled(&priv->gpu_pdev->dev))
pm_runtime_disable(&priv->gpu_pdev->dev);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 36a497f1d6c1..e8729fe1cfef 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -118,6 +118,7 @@ static inline void dpu_hw_ctl_clear_pending_flush(struct dpu_hw_ctl *ctx)
ctx->pending_intf_flush_mask = 0;
ctx->pending_wb_flush_mask = 0;
ctx->pending_cwb_flush_mask = 0;
+ ctx->pending_periph_flush_mask = 0;
ctx->pending_merge_3d_flush_mask = 0;
ctx->pending_dsc_flush_mask = 0;
ctx->pending_cdm_flush_mask = 0;
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index bc646d172abe..4dcbd9b99d06 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -756,6 +756,7 @@ enum drm_mode_status msm_dp_display_mode_valid(struct msm_dp *dp,
struct msm_dp_link_info *link_info;
u32 mode_rate_khz = 0, supported_rate_khz = 0, mode_bpp = 0;
int mode_pclk_khz = mode->clock;
+ int link_pclk_khz;
bool is_yuv_420;
if (!dp || !mode_pclk_khz || !dp->connector) {
@@ -775,6 +776,8 @@ enum drm_mode_status msm_dp_display_mode_valid(struct msm_dp *dp,
if (is_yuv_420 && !msm_dp_display->panel->vsc_sdp_supported)
return MODE_NO_420;
+ link_pclk_khz = is_yuv_420 ? mode_pclk_khz / 2 : mode_pclk_khz;
+
if (is_yuv_420 || msm_dp_display->wide_bus_supported)
mode_pclk_khz /= 2;
@@ -786,9 +789,9 @@ enum drm_mode_status msm_dp_display_mode_valid(struct msm_dp *dp,
mode_bpp = default_bpp;
mode_bpp = msm_dp_panel_get_mode_bpp(msm_dp_display->panel,
- mode_bpp, mode_pclk_khz);
+ mode_bpp, link_pclk_khz);
- mode_rate_khz = mode_pclk_khz * mode_bpp;
+ mode_rate_khz = link_pclk_khz * mode_bpp;
supported_rate_khz = link_info->num_lanes * link_info->rate * 8;
if (mode_rate_khz > supported_rate_khz)
@@ -1458,6 +1461,20 @@ void msm_dp_display_atomic_disable(struct msm_dp *dp)
msm_dp_display = container_of(dp, struct msm_dp_display_private, msm_dp_display);
+ /*
+ * If .atomic_enable() bailed out - link training failure is the common
+ * case - the mainlink was never brought up and ->power_on stayed false.
+ * Driving the PUSH_IDLE pattern into a controller that was never
+ * enabled times out, and .atomic_post_disable() then drops the
+ * controller's runtime-PM reference without tearing the PHY back down,
+ * because msm_dp_display_disable() returns early on !power_on. On
+ * glymur (Snapdragon X2 Elite) that combination is answered by a
+ * TrustZone-level SOCCP/ADSP force-stop and a silent SoC reset.
+ * There is nothing to push idle, so leave it alone.
+ */
+ if (!dp->power_on)
+ return;
+
msm_dp_ctrl_push_idle(msm_dp_display->ctrl);
}
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 7e4e3718b536..b292dfd266d1 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -129,7 +129,7 @@ struct msm_dsi_host {
struct clk *dsi_pll_pixel_clk;
unsigned long byte_clk_rate;
- unsigned long byte_intf_clk_rate;
+ bool byte_intf_clk_div_2;
unsigned long pixel_clk_rate;
unsigned long esc_clk_rate;
@@ -382,8 +382,20 @@ int msm_dsi_runtime_resume(struct device *dev)
int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host)
{
+ unsigned long byte_intf_clk_rate;
+ long rounded_byte_clk_rate;
int ret;
+ rounded_byte_clk_rate = clk_round_rate(msm_host->byte_clk,
+ msm_host->byte_clk_rate);
+ if (rounded_byte_clk_rate < 0) {
+ pr_err("%s: failed to round byte clock rate, %ld\n",
+ __func__, rounded_byte_clk_rate);
+ return rounded_byte_clk_rate;
+ }
+
+ msm_host->byte_clk_rate = rounded_byte_clk_rate;
+
DBG("Set clk rates: pclk=%lu, byteclk=%lu",
msm_host->pixel_clk_rate, msm_host->byte_clk_rate);
@@ -401,7 +413,11 @@ int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host)
}
if (msm_host->byte_intf_clk) {
- ret = clk_set_rate(msm_host->byte_intf_clk, msm_host->byte_intf_clk_rate);
+ byte_intf_clk_rate = msm_host->byte_clk_rate;
+ if (msm_host->byte_intf_clk_div_2)
+ byte_intf_clk_rate /= 2;
+
+ ret = clk_set_rate(msm_host->byte_intf_clk, byte_intf_clk_rate);
if (ret) {
pr_err("%s: Failed to set rate byte intf clk, %d\n",
__func__, ret);
@@ -669,24 +685,12 @@ static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
{
- long rounded_byte_clk_rate;
-
if (!msm_host->mode) {
pr_err("%s: mode not set\n", __func__);
return -EINVAL;
}
dsi_calc_pclk(msm_host, is_bonded_dsi);
-
- rounded_byte_clk_rate = clk_round_rate(msm_host->byte_clk,
- msm_host->byte_clk_rate);
- if (rounded_byte_clk_rate < 0) {
- pr_err("%s: failed to round byte clock rate, %ld\n",
- __func__, rounded_byte_clk_rate);
- return rounded_byte_clk_rate;
- }
-
- msm_host->byte_clk_rate = rounded_byte_clk_rate;
msm_host->esc_clk_rate = clk_get_rate(msm_host->esc_clk);
return 0;
}
@@ -2495,9 +2499,7 @@ int msm_dsi_host_power_on(struct mipi_dsi_host *host,
goto unlock_ret;
}
- msm_host->byte_intf_clk_rate = msm_host->byte_clk_rate;
- if (phy_shared_timings->byte_intf_clk_div_2)
- msm_host->byte_intf_clk_rate /= 2;
+ msm_host->byte_intf_clk_div_2 = phy_shared_timings->byte_intf_clk_div_2;
msm_dsi_sfpb_config(msm_host, true);
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
index eb1088755cb3..77dce35cd45e 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
@@ -168,13 +168,13 @@ static int msm_hdmi_phy_probe(struct platform_device *pdev)
ret = msm_hdmi_phy_resource_enable(phy);
if (ret)
- return ret;
+ goto err_pm_disable;
ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type);
if (ret) {
DRM_DEV_ERROR(dev, "couldn't init PLL\n");
msm_hdmi_phy_resource_disable(phy);
- return ret;
+ goto err_pm_disable;
}
msm_hdmi_phy_resource_disable(phy);
@@ -182,6 +182,10 @@ static int msm_hdmi_phy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, phy);
return 0;
+
+err_pm_disable:
+ pm_runtime_disable(dev);
+ return ret;
}
static void msm_hdmi_phy_remove(struct platform_device *pdev)
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index 89ca9da3e1f2..dd6d6c507d77 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -155,6 +155,7 @@ int msm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
helper->fb = buffer->fb;
fbi->fbops = &msm_fb_ops;
+ fbi->flags |= FBINFO_VIRTFB; /* system memory */
drm_fb_helper_fill_info(fbi, helper, sizes);
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
index 8e5d662c23c8..1a22bbfa135a 100644
--- a/drivers/gpu/drm/pl111/pl111_display.c
+++ b/drivers/gpu/drm/pl111/pl111_display.c
@@ -470,7 +470,7 @@ static int pl111_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atom
}
static struct drm_crtc_funcs pl111_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 268d4993a04f..aab3353945de 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -246,6 +246,7 @@ enum {
BIASEXTR_127_7,
};
+struct dw_mipi_dsi_rockchip;
struct rockchip_dw_dsi_chip_data {
u32 reg;
@@ -261,12 +262,16 @@ struct rockchip_dw_dsi_chip_data {
u32 lanecfg2_grf_reg;
u32 lanecfg2;
+ int (*dphy_get_timing)(struct dw_mipi_dsi_rockchip *dsi, unsigned int lane_mbps,
+ struct dw_mipi_dsi_dphy_timing *timing);
+
int (*dphy_rx_init)(struct phy *phy);
int (*dphy_rx_power_on)(struct phy *phy);
int (*dphy_rx_power_off)(struct phy *phy);
unsigned int flags;
unsigned int max_data_lanes;
+ unsigned long max_bit_rate_per_lane;
};
struct dw_mipi_dsi_rockchip {
@@ -564,7 +569,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
int bpp;
unsigned long mpclk, tmp;
unsigned int target_mbps = 1000;
- unsigned int max_mbps = dppa_map[ARRAY_SIZE(dppa_map) - 1].max_mbps;
+ unsigned int max_mbps;
unsigned long best_freq = 0;
unsigned long fvco_min, fvco_max, fin, fout;
unsigned int min_prediv, max_prediv;
@@ -572,6 +577,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
unsigned long _fbdiv, best_fbdiv;
unsigned long min_delta = ULONG_MAX;
+ max_mbps = dsi->cdata->max_bit_rate_per_lane / USEC_PER_SEC;
dsi->format = format;
bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
if (bpp < 0) {
@@ -585,7 +591,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
if (mpclk) {
/* take 1 / 0.8, since mbps must big than bandwidth of RGB */
tmp = mpclk * (bpp / lanes) * 10 / 8;
- if (tmp < max_mbps)
+ if (tmp <= max_mbps)
target_mbps = tmp;
else
DRM_DEV_ERROR(dsi->dev,
@@ -718,8 +724,9 @@ static struct hstt hstt_table[] = {
};
static int
-dw_mipi_dsi_phy_get_timing(void *priv_data, unsigned int lane_mbps,
- struct dw_mipi_dsi_dphy_timing *timing)
+dw_mipi_dsi_phy_rk3288_get_timing(struct dw_mipi_dsi_rockchip *dsi,
+ unsigned int lane_mbps,
+ struct dw_mipi_dsi_dphy_timing *timing)
{
int i;
@@ -735,6 +742,35 @@ dw_mipi_dsi_phy_get_timing(void *priv_data, unsigned int lane_mbps,
return 0;
}
+static const struct dw_mipi_dsi_dphy_timing dphy_timing_px30 = {
+ .clk_lp2hs = 0x40,
+ .clk_hs2lp = 0x40,
+ .data_lp2hs = 0x10,
+ .data_hs2lp = 0x14,
+};
+
+static int
+dw_mipi_dsi_phy_px30_get_timing(struct dw_mipi_dsi_rockchip *dsi,
+ unsigned int lane_mbps,
+ struct dw_mipi_dsi_dphy_timing *timing)
+{
+ *timing = dphy_timing_px30;
+
+ return 0;
+}
+
+static int
+dw_mipi_dsi_phy_get_timing(void *priv_data, unsigned int lane_mbps,
+ struct dw_mipi_dsi_dphy_timing *timing)
+{
+ struct dw_mipi_dsi_rockchip *dsi = priv_data;
+
+ if (dsi->cdata->dphy_get_timing)
+ return dsi->cdata->dphy_get_timing(dsi, lane_mbps, timing);
+
+ return dw_mipi_dsi_phy_px30_get_timing(dsi, lane_mbps, timing);
+}
+
static const struct dw_mipi_dsi_phy_ops dw_mipi_dsi_rockchip_phy_ops = {
.init = dw_mipi_dsi_phy_init,
.power_on = dw_mipi_dsi_phy_power_on,
@@ -1508,6 +1544,8 @@ static const struct rockchip_dw_dsi_chip_data px30_chip_data[] = {
PX30_DSI_FORCETXSTOPMODE), 0),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1000000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
@@ -1520,6 +1558,8 @@ static const struct rockchip_dw_dsi_chip_data rk3128_chip_data[] = {
RK3128_DSI_FORCERXMODE |
RK3128_DSI_FORCETXSTOPMODE), 0),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1000000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
@@ -1532,6 +1572,8 @@ static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = {
.lcdsel_lit = FIELD_PREP_WM16_CONST(RK3288_DSI0_LCDC_SEL, 1),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1500000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_rk3288_get_timing,
},
{
.reg = 0xff964000,
@@ -1540,6 +1582,8 @@ static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = {
.lcdsel_lit = FIELD_PREP_WM16_CONST(RK3288_DSI1_LCDC_SEL, 1),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1500000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_rk3288_get_timing,
},
{ /* sentinel */ }
};
@@ -1552,6 +1596,8 @@ static const struct rockchip_dw_dsi_chip_data rk3368_chip_data[] = {
RK3368_DSI_FORCETXSTOPMODE |
RK3368_DSI_FORCERXMODE), 0),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1500000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
@@ -1639,6 +1685,8 @@ static const struct rockchip_dw_dsi_chip_data rk3399_chip_data[] = {
.flags = DW_MIPI_NEEDS_PHY_CFG_CLK | DW_MIPI_NEEDS_GRF_CLK,
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1500000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_rk3288_get_timing,
},
{
.reg = 0xff968000,
@@ -1663,10 +1711,12 @@ static const struct rockchip_dw_dsi_chip_data rk3399_chip_data[] = {
.flags = DW_MIPI_NEEDS_PHY_CFG_CLK | DW_MIPI_NEEDS_GRF_CLK,
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1500000000UL,
.dphy_rx_init = rk3399_dphy_tx1rx1_init,
.dphy_rx_power_on = rk3399_dphy_tx1rx1_power_on,
.dphy_rx_power_off = rk3399_dphy_tx1rx1_power_off,
+ .dphy_get_timing = dw_mipi_dsi_phy_rk3288_get_timing,
},
{ /* sentinel */ }
};
@@ -1679,6 +1729,8 @@ static const struct rockchip_dw_dsi_chip_data rk3506_chip_data[] = {
FIELD_PREP_WM16_CONST(RK3506_DSI_FORCERXMODE, 0) |
FIELD_PREP_WM16_CONST(RK3506_DSI_FORCETXSTOPMODE, 0)),
.max_data_lanes = 2,
+ .max_bit_rate_per_lane = 1500000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
@@ -1692,6 +1744,8 @@ static const struct rockchip_dw_dsi_chip_data rk3568_chip_data[] = {
FIELD_PREP_WM16_CONST(RK3568_DSI0_TURNDISABLE, 0) |
FIELD_PREP_WM16_CONST(RK3568_DSI0_FORCERXMODE, 0)),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1200000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{
.reg = 0xfe070000,
@@ -1701,6 +1755,8 @@ static const struct rockchip_dw_dsi_chip_data rk3568_chip_data[] = {
FIELD_PREP_WM16_CONST(RK3568_DSI1_TURNDISABLE, 0) |
FIELD_PREP_WM16_CONST(RK3568_DSI1_FORCERXMODE, 0)),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1200000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
@@ -1713,6 +1769,8 @@ static const struct rockchip_dw_dsi_chip_data rv1126_chip_data[] = {
FIELD_PREP_WM16_CONST(RV1126_DSI_FORCERXMODE, 0) |
FIELD_PREP_WM16_CONST(RV1126_DSI_FORCETXSTOPMODE, 0)),
.max_data_lanes = 4,
+ .max_bit_rate_per_lane = 1000000000UL,
+ .dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
},
{ /* sentinel */ }
};
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
index bf97508a45b9..e4069fcb0272 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -563,9 +563,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity)
*/
smp_wmb();
+ spin_lock(&entity->lock);
spsc_queue_pop(&entity->job_queue);
-
drm_sched_rq_pop_entity(entity);
+ spin_unlock(&entity->lock);
/* Jobs and entities might have different lifecycles. Since we're
* removing the job from the entities queue, set the jobs entity pointer
@@ -651,6 +652,9 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
* Make sure to set the submit_ts first, to avoid a race.
*/
sched_job->submit_ts = submit_ts = ktime_get();
+
+ spin_lock(&entity->lock);
+
first = spsc_queue_push(&entity->job_queue, &sched_job->queue_node);
/* first job wakes up scheduler */
@@ -661,5 +665,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
if (sched)
drm_sched_wakeup(sched);
}
+
+ spin_unlock(&entity->lock);
}
EXPORT_SYMBOL(drm_sched_entity_push_job);
diff --git a/drivers/gpu/drm/scheduler/sched_rq.c b/drivers/gpu/drm/scheduler/sched_rq.c
index 0464d324d98d..23f46ec610e7 100644
--- a/drivers/gpu/drm/scheduler/sched_rq.c
+++ b/drivers/gpu/drm/scheduler/sched_rq.c
@@ -257,19 +257,17 @@ static ktime_t drm_sched_entity_get_job_ts(struct drm_sched_entity *entity)
struct drm_gpu_scheduler *
drm_sched_rq_add_entity(struct drm_sched_entity *entity, ktime_t ts)
{
+ struct drm_sched_rq *rq = entity->rq;
struct drm_gpu_scheduler *sched;
- struct drm_sched_rq *rq;
/* Add the entity to the run queue */
- spin_lock(&entity->lock);
- if (entity->stopped) {
- spin_unlock(&entity->lock);
+ lockdep_assert_held(&entity->lock);
+ if (entity->stopped) {
DRM_ERROR("Trying to push to a killed entity\n");
return NULL;
}
- rq = entity->rq;
spin_lock(&rq->lock);
sched = rq->sched;
@@ -289,7 +287,6 @@ drm_sched_rq_add_entity(struct drm_sched_entity *entity, ktime_t ts)
drm_sched_rq_update_fifo_locked(entity, rq, ts);
spin_unlock(&rq->lock);
- spin_unlock(&entity->lock);
return sched;
}
@@ -343,16 +340,17 @@ drm_sched_rq_next_rr_ts(struct drm_sched_rq *rq,
*/
void drm_sched_rq_pop_entity(struct drm_sched_entity *entity)
{
+ struct drm_sched_rq *rq = entity->rq;
struct drm_sched_job *next_job;
- struct drm_sched_rq *rq;
+
+ lockdep_assert_held(&entity->lock);
+
+ spin_lock(&rq->lock);
/*
* Update the entity's location in the min heap according to
* the timestamp of the next job, if any.
*/
- spin_lock(&entity->lock);
- rq = entity->rq;
- spin_lock(&rq->lock);
next_job = drm_sched_entity_queue_peek(entity);
if (next_job) {
ktime_t ts;
@@ -375,8 +373,8 @@ void drm_sched_rq_pop_entity(struct drm_sched_entity *entity)
drm_sched_entity_save_vruntime(entity, min_vruntime);
}
}
+
spin_unlock(&rq->lock);
- spin_unlock(&entity->lock);
}
/**
diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
index 353a261d42da..f8ae1a0bd5c0 100644
--- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
@@ -2929,15 +2929,6 @@ retry_crtc_state:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_crtc_state;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
@@ -3034,15 +3025,6 @@ retry_crtc_state:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_crtc_state;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
@@ -3153,15 +3135,6 @@ retry_conn_state:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_conn_state;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
@@ -3276,15 +3249,6 @@ retry_conn_state:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_conn_state;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
@@ -3387,15 +3351,6 @@ retry_crtc_state:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_crtc_state;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
@@ -3438,15 +3393,6 @@ retry_crtc_state_2:
old_hdmi_update_failures = priv->hdmi_update_failures;
- ret = drm_atomic_check_only(state);
- if (ret == -EDEADLK) {
- drm_atomic_commit_clear(state);
- ret = drm_modeset_backoff(&ctx);
- if (!ret)
- goto retry_crtc_state_2;
- }
- KUNIT_ASSERT_EQ(test, ret, 0);
-
ret = drm_atomic_commit(state);
if (ret == -EDEADLK) {
drm_atomic_commit_clear(state);
diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index 19a943f5f792..aaf814c622b6 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -307,7 +307,7 @@ static const struct drm_crtc_helper_funcs arcpgu_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs arcpgu_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c
index 754617722a0d..ddc19cd3e03c 100644
--- a/drivers/gpu/drm/tiny/gm12u320.c
+++ b/drivers/gpu/drm/tiny/gm12u320.c
@@ -652,8 +652,8 @@ static const struct drm_crtc_helper_funcs gm12u320_crtc_helper_funcs = {
static const struct drm_crtc_funcs gm12u320_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
- .reset = drm_atomic_helper_crtc_reset,
.destroy = drm_crtc_cleanup,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f225e38fd404..82c99d86656f 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -904,7 +904,7 @@ static const struct drm_crtc_helper_funcs repaper_crtc_helper_funcs = {
static const struct drm_crtc_funcs repaper_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
diff --git a/drivers/gpu/drm/tve200/tve200_display.c b/drivers/gpu/drm/tve200/tve200_display.c
index beb3a5a63b5d..90771464ac12 100644
--- a/drivers/gpu/drm/tve200/tve200_display.c
+++ b/drivers/gpu/drm/tve200/tve200_display.c
@@ -375,7 +375,7 @@ static const struct drm_crtc_helper_funcs tve200_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs tve200_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
index 6a7fd9e179bb..1fa6b7578b27 100644
--- a/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
+++ b/drivers/gpu/drm/verisilicon/vs_cursor_plane.c
@@ -11,6 +11,7 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
#include <drm/drm_crtc.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fourcc.h>
@@ -269,6 +270,7 @@ struct drm_plane *vs_cursor_plane_init(struct drm_device *drm_dev,
return plane;
drm_plane_helper_add(plane, &vs_cursor_plane_helper_funcs);
+ drm_plane_create_blend_mode_property(plane, BIT(DRM_MODE_BLEND_COVERAGE));
return plane;
}
diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c b/drivers/gpu/drm/verisilicon/vs_hwdb.c
index 2a0f7c59afa3..ebf6f843bc88 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
@@ -10,82 +10,50 @@
#include "vs_dc_top_regs.h"
#include "vs_hwdb.h"
-static const u32 vs_formats_array_no_yuv444[] = {
+static const u32 vs_primary_formats_array_no_yuv444[] = {
DRM_FORMAT_XRGB4444,
DRM_FORMAT_XBGR4444,
DRM_FORMAT_RGBX4444,
DRM_FORMAT_BGRX4444,
- DRM_FORMAT_ARGB4444,
- DRM_FORMAT_ABGR4444,
- DRM_FORMAT_RGBA4444,
- DRM_FORMAT_BGRA4444,
DRM_FORMAT_XRGB1555,
DRM_FORMAT_XBGR1555,
DRM_FORMAT_RGBX5551,
DRM_FORMAT_BGRX5551,
- DRM_FORMAT_ARGB1555,
- DRM_FORMAT_ABGR1555,
- DRM_FORMAT_RGBA5551,
- DRM_FORMAT_BGRA5551,
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_RGBX8888,
DRM_FORMAT_BGRX8888,
- DRM_FORMAT_ARGB8888,
- DRM_FORMAT_ABGR8888,
- DRM_FORMAT_RGBA8888,
- DRM_FORMAT_BGRA8888,
- DRM_FORMAT_ARGB2101010,
- DRM_FORMAT_ABGR2101010,
- DRM_FORMAT_RGBA1010102,
- DRM_FORMAT_BGRA1010102,
/* TODO: non-RGB formats */
};
-static const u32 vs_formats_array_with_yuv444[] = {
+static const u32 vs_primary_formats_array_with_yuv444[] = {
DRM_FORMAT_XRGB4444,
DRM_FORMAT_XBGR4444,
DRM_FORMAT_RGBX4444,
DRM_FORMAT_BGRX4444,
- DRM_FORMAT_ARGB4444,
- DRM_FORMAT_ABGR4444,
- DRM_FORMAT_RGBA4444,
- DRM_FORMAT_BGRA4444,
DRM_FORMAT_XRGB1555,
DRM_FORMAT_XBGR1555,
DRM_FORMAT_RGBX5551,
DRM_FORMAT_BGRX5551,
- DRM_FORMAT_ARGB1555,
- DRM_FORMAT_ABGR1555,
- DRM_FORMAT_RGBA5551,
- DRM_FORMAT_BGRA5551,
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_RGBX8888,
DRM_FORMAT_BGRX8888,
- DRM_FORMAT_ARGB8888,
- DRM_FORMAT_ABGR8888,
- DRM_FORMAT_RGBA8888,
- DRM_FORMAT_BGRA8888,
- DRM_FORMAT_ARGB2101010,
- DRM_FORMAT_ABGR2101010,
- DRM_FORMAT_RGBA1010102,
- DRM_FORMAT_BGRA1010102,
/* TODO: non-RGB formats */
};
static const struct vs_formats vs_formats_no_yuv444 = {
- .array = vs_formats_array_no_yuv444,
- .num = ARRAY_SIZE(vs_formats_array_no_yuv444)
+ .primary_array = vs_primary_formats_array_no_yuv444,
+ .primary_num = ARRAY_SIZE(vs_primary_formats_array_no_yuv444)
};
static const struct vs_formats vs_formats_with_yuv444 = {
- .array = vs_formats_array_with_yuv444,
- .num = ARRAY_SIZE(vs_formats_array_with_yuv444)
+ .primary_array = vs_primary_formats_array_with_yuv444,
+ .primary_num = ARRAY_SIZE(vs_primary_formats_array_with_yuv444)
};
static struct vs_chip_identity vs_chip_identities[] = {
diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.h b/drivers/gpu/drm/verisilicon/vs_hwdb.h
index 2065ecb73043..616076d931a5 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.h
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.h
@@ -10,8 +10,8 @@
#include <linux/types.h>
struct vs_formats {
- const u32 *array;
- unsigned int num;
+ const u32 *primary_array;
+ unsigned int primary_num;
};
struct vs_chip_identity {
diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
index 20a820f1ef30..95f4a06039e7 100644
--- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
+++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
@@ -173,8 +173,8 @@ struct drm_plane *vs_primary_plane_init(struct drm_device *drm_dev, struct vs_dc
plane = drmm_universal_plane_alloc(drm_dev, struct drm_plane, dev, 0,
&vs_primary_plane_funcs,
- dc->identity.formats->array,
- dc->identity.formats->num,
+ dc->identity.formats->primary_array,
+ dc->identity.formats->primary_num,
NULL,
DRM_PLANE_TYPE_PRIMARY,
NULL);
diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
index 9896ea35b743..1f65fc407d77 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
@@ -358,7 +358,7 @@ static const struct drm_crtc_helper_funcs display_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs display_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index ec7c2860c93e..a3ff0514f9cd 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -944,7 +944,7 @@ static int hid_scan_report(struct hid_device *hid)
hid_parser_reserved
};
- struct hid_parser *parser __free(vfree) = vzalloc(sizeof(*parser));
+ struct hid_parser *parser __free(kvfree) = vzalloc(sizeof(*parser));
if (!parser)
return -ENOMEM;
@@ -1265,7 +1265,7 @@ static int hid_parse_collections(struct hid_device *device)
hid_parser_reserved
};
- struct hid_parser *parser __free(vfree) = vzalloc(sizeof(*parser));
+ struct hid_parser *parser __free(kvfree) = vzalloc(sizeof(*parser));
if (!parser)
return -ENOMEM;
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index c232054fddd6..1d9691ec0e7e 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -136,6 +136,19 @@ config I2C_SLAVE_TESTUNIT
endif
+config I2C_DYNAMIC_TIMEOUT
+ bool "Dynamic per-transfer timeout based on message length"
+ depends on I2C
+ help
+ When enabled, the I2C core computes a per-transfer timeout from the
+ message length and bus frequency instead of using a static 1-second
+ default. A timeout explicitly configured via the I2C_TIMEOUT userspace
+ interface always takes precedence over the computed value.
+
+ When disabled, the existing static 1-second timeout is preserved.
+
+ If unsure, say N.
+
config I2C_DEBUG_CORE
bool "I2C Core debugging messages"
help
diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c
index b64adef778d4..8ca4556d9664 100644
--- a/drivers/i2c/busses/i2c-at91-core.c
+++ b/drivers/i2c/busses/i2c-at91-core.c
@@ -255,6 +255,7 @@ static int at91_twi_probe(struct platform_device *pdev)
if (rc) {
pm_runtime_disable(dev->dev);
pm_runtime_set_suspended(dev->dev);
+ at91_twi_dma_release(dev);
return rc;
}
@@ -270,6 +271,8 @@ static void at91_twi_remove(struct platform_device *pdev)
i2c_del_adapter(&dev->adapter);
+ at91_twi_dma_release(dev);
+
pm_runtime_disable(dev->dev);
pm_runtime_set_suspended(dev->dev);
}
diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c
index 894cedbca99f..68238cc8aee0 100644
--- a/drivers/i2c/busses/i2c-at91-master.c
+++ b/drivers/i2c/busses/i2c-at91-master.c
@@ -817,11 +817,21 @@ static int at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr)
error:
if (ret != -EPROBE_DEFER)
dev_info(dev->dev, "can't get DMA channel, continue without DMA support\n");
+ at91_twi_dma_release(dev);
+ return ret;
+}
+
+void at91_twi_dma_release(struct at91_twi_dev *dev)
+{
+ struct at91_twi_dma *dma = &dev->dma;
+
if (dma->chan_rx)
dma_release_channel(dma->chan_rx);
if (dma->chan_tx)
dma_release_channel(dma->chan_tx);
- return ret;
+ dma->chan_rx = NULL;
+ dma->chan_tx = NULL;
+ dev->use_dma = false;
}
static int at91_init_twi_recovery_gpio(struct platform_device *pdev,
diff --git a/drivers/i2c/busses/i2c-at91.h b/drivers/i2c/busses/i2c-at91.h
index 942e9c3973bb..d68fcbbc3e0f 100644
--- a/drivers/i2c/busses/i2c-at91.h
+++ b/drivers/i2c/busses/i2c-at91.h
@@ -172,6 +172,7 @@ void at91_twi_irq_restore(struct at91_twi_dev *dev);
void at91_init_twi_bus(struct at91_twi_dev *dev);
void at91_init_twi_bus_master(struct at91_twi_dev *dev);
+void at91_twi_dma_release(struct at91_twi_dev *dev);
int at91_twi_probe_master(struct platform_device *pdev, u32 phy_addr,
struct at91_twi_dev *dev);
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 19ec056b00af..ff5a91158df9 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1880,6 +1880,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
clk_notifier_unregister:
clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
+ if (i2c_imx->dma)
+ i2c_imx_dma_free(i2c_imx);
free_irq(irq, i2c_imx);
rpm_disable:
pm_runtime_put_noidle(&pdev->dev);
@@ -1920,6 +1922,7 @@ static void i2c_imx_remove(struct platform_device *pdev)
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
}
static int i2c_imx_runtime_suspend(struct device *dev)
diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c
index 93274f0c2d72..da3370968c8e 100644
--- a/drivers/i2c/busses/i2c-ljca.c
+++ b/drivers/i2c/busses/i2c-ljca.c
@@ -297,7 +297,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
device_set_node(&ljca_i2c->adap.dev, dev_fwnode(&auxdev->dev));
i2c_set_adapdata(&ljca_i2c->adap, ljca_i2c);
- auxiliary_set_drvdata(auxdev, ljca_i2c);
ret = ljca_i2c_init(ljca_i2c, ljca_i2c->i2c_info->id);
if (ret)
@@ -315,13 +314,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
return 0;
}
-static void ljca_i2c_remove(struct auxiliary_device *auxdev)
-{
- struct ljca_i2c_dev *ljca_i2c = auxiliary_get_drvdata(auxdev);
-
- i2c_del_adapter(&ljca_i2c->adap);
-}
-
static const struct auxiliary_device_id ljca_i2c_id_table[] = {
{ "usb_ljca.ljca-i2c", 0 },
{ /* sentinel */ }
@@ -330,7 +322,6 @@ MODULE_DEVICE_TABLE(auxiliary, ljca_i2c_id_table);
static struct auxiliary_driver ljca_i2c_driver = {
.probe = ljca_i2c_probe,
- .remove = ljca_i2c_remove,
.id_table = ljca_i2c_id_table,
};
module_auxiliary_driver(ljca_i2c_driver);
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 25b6e4e9e3fa..873e901a23d7 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -497,10 +497,14 @@ static const struct dev_pm_ops qcom_cci_pm = {
SET_RUNTIME_PM_OPS(cci_suspend_runtime, cci_resume_runtime, NULL)
};
+static void cci_put_of_node(void *data)
+{
+ of_node_put(data);
+}
+
static int cci_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *child;
struct resource *r;
struct cci *cci;
int ret, i;
@@ -516,7 +520,7 @@ static int cci_probe(struct platform_device *pdev)
if (!cci->data)
return -ENOENT;
- for_each_available_child_of_node(dev->of_node, child) {
+ for_each_available_child_of_node_scoped(dev->of_node, child) {
struct cci_master *master;
u32 idx;
@@ -537,6 +541,9 @@ static int cci_probe(struct platform_device *pdev)
master->adap.algo = &cci_algo;
master->adap.dev.parent = dev;
master->adap.dev.of_node = of_node_get(child);
+ ret = devm_add_action_or_reset(dev, cci_put_of_node, child);
+ if (ret)
+ return ret;
master->master = idx;
master->cci = cci;
@@ -606,10 +613,8 @@ static int cci_probe(struct platform_device *pdev)
continue;
ret = i2c_add_adapter(&cci->master[i].adap);
- if (ret < 0) {
- of_node_put(cci->master[i].adap.dev.of_node);
+ if (ret < 0)
goto error_i2c;
- }
}
return 0;
@@ -617,10 +622,8 @@ static int cci_probe(struct platform_device *pdev)
error_i2c:
for (--i ; i >= 0; i--) {
- if (cci->master[i].cci) {
+ if (cci->master[i].cci)
i2c_del_adapter(&cci->master[i].adap);
- of_node_put(cci->master[i].adap.dev.of_node);
- }
}
disable_clocks:
cci_disable_clocks(cci);
@@ -636,7 +639,6 @@ static void cci_remove(struct platform_device *pdev)
for (i = 0; i < cci->data->num_masters; i++) {
if (cci->master[i].cci) {
i2c_del_adapter(&cci->master[i].adap);
- of_node_put(cci->master[i].adap.dev.of_node);
cci_halt(cci, i);
}
}
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index ea854e78ef9c..367522734247 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -79,9 +79,14 @@ enum geni_i2c_err_code {
#define ABORT_TIMEOUT HZ
#define CANCEL_TIMEOUT HZ
-#define XFER_TIMEOUT HZ
#define RST_TIMEOUT HZ
+/* 9 bits per byte (8 data + 1 ACK), 10x safety margin */
+#define I2C_TIMEOUT_SAFETY_COEFFICIENT 10
+
+/* 300ms floor: budget for clock stretching; slave may hold SCL low indefinitely */
+#define I2C_TIMEOUT_MIN_USEC 300000
+
struct geni_i2c_desc {
bool no_dma_support;
unsigned int tx_fifo_depth;
@@ -513,7 +518,10 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,
}
cur = gi2c->cur;
- time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);
+ i2c_update_timeout(&gi2c->adap, gi2c->clk_freq_out, len,
+ I2C_TIMEOUT_SAFETY_COEFFICIENT,
+ I2C_TIMEOUT_MIN_USEC);
+ time_left = wait_for_completion_timeout(&gi2c->done, gi2c->adap.timeout);
if (!time_left || (gi2c->err && gi2c->err != gi2c_log[ADDR_NACK].err))
geni_i2c_cancel_xfer(gi2c);
@@ -555,7 +563,10 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,
writel_relaxed(1, se->base + SE_GENI_TX_WATERMARK_REG);
cur = gi2c->cur;
- time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);
+ i2c_update_timeout(&gi2c->adap, gi2c->clk_freq_out, len,
+ I2C_TIMEOUT_SAFETY_COEFFICIENT,
+ I2C_TIMEOUT_MIN_USEC);
+ time_left = wait_for_completion_timeout(&gi2c->done, gi2c->adap.timeout);
if (!time_left || (gi2c->err && gi2c->err != gi2c_log[ADDR_NACK].err))
geni_i2c_cancel_xfer(gi2c);
@@ -633,7 +644,7 @@ static void geni_i2c_gpi_multi_desc_unmap(struct geni_i2c_dev *gi2c, struct i2c_
* geni_i2c_gpi_multi_xfer_timeout_handler() - Handles multi message transfer timeout
* @dev: Pointer to the corresponding dev node
* @multi_xfer: Pointer to the geni_i2c_gpi_multi_desc_xfer
- * @transfer_timeout_msecs: Timeout value in milliseconds
+ * @timeout_jiffies: Per-message completion timeout in jiffies
* @transfer_comp: Completion object of the transfer
*
* This function waits for the completion of each processed transfer messages
@@ -643,18 +654,18 @@ static void geni_i2c_gpi_multi_desc_unmap(struct geni_i2c_dev *gi2c, struct i2c_
*/
static int geni_i2c_gpi_multi_xfer_timeout_handler(struct device *dev,
struct geni_i2c_gpi_multi_desc_xfer *multi_xfer,
- u32 transfer_timeout_msecs,
+ unsigned long timeout_jiffies,
struct completion *transfer_comp)
{
int i;
- u32 time_left;
+ unsigned long time_left;
for (i = 0; i < multi_xfer->msg_idx_cnt - 1; i++) {
reinit_completion(transfer_comp);
if (multi_xfer->msg_idx_cnt != multi_xfer->irq_cnt) {
time_left = wait_for_completion_timeout(transfer_comp,
- transfer_timeout_msecs);
+ timeout_jiffies);
if (!time_left) {
dev_err(dev, "%s: Transfer timeout\n", __func__);
return -ETIMEDOUT;
@@ -778,8 +789,24 @@ skip_tx_dma_map:
dma_async_issue_pending(gi2c->tx_c);
if ((msg_idx == (gi2c->num_msgs - 1)) || flags & DMA_PREP_INTERRUPT) {
+ size_t total_len = 0;
+ int j;
+
+ /*
+ * All TREs except the last carry the BEI bit, so a single
+ * completion interrupt fires only after the entire batch has
+ * drained on the wire. The timeout budget must therefore cover
+ * the combined wire time of every message in the batch.
+ */
+ for (j = 0; j < gi2c->num_msgs; j++)
+ total_len += msgs[j].len;
+
+ i2c_update_timeout(&gi2c->adap, gi2c->clk_freq_out, total_len,
+ I2C_TIMEOUT_SAFETY_COEFFICIENT,
+ I2C_TIMEOUT_MIN_USEC);
ret = geni_i2c_gpi_multi_xfer_timeout_handler(gi2c->se.dev, gi2c_gpi_xfer,
- XFER_TIMEOUT, &gi2c->done);
+ gi2c->adap.timeout,
+ &gi2c->done);
if (ret) {
dev_err(gi2c->se.dev,
"I2C multi write msg transfer timeout: %d\n",
@@ -899,7 +926,10 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
if (!gi2c->is_tx_multi_desc_xfer) {
dma_async_issue_pending(gi2c->tx_c);
- time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);
+ i2c_update_timeout(&gi2c->adap, gi2c->clk_freq_out, msgs[i].len,
+ I2C_TIMEOUT_SAFETY_COEFFICIENT,
+ I2C_TIMEOUT_MIN_USEC);
+ time_left = wait_for_completion_timeout(&gi2c->done, gi2c->adap.timeout);
if (!time_left) {
dev_err(gi2c->se.dev, "%s:I2C timeout\n", __func__);
gi2c->err = -ETIMEDOUT;
@@ -1186,8 +1216,10 @@ static int geni_i2c_probe(struct platform_device *pdev)
return ret;
ret = i2c_add_adapter(&gi2c->adap);
- if (ret)
+ if (ret) {
+ release_gpi_dma(gi2c);
return dev_err_probe(dev, ret, "Error adding i2c adapter\n");
+ }
dev_dbg(dev, "Geni-I2C adaptor successfully added\n");
diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c
index e6d2af659d81..ca29633dcd62 100644
--- a/drivers/i2c/i2c-atr.c
+++ b/drivers/i2c/i2c-atr.c
@@ -855,6 +855,7 @@ int i2c_atr_add_adapter(struct i2c_atr *atr, struct i2c_atr_adap_desc *desc)
ret = i2c_add_adapter(&chan->adap);
if (ret) {
+ atr->adapter[chan_id] = NULL;
dev_err(dev, "failed to add atr-adapter %u (error=%d)\n",
chan_id, ret);
goto err_free_alias_pool;
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index ddaacf876dad..a9aa876090b8 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -29,6 +29,7 @@
#include <linux/irq.h>
#include <linux/jump_label.h>
#include <linux/kernel.h>
+#include <linux/math64.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_device.h>
@@ -2007,6 +2008,48 @@ void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, bool use_de
}
EXPORT_SYMBOL_GPL(i2c_parse_fw_timings);
+#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT
+/**
+ * i2c_update_timeout - compute and set a dynamic transfer timeout on an adapter
+ * @adap: the i2c_adapter whose timeout field will be updated
+ * @bus_freq_hz: I2C bus clock frequency in Hz
+ * @len: transfer length in bytes
+ * @safety_coeff: multiplier applied over the theoretical wire time
+ * @min_usec: minimum timeout floor in microseconds
+ *
+ * Computes a transfer-specific timeout from the message length and bus
+ * frequency, applies a safety multiplier and a minimum floor, then stores
+ * the result in adap->timeout (in jiffies). The caller supplies the policy
+ * constants so they remain internal to the driver.
+ *
+ * A timeout explicitly configured by userspace via the I2C_TIMEOUT ioctl
+ * always takes precedence; the computed value is used only when userspace
+ * has not configured one.
+ */
+void i2c_update_timeout(struct i2c_adapter *adap, u32 bus_freq_hz,
+ size_t len, unsigned int safety_coeff,
+ unsigned int min_usec)
+{
+ u64 bit_usec, total_usec;
+ unsigned long jiffies_val;
+
+ if (adap->user_timeout > 0) {
+ adap->timeout = adap->user_timeout;
+ return;
+ }
+
+ if (WARN_ON_ONCE(!bus_freq_hz))
+ return;
+
+ bit_usec = mul_u64_u32_div(len * 9, USEC_PER_SEC, bus_freq_hz);
+ total_usec = bit_usec * safety_coeff + min_usec;
+
+ jiffies_val = usecs_to_jiffies((unsigned int)min_t(u64, total_usec, UINT_MAX));
+ adap->timeout = (int)min_t(unsigned long, jiffies_val, INT_MAX);
+}
+EXPORT_SYMBOL_GPL(i2c_update_timeout);
+#endif /* CONFIG_I2C_DYNAMIC_TIMEOUT */
+
/* ------------------------------------------------------------------------- */
int i2c_for_each_dev(void *data, int (*fn)(struct device *dev, void *data))
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index ccaac5e29f90..d219eb89f978 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -495,6 +495,9 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return -EINVAL;
client->adapter->timeout = msecs_to_jiffies(arg * 10);
+#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT
+ client->adapter->user_timeout = client->adapter->timeout;
+#endif
break;
default:
/* NOTE: returning a fault code here could cause trouble
diff --git a/drivers/net/ethernet/8390/pcnet_cs.c b/drivers/net/ethernet/8390/pcnet_cs.c
index 19f9c5db3f3b..0cf3c0f3ced7 100644
--- a/drivers/net/ethernet/8390/pcnet_cs.c
+++ b/drivers/net/ethernet/8390/pcnet_cs.c
@@ -1434,14 +1434,14 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
offset -= offset % window_size;
ret = pcmcia_map_mem_page(link, link->resource[3], offset);
if (ret)
- goto failed;
+ goto release;
/* Try scribbling on the buffer */
info->base = ioremap(link->resource[3]->start,
resource_size(link->resource[3]));
if (unlikely(!info->base)) {
ret = -ENOMEM;
- goto failed;
+ goto release;
}
for (i = 0; i < (TX_PAGES<<8); i += 2)
@@ -1452,9 +1452,8 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
pcnet_reset_8390(dev);
if (i != (TX_PAGES<<8)) {
iounmap(info->base);
- pcmcia_release_window(link, link->resource[3]);
info->base = NULL;
- goto failed;
+ goto release;
}
ei_status.mem = info->base + offset;
@@ -1475,6 +1474,8 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
info->flags |= USE_SHMEM;
return 0;
+release:
+ pcmcia_release_window(link, link->resource[3]);
failed:
return 1;
}
diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c
index 263e7c4e2934..3bca4b683134 100644
--- a/drivers/net/ethernet/microsoft/mana/hw_channel.c
+++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c
@@ -170,12 +170,12 @@ static void mana_hwc_init_event_handler(void *ctx, struct gdma_queue *q_self,
hwc->txq->msg_buf->gpa_mkey = val;
break;
- case HWC_INIT_DATA_PF_DEST_RQ_ID:
- hwc->pf_dest_vrq_id = val;
+ case HWC_INIT_DATA_DEST_RQ_ID:
+ hwc->dest_vrq_id = val;
break;
- case HWC_INIT_DATA_PF_DEST_CQ_ID:
- hwc->pf_dest_vrcq_id = val;
+ case HWC_INIT_DATA_DEST_CQ_ID:
+ hwc->dest_vrcq_id = val;
break;
}
@@ -855,13 +855,12 @@ void mana_hwc_destroy_channel(struct gdma_context *gc)
int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
const void *req, u32 resp_len, void *resp)
{
- struct gdma_context *gc = hwc->gdma_dev->gdma_context;
struct hwc_work_request *tx_wr;
struct hwc_wq *txq = hwc->txq;
struct gdma_req_hdr *req_msg;
struct hwc_caller_ctx *ctx;
- u32 dest_vrcq = 0;
- u32 dest_vrq = 0;
+ u32 dest_vrcq;
+ u32 dest_vrq;
u32 command;
u16 msg_id;
int err;
@@ -890,10 +889,13 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
tx_wr->msg_size = req_len;
command = req_msg->req.msg_type;
- if (gc->is_pf) {
- dest_vrq = hwc->pf_dest_vrq_id;
- dest_vrcq = hwc->pf_dest_vrcq_id;
- }
+ /* The hardware reports the HWC destination queues through
+ * HWC_INIT_DATA_DEST_RQ_ID and HWC_INIT_DATA_DEST_CQ_ID, and
+ * always supplies values that are valid for this function, so no
+ * PF-specific handling is needed here.
+ */
+ dest_vrq = hwc->dest_vrq_id;
+ dest_vrcq = hwc->dest_vrcq_id;
err = mana_hwc_post_tx_wqe(txq, tx_wr, dest_vrq, dest_vrcq, false);
if (err) {
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index 861a13ad7e1a..776840f60d01 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -3916,6 +3916,7 @@ static void ql3xxx_remove(struct pci_dev *pdev)
iounmap(qdev->mem_map_registers);
pci_release_regions(pdev);
free_netdev(ndev);
+ pci_disable_device(pdev);
}
static struct pci_driver ql3xxx_driver = {
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 154cc0c7623d..1be5310ca766 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -1016,8 +1016,6 @@ static int stmmac_get_ts_info(struct net_device *dev,
if (priv->ptp_clock)
info->phc_index = ptp_clock_index(priv->ptp_clock);
- else
- info->phc_index = 0;
info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4dee3542df3b..bc2b1cbe7792 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4515,16 +4515,16 @@ static int stmmac_tso_get_num_desc(struct stmmac_tx_queue *tx_q,
*/
static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
{
+ unsigned int first_entry, entry, tx_packets, proto_hdr_len;
struct dma_desc *desc, *first, *mss_desc = NULL;
struct stmmac_priv *priv = netdev_priv(dev);
- unsigned int first_entry, entry, tx_packets;
struct stmmac_txq_stats *txq_stats;
int i, first_tx, nfrags, ndesc;
struct stmmac_tx_queue *tx_q;
bool set_ic, is_last_segment;
u32 pay_len, mss, queue;
- u8 proto_hdr_len, hdr;
dma_addr_t des;
+ u8 hdr;
nfrags = skb_shinfo(skb)->nr_frags;
queue = skb_get_queue_mapping(skb);
@@ -4572,7 +4572,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
}
if (netif_msg_tx_queued(priv)) {
- pr_info("%s: hdrlen %d, hdr_len %d, pay_len %d, mss %d\n",
+ pr_info("%s: hdrlen %d, hdr_len %u, pay_len %d, mss %d\n",
__func__, hdr, proto_hdr_len, pay_len, mss);
pr_info("\tskb->len %d, skb->data_len %d\n", skb->len,
skb->data_len);
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
index dc9f24314658..c81d485221d5 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
@@ -434,7 +434,7 @@ static int txgbe_clock_register(struct txgbe *txgbe)
clock = clkdev_create(clk, NULL, "%s", clk_name);
if (!clock) {
- clk_unregister(clk);
+ clk_unregister_fixed_rate(clk);
return -ENOMEM;
}
@@ -637,7 +637,7 @@ err_unregister_i2c:
platform_device_unregister(txgbe->i2c_dev);
err_unregister_clk:
clkdev_drop(txgbe->clock);
- clk_unregister(txgbe->clk);
+ clk_unregister_fixed_rate(txgbe->clk);
err_destroy_phylink:
phylink_destroy(wx->phylink);
err_destroy_xpcs:
@@ -671,7 +671,7 @@ void txgbe_remove_phy(struct txgbe *txgbe)
platform_device_unregister(txgbe->sfp_dev);
platform_device_unregister(txgbe->i2c_dev);
clkdev_drop(txgbe->clock);
- clk_unregister(txgbe->clk);
+ clk_unregister_fixed_rate(txgbe->clk);
phylink_destroy(txgbe->wx->phylink);
xpcs_destroy_pcs(txgbe->pcs);
software_node_unregister_node_group(txgbe->nodes.group);
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 27e31a799e2c..97b0b67b9900 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -548,8 +548,12 @@ static int rtl8261x_fw_execute_entry(struct phy_device *phydev,
switch (entry->type) {
case OP_WRITE:
- ret = phy_modify_mmd(phydev, dev, addr,
- GENMASK(msb, lsb), (value << lsb) & GENMASK(msb, lsb));
+ if (msb != 15 || lsb != 0)
+ ret = phy_modify_mmd(phydev, dev, addr, GENMASK(msb, lsb),
+ (value << lsb) & GENMASK(msb, lsb));
+ else
+ ret = phy_write_mmd(phydev, dev, addr, value);
+
if (ret)
return ret;
break;
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 5b717b731197..6d95f7b343a5 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2505,7 +2505,7 @@ static void ath11k_dp_rx_deliver_msdu(struct ath11k *ar, struct napi_struct *nap
!(is_mcbc && rx_status->flag & RX_FLAG_DECRYPTED))
rx_status->flag |= RX_FLAG_8023;
- ieee80211_rx_napi(ar->hw, pubsta, msdu, napi);
+ ieee80211_rx_napi(ar->hw, pubsta ? &pubsta->deflink : NULL, msdu, napi);
}
static bool ath11k_dp_rx_check_nwifi_hdr_len_valid(struct ath11k_base *ab,
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 7d5be77b081f..1faf1896d0ab 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -503,8 +503,6 @@ void ath12k_dp_mon_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev,
struct ieee80211_rx_status *rx_status;
struct ieee80211_radiotap_he *he = NULL;
- status->link_valid = 0;
-
if ((status->encoding == RX_ENC_HE) && !(status->flag & RX_FLAG_RADIOTAP_HE) &&
!(status->flag & RX_FLAG_SKIP_MONITOR)) {
he = skb_push(msdu, sizeof(known));
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 8fa0e90b4531..41ac0a4072ae 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1375,6 +1375,7 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
struct ath12k_dp *dp = dp_pdev->dp;
struct ieee80211_rx_status *rx_status;
struct ieee80211_sta *pubsta;
+ struct ieee80211_link_sta *link_pubsta = NULL;
struct ath12k_dp_peer *peer;
struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
struct ieee80211_rx_status *status = rx_info->rx_status;
@@ -1384,9 +1385,19 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
pubsta = peer ? peer->sta : NULL;
- status->link_valid = 0;
- if (pubsta && pubsta->valid_links)
- ath12k_hw_set_rx_link_id(dp->hw_params, peer, rxcb, status);
+ if (pubsta) {
+ if (pubsta->valid_links) {
+ int link_id =
+ ath12k_hw_get_rx_link_id(dp->hw_params, peer,
+ rxcb, status);
+
+ if (link_id >= 0)
+ link_pubsta =
+ rcu_dereference(pubsta->link[link_id]);
+ } else {
+ link_pubsta = &pubsta->deflink;
+ }
+ }
ath12k_dbg(dp->ab, ATH12K_DBG_DATA,
"rx skb %p len %u peer %pM %d %s sn %u %s%s%s%s%s%s%s%s%s%s rate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
@@ -1422,7 +1433,8 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
/* TODO: trace rx packet */
- ieee80211_rx_napi(ath12k_pdev_dp_to_hw(dp_pdev), pubsta, msdu, napi);
+ ieee80211_rx_napi(ath12k_pdev_dp_to_hw(dp_pdev), link_pubsta, msdu,
+ napi);
}
EXPORT_SYMBOL(ath12k_dp_rx_deliver_msdu);
diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h
index 011bb22e21c7..e790de5737db 100644
--- a/drivers/net/wireless/ath/ath12k/hw.h
+++ b/drivers/net/wireless/ath/ath12k/hw.h
@@ -249,9 +249,9 @@ struct ath12k_hw_ops {
bool (*dp_srng_is_tx_comp_ring)(int ring_num);
bool (*is_frame_link_agnostic)(struct ath12k_link_vif *arvif,
struct ieee80211_mgmt *mgmt);
- void (*set_rx_link_id)(struct ath12k_dp_peer *dp_peer,
- struct ath12k_skb_rxcb *rxcb,
- struct ieee80211_rx_status *status);
+ int (*get_rx_link_id)(struct ath12k_dp_peer *dp_peer,
+ struct ath12k_skb_rxcb *rxcb,
+ struct ieee80211_rx_status *status);
};
static inline
@@ -282,13 +282,15 @@ static inline int ath12k_hw_mac_id_to_srng_id(const struct ath12k_hw_params *hw,
return 0;
}
-static inline void ath12k_hw_set_rx_link_id(const struct ath12k_hw_params *hw,
- struct ath12k_dp_peer *dp_peer,
- struct ath12k_skb_rxcb *rxcb,
- struct ieee80211_rx_status *status)
+static inline int ath12k_hw_get_rx_link_id(const struct ath12k_hw_params *hw,
+ struct ath12k_dp_peer *dp_peer,
+ struct ath12k_skb_rxcb *rxcb,
+ struct ieee80211_rx_status *status)
{
- if (hw->hw_ops->set_rx_link_id)
- hw->hw_ops->set_rx_link_id(dp_peer, rxcb, status);
+ if (hw->hw_ops->get_rx_link_id)
+ return hw->hw_ops->get_rx_link_id(dp_peer, rxcb, status);
+
+ return -1;
}
struct ath12k_fw_ie {
diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
index 95d87dd67872..8b722ee0ad8f 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
@@ -2317,17 +2317,16 @@ ath12k_wifi7_dp_rxdesc_mpdu_valid(struct ath12k_base *ab,
return tlv_tag == HAL_RX_MPDU_START;
}
-void
-ath12k_wifi7_dp_rx_set_link_id_qcn9274(struct ath12k_dp_peer *dp_peer,
+int
+ath12k_wifi7_dp_rx_get_link_id_qcn9274(struct ath12k_dp_peer *dp_peer,
struct ath12k_skb_rxcb *rxcb,
struct ieee80211_rx_status *status)
{
- status->link_valid = 1;
- status->link_id = dp_peer->hw_links[rxcb->hw_link_id];
+ return dp_peer->hw_links[rxcb->hw_link_id];
}
-void
-ath12k_wifi7_dp_rx_set_link_id_wcn7850(struct ath12k_dp_peer *dp_peer,
+int
+ath12k_wifi7_dp_rx_get_link_id_wcn7850(struct ath12k_dp_peer *dp_peer,
struct ath12k_skb_rxcb *rxcb,
struct ieee80211_rx_status *status)
{
@@ -2341,10 +2340,9 @@ ath12k_wifi7_dp_rx_set_link_id_wcn7850(struct ath12k_dp_peer *dp_peer,
links_map = READ_ONCE(dp_peer->link_peers_map);
for_each_set_bit(i, &links_map, ATH12K_NUM_MAX_LINKS) {
link_peer = rcu_dereference(dp_peer->link_peers[i]);
- if (link_peer && link_peer->peer_id == rxcb->peer_id) {
- status->link_valid = 1;
- status->link_id = link_peer->link_id;
- return;
- }
+ if (link_peer && link_peer->peer_id == rxcb->peer_id)
+ return link_peer->link_id;
}
+
+ return -1;
}
diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h
index 1d3a4788a2dd..d68489ff7b03 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h
+++ b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h
@@ -57,10 +57,10 @@ ath12k_wifi7_dp_rxdesc_mpdu_valid(struct ath12k_base *ab,
struct hal_rx_desc *rx_desc);
int ath12k_wifi7_dp_rx_tid_delete_handler(struct ath12k_base *ab,
struct ath12k_dp_rx_tid_rxq *rx_tid);
-void ath12k_wifi7_dp_rx_set_link_id_qcn9274(struct ath12k_dp_peer *dp_peer,
- struct ath12k_skb_rxcb *rxcb,
- struct ieee80211_rx_status *status);
-void ath12k_wifi7_dp_rx_set_link_id_wcn7850(struct ath12k_dp_peer *dp_peer,
- struct ath12k_skb_rxcb *rxcb,
- struct ieee80211_rx_status *status);
+int ath12k_wifi7_dp_rx_get_link_id_qcn9274(struct ath12k_dp_peer *dp_peer,
+ struct ath12k_skb_rxcb *rxcb,
+ struct ieee80211_rx_status *status);
+int ath12k_wifi7_dp_rx_get_link_id_wcn7850(struct ath12k_dp_peer *dp_peer,
+ struct ath12k_skb_rxcb *rxcb,
+ struct ieee80211_rx_status *status);
#endif
diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
index a20c21807344..ae8df80928b0 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
@@ -158,7 +158,7 @@ static const struct ath12k_hw_ops qcn9274_ops = {
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_qcn9274,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_qcn9274,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_qcn9274,
- .set_rx_link_id = ath12k_wifi7_dp_rx_set_link_id_qcn9274,
+ .get_rx_link_id = ath12k_wifi7_dp_rx_get_link_id_qcn9274,
};
static const struct ath12k_hw_ops wcn7850_ops = {
@@ -169,7 +169,7 @@ static const struct ath12k_hw_ops wcn7850_ops = {
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_wcn7850,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_wcn7850,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_wcn7850,
- .set_rx_link_id = ath12k_wifi7_dp_rx_set_link_id_wcn7850,
+ .get_rx_link_id = ath12k_wifi7_dp_rx_get_link_id_wcn7850,
};
static const struct ath12k_hw_ops qcc2072_ops = {
@@ -180,7 +180,7 @@ static const struct ath12k_hw_ops qcc2072_ops = {
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_wcn7850,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_wcn7850,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_wcn7850,
- .set_rx_link_id = ath12k_wifi7_dp_rx_set_link_id_wcn7850,
+ .get_rx_link_id = ath12k_wifi7_dp_rx_get_link_id_wcn7850,
};
#define ATH12K_TX_RING_MASK_0 0x1
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index a63bbda0219c..3149b6376c94 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -7278,7 +7278,6 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb)
struct ath12k_wmi_mgmt_rx_arg rx_ev = {};
struct ath12k *ar;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
- struct ieee80211_sta *pubsta = NULL;
struct ath12k_dp_link_peer *peer;
struct ieee80211_hdr *hdr;
bool is_4addr_null_pkt;
@@ -7380,11 +7379,6 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb)
dev_kfree_skb(skb);
goto exit;
}
- pubsta = peer->sta;
- if (pubsta && pubsta->valid_links) {
- status->link_valid = 1;
- status->link_id = peer->link_id;
- }
spin_unlock_bh(&dp->dp_lock);
goto send_rx;
}
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 872c48806d09..9d8ce7bb046e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2112,9 +2112,11 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
struct brcmf_pub *drvr = ifp->drvr;
s32 val;
s32 err;
+ s32 okc_enable;
const struct brcmf_tlv *rsn_ie;
const u8 *ie;
u32 ie_len;
+ bool fwsup_roam;
u32 offset;
u16 rsn_cap;
u32 mfp;
@@ -2122,6 +2124,9 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
profile->is_ft = false;
+ profile->is_okc = false;
+ fwsup_roam = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FBT) ||
+ brcmf_feat_is_enabled(ifp, BRCMF_FEAT_OKC);
if (!sme->crypto.n_akm_suites)
return 0;
@@ -2138,6 +2143,8 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
val = WPA_AUTH_UNSPECIFIED;
if (sme->want_1x)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_1X;
+ else if (fwsup_roam)
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_ROAM;
break;
case WLAN_AKM_SUITE_PSK:
val = WPA_AUTH_PSK;
@@ -2153,11 +2160,15 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
val = WPA2_AUTH_UNSPECIFIED;
if (sme->want_1x)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_1X;
+ else if (fwsup_roam)
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_ROAM;
break;
case WLAN_AKM_SUITE_8021X_SHA256:
val = WPA2_AUTH_1X_SHA256;
if (sme->want_1x)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_1X;
+ else if (fwsup_roam)
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_ROAM;
break;
case WLAN_AKM_SUITE_PSK_SHA256:
val = WPA2_AUTH_PSK_SHA256;
@@ -2170,10 +2181,16 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
profile->is_ft = true;
if (sme->want_1x)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_1X;
+ else if (fwsup_roam)
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_ROAM;
break;
case WLAN_AKM_SUITE_FT_PSK:
val = WPA2_AUTH_PSK | WPA2_AUTH_FT;
profile->is_ft = true;
+ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWSUP))
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_PSK;
+ else if (fwsup_roam)
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_ROAM;
break;
case WLAN_AKM_SUITE_WFA_DPP:
val = WFA_AUTH_DPP;
@@ -2204,8 +2221,22 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X)
brcmf_dbg(INFO, "using 1X offload\n");
+
+ if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X ||
+ profile->use_fwsup == BRCMF_PROFILE_FWSUP_ROAM) {
+ err = brcmf_fil_bsscfg_int_get(ifp, "okc_enable",
+ &okc_enable);
+ if (err) {
+ bphy_err(drvr, "get okc_enable failed (%d)\n", err);
+ } else {
+ brcmf_dbg(INFO, "okc_enable (%d)\n", okc_enable);
+ profile->is_okc = okc_enable;
+ }
+ }
if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_SAE)
brcmf_dbg(INFO, "using SAE offload\n");
+ if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_ROAM)
+ brcmf_dbg(INFO, "using roaming offload\n");
if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP))
goto skip_mfp_config;
@@ -2494,13 +2525,14 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
if (sme->crypto.psk && !is_sae_akm &&
profile->use_fwsup != BRCMF_PROFILE_FWSUP_SAE) {
- if (WARN_ON(profile->use_fwsup !=
- BRCMF_PROFILE_FWSUP_NONE)) {
+ if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_NONE) {
+ brcmf_dbg(INFO, "using PSK offload\n");
+ profile->use_fwsup = BRCMF_PROFILE_FWSUP_PSK;
+ } else if (WARN_ON(profile->use_fwsup !=
+ BRCMF_PROFILE_FWSUP_PSK)) {
err = -EINVAL;
goto done;
}
- brcmf_dbg(INFO, "using PSK offload\n");
- profile->use_fwsup = BRCMF_PROFILE_FWSUP_PSK;
}
if (profile->use_fwsup != BRCMF_PROFILE_FWSUP_NONE) {
/* enable firmware supplicant for this interface */
@@ -5953,17 +5985,29 @@ static int brcmf_cfg80211_set_pmk(struct wiphy *wiphy, struct net_device *dev,
const struct cfg80211_pmk_conf *conf)
{
struct brcmf_if *ifp;
+ struct brcmf_pub *drvr;
+ int ret;
brcmf_dbg(TRACE, "enter\n");
- /* expect using firmware supplicant for 1X */
ifp = netdev_priv(dev);
- if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X))
+ drvr = ifp->drvr;
+ if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X &&
+ !ifp->vif->profile.is_ft &&
+ !ifp->vif->profile.is_okc))
return -EINVAL;
if (conf->pmk_len > BRCMF_WSEC_MAX_PSK_LEN)
return -ERANGE;
+ if (ifp->vif->profile.is_okc) {
+ ret = brcmf_fil_iovar_data_set(ifp, "okc_info_pmk",
+ conf->pmk, conf->pmk_len);
+ if (ret < 0)
+ bphy_err(drvr, "okc_info_pmk iovar failed: ret=%d\n",
+ ret);
+ }
+
return brcmf_set_pmk(ifp, conf->pmk, conf->pmk_len);
}
@@ -6422,6 +6466,47 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg,
return err;
}
+static bool brcmf_has_pmkid(const u8 *parse, u32 len)
+{
+ const struct brcmf_tlv *rsn_ie;
+ const u8 *ie;
+ u32 ie_len;
+ u32 offset;
+ u16 count;
+
+ if (!parse)
+ return false;
+
+ rsn_ie = brcmf_parse_tlvs(parse, len, WLAN_EID_RSN);
+ if (!rsn_ie)
+ return false;
+
+ ie = (const u8 *)rsn_ie;
+ ie_len = rsn_ie->len + TLV_HDR_LEN;
+
+ offset = TLV_HDR_LEN + WPA_IE_VERSION_LEN + WPA_IE_MIN_OUI_LEN;
+ if (offset + WPA_IE_SUITE_COUNT_LEN >= ie_len)
+ return false;
+
+ count = ie[offset] + (ie[offset + 1] << 8);
+ offset += WPA_IE_SUITE_COUNT_LEN + count * WPA_IE_MIN_OUI_LEN;
+ if (offset + WPA_IE_SUITE_COUNT_LEN >= ie_len)
+ return false;
+
+ count = ie[offset] + (ie[offset + 1] << 8);
+ offset += WPA_IE_SUITE_COUNT_LEN + count * WPA_IE_MIN_OUI_LEN;
+ if (offset + RSN_CAP_LEN >= ie_len)
+ return false;
+
+ offset += RSN_CAP_LEN;
+ if (offset + RSN_PMKID_COUNT_LEN > ie_len)
+ return false;
+
+ count = ie[offset] + (ie[offset + 1] << 8);
+
+ return count > 0;
+}
+
static s32
brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
struct net_device *ndev,
@@ -6436,6 +6521,7 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
struct brcmf_bss_info_le *bi;
struct brcmu_chan ch;
struct cfg80211_roam_info roam_info = {};
+ bool authorized = false;
u32 freq;
s32 err = 0;
u8 *buf;
@@ -6482,14 +6568,18 @@ done:
roam_info.resp_ie = conn_info->resp_ie;
roam_info.resp_ie_len = conn_info->resp_ie_len;
+ if ((profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X ||
+ profile->use_fwsup == BRCMF_PROFILE_FWSUP_ROAM) &&
+ (brcmf_has_pmkid(roam_info.req_ie, roam_info.req_ie_len) ||
+ profile->is_ft || profile->is_okc))
+ authorized = true;
+
cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
+ if (authorized)
+ cfg80211_port_authorized(ndev, profile->bssid, NULL, 0,
+ GFP_KERNEL);
brcmf_dbg(CONN, "Report roaming result\n");
- if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && profile->is_ft) {
- cfg80211_port_authorized(ndev, profile->bssid, NULL, 0, GFP_KERNEL);
- brcmf_dbg(CONN, "Report port authorized\n");
- }
-
set_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state);
brcmf_dbg(TRACE, "Exit\n");
return err;
@@ -6504,6 +6594,7 @@ brcmf_bss_connect_done(struct brcmf_cfg80211_info *cfg,
struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct cfg80211_connect_resp_params conn_params;
+ bool authorized;
brcmf_dbg(TRACE, "Enter\n");
@@ -6522,13 +6613,23 @@ brcmf_bss_connect_done(struct brcmf_cfg80211_info *cfg,
clear_bit(BRCMF_VIF_STATUS_ASSOC_SUCCESS,
&ifp->vif->sme_state);
conn_params.status = WLAN_STATUS_AUTH_TIMEOUT;
+ bphy_err(ifp->drvr, "connect failed: event %u status %u reason %u\n",
+ e->event_code, e->status, e->reason);
}
conn_params.links[0].bssid = profile->bssid;
conn_params.req_ie = conn_info->req_ie;
conn_params.req_ie_len = conn_info->req_ie_len;
conn_params.resp_ie = conn_info->resp_ie;
conn_params.resp_ie_len = conn_info->resp_ie_len;
+ authorized = completed &&
+ (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X ||
+ profile->use_fwsup == BRCMF_PROFILE_FWSUP_ROAM) &&
+ brcmf_has_pmkid(conn_params.req_ie,
+ conn_params.req_ie_len);
cfg80211_connect_done(ndev, &conn_params, GFP_KERNEL);
+ if (authorized)
+ cfg80211_port_authorized(ndev, profile->bssid, NULL, 0,
+ GFP_KERNEL);
brcmf_dbg(CONN, "Report connect result - connection %s\n",
completed ? "succeeded" : "failed");
}
@@ -7731,6 +7832,10 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
}
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE_EXT))
wiphy->features |= NL80211_FEATURE_SAE;
+ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FBT) ||
+ brcmf_feat_is_enabled(ifp, BRCMF_FEAT_OKC))
+ wiphy_ext_feature_set(wiphy,
+ NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD);
wiphy->mgmt_stypes = brcmf_txrx_stypes;
wiphy->max_remain_on_channel_duration = 5000;
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) {
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
index 63e534523f51..1aa99390a951 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
@@ -127,7 +127,8 @@ enum brcmf_profile_fwsup {
BRCMF_PROFILE_FWSUP_NONE,
BRCMF_PROFILE_FWSUP_PSK,
BRCMF_PROFILE_FWSUP_1X,
- BRCMF_PROFILE_FWSUP_SAE
+ BRCMF_PROFILE_FWSUP_SAE,
+ BRCMF_PROFILE_FWSUP_ROAM
};
/**
@@ -164,6 +165,7 @@ enum brcmf_mgmt_tx_status {
* @bssid: bssid of joined/joining ibss.
* @sec: security information.
* @key: key information
+ * @is_okc: OKC is used for current connection.
*/
struct brcmf_cfg80211_profile {
u8 bssid[ETH_ALEN];
@@ -172,6 +174,7 @@ struct brcmf_cfg80211_profile {
enum brcmf_profile_fwsup use_fwsup;
u16 use_fwauth;
bool is_ft;
+ bool is_okc;
};
/**
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index 488364ef8ff2..cc19e5e7ebf5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -45,6 +45,8 @@ static const struct brcmf_feat_fwcap brcmf_fwcap_map[] = {
{ BRCMF_FEAT_SAE, "sae " },
{ BRCMF_FEAT_FWAUTH, "idauth" },
{ BRCMF_FEAT_SAE_EXT, "sae_ext" },
+ { BRCMF_FEAT_FBT, "fbt " },
+ { BRCMF_FEAT_OKC, "okc" },
};
#ifdef DEBUG
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
index 31f8695ca417..8165a286b630 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
@@ -59,7 +59,9 @@
BRCMF_FEAT_DEF(SCAN_V2) \
BRCMF_FEAT_DEF(PMKID_V2) \
BRCMF_FEAT_DEF(PMKID_V3) \
- BRCMF_FEAT_DEF(SAE_EXT)
+ BRCMF_FEAT_DEF(SAE_EXT) \
+ BRCMF_FEAT_DEF(FBT) \
+ BRCMF_FEAT_DEF(OKC)
/*
* Quirks:
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/agg.c b/drivers/net/wireless/intel/iwlwifi/mld/agg.c
index 96102d2af2cf..c45c47337509 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/agg.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/agg.c
@@ -7,7 +7,8 @@
#include "hcmd.h"
static void
-iwl_mld_reorder_release_frames(struct iwl_mld *mld, struct ieee80211_sta *sta,
+iwl_mld_reorder_release_frames(struct iwl_mld *mld,
+ struct ieee80211_link_sta *link_sta,
struct napi_struct *napi,
struct iwl_mld_baid_data *baid_data,
struct iwl_mld_reorder_buffer *reorder_buf,
@@ -32,7 +33,7 @@ iwl_mld_reorder_release_frames(struct iwl_mld *mld, struct ieee80211_sta *sta,
while ((skb = __skb_dequeue(skb_list))) {
iwl_mld_pass_packet_to_mac80211(mld, napi, skb,
reorder_buf->queue,
- sta);
+ link_sta);
reorder_buf->num_stored--;
}
}
@@ -74,7 +75,7 @@ static void iwl_mld_release_frames_from_notif(struct iwl_mld *mld,
reorder_buf = &ba_data->reorder_buf[queue];
- iwl_mld_reorder_release_frames(mld, link_sta->sta, napi, ba_data,
+ iwl_mld_reorder_release_frames(mld, link_sta, napi, ba_data,
reorder_buf, nssn);
out_unlock:
rcu_read_unlock();
@@ -180,7 +181,7 @@ void iwl_mld_del_ba(struct iwl_mld *mld, int queue,
reorder_buf = &ba_data->reorder_buf[queue];
/* release all frames that are in the reorder buffer to the stack */
- iwl_mld_reorder_release_frames(mld, link_sta->sta, NULL,
+ iwl_mld_reorder_release_frames(mld, link_sta, NULL,
ba_data, reorder_buf,
ieee80211_sn_add(reorder_buf->head_sn,
ba_data->buf_size));
@@ -193,7 +194,7 @@ out_unlock:
*/
enum iwl_mld_reorder_result
iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
- int queue, struct ieee80211_sta *sta,
+ int queue, struct ieee80211_link_sta *link_sta,
struct sk_buff *skb, struct iwl_rx_mpdu_desc *desc)
{
struct ieee80211_hdr *hdr = (void *)skb_mac_header(skb);
@@ -228,12 +229,12 @@ iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
return IWL_MLD_PASS_SKB;
/* no sta yet */
- if (IWL_FW_CHECK(mld, !sta,
+ if (IWL_FW_CHECK(mld, !link_sta,
"Got valid BAID without a valid station assigned - %d\n",
baid))
return IWL_MLD_PASS_SKB;
- mld_sta = iwl_mld_sta_from_mac80211(sta);
+ mld_sta = iwl_mld_sta_from_mac80211(link_sta->sta);
/* not a data packet */
if (!ieee80211_is_data_qos(hdr->frame_control) ||
@@ -324,7 +325,7 @@ iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
* will be released when the frame release notification arrives.
*/
if (!amsdu || last_subframe)
- iwl_mld_reorder_release_frames(mld, sta, napi, baid_data,
+ iwl_mld_reorder_release_frames(mld, link_sta, napi, baid_data,
buffer, nssn);
else if (buffer->num_stored == 1)
buffer->head_sn = nssn;
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/agg.h b/drivers/net/wireless/intel/iwlwifi/mld/agg.h
index 651c80d1c7cd..c6cd5fa219be 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/agg.h
+++ b/drivers/net/wireless/intel/iwlwifi/mld/agg.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
- * Copyright (C) 2024 Intel Corporation
+ * Copyright (C) 2024, 2026 Intel Corporation
*/
#ifndef __iwl_agg_h__
#define __iwl_agg_h__
@@ -106,7 +106,7 @@ int iwl_mld_ampdu_rx_stop(struct iwl_mld *mld, struct ieee80211_sta *sta,
enum iwl_mld_reorder_result
iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
- int queue, struct ieee80211_sta *sta,
+ int queue, struct ieee80211_link_sta *link_sta,
struct sk_buff *skb, struct iwl_rx_mpdu_desc *desc);
void iwl_mld_handle_frame_release_notif(struct iwl_mld *mld,
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/rx.c b/drivers/net/wireless/intel/iwlwifi/mld/rx.c
index 269439d789f4..02bdf6ccbcdc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/rx.c
@@ -47,7 +47,8 @@ iwl_mld_fill_phy_data_from_mpdu(struct iwl_mld *mld,
}
static inline int iwl_mld_check_pn(struct iwl_mld *mld, struct sk_buff *skb,
- int queue, struct ieee80211_sta *sta)
+ int queue,
+ struct ieee80211_link_sta *link_sta)
{
struct ieee80211_hdr *hdr = (void *)skb_mac_header(skb);
struct ieee80211_rx_status *stats = IEEE80211_SKB_RXCB(skb);
@@ -71,13 +72,13 @@ static inline int iwl_mld_check_pn(struct iwl_mld *mld, struct sk_buff *skb,
return 0;
/* if we are here - this for sure is either CCMP or GCMP */
- if (!sta) {
+ if (!link_sta) {
IWL_DEBUG_DROP(mld,
"expected hw-decrypted unicast frame for station\n");
return -1;
}
- mld_sta = iwl_mld_sta_from_mac80211(sta);
+ mld_sta = iwl_mld_sta_from_mac80211(link_sta->sta);
extiv = (u8 *)hdr + ieee80211_hdrlen(hdr->frame_control);
keyidx = extiv[3] >> 6;
@@ -119,17 +120,17 @@ static inline int iwl_mld_check_pn(struct iwl_mld *mld, struct sk_buff *skb,
void iwl_mld_pass_packet_to_mac80211(struct iwl_mld *mld,
struct napi_struct *napi,
struct sk_buff *skb, int queue,
- struct ieee80211_sta *sta)
+ struct ieee80211_link_sta *link_sta)
{
KUNIT_STATIC_STUB_REDIRECT(iwl_mld_pass_packet_to_mac80211,
- mld, napi, skb, queue, sta);
+ mld, napi, skb, queue, link_sta);
- if (unlikely(iwl_mld_check_pn(mld, skb, queue, sta))) {
+ if (unlikely(iwl_mld_check_pn(mld, skb, queue, link_sta))) {
kfree_skb(skb);
return;
}
- ieee80211_rx_napi(mld->hw, sta, skb, napi);
+ ieee80211_rx_napi(mld->hw, link_sta, skb, napi);
}
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mld_pass_packet_to_mac80211);
@@ -1728,7 +1729,7 @@ static void iwl_mld_update_last_rx_timestamp(struct iwl_mld *mld, u8 baid)
* Sets *drop to true if the packet should be dropped.
* Returns the station if found, or NULL otherwise.
*/
-static struct ieee80211_sta *
+static struct ieee80211_link_sta *
iwl_mld_rx_with_sta(struct iwl_mld *mld, struct ieee80211_hdr *hdr,
struct sk_buff *skb,
const struct iwl_rx_mpdu_desc *mpdu_desc,
@@ -1764,11 +1765,6 @@ iwl_mld_rx_with_sta(struct iwl_mld *mld, struct ieee80211_hdr *hdr,
rx_status = IEEE80211_SKB_RXCB(skb);
- if (link_sta && sta->valid_links) {
- rx_status->link_valid = true;
- rx_status->link_id = link_sta->link_id;
- }
-
/* fill checksum */
if (ieee80211_is_data(hdr->frame_control) &&
pkt->len_n_flags & cpu_to_le32(FH_RSCSR_RPA_EN)) {
@@ -1803,10 +1799,10 @@ iwl_mld_rx_with_sta(struct iwl_mld *mld, struct ieee80211_hdr *hdr,
queue);
}
- return sta;
+ return link_sta;
}
-static int iwl_mld_rx_mgmt_prot(struct ieee80211_sta *sta,
+static int iwl_mld_rx_mgmt_prot(struct ieee80211_link_sta *link_sta,
struct ieee80211_hdr *hdr,
struct ieee80211_rx_status *rx_status,
u32 mpdu_status,
@@ -1820,7 +1816,6 @@ static int iwl_mld_rx_mgmt_prot(struct ieee80211_sta *sta,
struct ieee80211_key_conf *key;
const u8 *frame = (void *)hdr;
const u8 *mmie;
- u8 link_id;
if ((mpdu_status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
IWL_RX_MPDU_STATUS_SEC_NONE)
@@ -1836,10 +1831,10 @@ static int iwl_mld_rx_mgmt_prot(struct ieee80211_sta *sta,
if (!ieee80211_is_beacon(hdr->frame_control))
return 0;
- if (!sta)
+ if (!link_sta)
return -1;
- mld_sta = iwl_mld_sta_from_mac80211(sta);
+ mld_sta = iwl_mld_sta_from_mac80211(link_sta->sta);
mld_vif = iwl_mld_vif_from_mac80211(mld_sta->vif);
/* key mismatch - will also report !MIC_OK but we shouldn't count it */
@@ -1853,8 +1848,7 @@ static int iwl_mld_rx_mgmt_prot(struct ieee80211_sta *sta,
return 0;
}
- link_id = rx_status->link_valid ? rx_status->link_id : 0;
- link = rcu_dereference(mld_vif->link[link_id]);
+ link = rcu_dereference(mld_vif->link[link_sta->link_id]);
if (WARN_ON_ONCE(!link))
return -1;
@@ -1905,7 +1899,7 @@ report:
}
static int iwl_mld_rx_crypto(struct iwl_mld *mld,
- struct ieee80211_sta *sta,
+ struct ieee80211_link_sta *link_sta,
struct ieee80211_hdr *hdr,
struct ieee80211_rx_status *rx_status,
struct iwl_rx_mpdu_desc *desc, int queue,
@@ -1915,7 +1909,7 @@ static int iwl_mld_rx_crypto(struct iwl_mld *mld,
if (unlikely(ieee80211_is_mgmt(hdr->frame_control) &&
!ieee80211_has_protected(hdr->frame_control)))
- return iwl_mld_rx_mgmt_prot(sta, hdr, rx_status, status,
+ return iwl_mld_rx_mgmt_prot(link_sta, hdr, rx_status, status,
le16_to_cpu(desc->mpdu_len));
if (!ieee80211_has_protected(hdr->frame_control) ||
@@ -2023,7 +2017,7 @@ void iwl_mld_rx_mpdu(struct iwl_mld *mld, struct napi_struct *napi,
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_mld_rx_phy_data phy_data = {};
struct iwl_rx_mpdu_desc *mpdu_desc = (void *)pkt->data;
- struct ieee80211_sta *sta;
+ struct ieee80211_link_sta *link_sta;
struct ieee80211_hdr *hdr;
struct sk_buff *skb;
size_t mpdu_desc_size = sizeof(*mpdu_desc);
@@ -2086,7 +2080,8 @@ void iwl_mld_rx_mpdu(struct iwl_mld *mld, struct napi_struct *napi,
rcu_read_lock();
- sta = iwl_mld_rx_with_sta(mld, hdr, skb, mpdu_desc, pkt, queue, &drop);
+ link_sta = iwl_mld_rx_with_sta(mld, hdr, skb, mpdu_desc, pkt, queue,
+ &drop);
if (drop)
goto drop;
@@ -2127,7 +2122,7 @@ void iwl_mld_rx_mpdu(struct iwl_mld *mld, struct napi_struct *napi,
iwl_mld_rx_fill_status(mld, link_id, hdr, skb, &phy_data);
- if (iwl_mld_rx_crypto(mld, sta, hdr, rx_status, mpdu_desc, queue,
+ if (iwl_mld_rx_crypto(mld, link_sta, hdr, rx_status, mpdu_desc, queue,
le32_to_cpu(pkt->len_n_flags), &crypto_len))
goto drop;
@@ -2140,7 +2135,8 @@ void iwl_mld_rx_mpdu(struct iwl_mld *mld, struct napi_struct *napi,
if (iwl_mld_time_sync_frame(mld, skb, hdr->addr2))
goto out;
- reorder_res = iwl_mld_reorder(mld, napi, queue, sta, skb, mpdu_desc);
+ reorder_res = iwl_mld_reorder(mld, napi, queue, link_sta, skb,
+ mpdu_desc);
switch (reorder_res) {
case IWL_MLD_PASS_SKB:
break;
@@ -2153,7 +2149,7 @@ void iwl_mld_rx_mpdu(struct iwl_mld *mld, struct napi_struct *napi,
goto drop;
}
- iwl_mld_pass_packet_to_mac80211(mld, napi, skb, queue, sta);
+ iwl_mld_pass_packet_to_mac80211(mld, napi, skb, queue, link_sta);
goto out;
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/rx.h b/drivers/net/wireless/intel/iwlwifi/mld/rx.h
index 573b89c3c9c6..b08c5ade3db8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/rx.h
+++ b/drivers/net/wireless/intel/iwlwifi/mld/rx.h
@@ -69,7 +69,7 @@ void iwl_mld_handle_rsc_notif(struct iwl_mld *mld,
void iwl_mld_pass_packet_to_mac80211(struct iwl_mld *mld,
struct napi_struct *napi,
struct sk_buff *skb, int queue,
- struct ieee80211_sta *sta);
+ struct ieee80211_link_sta *link_sta);
void iwl_mld_handle_phy_air_sniffer_notif(struct iwl_mld *mld,
struct napi_struct *napi,
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c b/drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c
index 29b0248cec3d..e9efe2996f07 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c
@@ -2,7 +2,7 @@
/*
* KUnit tests for channel helper functions
*
- * Copyright (C) 2024-2025 Intel Corporation
+ * Copyright (C) 2024-2026 Intel Corporation
*/
#include <kunit/test.h>
#include <kunit/static_stub.h>
@@ -441,7 +441,7 @@ static void
fake_iwl_mld_pass_packet_to_mac80211(struct iwl_mld *mld,
struct napi_struct *napi,
struct sk_buff *skb, int queue,
- struct ieee80211_sta *sta)
+ struct ieee80211_link_sta *link_sta)
{
__skb_queue_tail(&g_released_skbs, skb);
g_num_released_skbs++;
@@ -630,7 +630,8 @@ static void test_reorder_buffer(struct kunit *test)
mpdu_desc = setup_mpdu_desc();
rcu_read_lock();
- reorder_res = iwl_mld_reorder(mld, NULL, QUEUE, sta, skb, mpdu_desc);
+ reorder_res = iwl_mld_reorder(mld, NULL, QUEUE, &sta->deflink, skb,
+ mpdu_desc);
rcu_read_unlock();
KUNIT_ASSERT_EQ(test, reorder_res, param->expected.reorder_res);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index ab1eb2eb0c3c..8c197a090c2b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -90,7 +90,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
fraglen, rxb->truesize);
}
- ieee80211_rx_napi(mvm->hw, sta, skb, napi);
+ ieee80211_rx_napi(mvm->hw, sta ? &sta->deflink : NULL, skb, napi);
}
/*
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 7f0b4f5daa21..8c4009d3a00c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2012-2014, 2018-2025 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2026 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2015-2017 Intel Deutschland GmbH
*/
@@ -243,7 +243,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
return;
}
- ieee80211_rx_napi(mvm->hw, sta, skb, napi);
+ ieee80211_rx_napi(mvm->hw, sta ? &sta->deflink : NULL, skb, napi);
}
static bool iwl_mvm_used_average_energy(struct iwl_mvm *mvm,
@@ -2528,7 +2528,7 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi,
}
rcu_read_lock();
- ieee80211_rx_napi(mvm->hw, sta, skb, napi);
+ ieee80211_rx_napi(mvm->hw, sta ? &sta->deflink : NULL, skb, napi);
rcu_read_unlock();
}
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index abbe65cbcd89..cda5c5d51aab 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1255,11 +1255,12 @@ EXPORT_SYMBOL(mt76_rx_signal);
static void
mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb,
struct ieee80211_hw **hw,
- struct ieee80211_sta **sta)
+ struct ieee80211_link_sta **link_sta)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb);
struct mt76_rx_status mstat;
+ struct ieee80211_sta *sta;
mstat = *((struct mt76_rx_status *)skb->cb);
memset(status, 0, sizeof(*status));
@@ -1301,12 +1302,14 @@ mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb,
memcpy(status->chain_signal, mstat.chain_signal,
sizeof(mstat.chain_signal));
- if (mstat.wcid) {
- status->link_valid = mstat.wcid->link_valid;
- status->link_id = mstat.wcid->link_id;
- }
+ sta = wcid_to_sta(mstat.wcid);
+ if (!sta)
+ *link_sta = NULL;
+ else if (mstat.wcid->link_valid)
+ *link_sta = rcu_dereference(sta->link[mstat.wcid->link_id]);
+ else
+ *link_sta = &sta->deflink;
- *sta = wcid_to_sta(mstat.wcid);
*hw = mt76_phy_hw(dev, mstat.phy_idx);
}
@@ -1530,7 +1533,7 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
struct napi_struct *napi)
{
- struct ieee80211_sta *sta;
+ struct ieee80211_link_sta *link_sta;
struct ieee80211_hw *hw;
struct sk_buff *skb, *tmp;
LIST_HEAD(list);
@@ -1541,8 +1544,8 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
mt76_check_ccmp_pn(skb);
skb_shinfo(skb)->frag_list = NULL;
- mt76_rx_convert(dev, skb, &hw, &sta);
- ieee80211_rx_list(hw, sta, skb, &list);
+ mt76_rx_convert(dev, skb, &hw, &link_sta);
+ ieee80211_rx_list(hw, link_sta, skb, &list);
/* subsequent amsdu frames */
while (nskb) {
@@ -1550,8 +1553,8 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
nskb = nskb->next;
skb->next = NULL;
- mt76_rx_convert(dev, skb, &hw, &sta);
- ieee80211_rx_list(hw, sta, skb, &list);
+ mt76_rx_convert(dev, skb, &hw, &link_sta);
+ ieee80211_rx_list(hw, link_sta, skb, &list);
}
}
spin_unlock(&dev->rx_lock);
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 397ebbfcac09..454d876aeb88 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -3073,10 +3073,8 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,
struct rtw89_vif *rtwvif = vif_to_rtwvif(vif);
struct rtw89_rx_desc_info *desc_info = iter_data->desc_info;
struct sk_buff *skb = iter_data->skb;
- struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct rtw89_rx_phy_ppdu *phy_ppdu = iter_data->phy_ppdu;
- bool is_mld = ieee80211_vif_is_mld(vif);
struct ieee80211_bss_conf *bss_conf;
struct rtw89_vif_link *rtwvif_link;
const u8 *bssid = iter_data->bssid;
@@ -3110,11 +3108,6 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,
if (!ether_addr_equal(target_bssid, bssid))
goto out;
- if (is_mld) {
- rx_status->link_valid = true;
- rx_status->link_id = rtwvif_link->link_id;
- }
-
bb = rtw89_get_bb_ctx(rtwdev, rtwvif_link->phy_idx);
pkt_stat = &bb->cur_pkt_stat;
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
index 9430765b8c3f..d567ed8d45a4 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
@@ -1883,9 +1883,6 @@ static void mac80211_hwsim_rx(struct mac80211_hwsim_data *data,
sp->active_links_rx &= ~BIT(link_id);
else
sp->active_links_rx |= BIT(link_id);
-
- rx_status->link_valid = true;
- rx_status->link_id = link_id;
}
rcu_read_unlock();
}
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 5fb86595e8bd..30a51c365ce8 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -80,7 +80,7 @@ static void pmem_mkpage_present(struct pmem_device *pmem, phys_addr_t offset,
* here since we're in the driver I/O path and
* outstanding I/O requests pin the dev_pagemap.
*/
- if (TestClearPageHWPoison(page))
+ if (test_and_clear_pmem_poison(page))
clear_mce_nospec(pfn);
}
}
diff --git a/drivers/nvdimm/pmem.h b/drivers/nvdimm/pmem.h
index 76870505dd79..a48509f90196 100644
--- a/drivers/nvdimm/pmem.h
+++ b/drivers/nvdimm/pmem.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NVDIMM_PMEM_H__
#define __NVDIMM_PMEM_H__
+#include <linux/page-flags.h>
#include <linux/badblocks.h>
#include <linux/memremap.h>
#include <linux/types.h>
@@ -30,4 +31,15 @@ long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff,
long nr_pages, enum dax_access_mode mode, void **kaddr,
unsigned long *pfn);
+#ifdef CONFIG_MEMORY_FAILURE
+static inline bool test_and_clear_pmem_poison(struct page *page)
+{
+ return TestClearPageHWPoison(page);
+}
+#else
+static inline bool test_and_clear_pmem_poison(struct page *page)
+{
+ return false;
+}
+#endif
#endif /* __NVDIMM_PMEM_H__ */
diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index 593388f29bdd..ea29c9833491 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -1039,6 +1039,7 @@ static void dw_pcie_edma_init_data(struct dw_pcie *pci)
pci->edma.ops = &dw_pcie_edma_ops;
pci->edma.flags |= DW_EDMA_CHIP_LOCAL;
+ pci->edma.ch_space_sz = 256;
}
static int dw_pcie_edma_find_mf(struct dw_pcie *pci)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
index 5fd4a4eba654..9412fd36a4aa 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
@@ -421,6 +421,7 @@ static void lpi_gpio_dbg_show_one(struct seq_file *s,
struct pinctrl_pin_desc pindesc;
unsigned int func;
int is_out;
+ int value;
int drive;
int pull;
u32 ctl_reg;
@@ -443,7 +444,10 @@ static void lpi_gpio_dbg_show_one(struct seq_file *s,
drive = FIELD_GET(LPI_GPIO_OUT_STRENGTH_MASK, ctl_reg);
pull = FIELD_GET(LPI_GPIO_PULL_MASK, ctl_reg);
- seq_printf(s, " %-8s: %-3s %d", pindesc.name, is_out ? "out" : "in", func);
+ value = lpi_gpio_get(chip, offset);
+
+ seq_printf(s, " %-8s: %-3s", pindesc.name, is_out ? "out" : "in");
+ seq_printf(s, " %-4s func%d", str_high_low(value), func);
seq_printf(s, " %dmA", lpi_regval_to_drive(drive));
seq_printf(s, " %s", pulls[pull]);
}
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 6d58b1465081..80c2a0f15b80 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -96,13 +96,13 @@ static int pnp_device_probe(struct device *dev)
if (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)) {
error = pnp_activate_dev(pnp_dev);
if (error < 0)
- return error;
+ goto fail;
}
} else if ((pnp_drv->flags & PNP_DRIVER_RES_DISABLE)
== PNP_DRIVER_RES_DISABLE) {
error = pnp_disable_dev(pnp_dev);
if (error < 0)
- return error;
+ goto fail;
}
error = 0;
if (pnp_drv->probe) {
diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 5b56b2dcc725..73500fdc227d 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -83,9 +83,7 @@ config OMAP_REMOTEPROC
select OMAP2PLUS_MBOX
help
Say y here to support OMAP's remote processors (dual M3
- and DSP on OMAP4) via the remote processor framework.
-
- Currently only supported on OMAP4.
+ and DSP) via the remote processor framework.
Usually you want to say Y here, in order to enable multimedia
use-cases to run on your platform (multimedia codecs are
@@ -108,7 +106,7 @@ config OMAP_REMOTEPROC_WATCHDOG
config WKUP_M3_RPROC
tristate "AMx3xx Wakeup M3 remoteproc support"
- depends on SOC_AM33XX || SOC_AM43XX
+ depends on SOC_AM33XX || SOC_AM43XX || COMPILE_TEST
help
Say y here to support Wakeup M3 remote processor on TI AM33xx
and AM43xx family of SoCs.
@@ -120,7 +118,7 @@ config WKUP_M3_RPROC
config DA8XX_REMOTEPROC
tristate "DA8xx/OMAP-L13x remoteproc support"
- depends on ARCH_DAVINCI_DA8XX
+ depends on ARCH_DAVINCI_DA8XX || COMPILE_TEST
depends on DMA_CMA
help
Say y here to support DA8xx/OMAP-L13x remote processors via the
@@ -141,7 +139,7 @@ config DA8XX_REMOTEPROC
config KEYSTONE_REMOTEPROC
tristate "Keystone Remoteproc support"
- depends on ARCH_KEYSTONE
+ depends on ARCH_KEYSTONE || COMPILE_TEST
help
Say Y here here to support Keystone remote processors (DSP)
via the remote processor framework.
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 6ed0f28edac9..1e96506ce7ca 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -499,7 +499,7 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data)
client);
struct device *dev = oproc->rproc->dev.parent;
const char *name = oproc->rproc->name;
- u32 msg = (u32)data;
+ mbox_msg_t msg = omap_mbox_from_message(data);
dev_dbg(dev, "mbox msg: 0x%x\n", msg);
@@ -550,7 +550,7 @@ static void omap_rproc_kick(struct rproc *rproc, int vqid)
}
/* send the index of the triggered virtqueue in the mailbox payload */
- ret = mbox_send_message(oproc->mbox, (void *)vqid);
+ ret = mbox_send_message(oproc->mbox, omap_mbox_to_message(vqid));
if (ret < 0)
dev_err(dev, "failed to send mailbox message, status = %d\n",
ret);
@@ -628,7 +628,7 @@ static int omap_rproc_start(struct rproc *rproc)
* Note that the reply will _not_ arrive immediately: this message
* will wait in the mailbox fifo until the remote processor is booted.
*/
- ret = mbox_send_message(oproc->mbox, (void *)RP_MBOX_ECHO_REQUEST);
+ ret = mbox_send_message(oproc->mbox, omap_mbox_to_message(RP_MBOX_ECHO_REQUEST));
if (ret < 0) {
dev_err(dev, "mbox_send_message failed: %d\n", ret);
goto put_mbox;
@@ -777,13 +777,13 @@ static int _omap_rproc_suspend(struct rproc *rproc, bool auto_suspend)
struct omap_rproc *oproc = rproc->priv;
unsigned long to = msecs_to_jiffies(DEF_SUSPEND_TIMEOUT);
unsigned long ta = jiffies + to;
- u32 suspend_msg = auto_suspend ?
+ mbox_msg_t suspend_msg = auto_suspend ?
RP_MBOX_SUSPEND_AUTO : RP_MBOX_SUSPEND_SYSTEM;
int ret;
reinit_completion(&oproc->pm_comp);
oproc->suspend_acked = false;
- ret = mbox_send_message(oproc->mbox, (void *)suspend_msg);
+ ret = mbox_send_message(oproc->mbox, omap_mbox_to_message(suspend_msg));
if (ret < 0) {
dev_err(dev, "PM mbox_send_message failed: %d\n", ret);
return ret;
@@ -1208,7 +1208,7 @@ static int omap_rproc_of_get_internal_memories(struct platform_device *pdev,
oproc->mem[i].dev_addr = data->mems[i].dev_addr;
oproc->mem[i].size = resource_size(res);
- dev_dbg(dev, "memory %8s: bus addr %pa size 0x%x va %p da 0x%x\n",
+ dev_dbg(dev, "memory %8s: bus addr %pa size 0x%zx va %p da 0x%x\n",
data->mems[i].name, &oproc->mem[i].bus_addr,
oproc->mem[i].size, oproc->mem[i].cpu_addr,
oproc->mem[i].dev_addr);
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index d131b82af320..4bf69003b7da 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -574,6 +574,9 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr,
/* create the debugfs entry */
trace->tfile = rproc_create_trace_file(name, rproc, trace);
+ /* keep the name for the diagnostic in rproc_trace_read() */
+ strscpy(trace->trace_mem.name, name, sizeof(trace->trace_mem.name));
+
list_add_tail(&trace->node, &rproc->traces);
rproc->num_traces++;
diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c
index 925b0cdbe577..c37736ff4acc 100644
--- a/drivers/remoteproc/remoteproc_sysfs.c
+++ b/drivers/remoteproc/remoteproc_sysfs.c
@@ -76,7 +76,7 @@ static const char * const rproc_coredump_str[] = {
[RPROC_COREDUMP_INLINE] = "inline",
};
-/* Expose the current coredump configuration via debugfs */
+/* Expose the current coredump configuration via sysfs */
static ssize_t coredump_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -87,14 +87,15 @@ static ssize_t coredump_show(struct device *dev,
/*
* By writing to the 'coredump' sysfs entry, we control the behavior of the
- * coredump mechanism dynamically. The default value of this entry is "default".
+ * coredump mechanism dynamically. The default value of this entry is
+ * "disabled".
*
* The 'coredump' sysfs entry supports these commands:
*
* disabled: This is the default coredump mechanism. Recovery will proceed
* without collecting any dump.
*
- * default: When the remoteproc crashes the entire coredump will be
+ * enabled: When the remoteproc crashes the entire coredump will be
* copied to a separate buffer and exposed to userspace.
*
* inline: The coredump will not be copied to a separate buffer and the
diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
index 3cb8ae5d72f6..4b6da3363f6c 100644
--- a/drivers/remoteproc/ti_k3_common.c
+++ b/drivers/remoteproc/ti_k3_common.c
@@ -54,7 +54,7 @@ void k3_rproc_mbox_callback(struct mbox_client *client, void *data)
struct k3_rproc *kproc = container_of(client, struct k3_rproc, client);
struct device *dev = kproc->rproc->dev.parent;
struct rproc *rproc = kproc->rproc;
- u32 msg = (u32)(uintptr_t)(data);
+ mbox_msg_t msg = omap_mbox_from_message(data);
dev_dbg(dev, "mbox msg: 0x%x\n", msg);
@@ -94,15 +94,9 @@ void k3_rproc_kick(struct rproc *rproc, int vqid)
{
struct k3_rproc *kproc = rproc->priv;
struct device *dev = kproc->dev;
- u32 msg = (u32)vqid;
int ret;
- /*
- * Send the index of the triggered virtqueue in the mailbox payload.
- * NOTE: msg is cast to uintptr_t to prevent compiler warnings when
- * void* is 64bit. It is safely cast back to u32 in the mailbox driver.
- */
- ret = mbox_send_message(kproc->mbox, (void *)(uintptr_t)msg);
+ ret = mbox_send_message(kproc->mbox, omap_mbox_to_message(vqid));
if (ret < 0)
dev_err(dev, "failed to send mailbox message, status = %d\n",
ret);
diff --git a/drivers/remoteproc/ti_k3_common.h b/drivers/remoteproc/ti_k3_common.h
index aee3c28dbe51..c8430e42225f 100644
--- a/drivers/remoteproc/ti_k3_common.h
+++ b/drivers/remoteproc/ti_k3_common.h
@@ -21,6 +21,10 @@
#ifndef REMOTEPROC_TI_K3_COMMON_H
#define REMOTEPROC_TI_K3_COMMON_H
+#include <linux/mailbox_client.h>
+#include <linux/platform_device.h>
+#include <linux/types.h>
+
#define KEYSTONE_RPROC_LOCAL_ADDRESS_MASK (SZ_16M - 1)
/**
diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
index c0ccf87dbb6f..6582c7404e54 100644
--- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
@@ -7,11 +7,8 @@
*/
#include <linux/io.h>
-#include <linux/mailbox_client.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_reserved_mem.h>
-#include <linux/omap-mailbox.h>
#include <linux/platform_device.h>
#include <linux/remoteproc.h>
#include <linux/reset.h>
diff --git a/drivers/remoteproc/ti_k3_m4_remoteproc.c b/drivers/remoteproc/ti_k3_m4_remoteproc.c
index 3a11fd24eb52..4c46f4a256a9 100644
--- a/drivers/remoteproc/ti_k3_m4_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_m4_remoteproc.c
@@ -7,10 +7,8 @@
*/
#include <linux/io.h>
-#include <linux/mailbox_client.h>
#include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_reserved_mem.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/remoteproc.h>
#include <linux/reset.h>
diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 365b4e4c4b50..d7d9756afed0 100644
--- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
@@ -6,17 +6,12 @@
* Suman Anna <s-anna@ti.com>
*/
-#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
-#include <linux/mailbox_client.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_reserved_mem.h>
#include <linux/of_platform.h>
-#include <linux/omap-mailbox.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/remoteproc.h>
diff --git a/drivers/spi/spi-virtio.c b/drivers/spi/spi-virtio.c
index 87ce32b6d133..5fad937eadc8 100644
--- a/drivers/spi/spi-virtio.c
+++ b/drivers/spi/spi-virtio.c
@@ -166,7 +166,7 @@ static int virtio_spi_transfer_one(struct spi_controller *ctrl,
/* Fill struct spi_transfer_head */
th->chip_select_id = spi_get_chipselect(spi, 0);
- th->bits_per_word = spi->bits_per_word;
+ th->bits_per_word = xfer->bits_per_word;
th->cs_change = xfer->cs_change;
th->tx_nbits = xfer->tx_nbits;
th->rx_nbits = xfer->rx_nbits;
diff --git a/drivers/tee/qcomtee/async.c b/drivers/tee/qcomtee/async.c
index 31bff4309e67..5849e5161203 100644
--- a/drivers/tee/qcomtee/async.c
+++ b/drivers/tee/qcomtee/async.c
@@ -97,10 +97,10 @@ static void qcomtee_get_async_buffer(struct qcomtee_object_invoke_ctx *oic,
/**
* async_release() - Process QTEE async release requests.
* @oic: context used for the current invocation.
- * @msg: async message for object release.
+ * @async_msg: async message for object release.
* @size: size of the async buffer available.
*
- * Return: Size of the outbound buffer used when processing @msg.
+ * Return: Size of the outbound buffer used when processing @async_msg.
*/
static size_t async_release(struct qcomtee_object_invoke_ctx *oic,
struct qcomtee_async_msg_hdr *async_msg,
diff --git a/drivers/tee/qcomtee/qcomtee_msg.h b/drivers/tee/qcomtee/qcomtee_msg.h
index 878f70178a5b..5d7b21fdd368 100644
--- a/drivers/tee/qcomtee/qcomtee_msg.h
+++ b/drivers/tee/qcomtee/qcomtee_msg.h
@@ -112,7 +112,7 @@ union qcomtee_msg_arg {
/**
* struct qcomtee_msg_object_invoke - Direct object invocation message.
- * @ctx: object ID hosted in QTEE.
+ * @cxt: object ID hosted in QTEE.
* @op: operation for the object.
* @counts: number of different types of arguments in @args.
* @args: array of arguments.
diff --git a/drivers/tee/qcomtee/qcomtee_object.h b/drivers/tee/qcomtee/qcomtee_object.h
index 8b4401ecad48..d5de02dcef3b 100644
--- a/drivers/tee/qcomtee/qcomtee_object.h
+++ b/drivers/tee/qcomtee/qcomtee_object.h
@@ -74,6 +74,7 @@ enum qcomtee_object_type {
* @QCOMTEE_ARG_TYPE_OO: output object (OO).
* @QCOMTEE_ARG_TYPE_IB: input buffer (IB).
* @QCOMTEE_ARG_TYPE_IO: input object (IO).
+ * @QCOMTEE_ARG_TYPE_NR: number of argument types.
*
* Use the invalid type to specify the end of the argument array.
*/
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index 12c88509a54f..24611f05b3cd 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -788,21 +788,6 @@ int tb_domain_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
transmit_ring, receive_path, receive_ring);
}
-static void tb_domain_reset_interface(struct tb *tb)
-{
- struct tb_nhi *nhi = tb->nhi;
-
- if (!nhi->ops->reset_interface)
- return;
-
- guard(mutex)(&tb->lock);
-
- /* The reset clears the ring state so stop the control channel */
- tb_ctl_stop(tb->ctl);
- nhi->ops->reset_interface(nhi);
- tb_ctl_start(tb->ctl);
-}
-
/**
* tb_domain_disconnect_xdomain_paths() - Disable DMA paths for XDomain
* @tb: Domain disabling the DMA paths
@@ -825,20 +810,11 @@ int tb_domain_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
int transmit_path, int transmit_ring,
int receive_path, int receive_ring)
{
- int ret;
-
if (!tb->cm_ops->disconnect_xdomain_paths)
return -ENOTSUPP;
- ret = tb->cm_ops->disconnect_xdomain_paths(tb, xd, transmit_path,
+ return tb->cm_ops->disconnect_xdomain_paths(tb, xd, transmit_path,
transmit_ring, receive_path, receive_ring);
- if (ret)
- return ret;
-
- if (tb->nhi->quirks & QUIRK_RESET_DMA_ON_TEARDOWN)
- tb_domain_reset_interface(tb);
-
- return 0;
}
static int disconnect_xdomain(struct device *dev, void *data)
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 020db5a1f029..e99a3fcc4a29 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -1267,32 +1267,6 @@ static void nhi_reset(struct tb_nhi *nhi)
dev_warn(nhi->dev, "timeout resetting host router\n");
}
-/**
- * nhi_reset_interface() - Reset the host interface
- * @nhi: Host interface to reset
- *
- * Brings the registers in the memory BAR back to their default state and
- * clears the End-to-End Flow Control state. The caller is responsible for
- * stopping the control channel over the reset because it clears the ring
- * state as well.
- */
-void nhi_reset_interface(struct tb_nhi *nhi)
-{
- u32 val;
-
- val = ioread32(nhi->iobase + REG_CAPS);
- /* Only v1 host interfaces implement the reset */
- if (FIELD_GET(REG_CAPS_VERSION_MASK, val) >= REG_CAPS_VERSION_2)
- return;
-
- dev_dbg(nhi->dev, "issuing host interface reset\n");
-
- iowrite32(REG_HOST_INTERFACE_RESET_RST,
- nhi->iobase + REG_HOST_INTERFACE_RESET);
- /* Wait for tHIReset (10 ms) to complete */
- usleep_range(10000, 20000);
-}
-
static struct tb *nhi_select_cm(struct tb_nhi *nhi)
{
bool linked = false;
diff --git a/drivers/thunderbolt/nhi.h b/drivers/thunderbolt/nhi.h
index b2e2e2c413b2..88af9ab9fde7 100644
--- a/drivers/thunderbolt/nhi.h
+++ b/drivers/thunderbolt/nhi.h
@@ -36,8 +36,6 @@ irqreturn_t nhi_msi(int irq, void *data);
irqreturn_t ring_msix(int irq, void *data);
int nhi_probe(struct tb_nhi *nhi);
void nhi_shutdown(struct tb_nhi *nhi);
-void nhi_reset_interface(struct tb_nhi *nhi);
-
extern const struct dev_pm_ops nhi_pm_ops;
/**
@@ -55,7 +53,6 @@ extern const struct dev_pm_ops nhi_pm_ops;
* @release_ring_irq: NHI specific interrupt release hook
* @is_present: Whether the device is currently present on the parent bus
* @init_interrupts: NHI specific interrupt initialization hook
- * @reset_interface: Resets the host interface
*/
struct tb_nhi_ops {
int (*init)(struct tb_nhi *nhi);
@@ -71,7 +68,6 @@ struct tb_nhi_ops {
void (*release_ring_irq)(struct tb_ring *ring);
bool (*is_present)(struct tb_nhi *nhi);
int (*init_interrupts)(struct tb_nhi *nhi);
- void (*reset_interface)(struct tb_nhi *nhi);
};
/*
@@ -122,24 +118,11 @@ struct tb_nhi_ops {
#define PCI_DEVICE_ID_INTEL_PTL_P_NHI0 0xe433
#define PCI_DEVICE_ID_INTEL_PTL_P_NHI1 0xe434
-#define PCI_DEVICE_ID_AMD_1AH_M60H_NHI0 0x1120
-#define PCI_DEVICE_ID_AMD_1AH_M60H_NHI1 0x1121
-#define PCI_DEVICE_ID_AMD_1AH_M68H_NHI0 0x113b
-#define PCI_DEVICE_ID_AMD_1AH_M68H_NHI1 0x113c
-#define PCI_DEVICE_ID_AMD_1AH_M80H_NHI0 0x1155
-#define PCI_DEVICE_ID_AMD_1AH_M80H_NHI1 0x1158
-#define PCI_DEVICE_ID_AMD_1AH_M80H_NHI2 0x1159
-#define PCI_DEVICE_ID_AMD_1AH_M24H_NHI0 0x151c
-#define PCI_DEVICE_ID_AMD_1AH_M24H_NHI1 0x151d
-#define PCI_DEVICE_ID_AMD_1AH_M70H_NHI0 0x158d
-#define PCI_DEVICE_ID_AMD_1AH_M70H_NHI1 0x158e
-
#define PCI_CLASS_SERIAL_USB_USB4 0x0c0340
/* Host interface quirks */
-#define QUIRK_AUTO_CLEAR_INT BIT(0)
-#define QUIRK_E2E BIT(1)
-#define QUIRK_RESET_DMA_ON_TEARDOWN BIT(2)
+#define QUIRK_AUTO_CLEAR_INT BIT(0)
+#define QUIRK_E2E BIT(1)
/*
* Minimal number of vectors when we use MSI-X. Two for control channel
diff --git a/drivers/thunderbolt/nhi_regs.h b/drivers/thunderbolt/nhi_regs.h
index 99df60b6db36..d6a197fabc74 100644
--- a/drivers/thunderbolt/nhi_regs.h
+++ b/drivers/thunderbolt/nhi_regs.h
@@ -115,10 +115,6 @@ struct ring_desc {
#define REG_CAPS_VERSION_MASK GENMASK(23, 16)
#define REG_CAPS_VERSION_2 0x40
-/* Host Interface Reset - resets TX/RX rings and E2E flow control counters */
-#define REG_HOST_INTERFACE_RESET 0x39858
-#define REG_HOST_INTERFACE_RESET_RST BIT(0)
-
#define REG_DMA_MISC 0x39864
#define REG_DMA_MISC_INT_AUTO_CLEAR BIT(2)
#define REG_DMA_MISC_DISABLE_AUTO_CLEAR BIT(17)
diff --git a/drivers/thunderbolt/pci.c b/drivers/thunderbolt/pci.c
index e40d4d6af071..4408229d8ac7 100644
--- a/drivers/thunderbolt/pci.c
+++ b/drivers/thunderbolt/pci.c
@@ -63,27 +63,6 @@ static void nhi_pci_check_quirks(struct tb_nhi_pci *nhi_pci)
nhi->quirks |= QUIRK_E2E;
break;
}
- } else if (pdev->vendor == PCI_VENDOR_ID_AMD) {
- switch (pdev->device) {
- case PCI_DEVICE_ID_AMD_1AH_M60H_NHI0:
- case PCI_DEVICE_ID_AMD_1AH_M60H_NHI1:
- case PCI_DEVICE_ID_AMD_1AH_M68H_NHI0:
- case PCI_DEVICE_ID_AMD_1AH_M68H_NHI1:
- case PCI_DEVICE_ID_AMD_1AH_M80H_NHI0:
- case PCI_DEVICE_ID_AMD_1AH_M80H_NHI1:
- case PCI_DEVICE_ID_AMD_1AH_M80H_NHI2:
- case PCI_DEVICE_ID_AMD_1AH_M24H_NHI0:
- case PCI_DEVICE_ID_AMD_1AH_M24H_NHI1:
- case PCI_DEVICE_ID_AMD_1AH_M70H_NHI0:
- case PCI_DEVICE_ID_AMD_1AH_M70H_NHI1:
- /*
- * These AMD hosts may hang the Tx ring when the
- * DMA paths are torn down so they need the host
- * interface reset after each teardown.
- */
- nhi->quirks |= QUIRK_RESET_DMA_ON_TEARDOWN;
- break;
- }
}
}
@@ -357,7 +336,6 @@ static const struct tb_nhi_ops pci_nhi_default_ops = {
.shutdown = nhi_pci_release_irq,
.is_present = nhi_pci_is_present,
.init_interrupts = nhi_pci_init_msi,
- .reset_interface = nhi_reset_interface,
};
/* Ice Lake specific NHI operations */
@@ -576,7 +554,6 @@ static const struct tb_nhi_ops icl_nhi_ops = {
.release_ring_irq = nhi_pci_ring_release_msix,
.is_present = nhi_pci_is_present,
.init_interrupts = nhi_pci_init_msi,
- .reset_interface = nhi_reset_interface,
};
static int nhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/fs/Kconfig b/fs/Kconfig
index 38dafec9e048..46313f65ee54 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -278,7 +278,7 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
def_bool HUGETLB_PAGE
depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
depends on SPARSEMEM_VMEMMAP
- select SPARSEMEM_VMEMMAP_OPTIMIZATION
+ select SPARSEMEM_VMEMMAP_PREINIT if ARCH_WANT_HUGETLB_VMEMMAP_PREINIT
config HUGETLB_PMD_PAGE_TABLE_SHARING
def_bool HUGETLB_PAGE
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 707cee4fd9a1..f303936446da 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -727,34 +727,19 @@ static bool isw_prepare_wbs_switch(struct bdi_writeback *new_wb,
struct inode_switch_wbs_context *isw,
struct list_head *list, int *nr)
{
- struct inode *inode, *tmp;
- LIST_HEAD(scanned);
- bool full = false;
-
- /*
- * Walk from the oldest end and move scanned inodes to the newest
- * end, so the next scan resumes at unscanned inodes instead of
- * re-walking an ever-growing run of prepared and skipped ones.
- * For b_dirty_time this keeps the oldest unscanned inode at the
- * end move_expired_inodes() picks from; b_attached is unordered.
- */
- list_for_each_entry_safe_reverse(inode, tmp, list, i_io_list) {
- list_move(&inode->i_io_list, &scanned);
+ struct inode *inode;
+ list_for_each_entry(inode, list, i_io_list) {
if (!inode_prepare_wbs_switch(inode, new_wb))
continue;
isw->inodes[*nr] = inode;
(*nr)++;
- if (*nr >= WB_MAX_INODES_PER_ISW - 1) {
- full = true;
- break;
- }
+ if (*nr >= WB_MAX_INODES_PER_ISW - 1)
+ return true;
}
- list_splice(&scanned, list);
-
- return full;
+ return false;
}
/**
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 1e0de37b2411..678f4c5329e7 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -2077,7 +2077,8 @@ iomap_writepages(struct iomap_writepage_ctx *wpc)
* Writeback from reclaim context should never happen except in the case
* of a VM regression so warn about it and refuse to write the data.
*/
- if (WARN_ON_ONCE((current->flags & PF_MEMALLOC)))
+ if (WARN_ON_ONCE((current->flags & (PF_MEMALLOC | PF_KSWAPD)) ==
+ PF_MEMALLOC))
return -EIO;
while ((folio = writeback_iter(mapping, wpc->wbc, folio, &error))) {
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index c7c09a751c6a..b01cbc9eea4a 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -4234,12 +4234,14 @@ static int ntfs_attr_make_resident(struct ntfs_inode *ni, struct ntfs_attr_searc
* ntfs_non_resident_attr_shrink - shrink a non-resident, open ntfs attribute
* @ni: non-resident ntfs attribute to shrink
* @newsize: new size (in bytes) to which to shrink the attribute
+ * @pagecache_truncated: page cache was already truncated to @newsize
*
* Reduce the size of a non-resident, open ntfs attribute @na to @newsize bytes.
*/
static int ntfs_non_resident_attr_shrink(struct ntfs_inode *ni,
const s64 newsize,
- struct ntfs_inode *locked_ni)
+ struct ntfs_inode *locked_ni,
+ bool pagecache_truncated)
{
struct ntfs_volume *vol;
struct ntfs_attr_search_ctx *ctx;
@@ -4389,7 +4391,8 @@ static int ntfs_non_resident_attr_shrink(struct ntfs_inode *ni,
* later writeback map a vcn past the new allocation, which fails with
* -ENOENT and loses the write.
*/
- truncate_inode_pages(VFS_I(ni)->i_mapping, newsize);
+ if (!pagecache_truncated)
+ truncate_inode_pages(VFS_I(ni)->i_mapping, newsize);
/* Update data size in the index. */
if (ni->type == AT_DATA && ni->name == AT_UNNAMED)
@@ -4991,7 +4994,7 @@ int __ntfs_attr_truncate_vfs(struct ntfs_inode *ni, const s64 newsize,
up_write(&ni->runlist.lock);
} else
err = ntfs_non_resident_attr_shrink(
- ni, newsize, NULL);
+ ni, newsize, NULL, true);
} else
err = ntfs_resident_attr_resize(ni, newsize, 0,
NVolDisableSparse(ni->vol) ?
@@ -5104,7 +5107,7 @@ int ntfs_attr_truncate_i_locked(struct ntfs_inode *ni, const s64 newsize,
ni, newsize, 0, holes, locked_ni);
else
err = ntfs_non_resident_attr_shrink(
- ni, newsize, locked_ni);
+ ni, newsize, locked_ni, false);
} else
err = ntfs_resident_attr_resize(ni, newsize, 0, holes);
ntfs_debug("Return status %d\n", err);
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index a2b276bcd0a8..eec0bffc77b0 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -1075,10 +1075,13 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
goto out;
}
+ if (list_empty(&oinfo->dqi_chunk))
+ chunk->qc_num = 0;
+ else
+ chunk->qc_num = list_entry(oinfo->dqi_chunk.prev,
+ struct ocfs2_quota_chunk,
+ qc_chunk)->qc_num + 1;
list_add_tail(&chunk->qc_chunk, &oinfo->dqi_chunk);
- chunk->qc_num = list_entry(chunk->qc_chunk.prev,
- struct ocfs2_quota_chunk,
- qc_chunk)->qc_num + 1;
chunk->qc_headerbh = bh;
*offset = 0;
return chunk;
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index cd3273c88e03..c088a02e8215 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -181,8 +181,27 @@ static int orangefs_writepages(struct address_space *mapping,
{
struct orangefs_writepages *ow;
struct blk_plug plug;
- int error;
+ int error = 0;
struct folio *folio = NULL;
+ int maxpages;
+
+ maxpages = orangefs_bufmap_size_query() / PAGE_SIZE;
+ if (maxpages < 1) {
+ /*
+ * Probably the client is dead and there's no bufmap.
+ * Walk writeback_iter anyway so each dirty folio is unlocked
+ * and writeback is ended. wait_for_direct_io will fail; the
+ * data is not written.
+ */
+ gossip_err("%s: maxpages < 1. \n", __func__);
+ while ((folio = writeback_iter(mapping, wbc, folio, &error))) {
+ error = orangefs_writepage_locked(folio, wbc);
+ mapping_set_error(mapping, error);
+ folio_unlock(folio);
+ folio_end_writeback(folio);
+ }
+ return error;
+ }
ow = kzalloc_obj(struct orangefs_writepages);
if (!ow)
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 9f94919a6bc6..fec7c1e864d2 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -238,7 +238,7 @@ void orangefs_debugfs_init(int debug_mask)
static void orangefs_kernel_debug_init(void)
{
static char k_buffer[ORANGEFS_MAX_DEBUG_STRING_LEN] = { };
- size_t len =
+ ssize_t len =
strscpy(k_buffer, kernel_debug_string, sizeof(k_buffer) - 1);
if (len > 0) {
@@ -246,7 +246,8 @@ static void orangefs_kernel_debug_init(void)
k_buffer[len + 1] = '\0';
} else {
strscpy(k_buffer, "none\n");
- pr_info("%s: overflow 1!\n", __func__);
+ if (len <0)
+ pr_info("%s: overflow 1!\n", __func__);
}
debugfs_create_file_aux_num(ORANGEFS_KMOD_DEBUG_FILE, 0444, debug_dir, k_buffer,
@@ -337,7 +338,7 @@ static int help_show(struct seq_file *m, void *v)
static void orangefs_client_debug_init(void)
{
static char c_buffer[ORANGEFS_MAX_DEBUG_STRING_LEN] = { };
- size_t len =
+ ssize_t len =
strscpy(c_buffer, client_debug_string, sizeof(c_buffer) - 1);
if (len > 0) {
@@ -345,7 +346,8 @@ static void orangefs_client_debug_init(void)
c_buffer[len + 1] = '\0';
} else {
strscpy(c_buffer, "none\n");
- pr_info("%s: overflow! 2\n", __func__);
+ if (len <0)
+ pr_info("%s: overflow! 2\n", __func__);
}
client_debug_dentry = debugfs_create_file_aux_num(
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 4ec7329b41f6..e6eedb2faef7 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -383,6 +383,24 @@ static int orangefs_unmount(int id, __s32 fs_id, const char *devname)
{
struct orangefs_kernel_op_s *op;
int r;
+
+ /*
+ * If someone reboots linux without unmounting orangefs first,
+ * don't bother firing off an unmount service operation that
+ * will never complete, or the whole system shutdown
+ * stalls for ORANGEFS_DEFAULT_OP_TIMEOUT_SECS.
+ */
+
+ if (!__is_daemon_in_service() ||
+ system_state == SYSTEM_HALT ||
+ system_state == SYSTEM_POWER_OFF ||
+ system_state == SYSTEM_RESTART) {
+ gossip_debug(GOSSIP_SUPER_DEBUG,
+ "%s: dirty unmount.\n",
+ __func__);
+ return 0;
+ }
+
op = op_alloc(ORANGEFS_VFS_OP_FS_UMOUNT);
if (!op)
return -ENOMEM;
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 135a0b8fcbb3..b8b6dd8c8d22 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -594,8 +594,7 @@ static int proc_oom_score(struct seq_file *m, struct pid_namespace *ns,
* exporting for a long time so userspace might depend on it.
*/
if (badness != LONG_MIN)
- points = (OOM_SCORE_ADJ_MAX +
- badness * OOM_SCORE_ADJ_MAX / (long)totalpages) * 2 / 3;
+ points = (1000 + badness * 1000 / (long)totalpages) * 2 / 3;
seq_printf(m, "%lu\n", points);
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 623bb43ede55..04bd6c9e65a7 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -385,8 +385,10 @@ struct mem_size_stats;
struct proc_maps_locking_ctx {
struct mm_struct *mm;
+#ifdef CONFIG_PER_VMA_LOCK
bool mmap_locked;
struct vm_area_struct *locked_vma;
+#endif
};
struct proc_maps_private {
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index e671b4fd8ded..5c54aebe2118 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -130,6 +130,8 @@ static void release_task_mempolicy(struct proc_maps_private *priv)
}
#endif
+#ifdef CONFIG_PER_VMA_LOCK
+
static inline int lock_ctx_mm(struct proc_maps_locking_ctx *lock_ctx)
{
int ret = mmap_read_lock_killable(lock_ctx->mm);
@@ -231,6 +233,46 @@ static inline void reacquire_rcu(struct proc_maps_private *priv)
vma_iter_set(&priv->iter, priv->lock_ctx.locked_vma->vm_end);
}
+#else /* CONFIG_PER_VMA_LOCK */
+
+static inline int lock_ctx_mm(struct proc_maps_locking_ctx *lock_ctx)
+{
+ return mmap_read_lock_killable(lock_ctx->mm);
+}
+
+static inline void unlock_ctx_mm(struct proc_maps_locking_ctx *lock_ctx)
+{
+ mmap_read_unlock(lock_ctx->mm);
+}
+
+static inline bool lock_vma_range(struct seq_file *m,
+ struct proc_maps_locking_ctx *lock_ctx)
+{
+ return lock_ctx_mm(lock_ctx) == 0;
+}
+
+static inline void unlock_vma_range(struct proc_maps_locking_ctx *lock_ctx)
+{
+ unlock_ctx_mm(lock_ctx);
+}
+
+static struct vm_area_struct *get_next_vma(struct proc_maps_private *priv,
+ loff_t last_pos)
+{
+ return vma_next(&priv->iter);
+}
+
+static inline bool fallback_to_mmap_lock(struct proc_maps_private *priv,
+ loff_t pos)
+{
+ return false;
+}
+
+static inline void drop_rcu(struct proc_maps_private *priv) {}
+static inline void reacquire_rcu(struct proc_maps_private *priv) {}
+
+#endif /* CONFIG_PER_VMA_LOCK */
+
static struct vm_area_struct *proc_get_vma(struct seq_file *m, loff_t *ppos)
{
struct proc_maps_private *priv = m->private;
@@ -518,6 +560,8 @@ static int pid_maps_open(struct inode *inode, struct file *file)
PROCMAP_QUERY_VMA_FLAGS \
)
+#ifdef CONFIG_PER_VMA_LOCK
+
static int query_vma_setup(struct proc_maps_locking_ctx *lock_ctx)
{
reset_lock_ctx(lock_ctx);
@@ -568,6 +612,26 @@ static struct vm_area_struct *query_vma_find_by_addr(struct proc_maps_locking_ct
return vma;
}
+#else /* CONFIG_PER_VMA_LOCK */
+
+static int query_vma_setup(struct proc_maps_locking_ctx *lock_ctx)
+{
+ return mmap_read_lock_killable(lock_ctx->mm);
+}
+
+static void query_vma_teardown(struct proc_maps_locking_ctx *lock_ctx)
+{
+ mmap_read_unlock(lock_ctx->mm);
+}
+
+static struct vm_area_struct *query_vma_find_by_addr(struct proc_maps_locking_ctx *lock_ctx,
+ unsigned long addr)
+{
+ return find_vma(lock_ctx->mm, addr);
+}
+
+#endif /* CONFIG_PER_VMA_LOCK */
+
static struct vm_area_struct *query_matching_vma(struct proc_maps_locking_ctx *lock_ctx,
unsigned long addr, u32 flags)
{
@@ -1250,6 +1314,8 @@ static const struct mm_walk_ops smaps_shmem_walk_ops = {
.walk_lock = PGWALK_RDLOCK,
};
+#ifdef CONFIG_PER_VMA_LOCK
+
static const struct mm_walk_ops smaps_walk_vma_lock_ops = {
.pmd_entry = smaps_pte_range,
.hugetlb_entry = smaps_hugetlb_range,
@@ -1279,6 +1345,22 @@ get_smaps_shmem_walk_ops(struct proc_maps_private *priv)
return &smaps_shmem_walk_vma_lock_ops;
}
+#else /* CONFIG_PER_VMA_LOCK */
+
+static inline const struct mm_walk_ops *
+get_smaps_walk_ops(struct proc_maps_private *priv)
+{
+ return &smaps_walk_ops;
+}
+
+static inline const struct mm_walk_ops *
+get_smaps_shmem_walk_ops(struct proc_maps_private *priv)
+{
+ return &smaps_shmem_walk_ops;
+}
+
+#endif /* CONFIG_PER_VMA_LOCK */
+
/*
* Gather mem stats from @vma with the indicated beginning
* address @start, and keep them in @mss.
@@ -3415,6 +3497,7 @@ static const struct mm_walk_ops show_numa_ops = {
.walk_lock = PGWALK_RDLOCK,
};
+#ifdef CONFIG_PER_VMA_LOCK
static const struct mm_walk_ops show_numa_vma_lock_ops = {
.hugetlb_entry = gather_hugetlb_stats,
.pmd_entry = gather_pte_stats,
@@ -3429,6 +3512,16 @@ get_show_numa_ops(struct proc_maps_private *priv)
return &show_numa_vma_lock_ops;
}
+#else /* CONFIG_PER_VMA_LOCK */
+
+static inline const struct mm_walk_ops *
+get_show_numa_ops(struct proc_maps_private *priv)
+{
+ return &show_numa_ops;
+}
+
+#endif /* CONFIG_PER_VMA_LOCK */
+
/*
* Display pages allocated per node and memory policy via /proc.
*/
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index 6738d9d1511b..60ef7f08b1d3 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -2994,6 +2994,7 @@ struct xfs_btree_split_args {
struct xfs_btree_cur **curp;
int *stat; /* success/failure */
int result;
+ bool kswapd; /* allocation in kswapd context */
struct completion *done;
struct work_struct work;
};
@@ -3007,18 +3008,33 @@ xfs_btree_split_worker(
{
struct xfs_btree_split_args *args = container_of(work,
struct xfs_btree_split_args, work);
+ unsigned long pflags;
+ unsigned long new_pflags = 0;
+
+ /*
+ * we are in a transaction context here, but may also be doing work
+ * in kswapd context, and hence we may need to inherit that state
+ * temporarily to ensure that we don't block waiting for memory reclaim
+ * in any way.
+ */
+ if (args->kswapd)
+ new_pflags |= PF_MEMALLOC | PF_KSWAPD;
+
+ current_set_flags_nested(&pflags, new_pflags);
xfs_trans_set_context(args->cur->bc_tp);
args->result = __xfs_btree_split(args->cur, args->level, args->ptrp,
args->key, args->curp, args->stat);
xfs_trans_clear_context(args->cur->bc_tp);
+ current_restore_flags_nested(&pflags, new_pflags);
/*
* Do not access args after complete() has run here. We don't own args
* and the owner may run and free args before we return here.
*/
complete(args->done);
+
}
/*
@@ -3062,7 +3078,7 @@ xfs_btree_split(
args.curp = curp;
args.stat = stat;
args.done = &done;
-
+ args.kswapd = current_is_kswapd();
INIT_WORK_ONSTACK(&args.work, xfs_btree_split_worker);
queue_work(xfs_alloc_wq, &args.work);
wait_for_completion(&done);
diff --git a/fs/xfs/xfs_platform.h b/fs/xfs/xfs_platform.h
index a49fa159894d..5d542e95fe44 100644
--- a/fs/xfs/xfs_platform.h
+++ b/fs/xfs/xfs_platform.h
@@ -115,6 +115,10 @@ typedef __u32 xfs_nlink_t;
#define xfs_blockgc_secs xfs_params.blockgc_timer.val
#define current_cpu() (raw_smp_processor_id())
+#define current_set_flags_nested(sp, f) \
+ (*(sp) = current->flags, current->flags |= (f))
+#define current_restore_flags_nested(sp, f) \
+ (current->flags = ((current->flags & ~(f)) | (*(sp) & (f))))
#define NBBY 8 /* number of bits per byte */
diff --git a/include/asm-generic/pgtable-nop4d.h b/include/asm-generic/pgtable-nop4d.h
index 1cf739ee38aa..89c21f84cffb 100644
--- a/include/asm-generic/pgtable-nop4d.h
+++ b/include/asm-generic/pgtable-nop4d.h
@@ -22,6 +22,7 @@ static inline int pgd_none(pgd_t pgd) { return 0; }
static inline int pgd_bad(pgd_t pgd) { return 0; }
static inline int pgd_present(pgd_t pgd) { return 1; }
static inline void pgd_clear(pgd_t *pgd) { }
+#define p4d_ERROR(p4d) (pgd_ERROR((p4d).pgd))
#define pgd_populate(mm, pgd, p4d) do { } while (0)
#define pgd_populate_safe(mm, pgd, p4d) do { } while (0)
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
index ff4235cf84d7..36b6490ed180 100644
--- a/include/asm-generic/pgtable-nopmd.h
+++ b/include/asm-generic/pgtable-nopmd.h
@@ -33,6 +33,7 @@ static inline int pud_present(pud_t pud) { return 1; }
static inline int pud_user(pud_t pud) { return 0; }
static inline int pud_leaf(pud_t pud) { return 0; }
static inline void pud_clear(pud_t *pud) { }
+#define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))
#define pud_populate(mm, pmd, pte) do { } while (0)
diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
index eedee8e3ad68..356cbfbaab24 100644
--- a/include/asm-generic/pgtable-nopud.h
+++ b/include/asm-generic/pgtable-nopud.h
@@ -29,6 +29,7 @@ static inline int p4d_none(p4d_t p4d) { return 0; }
static inline int p4d_bad(p4d_t p4d) { return 0; }
static inline int p4d_present(p4d_t p4d) { return 1; }
static inline void p4d_clear(p4d_t *p4d) { }
+#define pud_ERROR(pud) (p4d_ERROR((pud).p4d))
#define p4d_populate(mm, p4d, pud) do { } while (0)
#define p4d_populate_safe(mm, p4d, pud) do { } while (0)
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 044dabc1fe9c..bdcc2778ac64 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -67,8 +67,11 @@
* - tlb_remove_table()
*
* tlb_remove_table() is the basic primitive to free page-table directories
- * (__p*_free_tlb()). Page directories are freed after an RCU grace
- * period - see the comment in mm/mmu_gather.c.
+ * (__p*_free_tlb()). In it's most primitive form it is an alias for
+ * tlb_remove_page() below, for when page directories are pages and have no
+ * additional constraints.
+ *
+ * See also MMU_GATHER_TABLE_FREE and MMU_GATHER_RCU_TABLE_FREE.
*
* - tlb_remove_page() / tlb_remove_page_size()
* - __tlb_remove_folio_pages() / __tlb_remove_page_size()
@@ -148,15 +151,24 @@
* This might be useful if your architecture has size specific TLB
* invalidation instructions.
*
- * Page directories (__p*_free_tlb()) are always freed via tlb_remove_table(),
- * after an RCU grace period (see mm/mmu_gather.c).
+ * MMU_GATHER_TABLE_FREE
+ *
+ * This provides tlb_remove_table(), to be used instead of tlb_remove_page()
+ * for page directores (__p*_free_tlb()).
+ *
+ * Useful if your architecture has non-page page directories.
*
- * This serialises against software page-table walkers, including architectures
- * which do not use IPIs for remote TLB invalidates.
+ * When used, an architecture is expected to provide __tlb_remove_table() or
+ * use the generic __tlb_remove_table(), which does the actual freeing of these
+ * pages.
*
- * An architecture is expected to provide __tlb_remove_table() (see
- * HAVE_ARCH_TLB_REMOVE_TABLE) or use the generic __tlb_remove_table(), which
- * does the actual freeing of these pages.
+ * MMU_GATHER_RCU_TABLE_FREE
+ *
+ * Like MMU_GATHER_TABLE_FREE, and adds semi-RCU semantics to the free (see
+ * comment below).
+ *
+ * Useful if your architecture doesn't use IPIs for remote TLB invalidates
+ * and therefore doesn't naturally serialize with software page-table walkers.
*
* MMU_GATHER_NO_FLUSH_CACHE
*
@@ -188,8 +200,12 @@
* various ptep_get_and_clear() functions.
*/
+#ifdef CONFIG_MMU_GATHER_TABLE_FREE
+
struct mmu_table_batch {
+#ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE
struct rcu_head rcu;
+#endif
unsigned int nr;
void *tables[];
};
@@ -208,6 +224,23 @@ static inline void __tlb_remove_table(void *table)
extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
+#else /* !CONFIG_MMU_GATHER_TABLE_FREE */
+
+static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page);
+/*
+ * Without MMU_GATHER_TABLE_FREE the architecture is assumed to have page based
+ * page directories and we can use the normal page batching to free them.
+ */
+static inline void tlb_remove_table(struct mmu_gather *tlb, void *table)
+{
+ struct ptdesc *ptdesc = (struct ptdesc *)table;
+
+ pagetable_dtor(ptdesc);
+ tlb_remove_page(tlb, ptdesc_page(ptdesc));
+}
+#endif /* CONFIG_MMU_GATHER_TABLE_FREE */
+
+#ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE
/*
* This allows an architecture that does not use the linux page-tables for
* hardware to skip the TLBI when freeing page tables.
@@ -220,6 +253,19 @@ void tlb_remove_table_sync_one(void);
void tlb_remove_table_sync_rcu(void);
+#else
+
+#ifdef tlb_needs_table_invalidate
+#error tlb_needs_table_invalidate() requires MMU_GATHER_RCU_TABLE_FREE
+#endif
+
+static inline void tlb_remove_table_sync_one(void) { }
+
+static inline void tlb_remove_table_sync_rcu(void) { }
+
+#endif /* CONFIG_MMU_GATHER_RCU_TABLE_FREE */
+
+
#ifndef CONFIG_MMU_GATHER_NO_GATHER
/*
* If we can't allocate a page to make a big batch of page pointers
@@ -279,7 +325,9 @@ static inline void tlb_flush_rmaps(struct mmu_gather *tlb, struct vm_area_struct
struct mmu_gather {
struct mm_struct *mm;
+#ifdef CONFIG_MMU_GATHER_TABLE_FREE
struct mmu_table_batch *batch;
+#endif
unsigned long start;
unsigned long end;
diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h
index 34a599c3d86d..480eaae42f45 100644
--- a/include/drm/drm_atomic_state_helper.h
+++ b/include/drm/drm_atomic_state_helper.h
@@ -42,9 +42,6 @@ struct drm_device;
void __drm_atomic_helper_crtc_state_init(struct drm_crtc_state *state,
struct drm_crtc *crtc);
-void __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
- struct drm_crtc_state *state);
-void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
struct drm_crtc_state *
drm_atomic_helper_crtc_create_state(struct drm_crtc *crtc);
void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 152349f973e3..be5dca538d87 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -424,18 +424,6 @@ struct drm_crtc_state {
*/
struct drm_crtc_funcs {
/**
- * @reset:
- *
- * Reset CRTC hardware and software state to off. This function isn't
- * called by the core directly, only through drm_mode_config_reset().
- * It's not a helper hook only for historical reasons.
- *
- * Atomic drivers can use drm_atomic_helper_crtc_reset() to reset
- * atomic state using this hook.
- */
- void (*reset)(struct drm_crtc *crtc);
-
- /**
* @cursor_set:
*
* Update the cursor image. The cursor position is relative to the CRTC
diff --git a/include/linux/ccp.h b/include/linux/ccp.h
index 868924dec5a1..e6c599243f11 100644
--- a/include/linux/ccp.h
+++ b/include/linux/ccp.h
@@ -26,7 +26,7 @@ struct ccp_cmd;
/**
* ccp_present - check if a CCP device is present
*
- * Returns zero if a CCP device is present, -ENODEV otherwise.
+ * Returns: zero if a CCP device is present, -ENODEV otherwise.
*/
int ccp_present(void);
@@ -38,7 +38,7 @@ int ccp_present(void);
/**
* ccp_version - get the version of the CCP
*
- * Returns a positive version number, or zero if no CCP
+ * Returns: a positive version number, or zero if no CCP
*/
unsigned int ccp_version(void);
@@ -61,9 +61,9 @@ unsigned int ccp_version(void);
* will be -EINPROGRESS. Any other "err" value during callback is
* the result of the operation.
*
- * The cmd has been successfully queued if:
- * the return code is -EINPROGRESS or
- * the return code is -EBUSY and CCP_CMD_MAY_BACKLOG flag is set
+ * Returns: The cmd has been successfully queued if:
+ * * the return code is -EINPROGRESS or
+ * * the return code is -EBUSY and CCP_CMD_MAY_BACKLOG flag is set
*/
int ccp_enqueue_cmd(struct ccp_cmd *cmd);
@@ -89,7 +89,7 @@ static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd)
/***** AES engine *****/
/**
- * ccp_aes_type - AES key size
+ * enum ccp_aes_type - AES key size
*
* @CCP_AES_TYPE_128: 128-bit key
* @CCP_AES_TYPE_192: 192-bit key
@@ -99,11 +99,12 @@ enum ccp_aes_type {
CCP_AES_TYPE_128 = 0,
CCP_AES_TYPE_192,
CCP_AES_TYPE_256,
+ /* private: */
CCP_AES_TYPE__LAST,
};
/**
- * ccp_aes_mode - AES operation mode
+ * enum ccp_aes_mode - AES operation mode
*
* @CCP_AES_MODE_ECB: ECB mode
* @CCP_AES_MODE_CBC: CBC mode
@@ -111,6 +112,10 @@ enum ccp_aes_type {
* @CCP_AES_MODE_CFB: CFB mode
* @CCP_AES_MODE_CTR: CTR mode
* @CCP_AES_MODE_CMAC: CMAC mode
+ * @CCP_AES_MODE_GHASH: GHASH mode
+ * @CCP_AES_MODE_GCTR: GCTR mode
+ * @CCP_AES_MODE_GCM: GCM mode
+ * @CCP_AES_MODE_GMAC: GMAC mode
*/
enum ccp_aes_mode {
CCP_AES_MODE_ECB = 0,
@@ -123,11 +128,12 @@ enum ccp_aes_mode {
CCP_AES_MODE_GCTR,
CCP_AES_MODE_GCM,
CCP_AES_MODE_GMAC,
+ /* private: */
CCP_AES_MODE__LAST,
};
/**
- * ccp_aes_mode - AES operation mode
+ * enum ccp_aes_action - AES operation mode
*
* @CCP_AES_ACTION_DECRYPT: AES decrypt operation
* @CCP_AES_ACTION_ENCRYPT: AES encrypt operation
@@ -135,6 +141,7 @@ enum ccp_aes_mode {
enum ccp_aes_action {
CCP_AES_ACTION_DECRYPT = 0,
CCP_AES_ACTION_ENCRYPT,
+ /* private: */
CCP_AES_ACTION__LAST,
};
/* Overloaded field */
@@ -146,6 +153,7 @@ enum ccp_aes_action {
* @type: AES operation key size
* @mode: AES operation mode
* @action: AES operation (decrypt/encrypt)
+ * @authsize: AES block request size
* @key: key to be used for this AES operation
* @key_len: length in bytes of key
* @iv: IV to be used for this AES operation
@@ -156,6 +164,7 @@ enum ccp_aes_action {
* @cmac_final: indicates final operation when running in CMAC mode
* @cmac_key: K1/K2 key used in final CMAC operation
* @cmac_key_len: length in bytes of cmac_key
+ * @aad_len: length in bytes of Additional Authenticated Data
*
* Variables required to be set when calling ccp_enqueue_cmd():
* - type, mode, action, key, key_len, src, dst, src_len
@@ -192,7 +201,7 @@ struct ccp_aes_engine {
/***** XTS-AES engine *****/
/**
- * ccp_xts_aes_unit_size - XTS unit size
+ * enum ccp_xts_aes_unit_size - XTS unit size
*
* @CCP_XTS_AES_UNIT_SIZE_16: Unit size of 16 bytes
* @CCP_XTS_AES_UNIT_SIZE_512: Unit size of 512 bytes
@@ -206,11 +215,13 @@ enum ccp_xts_aes_unit_size {
CCP_XTS_AES_UNIT_SIZE_1024,
CCP_XTS_AES_UNIT_SIZE_2048,
CCP_XTS_AES_UNIT_SIZE_4096,
+ /* private: */
CCP_XTS_AES_UNIT_SIZE__LAST,
};
/**
* struct ccp_xts_aes_engine - CCP XTS AES operation
+ * @type: ccp_aes_type - AES key size
* @action: AES operation (decrypt/encrypt)
* @unit_size: unit size of the XTS operation
* @key: key to be used for this XTS AES operation
@@ -247,11 +258,13 @@ struct ccp_xts_aes_engine {
/***** SHA engine *****/
/**
- * ccp_sha_type - type of SHA operation
+ * enum ccp_sha_type - type of SHA operation
*
* @CCP_SHA_TYPE_1: SHA-1 operation
* @CCP_SHA_TYPE_224: SHA-224 operation
* @CCP_SHA_TYPE_256: SHA-256 operation
+ * @CCP_SHA_TYPE_384: SHA-384 operation
+ * @CCP_SHA_TYPE_512: SHA-512 operation
*/
enum ccp_sha_type {
CCP_SHA_TYPE_1 = 1,
@@ -259,6 +272,7 @@ enum ccp_sha_type {
CCP_SHA_TYPE_256,
CCP_SHA_TYPE_384,
CCP_SHA_TYPE_512,
+ /* private: */
CCP_SHA_TYPE__LAST,
};
@@ -384,7 +398,7 @@ struct ccp_rsa_engine {
/***** Passthru engine *****/
/**
- * ccp_passthru_bitwise - type of bitwise passthru operation
+ * enum ccp_passthru_bitwise - type of bitwise passthru operation
*
* @CCP_PASSTHRU_BITWISE_NOOP: no bitwise operation performed
* @CCP_PASSTHRU_BITWISE_AND: perform bitwise AND of src with mask
@@ -398,11 +412,12 @@ enum ccp_passthru_bitwise {
CCP_PASSTHRU_BITWISE_OR,
CCP_PASSTHRU_BITWISE_XOR,
CCP_PASSTHRU_BITWISE_MASK,
+ /* private: */
CCP_PASSTHRU_BITWISE__LAST,
};
/**
- * ccp_passthru_byteswap - type of byteswap passthru operation
+ * enum ccp_passthru_byteswap - type of byteswap passthru operation
*
* @CCP_PASSTHRU_BYTESWAP_NOOP: no byte swapping performed
* @CCP_PASSTHRU_BYTESWAP_32BIT: swap bytes within 32-bit words
@@ -412,6 +427,7 @@ enum ccp_passthru_byteswap {
CCP_PASSTHRU_BYTESWAP_NOOP = 0,
CCP_PASSTHRU_BYTESWAP_32BIT,
CCP_PASSTHRU_BYTESWAP_256BIT,
+ /* private: */
CCP_PASSTHRU_BYTESWAP__LAST,
};
@@ -450,8 +466,8 @@ struct ccp_passthru_engine {
* @byte_swap: byteswap operation to perform
* @mask: mask to be applied to data
* @mask_len: length in bytes of mask
- * @src: data to be used for this operation
- * @dst: data produced by this operation
+ * @src_dma: data to be used for this operation
+ * @dst_dma: data produced by this operation
* @src_len: length in bytes of data used for this operation
* @final: indicate final pass-through operation
*
@@ -478,7 +494,7 @@ struct ccp_passthru_nomap_engine {
#define CCP_ECC_MAX_OUTPUTS 3
/**
- * ccp_ecc_function - type of ECC function
+ * enum ccp_ecc_function - type of ECC function
*
* @CCP_ECC_FUNCTION_MMUL_384BIT: 384-bit modular multiplication
* @CCP_ECC_FUNCTION_MADD_384BIT: 384-bit modular addition
@@ -564,8 +580,9 @@ struct ccp_ecc_point_math {
* @function: ECC function to perform
* @mod: ECC modulus
* @mod_len: length in bytes of modulus
- * @mm: module math parameters
- * @pm: point math parameters
+ * @u: union for math parameters
+ * @u.mm: module math parameters
+ * @u.pm: point math parameters
* @ecc_result: result of the ECC operation
*
* Variables required to be set when calling ccp_enqueue_cmd():
@@ -589,11 +606,11 @@ struct ccp_ecc_engine {
/**
- * ccp_engine - CCP operation identifiers
+ * enum ccp_engine - CCP operation identifiers
*
* @CCP_ENGINE_AES: AES operation
- * @CCP_ENGINE_XTS_AES: 128-bit XTS AES operation
- * @CCP_ENGINE_RSVD1: unused
+ * @CCP_ENGINE_XTS_AES_128: 128-bit XTS AES operation
+ * @CCP_ENGINE_DES3: 3DES operation
* @CCP_ENGINE_SHA: SHA operation
* @CCP_ENGINE_RSA: RSA operation
* @CCP_ENGINE_PASSTHRU: pass-through operation
@@ -609,6 +626,7 @@ enum ccp_engine {
CCP_ENGINE_PASSTHRU,
CCP_ENGINE_ZLIB_DECOMPRESS,
CCP_ENGINE_ECC,
+ /* private: */
CCP_ENGINE__LAST,
};
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 2afb4cb2bb4f..5dfa915a630e 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -154,9 +154,6 @@ struct cgroup *cgroup_get_from_path(const char *path);
struct cgroup *cgroup_get_from_fd(int fd);
struct cgroup *cgroup_v1v2_get_from_fd(int fd);
-/* Was this controller blocked from v1 hierarchies by cgroup_no_v1= ? */
-bool cgroup1_ssid_disabled(int ssid);
-
int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 691c09f0a697..66a2f70e9e01 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -81,6 +81,10 @@ static inline unsigned long compact_gap(unsigned int order)
return min(2UL << order, COMPACT_CLUSTER_MAX);
}
+static inline int current_is_kcompactd(void)
+{
+ return current->flags & PF_KCOMPACTD;
+}
#ifdef CONFIG_COMPACTION
@@ -99,7 +103,7 @@ extern void compaction_defer_reset(struct zone *zone, int order,
bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
int alloc_flags, gfp_t gfp_mask);
-bool current_is_kcompactd(void);
+
extern void __meminit kcompactd_run(int nid);
extern void __meminit kcompactd_stop(int nid);
extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int highest_zoneidx);
@@ -116,11 +120,6 @@ static inline bool compaction_suitable(struct zone *zone, int order,
return false;
}
-static inline bool current_is_kcompactd(void)
-{
- return false;
-}
-
static inline void kcompactd_run(int nid)
{
}
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 4be7d1df8e71..0c8b7ddef9ab 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -153,7 +153,6 @@ enum damos_action {
* @DAMOS_QUOTA_INACTIVE_MEM_BP: Inactive to total LRU memory ratio.
* @DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP: Scheme-eligible memory ratio of a
* node in basis points (0-10000).
- * @DAMOS_QUOTA_HUGEPAGE_MEM_BP: Huge page to total used memory ratio.
* @NR_DAMOS_QUOTA_GOAL_METRICS: Number of DAMOS quota goal metrics.
*
* Metrics equal to larger than @NR_DAMOS_QUOTA_GOAL_METRICS are unsupported.
@@ -168,7 +167,6 @@ enum damos_quota_goal_metric {
DAMOS_QUOTA_ACTIVE_MEM_BP,
DAMOS_QUOTA_INACTIVE_MEM_BP,
DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP,
- DAMOS_QUOTA_HUGEPAGE_MEM_BP,
NR_DAMOS_QUOTA_GOAL_METRICS,
};
@@ -359,8 +357,7 @@ struct damos_watermarks {
* Total bytes that passed ops layer-handled DAMOS filters.
* @qt_exceeds: Total number of times the quota of the scheme has exceeded.
* @nr_snapshots:
- * Total number of DAMON snapshots that the scheme is completely
- * tried to be applied.
+ * Total number of DAMON snapshots that the scheme has tried.
*
* "Tried an action to a region" in this context means the DAMOS core logic
* determined the region as eligible to apply the action. The access pattern
@@ -399,15 +396,14 @@ struct damos_stat {
* @DAMOS_FILTER_TYPE_UNMAPPED: Unmapped pages.
* @DAMOS_FILTER_TYPE_ADDR: Address range.
* @DAMOS_FILTER_TYPE_TARGET: Data Access Monitoring target.
- * @DAMOS_FILTER_TYPE_PROBE_HITS_WSUM: probe_hits weighted sum range.
* @NR_DAMOS_FILTER_TYPES: Number of filter types.
*
- * All types except &DAMOS_FILTER_TYPE_ADDR, &DAMOS_FILTER_TYPE_TARGET and
- * &DAMOS_FILTER_TYPE_PROBE_HITS_WSUM are handled by the underlying &struct
- * damon_operations as a part of scheme action trying, and therefore accounted
- * as 'tried'. In contrast, &DAMOS_FILTER_TYPE_ADDR, &DAMOS_FILTER_TYPE_TARGET
- * and &DAMOS_FILTER_TYPE_PROBE_HITS_WSUM filters are handled by the core layer
- * before trying of the action, and therefore not accounted as 'tried'.
+ * All types except &DAMOS_FILTER_TYPE_ADDR and &DAMOS_FILTER_TYPE_TARGET
+ * are handled by the underlying &struct damon_operations as a part of scheme
+ * action trying, and therefore accounted as 'tried'. In contrast,
+ * &DAMOS_FILTER_TYPE_ADDR and &DAMOS_FILTER_TYPE_TARGET filters are handled
+ * by the core layer before trying of the action, and therefore not accounted
+ * as 'tried'.
*
* Support for the operations-handled filters depends on the running
* &struct damon_operations.
@@ -421,7 +417,6 @@ enum damos_filter_type {
DAMOS_FILTER_TYPE_UNMAPPED,
DAMOS_FILTER_TYPE_ADDR,
DAMOS_FILTER_TYPE_TARGET,
- DAMOS_FILTER_TYPE_PROBE_HITS_WSUM,
NR_DAMOS_FILTER_TYPES,
};
@@ -436,8 +431,6 @@ enum damos_filter_type {
* &damon_ctx->adaptive_targets if @type is
* DAMOS_FILTER_TYPE_TARGET.
* @sz_range: Size range if @type is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.
- * @range_min: Minimum value of range arguments.
- * @range_max: Maximum value of range arguments.
*
* Before applying the &damos->action to a memory region, DAMOS checks if each
* byte of the region matches to this given condition and avoid applying the
@@ -454,10 +447,6 @@ struct damos_filter {
struct damon_addr_range addr_range;
int target_idx;
struct damon_size_range sz_range;
- struct {
- unsigned long range_min;
- unsigned long range_max;
- };
};
/* private: */
/* List head for siblings. */
@@ -559,7 +548,7 @@ struct damos_migrate_dests {
*
* After applying the &action to each region, &stat is updated.
*
- * If &max_nr_snapshots is set as non-zero and &stat.nr_snapshots equals or is
+ * If &max_nr_snapshots is set as non-zero and &stat.nr_snapshots be same to or
* greater than it, the scheme is deactivated.
*/
struct damos {
@@ -638,7 +627,6 @@ enum damon_ops_id {
* @update: Update operations-related data structures.
* @prepare_access_checks: Prepare next access check of target regions.
* @check_accesses: Check the accesses to target regions.
- * @prep_probes: Prepare applying probes for each region.
* @apply_probes: Apply probes for each region.
* @get_scheme_score: Get the score of a region for a scheme.
* @apply_scheme: Apply a DAMON-based operation scheme.
@@ -666,9 +654,6 @@ enum damon_ops_id {
* last preparation and update the number of observed accesses of each region.
* It should also return max number of observed accesses that made as a result
* of its update. The value will be used for regions adjustment threshold.
- * @prep_probes should execute required &struct damon_prep for next &struct
- * damon_probe applications to each region. It should also set
- * &damon_region->sampling_addr of each region if ``set_samples`` is true.
* @apply_probes should apply the data attribute probes to each region and
* accordingly update the probe hits counter of the region. It should also
* set &damon_region->sampling_addr of each region if ``set_samples`` is true.
@@ -691,7 +676,6 @@ struct damon_operations {
void (*update)(struct damon_ctx *context);
void (*prepare_access_checks)(struct damon_ctx *context);
unsigned int (*check_accesses)(struct damon_ctx *context);
- void (*prep_probes)(struct damon_ctx *context, bool set_samples);
unsigned int (*apply_probes)(struct damon_ctx *context,
bool set_samples, bool return_max_wsum);
int (*get_scheme_score)(struct damon_ctx *context,
@@ -756,39 +740,14 @@ struct damon_intervals_goal {
};
/**
- * enum damon_prep_action - DAMON probing preparation action.
- *
- * @DAMON_PREP_SET_PGIDLE: Set the probing memory as idle page.
- */
-enum damon_prep_action {
- DAMON_PREP_SET_PGIDLE,
-};
-
-/**
- * struct damon_prep - DAMON probing preparation request.
- *
- * @action: Action to do to the probing memory for the preparation.
- */
-struct damon_prep {
- enum damon_prep_action action;
-/* private: */
- /* siblings list. */
- struct list_head list;
-};
-
-/**
* enum damon_filter_type - Type of &struct damon_filter
*
- * @DAMON_FILTER_TYPE_ANON: Anonymous pages.
- * @DAMON_FILTER_TYPE_MEMCG: Specific memcg's pages.
- * @DAMON_FILTER_TYPE_PGIDLE_UNSET: Pgidle is unset.
- * @DAMON_FILTER_TYPE_PGIDLE_SET: Pgidle is set.
+ * @DAMON_FILTER_TYPE_ANON: Anonymous pages.
+ * @DAMON_FILTER_TYPE_MEMCG: Specific memcg's pages.
*/
enum damon_filter_type {
DAMON_FILTER_TYPE_ANON,
DAMON_FILTER_TYPE_MEMCG,
- DAMON_FILTER_TYPE_PGIDLE_UNSET,
- DAMON_FILTER_TYPE_PGIDLE_SET,
};
/**
@@ -819,8 +778,6 @@ struct damon_filter {
struct damon_probe {
unsigned int weight;
/* private: */
- /* Preparation actions to apply to each probing memory. */
- struct list_head preps;
/* Filters for assessing if a given region is for this probe. */
struct list_head filters;
/* Siblings list. */
@@ -1000,12 +957,6 @@ static inline unsigned long damon_sz_region(struct damon_region *r)
return r->ar.end - r->ar.start;
}
-#define damon_for_each_prep(p, probe) \
- list_for_each_entry(p, &(probe)->preps, list)
-
-#define damon_for_each_prep_safe(p, next, probe) \
- list_for_each_entry_safe(p, next, &(probe)->preps, list)
-
#define damon_for_each_filter(f, p) \
list_for_each_entry(f, &(p)->filters, list)
@@ -1059,9 +1010,6 @@ static inline unsigned long damon_sz_region(struct damon_region *r)
#ifdef CONFIG_DAMON
-struct damon_prep *damon_new_prep(enum damon_prep_action action);
-void damon_add_prep(struct damon_probe *p, struct damon_prep *prep);
-
struct damon_filter *damon_new_filter(enum damon_filter_type type,
bool matching, bool allow);
void damon_add_filter(struct damon_probe *probe, struct damon_filter *f);
@@ -1075,7 +1023,7 @@ unsigned int damon_nr_accesses_mvsum(struct damon_region *r,
struct damon_ctx *ctx);
unsigned char damon_probe_hits_mvsum(int probe_idx, struct damon_region *r,
struct damon_ctx *ctx);
-unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last, bool mv,
+unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last,
struct damon_ctx *ctx);
int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges,
@@ -1106,7 +1054,7 @@ int damos_commit_quota_goals(struct damos_quota *dst, struct damos_quota *src);
struct damon_target *damon_new_target(void);
void damon_add_target(struct damon_ctx *ctx, struct damon_target *t);
-int damon_set_target_pid(struct damon_target *t, int pid);
+bool damon_targets_empty(struct damon_ctx *ctx);
void damon_free_target(struct damon_target *t);
void damon_destroy_target(struct damon_target *t, struct damon_ctx *ctx);
unsigned int damon_nr_regions(struct damon_target *t);
@@ -1117,6 +1065,7 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs);
void damon_set_schemes(struct damon_ctx *ctx,
struct damos **schemes, ssize_t nr_schemes);
int damon_commit_ctx(struct damon_ctx *old_ctx, struct damon_ctx *new_ctx);
+int damon_nr_running_ctxs(void);
bool damon_is_registered_ops(enum damon_ops_id id);
int damon_register_ops(struct damon_operations *ops);
int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id);
diff --git a/include/linux/dma/edma.h b/include/linux/dma/edma.h
index a4e5aab8fddc..affd896563a1 100644
--- a/include/linux/dma/edma.h
+++ b/include/linux/dma/edma.h
@@ -147,6 +147,7 @@ struct dw_edma_chip {
struct dw_edma *dw;
bool cfg_non_ll;
+ u32 ch_space_sz;
};
/* Export to the platform drivers */
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index fe33a20abc61..c3a49a33307c 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -325,7 +325,8 @@ struct dma_router {
* @lock: protect between config and prepare transfer when driver have not
* implemented callback device_prep_config_sg().
* @chan_id: channel ID for sysfs
- * @dev: class device for sysfs
+ * @chan_dev: class channel device for sysfs, some device use it for per-channel
+ * IOMMU mapping.
* @name: backlink name for sysfs
* @dbg_client_name: slave name for debugfs in format:
* dev_name(requester's dev):channel name, for example: "2b00000.mcasp:tx"
@@ -351,7 +352,14 @@ struct dma_chan {
/* sysfs */
int chan_id;
- struct dma_chan_dev *dev;
+ union {
+ struct dma_chan_dev *chan_dev;
+ /*
+ * Use chan_dev; dev will be removed once all users are
+ * converted.
+ */
+ struct dma_chan_dev *dev;
+ };
const char *name;
#ifdef CONFIG_DEBUG_FS
char *dbg_client_name;
@@ -532,7 +540,7 @@ struct dma_slave_caps {
static inline const char *dma_chan_name(struct dma_chan *chan)
{
- return dev_name(&chan->dev->device);
+ return dev_name(&chan->chan_dev->device);
}
/**
@@ -1803,10 +1811,15 @@ dmaengine_get_direction_text(enum dma_transfer_direction dir)
}
}
+static inline struct device *dmaengine_chan_dev(struct dma_chan *chan)
+{
+ return &chan->chan_dev->device;
+}
+
static inline struct device *dmaengine_get_dma_device(struct dma_chan *chan)
{
- if (chan->dev->chan_dma_dev)
- return &chan->dev->device;
+ if (chan->chan_dev->chan_dma_dev)
+ return dmaengine_chan_dev(chan);
return chan->device->dev;
}
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index a1e0cb4526c9..cbe59a18162e 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -299,8 +299,9 @@ union fw_transaction_callback {
};
/*
- * This callback handles an inbound request subaction. It is called in
- * RCU read-side context, therefore must not sleep.
+ * This callback handles an inbound request subaction. If the request subaction is initiated from
+ * the local node (e.g. by unit driver), the execution context depends on the initiator and is
+ * unspecified. Otherwise, it runs in workqueue context.
*
* The callback should not initiate outbound request subactions directly.
* Otherwise there is a danger of recursion of inbound and outbound
diff --git a/include/linux/fsl/bestcomm/gen_bd.h b/include/linux/fsl/bestcomm/gen_bd.h
index aeb312a1cd00..7253d308d77a 100644
--- a/include/linux/fsl/bestcomm/gen_bd.h
+++ b/include/linux/fsl/bestcomm/gen_bd.h
@@ -16,10 +16,6 @@ struct bcom_gen_bd {
};
-extern struct bcom_task *
-bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo,
- int initiator, int ipr, int maxbufsize);
-
extern int
bcom_gen_bd_rx_reset(struct bcom_task *tsk);
@@ -27,10 +23,6 @@ extern void
bcom_gen_bd_rx_release(struct bcom_task *tsk);
-extern struct bcom_task *
-bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo,
- int initiator, int ipr);
-
extern int
bcom_gen_bd_tx_reset(struct bcom_task *tsk);
diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h
index bfd4c43ed777..190191411009 100644
--- a/include/linux/gfp_types.h
+++ b/include/linux/gfp_types.h
@@ -244,7 +244,7 @@ enum {
* definitely preferable to use the flag rather than opencode endless
* loop around allocator.
* Allocating pages from the buddy with __GFP_NOFAIL and order > 1 is
- * discouraged. Please consider using kvmalloc() instead if possible.
+ * not supported. Please consider using kvmalloc() instead.
*/
#define __GFP_IO ((__force gfp_t)___GFP_IO)
#define __GFP_FS ((__force gfp_t)___GFP_FS)
diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h
index 6f52c140e50d..6fe0877717cb 100644
--- a/include/linux/gpio/regmap.h
+++ b/include/linux/gpio/regmap.h
@@ -46,6 +46,7 @@ enum gpio_regmap_operation {
* @parent: The parent device
* @regmap: The regmap used to access the registers
* given, the name of the device is used
+ * @pm_dev: (Optional) Device to use for runtime power management.
* @fwnode: (Optional) The firmware node.
* If not given, the fwnode of the parent is used.
* @label: (Optional) Descriptive name for GPIO controller.
@@ -117,6 +118,7 @@ enum gpio_regmap_operation {
struct gpio_regmap_config {
struct device *parent;
struct regmap *regmap;
+ struct device *pm_dev;
struct fwnode_handle *fwnode;
const char *label;
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 8ca0fa3be2ac..c745f7ad2298 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -510,6 +510,8 @@ change_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
int hugepage_madvise(struct vm_area_struct *vma, vm_flags_t *vm_flags,
int advice);
+int madvise_collapse(struct vm_area_struct *vma, unsigned long start,
+ unsigned long end, bool *lock_dropped);
void vma_adjust_trans_huge(struct vm_area_struct *vma, unsigned long start,
unsigned long end, struct vm_area_struct *next);
spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma);
@@ -713,6 +715,13 @@ static inline int hugepage_madvise(struct vm_area_struct *vma,
return -EINVAL;
}
+static inline int madvise_collapse(struct vm_area_struct *vma,
+ unsigned long start,
+ unsigned long end, bool *lock_dropped)
+{
+ return -EINVAL;
+}
+
static inline void vma_adjust_trans_huge(struct vm_area_struct *vma,
unsigned long start,
unsigned long end,
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 80a5a03e9cee..16c4c4caa126 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -171,6 +171,7 @@ struct address_space *hugetlb_folio_mapping_lock_write(struct folio *folio);
extern int movable_gigantic_pages __read_mostly;
extern int sysctl_hugetlb_shm_group __read_mostly;
+extern struct list_head huge_boot_pages[MAX_NUMNODES];
void hugetlb_bootmem_struct_page_init(void);
void hugetlb_bootmem_alloc(void);
@@ -675,6 +676,10 @@ struct hstate {
char name[HSTATE_NAME_LEN];
};
+#define HUGE_BOOTMEM_HVO 0x0001
+#define HUGE_BOOTMEM_ZONES_VALID 0x0002
+#define HUGE_BOOTMEM_CMA 0x0004
+
int isolate_or_dissolve_huge_folio(struct folio *folio, struct list_head *list);
int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn);
void wait_for_freed_hugetlb_folios(void);
@@ -694,8 +699,7 @@ enum hugetlb_alloc_flag {
#define HUGETLB_ALLOC_USE_GLOBAL_RESERVATIONS BIT(HUGETLB_ALLOC_USE_GLOBAL_RESERVATIONS_BIT)
struct folio *hugetlb_alloc_folio(struct hstate *h,
- struct mempolicy_interpreted *mpoli, struct mm_struct *mm,
- u8 alloc_flags);
+ struct mempolicy_interpreted *mpoli, u8 alloc_flags);
struct folio *alloc_hugetlb_folio(struct vm_area_struct *vma,
unsigned long addr, bool cow_from_owner);
struct folio *alloc_hugetlb_folio_nodemask(struct hstate *h, int preferred_nid,
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 4af2df969a05..94af28fd325e 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -742,6 +742,9 @@ struct i2c_adapter {
struct rt_mutex mux_lock;
int timeout; /* in jiffies */
+#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT
+ int user_timeout; /* I2C_TIMEOUT ioctl value in jiffies */
+#endif
int retries;
struct device dev; /* the adapter device */
unsigned long locked_flags; /* owned by the I2C core */
@@ -913,6 +916,16 @@ unsigned int i2c_adapter_depth(struct i2c_adapter *adapter);
void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, bool use_defaults);
+#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT
+void i2c_update_timeout(struct i2c_adapter *adap, u32 bus_freq_hz,
+ size_t len, unsigned int safety_coeff,
+ unsigned int min_usec);
+#else
+static inline void i2c_update_timeout(struct i2c_adapter *adap, u32 bus_freq_hz,
+ size_t len, unsigned int safety_coeff,
+ unsigned int min_usec) {}
+#endif
+
/* Return the functionality mask */
static inline u32 i2c_get_functionality(struct i2c_adapter *adap)
{
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index aa845f488327..d62db9e776cf 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -162,6 +162,7 @@ int memblock_mark_kho_scratch(phys_addr_t base, phys_addr_t size);
int memblock_clear_kho_scratch(phys_addr_t base, phys_addr_t size);
void memblock_free(void *ptr, size_t size);
+void reset_all_zones_managed_pages(void);
/* Low level functions */
void __next_mem_range(u64 *idx, int nid, enum memblock_flags flags,
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 46bf724cae7a..7d1c0ce189a8 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -23,7 +23,6 @@
#include <linux/writeback.h>
#include <linux/page-flags.h>
#include <linux/shrinker.h>
-#include <linux/irq_work_types.h>
struct mem_cgroup;
struct obj_cgroup;
@@ -67,6 +66,11 @@ struct mem_cgroup_reclaim_cookie {
#define MEM_CGROUP_ID_SHIFT 16
+struct mem_cgroup_private_id {
+ int id;
+ refcount_t ref;
+};
+
struct memcg_vmstats_percpu;
struct memcg1_events_percpu;
struct memcg_vmstats;
@@ -83,48 +87,50 @@ struct mem_cgroup_reclaim_iter {
* per-node information in memory controller.
*/
struct mem_cgroup_per_node {
- /* Set when the memcg is created, then only read. */
- __cacheline_group_begin_aligned(memcg_pn_read_mostly);
+ /* Keep the read-only fields at the start */
struct mem_cgroup *memcg; /* Back pointer, we cannot */
/* use container_of */
struct lruvec_stats_percpu __percpu *lruvec_stats_percpu;
struct lruvec_stats *lruvec_stats;
struct shrinker_info __rcu *shrinker_info;
- struct obj_cgroup __rcu *objcg;
-
- __cacheline_group_end_aligned(memcg_pn_read_mostly);
+#ifdef CONFIG_MEMCG_V1
/*
- * Keep lruvec on its own lines. Sharing them with lru_zone_size[]
- * regressed, see commit f59adcf59332 ("mm: memcg: add cacheline
- * padding after lruvec in mem_cgroup_per_node").
+ * Memcg-v1 only stuff in middle as buffer between read mostly fields
+ * and update often fields to avoid false sharing. If v1 stuff is
+ * not present, an explicit padding is needed.
*/
- __cacheline_group_begin_aligned(memcg_pn_lruvec);
- struct lruvec lruvec;
- __cacheline_group_end_aligned(memcg_pn_lruvec);
- /* Written on every LRU update and on every reclaim iteration. */
- __cacheline_group_begin_aligned(memcg_pn_write_hot);
- long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS];
- struct mem_cgroup_reclaim_iter iter;
-#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
- /* slab stats for nmi context */
- atomic_t slab_reclaimable;
- atomic_t slab_unreclaimable;
+ struct rb_node tree_node; /* RB tree node */
+ unsigned long usage_in_excess;/* Set to the value by which */
+ /* the soft limit is exceeded*/
+ bool on_tree;
+#else
+ CACHELINE_PADDING(_pad1_);
#endif
- __cacheline_group_end_aligned(memcg_pn_write_hot);
- /* Touched only when the memcg is reparented or freed. */
- __cacheline_group_begin_aligned(memcg_pn_cold);
+ /* Fields which get updated often at the end. */
+ struct lruvec lruvec;
+ CACHELINE_PADDING(_pad2_);
+ unsigned long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS];
+ struct mem_cgroup_reclaim_iter iter;
+
/*
+ * objcg is wiped out as a part of the objcg repaprenting process.
* orig_objcg preserves a pointer (and a reference) to the original
- * objcg until the end of life of memcg.
+ * objcg until the end of live of memcg.
*/
+ struct obj_cgroup __rcu *objcg;
struct obj_cgroup *orig_objcg;
/* list of inherited objcgs, protected by objcg_lock */
struct list_head objcg_list;
- __cacheline_group_end_aligned(memcg_pn_cold);
+
+#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
+ /* slab stats for nmi context */
+ atomic_t slab_reclaimable;
+ atomic_t slab_unreclaimable;
+#endif
};
struct mem_cgroup_threshold {
@@ -196,6 +202,9 @@ struct obj_cgroup {
struct mem_cgroup {
struct cgroup_subsys_state css;
+ /* Private memcg ID. Used to ID objects that outlive the cgroup */
+ struct mem_cgroup_private_id id;
+
/* Accounted resources */
struct page_counter memory; /* Both v1 & v2 */
@@ -204,52 +213,31 @@ struct mem_cgroup {
struct page_counter memsw; /* v1 only */
};
- /* Written on the charge, reclaim and socket paths. */
- __cacheline_group_begin_aligned(memcg_write_hot);
- /*
- * Hint of reclaim pressure for socket memory management. Note
- * that this indicator should NOT be used in legacy cgroup mode
- * where socket memory is accounted/charged separately.
- */
- u64 socket_pressure;
-#if BITS_PER_LONG < 64
- seqlock_t socket_pressure_seqlock;
-#endif
- /*
- * memory.events is bumped for this memcg and all its ancestors, so a
- * busy child dirties every ancestor.
- */
- atomic_long_t memory_events[MEMCG_NR_MEMORY_EVENTS];
- atomic_long_t memory_events_local[MEMCG_NR_MEMORY_EVENTS];
+ /* registered local peak watchers */
+ struct list_head memory_peaks;
+ struct list_head swap_peaks;
+ spinlock_t peaks_lock;
- /* vmpressure notifications. Written on every reclaim iteration. */
- struct vmpressure vmpressure;
+ /* Range enforcement for interrupt charges */
+ struct work_struct high_work;
- /* Written on every swap charge and uncharge. */
- refcount_t private_id_ref;
+#ifdef CONFIG_ZSWAP
+ unsigned long zswap_max;
-#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
- /* MEMCG_KMEM for nmi context */
- atomic_t kmem_stat;
+ /*
+ * Prevent pages from this memcg from being written back from zswap to
+ * swap, and from being swapped out on zswap store failures.
+ */
+ bool zswap_writeback;
#endif
- /* Range enforcement for interrupt charges */
- struct irq_work high_irq_work;
- struct work_struct high_work;
-
- __cacheline_group_end_aligned(memcg_write_hot);
+ /* vmpressure notifications */
+ struct vmpressure vmpressure;
/*
- * Off the charge and fault paths. Not write free: cgwb_domain is
- * written on every writeout completion and mm_list on fork, exit and
- * MGLRU aging. They are grouped here so those writes cannot land on
- * a line that the fast paths read.
+ * Should the OOM killer kill all belonging tasks, had it kill one?
*/
- __cacheline_group_begin_aligned(memcg_cold);
- /* registered local peak watchers */
- struct list_head memory_peaks;
- struct list_head swap_peaks;
- spinlock_t peaks_lock;
+ bool oom_group;
/* memory.events and memory.events.local */
struct cgroup_file events_file;
@@ -258,8 +246,37 @@ struct mem_cgroup {
/* handle for "memory.swap.events" */
struct cgroup_file swap_events_file;
+ /* memory.stat */
+ struct memcg_vmstats *vmstats;
+
+ /* memory.events */
+ atomic_long_t memory_events[MEMCG_NR_MEMORY_EVENTS];
+ atomic_long_t memory_events_local[MEMCG_NR_MEMORY_EVENTS];
+
+#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
+ /* MEMCG_KMEM for nmi context */
+ atomic_t kmem_stat;
+#endif
+ /*
+ * Hint of reclaim pressure for socket memroy management. Note
+ * that this indicator should NOT be used in legacy cgroup mode
+ * where socket memory is accounted/charged separately.
+ */
+ u64 socket_pressure;
+#if BITS_PER_LONG < 64
+ seqlock_t socket_pressure_seqlock;
+#endif
+ int kmemcg_id;
+
#ifdef CONFIG_CGROUP_WRITEBACK
struct list_head cgwb_list;
+#endif
+
+ /* Keep the hot per-CPU stats pointer away from memory event counters. */
+ struct memcg_vmstats_percpu __percpu *vmstats_percpu
+ ____cacheline_aligned_in_smp;
+
+#ifdef CONFIG_CGROUP_WRITEBACK
struct wb_domain cgwb_domain;
struct memcg_cgwb_frn cgwb_frn[MEMCG_CGWB_FRN_CNT];
#endif
@@ -268,17 +285,16 @@ struct mem_cgroup {
/* per-memcg mm_struct list */
struct lru_gen_mm_list mm_list;
#endif
- __cacheline_group_end_aligned(memcg_cold);
#ifdef CONFIG_MEMCG_V1
- /* v1 only. Not grouped: v1 is legacy, sorting it is not worth it. */
-
/* Legacy consumer-oriented counters */
struct page_counter kmem; /* v1 only */
struct page_counter tcpmem; /* v1 only */
struct memcg1_events_percpu __percpu *events_percpu;
+ unsigned long soft_limit;
+
/* protected by memcg_oom_lock */
bool oom_lock;
int under_oom;
@@ -309,41 +325,6 @@ struct mem_cgroup {
int swappiness;
#endif /* CONFIG_MEMCG_V1 */
- /*
- * Set when the memcg is created and cleared when it is offlined.
- * Never written on a hot path.
- */
- __cacheline_group_begin_aligned(memcg_read_mostly);
- /* Read on every stat update */
- struct memcg_vmstats_percpu __percpu *vmstats_percpu;
-
- /* memory.stat */
- struct memcg_vmstats *vmstats;
-
-#ifdef CONFIG_ZSWAP
- unsigned long zswap_max;
-#endif
-
- /* Private memcg ID. Used to ID objects that outlive the cgroup */
- int private_id;
-
- int kmemcg_id;
-
- /*
- * Should the OOM killer kill all belonging tasks, had it kill one?
- */
- bool oom_group;
-
-#ifdef CONFIG_ZSWAP
- /*
- * Prevent pages from this memcg from being written back from zswap to
- * swap, and from being swapped out on zswap store failures.
- */
- bool zswap_writeback;
-#endif
- /* Not padded: nodeinfo[] is read-mostly too, let it share the line. */
- __cacheline_group_end(memcg_read_mostly);
-
struct mem_cgroup_per_node *nodeinfo[];
};
@@ -399,7 +380,7 @@ enum objext_flags {
static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg)
{
lockdep_assert_once(rcu_read_lock_held() || lockdep_is_held(&cgroup_mutex));
- return objcg ? READ_ONCE(objcg->memcg) : NULL;
+ return READ_ONCE(objcg->memcg);
}
/*
@@ -452,7 +433,7 @@ static inline struct mem_cgroup *folio_memcg(struct folio *folio)
{
struct obj_cgroup *objcg = folio_objcg(folio);
- return obj_cgroup_memcg(objcg);
+ return objcg ? obj_cgroup_memcg(objcg) : NULL;
}
/*
@@ -495,7 +476,7 @@ static inline struct mem_cgroup *folio_memcg_check(struct folio *folio)
objcg = (void *)(memcg_data & ~OBJEXTS_FLAGS_MASK);
- return obj_cgroup_memcg(objcg);
+ return objcg ? obj_cgroup_memcg(objcg) : NULL;
}
static inline struct mem_cgroup *page_memcg_check(struct page *page)
@@ -681,8 +662,7 @@ static inline int mem_cgroup_charge(struct folio *folio, struct mm_struct *mm,
return __mem_cgroup_charge(folio, mm, gfp);
}
-int mem_cgroup_charge_hugetlb(struct folio *folio, struct mm_struct *mm,
- gfp_t gfp);
+int mem_cgroup_charge_hugetlb(struct folio* folio, gfp_t gfp);
int mem_cgroup_swapin_charge_folio(struct folio *folio, unsigned short id,
struct mm_struct *mm, gfp_t gfp);
@@ -845,7 +825,7 @@ static inline unsigned short mem_cgroup_private_id(struct mem_cgroup *memcg)
if (mem_cgroup_disabled())
return 0;
- return memcg->private_id;
+ return memcg->id.id;
}
struct mem_cgroup *mem_cgroup_from_private_id(unsigned short id);
@@ -922,15 +902,10 @@ static inline
unsigned long mem_cgroup_get_zone_lru_size(struct lruvec *lruvec,
enum lru_list lru, int zone_idx)
{
- long val;
struct mem_cgroup_per_node *mz;
mz = container_of(lruvec, struct mem_cgroup_per_node, lruvec);
- val = READ_ONCE(mz->lru_zone_size[zone_idx][lru]);
- if (WARN_ON_ONCE(val < 0))
- return 0;
-
- return val;
+ return READ_ONCE(mz->lru_zone_size[zone_idx][lru]);
}
void __mem_cgroup_handle_over_high(gfp_t gfp_mask);
@@ -1075,11 +1050,6 @@ void mem_cgroup_flush_workqueue(void);
extern int mem_cgroup_init(void);
#else /* CONFIG_MEMCG */
-static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg)
-{
- return NULL;
-}
-
#define MEM_CGROUP_ID_SHIFT 0
#define root_mem_cgroup (NULL)
@@ -1186,10 +1156,9 @@ static inline int mem_cgroup_charge(struct folio *folio,
return 0;
}
-static inline int mem_cgroup_charge_hugetlb(struct folio *folio,
- struct mm_struct *mm, gfp_t gfp)
+static inline int mem_cgroup_charge_hugetlb(struct folio* folio, gfp_t gfp)
{
- return 0;
+ return 0;
}
static inline int mem_cgroup_swapin_charge_folio(struct folio *folio,
@@ -1921,16 +1890,6 @@ static inline bool memcg_is_dying(struct mem_cgroup *memcg)
}
#endif /* CONFIG_MEMCG */
-#if defined(CONFIG_MEMCG) && defined(CONFIG_LRU_GEN)
-void mem_cgroup_calculate_protection_path(struct mem_cgroup *root,
- struct mem_cgroup *memcg);
-#else
-static inline void mem_cgroup_calculate_protection_path(struct mem_cgroup *root,
- struct mem_cgroup *memcg)
-{
-}
-#endif
-
#if defined(CONFIG_MEMCG) && defined(CONFIG_ZSWAP)
bool obj_cgroup_may_zswap(struct obj_cgroup *objcg);
void obj_cgroup_charge_zswap(struct obj_cgroup *objcg, size_t size);
@@ -1960,6 +1919,10 @@ static inline bool mem_cgroup_zswap_writeback_enabled(struct mem_cgroup *memcg)
/* Cgroup v1-related declarations */
#ifdef CONFIG_MEMCG_V1
+unsigned long memcg1_soft_limit_reclaim(pg_data_t *pgdat, int order,
+ gfp_t gfp_mask,
+ unsigned long *total_scanned);
+
bool mem_cgroup_oom_synchronize(bool wait);
static inline bool task_in_memcg_oom(struct task_struct *p)
@@ -1980,6 +1943,14 @@ static inline void mem_cgroup_exit_user_fault(void)
}
#else /* CONFIG_MEMCG_V1 */
+static inline
+unsigned long memcg1_soft_limit_reclaim(pg_data_t *pgdat, int order,
+ gfp_t gfp_mask,
+ unsigned long *total_scanned)
+{
+ return 0;
+}
+
static inline bool task_in_memcg_oom(struct task_struct *p)
{
return false;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ebcac6530ae7..f0ff4c9c5489 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -57,6 +57,16 @@ static inline unsigned long totalram_pages(void)
return (unsigned long)atomic_long_read(&_totalram_pages);
}
+static inline void totalram_pages_inc(void)
+{
+ atomic_long_inc(&_totalram_pages);
+}
+
+static inline void totalram_pages_dec(void)
+{
+ atomic_long_dec(&_totalram_pages);
+}
+
static inline void totalram_pages_add(long count)
{
atomic_long_add(count, &_totalram_pages);
@@ -918,6 +928,7 @@ static inline void vma_numab_state_free(struct vm_area_struct *vma) {}
* These must be here rather than mmap_lock.h as dependent on vm_fault type,
* declared in this header.
*/
+#ifdef CONFIG_PER_VMA_LOCK
static inline void release_fault_lock(struct vm_fault *vmf)
{
if (vmf->flags & FAULT_FLAG_VMA_LOCK)
@@ -933,6 +944,17 @@ static inline void assert_fault_locked(const struct vm_fault *vmf)
else
mmap_assert_locked(vmf->vma->vm_mm);
}
+#else
+static inline void release_fault_lock(struct vm_fault *vmf)
+{
+ mmap_read_unlock(vmf->vma->vm_mm);
+}
+
+static inline void assert_fault_locked(const struct vm_fault *vmf)
+{
+ mmap_assert_locked(vmf->vma->vm_mm);
+}
+#endif /* CONFIG_PER_VMA_LOCK */
static inline bool mm_flags_test(int flag, const struct mm_struct *mm)
{
@@ -1529,6 +1551,11 @@ static inline void vma_set_anonymous(struct vm_area_struct *vma)
vma->vm_ops = NULL;
}
+static inline void vma_desc_set_anonymous(struct vm_area_desc *desc)
+{
+ desc->vm_ops = NULL;
+}
+
static inline bool vma_is_anonymous(const struct vm_area_struct *vma)
{
return !vma->vm_ops;
@@ -2617,23 +2644,12 @@ static inline void set_page_section(struct page *page, unsigned long section)
page->flags.f |= (section & SECTIONS_MASK) << SECTIONS_PGSHIFT;
}
-static inline void set_page_section_from_pfn(struct page *page,
- unsigned long pfn)
-{
- set_page_section(page, pfn_to_section_nr(pfn));
-}
-
static inline unsigned long memdesc_section(const memdesc_flags_t *mdf)
{
ASSERT_EXCLUSIVE_BITS(mdf->f, SECTIONS_MASK << SECTIONS_PGSHIFT);
return (mdf->f >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
}
#else /* !SECTION_IN_PAGE_FLAGS */
-static inline void set_page_section_from_pfn(struct page *page,
- unsigned long pfn)
-{
-}
-
static inline unsigned long memdesc_section(const memdesc_flags_t *mdf)
{
return 0;
@@ -2856,7 +2872,9 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
{
set_page_zone(page, zone);
set_page_node(page, node);
- set_page_section_from_pfn(page, pfn);
+#ifdef SECTION_IN_PAGE_FLAGS
+ set_page_section(page, pfn_to_section_nr(pfn));
+#endif
}
/**
@@ -4065,6 +4083,12 @@ static inline void free_reserved_page(struct page *page)
free_reserved_pages(page, 0);
}
+static inline void mark_page_reserved(struct page *page)
+{
+ SetPageReserved(page);
+ adjust_managed_page_count(page, -1);
+}
+
static inline void free_reserved_ptdesc(struct ptdesc *pt)
{
free_reserved_page(ptdesc_page(pt));
@@ -4384,8 +4408,9 @@ static inline unsigned long vma_pages(const struct vm_area_struct *vma)
* If @vma is a MAP_PRIVATE file-backed mapping, then this returns the
* page offset within the file.
*
- * Edge cases: nommu does not abide by these and CoW MAP_PRIVATE-pfnmap regions
- * have their page offset set to the first PFN in the range.
+ * Edge cases: nommu does not abide by these, MAP_PRIVATE-/dev/zero satisfies
+ * vma_is_anonymous() but has file-backed page offset, and MAP_PRIVATE-pfnmap
+ * regions have their page offset set to the first PFN in the range.
*
* Returns: The page offset of the start of @vma.
*/
@@ -5115,6 +5140,7 @@ static inline void print_vma_addr(char *prefix, unsigned long rip)
}
#endif
+unsigned long section_map_size(void);
struct page * __populate_section_memmap(unsigned long pfn,
unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
struct dev_pagemap *pgmap);
@@ -5133,6 +5159,9 @@ int vmemmap_populate_hugepages(unsigned long start, unsigned long end,
int node, struct vmem_altmap *altmap);
int vmemmap_populate(unsigned long start, unsigned long end, int node,
struct vmem_altmap *altmap);
+int vmemmap_populate_hvo(unsigned long start, unsigned long end,
+ unsigned int order, struct zone *zone,
+ unsigned long headsize);
void vmemmap_wrprotect_hvo(unsigned long start, unsigned long end, int node,
unsigned long headsize);
void vmemmap_populate_print_last(void);
@@ -5167,6 +5196,7 @@ static inline void vmem_altmap_free(struct vmem_altmap *altmap,
}
#endif
+#define VMEMMAP_RESERVE_NR 2
#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
static inline bool __vmemmap_can_optimize(struct vmem_altmap *altmap,
struct dev_pagemap *pgmap)
@@ -5174,9 +5204,6 @@ static inline bool __vmemmap_can_optimize(struct vmem_altmap *altmap,
unsigned long nr_pages;
unsigned long nr_vmemmap_pages;
- if (!IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION))
- return false;
-
if (!pgmap || !is_power_of_2(sizeof(struct page)))
return false;
@@ -5186,7 +5213,7 @@ static inline bool __vmemmap_can_optimize(struct vmem_altmap *altmap,
* For vmemmap optimization with DAX we need minimum 2 vmemmap
* pages. See layout diagram in Documentation/mm/vmemmap_dedup.rst
*/
- return !altmap && (nr_vmemmap_pages > VMEMMAP_OPTIMIZATION_PAGES);
+ return !altmap && (nr_vmemmap_pages > VMEMMAP_RESERVE_NR);
}
/*
* If we don't have an architecture override, use the generic rule
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index ab69b9930893..621c8653d8f7 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -30,17 +30,6 @@ static inline int folio_is_file_lru(const struct folio *folio)
return !folio_test_swapbacked(folio);
}
-/**
- * folio_flags_is_file_lru - Should the folio be on a file LRU or anon LRU?
- * @flags: The folio's flags.
- *
- * Just like folio_is_file_lru but take the folio flags directly instead.
- */
-static inline int folio_flags_is_file_lru(const unsigned long *flags)
-{
- return !test_bit(PG_swapbacked, flags);
-}
-
static __always_inline void __update_lru_size(struct lruvec *lruvec,
enum lru_list lru, enum zone_type zid,
long nr_pages)
@@ -153,66 +142,10 @@ static inline int lru_tier_from_refs(int refs, bool workingset)
return workingset ? MAX_NR_TIERS - 1 : order_base_2(refs);
}
-/**
- * lru_set_gen_flags - Set the LRU generation number to specified folio flags.
- * @flags: pointer to the folio flags
- * @gen: generation number, between 0 and (MAX_NR_GENS - 1), inclusive.
- */
-static inline void lru_set_gen_flags(unsigned long *flags, int gen)
-{
- BUILD_BUG_ON(LRU_GEN_MASK & LRU_REFS_MASK);
- VM_WARN_ON_ONCE(gen >= MAX_NR_GENS || gen < 0);
- /* Store gen offset by 1, zero means the folio is off-list. */
- *flags &= ~LRU_GEN_MASK;
- *flags |= (gen + 1UL) << LRU_GEN_PGOFF;
-}
-
-/**
- * lru_get_gen_flags - Return the LRU generation number from folio flags.
- * @flags: folio flags
- *
- * Returns: A number between 0 and (MAX_NR_GENS - 1), inclusive. Returns
- * -1 if the flags indicate the folio is off the list (e.g., isolated).
- */
-static inline int lru_get_gen_flags(unsigned long flags)
-{
- int gen = ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
-
- /* Exclude the legal -1 from the unsigned MAX_NR_GENS comparison */
- VM_WARN_ON_ONCE(gen != -1 && gen >= MAX_NR_GENS);
- return gen;
-}
-
-/**
- * lru_set_refs_flags - Set the LRU referenced count to folio flags.
- * @flags: pointer to the folio flags
- * @refs: referenced / access count number, between 0 and LRU_REFS_MAX, inclusive.
- *
- * For MGLRU, PG_referenced holds the first ref, and the extra bits hold the
- * remaining refs. For classical LRU the extra bits are not used, so it can
- * also be seen as the refs count never exceeds 1. In both cases, refs == 1
- * means PG_referenced is set and the extra bits are zero, and refs == 0 means
- * PG_referenced and the extra bits are all unset.
- */
-static inline void lru_set_refs_flags(unsigned long *flags, unsigned int refs)
+static inline int folio_lru_refs(const struct folio *folio)
{
- VM_WARN_ON_ONCE(refs > LRU_REFS_MAX);
- BUILD_BUG_ON(LRU_REFS_MAX != (LRU_REFS_MASK >> LRU_REFS_PGOFF) + 1);
+ unsigned long flags = READ_ONCE(folio->flags.f);
- *flags &= ~LRU_REFS_FLAGS;
- if (!refs)
- return;
- *flags |= (BIT(PG_referenced) | ((refs - 1UL) << LRU_REFS_PGOFF));
-}
-
-/**
- * lru_get_refs_flags - Return LRU referenced / access count from folio flags.
- * @flags: folio flags
- *
- * Reads the LRU referenced count set by lru_set_refs_flags().
- */
-static inline int lru_get_refs_flags(unsigned long flags)
-{
if (!(flags & BIT(PG_referenced)))
return 0;
/*
@@ -222,24 +155,11 @@ static inline int lru_get_refs_flags(unsigned long flags)
return ((flags & LRU_REFS_MASK) >> LRU_REFS_PGOFF) + 1;
}
-static inline int folio_lru_refs(const struct folio *folio)
-{
- return lru_get_refs_flags(READ_ONCE(*const_folio_flags(folio, 0)));
-}
-
-static inline void folio_set_lru_refs(struct folio *folio, unsigned int refs)
-{
- unsigned long new_flags, old_flags = READ_ONCE(*folio_flags(folio, 0));
-
- do {
- new_flags = old_flags;
- lru_set_refs_flags(&new_flags, refs);
- } while (!try_cmpxchg(folio_flags(folio, 0), &old_flags, new_flags));
-}
-
static inline int folio_lru_gen(const struct folio *folio)
{
- return lru_get_gen_flags(READ_ONCE(*const_folio_flags(folio, 0)));
+ unsigned long flags = READ_ONCE(folio->flags.f);
+
+ return ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
}
static inline bool lru_gen_is_active(const struct lruvec *lruvec, int gen)
@@ -350,7 +270,7 @@ static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio,
gen = lru_gen_from_seq(seq);
flags = (gen + 1UL) << LRU_GEN_PGOFF;
/* see the comment on MIN_NR_GENS about PG_active */
- set_mask_bits(folio_flags(folio, 0), LRU_GEN_MASK | BIT(PG_active), flags);
+ set_mask_bits(&folio->flags.f, LRU_GEN_MASK | BIT(PG_active), flags);
lru_gen_update_size(lruvec, folio, -1, gen);
/* for folio_rotate_reclaimable() */
@@ -375,7 +295,7 @@ static inline bool lru_gen_del_folio(struct lruvec *lruvec, struct folio *folio,
/* for folio_migrate_flags() */
flags = !reclaiming && lru_gen_is_active(lruvec, gen) ? BIT(PG_active) : 0;
- flags = set_mask_bits(folio_flags(folio, 0), LRU_GEN_MASK, flags);
+ flags = set_mask_bits(&folio->flags.f, LRU_GEN_MASK, flags);
gen = ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
lru_gen_update_size(lruvec, folio, gen, -1);
@@ -384,19 +304,11 @@ static inline bool lru_gen_del_folio(struct lruvec *lruvec, struct folio *folio,
return true;
}
-/**
- * folio_migrate_lru_refs - copy the reference state to a new folio
- * @new: the destination folio
- * @old: the source folio
- *
- * Transfer the reference state to @new during migration: the MGLRU
- * refs count, including PG_referenced, or just PG_referenced for the
- * active/inactive LRU.
- */
-static inline void folio_migrate_lru_refs(struct folio *new, const struct folio *old)
+static inline void folio_migrate_refs(struct folio *new, const struct folio *old)
{
- BUILD_BUG_ON(LRU_REFS_MASK & BIT(PG_referenced));
- folio_set_lru_refs(new, folio_lru_refs(old));
+ unsigned long refs = READ_ONCE(old->flags.f) & LRU_REFS_MASK;
+
+ set_mask_bits(&new->flags.f, LRU_REFS_MASK, refs);
}
#else /* !CONFIG_LRU_GEN */
@@ -425,10 +337,9 @@ static inline bool lru_gen_del_folio(struct lruvec *lruvec, struct folio *folio,
return false;
}
-static inline void folio_migrate_lru_refs(struct folio *new, const struct folio *old)
+static inline void folio_migrate_refs(struct folio *new, const struct folio *old)
{
- if (folio_test_referenced(old))
- folio_set_referenced(new);
+
}
#endif /* CONFIG_LRU_GEN */
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 5413bd10fff2..6d815f6440c9 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -950,6 +950,7 @@ struct vm_area_struct {
vma_flags_t flags;
};
+#ifdef CONFIG_PER_VMA_LOCK
/*
* Can only be written (using WRITE_ONCE()) while holding both:
* - mmap_lock (in write mode)
@@ -965,7 +966,7 @@ struct vm_area_struct {
* slowpath.
*/
unsigned int vm_lock_seq;
-
+#endif
/*
* Low 32-bits of anonymous page offset.
* See vma_start_anon_pgoff() comment for details.
@@ -1002,6 +1003,7 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA_BALANCING
struct vma_numab_state *numab_state; /* NUMA Balancing state */
#endif
+#ifdef CONFIG_PER_VMA_LOCK
/*
* Used to keep track of firstly, whether the VMA is attached, secondly,
* if attached, how many read locks are taken, and thirdly, if the
@@ -1044,6 +1046,7 @@ struct vm_area_struct {
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lockdep_map vmlock_dep_map;
#endif
+#endif
#ifdef CONFIG_64BIT
/*
* High 32-bits of anonymous page offset.
@@ -1251,6 +1254,7 @@ struct mm_struct {
* init_mm.mmlist, and are protected
* by mmlist_lock
*/
+#ifdef CONFIG_PER_VMA_LOCK
struct rcuwait vma_writer_wait;
/*
* This field has lock-like semantics, meaning it is sometimes
@@ -1270,7 +1274,7 @@ struct mm_struct {
* mmap_lock.
*/
seqcount_t mm_lock_seq;
-
+#endif
struct futex_mm_data futex;
unsigned long hiwater_rss; /* High-watermark of RSS usage */
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h
index 28e3696ce9ff..b8a13b8d36a4 100644
--- a/include/linux/mmap_lock.h
+++ b/include/linux/mmap_lock.h
@@ -76,6 +76,8 @@ static inline void mmap_assert_write_locked(const struct mm_struct *mm)
rwsem_assert_held_write(&mm->mmap_lock);
}
+#ifdef CONFIG_PER_VMA_LOCK
+
#ifdef CONFIG_LOCKDEP
#define __vma_lockdep_map(vma) (&vma->vmlock_dep_map)
#else
@@ -228,14 +230,10 @@ static inline void vma_refcount_put(struct vm_area_struct *vma)
}
/*
- * Use only while holding mmap read lock which guarantees that vma lock is not
- * contended (nobody can concurrently write-lock the vma). vma_start_read() should
+ * Use only while holding mmap read lock which guarantees that locking will not
+ * fail (nobody can concurrently write-lock the vma). vma_start_read() should
* not be used in such cases because it might fail due to mm_lock_seq overflow.
* This functionality is used to obtain vma read lock and drop the mmap read lock.
- *
- * VMA can't be detached while we are holding mmap lock, therefore in practice this
- * function can fail only when there are so many readers that vm_refcnt overflows.
- * The failure case is very unlikely and is already annotated as such internally.
*/
static inline bool vma_start_read_locked_nested(struct vm_area_struct *vma, int subclass)
{
@@ -251,23 +249,16 @@ static inline bool vma_start_read_locked_nested(struct vm_area_struct *vma, int
}
/*
- * Use only while holding mmap read lock which guarantees that vma lock is not
- * contended (nobody can concurrently write-lock the vma). vma_start_read() should
+ * Use only while holding mmap read lock which guarantees that locking will not
+ * fail (nobody can concurrently write-lock the vma). vma_start_read() should
* not be used in such cases because it might fail due to mm_lock_seq overflow.
* This functionality is used to obtain vma read lock and drop the mmap read lock.
- *
- * VMA can't be detached while we are holding mmap lock, therefore in practice this
- * function can fail only when there are so many readers that vm_refcnt overflows.
- * The failure case is very unlikely and is already annotated as such internally.
*/
static inline bool vma_start_read_locked(struct vm_area_struct *vma)
{
return vma_start_read_locked_nested(vma, 0);
}
-struct vm_area_struct *vma_start_read_unlocked(struct mm_struct *mm,
- unsigned long address);
-
static inline void vma_end_read(struct vm_area_struct *vma)
{
vma_refcount_put(vma);
@@ -306,9 +297,6 @@ int __vma_start_write(struct vm_area_struct *vma, int state);
*/
static inline void vma_start_write(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU))
- return;
-
if (__is_vma_write_locked(vma))
return;
@@ -331,9 +319,6 @@ static inline void vma_start_write(struct vm_area_struct *vma)
static inline __must_check
int vma_start_write_killable(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU))
- return 0;
-
if (__is_vma_write_locked(vma))
return 0;
@@ -346,11 +331,6 @@ int vma_start_write_killable(struct vm_area_struct *vma)
*/
static inline void vma_assert_write_locked(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU)) {
- mmap_assert_write_locked(vma->vm_mm);
- return;
- }
-
VM_WARN_ON_ONCE_VMA(!__is_vma_write_locked(vma), vma);
}
@@ -363,11 +343,6 @@ static inline void vma_assert_locked(struct vm_area_struct *vma)
{
unsigned int refcnt;
- if (!IS_ENABLED(CONFIG_MMU)) {
- mmap_assert_locked(vma->vm_mm);
- return;
- }
-
if (IS_ENABLED(CONFIG_LOCKDEP)) {
if (!lock_is_held(__vma_lockdep_map(vma)))
vma_assert_write_locked(vma);
@@ -457,9 +432,6 @@ static inline bool vma_is_attached(struct vm_area_struct *vma)
*/
static inline void vma_assert_attached(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU))
- return;
-
WARN_ON_ONCE(!vma_is_attached(vma));
}
@@ -470,9 +442,6 @@ static inline void vma_assert_detached(struct vm_area_struct *vma)
static inline void vma_mark_attached(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU))
- return;
-
vma_assert_write_locked(vma);
vma_assert_detached(vma);
refcount_set_release(&vma->vm_refcnt, 1);
@@ -482,9 +451,6 @@ void __vma_exclude_readers_for_detach(struct vm_area_struct *vma);
static inline void vma_mark_detached(struct vm_area_struct *vma)
{
- if (!IS_ENABLED(CONFIG_MMU))
- return;
-
vma_assert_write_locked(vma);
vma_assert_attached(vma);
@@ -518,6 +484,54 @@ struct vm_area_struct *lock_next_vma(struct mm_struct *mm,
struct vma_iterator *iter,
unsigned long address);
+#else /* CONFIG_PER_VMA_LOCK */
+
+static inline void mm_lock_seqcount_init(struct mm_struct *mm) {}
+static inline void mm_lock_seqcount_begin(struct mm_struct *mm) {}
+static inline void mm_lock_seqcount_end(struct mm_struct *mm) {}
+
+static inline bool mmap_lock_speculate_try_begin(struct mm_struct *mm, unsigned int *seq)
+{
+ return false;
+}
+
+static inline bool mmap_lock_speculate_retry(struct mm_struct *mm, unsigned int seq)
+{
+ return true;
+}
+static inline void vma_lock_init(struct vm_area_struct *vma, bool reset_refcnt) {}
+static inline void vma_end_read(struct vm_area_struct *vma) {}
+static inline void vma_start_write(struct vm_area_struct *vma) {}
+static inline __must_check
+int vma_start_write_killable(struct vm_area_struct *vma) { return 0; }
+static inline void vma_assert_write_locked(struct vm_area_struct *vma)
+ { mmap_assert_write_locked(vma->vm_mm); }
+static inline bool vma_is_attached(struct vm_area_struct *vma)
+ { return true; }
+static inline void vma_assert_attached(struct vm_area_struct *vma) {}
+static inline void vma_assert_detached(struct vm_area_struct *vma) {}
+static inline void vma_mark_attached(struct vm_area_struct *vma) {}
+static inline void vma_mark_detached(struct vm_area_struct *vma) {}
+
+static inline struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
+ unsigned long address)
+{
+ return NULL;
+}
+
+static inline void vma_assert_locked(struct vm_area_struct *vma)
+{
+ mmap_assert_locked(vma->vm_mm);
+}
+
+static inline void vma_assert_stabilised(struct vm_area_struct *vma)
+{
+ /* If no VMA locks, then either mmap lock suffices to stabilise. */
+ mmap_assert_locked(vma->vm_mm);
+}
+
+#endif /* CONFIG_PER_VMA_LOCK */
+
static inline void vma_assert_can_modify(struct vm_area_struct *vma)
{
if (vma_is_attached(vma))
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f8a2d823f7de..94f9c3ff5416 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -102,22 +102,18 @@
*
* HVO which is only active if the size of struct page is a power of 2.
*/
-#define MAX_FOLIO_VMEMMAP_ALIGN \
- (IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION) && \
- is_power_of_2(sizeof(struct page)) ? \
+#define MAX_FOLIO_VMEMMAP_ALIGN \
+ (IS_ENABLED(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP) && \
+ is_power_of_2(sizeof(struct page)) ? \
MAX_FOLIO_NR_PAGES * sizeof(struct page) : 0)
-/* The number of retained vmemmap pages with HVO enabled. */
-#define VMEMMAP_OPTIMIZATION_PAGES 1
-#define VMEMMAP_OPTIMIZATION_NR_STRUCT_PAGES \
- (VMEMMAP_OPTIMIZATION_PAGES * PAGE_SIZE / sizeof(struct page))
-#define VMEMMAP_OPTIMIZATION_MIN_ORDER (ilog2(VMEMMAP_OPTIMIZATION_NR_STRUCT_PAGES) + 1)
-
-#define __VMEMMAP_OPTIMIZATION_NR_ORDERS \
- (MAX_FOLIO_ORDER - VMEMMAP_OPTIMIZATION_MIN_ORDER + 1)
-#define VMEMMAP_OPTIMIZATION_NR_ORDERS \
- ((__VMEMMAP_OPTIMIZATION_NR_ORDERS > 0 && \
- IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION)) ? __VMEMMAP_OPTIMIZATION_NR_ORDERS : 0)
+/*
+ * vmemmap optimization (like HVO) is only possible for page orders that fill
+ * two or more pages with struct pages.
+ */
+#define VMEMMAP_TAIL_MIN_ORDER (ilog2(2 * PAGE_SIZE / sizeof(struct page)))
+#define __NR_VMEMMAP_TAILS (MAX_FOLIO_ORDER - VMEMMAP_TAIL_MIN_ORDER + 1)
+#define NR_VMEMMAP_TAILS (__NR_VMEMMAP_TAILS > 0 ? __NR_VMEMMAP_TAILS : 0)
enum migratetype {
MIGRATE_UNMOVABLE,
@@ -496,14 +492,11 @@ enum lruvec_flags {
* folio->flags, masked by LRU_REFS_MASK.
*/
#define MAX_NR_TIERS 4U
-#define LRU_TIER_MIN 0U
-#define LRU_TIER_MAX (MAX_NR_TIERS - 1)
#ifndef __GENERATING_BOUNDS_H
#define LRU_GEN_MASK ((BIT(LRU_GEN_WIDTH) - 1) << LRU_GEN_PGOFF)
#define LRU_REFS_MASK ((BIT(LRU_REFS_WIDTH) - 1) << LRU_REFS_PGOFF)
-#define LRU_REFS_MAX BIT(LRU_REFS_WIDTH)
/*
* For folios accessed multiple times through file descriptors,
@@ -642,32 +635,35 @@ struct lru_gen_mm_walk {
* For each node, memcgs are divided into two generations: the old and the
* young. For each generation, memcgs are randomly sharded into multiple bins
* to improve scalability. For each bin, the hlist_nulls is virtually divided
- * into two segments: the tail and the default.
+ * into three segments: the head, the tail and the default.
*
* An onlining memcg is added to the tail of a random bin in the old generation.
* The eviction starts at the head of a random bin in the old generation. The
* per-node memcg generation counter, whose reminder (mod MEMCG_NR_GENS) indexes
* the old generation, is incremented when all its bins become empty.
*
- * There are three operations:
- * 1. MEMCG_LRU_TAIL, which moves a memcg to the tail of a random bin in its
+ * There are four operations:
+ * 1. MEMCG_LRU_HEAD, which moves a memcg to the head of a random bin in its
+ * current generation (old or young) and updates its "seg" to "head";
+ * 2. MEMCG_LRU_TAIL, which moves a memcg to the tail of a random bin in its
* current generation (old or young) and updates its "seg" to "tail";
- * 2. MEMCG_LRU_OLD, which moves a memcg to the head of a random bin in the old
+ * 3. MEMCG_LRU_OLD, which moves a memcg to the head of a random bin in the old
* generation, updates its "gen" to "old" and resets its "seg" to "default";
- * 3. MEMCG_LRU_YOUNG, which moves a memcg to the tail of a random bin in the
+ * 4. MEMCG_LRU_YOUNG, which moves a memcg to the tail of a random bin in the
* young generation, updates its "gen" to "young" and resets its "seg" to
* "default".
*
* The events that trigger the above operations are:
- * 1. The first attempt to reclaim a memcg below low, which triggers
+ * 1. Exceeding the soft limit, which triggers MEMCG_LRU_HEAD;
+ * 2. The first attempt to reclaim a memcg below low, which triggers
* MEMCG_LRU_TAIL;
- * 2. The first attempt to reclaim a memcg offlined or below reclaimable size
+ * 3. The first attempt to reclaim a memcg offlined or below reclaimable size
* threshold, which triggers MEMCG_LRU_TAIL;
- * 3. The second attempt to reclaim a memcg offlined or below reclaimable size
+ * 4. The second attempt to reclaim a memcg offlined or below reclaimable size
* threshold, which triggers MEMCG_LRU_YOUNG;
- * 4. Attempting to reclaim a memcg below min, which triggers MEMCG_LRU_YOUNG;
- * 5. Finishing the aging on the eviction path, which triggers MEMCG_LRU_YOUNG;
- * 6. Offlining a memcg, which triggers MEMCG_LRU_OLD.
+ * 5. Attempting to reclaim a memcg below min, which triggers MEMCG_LRU_YOUNG;
+ * 6. Finishing the aging on the eviction path, which triggers MEMCG_LRU_YOUNG;
+ * 7. Offlining a memcg, which triggers MEMCG_LRU_OLD.
*
* Notes:
* 1. Memcg LRU only applies to global reclaim, and the round-robin incrementing
@@ -700,6 +696,7 @@ void lru_gen_exit_memcg(struct mem_cgroup *memcg);
void lru_gen_online_memcg(struct mem_cgroup *memcg);
void lru_gen_offline_memcg(struct mem_cgroup *memcg);
void lru_gen_release_memcg(struct mem_cgroup *memcg);
+void lru_gen_soft_reclaim(struct mem_cgroup *memcg, int nid);
void max_lru_gen_memcg(struct mem_cgroup *memcg, int nid);
bool recheck_lru_gen_max_memcg(struct mem_cgroup *memcg, int nid);
void lru_gen_reparent_memcg(struct mem_cgroup *memcg, struct mem_cgroup *parent, int nid);
@@ -740,6 +737,10 @@ static inline void lru_gen_release_memcg(struct mem_cgroup *memcg)
{
}
+static inline void lru_gen_soft_reclaim(struct mem_cgroup *memcg, int nid)
+{
+}
+
static inline void max_lru_gen_memcg(struct mem_cgroup *memcg, int nid)
{
}
@@ -1156,8 +1157,8 @@ struct zone {
/* Zone statistics */
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
atomic_long_t vm_numa_event[NR_VM_NUMA_EVENT_ITEMS];
-#ifdef CONFIG_SPARSEMEM_VMEMMAP
- struct page *vmemmap_tails[VMEMMAP_OPTIMIZATION_NR_ORDERS];
+#ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+ struct page *vmemmap_tails[NR_VMEMMAP_TAILS];
#endif
} ____cacheline_internodealigned_in_smp;
@@ -2020,23 +2021,19 @@ struct mem_section {
unsigned long section_mem_map;
struct mem_section_usage *usage;
-#ifdef CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION
- /*
- * Normally, sections hold regular (order-0) pages. However, for
- * sections with HVO enabled, this tracks the compound page order
- * to enable deduplication of redundant vmemmap pages.
- */
- unsigned int compound_page_order;
-#endif
#ifdef CONFIG_PAGE_EXTENSION
/*
* If SPARSEMEM, pgdat doesn't have page_ext pointer. We use
* section. (see page_ext.h about this.)
*/
struct page_ext *page_ext;
+ unsigned long pad;
#endif
-/* Sacrifice minor padding space for efficient lookup. */
-} __aligned(2 * sizeof(unsigned long));
+ /*
+ * WARNING: mem_section must be a power-of-2 in size for the
+ * calculation and use of SECTION_ROOT_MASK to make sense.
+ */
+};
#ifdef CONFIG_SPARSEMEM_EXTREME
#define SECTIONS_PER_ROOT (PAGE_SIZE / sizeof (struct mem_section))
@@ -2046,6 +2043,7 @@ struct mem_section {
#define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT)
#define NR_SECTION_ROOTS DIV_ROUND_UP(NR_MEM_SECTIONS, SECTIONS_PER_ROOT)
+#define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1)
#ifdef CONFIG_SPARSEMEM_EXTREME
extern struct mem_section **mem_section;
@@ -2069,7 +2067,7 @@ static inline struct mem_section *__nr_to_section(unsigned long nr)
if (!mem_section || !mem_section[root])
return NULL;
#endif
- return &mem_section[root][nr % SECTIONS_PER_ROOT];
+ return &mem_section[root][nr & SECTION_ROOT_MASK];
}
/*
@@ -2092,6 +2090,9 @@ enum {
#ifdef CONFIG_ZONE_DEVICE
SECTION_TAINT_ZONE_DEVICE_BIT,
#endif
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+ SECTION_IS_VMEMMAP_PREINIT_BIT,
+#endif
SECTION_MAP_LAST_BIT,
};
@@ -2102,6 +2103,9 @@ enum {
#ifdef CONFIG_ZONE_DEVICE
#define SECTION_TAINT_ZONE_DEVICE BIT(SECTION_TAINT_ZONE_DEVICE_BIT)
#endif
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+#define SECTION_IS_VMEMMAP_PREINIT BIT(SECTION_IS_VMEMMAP_PREINIT_BIT)
+#endif
#define SECTION_MAP_MASK (~(BIT(SECTION_MAP_LAST_BIT) - 1))
#define SECTION_NID_SHIFT SECTION_MAP_LAST_BIT
@@ -2149,20 +2153,28 @@ static inline int online_device_section(const struct mem_section *section)
return section && ((section->section_mem_map & flags) == flags);
}
+#else
+static inline int online_device_section(const struct mem_section *section)
+{
+ return 0;
+}
+#endif
-static inline struct zone *device_zone(int nid)
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+static inline int preinited_vmemmap_section(const struct mem_section *section)
{
- return &NODE_DATA(nid)->node_zones[ZONE_DEVICE];
+ return (section &&
+ (section->section_mem_map & SECTION_IS_VMEMMAP_PREINIT));
}
+
+void sparse_vmemmap_init_nid_early(int nid);
#else
-static inline int online_device_section(const struct mem_section *section)
+static inline int preinited_vmemmap_section(const struct mem_section *section)
{
return 0;
}
-
-static inline struct zone *device_zone(int nid)
+static inline void sparse_vmemmap_init_nid_early(int nid)
{
- return NULL;
}
#endif
@@ -2229,6 +2241,9 @@ static inline bool pfn_section_first_valid(struct mem_section *ms, unsigned long
}
#endif
+void sparse_init_early_section(int nid, struct page *map, unsigned long pnum,
+ unsigned long flags);
+
#ifndef CONFIG_HAVE_ARCH_PFN_VALID
/**
* pfn_valid - check if there is a valid memory map entry for a PFN
@@ -2364,6 +2379,7 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr)
#endif
#else
+#define sparse_vmemmap_init_nid_early(_nid) do {} while (0)
#define pfn_in_present_section pfn_valid
#endif /* CONFIG_SPARSEMEM */
diff --git a/include/linux/omap-mailbox.h b/include/linux/omap-mailbox.h
index 3cc5c4ed7f5a..e45f8c3841c2 100644
--- a/include/linux/omap-mailbox.h
+++ b/include/linux/omap-mailbox.h
@@ -6,8 +6,9 @@
#ifndef OMAP_MAILBOX_H
#define OMAP_MAILBOX_H
-typedef uintptr_t mbox_msg_t;
+typedef u32 mbox_msg_t;
-#define omap_mbox_message(data) (u32)(mbox_msg_t)(data)
+#define omap_mbox_to_message(data) ((void *)(uintptr_t)(data))
+#define omap_mbox_from_message(data) ((mbox_msg_t)(uintptr_t)(data))
#endif /* OMAP_MAILBOX_H */
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 462e89e05548..7a863572adce 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -208,13 +208,14 @@ enum pageflags {
static __always_inline bool compound_info_has_mask(void)
{
/*
- * Limit mask usage to HVO where it makes a difference.
+ * Limit mask usage to HugeTLB vmemmap optimization (HVO) where it
+ * makes a difference.
*
* The approach with mask would work in the wider set of conditions,
* but it requires validating that struct pages are naturally aligned
* for all orders up to the MAX_FOLIO_ORDER, which can be tricky.
*/
- if (!IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION))
+ if (!IS_ENABLED(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP))
return false;
return is_power_of_2(sizeof(struct page));
@@ -587,12 +588,13 @@ FOLIO_FLAG(owner_2, FOLIO_HEAD_PAGE)
* Only test-and-set exist for PG_writeback. The unconditional operators are
* risky: they bypass page accounting.
*/
-FOLIO_TEST_FLAG(writeback, FOLIO_HEAD_PAGE)
- FOLIO_TEST_SET_FLAG(writeback, FOLIO_HEAD_PAGE)
+TESTPAGEFLAG(Writeback, writeback, PF_NO_TAIL)
+ TESTSCFLAG(Writeback, writeback, PF_NO_TAIL)
FOLIO_FLAG(mappedtodisk, FOLIO_HEAD_PAGE)
/* PG_readahead is only used for reads; PG_reclaim is only for writes */
-FOLIO_FLAG(reclaim, FOLIO_HEAD_PAGE)
+PAGEFLAG(Reclaim, reclaim, PF_NO_TAIL)
+ TESTCLEARFLAG(Reclaim, reclaim, PF_NO_TAIL)
FOLIO_FLAG(readahead, FOLIO_HEAD_PAGE)
FOLIO_TEST_CLEAR_FLAG(readahead, FOLIO_HEAD_PAGE)
@@ -654,7 +656,6 @@ TESTSCFLAG(HWPoison, hwpoison, PF_ANY)
#define __PG_HWPOISON (1UL << PG_hwpoison)
#else
PAGEFLAG_FALSE(HWPoison, hwpoison)
-TESTSCFLAG_FALSE(HWPoison, hwpoison)
#define __PG_HWPOISON 0
#endif
diff --git a/include/linux/page_counter.h b/include/linux/page_counter.h
index 07b7cb12249c..d649b6bbbc87 100644
--- a/include/linux/page_counter.h
+++ b/include/linux/page_counter.h
@@ -68,7 +68,6 @@ static inline unsigned long page_counter_read(struct page_counter *counter)
return atomic_long_read(&counter->usage);
}
-long page_counter_margin(struct page_counter *counter);
void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages);
void page_counter_charge(struct page_counter *counter, unsigned long nr_pages);
bool page_counter_try_charge(struct page_counter *counter,
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 939f3a5e973f..0adfa6605653 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1128,7 +1128,8 @@ static inline pgoff_t linear_anon_page_index(const struct vm_area_struct *vma,
const pgoff_t pgoff = __linear_anon_page_index(vma, address);
VM_WARN_ON_ONCE(!vma_is_cow_mapping(vma));
- if (vma_is_anonymous(vma))
+ /* Account for MAP_PRIVATE-/dev/zero which is only semi-anonymous. */
+ if (vma_is_anonymous(vma) && !vma->vm_file)
VM_WARN_ON_ONCE(pgoff != linear_page_index(vma, address));
return pgoff;
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index e3c8ab96941c..8c093c119e5a 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -2313,20 +2313,6 @@ static inline const char *pgtable_level_to_str(enum pgtable_level level)
}
}
-void ptval_bytes_to_hex_str(char *buf, size_t buf_size, const void *entry, size_t entry_size);
-
-#define ptval_to_str(buf, val) \
- do { \
- auto __val = (val); \
- \
- ptval_bytes_to_hex_str((buf), sizeof(buf), &__val, sizeof(__val)); \
- } while (0)
-
-#if defined(__SIZEOF_INT128__)
-#define PTVAL_STR_MAX (32 + 1) /* Max 128-bit value in hex + NUL */
-#else
-#define PTVAL_STR_MAX (16 + 1) /* Max 64-bit value in hex + NUL */
-#endif
#endif /* !__ASSEMBLER__ */
#if !defined(MAX_POSSIBLE_PHYSMEM_BITS) && !defined(CONFIG_64BIT)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5ce350a616e4..99103499114b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1812,8 +1812,8 @@ extern struct pid __rcu *cad_pid;
#define PF_USED_MATH 0x00002000 /* If unset the fpu must be initialized before use */
#define PF_USER_WORKER 0x00004000 /* Kernel thread cloned from userspace thread */
#define PF_NOFREEZE 0x00008000 /* This thread should not be frozen */
-#define PF__HOLE__00010000 0x00010000
-#define PF__HOLE__00020000 0x00020000
+#define PF_KCOMPACTD 0x00010000 /* I am kcompactd */
+#define PF_KSWAPD 0x00020000 /* I am kswapd */
#define PF_MEMALLOC_NOFS 0x00040000 /* All allocations inherit GFP_NOFS. See memalloc_nfs_save() */
#define PF_MEMALLOC_NOIO 0x00080000 /* All allocations inherit GFP_NOIO. See memalloc_noio_save() */
#define PF_LOCAL_THROTTLE 0x00100000 /* Throttle writes only against the bdi I write to,
diff --git a/include/linux/set_memory.h b/include/linux/set_memory.h
index 3fe293cfed8c..3030d9245f5a 100644
--- a/include/linux/set_memory.h
+++ b/include/linux/set_memory.h
@@ -25,13 +25,17 @@ static inline int set_memory_rox(unsigned long addr, int numpages)
#endif
#ifndef CONFIG_ARCH_HAS_SET_DIRECT_MAP
-static inline int set_direct_map_invalid_noflush(struct page *page,
- unsigned int nr)
+static inline int set_direct_map_invalid_noflush(struct page *page)
{
return 0;
}
-static inline int set_direct_map_default_noflush(struct page *page,
- unsigned int nr)
+static inline int set_direct_map_default_noflush(struct page *page)
+{
+ return 0;
+}
+
+static inline int set_direct_map_valid_noflush(struct page *page,
+ unsigned nr, bool valid)
{
return 0;
}
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index a7c7a96a7cbf..5663dff53186 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -11,7 +11,6 @@
#include <linux/fs_parser.h>
#include <linux/userfaultfd_k.h>
#include <linux/bits.h>
-#include <linux/list_lru.h>
/* inode in-kernel data */
@@ -55,11 +54,6 @@ struct shmem_inode_info {
struct dquot __rcu *i_dquot[MAXQUOTAS];
#endif
struct inode vfs_inode;
-
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- struct obj_cgroup *shrinklist_objcg;
- int shrinklist_nid;
-#endif
};
#define SHMEM_FL_USER_VISIBLE (FS_FL_USER_VISIBLE | FS_CASEFOLD_FL)
@@ -89,9 +83,9 @@ struct shmem_sb_info {
ino_t next_ino; /* The next per-sb inode number to use */
ino_t __percpu *ino_batch; /* The next per-cpu inode number to use */
struct mempolicy *mpol; /* default memory policy for mappings */
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- struct list_lru shrinklist; /* List of shrinkable inodes */
-#endif
+ spinlock_t shrinklist_lock; /* Protects shrinklist */
+ struct list_head shrinklist; /* List of shinkable inodes */
+ unsigned long shrinklist_len; /* Length of shrinklist */
struct shmem_quota_limits qlimits; /* Default quota limits */
struct simple_xattr_cache xa_cache;
};
diff --git a/include/linux/siphash.h b/include/linux/siphash.h
index 9153e77382e1..00c58bbe549a 100644
--- a/include/linux/siphash.h
+++ b/include/linux/siphash.h
@@ -75,8 +75,10 @@ static inline u64 ___siphash_aligned(const __le64 *data, size_t len,
/**
* siphash - compute 64-bit siphash PRF value
* @data: buffer to hash
- * @size: size of @data
+ * @len: size of @data
* @key: the siphash key
+ *
+ * Returns: siphash PRF value
*/
static inline u64 siphash(const void *data, size_t len,
const siphash_key_t *key)
@@ -125,8 +127,10 @@ static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len,
/**
* hsiphash - compute 32-bit hsiphash PRF value
* @data: buffer to hash
- * @size: size of @data
+ * @len: size of @data
* @key: the hsiphash key
+ *
+ * Returns: hsiphash PRF value
*/
static inline u32 hsiphash(const void *data, size_t len,
const hsiphash_key_t *key)
diff --git a/include/linux/string.h b/include/linux/string.h
index 6cb5cdd01158..5702daca4326 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -278,19 +278,6 @@ static inline void memcpy_flushcache(void *dst, const void *src, size_t cnt)
}
#endif
-#ifndef memcpy_nontemporal
-/*
- * memcpy_nontemporal() requests a non-temporal copy when the
- * architecture has a suitable backend. Architectures without a
- * specialized backend fall back to memcpy(). Keep this as a
- * function-like macro so the compiler can still see the original
- * memcpy() call site and preserve the usual FORTIFY coverage when
- * object sizes remain visible there, while keeping the API void.
- */
-#define memcpy_nontemporal(dst, src, len) \
- ((void)memcpy(dst, src, len))
-#endif
-
void *memchr_inv(const void *s, int c, size_t n);
char *strreplace(char *str, char old, char new);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 11745fc64bdf..8d0b31ad88bd 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -24,6 +24,12 @@
#define SWAP_FLAGS_VALID (SWAP_FLAG_PRIO_MASK | SWAP_FLAG_PREFER | \
SWAP_FLAG_DISCARD | SWAP_FLAG_DISCARD_ONCE | \
SWAP_FLAG_DISCARD_PAGES)
+
+static inline int current_is_kswapd(void)
+{
+ return current->flags & PF_KSWAPD;
+}
+
/*
* MAX_SWAPFILES defines the maximum number of swaptypes: things which can
* be swapped to. The swap type and the offset into that swap type are
@@ -239,7 +245,7 @@ struct swap_info_struct {
struct plist_node list; /* entry in swap_active_head */
signed char type; /* strange name for an index */
unsigned int max; /* size of this swap device */
- struct swap_cluster_info *cluster_info; /* array, one entry per cluster */
+ struct swap_cluster_info *cluster_info; /* cluster info. Only for SSD */
struct list_head free_clusters; /* free clusters list */
struct list_head full_clusters; /* full clusters list */
struct list_head nonfull_clusters[SWAP_NR_ORDERS];
@@ -271,39 +277,15 @@ struct swap_info_struct {
const struct swap_ops *ops;
};
-/**
- * folio_swap_entry - Return the swap entry at a page index within a folio.
- * @folio: The folio.
- * @idx: The index of the page within the folio.
- *
- * A folio in the swap cache occupies folio_nr_pages() contiguous swap
- * entries starting at folio->swap. The caller must ensure the folio is
- * in the swap cache and that @idx is within the folio.
- */
-static inline
-swp_entry_t folio_swap_entry(const struct folio *folio, unsigned long idx)
+static inline swp_entry_t page_swap_entry(struct page *page)
{
+ struct folio *folio = page_folio(page);
swp_entry_t entry = folio->swap;
- VM_WARN_ON_ONCE_FOLIO(idx >= folio_nr_pages(folio), folio);
- entry.val += idx;
+ entry.val += folio_page_idx(folio, page);
return entry;
}
-/**
- * folio_page_swap_entry - Return the swap entry of a page in a folio.
- * @folio: The folio containing @page.
- * @page: A page within @folio.
- *
- * The caller must ensure the folio is in the swap cache and that @page
- * is part of @folio.
- */
-static inline swp_entry_t folio_page_swap_entry(const struct folio *folio,
- const struct page *page)
-{
- return folio_swap_entry(folio, folio_page_idx(folio, page));
-}
-
/* linux/mm/page_alloc.c */
extern unsigned long totalreserve_pages;
@@ -356,7 +338,6 @@ void check_move_unevictable_folios(struct folio_batch *fbatch);
extern void __meminit kswapd_run(int nid);
extern void __meminit kswapd_stop(int nid);
-bool current_is_kswapd(void);
#ifdef CONFIG_SWAP
int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page,
@@ -526,7 +507,6 @@ static inline void mem_cgroup_uncharge_swap(unsigned short id, unsigned int nr_p
__mem_cgroup_uncharge_swap(id, nr_pages);
}
-long mem_cgroup_get_folio_swap_margin(struct folio *folio);
extern long mem_cgroup_get_nr_swap_pages(struct mem_cgroup *memcg);
extern bool mem_cgroup_swap_full(struct folio *folio);
#else
@@ -540,11 +520,6 @@ static inline void mem_cgroup_uncharge_swap(unsigned short id,
{
}
-static inline long mem_cgroup_get_folio_swap_margin(struct folio *folio)
-{
- return PAGE_COUNTER_MAX;
-}
-
static inline long mem_cgroup_get_nr_swap_pages(struct mem_cgroup *memcg)
{
return get_nr_swap_pages();
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 034a693777ca..aed121d729b0 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -3,7 +3,6 @@
#define _LINUX_VMALLOC_H
#include <linux/alloc_tag.h>
-#include <linux/cleanup.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/init.h>
@@ -39,7 +38,6 @@ struct iov_iter; /* in uio.h */
#define VM_DEFER_KMEMLEAK 0
#endif
#define VM_SPARSE 0x00001000 /* sparse vm_area. not all pages are present. */
-#define VM_REQUIRE_HUGE_VMAP 0x00002000 /* huge page mapping or nothing */
/* bits [20..32] reserved for arch specific ioremap internals */
@@ -216,8 +214,6 @@ void *__must_check vrealloc_node_align_noprof(const void *p, size_t size,
extern void vfree(const void *addr);
extern void vfree_atomic(const void *addr);
-DEFINE_FREE(vfree, void *, if (!IS_ERR_OR_NULL(_T)) vfree(_T))
-
extern void *vmap(struct page **pages, unsigned int count,
unsigned long flags, pgprot_t prot);
void *vmap_pfn(unsigned long *pfns, unsigned int count, pgprot_t prot);
diff --git a/include/linux/vmemmap-optimization.h b/include/linux/vmemmap-optimization.h
deleted file mode 100644
index 2327929467f3..000000000000
--- a/include/linux/vmemmap-optimization.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * vmemmap-optimization.h
- *
- * Generic vmemmap optimization declarations.
- *
- * Author: Muchun Song <songmuchun@bytedance.com>
- */
-#ifndef _LINUX_VMEMMAP_OPTIMIZATION_H
-#define _LINUX_VMEMMAP_OPTIMIZATION_H
-
-#include <linux/align.h>
-#include <linux/log2.h>
-#include <linux/mmdebug.h>
-#include <linux/mmzone.h>
-
-#ifdef CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION
-static inline unsigned int section_compound_order(const struct mem_section *section)
-{
- return section->compound_page_order;
-}
-
-static inline void section_set_compound_order(struct mem_section *section,
- unsigned int order)
-{
- VM_WARN_ON(section_compound_order(section) && order &&
- section_compound_order(section) != order);
- section->compound_page_order = order;
-}
-
-static inline void section_set_compound_order_range(unsigned long pfn,
- unsigned long nr_pages, unsigned int order)
-{
- unsigned long section_nr = pfn_to_section_nr(pfn);
-
- if (!IS_ALIGNED(pfn | nr_pages, PAGES_PER_SECTION))
- return;
-
- for (unsigned long i = 0; i < nr_pages / PAGES_PER_SECTION; i++)
- section_set_compound_order(__nr_to_section(section_nr + i), order);
-}
-
-static inline unsigned int pfn_to_section_compound_order(unsigned long pfn)
-{
- return section_compound_order(__pfn_to_section(pfn));
-}
-#else
-static inline unsigned int section_compound_order(const struct mem_section *section)
-{
- return 0;
-}
-
-static inline void section_set_compound_order(struct mem_section *section,
- unsigned int order)
-{
-}
-
-static inline void section_set_compound_order_range(unsigned long pfn,
- unsigned long nr_pages, unsigned int order)
-{
-}
-
-static inline unsigned int pfn_to_section_compound_order(unsigned long pfn)
-{
- return 0;
-}
-#endif /* CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION */
-
-static inline bool vmemmap_optimizable_pfn(unsigned long pfn)
-{
- const unsigned int order = pfn_to_section_compound_order(pfn);
- const unsigned long nr_pages = 1UL << order;
-
- if (!is_power_of_2(sizeof(struct page)))
- return false;
-
- return (pfn & (nr_pages - 1)) >= VMEMMAP_OPTIMIZATION_NR_STRUCT_PAGES;
-}
-
-static inline bool vmemmap_optimizable_order(unsigned int order)
-{
- if (!IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION))
- return false;
-
- if (!is_power_of_2(sizeof(struct page)))
- return false;
-
- return order >= VMEMMAP_OPTIMIZATION_MIN_ORDER;
-}
-
-#ifdef CONFIG_SPARSEMEM_VMEMMAP
-struct page *vmemmap_shared_tail_page(unsigned int order, struct zone *zone);
-#endif /* CONFIG_SPARSEMEM_VMEMMAP */
-#endif /* _LINUX_VMEMMAP_OPTIMIZATION_H */
diff --git a/include/linux/zsmalloc.h b/include/linux/zsmalloc.h
index 5b7298a5026b..478410c880b1 100644
--- a/include/linux/zsmalloc.h
+++ b/include/linux/zsmalloc.h
@@ -40,6 +40,10 @@ unsigned int zs_lookup_class_index(struct zs_pool *pool, unsigned int size);
void zs_pool_stats(struct zs_pool *pool, struct zs_pool_stats *stats);
+void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
+ size_t mem_len, void *local_copy);
+void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
+ size_t mem_len, void *handle_mem);
void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
struct scatterlist *sg, size_t mem_len);
void zs_obj_read_sg_end(struct zs_pool *pool, unsigned long handle);
diff --git a/include/linux/zswap.h b/include/linux/zswap.h
index df6cafbe95dc..30c193a1207e 100644
--- a/include/linux/zswap.h
+++ b/include/linux/zswap.h
@@ -27,7 +27,7 @@ struct zswap_lruvec_state {
unsigned long zswap_total_pages(void);
bool zswap_store(struct folio *folio);
int zswap_load(struct folio *folio);
-void zswap_invalidate(int type, pgoff_t offset, unsigned long nr_entries);
+void zswap_invalidate(swp_entry_t swp);
int zswap_swapon(int type, unsigned long nr_pages);
void zswap_swapoff(int type);
void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg);
@@ -49,11 +49,7 @@ static inline int zswap_load(struct folio *folio)
return -ENOENT;
}
-static inline void zswap_invalidate(int type, pgoff_t offset,
- unsigned long nr_entries)
-{
-}
-
+static inline void zswap_invalidate(swp_entry_t swp) {}
static inline int zswap_swapon(int type, unsigned long nr_pages)
{
return 0;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6461a7bd0169..9aa7d2d4a184 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4009,6 +4009,7 @@ struct cfg80211_update_ft_ies_params {
* @link_id: for MLO, the link ID to transmit on, -1 if not given; note
* that the link ID isn't validated (much), it's in range but the
* link might not exist (or be used by the receiver STA)
+ * @no_sta: set if the frame should not be transmitted using an existing STA
*/
struct cfg80211_mgmt_tx_params {
struct ieee80211_channel *chan;
@@ -4021,6 +4022,7 @@ struct cfg80211_mgmt_tx_params {
int n_csa_offsets;
const u16 *csa_offsets;
int link_id;
+ bool no_sta;
};
/**
@@ -9501,6 +9503,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
* @flags: flags, as defined in &enum nl80211_rxmgmt_flags
* @rx_tstamp: Hardware timestamp of frame RX in nanoseconds
* @ack_tstamp: Hardware timestamp of ack TX in nanoseconds
+ * @no_sta: set if no station is known for the frame (relevant for MLD)
*/
struct cfg80211_rx_info {
int freq;
@@ -9512,6 +9515,7 @@ struct cfg80211_rx_info {
u32 flags;
u64 rx_tstamp;
u64 ack_tstamp;
+ bool no_sta;
};
/**
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index be4cc10f88ed..7102aa11fae2 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -218,6 +218,7 @@ struct ip_tunnel_net {
struct net_device *fb_tunnel_dev;
struct rtnl_link_ops *rtnl_link_ops;
struct hlist_head tunnels[IP_TNL_HASH_SIZE];
+ struct mutex tunnels_lock;
struct ip_tunnel __rcu *collect_md_tun;
int type;
};
@@ -401,7 +402,6 @@ int ip_tunnel_get_iflink(const struct net_device *dev);
int ip_tunnel_init_net(struct net *net, unsigned int ip_tnl_net_id,
struct rtnl_link_ops *ops, char *devname);
void ip_tunnel_delete_net(struct net *net, unsigned int id,
- struct rtnl_link_ops *ops,
struct list_head *dev_to_kill);
void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f3dcccd9bfe5..d6f3c5855910 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1770,10 +1770,9 @@ enum mac80211_rx_encoding {
* @ampdu_reference: A-MPDU reference number, must be a different value for
* each A-MPDU but the same for each subframe within one A-MPDU
* @zero_length_psdu_type: radiotap type of the 0-length PSDU
- * @link_valid: if the link which is identified by @link_id is valid. This flag
- * is set only when connection is MLO.
- * @link_id: id of the link used to receive the packet. This is used along with
- * @link_valid.
+ * @link_id: id of the link used to receive the packet. Set and used by
+ * mac80211 internally, it uses @freq set by the driver to identify the
+ * correct link per vif.
*/
struct ieee80211_rx_status {
u64 mactime;
@@ -1813,7 +1812,7 @@ struct ieee80211_rx_status {
u8 chains;
s8 chain_signal[IEEE80211_MAX_CHAINS];
u8 zero_length_psdu_type;
- u8 link_valid:1, link_id:4;
+ u8 link_id:4;
};
static_assert(sizeof(struct ieee80211_rx_status) <= sizeof_field(struct sk_buff, cb));
@@ -5389,14 +5388,18 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
* mixed for a single hardware. Must not run concurrently with
* ieee80211_tx_status_skb() or ieee80211_tx_status_ni().
*
+ * For data frames, when hardware has done address translation, a link station
+ * has to be provided and the frequency information may be skipped.
+ *
* This function must be called with BHs disabled and RCU read lock
*
* @hw: the hardware this frame came in on
- * @sta: the station the frame was received from, or %NULL
+ * @link_sta: the link station the data frame was received from, or %NULL
* @skb: the buffer to receive, owned by mac80211 after this call
* @list: the destination list
*/
-void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+void ieee80211_rx_list(struct ieee80211_hw *hw,
+ struct ieee80211_link_sta *link_sta,
struct sk_buff *skb, struct list_head *list);
/**
@@ -5414,14 +5417,18 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
* mixed for a single hardware. Must not run concurrently with
* ieee80211_tx_status_skb() or ieee80211_tx_status_ni().
*
+ * For data frames, when hardware has done address translation, a link station
+ * has to be provided and the frequency information may be skipped.
+ *
* This function must be called with BHs disabled.
*
* @hw: the hardware this frame came in on
- * @sta: the station the frame was received from, or %NULL
+ * @link_sta: the link station the data frame was received from, or %NULL
* @skb: the buffer to receive, owned by mac80211 after this call
* @napi: the NAPI context
*/
-void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+void ieee80211_rx_napi(struct ieee80211_hw *hw,
+ struct ieee80211_link_sta *link_sta,
struct sk_buff *skb, struct napi_struct *napi);
/**
diff --git a/include/net/mana/hw_channel.h b/include/net/mana/hw_channel.h
index 16feb39616c1..1ab2d66c891e 100644
--- a/include/net/mana/hw_channel.h
+++ b/include/net/mana/hw_channel.h
@@ -20,8 +20,8 @@
#define HWC_INIT_DATA_MAX_NUM_CQS 7
#define HWC_INIT_DATA_PDID 8
#define HWC_INIT_DATA_GPA_MKEY 9
-#define HWC_INIT_DATA_PF_DEST_RQ_ID 10
-#define HWC_INIT_DATA_PF_DEST_CQ_ID 11
+#define HWC_INIT_DATA_DEST_RQ_ID 10
+#define HWC_INIT_DATA_DEST_CQ_ID 11
#define HWC_DATA_CFG_HWC_TIMEOUT 1
#define HWC_DATA_HW_LINK_CONNECT 2
@@ -195,8 +195,8 @@ struct hw_channel_context {
struct semaphore sema;
struct gdma_resource inflight_msg_res;
- u32 pf_dest_vrq_id;
- u32 pf_dest_vrcq_id;
+ u32 dest_vrq_id;
+ u32 dest_vrcq_id;
u32 hwc_timeout;
struct hwc_caller_ctx *caller_ctx;
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index e8fda092be37..83b7eff4646e 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -47,8 +47,8 @@ enum mana_priv_flag_bits {
#define COMP_ENTRY_SIZE 64
/* This Max value for RX buffers is derived from __alloc_page()'s max page
- * allocation calculation. It allows maximum 2^MAX_PAGE_ORDER pages. RX
- * buffer size beyond this value gets rejected by __alloc_page() call.
+ * allocation calculation. It allows maximum 2^(MAX_ORDER -1) pages. RX buffer
+ * size beyond this value gets rejected by __alloc_page() call.
*/
#define MAX_RX_BUFFERS_PER_QUEUE 8192
#define DEF_RX_BUFFERS_PER_QUEUE 1024
diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h
index e2730dd273b2..87a4e13886e1 100644
--- a/include/net/page_pool/helpers.h
+++ b/include/net/page_pool/helpers.h
@@ -417,7 +417,7 @@ static inline void page_pool_recycle_direct_netmem(struct page_pool *pool,
* @va: va to be freed
* @allow_direct: freed by the consumer, allow lockless caching
*
- * Free a va allocated from page_pool_allo_va().
+ * Free a va allocated from page_pool_alloc_va().
*/
static inline void page_pool_free_va(struct page_pool *pool, void *va,
bool allow_direct)
diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index 45a5df574aa6..447876ba2954 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -209,6 +209,9 @@ struct snd_ctl_elem_value;
#define CS35L56_GPIO_FN_GPIO 0x00000001
+/* DSP1_FW_VER */
+#define CS35L56_FW_MAIN_VERSION_MASK GENMASK(19, 0)
+
/* Mixer input sources */
#define CS35L56_INPUT_SRC_NONE 0x00
#define CS35L56_INPUT_SRC_ASP1RX1 0x08
@@ -445,6 +448,7 @@ int cs35l56_cal_set_status_get(struct cs35l56_base *cs35l56_base,
int cs35l56_read_prot_status(struct cs35l56_base *cs35l56_base,
bool *fw_missing, unsigned int *fw_version);
void cs35l56_warn_if_firmware_missing(struct cs35l56_base *cs35l56_base);
+bool cs35l56_needs_wait_for_firmware_timer_expiry(struct cs35l56_base *cs35l56_base);
void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp);
int cs35l56_hw_init(struct cs35l56_base *cs35l56_base);
int cs35l56_get_speaker_id(struct cs35l56_base *cs35l56_base);
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 4f94565c9d15..6474239a11c1 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -633,8 +633,8 @@ SUB_REG(PEFE, FILTERAMOUNT, 0x000000ff) /* Filter envlope amount */
#define A_ADCCR_RCHANENABLE 0x00000020
#define A_ADCCR_LCHANENABLE 0x00000010
-#define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate convertor output rate */
-#define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate convertor output rate */
+#define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate converter output rate */
+#define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate converter output rate */
#define ADCCR_SAMPLERATE_48 0x00000000 /* 48kHz sample rate */
#define ADCCR_SAMPLERATE_44 0x00000001 /* 44.1kHz sample rate */
#define ADCCR_SAMPLERATE_32 0x00000002 /* 32kHz sample rate */
diff --git a/include/sound/emux_legacy.h b/include/sound/emux_legacy.h
index 1127e30d33bb..55a7fbfb9bfa 100644
--- a/include/sound/emux_legacy.h
+++ b/include/sound/emux_legacy.h
@@ -5,7 +5,7 @@
/*
* Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
*
- * Definitions of OSS compatible headers for Emu8000 device informations
+ * Definitions of OSS compatible headers for Emu8000 device information
*/
#include <sound/seq_oss_legacy.h>
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index bd8c3a033577..68faec56970e 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -219,12 +219,14 @@ static inline int simple_util_parse_aux_devs(struct simple_util_priv *priv, char
int simple_util_init_jack(struct snd_soc_card *card,
struct simple_util_jack *sjack,
int is_hp, char *prefix, char *pin);
+void simple_util_remove_jack(struct simple_util_jack *sjack);
int simple_util_init_aux_jacks(struct snd_soc_card *card, char *prefix);
int simple_util_init_priv(struct simple_util_priv *priv,
struct link_info *li);
void simple_util_remove(struct platform_device *pdev);
int graph_util_card_probe(struct snd_soc_card *card);
+int graph_util_card_remove(struct snd_soc_card *card);
int graph_util_is_ports0(struct device_node *port);
int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link);
diff --git a/include/trace/events/huge_memory.h b/include/trace/events/huge_memory.h
index 5fb4d92cfd84..5a48c5406cce 100644
--- a/include/trace/events/huge_memory.h
+++ b/include/trace/events/huge_memory.h
@@ -55,10 +55,10 @@ SCAN_STATUS
TRACE_EVENT(mm_khugepaged_scan_pmd,
- TP_PROTO(struct mm_struct *mm, unsigned long pfn,
+ TP_PROTO(struct mm_struct *mm, struct folio *folio,
int referenced, int none_or_zero, int status, int unmapped),
- TP_ARGS(mm, pfn, referenced, none_or_zero, status, unmapped),
+ TP_ARGS(mm, folio, referenced, none_or_zero, status, unmapped),
TP_STRUCT__entry(
__field(struct mm_struct *, mm)
@@ -71,7 +71,7 @@ TRACE_EVENT(mm_khugepaged_scan_pmd,
TP_fast_assign(
__entry->mm = mm;
- __entry->pfn = pfn;
+ __entry->pfn = folio ? folio_pfn(folio) : -1;
__entry->referenced = referenced;
__entry->none_or_zero = none_or_zero;
__entry->status = status;
@@ -178,10 +178,10 @@ TRACE_EVENT(mm_collapse_huge_page_swapin,
TRACE_EVENT(mm_khugepaged_scan_file,
- TP_PROTO(struct mm_struct *mm, unsigned long pfn, struct file *file,
+ TP_PROTO(struct mm_struct *mm, struct folio *folio, struct file *file,
int present, int swap, int result),
- TP_ARGS(mm, pfn, file, present, swap, result),
+ TP_ARGS(mm, folio, file, present, swap, result),
TP_STRUCT__entry(
__field(struct mm_struct *, mm)
@@ -194,7 +194,7 @@ TRACE_EVENT(mm_khugepaged_scan_file,
TP_fast_assign(
__entry->mm = mm;
- __entry->pfn = pfn;
+ __entry->pfn = folio ? folio_pfn(folio) : -1;
__assign_str(filename);
__entry->present = present;
__entry->swap = swap;
@@ -211,10 +211,10 @@ TRACE_EVENT(mm_khugepaged_scan_file,
);
TRACE_EVENT(mm_khugepaged_collapse_file,
- TP_PROTO(struct mm_struct *mm, unsigned long new_pfn, pgoff_t index,
+ TP_PROTO(struct mm_struct *mm, struct folio *new_folio, pgoff_t index,
unsigned long addr, bool is_shmem, struct file *file,
int nr, int result),
- TP_ARGS(mm, new_pfn, index, addr, is_shmem, file, nr, result),
+ TP_ARGS(mm, new_folio, index, addr, is_shmem, file, nr, result),
TP_STRUCT__entry(
__field(struct mm_struct *, mm)
__field(unsigned long, hpfn)
@@ -228,7 +228,7 @@ TRACE_EVENT(mm_khugepaged_collapse_file,
TP_fast_assign(
__entry->mm = mm;
- __entry->hpfn = new_pfn;
+ __entry->hpfn = new_folio ? folio_pfn(new_folio) : -1;
__entry->index = index;
__entry->addr = addr;
__entry->is_shmem = is_shmem;
diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
index ef9aa388b84f..935893e5ea53 100644
--- a/include/trace/events/mmflags.h
+++ b/include/trace/events/mmflags.h
@@ -168,10 +168,6 @@ IF_HAVE_PG_ARCH_3(arch_3)
#define __VM_ARCH_SPECIFIC_1 {VM_SAO, "sao" }
#elif defined(CONFIG_PARISC)
#define __VM_ARCH_SPECIFIC_1 {VM_GROWSUP, "growsup" }
-#elif defined(CONFIG_SPARC64)
-#define __VM_ARCH_SPECIFIC_1 {VM_SPARC_ADI, "adi" }
-#elif defined(CONFIG_ARM64)
-#define __VM_ARCH_SPECIFIC_1 {VM_ARM64_BTI, "bti" }
#elif !defined(CONFIG_MMU)
#define __VM_ARCH_SPECIFIC_1 {VM_MAPPED_COPY,"mappedcopy" }
#else
@@ -202,37 +198,6 @@ IF_HAVE_PG_ARCH_3(arch_3)
# define IF_HAVE_VM_DROPPABLE(flag, name)
#endif
-#ifdef CONFIG_ARCH_HAS_PKEYS
-# define IF_HAVE_VM_PKEY(flag, name) {flag, name},
-#if CONFIG_ARCH_PKEY_BITS > 3
-# define IF_HAVE_VM_PKEY3(flag, name) {flag, name},
-#else
-# define IF_HAVE_VM_PKEY3(flag, name)
-#endif
-#if CONFIG_ARCH_PKEY_BITS > 4
-# define IF_HAVE_VM_PKEY4(flag, name) {flag, name},
-#else
-# define IF_HAVE_VM_PKEY4(flag, name)
-#endif
-#else
-# define IF_HAVE_VM_PKEY(flag, name)
-# define IF_HAVE_VM_PKEY3(flag, name)
-# define IF_HAVE_VM_PKEY4(flag, name)
-#endif
-
-#ifdef CONFIG_ARM64_MTE
-# define IF_HAVE_VM_MTE(flag, name) {flag, name},
-#else
-# define IF_HAVE_VM_MTE(flag, name)
-#endif
-
-#if defined(CONFIG_X86_USER_SHADOW_STACK) || defined(CONFIG_RISCV_USER_CFI) || \
- defined(CONFIG_ARM64_GCS)
-# define IF_HAVE_VM_SHADOW_STACK(flag, name) {flag, name},
-#else
-# define IF_HAVE_VM_SHADOW_STACK(flag, name)
-#endif
-
#define __def_vmaflag_names \
{VM_READ, "read" }, \
{VM_WRITE, "write" }, \
@@ -268,14 +233,6 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY, "softdirty" ) \
{VM_HUGEPAGE, "hugepage" }, \
{VM_NOHUGEPAGE, "nohugepage" }, \
IF_HAVE_VM_DROPPABLE(VM_DROPPABLE, "droppable" ) \
-IF_HAVE_VM_PKEY(VM_PKEY_BIT0, "pkey_bit0") \
-IF_HAVE_VM_PKEY(VM_PKEY_BIT1, "pkey_bit1") \
-IF_HAVE_VM_PKEY(VM_PKEY_BIT2, "pkey_bit2") \
-IF_HAVE_VM_PKEY3(VM_PKEY_BIT3, "pkey_bit3") \
-IF_HAVE_VM_PKEY4(VM_PKEY_BIT4, "pkey_bit4") \
-IF_HAVE_VM_MTE(VM_MTE, "mte") \
-IF_HAVE_VM_MTE(VM_MTE_ALLOWED, "mte_allowed") \
-IF_HAVE_VM_SHADOW_STACK(VM_SHADOW_STACK, "shadow_stack") \
{VM_MERGEABLE, "mergeable" } \
#define show_vma_flags(flags) \
diff --git a/include/trace/events/tegra_apb_dma.h b/include/trace/events/tegra_apb_dma.h
index 6d9f5075baa3..c38117c127ef 100644
--- a/include/trace/events/tegra_apb_dma.h
+++ b/include/trace/events/tegra_apb_dma.h
@@ -11,7 +11,7 @@ TRACE_EVENT(tegra_dma_tx_status,
TP_PROTO(struct dma_chan *dc, dma_cookie_t cookie, struct dma_tx_state *state),
TP_ARGS(dc, cookie, state),
TP_STRUCT__entry(
- __string(chan, dev_name(&dc->dev->device))
+ __string(chan, dma_chan_name(dc))
__field(dma_cookie_t, cookie)
__field(__u32, residue)
),
@@ -28,7 +28,7 @@ TRACE_EVENT(tegra_dma_complete_cb,
TP_PROTO(struct dma_chan *dc, int count, void *ptr),
TP_ARGS(dc, count, ptr),
TP_STRUCT__entry(
- __string(chan, dev_name(&dc->dev->device))
+ __string(chan, dma_chan_name(dc))
__field(int, count)
__field(void *, ptr)
),
@@ -45,7 +45,7 @@ TRACE_EVENT(tegra_dma_isr,
TP_PROTO(struct dma_chan *dc, int irq),
TP_ARGS(dc, irq),
TP_STRUCT__entry(
- __string(chan, dev_name(&dc->dev->device))
+ __string(chan, dma_chan_name(dc))
__field(int, irq)
),
TP_fast_assign(
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 8a872990b4be..b4bf7b8def1f 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -214,6 +214,13 @@ DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_be
TP_ARGS(gfp_flags, order, memcg)
);
+
+DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
+
+ TP_PROTO(gfp_t gfp_flags, int order, struct mem_cgroup *memcg),
+
+ TP_ARGS(gfp_flags, order, memcg)
+);
#endif /* CONFIG_MEMCG */
DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template,
@@ -253,6 +260,13 @@ DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end,
TP_ARGS(nr_reclaimed, memcg)
);
+
+DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end,
+
+ TP_PROTO(unsigned long nr_reclaimed, struct mem_cgroup *memcg),
+
+ TP_ARGS(nr_reclaimed, memcg)
+);
#endif /* CONFIG_MEMCG */
TRACE_EVENT(mm_shrink_slab_start,
diff --git a/include/uapi/linux/alloc_tag.h b/include/uapi/linux/alloc_tag.h
index e3ad94444864..7d4618bea043 100644
--- a/include/uapi/linux/alloc_tag.h
+++ b/include/uapi/linux/alloc_tag.h
@@ -38,6 +38,7 @@ struct allocinfo_counter {
__u64 bytes;
__u64 calls;
__u8 accurate;
+ __u8 pad[7];
} __attribute__((aligned(8)));
struct allocinfo_tag_data {
diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index f7cb8ae87df7..5515b718886e 100644
--- a/include/uapi/linux/gpio.h
+++ b/include/uapi/linux/gpio.h
@@ -218,7 +218,7 @@ struct gpio_v2_line_request {
* gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
* %GPIO_V2_LINE_FLAG_OUTPUT etc, added together
* @attrs: the configuration attributes associated with the line
- * @padding: reserved for future use
+ * @padding: reserved for future use, must be zero filled
*/
struct gpio_v2_line_info {
char name[GPIO_MAX_NAME_SIZE];
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index f87aaf28a649..82c41aeb4357 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -330,6 +330,17 @@ enum netlink_attribute_type {
};
/**
+ * enum netlink_policy_byte_order - byte order of an integer attribute
+ * @NL_POLICY_BYTE_ORDER_BIG_ENDIAN: big endian (network byte order)
+ *
+ * Zero is left unassigned so that it keeps meaning host byte order,
+ * which is also what a missing byte order means.
+ */
+enum netlink_policy_byte_order {
+ NL_POLICY_BYTE_ORDER_BIG_ENDIAN = 1,
+};
+
+/**
* enum netlink_policy_type_attr - policy type attributes
* @NL_POLICY_TYPE_ATTR_UNSPEC: unused
* @NL_POLICY_TYPE_ATTR_TYPE: type of the attribute,
@@ -356,6 +367,8 @@ enum netlink_attribute_type {
* bitfield32 type (U32)
* @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
* @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
+ * @NL_POLICY_TYPE_ATTR_BYTE_ORDER: byte order of an integer attribute,
+ * &enum netlink_policy_byte_order, absent if host byte order (U32)
*
* @__NL_POLICY_TYPE_ATTR_MAX: number of attributes
* @NL_POLICY_TYPE_ATTR_MAX: highest attribute number
@@ -374,6 +387,7 @@ enum netlink_policy_type_attr {
NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
NL_POLICY_TYPE_ATTR_PAD,
NL_POLICY_TYPE_ATTR_MASK,
+ NL_POLICY_TYPE_ATTR_BYTE_ORDER,
/* keep last */
__NL_POLICY_TYPE_ATTR_MAX,
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d8fefefc11a9..510102febc26 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3185,6 +3185,11 @@ enum nl80211_commands {
* The aggregated message always precedes the per-link messages for the
* same station within a dump sequence.
*
+ * @NL80211_ATTR_FRAME_NO_STA: Valid for @NL80211_CMD_FRAME to denote that
+ * the kernel had no station for a received frame or should not use a
+ * known station to transmit a frame. This is relevant to know whether
+ * MLD address translation happened or to disable it when sending a frame.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3785,6 +3790,8 @@ enum nl80211_attrs {
NL80211_ATTR_STA_DUMP_LINK_STATS,
+ NL80211_ATTR_FRAME_NO_STA,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -7114,6 +7121,10 @@ enum nl80211_feature_flags {
* @NL80211_EXT_FEATURE_PROBE_AP: Driver supports probing the associated AP
* in STA mode using @NL80211_CMD_PROBE_PEER.
*
+ * @NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD: Driver supports fast roaming
+ * offload in station mode, including Fast Transition or Opportunistic
+ * Key Caching.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -7196,6 +7207,7 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
NL80211_EXT_FEATURE_PROBE_AP,
+ NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
diff --git a/include/uapi/linux/random.h b/include/uapi/linux/random.h
index 1dd047ec98a1..ef6614d9c704 100644
--- a/include/uapi/linux/random.h
+++ b/include/uapi/linux/random.h
@@ -58,7 +58,7 @@ struct rand_pool_info {
/**
* struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom
*
- * @size_per_opaque_state: Size of each state that is to be passed to vgetrandom().
+ * @size_of_opaque_state: Size of each state passed to vgetrandom().
* @mmap_prot: Value of the prot argument in mmap(2).
* @mmap_flags: Value of the flags argument in mmap(2).
* @reserved: Reserved for future use.
diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h
index 5203977ed35d..76815b0f4b66 100644
--- a/include/uapi/linux/tee.h
+++ b/include/uapi/linux/tee.h
@@ -385,24 +385,6 @@ struct tee_iocl_supp_send_arg {
struct tee_ioctl_buf_data)
/**
- * struct tee_ioctl_shm_register_data - Shared memory register argument
- * @addr: [in] Start address of shared memory to register
- * @length: [in/out] Length of shared memory to register
- * @flags: [in/out] Flags to/from registration.
- * @id: [out] Identifier of the shared memory
- *
- * The flags field should currently be zero as input. Updated by the call
- * with actual flags as defined by TEE_IOCTL_SHM_* above.
- * This structure is used as argument for TEE_IOC_SHM_REGISTER below.
- */
-struct tee_ioctl_shm_register_data {
- __u64 addr;
- __u64 length;
- __u32 flags;
- __s32 id;
-};
-
-/**
* struct tee_ioctl_shm_register_fd_data - Shared memory registering argument
* @fd: [in] File descriptor identifying dmabuf reference
* @size: [out] Size of referenced memory
@@ -426,7 +408,7 @@ struct tee_ioctl_shm_register_fd_data {
* Returns a file descriptor on success or < 0 on failure
*
* The returned file descriptor refers to the shared memory object in the
- * kernel. The supplied file deccriptor can be closed if it's not needed
+ * kernel. The supplied file descriptor can be closed if it's not needed
* for other purposes. The shared memory is freed when the descriptor is
* closed.
*/
@@ -434,13 +416,31 @@ struct tee_ioctl_shm_register_fd_data {
struct tee_ioctl_shm_register_fd_data)
/**
+ * struct tee_ioctl_shm_register_data - Shared memory register argument
+ * @addr: [in] Start address of shared memory to register
+ * @length: [in/out] Length of shared memory to register
+ * @flags: [in/out] Flags to/from registration.
+ * @id: [out] Identifier of the shared memory
+ *
+ * The flags field should currently be zero as input. Updated by the call
+ * with actual flags as defined by TEE_IOCTL_SHM_* above.
+ * This structure is used as argument for TEE_IOC_SHM_REGISTER below.
+ */
+struct tee_ioctl_shm_register_data {
+ __u64 addr;
+ __u64 length;
+ __u32 flags;
+ __s32 id;
+};
+
+/**
* TEE_IOC_SHM_REGISTER - Register shared memory argument
*
* Registers shared memory between the user space process and secure OS.
*
* Returns a file descriptor on success or < 0 on failure
*
- * The shared memory is unregisterred when the descriptor is closed.
+ * The shared memory is unregistered when the descriptor is closed.
*/
#define TEE_IOC_SHM_REGISTER _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, \
struct tee_ioctl_shm_register_data)
diff --git a/include/vdso/getrandom.h b/include/vdso/getrandom.h
index 6ca4d6de9e46..1d9dbd4d76c1 100644
--- a/include/vdso/getrandom.h
+++ b/include/vdso/getrandom.h
@@ -64,7 +64,7 @@ extern void __arch_chacha20_blocks_nostack(u8 *dst_bytes, const u32 *key, u32 *c
* @opaque_state: Passed to __cvdso_getrandom().
* @opaque_len: Passed to __cvdso_getrandom();
*
- * This function is implemented by making a single call to to __cvdso_getrandom(), whose
+ * This function is implemented by making a single call to __cvdso_getrandom(), whose
* documentation may be consulted for more information.
*
* Returns: The return value of __cvdso_getrandom().
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index f7e8d766d128..d09d4c3fe547 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -272,10 +272,13 @@ struct stack_map_vma_lock {
/*
* Acquire a stable read-side reference on the VMA covering @ip.
*
- * On NOMMU configurations, returns with the mmap_lock held. If the MMU
- * is enabled, the per-VMA lock will be held instead. The lock
- * should be released with stack_map_unlock_vma() which will release the
- * appropriate lock. Once the lock is released, the VMA may be freed.
+ * With CONFIG_PER_VMA_LOCK=y this returns a VMA with its per-VMA read
+ * lock held and mmap_lock dropped, so the caller may sleep.
+ *
+ * With CONFIG_PER_VMA_LOCK=n it returns a VMA with mmap_lock still
+ * held; the caller must snapshot any fields it needs and pin vm_file
+ * with get_file() before stack_map_unlock_vma() drops mmap_lock, as
+ * the VMA may be split, merged, or freed after that.
*
* Returns NULL on failure, in which case no lock is held.
*/
@@ -285,6 +288,7 @@ stack_map_lock_vma(struct stack_map_vma_lock *lock, unsigned long ip)
struct mm_struct *mm = lock->mm;
struct vm_area_struct *vma;
+ /* noop under !CONFIG_PER_VMA_LOCK */
vma = lock_vma_under_rcu(mm, ip);
if (vma) {
lock->vma = vma;
@@ -304,20 +308,21 @@ stack_map_lock_vma(struct stack_map_vma_lock *lock, unsigned long ip)
return NULL;
}
-#ifdef CONFIG_MMU
+#ifdef CONFIG_PER_VMA_LOCK
if (!vma_start_read_locked(vma)) {
mmap_read_unlock(mm);
return NULL;
}
mmap_read_unlock(mm);
#endif
+
lock->vma = vma;
return vma;
}
static void stack_map_unlock_vma(struct stack_map_vma_lock *lock)
{
-#ifdef CONFIG_MMU
+#ifdef CONFIG_PER_VMA_LOCK
vma_end_read(lock->vma);
#else
mmap_read_unlock(lock->mm);
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index c65ba1dcd866..13e1aabe6f88 100644
--- a/kernel/bpf/task_iter.c
+++ b/kernel/bpf/task_iter.c
@@ -869,7 +869,7 @@ __bpf_kfunc int bpf_iter_task_vma_new(struct bpf_iter_task_vma *it,
BUILD_BUG_ON(sizeof(struct bpf_iter_task_vma_kern) != sizeof(struct bpf_iter_task_vma));
BUILD_BUG_ON(__alignof__(struct bpf_iter_task_vma_kern) != __alignof__(struct bpf_iter_task_vma));
- if (!IS_ENABLED(CONFIG_MMU)) {
+ if (!IS_ENABLED(CONFIG_PER_VMA_LOCK)) {
kit->data = NULL;
return -EOPNOTSUPP;
}
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index 233fb8b45d2c..f2684f9f8e0a 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -285,6 +285,7 @@ extern struct kernfs_syscall_ops cgroup1_kf_syscall_ops;
extern const struct fs_parameter_spec cgroup1_fs_parameters[];
int proc_cgroupstats_show(struct seq_file *m, void *v);
+bool cgroup1_ssid_disabled(int ssid);
void cgroup1_pidlist_destroy_all(struct cgroup *cgrp);
void cgroup1_release_agent(struct work_struct *work);
void cgroup1_check_for_release(struct cgroup *cgrp);
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 16c0362330ac..804318ae160e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5321,10 +5321,13 @@ struct task_struct *css_task_iter_next(struct css_task_iter *it)
if (it->flags & CSS_TASK_ITER_SKIPPED)
css_task_iter_advance(it);
- if (it->task_pos) {
+ while (it->task_pos && !it->cur_task) {
it->cur_task = list_entry(it->task_pos, struct task_struct,
cg_list);
- get_task_struct(it->cur_task);
+ /* a task on dying_tasks with zero refcount is only valid for
+ * RCU readers, not even interesting for
+ * CSS_TASK_ITER_WITH_DEAD, find another one */
+ it->cur_task = tryget_task_struct(it->cur_task);
css_task_iter_advance(it);
}
diff --git a/kernel/fork.c b/kernel/fork.c
index 14b113fc7645..5144318130d4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -280,7 +280,7 @@ static void thread_stack_free_rcu(struct rcu_head *rh)
if (try_release_thread_stack_to_cache(vm_stack->stack_vm_area))
return;
- vfree(vm_area->addr);
+ vfree(kasan_reset_tag(vm_area->addr));
}
static void thread_stack_delayed_free(struct task_struct *tsk)
@@ -1084,7 +1084,9 @@ static void mmap_init_lock(struct mm_struct *mm)
{
init_rwsem(&mm->mmap_lock);
mm_lock_seqcount_init(mm);
+#ifdef CONFIG_PER_VMA_LOCK
rcuwait_init(&mm->vma_writer_wait);
+#endif
}
static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p)
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 423b41c968e5..54b60fdfe462 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -89,7 +89,7 @@ static inline int hibernate_restore_unprotect_page(void *page_address) {return 0
static inline void hibernate_map_page(struct page *page)
{
if (IS_ENABLED(CONFIG_ARCH_HAS_SET_DIRECT_MAP)) {
- int ret = set_direct_map_default_noflush(page, 1);
+ int ret = set_direct_map_default_noflush(page);
if (ret)
pr_warn_once("Failed to remap page\n");
@@ -102,7 +102,7 @@ static inline void hibernate_unmap_page(struct page *page)
{
if (IS_ENABLED(CONFIG_ARCH_HAS_SET_DIRECT_MAP)) {
unsigned long addr = (unsigned long)page_address(page);
- int ret = set_direct_map_invalid_noflush(page, 1);
+ int ret = set_direct_map_invalid_noflush(page);
if (ret)
pr_warn_once("Failed to remap page\n");
diff --git a/kernel/resource.c b/kernel/resource.c
index 54d7199695fb..cfc1a00e86aa 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1833,7 +1833,7 @@ __setup("reserve=", reserve_setup);
*/
int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
{
- resource_size_t end = addr + size - 1;
+ struct resource mem = DEFINE_RES_MEM(addr, size);
struct resource *p;
int err = 0;
@@ -1843,12 +1843,10 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
* We can probably skip the resources without
* IORESOURCE_IO attribute?
*/
- if (p->start > end)
+ if (!resource_overlaps(p, &mem))
continue;
- if (p->end < addr)
- continue;
- if (PFN_DOWN(p->start) <= PFN_DOWN(addr) &&
- PFN_DOWN(p->end) >= PFN_DOWN(end))
+ if (PFN_DOWN(p->start) <= PFN_DOWN(mem.start) &&
+ PFN_DOWN(p->end) >= PFN_DOWN(mem.end))
continue;
/*
* if a resource is "BUSY", it's not a hardware resource
@@ -1859,8 +1857,8 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
if (p->flags & IORESOURCE_BUSY)
continue;
- pr_debug("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
- &addr, &end, p->name, p);
+ pr_debug("resource sanity check: requesting %pR, which spans more than %s %pR\n",
+ &mem, p->name, p);
err = -1;
break;
}
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index f875c50f00bb..f8ea8265fe61 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -3670,8 +3670,20 @@ static void handle_hotplug(struct rq *rq, bool online)
s16 *tbl = rcu_dereference_check(scx_cpu_to_cid_tbl,
lockdep_is_cpus_held());
- if (tbl)
+ if (tbl) {
+ struct scx_sched *pos;
+
cpu_or_cid = tbl[cpu];
+
+ guard(raw_spinlock_irqsave)(&scx_sched_lock);
+ list_for_each_entry(pos, &scx_sched_all, all) {
+ struct scx_cmask *mask = pos->online_cmask;
+
+ if (mask)
+ __assign_bit(cpu_or_cid, (unsigned long *)mask->bits,
+ online);
+ }
+ }
}
if (online && SCX_HAS_OP(sch, cpu_online))
@@ -5287,12 +5299,17 @@ static void free_exit_info(struct scx_exit_info *ei);
static const char *scx_exit_reason(enum scx_exit_kind kind);
static bool scx_claim_exit(struct scx_sched *sch, enum scx_exit_kind kind);
-s32 scx_set_cmask_scratch_alloc(struct scx_sched *sch)
+s32 scx_alloc_kern_arena_objs(struct scx_sched *sch)
{
size_t size = struct_size_t(struct scx_cmask, bits,
SCX_CMASK_NR_WORDS(num_possible_cpus()));
+ struct scx_cmask *online;
+ struct scx_cmask_ref ref;
int cpu;
+ /* hotplug stays excluded until the online mask is published */
+ lockdep_assert_cpus_held();
+
if (!sch->is_cid_type || !sch->arena_pool)
return 0;
@@ -5308,15 +5325,28 @@ s32 scx_set_cmask_scratch_alloc(struct scx_sched *sch)
return -ENOMEM;
scx_cmask_init(*slot, 0, num_possible_cpus());
}
+
+ /* pack the online mask alongside the scratch masks */
+ online = scx_arena_alloc(sch, size);
+ if (!online)
+ return -ENOMEM;
+
+ scoped_guard(rcu) {
+ scx_cmask_ref_init_kern(sch, online, 0, num_possible_cpus(), &ref);
+ scx_cmask_ref_from_cpumask(&ref, cpu_active_mask);
+ }
+ sch->online_cmask = online;
+
return 0;
}
-static void scx_set_cmask_scratch_free(struct scx_sched *sch)
+static void scx_free_kern_arena_objs(struct scx_sched *sch)
{
size_t size = struct_size_t(struct scx_cmask, bits,
SCX_CMASK_NR_WORDS(num_possible_cpus()));
int cpu;
+ scx_arena_free(sch, sch->online_cmask, size);
if (!sch->set_cmask_scratch)
return;
@@ -5403,7 +5433,7 @@ static void scx_sched_free_rcu_work(struct work_struct *work)
rhashtable_free_and_destroy(&sch->dsq_hash, NULL, NULL);
free_exit_info(sch->exit_info);
- scx_set_cmask_scratch_free(sch);
+ scx_free_kern_arena_objs(sch);
scx_arena_pool_destroy(sch);
if (sch->arena_map)
bpf_map_put(sch->arena_map);
@@ -7608,7 +7638,7 @@ static void scx_root_enable_workfn(struct kthread_work *work)
goto err_disable;
}
- ret = scx_set_cmask_scratch_alloc(sch);
+ ret = scx_alloc_kern_arena_objs(sch);
if (ret) {
cpus_read_unlock();
goto err_disable;
@@ -10359,7 +10389,8 @@ __bpf_kfunc u32 scx_bpf_nr_cids(void)
* hotplug, which lets schedulers treat [0, nr_online_cids) as the online
* range. Schedulers that prefer to handle hotplug without a restart should
* install a custom mapping via scx_bpf_cid_override() and track onlining
- * through the ops.cid_online / ops.cid_offline callbacks.
+ * through the ops.cid_online / ops.cid_offline callbacks, starting from the
+ * mask scx_bpf_online_cmask() returns.
*/
__bpf_kfunc u32 scx_bpf_nr_online_cids(void)
{
@@ -10367,6 +10398,37 @@ __bpf_kfunc u32 scx_bpf_nr_online_cids(void)
}
/**
+ * scx_bpf_online_cmask - Return the online cid mask in the scheduler arena
+ * @aux: implicit BPF argument to access bpf_prog_aux hidden from BPF progs
+ *
+ * Return a kernel-maintained cmask covering [0, scx_bpf_nr_cids()), or NULL if
+ * the calling program is not associated with a live cid-form scheduler or the
+ * mask is not allocated yet, as in ops.init_cids(). Treat the mask as read-only
+ * even though arena memory stays writable by the BPF scheduler. The mask
+ * follows the SCX hotplug notifications: a cid's bit is updated before
+ * ops.cid_online/offline() runs for it. The pointer is valid from ops.init()
+ * through ops.exit(). Root ops.init() runs with hotplug excluded. Other
+ * contexts can observe concurrent updates.
+ */
+__bpf_kfunc const void *scx_bpf_online_cmask(const struct bpf_prog_aux *aux)
+{
+ struct scx_sched *sch;
+ struct scx_cmask *online;
+
+ guard(rcu)();
+
+ sch = scx_prog_sched(aux);
+ if (unlikely(!sch))
+ return NULL;
+ online = sch->online_cmask;
+ if (unlikely(!online))
+ return NULL;
+
+ /* BPF rebases by the low 32 bits, like __arena callback args */
+ return (void *)((unsigned long)online - sch->arena_kern_base);
+}
+
+/**
* scx_bpf_this_cid - Return the cid of the CPU this program is running on
*
* cid-addressed equivalent of bpf_get_smp_processor_id() for scx programs.
@@ -10729,6 +10791,7 @@ BTF_ID_FLAGS(func, scx_bpf_nr_node_ids)
BTF_ID_FLAGS(func, scx_bpf_nr_cpu_ids)
BTF_ID_FLAGS(func, scx_bpf_nr_cids)
BTF_ID_FLAGS(func, scx_bpf_nr_online_cids)
+BTF_ID_FLAGS(func, scx_bpf_online_cmask, KF_IMPLICIT_ARGS | KF_ARENA_RET)
BTF_ID_FLAGS(func, scx_bpf_this_cid)
BTF_ID_FLAGS(func, scx_bpf_get_possible_cpumask, KF_ACQUIRE)
BTF_ID_FLAGS(func, scx_bpf_get_online_cpumask, KF_ACQUIRE)
diff --git a/kernel/sched/ext/internal.h b/kernel/sched/ext/internal.h
index e1eb3a0d456c..8ea40f15bda1 100644
--- a/kernel/sched/ext/internal.h
+++ b/kernel/sched/ext/internal.h
@@ -572,6 +572,12 @@ struct sched_ext_ops {
*
* Specify the %SCX_OPS_KEEP_BUILTIN_IDLE flag to keep the built-in idle
* tracking.
+ *
+ * Only actual transitions are reported. A CPU that is claimed with an
+ * idle pick and kicked but dispatches no task returns to idle without a
+ * transition. A scheduler tracking idle CPUs itself must restore the
+ * idle state from ops.dispatch() when it returns without the next task
+ * to run.
*/
void (*update_idle)(s32 cpu, bool idle);
@@ -1555,6 +1561,7 @@ struct scx_sched {
* and passes it to the callback's __arena argument.
*/
struct scx_cmask * __percpu *set_cmask_scratch;
+ struct scx_cmask *online_cmask;
DECLARE_BITMAP(has_op, SCX_OPI_END);
@@ -2081,7 +2088,7 @@ void scx_disable_and_exit_task(struct scx_sched *sch, struct task_struct *p);
void scx_cgroup_lock(void);
void scx_cgroup_unlock(void);
#endif
-s32 scx_set_cmask_scratch_alloc(struct scx_sched *sch);
+s32 scx_alloc_kern_arena_objs(struct scx_sched *sch);
void scx_disable_bypass_dsp(struct scx_sched *sch);
void scx_bypass(struct scx_sched *sch, bool bypass);
s32 scx_link_sched(struct scx_sched *sch);
diff --git a/kernel/sched/ext/sub.c b/kernel/sched/ext/sub.c
index a98de68be62f..88348b4bd5bc 100644
--- a/kernel/sched/ext/sub.c
+++ b/kernel/sched/ext/sub.c
@@ -1805,6 +1805,12 @@ void scx_sub_enable_workfn(struct kthread_work *work)
goto err_disable;
}
+ scoped_guard(cpus_read_lock) {
+ ret = scx_alloc_kern_arena_objs(sch);
+ if (ret)
+ goto err_disable;
+ }
+
if (sch->ops.init) {
ret = SCX_CALL_OP_RET(sch, init, NULL);
if (ret) {
@@ -1815,10 +1821,6 @@ void scx_sub_enable_workfn(struct kthread_work *work)
sch->exit_info->flags |= SCX_EFLAG_INITIALIZED;
}
- ret = scx_set_cmask_scratch_alloc(sch);
- if (ret)
- goto err_disable;
-
struct scx_sub_attach_args sub_attach_args = {
.ops = &sch->ops,
.cgroup_path = sch->cgrp_path,
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index 598d9cd83250..3997dbb5aead 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -59,8 +59,7 @@ static DEFINE_PER_CPU(struct listener_list, listener_array);
enum actions {
REGISTER,
- DEREGISTER,
- CPU_DONT_CARE
+ DEREGISTER
};
static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 213ae1d6a014..80c354811538 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -136,6 +136,8 @@ static int sysctl_k2u_int_conv_userhz(bool *negp, ulong *u_ptr, const int *k_ptr
static ulong sysctl_msecs_to_jiffies(const ulong val)
{
+ if (val > jiffies_to_msecs(MAX_JIFFY_OFFSET))
+ return MAX_JIFFY_OFFSET;
return msecs_to_jiffies(val);
}
@@ -181,7 +183,7 @@ static int do_proc_int_conv_ms_jiffies_minmax(bool *negp, ulong *u_ptr,
int *k_ptr, int dir,
const struct ctl_table *tbl)
{
- return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, false,
+ return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, true,
sysctl_u2k_int_conv_ms, sysctl_k2u_int_conv_ms);
}
@@ -195,10 +197,10 @@ static int sysctl_k2u_ulong_conv_ms(ulong *u_ptr, const ulong *k_ptr)
return proc_ulong_k2u_conv_kop(u_ptr, k_ptr, sysctl_jiffies_to_msecs);
}
-static int do_proc_ulong_conv_ms_jiffies(bool *negp, ulong *u_ptr, ulong *k_ptr,
- int dir, const struct ctl_table *tbl)
+static int do_proc_ulong_conv_ms_jiffies_minmax(bool *negp, ulong *u_ptr, ulong *k_ptr,
+ int dir, const struct ctl_table *tbl)
{
- return proc_ulong_conv(u_ptr, k_ptr, dir, tbl, false,
+ return proc_ulong_conv(u_ptr, k_ptr, dir, tbl, true,
sysctl_u2k_ulong_conv_ms, sysctl_k2u_ulong_conv_ms);
}
@@ -229,8 +231,8 @@ static int do_proc_int_conv_ms_jiffies_minmax(bool *negp, ulong *u_ptr,
return -ENOSYS;
}
-static int do_proc_ulong_conv_ms_jiffies(bool *negp, ulong *u_ptr, ulong *k_ptr,
- int dir, const struct ctl_table *tbl)
+static int do_proc_ulong_conv_ms_jiffies_minmax(bool *negp, ulong *u_ptr, ulong *k_ptr,
+ int dir, const struct ctl_table *tbl)
{
return -ENOSYS;
}
@@ -333,7 +335,7 @@ int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int dir,
void *buffer, size_t *lenp, loff_t *ppos)
{
return proc_doulongvec_conv(table, dir, buffer, lenp, ppos,
- do_proc_ulong_conv_ms_jiffies);
+ do_proc_ulong_conv_ms_jiffies_minmax);
}
EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
diff --git a/lib/codetag.c b/lib/codetag.c
index a0b600720afc..a9cda4c962a3 100644
--- a/lib/codetag.c
+++ b/lib/codetag.c
@@ -240,9 +240,7 @@ static int codetag_module_init(struct codetag_type *cttype, struct module *mod)
if (err < 0) {
kfree(cmod);
- /* -EOPNOTSUPP means we can load the module without its tag. */
- if (err != -EOPNOTSUPP)
- return err;
+ return err;
}
return 0;
@@ -390,11 +388,7 @@ void codetag_unload_module(struct module *mod)
++cttype->content_id;
}
up_write(&cttype->mod_lock);
- /*
- * A module whose module_load() returned -EOPNOTSUPP is not
- * in the idr but may still hold reserved section memory.
- */
- if (cttype->desc.free_section_mem)
+ if (found && cttype->desc.free_section_mem)
cttype->desc.free_section_mem(mod, true);
}
mutex_unlock(&codetag_lock);
diff --git a/lib/region_alloc_benchmark.c b/lib/region_alloc_benchmark.c
index a644f3d5431a..e88b4cf55c62 100644
--- a/lib/region_alloc_benchmark.c
+++ b/lib/region_alloc_benchmark.c
@@ -78,13 +78,11 @@ static size_t __init ida_size(unsigned long nr_ids)
static unsigned long __init benchmark_ida(unsigned long cap)
{
- struct ida ida;
+ struct ida ida = IDA_INIT(ida);
unsigned long cnt, idx, off, nr_ids = 0;
ktime_t alloc_time, free_time;
int id = -ENOSPC;
- ida_init(&ida);
-
alloc_time = ktime_get();
for (cnt = 0; cnt <= cap; cnt++) {
for (off = 0; off < reg_sz[cnt]; off++) {
@@ -127,14 +125,12 @@ static unsigned long __init benchmark_ida(unsigned long cap)
static unsigned long __init benchmark_maple_tree(unsigned long cap)
{
- struct maple_tree mt;
+ struct maple_tree mt = MTREE_INIT(mt, MT_FLAGS_ALLOC_RANGE);
unsigned long cnt, idx;
ktime_t alloc_time, free_time;
size_t sz;
int ret;
- mt_init_flags(&mt, MT_FLAGS_ALLOC_RANGE);
-
alloc_time = ktime_get();
for (cnt = 0; cnt <= cap; cnt++) {
ret = mtree_alloc_range(&mt, &idx, xa_mk_value(cnt + 1),
diff --git a/localversion-next b/localversion-next
new file mode 100644
index 000000000000..f2184be975ef
--- /dev/null
+++ b/localversion-next
@@ -0,0 +1 @@
+-next-20260916
diff --git a/mm/Kconfig b/mm/Kconfig
index c180d40cd671..604c58199acb 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -461,10 +461,8 @@ config SPARSEMEM_VMEMMAP
pfn_to_page and page_to_pfn operations. This is the most
efficient option when sufficient kernel resources are available.
-config SPARSEMEM_VMEMMAP_OPTIMIZATION
+config SPARSEMEM_VMEMMAP_PREINIT
bool
- depends on SPARSEMEM_VMEMMAP
-
#
# Select this config option from the architecture Kconfig, if it is preferred
# to enable the feature of HugeTLB/dev_dax vmemmap optimization.
@@ -475,6 +473,9 @@ config ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
config ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
bool
+config ARCH_WANT_HUGETLB_VMEMMAP_PREINIT
+ bool
+
config HAVE_MEMBLOCK_PHYS_MAP
bool
@@ -1429,6 +1430,18 @@ config LRU_GEN_WALKS_MMU
depends on LRU_GEN && ARCH_HAS_HW_PTE_YOUNG
# }
+config ARCH_SUPPORTS_PER_VMA_LOCK
+ def_bool n
+
+config PER_VMA_LOCK
+ def_bool y
+ depends on ARCH_SUPPORTS_PER_VMA_LOCK && MMU && SMP
+ help
+ Allow per-vma locking during page fault handling.
+
+ This feature allows locking each virtual memory area separately when
+ handling page faults instead of taking mmap_lock.
+
config LOCK_MM_AND_FIND_VMA
bool
depends on !STACK_GROWSUP
@@ -1469,7 +1482,7 @@ config HAVE_ARCH_TLB_REMOVE_TABLE
config PT_RECLAIM
def_bool y
- depends on MMU && !HAVE_ARCH_TLB_REMOVE_TABLE
+ depends on MMU_GATHER_RCU_TABLE_FREE && !HAVE_ARCH_TLB_REMOVE_TABLE
help
Try to reclaim empty user page table pages in paths other than munmap
and exit_mmap path.
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 9eaa25d1cf23..15dca19dd07d 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -310,6 +310,7 @@ config DEBUG_KMEMLEAK_VERBOSE
config PER_VMA_LOCK_STATS
bool "Statistics for per-vma locks"
+ depends on PER_VMA_LOCK
help
Say Y here to enable success, retry and failure counters of page
faults handled under protection of per-vma locks. When enabled, the
diff --git a/mm/Makefile b/mm/Makefile
index 2a3ec53d62ee..e7245cb88c66 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -55,8 +55,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
mm_init.o percpu.o slab_common.o \
compaction.o show_mem.o \
interval_tree.o list_lru.o workingset.o \
- debug.o gup.o mmap_lock.o vma_init.o char-mem.o \
- $(mmu-y)
+ debug.o gup.o mmap_lock.o vma_init.o $(mmu-y)
# Give 'page_alloc' its own module-parameter namespace
page-alloc-y := page_alloc.o
diff --git a/mm/alloc_tag.c b/mm/alloc_tag.c
index f30ef8dd24c7..b33410310477 100644
--- a/mm/alloc_tag.c
+++ b/mm/alloc_tag.c
@@ -15,7 +15,6 @@
#include <linux/seq_file.h>
#include <linux/string_choices.h>
#include <linux/vmalloc.h>
-#include <linux/workqueue.h>
#include <linux/kmemleak.h>
#include <uapi/linux/alloc_tag.h>
@@ -592,13 +591,6 @@ void pgalloc_tag_swap(struct folio *new, struct folio *old)
put_page_tag_ref(handle_new);
}
-static void remove_allocinfo_file(struct work_struct *work)
-{
- remove_proc_entry(ALLOCINFO_FILE_NAME, NULL);
-}
-
-static DECLARE_WORK(remove_allocinfo_work, remove_allocinfo_file);
-
static void shutdown_mem_profiling(bool remove_file)
{
if (mem_alloc_profiling_enabled())
@@ -608,7 +600,7 @@ static void shutdown_mem_profiling(bool remove_file)
return;
if (remove_file)
- schedule_work(&remove_allocinfo_work);
+ remove_proc_entry(ALLOCINFO_FILE_NAME, NULL);
mem_profiling_support = false;
}
@@ -983,10 +975,6 @@ static int load_module(struct module *mod, struct codetag *start, struct codetag
struct alloc_tag *stop_tag;
struct alloc_tag *tag;
- /* Profiling disabled: load the module without its tags. */
- if (!mem_profiling_support)
- return -EOPNOTSUPP;
-
/* percpu counters for core allocations are already statically allocated */
if (!mod)
return 0;
diff --git a/mm/cma.h b/mm/cma.h
index 68e574b0f951..ab6d39898ea5 100644
--- a/mm/cma.h
+++ b/mm/cma.h
@@ -2,24 +2,14 @@
#ifndef __MM_CMA_H__
#define __MM_CMA_H__
-#include <linux/atomic.h>
#include <linux/cma.h>
-#include <linux/list.h>
-#include <linux/mutex.h>
-#include <linux/spinlock.h>
-
-#ifdef CONFIG_CMA_DEBUGFS
#include <linux/debugfs.h>
-#endif
-
-#ifdef CONFIG_CMA_SYSFS
#include <linux/kobject.h>
struct cma_kobject {
struct kobject kobj;
struct cma *cma;
};
-#endif
/*
* Multi-range support. This can be useful if the size of the allocation
@@ -48,10 +38,10 @@ struct cma_memrange {
#define CMA_MAX_RANGES 8
struct cma {
- unsigned long count;
- unsigned long available_count;
+ unsigned long count;
+ unsigned long available_count;
unsigned int order_per_bit; /* Order of pages represented by one bit */
- spinlock_t lock;
+ spinlock_t lock;
struct mutex alloc_mutex;
#ifdef CONFIG_CMA_DEBUGFS
struct hlist_head mem_head;
@@ -97,11 +87,10 @@ void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages);
void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages);
#else
static inline void cma_sysfs_account_success_pages(struct cma *cma,
- unsigned long nr_pages) {}
+ unsigned long nr_pages) {};
static inline void cma_sysfs_account_fail_pages(struct cma *cma,
- unsigned long nr_pages) {}
+ unsigned long nr_pages) {};
static inline void cma_sysfs_account_release_pages(struct cma *cma,
- unsigned long nr_pages) {}
+ unsigned long nr_pages) {};
#endif
-
#endif
diff --git a/mm/collapse.h b/mm/collapse.h
deleted file mode 100644
index 1ebbbf63fb25..000000000000
--- a/mm/collapse.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __MM_COLLAPSE_H
-#define __MM_COLLAPSE_H
-
-#include <linux/mm.h>
-#include <linux/nodemask.h>
-#include <linux/pgtable.h>
-#include <linux/types.h>
-
-#define COLLAPSE_MAX_PTES_LIMIT (HPAGE_PMD_NR - 1)
-#define COLLAPSE_MIN_MTHP_ORDER 2
-
-enum scan_result {
- SCAN_FAIL,
- SCAN_SUCCEED,
- SCAN_NO_PTE_TABLE,
- SCAN_PMD_MAPPED,
- SCAN_EXCEED_NONE_PTE,
- SCAN_EXCEED_SWAP_PTE,
- SCAN_EXCEED_SHARED_PTE,
- SCAN_PTE_NON_PRESENT,
- SCAN_PTE_UFFD,
- SCAN_PTE_MAPPED_HUGEPAGE,
- SCAN_LACK_REFERENCED_PAGE,
- SCAN_PAGE_NULL,
- SCAN_SCAN_ABORT,
- SCAN_PAGE_COUNT,
- SCAN_PAGE_LRU,
- SCAN_PAGE_LOCK,
- SCAN_PAGE_ANON,
- SCAN_PAGE_LAZYFREE,
- SCAN_PAGE_COMPOUND,
- SCAN_ANY_PROCESS,
- SCAN_VMA_NULL,
- SCAN_VMA_CHECK,
- SCAN_ADDRESS_RANGE,
- SCAN_DEL_PAGE_LRU,
- SCAN_ALLOC_HUGE_PAGE_FAIL,
- SCAN_CGROUP_CHARGE_FAIL,
- SCAN_TRUNCATED,
- SCAN_PAGE_HAS_PRIVATE,
- SCAN_STORE_FAILED,
- SCAN_COPY_MC,
- SCAN_PAGE_FILLED,
- SCAN_PAGE_DIRTY_OR_WRITEBACK,
-};
-
-/* What a collapse is allowed to do, decided by the caller that asks for it */
-struct collapse_policy {
- /* Limits, stated per PMD; HPAGE_PMD_NR means "no limit" */
- unsigned int max_ptes_none;
- unsigned int max_ptes_swap;
- unsigned int max_ptes_shared;
-
- /* Take no swapped-out or shared PTE into a sub-PMD collapse */
- bool strict_sub_pmd;
-
- /* Leave clean lazyfree folios to reclaim rather than collapse them */
- bool skip_lazyfree;
-
- /* Refuse a range with no sign of use */
- bool require_referenced;
-
- /* Map the PMD over a file collapse instead of leaving it to a fault */
- bool install_pmd;
-
- /* Write dirty pages back and retry once instead of refusing them */
- bool writeback_dirty;
-
- /* How hard to try for a destination folio */
- gfp_t gfp;
-
- /* Which VMAs are eligible, as thp_vma_allowable_orders() spells it */
- enum tva_type tva_type;
-};
-
-struct collapse_control {
- struct collapse_policy policy;
-
- /* Num pages scanned per node */
- u32 node_load[MAX_NUMNODES];
-
- /* Num pages scanned (see khugepaged_pages_to_scan) */
- unsigned int progress;
-
- /* nodemask for allocation fallback */
- nodemask_t alloc_nmask;
-
- /* Each bit marks a PTE the scan accepted as a collapse source */
- DECLARE_BITMAP(eligible_ptes, MAX_PTRS_PER_PTE);
-
- /*
- * What a scan found and the run after it needs. Live only between the
- * two, and read by nobody else.
- *
- * The file side takes a reference while it still has the VMA, since a
- * file collapse works on the page cache and never sees one; the run is
- * what gives it back. A scan that found the PMD folio already in the
- * cache leaves only the PTE table to retract.
- */
- unsigned long scan_orders;
- int scan_referenced;
- int scan_unmapped;
- struct file *scan_file;
- pgoff_t scan_pgoff;
- bool scan_retract_only;
-};
-
-/* Which orders a VMA may collapse to, zero when it may not collapse at all */
-unsigned long collapse_possible_orders(struct vm_area_struct *vma,
- vm_flags_t vm_flags, enum tva_type tva_flags);
-
-/*
- * A caller states what it allows in cc->policy and then hands over one PTE
- * table's worth of a VMA at a time:
- *
- * collapse_control_init(cc) once, before the first table
- * collapse_scan_pmd(vma, addr, ...) per table
- * collapse_run_pmd(mm, addr, cc) when a scan found work
- * collapse_control_release(cc) once, when done with the control
- *
- * The caller holds mmap_lock for reading over the scan and passes an address
- * within @vma, aligned to the PTE table the scan is to judge.
- *
- * The scan returns with that lock still held. It only reads, and almost every
- * table it is offered has nothing to collapse, so a caller walks a whole VMA
- * under the one lock it took to get there. SCAN_SUCCEED means there is
- * something to collapse; anything else is why there is not.
- *
- * The run is called without the lock and returns without it, taking what it
- * needs in between: what it does -- allocate, isolate, copy, flush -- is slow
- * enough that a writer would wait behind it. The caller gives the lock up
- * first, and with it @vma and anything derived under it, so a caller carrying
- * on has to look up again with collapse_vma_revalidate(). The run revalidates
- * for itself rather than trusting what the scan saw.
- *
- * A scan that found something has to be run: the file side takes a reference on
- * the file while it still has the VMA to take it from, and the run is what
- * gives it back.
- */
-void collapse_control_init(struct collapse_control *cc);
-void collapse_control_release(struct collapse_control *cc);
-enum scan_result collapse_scan_pmd(struct vm_area_struct *vma,
- unsigned long addr, struct collapse_control *cc,
- unsigned long orders);
-enum scan_result collapse_run_pmd(struct mm_struct *mm, unsigned long addr,
- struct collapse_control *cc);
-enum scan_result collapse_vma_revalidate(struct mm_struct *mm,
- unsigned long address, bool expect_anon,
- struct vm_area_struct **vmap, struct collapse_control *cc,
- unsigned int order);
-
-#endif /* __MM_COLLAPSE_H */
diff --git a/mm/compaction.c b/mm/compaction.c
index 4994e200bbec..a049415512c6 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -3197,6 +3197,7 @@ static int kcompactd(void *p)
long default_timeout = msecs_to_jiffies(HPAGE_FRAG_CHECK_INTERVAL_MSEC);
long timeout = default_timeout;
+ current->flags |= PF_KCOMPACTD;
set_freezable();
pgdat->kcompactd_max_order = 0;
@@ -3253,14 +3254,10 @@ static int kcompactd(void *p)
pgdat->proactive_compact_trigger = false;
}
- return 0;
-}
+ current->flags &= ~PF_KCOMPACTD;
-bool current_is_kcompactd(void)
-{
- return kthread_func(current) == kcompactd;
+ return 0;
}
-EXPORT_SYMBOL_GPL(current_is_kcompactd);
/*
* This kcompactd start function will be called by init and node-hot-add.
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 0c98f7e267d0..1764620903f2 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -10,11 +10,11 @@
#include <linux/kthread.h>
#include <linux/memcontrol.h>
#include <linux/mm.h>
-#include <linux/pid.h>
#include <linux/psi.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/string.h>
+#include <linux/string_choices.h>
/* for damon_get_folio() used by node eligible memory metrics */
#include "ops-common.h"
@@ -111,63 +111,6 @@ int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id)
return err;
}
-struct damon_prep *damon_new_prep(enum damon_prep_action action)
-{
- struct damon_prep *prep;
-
- prep = kmalloc_obj(*prep);
- if (!prep)
- return NULL;
- prep->action = action;
- INIT_LIST_HEAD(&prep->list);
- return prep;
-}
-
-void damon_add_prep(struct damon_probe *p, struct damon_prep *prep)
-{
- list_add_tail(&prep->list, &p->preps);
-}
-
-static void damon_del_prep(struct damon_prep *p)
-{
- list_del(&p->list);
-}
-
-static void damon_free_prep(struct damon_prep *p)
-{
- kfree(p);
-}
-
-static void damon_destroy_prep(struct damon_prep *p)
-{
- damon_del_prep(p);
- damon_free_prep(p);
-}
-
-static struct damon_prep *damon_nth_prep(int n, struct damon_probe *p)
-{
- struct damon_prep *prep;
- int i = 0;
-
- damon_for_each_prep(prep, p) {
- if (i++ == n)
- return prep;
- }
- return NULL;
-}
-
-static bool damon_has_prep(struct damon_ctx *c)
-{
- struct damon_prep *prep;
- struct damon_probe *probe;
-
- damon_for_each_probe(probe, c) {
- damon_for_each_prep(prep, probe)
- return true;
- }
- return false;
-}
-
struct damon_filter *damon_new_filter(enum damon_filter_type type,
bool matching, bool allow)
{
@@ -224,7 +167,6 @@ struct damon_probe *damon_new_probe(void)
if (!p)
return NULL;
p->weight = 0;
- INIT_LIST_HEAD(&p->preps);
INIT_LIST_HEAD(&p->filters);
INIT_LIST_HEAD(&p->list);
return p;
@@ -242,11 +184,8 @@ static void damon_del_probe(struct damon_probe *p)
static void damon_free_probe(struct damon_probe *p)
{
- struct damon_prep *prep, *prep_next;
struct damon_filter *f, *next;
- damon_for_each_prep_safe(prep, prep_next, p)
- damon_free_prep(prep);
damon_for_each_filter_safe(f, next, p)
damon_free_filter(f);
kfree(p);
@@ -469,12 +408,11 @@ static bool damon_is_last_region(struct damon_region *r,
* damon_probe_hits_wsum() - Returns probe hits weighted sum of a region.
* @r: region to get the weighted sum of.
* @last: if the request is for last-window aggregated probe hits.
- * @mv: use moving sum.
* @ctx: context of &r.
*
* Return: the weighted sum of probe hits of the region.
*/
-unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last, bool mv,
+unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last,
struct damon_ctx *ctx)
{
struct damon_probe *probe;
@@ -484,9 +422,6 @@ unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last, bool mv,
damon_for_each_probe(probe, ctx) {
if (last)
sum += r->last_probe_hits[i++] * probe->weight;
- else if (mv)
- sum += damon_probe_hits_mvsum(i++, r, ctx) *
- probe->weight;
else
sum += r->probe_hits[i++] * probe->weight;
}
@@ -658,7 +593,6 @@ bool damos_filter_for_ops(enum damos_filter_type type)
switch (type) {
case DAMOS_FILTER_TYPE_ADDR:
case DAMOS_FILTER_TYPE_TARGET:
- case DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
return false;
default:
break;
@@ -701,8 +635,6 @@ struct damos_quota_goal *damos_new_quota_goal(
return NULL;
goal->metric = metric;
goal->target_value = target_value;
- if (metric == DAMOS_QUOTA_SOME_MEM_PSI_US)
- goal->last_psi_total = U64_MAX;
INIT_LIST_HEAD(&goal->list);
return goal;
}
@@ -863,15 +795,9 @@ void damon_add_target(struct damon_ctx *ctx, struct damon_target *t)
list_add_tail(&t->list, &ctx->adaptive_targets);
}
-/*
- * Assign the struct pid of the given pid number to the given target.
- */
-int damon_set_target_pid(struct damon_target *t, int pid)
+bool damon_targets_empty(struct damon_ctx *ctx)
{
- t->pid = find_get_pid(pid);
- if (!t->pid)
- return -EINVAL;
- return 0;
+ return list_empty(&ctx->adaptive_targets);
}
static void damon_del_target(struct damon_target *t)
@@ -938,7 +864,6 @@ struct damon_ctx *damon_new_ctx(void)
INIT_LIST_HEAD(&ctx->adaptive_targets);
INIT_LIST_HEAD(&ctx->schemes);
- ctx->call_controls_obsolete = true;
prandom_seed_state(&ctx->rnd_state, get_random_u64());
return ctx;
@@ -1197,9 +1122,6 @@ static void damos_commit_quota_goal_union(
struct damos_quota_goal *dst, struct damos_quota_goal *src)
{
switch (dst->metric) {
- case DAMOS_QUOTA_SOME_MEM_PSI_US:
- dst->last_psi_total = U64_MAX;
- break;
case DAMOS_QUOTA_NODE_MEM_USED_BP:
case DAMOS_QUOTA_NODE_MEM_FREE_BP:
dst->nid = src->nid;
@@ -1209,25 +1131,20 @@ static void damos_commit_quota_goal_union(
dst->nid = src->nid;
dst->memcg_id = src->memcg_id;
break;
- case DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP:
- dst->nid = src->nid;
- break;
default:
break;
}
}
-static int damos_commit_quota_goal(
+static void damos_commit_quota_goal(
struct damos_quota_goal *dst, struct damos_quota_goal *src)
{
- if (!src->target_value)
- return -EINVAL;
dst->metric = src->metric;
dst->target_value = src->target_value;
if (dst->metric == DAMOS_QUOTA_USER_INPUT)
dst->current_value = src->current_value;
+ /* keep last_psi_total as is, since it will be updated in next cycle */
damos_commit_quota_goal_union(dst, src);
- return 0;
}
/**
@@ -1245,17 +1162,14 @@ static int damos_commit_quota_goal(
int damos_commit_quota_goals(struct damos_quota *dst, struct damos_quota *src)
{
struct damos_quota_goal *dst_goal, *next, *src_goal, *new_goal;
- int i = 0, j = 0, err;
+ int i = 0, j = 0;
damos_for_each_quota_goal_safe(dst_goal, next, dst) {
src_goal = damos_nth_quota_goal(i++, src);
- if (src_goal) {
- err = damos_commit_quota_goal(dst_goal, src_goal);
- if (err)
- return err;
- } else {
+ if (src_goal)
+ damos_commit_quota_goal(dst_goal, src_goal);
+ else
damos_destroy_quota_goal(dst_goal);
- }
}
damos_for_each_quota_goal_safe(src_goal, next, src) {
if (j++ < i)
@@ -1264,11 +1178,7 @@ int damos_commit_quota_goals(struct damos_quota *dst, struct damos_quota *src)
src_goal->metric, src_goal->target_value);
if (!new_goal)
return -ENOMEM;
- err = damos_commit_quota_goal(new_goal, src_goal);
- if (err) {
- damos_free_quota_goal(new_goal);
- return err;
- }
+ damos_commit_quota_goal(new_goal, src_goal);
damos_add_quota_goal(dst, new_goal);
}
return 0;
@@ -1333,10 +1243,6 @@ static void damos_commit_filter_arg(
case DAMOS_FILTER_TYPE_HUGEPAGE_SIZE:
dst->sz_range = src->sz_range;
break;
- case DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
- dst->range_min = src->range_min;
- dst->range_max = src->range_max;
- break;
default:
break;
}
@@ -1439,13 +1345,6 @@ static bool damon_valid_probe_params(struct damon_ctx *ctx)
unsigned char max_probe_hits;
struct damon_probe *probe;
unsigned int wsum, wsum_to_add;
- int nr_probes;
-
- nr_probes = 0;
- damon_for_each_probe(probe, ctx)
- nr_probes++;
- if (nr_probes > DAMON_MAX_PROBES)
- return false;
if (!damon_has_probe_weights(ctx))
return true;
@@ -1767,36 +1666,6 @@ out:
return err;
}
-static void damon_commit_prep(struct damon_prep *dst, struct damon_prep *src)
-{
- dst->action = src->action;
-}
-
-static int damon_commit_preps(struct damon_probe *dst, struct damon_probe *src)
-{
- struct damon_prep *dst_prep, *next, *src_prep, *new_prep;
- int i = 0, j = 0;
-
- damon_for_each_prep_safe(dst_prep, next, dst) {
- src_prep = damon_nth_prep(i++, src);
- if (src_prep)
- damon_commit_prep(dst_prep, src_prep);
- else
- damon_destroy_prep(dst_prep);
- }
-
- damon_for_each_prep_safe(src_prep, next, src) {
- if (j++ < i)
- continue;
-
- new_prep = damon_new_prep(src_prep->action);
- if (!new_prep)
- return -ENOMEM;
- damon_add_prep(dst, new_prep);
- }
- return 0;
-}
-
static void damon_commit_filter(struct damon_filter *dst,
struct damon_filter *src)
{
@@ -1855,9 +1724,6 @@ static int damon_commit_probes(struct damon_ctx *dst, struct damon_ctx *src)
src_probe = damon_nth_probe(i++, src);
if (src_probe) {
dst_probe->weight = src_probe->weight;
- err = damon_commit_preps(dst_probe, src_probe);
- if (err)
- return err;
err = damon_commit_filters(dst_probe, src_probe);
if (err)
return err;
@@ -1875,9 +1741,6 @@ static int damon_commit_probes(struct damon_ctx *dst, struct damon_ctx *src)
return -ENOMEM;
damon_add_probe(dst, new_probe);
new_probe->weight = src_probe->weight;
- err = damon_commit_preps(new_probe, src_probe);
- if (err)
- return err;
err = damon_commit_filters(new_probe, src_probe);
if (err)
return err;
@@ -1989,6 +1852,20 @@ out:
return err;
}
+/**
+ * damon_nr_running_ctxs() - Return number of currently running contexts.
+ */
+int damon_nr_running_ctxs(void)
+{
+ int nr_ctxs;
+
+ mutex_lock(&damon_lock);
+ nr_ctxs = nr_running_ctxs;
+ mutex_unlock(&damon_lock);
+
+ return nr_ctxs;
+}
+
/* Returns the size upper limit for each monitoring region */
static unsigned long damon_region_sz_limit(struct damon_ctx *ctx)
{
@@ -2077,6 +1954,8 @@ static int __damon_start(struct damon_ctx *ctx)
return err;
}
+static int __damon_commit_ctx(struct damon_ctx *dst, struct damon_ctx *src);
+
/**
* damon_start() - Starts the monitorings for a given group of contexts.
* @ctxs: an array of the pointers for contexts to start monitoring
@@ -2216,14 +2095,16 @@ int damon_kdamond_pid(struct damon_ctx *ctx)
* synchronization. The return value of the function will be saved in
* &damon_call_control->return_code.
*
+ * Note that this function should be called only after damon_start() with the
+ * @ctx has succeeded. Otherwise, this function could fall into an indefinite
+ * wait.
+ *
* When this function is failed, the @ctx is guaranteed to be stopped.
*
* Return: 0 on success, negative error code otherwise.
*/
int damon_call(struct damon_ctx *ctx, struct damon_call_control *control)
{
- if (!ctx)
- return -EINVAL;
if (!control->repeat)
init_completion(&control->completion);
control->canceled = false;
@@ -2515,7 +2396,7 @@ static bool damos_filter_match(struct damon_ctx *ctx, struct damon_target *t,
bool matched = false;
struct damon_target *ti;
int target_idx = 0;
- unsigned long start, end, wsum;
+ unsigned long start, end;
switch (filter->type) {
case DAMOS_FILTER_TYPE_TARGET:
@@ -2550,11 +2431,6 @@ static bool damos_filter_match(struct damon_ctx *ctx, struct damon_target *t,
damon_split_region_at(t, r, end - r->ar.start);
matched = true;
break;
- case DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:
- wsum = damon_probe_hits_wsum(r, false, true, ctx);
- matched = filter->range_min <= wsum &&
- wsum <= filter->range_max;
- break;
default:
return false;
}
@@ -2740,8 +2616,7 @@ static void damos_apply_scheme(struct damon_ctx *c, struct damon_target *t,
c->min_region_sz);
if (!sz)
goto update_stat;
- if (damon_split_region_at(t, r, sz))
- goto update_stat;
+ damon_split_region_at(t, r, sz);
}
if (damos_core_filter_out(c, t, r, s))
return;
@@ -2943,13 +2818,6 @@ static __kernel_ulong_t damos_get_node_mem_bp(
}
si_meminfo_node(&i, goal->nid);
- if (!i.totalram || i.totalram < i.freeram) {
- if (goal->metric == DAMOS_QUOTA_NODE_MEM_USED_BP)
- return 10000;
- else /* DAMOS_QUOTA_NODE_MEM_FREE_BP */
- return 0;
- }
-
if (goal->metric == DAMOS_QUOTA_NODE_MEM_USED_BP)
numerator = i.totalram - i.freeram;
else /* DAMOS_QUOTA_NODE_MEM_FREE_BP */
@@ -2990,12 +2858,6 @@ static unsigned long damos_get_node_memcg_used_bp(
mem_cgroup_put(memcg);
si_meminfo_node(&i, goal->nid);
- if (!i.totalram || i.totalram < used_pages) {
- if (goal->metric == DAMOS_QUOTA_NODE_MEMCG_USED_BP)
- return 10000;
- else /* DAMOS_QUOTA_NODE_MEMCG_FREE_BP */
- return 0;
- }
if (goal->metric == DAMOS_QUOTA_NODE_MEMCG_USED_BP)
numerator = used_pages;
else /* DAMOS_QUOTA_NODE_MEMCG_FREE_BP */
@@ -3142,28 +3004,12 @@ static unsigned int damos_get_in_active_mem_bp(bool active_ratio)
global_node_page_state(NR_LRU_BASE + LRU_ACTIVE_FILE);
inactive = global_node_page_state(NR_LRU_BASE + LRU_INACTIVE_ANON) +
global_node_page_state(NR_LRU_BASE + LRU_INACTIVE_FILE);
- total = max(active + inactive, 1);
+ total = active + inactive;
if (active_ratio)
return mult_frac(active, 10000, total);
return mult_frac(inactive, 10000, total);
}
-static unsigned int damos_hugepage_mem_bp(void)
-{
- unsigned long thp, total_pages, free_pages;
-
- total_pages = totalram_pages();
- free_pages = global_zone_page_state(NR_FREE_PAGES);
-
- if (total_pages <= free_pages)
- return 10000;
-
- thp = global_node_page_state(NR_ANON_THPS) +
- global_node_page_state(NR_SHMEM_THPS) +
- global_node_page_state(NR_FILE_THPS);
- return mult_frac(thp, 10000, total_pages - free_pages);
-}
-
static void damos_set_quota_goal_current_value(struct damon_ctx *c,
struct damos *s, struct damos_quota_goal *goal)
{
@@ -3175,12 +3021,7 @@ static void damos_set_quota_goal_current_value(struct damon_ctx *c,
break;
case DAMOS_QUOTA_SOME_MEM_PSI_US:
now_psi_total = damos_get_some_mem_psi_total();
- /* uninitialized last_psi_total; make no effect this round */
- if (goal->last_psi_total == U64_MAX)
- goal->current_value = goal->target_value;
- else
- goal->current_value = now_psi_total -
- goal->last_psi_total;
+ goal->current_value = now_psi_total - goal->last_psi_total;
goal->last_psi_total = now_psi_total;
break;
case DAMOS_QUOTA_NODE_MEM_USED_BP:
@@ -3200,9 +3041,6 @@ static void damos_set_quota_goal_current_value(struct damon_ctx *c,
goal->current_value = damos_get_node_eligible_mem_bp(c, s,
goal->nid);
break;
- case DAMOS_QUOTA_HUGEPAGE_MEM_BP:
- goal->current_value = damos_hugepage_mem_bp();
- break;
default:
break;
}
@@ -3470,7 +3308,7 @@ static unsigned int damon_merge_score(struct damon_region *r, bool last,
struct damon_ctx *ctx, bool use_probe_hits)
{
if (use_probe_hits)
- return damon_probe_hits_wsum(r, last, false, ctx);
+ return damon_probe_hits_wsum(r, last, ctx);
if (last)
return r->last_nr_accesses;
return r->nr_accesses;
@@ -3546,7 +3384,8 @@ static void kdamond_merge_regions(struct damon_ctx *c, unsigned int threshold,
unsigned int max_thres;
bool count_age = true;
- max_thres = damon_nr_samples_per_aggr(&c->attrs);
+ max_thres = c->attrs.aggr_interval /
+ (c->attrs.sample_interval ? c->attrs.sample_interval : 1);
while (true) {
nr_regions = 0;
damon_for_each_target(t, c) {
@@ -3769,6 +3608,10 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme)
/* higher than high watermark or lower than low watermark */
if (metric > scheme->wmarks.high || scheme->wmarks.low > metric) {
+ if (scheme->wmarks.activated)
+ pr_debug("deactivate a scheme (%d) for %s wmark\n",
+ scheme->action,
+ str_high_low(metric > scheme->wmarks.high));
scheme->wmarks.activated = false;
return scheme->wmarks.interval;
}
@@ -3778,6 +3621,8 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme)
!scheme->wmarks.activated)
return scheme->wmarks.interval;
+ if (!scheme->wmarks.activated)
+ pr_debug("activate a scheme (%d)\n", scheme->action);
scheme->wmarks.activated = true;
return 0;
}
@@ -3920,6 +3765,8 @@ static int kdamond_fn(void *data)
struct damon_ctx *ctx = data;
unsigned long sz_limit = 0;
+ pr_debug("kdamond (%d) starts\n", current->pid);
+
mutex_lock(&ctx->call_controls_lock);
ctx->call_controls_obsolete = false;
mutex_unlock(&ctx->call_controls_lock);
@@ -3949,19 +3796,14 @@ static int kdamond_fn(void *data)
unsigned long next_ops_update_sis = ctx->next_ops_update_sis;
unsigned long sample_interval = ctx->attrs.sample_interval;
bool access_check_disabled = damon_has_probe_weights(ctx);
- bool do_prep;
unsigned int max_merge_score = 0, max_wsum;
bool get_max_wsum;
if (kdamond_wait_activation(ctx))
break;
- do_prep = ctx->ops.prep_probes && damon_has_prep(ctx);
-
if (!access_check_disabled && ctx->ops.prepare_access_checks)
ctx->ops.prepare_access_checks(ctx);
- if (do_prep)
- ctx->ops.prep_probes(ctx, access_check_disabled);
kdamond_usleep(sample_interval);
ctx->passed_sample_intervals++;
@@ -3976,8 +3818,7 @@ static int kdamond_fn(void *data)
else
get_max_wsum = false;
max_wsum = ctx->ops.apply_probes(ctx,
- access_check_disabled && !do_prep,
- get_max_wsum);
+ access_check_disabled, get_max_wsum);
if (get_max_wsum)
max_merge_score = max_wsum;
}
@@ -4073,6 +3914,7 @@ done:
mutex_unlock(&ctx->walk_control_lock);
damos_walk_cancel(ctx);
+ pr_debug("kdamond (%d) finishes\n", current->pid);
mutex_lock(&ctx->kdamond_lock);
ctx->kdamond = NULL;
mutex_unlock(&ctx->kdamond_lock);
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index ad8e86dd3a93..bd847829a990 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -233,6 +233,8 @@ static int damon_lru_sort_add_quota_goals(struct damos *hot_scheme,
if (!active_mem_bp)
return 0;
+ if (10000 < active_mem_bp)
+ return -EINVAL;
goal = damos_new_quota_goal(DAMOS_QUOTA_ACTIVE_MEM_BP, active_mem_bp);
if (!goal)
return -ENOMEM;
@@ -344,6 +346,8 @@ static int damon_lru_sort_commit_inputs_fn(void *arg)
return damon_lru_sort_apply_parameters();
}
+static bool damon_lru_sort_damon_has_started;
+
static int damon_lru_sort_commit_inputs_store(const char *val,
const struct kernel_param *kp)
{
@@ -364,6 +368,10 @@ static int damon_lru_sort_commit_inputs_store(const char *val,
if (!commit_inputs_request)
return 0;
+ /* Skip damon_call() if ctx has not successfully started. */
+ if (!damon_lru_sort_damon_has_started)
+ return -EINVAL;
+
err = damon_call(ctx, &control);
return err ? err : control.return_code;
@@ -414,6 +422,8 @@ static int damon_lru_sort_turn(bool on)
err = damon_start(&ctx, 1, true);
if (err)
return err;
+ if (!damon_lru_sort_damon_has_started)
+ damon_lru_sort_damon_has_started = true;
return damon_call(ctx, &call_control);
}
diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index c36cc39cd2c7..8fc61d06d358 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -3,7 +3,6 @@
* Common Code for Data Access Monitoring
*/
-#include <linux/hugetlb.h>
#include <linux/migrate.h>
#include <linux/mmu_notifier.h>
#include <linux/page_idle.h>
@@ -15,20 +14,14 @@
#include "../internal.h"
#include "ops-common.h"
-static bool damon_folio_acceptable(struct folio *folio, bool monitor)
-{
- return folio_test_lru(folio) ||
- (monitor && folio_test_hugetlb(folio));
-}
-
/*
- * Get an online page for a pfn if it's in the LRU list, or a hugetlb folio if
- * @monitor is set. Otherwise, returns NULL.
+ * Get an online page for a pfn if it's in the LRU list. Otherwise, returns
+ * NULL.
*
* The body of this function is stolen from the 'page_idle_get_folio()'. We
* steal rather than reuse it because the code is quite simple.
*/
-static struct folio *__damon_get_folio(unsigned long pfn, bool monitor)
+struct folio *damon_get_folio(unsigned long pfn)
{
struct page *page = pfn_to_online_page(pfn);
struct folio *folio;
@@ -39,24 +32,13 @@ static struct folio *__damon_get_folio(unsigned long pfn, bool monitor)
folio = page_folio(page);
if (!folio_try_get(folio))
return NULL;
- if (unlikely(page_folio(page) != folio) ||
- !damon_folio_acceptable(folio, monitor)) {
+ if (unlikely(page_folio(page) != folio) || !folio_test_lru(folio)) {
folio_put(folio);
folio = NULL;
}
return folio;
}
-struct folio *damon_get_folio(unsigned long pfn)
-{
- return __damon_get_folio(pfn, false);
-}
-
-struct folio *damon_get_monitor_folio(unsigned long pfn)
-{
- return __damon_get_folio(pfn, true);
-}
-
void damon_ptep_mkold(pte_t *pte, struct vm_area_struct *vma, unsigned long addr)
{
pte_t pteval = ptep_get(pte);
@@ -121,42 +103,6 @@ void damon_pmdp_mkold(pmd_t *pmd, struct vm_area_struct *vma, unsigned long addr
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
}
-#ifdef CONFIG_HUGETLB_PAGE
-static bool damon_hugetlb_ptep_mkold(pte_t *pte, struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr, pte_t *entry)
-{
- unsigned long psize = huge_page_size(hstate_vma(vma));
-
- if (!pte_young(*entry))
- return false;
- *entry = huge_ptep_get_and_clear(mm, addr, pte, psize);
- *entry = pte_mkold(*entry);
- set_huge_pte_at(mm, addr, pte, *entry, psize);
- return true;
-}
-
-void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr)
-{
- bool referenced = false;
- pte_t entry = huge_ptep_get(mm, addr, pte);
- struct folio *folio = pfn_folio(pte_pfn(entry));
-
- folio_get(folio);
-
- referenced = damon_hugetlb_ptep_mkold(pte, mm, vma, addr, &entry);
- if (mmu_notifier_clear_young(mm, addr,
- addr + huge_page_size(hstate_vma(vma))))
- referenced = true;
-
- if (referenced)
- folio_set_young(folio);
-
- folio_set_idle(folio);
- folio_put(folio);
-}
-#endif /* CONFIG_HUGETLB_PAGE */
-
#define DAMON_MAX_SUBSCORE (100)
#define DAMON_MAX_AGE_IN_LOG (32)
@@ -222,15 +168,10 @@ static bool damon_folio_mkold_one(struct folio *folio,
while (page_vma_mapped_walk(&pvmw)) {
addr = pvmw.address;
- if (pvmw.pte) {
- if (folio_test_hugetlb(folio))
- damon_hugetlb_mkold(pvmw.pte, vma->vm_mm, vma,
- addr);
- else
- damon_ptep_mkold(pvmw.pte, vma, addr);
- } else {
+ if (pvmw.pte)
+ damon_ptep_mkold(pvmw.pte, vma, addr);
+ else
damon_pmdp_mkold(pvmw.pmd, vma, addr);
- }
}
return true;
}
@@ -255,55 +196,27 @@ void damon_folio_mkold(struct folio *folio)
}
-#ifdef CONFIG_HUGETLB_PAGE
-static bool damon_hugetlb_young(pte_t *pte, struct vm_area_struct *vma,
- unsigned long addr, struct folio *folio)
-{
- pte_t entry = huge_ptep_get(vma->vm_mm, addr, pte);
-
- return (pte_present(entry) && pte_young(entry)) ||
- !folio_test_idle(folio) ||
- mmu_notifier_test_young(vma->vm_mm, addr);
-}
-#else
-static bool damon_hugetlb_young(pte_t *pte, struct vm_area_struct *vma,
- unsigned long addr, struct folio *folio)
-{
- return false;
-}
-#endif /* CONFIG_HUGETLB_PAGE */
-
-static bool damon_pte_young(pte_t *pte, struct vm_area_struct *vma,
- unsigned long addr, struct folio *folio)
-{
- pte_t entry = ptep_get(pte);
-
- /*
- * PFN swap PTEs, such as device-exclusive ones, that actually map
- * pages are "old" from a CPU perspective. The MMU notifier takes care
- * of any device aspects.
- */
- return (pte_present(entry) && pte_young(entry)) ||
- !folio_test_idle(folio) ||
- mmu_notifier_test_young(vma->vm_mm, addr);
-}
-
static bool damon_folio_young_one(struct folio *folio,
struct vm_area_struct *vma, unsigned long addr, void *arg)
{
bool *accessed = arg;
DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0);
+ pte_t pte;
*accessed = false;
while (page_vma_mapped_walk(&pvmw)) {
addr = pvmw.address;
if (pvmw.pte) {
- if (folio_test_hugetlb(folio))
- *accessed = damon_hugetlb_young(pvmw.pte, vma,
- addr, folio);
- else
- *accessed = damon_pte_young(pvmw.pte, vma,
- addr, folio);
+ pte = ptep_get(pvmw.pte);
+
+ /*
+ * PFN swap PTEs, such as device-exclusive ones, that
+ * actually map pages are "old" from a CPU perspective.
+ * The MMU notifier takes care of any device aspects.
+ */
+ *accessed = (pte_present(pte) && pte_young(pte)) ||
+ !folio_test_idle(folio) ||
+ mmu_notifier_test_young(vma->vm_mm, addr);
} else {
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
pmd_t pmd = pmdp_get(pvmw.pmd);
@@ -422,19 +335,6 @@ static unsigned int __damon_migrate_folio_list(
return nr_succeeded;
}
-static void damon_putback_folio_list(struct list_head *folio_list)
-{
- struct folio *folio;
-
- while (!list_empty(folio_list)) {
- folio = lru_to_folio(folio_list);
- list_del(&folio->lru);
- node_stat_sub_folio(folio, NR_ISOLATED_ANON +
- folio_is_file_lru(folio));
- folio_putback_lru(folio);
- }
-}
-
static unsigned int damon_migrate_folio_list(struct list_head *folio_list,
struct pglist_data *pgdat,
int target_nid)
@@ -476,7 +376,13 @@ keep:
list_splice(&ret_folios, folio_list);
- damon_putback_folio_list(folio_list);
+ while (!list_empty(folio_list)) {
+ folio = lru_to_folio(folio_list);
+ list_del(&folio->lru);
+ node_stat_sub_folio(folio, NR_ISOLATED_ANON +
+ folio_is_file_lru(folio));
+ folio_putback_lru(folio);
+ }
return nr_migrated;
}
@@ -493,7 +399,14 @@ unsigned long damon_migrate_pages(struct list_head *folio_list, int target_nid)
if (target_nid < 0 || target_nid >= MAX_NUMNODES ||
!node_state(target_nid, N_MEMORY)) {
- damon_putback_folio_list(folio_list);
+ while (!list_empty(folio_list)) {
+ struct folio *folio = lru_to_folio(folio_list);
+
+ list_del(&folio->lru);
+ node_stat_sub_folio(folio, NR_ISOLATED_ANON +
+ folio_is_file_lru(folio));
+ folio_putback_lru(folio);
+ }
return nr_migrated;
}
@@ -531,35 +444,3 @@ bool damos_ops_has_filter(struct damos *s)
return true;
return false;
}
-
-bool damon_ops_filter_match(struct damon_filter *filter, struct folio *folio)
-{
- bool matched = false;
- struct mem_cgroup *memcg;
-
- switch (filter->type) {
- case DAMON_FILTER_TYPE_ANON:
- if (!folio) {
- matched = false;
- break;
- }
- matched = folio_test_anon(folio);
- break;
- case DAMON_FILTER_TYPE_MEMCG:
- if (!folio) {
- matched = false;
- break;
- }
- rcu_read_lock();
- memcg = folio_memcg_check(folio);
- if (!memcg)
- matched = false;
- else
- matched = filter->memcg_id == mem_cgroup_id(memcg);
- rcu_read_unlock();
- break;
- default:
- break;
- }
- return matched == filter->matching;
-}
diff --git a/mm/damon/ops-common.h b/mm/damon/ops-common.h
index ee2705825100..38d295488fa1 100644
--- a/mm/damon/ops-common.h
+++ b/mm/damon/ops-common.h
@@ -6,19 +6,9 @@
#include <linux/damon.h>
struct folio *damon_get_folio(unsigned long pfn);
-struct folio *damon_get_monitor_folio(unsigned long pfn);
void damon_ptep_mkold(pte_t *pte, struct vm_area_struct *vma, unsigned long addr);
void damon_pmdp_mkold(pmd_t *pmd, struct vm_area_struct *vma, unsigned long addr);
-#ifdef CONFIG_HUGETLB_PAGE
-void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr);
-#else
-static inline void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr)
-{
-}
-#endif /* CONFIG_HUGETLB_PAGE */
void damon_folio_mkold(struct folio *folio);
bool damon_folio_young(struct folio *folio);
@@ -31,5 +21,3 @@ bool damos_folio_filter_match(struct damos_filter *filter, struct folio *folio);
unsigned long damon_migrate_pages(struct list_head *folio_list, int target_nid);
bool damos_ops_has_filter(struct damos *s);
-
-bool damon_ops_filter_match(struct damon_filter *filter, struct folio *folio);
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 5abfabaa339e..5c6c3a597fd0 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -37,7 +37,7 @@ static unsigned long damon_pa_core_addr(
static void damon_pa_mkold(phys_addr_t paddr)
{
- struct folio *folio = damon_get_monitor_folio(PHYS_PFN(paddr));
+ struct folio *folio = damon_get_folio(PHYS_PFN(paddr));
if (!folio)
return;
@@ -67,7 +67,7 @@ static void damon_pa_prepare_access_checks(struct damon_ctx *ctx)
static bool damon_pa_young(phys_addr_t paddr)
{
- struct folio *folio = damon_get_monitor_folio(PHYS_PFN(paddr));
+ struct folio *folio = damon_get_folio(PHYS_PFN(paddr));
bool accessed;
if (!folio)
@@ -105,60 +105,35 @@ static unsigned int damon_pa_check_accesses(struct damon_ctx *ctx)
return max_nr_accesses;
}
-static void damon_pa_prep_probes_region(struct damon_region *r,
- struct damon_probe *probe, struct damon_ctx *ctx)
-{
- struct damon_prep *p;
-
- damon_for_each_prep(p, probe) {
- switch (p->action) {
- case DAMON_PREP_SET_PGIDLE:
- damon_pa_mkold(damon_pa_phys_addr(r->sampling_addr,
- ctx->addr_unit));
- break;
- default:
- break;
- }
- }
-}
-
-static void damon_pa_prep_probes(struct damon_ctx *ctx, bool set_samples)
-{
- struct damon_target *t;
- struct damon_region *r;
- struct damon_probe *p;
-
- damon_for_each_target(t, ctx) {
- damon_for_each_region(r, t) {
- if (set_samples)
- r->sampling_addr = damon_rand(ctx, r->ar.start,
- r->ar.end);
- damon_for_each_probe(p, ctx)
- damon_pa_prep_probes_region(r, p, ctx);
- }
- }
-}
-
static bool damon_pa_filter_match(struct damon_filter *filter,
struct folio *folio)
{
bool matched = false;
+ struct mem_cgroup *memcg;
switch (filter->type) {
- case DAMON_FILTER_TYPE_PGIDLE_UNSET:
- if (!folio)
+ case DAMON_FILTER_TYPE_ANON:
+ if (!folio) {
matched = false;
- else
- matched = damon_folio_young(folio);
+ break;
+ }
+ matched = folio_test_anon(folio);
break;
- case DAMON_FILTER_TYPE_PGIDLE_SET:
- if (!folio)
+ case DAMON_FILTER_TYPE_MEMCG:
+ if (!folio) {
+ matched = false;
+ break;
+ }
+ rcu_read_lock();
+ memcg = folio_memcg_check(folio);
+ if (!memcg)
matched = false;
else
- matched = damon_folio_young(folio) == false;
+ matched = filter->memcg_id == mem_cgroup_id(memcg);
+ rcu_read_unlock();
break;
default:
- return damon_ops_filter_match(filter, folio);
+ break;
}
return matched == filter->matching;
}
@@ -208,7 +183,7 @@ static unsigned int damon_pa_apply_probes(struct damon_ctx *ctx,
folio_put(folio);
if (return_max_wsum)
max_wsum = max(damon_probe_hits_wsum(r, false,
- false, ctx), max_wsum);
+ ctx), max_wsum);
}
}
return max_wsum;
@@ -289,7 +264,7 @@ static unsigned long damon_pa_pageout(struct damon_region *r,
else
list_add(&folio->lru, &folio_list);
put_folio:
- addr = PFN_PHYS(folio_pfn(folio)) + folio_size(folio);
+ addr += folio_size(folio);
folio_put(folio);
}
if (install_young_filter)
@@ -327,7 +302,7 @@ static inline unsigned long damon_pa_de_activate(
folio_deactivate(folio);
applied += folio_nr_pages(folio);
put_folio:
- addr = PFN_PHYS(folio_pfn(folio)) + folio_size(folio);
+ addr += folio_size(folio);
folio_put(folio);
}
s->last_applied = folio;
@@ -375,7 +350,7 @@ static unsigned long damon_pa_migrate(struct damon_region *r,
folio_is_file_lru(folio));
list_add(&folio->lru, &folio_list);
put_folio:
- addr = PFN_PHYS(folio_pfn(folio)) + folio_size(folio);
+ addr += folio_size(folio);
folio_put(folio);
}
applied = damon_migrate_pages(&folio_list, s->target_nid);
@@ -404,7 +379,7 @@ static unsigned long damon_pa_stat(struct damon_region *r,
if (!damos_pa_filter_out(s, folio))
*sz_filter_passed += folio_size(folio) / addr_unit;
- addr = PFN_PHYS(folio_pfn(folio)) + folio_size(folio);
+ addr += folio_size(folio);
folio_put(folio);
}
s->last_applied = folio;
@@ -467,7 +442,6 @@ static int __init damon_pa_initcall(void)
.update = NULL,
.prepare_access_checks = damon_pa_prepare_access_checks,
.check_accesses = damon_pa_check_accesses,
- .prep_probes = damon_pa_prep_probes,
.apply_probes = damon_pa_apply_probes,
.target_valid = NULL,
.apply_scheme = damon_pa_apply_scheme,
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index 42a2c9cb1343..45d5557cc575 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -271,6 +271,8 @@ static int damon_reclaim_commit_inputs_fn(void *arg)
return damon_reclaim_apply_parameters();
}
+static bool damon_reclaim_damon_has_started;
+
static int damon_reclaim_commit_inputs_store(const char *val,
const struct kernel_param *kp)
{
@@ -291,6 +293,10 @@ static int damon_reclaim_commit_inputs_store(const char *val,
if (!commit_inputs_request)
return 0;
+ /* Skip damon_call() if ctx has not successfully started. */
+ if (!damon_reclaim_damon_has_started)
+ return -EINVAL;
+
err = damon_call(ctx, &control);
return err ? err : control.return_code;
@@ -337,6 +343,8 @@ static int damon_reclaim_turn(bool on)
err = damon_start(&ctx, 1, true);
if (err)
return err;
+ if (!damon_reclaim_damon_has_started)
+ damon_reclaim_damon_has_started = true;
return damon_call(ctx, &call_control);
}
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index 3de4d804e049..32f495a96b17 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -534,8 +534,7 @@ struct damon_sysfs_scheme_filter {
bool allow;
char *memcg_path;
struct damon_addr_range addr_range;
- unsigned long range_min;
- unsigned long range_max;
+ struct damon_size_range sz_range;
int target_idx;
};
@@ -589,10 +588,6 @@ damos_sysfs_filter_type_names[] = {
.type = DAMOS_FILTER_TYPE_TARGET,
.name = "target",
},
- {
- .type = DAMOS_FILTER_TYPE_PROBE_HITS_WSUM,
- .name = "probe_hits_wsum",
- },
};
static ssize_t type_show(struct kobject *kobj,
@@ -783,7 +778,7 @@ static ssize_t min_show(struct kobject *kobj,
struct damon_sysfs_scheme_filter *filter = container_of(kobj,
struct damon_sysfs_scheme_filter, kobj);
- return sysfs_emit(buf, "%lu\n", filter->range_min);
+ return sysfs_emit(buf, "%lu\n", filter->sz_range.min);
}
static ssize_t min_store(struct kobject *kobj,
@@ -791,7 +786,7 @@ static ssize_t min_store(struct kobject *kobj,
{
struct damon_sysfs_scheme_filter *filter = container_of(kobj,
struct damon_sysfs_scheme_filter, kobj);
- int err = kstrtoul(buf, 0, &filter->range_min);
+ int err = kstrtoul(buf, 0, &filter->sz_range.min);
return err ? err : count;
}
@@ -802,7 +797,7 @@ static ssize_t max_show(struct kobject *kobj,
struct damon_sysfs_scheme_filter *filter = container_of(kobj,
struct damon_sysfs_scheme_filter, kobj);
- return sysfs_emit(buf, "%lu\n", filter->range_max);
+ return sysfs_emit(buf, "%lu\n", filter->sz_range.max);
}
static ssize_t max_store(struct kobject *kobj,
@@ -810,7 +805,7 @@ static ssize_t max_store(struct kobject *kobj,
{
struct damon_sysfs_scheme_filter *filter = container_of(kobj,
struct damon_sysfs_scheme_filter, kobj);
- int err = kstrtoul(buf, 0, &filter->range_max);
+ int err = kstrtoul(buf, 0, &filter->sz_range.max);
return err ? err : count;
}
@@ -1274,10 +1269,6 @@ struct damos_sysfs_qgoal_metric_name damos_sysfs_qgoal_metric_names[] = {
.metric = DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP,
.name = "node_eligible_mem_bp",
},
- {
- .metric = DAMOS_QUOTA_HUGEPAGE_MEM_BP,
- .name = "hugepage_mem_bp",
- },
};
static ssize_t target_metric_show(struct kobject *kobj,
@@ -2840,20 +2831,12 @@ static int damon_sysfs_add_scheme_filters(struct damos *scheme,
} else if (filter->type == DAMOS_FILTER_TYPE_TARGET) {
filter->target_idx = sysfs_filter->target_idx;
} else if (filter->type == DAMOS_FILTER_TYPE_HUGEPAGE_SIZE) {
- if (sysfs_filter->range_min >
- sysfs_filter->range_max) {
- damos_destroy_filter(filter);
- return -EINVAL;
- }
- filter->sz_range.min = sysfs_filter->range_min;
- filter->sz_range.max = sysfs_filter->range_max;
- } else if (filter->type == DAMOS_FILTER_TYPE_PROBE_HITS_WSUM) {
- filter->range_min = sysfs_filter->range_min;
- filter->range_max = sysfs_filter->range_max;
- if (filter->range_min > filter->range_max) {
+ if (sysfs_filter->sz_range.min >
+ sysfs_filter->sz_range.max) {
damos_destroy_filter(filter);
return -EINVAL;
}
+ filter->sz_range = sysfs_filter->sz_range;
}
damos_add_filter(scheme, filter);
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index 51fa506c879b..e3858ffab4b2 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -3,6 +3,7 @@
* DAMON sysfs Interface
*/
+#include <linux/pid.h>
#include <linux/sched.h>
#include <linux/slab.h>
@@ -750,222 +751,6 @@ static const struct kobj_type damon_sysfs_intervals_ktype = {
};
/*
- * prep directory
- */
-
-struct damon_sysfs_prep {
- struct kobject kobj;
- enum damon_prep_action action;
-};
-
-static struct damon_sysfs_prep *damon_sysfs_prep_alloc(void)
-{
- struct damon_sysfs_prep *prep;
-
- prep = kzalloc_obj(struct damon_sysfs_prep);
- if (!prep)
- return prep;
- prep->action = DAMON_PREP_SET_PGIDLE;
- return prep;
-}
-
-struct damon_sysfs_prep_action_name {
- const enum damon_prep_action action;
- const char *name;
-};
-
-static const struct damon_sysfs_prep_action_name
-damon_sysfs_prep_action_names[] = {
- {
- .action = DAMON_PREP_SET_PGIDLE,
- .name = "set_pgidle",
- },
-};
-
-static ssize_t prep_action_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
-{
- struct damon_sysfs_prep *prep = container_of(kobj,
- struct damon_sysfs_prep, kobj);
- int i;
-
- for (i = 0; i < ARRAY_SIZE(damon_sysfs_prep_action_names); i++) {
- const struct damon_sysfs_prep_action_name *action_name;
-
- action_name = &damon_sysfs_prep_action_names[i];
- if (action_name->action == prep->action)
- return sysfs_emit(buf, "%s\n", action_name->name);
- }
- return -EINVAL;
-}
-
-static ssize_t prep_action_store(struct kobject *kobj,
- struct kobj_attribute *attr, const char *buf, size_t count)
-{
- struct damon_sysfs_prep *prep = container_of(kobj,
- struct damon_sysfs_prep, kobj);
- ssize_t ret = -EINVAL;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(damon_sysfs_prep_action_names); i++) {
- const struct damon_sysfs_prep_action_name *action_name;
-
- action_name = &damon_sysfs_prep_action_names[i];
- if (sysfs_streq(buf, action_name->name)) {
- if (!mutex_trylock(&damon_sysfs_lock))
- return -EBUSY;
- prep->action = action_name->action;
- mutex_unlock(&damon_sysfs_lock);
- ret = count;
- break;
- }
- }
- return ret;
-}
-
-static void damon_sysfs_prep_release(struct kobject *kobj)
-{
- struct damon_sysfs_prep *prep = container_of(kobj,
- struct damon_sysfs_prep, kobj);
-
- kfree(prep);
-}
-
-static struct kobj_attribute damon_sysfs_prep_prep_action_attr =
- __ATTR_RW_MODE(prep_action, 0600);
-
-static struct attribute *damon_sysfs_prep_attrs[] = {
- &damon_sysfs_prep_prep_action_attr.attr,
- NULL,
-};
-ATTRIBUTE_GROUPS(damon_sysfs_prep);
-
-static const struct kobj_type damon_sysfs_prep_ktype = {
- .release = damon_sysfs_prep_release,
- .sysfs_ops = &kobj_sysfs_ops,
- .default_groups = damon_sysfs_prep_groups,
-};
-
-/*
- * preps directory
- */
-
-struct damon_sysfs_preps {
- struct kobject kobj;
- struct damon_sysfs_prep **preps_arr;
- int nr;
-};
-
-static struct damon_sysfs_preps *damon_sysfs_preps_alloc(void)
-{
- return kzalloc_obj(struct damon_sysfs_preps);
-}
-
-static void damon_sysfs_preps_rm_dirs(struct damon_sysfs_preps *preps)
-{
- struct damon_sysfs_prep **preps_arr = preps->preps_arr;
- int i;
-
- for (i = 0; i < preps->nr; i++) {
- kobject_del(&preps_arr[i]->kobj);
- kobject_put(&preps_arr[i]->kobj);
- }
- preps->nr = 0;
- kfree(preps_arr);
- preps->preps_arr = NULL;
-}
-
-static int damon_sysfs_preps_add_dirs(struct damon_sysfs_preps *preps,
- int nr_preps)
-{
- struct damon_sysfs_prep **preps_arr, *prep;
- int err, i;
-
- damon_sysfs_preps_rm_dirs(preps);
- if (!nr_preps)
- return 0;
-
- preps_arr = kmalloc_objs(*preps_arr, nr_preps,
- GFP_KERNEL | __GFP_NOWARN);
- if (!preps_arr)
- return -ENOMEM;
- preps->preps_arr = preps_arr;
-
- for (i = 0; i < nr_preps; i++) {
- prep = damon_sysfs_prep_alloc();
- if (!prep) {
- damon_sysfs_preps_rm_dirs(preps);
- return -ENOMEM;
- }
-
- err = kobject_init_and_add(&prep->kobj,
- &damon_sysfs_prep_ktype, &preps->kobj, "%d",
- i);
- if (err) {
- kobject_put(&prep->kobj);
- damon_sysfs_preps_rm_dirs(preps);
- return err;
- }
-
- preps_arr[i] = prep;
- preps->nr++;
- }
- return 0;
-}
-
-static ssize_t nr_preps_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
-{
- struct damon_sysfs_preps *preps = container_of(kobj,
- struct damon_sysfs_preps, kobj);
-
- return sysfs_emit(buf, "%d\n", preps->nr);
-}
-
-static ssize_t nr_preps_store(struct kobject *kobj,
- struct kobj_attribute *attr, const char *buf, size_t count)
-{
- struct damon_sysfs_preps *preps;
- int nr, err = kstrtoint(buf, 0, &nr);
-
- if (err)
- return err;
- if (nr < 0)
- return -EINVAL;
-
- preps = container_of(kobj, struct damon_sysfs_preps, kobj);
-
- if (!mutex_trylock(&damon_sysfs_lock))
- return -EBUSY;
- err = damon_sysfs_preps_add_dirs(preps, nr);
- mutex_unlock(&damon_sysfs_lock);
- if (err)
- return err;
-
- return count;
-}
-
-static void damon_sysfs_preps_release(struct kobject *kobj)
-{
- kfree(container_of(kobj, struct damon_sysfs_preps, kobj));
-}
-
-static struct kobj_attribute damon_sysfs_preps_nr_attr =
- __ATTR_RW_MODE(nr_preps, 0600);
-
-static struct attribute *damon_sysfs_preps_attrs[] = {
- &damon_sysfs_preps_nr_attr.attr,
- NULL,
-};
-ATTRIBUTE_GROUPS(damon_sysfs_preps);
-
-static const struct kobj_type damon_sysfs_preps_ktype = {
- .release = damon_sysfs_preps_release,
- .sysfs_ops = &kobj_sysfs_ops,
- .default_groups = damon_sysfs_preps_groups,
-};
-
-/*
* filter directory
*/
@@ -997,14 +782,6 @@ damon_sysfs_filter_type_names[] = {
.type = DAMON_FILTER_TYPE_MEMCG,
.name = "memcg",
},
- {
- .type = DAMON_FILTER_TYPE_PGIDLE_UNSET,
- .name = "pgidle_unset",
- },
- {
- .type = DAMON_FILTER_TYPE_PGIDLE_SET,
- .name = "pgidle_set",
- },
};
static ssize_t type_show(struct kobject *kobj,
@@ -1289,7 +1066,6 @@ static const struct kobj_type damon_sysfs_filters_ktype = {
struct damon_sysfs_probe {
struct kobject kobj;
unsigned int weight;
- struct damon_sysfs_preps *preps;
struct damon_sysfs_filters *filters;
};
@@ -1300,50 +1076,25 @@ static struct damon_sysfs_probe *damon_sysfs_probe_alloc(void)
static int damon_sysfs_probe_add_dirs(struct damon_sysfs_probe *probe)
{
- struct damon_sysfs_preps *preps;
struct damon_sysfs_filters *filters;
int err;
- preps = damon_sysfs_preps_alloc();
- if (!preps)
- return -ENOMEM;
- probe->preps = preps;
-
- err = kobject_init_and_add(&preps->kobj, &damon_sysfs_preps_ktype,
- &probe->kobj, "preps");
- if (err)
- goto put_preps_out;
-
filters = damon_sysfs_filters_alloc();
- if (!filters) {
- err = -ENOMEM;
- goto del_preps_out;
- }
+ if (!filters)
+ return -ENOMEM;
probe->filters = filters;
err = kobject_init_and_add(&filters->kobj, &damon_sysfs_filters_ktype,
&probe->kobj, "filters");
- if (err)
- goto put_filters_out;
- return err;
-
-put_filters_out:
- kobject_put(&filters->kobj);
- probe->filters = NULL;
-del_preps_out:
- kobject_del(&preps->kobj);
-put_preps_out:
- kobject_put(&preps->kobj);
- probe->preps = NULL;
+ if (err) {
+ kobject_put(&filters->kobj);
+ probe->filters = NULL;
+ }
return err;
}
static void damon_sysfs_probe_rm_dirs(struct damon_sysfs_probe *probe)
{
- if (probe->preps) {
- damon_sysfs_preps_rm_dirs(probe->preps);
- kobject_put(&probe->preps->kobj);
- }
if (probe->filters) {
damon_sysfs_filters_rm_dirs(probe->filters);
kobject_put(&probe->filters->kobj);
@@ -1483,7 +1234,7 @@ static ssize_t nr_probes_store(struct kobject *kobj,
if (err)
return err;
- if (nr < 0)
+ if (nr < 0 || nr > DAMON_MAX_PROBES)
return -EINVAL;
probes = container_of(kobj, struct damon_sysfs_probes, kobj);
@@ -2038,7 +1789,6 @@ struct damon_sysfs_kdamond {
struct damon_sysfs_contexts *contexts;
struct damon_ctx *damon_ctx;
unsigned int refresh_ms;
- unsigned long next_refresh_jiffies;
};
static struct damon_sysfs_kdamond *damon_sysfs_kdamond_alloc(void)
@@ -2183,23 +1933,6 @@ static int damon_sysfs_set_attrs(struct damon_ctx *ctx,
return damon_set_attrs(ctx, &attrs);
}
-static int damon_sysfs_set_preps(struct damon_probe *probe,
- struct damon_sysfs_preps *sys_preps)
-{
- int i;
-
- for (i = 0; i < sys_preps->nr; i++) {
- struct damon_sysfs_prep *sys_prep = sys_preps->preps_arr[i];
- struct damon_prep *prep;
-
- prep = damon_new_prep(sys_prep->action);
- if (!prep)
- return -ENOMEM;
- damon_add_prep(probe, prep);
- }
- return 0;
-}
-
static int damon_sysfs_set_filters(struct damon_probe *probe,
struct damon_sysfs_filters *sys_filters)
{
@@ -2235,15 +1968,7 @@ static int damon_sysfs_set_probe(struct damon_probe *probe,
struct damon_sysfs_probe *sys_probe)
{
struct damon_sysfs_filters *sys_filters;
- struct damon_sysfs_preps *sys_preps;
- int err;
- sys_preps = sys_probe->preps;
- if (sys_preps) {
- err = damon_sysfs_set_preps(probe, sys_preps);
- if (err)
- return err;
- }
sys_filters = sys_probe->filters;
if (!sys_filters)
return 0;
@@ -2310,8 +2035,9 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target,
return -ENOMEM;
damon_add_target(ctx, t);
if (damon_target_has_pid(ctx)) {
- /* caller will destroy targets */
- if (damon_set_target_pid(t, sys_target->pid))
+ t->pid = find_get_pid(sys_target->pid);
+ if (!t->pid)
+ /* caller will destroy targets */
return -EINVAL;
}
t->obsolete = sys_target->obsolete;
@@ -2489,15 +2215,17 @@ static struct damon_ctx *damon_sysfs_build_ctx(
return ctx;
}
+static unsigned long damon_sysfs_next_update_jiffies;
+
static int damon_sysfs_repeat_call_fn(void *data)
{
struct damon_sysfs_kdamond *sysfs_kdamond = data;
if (!sysfs_kdamond->refresh_ms)
return 0;
- if (time_before(jiffies, sysfs_kdamond->next_refresh_jiffies))
+ if (time_before(jiffies, damon_sysfs_next_update_jiffies))
return 0;
- sysfs_kdamond->next_refresh_jiffies = jiffies +
+ damon_sysfs_next_update_jiffies = jiffies +
msecs_to_jiffies(sysfs_kdamond->refresh_ms);
if (!mutex_trylock(&damon_sysfs_lock))
@@ -2545,8 +2273,8 @@ static int damon_sysfs_turn_damon_on(struct damon_sysfs_kdamond *kdamond)
}
kdamond->damon_ctx = ctx;
- kdamond->next_refresh_jiffies = jiffies +
- msecs_to_jiffies(kdamond->refresh_ms);
+ damon_sysfs_next_update_jiffies =
+ jiffies + msecs_to_jiffies(kdamond->refresh_ms);
repeat_call_control->fn = damon_sysfs_repeat_call_fn;
repeat_call_control->data = kdamond;
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index c01e6a75cadc..4a536d41cdb2 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -152,8 +152,6 @@ static void damon_test_split_at(struct kunit *test)
}
r->nr_accesses = 42;
r->last_nr_accesses = 15;
- r->probe_hits[0] = 7;
- r->last_probe_hits[0] = 3;
r->age = 10;
damon_add_region(r, t);
damon_split_region_at(t, r, 25);
@@ -170,8 +168,6 @@ static void damon_test_split_at(struct kunit *test)
KUNIT_EXPECT_EQ(test, r->nr_accesses, r_new->nr_accesses);
KUNIT_EXPECT_EQ(test, r->last_nr_accesses, r_new->last_nr_accesses);
- KUNIT_EXPECT_EQ(test, r->probe_hits[0], r_new->probe_hits[0]);
- KUNIT_EXPECT_EQ(test, r->last_probe_hits[0], r_new->last_probe_hits[0]);
KUNIT_EXPECT_EQ(test, r->age, r_new->age);
out:
@@ -193,7 +189,6 @@ static void damon_test_merge_two(struct kunit *test)
kunit_skip(test, "region alloc fail");
}
r->nr_accesses = 10;
- r->probe_hits[0] = 6;
r->age = 9;
damon_add_region(r, t);
r2 = damon_new_region(100, 300);
@@ -202,7 +197,6 @@ static void damon_test_merge_two(struct kunit *test)
kunit_skip(test, "second region alloc fail");
}
r2->nr_accesses = 20;
- r2->probe_hits[0] = 14;
r2->age = 21;
damon_add_region(r2, t);
@@ -210,7 +204,6 @@ static void damon_test_merge_two(struct kunit *test)
KUNIT_EXPECT_EQ(test, r->ar.start, 0ul);
KUNIT_EXPECT_EQ(test, r->ar.end, 300ul);
KUNIT_EXPECT_EQ(test, r->nr_accesses, 16u);
- KUNIT_EXPECT_EQ(test, r->probe_hits[0], 11);
KUNIT_EXPECT_EQ(test, r->age, 17u);
i = 0;
@@ -441,17 +434,17 @@ static void damon_test_ops_registration(struct kunit *test)
KUNIT_EXPECT_EQ(test, damon_select_ops(c, NR_DAMON_OPS), -EINVAL);
/* Registration should success after unregistration */
- scoped_guard(mutex, &damon_ops_lock) {
- bak = damon_registered_ops[DAMON_OPS_VADDR];
- damon_registered_ops[DAMON_OPS_VADDR] =
- (struct damon_operations){};
- }
+ mutex_lock(&damon_ops_lock);
+ bak = damon_registered_ops[DAMON_OPS_VADDR];
+ damon_registered_ops[DAMON_OPS_VADDR] = (struct damon_operations){};
+ mutex_unlock(&damon_ops_lock);
ops.id = DAMON_OPS_VADDR;
KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), 0);
- scoped_guard(mutex, &damon_ops_lock)
- damon_registered_ops[DAMON_OPS_VADDR] = bak;
+ mutex_lock(&damon_ops_lock);
+ damon_registered_ops[DAMON_OPS_VADDR] = bak;
+ mutex_unlock(&damon_ops_lock);
/* Check double-registration failure again */
KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL);
@@ -459,9 +452,10 @@ static void damon_test_ops_registration(struct kunit *test)
damon_destroy_ctx(c);
if (need_cleanup) {
- scoped_guard(mutex, &damon_ops_lock)
- damon_registered_ops[DAMON_OPS_VADDR] =
- (struct damon_operations){};
+ mutex_lock(&damon_ops_lock);
+ damon_registered_ops[DAMON_OPS_VADDR] =
+ (struct damon_operations){};
+ mutex_unlock(&damon_ops_lock);
}
}
@@ -469,12 +463,11 @@ static void damon_test_set_regions_for(struct kunit *test,
struct damon_addr_range *old_ranges, int sz_old_ranges,
struct damon_addr_range *new_ranges, int sz_new_ranges,
unsigned long min_region_sz,
- struct damon_addr_range *expect_ranges, int sz_expect_ranges,
- int expect_err)
+ struct damon_addr_range *expect_ranges, int sz_expect_ranges)
{
struct damon_target *t;
struct damon_region *r;
- int i, err;
+ int i;
t = damon_new_target();
if (!t)
@@ -488,8 +481,7 @@ static void damon_test_set_regions_for(struct kunit *test,
damon_add_region(r, t);
}
- err = damon_set_regions(t, new_ranges, sz_new_ranges, min_region_sz);
- KUNIT_EXPECT_EQ(test, err, expect_err);
+ damon_set_regions(t, new_ranges, sz_new_ranges, min_region_sz);
KUNIT_EXPECT_EQ(test, damon_nr_regions(t), sz_expect_ranges);
if (damon_nr_regions(t) != sz_expect_ranges) {
@@ -518,7 +510,7 @@ static void damon_test_set_regions(struct kunit *test)
(struct damon_addr_range[]){
{.start = 5, .end = 15},
{.start = 15, .end = 25},
- }, 2, 0);
+ }, 2);
/* Un-intersecting regions should be removed. */
damon_test_set_regions_for(test,
(struct damon_addr_range[]){
@@ -531,7 +523,7 @@ static void damon_test_set_regions(struct kunit *test)
1,
(struct damon_addr_range[]){
{.start = 18, .end = 23},
- }, 1, 0);
+ }, 1);
/*
* Holes should be filled up with new regions.
*
@@ -552,7 +544,7 @@ static void damon_test_set_regions(struct kunit *test)
{.start = 8, .end = 16},
{.start = 16, .end = 24},
{.start = 24, .end = 28},
- }, 3, 0);
+ }, 3);
/*
* New regions should be able to be appended.
*
@@ -574,7 +566,7 @@ static void damon_test_set_regions(struct kunit *test)
{.start = 0, .end = 4},
{.start = 4, .end = 15},
{.start = 25, .end = 40},
- }, 3, 0);
+ }, 3);
/*
* New regions should be able to be inserted.
*
@@ -597,53 +589,7 @@ static void damon_test_set_regions(struct kunit *test)
{.start = 0, .end = 15},
{.start = 25, .end = 40},
{.start = 44, .end = 50},
- }, 3, 0);
- /* Zero size regions should return -EINVAL. */
- damon_test_set_regions_for(test,
- (struct damon_addr_range[]){}, 0,
- (struct damon_addr_range[]){
- {.start = 42, .end = 42},
- }, 1, 1,
- (struct damon_addr_range[]){}, 0, -EINVAL);
- /* Negative size regions should return -EINVAL. */
- damon_test_set_regions_for(test,
- (struct damon_addr_range[]){}, 0,
- (struct damon_addr_range[]){
- {.start = 42, .end = 21},
- }, 1, 1,
- (struct damon_addr_range[]){}, 0, -EINVAL);
- /*
- * Regions resulting in same region after alignment should return
- * -EINVAL.
- */
- damon_test_set_regions_for(test,
- (struct damon_addr_range[]){}, 0,
- (struct damon_addr_range[]){
- {.start = 10, .end = 20},
- {.start = 20, .end = 30},
- }, 2, 4096,
- (struct damon_addr_range[]){}, 0, -EINVAL);
-}
-
-static void damon_test_nr_samples_per_aggr(struct kunit *test)
-{
- struct damon_attrs attrs = {
- .sample_interval = 0,
- .aggr_interval = 0,
- };
-
- /* Zero aggregation interval doesn't cause division by zero */
- KUNIT_EXPECT_EQ(test, damon_nr_samples_per_aggr(&attrs), 1);
-
- /*
- * Too large aggregation interval on 64 bit system doesn't cause
- * overflow
- */
- if (ULONG_MAX > UINT_MAX) {
- attrs.aggr_interval = (unsigned long)UINT_MAX + 1;
- KUNIT_EXPECT_EQ(test, damon_nr_samples_per_aggr(&attrs),
- UINT_MAX);
- }
+ }, 3);
}
static void damon_test_update_monitoring_result(struct kunit *test)
@@ -805,16 +751,19 @@ static void damos_test_commit_quota_goal_for(struct kunit *test,
struct damos_quota_goal *dst,
struct damos_quota_goal *src)
{
+ u64 dst_last_psi_total = 0;
+
+ if (dst->metric == DAMOS_QUOTA_SOME_MEM_PSI_US)
+ dst_last_psi_total = dst->last_psi_total;
damos_commit_quota_goal(dst, src);
KUNIT_EXPECT_EQ(test, dst->metric, src->metric);
KUNIT_EXPECT_EQ(test, dst->target_value, src->target_value);
if (src->metric == DAMOS_QUOTA_USER_INPUT)
KUNIT_EXPECT_EQ(test, dst->current_value, src->current_value);
+ if (dst_last_psi_total && src->metric == DAMOS_QUOTA_SOME_MEM_PSI_US)
+ KUNIT_EXPECT_EQ(test, dst->last_psi_total, dst_last_psi_total);
switch (dst->metric) {
- case DAMOS_QUOTA_SOME_MEM_PSI_US:
- KUNIT_EXPECT_EQ(test, dst->last_psi_total, U64_MAX);
- break;
case DAMOS_QUOTA_NODE_MEM_USED_BP:
case DAMOS_QUOTA_NODE_MEM_FREE_BP:
KUNIT_EXPECT_EQ(test, dst->nid, src->nid);
@@ -839,13 +788,6 @@ static void damos_test_commit_quota_goal(struct kunit *test)
};
damos_test_commit_quota_goal_for(test, &dst,
- &(struct damos_quota_goal) {
- .metric = DAMOS_QUOTA_SOME_MEM_PSI_US,
- .target_value = 234,
- .current_value = 345,
- .last_psi_total = 567,
- });
- damos_test_commit_quota_goal_for(test, &dst,
&(struct damos_quota_goal){
.metric = DAMOS_QUOTA_USER_INPUT,
.target_value = 789,
@@ -1364,128 +1306,6 @@ static void damon_test_commit_target_regions(struct kunit *test)
(unsigned long[][2]) {{3, 8}, {8, 10}}, 2);
}
-static void damon_test_commit_filter_for(struct kunit *test,
- struct damon_filter *dst, struct damon_filter *src)
-{
- damon_commit_filter(dst, src);
- KUNIT_EXPECT_EQ(test, dst->type, src->type);
- KUNIT_EXPECT_EQ(test, dst->matching, src->matching);
- KUNIT_EXPECT_EQ(test, dst->allow, src->allow);
- switch (src->type) {
- case DAMON_FILTER_TYPE_MEMCG:
- KUNIT_EXPECT_EQ(test, dst->memcg_id, src->memcg_id);
- break;
- default:
- break;
- }
-}
-
-static void damon_test_commit_filter(struct kunit *test)
-{
- struct damon_filter dst = {
- .type = DAMON_FILTER_TYPE_ANON,
- .matching = false,
- .allow = false,
- };
-
- damon_test_commit_filter_for(test, &dst,
- &(struct damon_filter){
- .type = DAMON_FILTER_TYPE_ANON,
- .matching = true,
- .allow = true,
- });
- damon_test_commit_filter_for(test, &dst,
- &(struct damon_filter){
- .type = DAMON_FILTER_TYPE_MEMCG,
- .matching = false,
- .allow = false,
- .memcg_id = 123,
- });
-}
-
-static struct damon_ctx *damon_test_help_setup_probes(unsigned int weights[],
- int nr_weights)
-{
- struct damon_ctx *ctx;
- struct damon_probe *probe;
- int i;
-
- ctx = damon_new_ctx();
- if (!ctx)
- return NULL;
- for (i = 0; i < nr_weights; i++) {
- probe = damon_new_probe();
- if (!probe) {
- damon_destroy_ctx(ctx);
- return NULL;
- }
- probe->weight = weights[i];
- damon_add_probe(ctx, probe);
- }
- return ctx;
-}
-
-static void damon_test_commit_probes_for(struct kunit *test,
- unsigned int dst_weights[], int nr_dst_probes,
- unsigned int src_weights[], int nr_src_probes)
-{
- struct damon_ctx *dst, *src;
- int err;
- struct damon_probe *dst_probe, *src_probe;
-
- dst = damon_test_help_setup_probes(dst_weights, nr_dst_probes);
- if (!dst)
- kunit_skip(test, "dst alloc fail");
- src = damon_test_help_setup_probes(src_weights, nr_src_probes);
- if (!src) {
- damon_destroy_ctx(dst);
- kunit_skip(test, "src alloc fail");
- }
-
- err = damon_commit_probes(dst, src);
- KUNIT_EXPECT_EQ(test, err, 0);
- if (err)
- goto out;
- nr_dst_probes = 0;
- damon_for_each_probe(dst_probe, dst)
- nr_dst_probes++;
- nr_src_probes = 0;
- damon_for_each_probe(src_probe, src)
- nr_src_probes++;
- KUNIT_EXPECT_EQ(test, nr_dst_probes, nr_src_probes);
- if (nr_dst_probes != nr_src_probes)
- goto out;
- nr_dst_probes = 0;
- damon_for_each_probe(dst_probe, dst) {
- src_probe = damon_nth_probe(nr_dst_probes, src);
- KUNIT_EXPECT_EQ(test, src_probe->weight, dst_probe->weight);
- nr_dst_probes++;
- }
-out:
- damon_destroy_ctx(dst);
- damon_destroy_ctx(src);
-}
-
-static void damon_test_commit_probes(struct kunit *test)
-{
- damon_test_commit_probes_for(test,
- (unsigned int[]){}, 0, (unsigned int[]){}, 0);
- damon_test_commit_probes_for(test,
- (unsigned int[]){}, 0, (unsigned int[]){1}, 1);
- damon_test_commit_probes_for(test,
- (unsigned int[]){}, 0, (unsigned int[]){1, 2}, 2);
- damon_test_commit_probes_for(test,
- (unsigned int[]){1}, 1, (unsigned int[]){2}, 1);
- damon_test_commit_probes_for(test,
- (unsigned int[]){1}, 1, (unsigned int[]){2, 3}, 2);
- damon_test_commit_probes_for(test,
- (unsigned int[]){2, 3}, 2, (unsigned int[]){1}, 1);
- damon_test_commit_probes_for(test,
- (unsigned int[]){2, 3}, 2, (unsigned int[]){}, 0);
- damon_test_commit_probes_for(test,
- (unsigned int[]){2}, 1, (unsigned int[]){}, 0);
-}
-
static void damon_test_commit_ctx(struct kunit *test)
{
struct damon_ctx *src, *dst;
@@ -1511,62 +1331,6 @@ static void damon_test_commit_ctx(struct kunit *test)
damon_destroy_ctx(dst);
}
-static void damon_test_valid_probe_params(struct kunit *test)
-{
- struct damon_ctx *ctx;
- struct damon_probe *probe, *probe2;
-
- ctx = damon_new_ctx();
- if (!ctx)
- kunit_skip(test, "ctx alloc fail");
- probe = damon_new_probe();
- if (!probe) {
- damon_destroy_ctx(ctx);
- kunit_skip(test, "probe alloc fail");
- }
- damon_add_probe(ctx, probe);
-
- /* Parameters are validated only if any probe weight is set. */
- ctx->attrs.sample_interval = 1;
- ctx->attrs.aggr_interval = 1000000;
- KUNIT_EXPECT_TRUE(test, damon_valid_probe_params(ctx));
-
- /* Up to U8_MAX samples per aggregation interval are allowed. */
- probe->weight = 100;
- ctx->attrs.aggr_interval = 255;
- KUNIT_EXPECT_TRUE(test, damon_valid_probe_params(ctx));
-
- /* More samples could overflow the probe_hits counters. */
- ctx->attrs.aggr_interval = 256;
- KUNIT_EXPECT_FALSE(test, damon_valid_probe_params(ctx));
-
- /* The largest weight whose weighted hit count fits in unsigned int. */
- ctx->attrs.aggr_interval = 255;
- probe->weight = UINT_MAX / 255;
- KUNIT_EXPECT_TRUE(test, damon_valid_probe_params(ctx));
-
- /* Any larger weight could overflow its weighted hit count. */
- probe->weight = UINT_MAX / 255 + 1;
- KUNIT_EXPECT_FALSE(test, damon_valid_probe_params(ctx));
-
- /* With one sample per aggregation, even the largest weight fits. */
- ctx->attrs.aggr_interval = 1;
- probe->weight = UINT_MAX;
- KUNIT_EXPECT_TRUE(test, damon_valid_probe_params(ctx));
-
- /* The sum of all probes' weighted hit counts could also overflow. */
- probe2 = damon_new_probe();
- if (!probe2) {
- damon_destroy_ctx(ctx);
- kunit_skip(test, "probe2 alloc fail");
- }
- probe2->weight = 1;
- damon_add_probe(ctx, probe2);
- KUNIT_EXPECT_FALSE(test, damon_valid_probe_params(ctx));
-
- damon_destroy_ctx(ctx);
-}
-
static void damos_test_filter_out(struct kunit *test)
{
struct damon_target *t;
@@ -1879,7 +1643,6 @@ static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damon_test_split_above_half_progresses),
KUNIT_CASE(damon_test_ops_registration),
KUNIT_CASE(damon_test_set_regions),
- KUNIT_CASE(damon_test_nr_samples_per_aggr),
KUNIT_CASE(damon_test_update_monitoring_result),
KUNIT_CASE(damon_test_set_attrs),
KUNIT_CASE(damon_test_mvsum),
@@ -1893,10 +1656,7 @@ static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damos_test_commit_pageout),
KUNIT_CASE(damos_test_commit_migrate_hot),
KUNIT_CASE(damon_test_commit_target_regions),
- KUNIT_CASE(damon_test_commit_filter),
- KUNIT_CASE(damon_test_commit_probes),
KUNIT_CASE(damon_test_commit_ctx),
- KUNIT_CASE(damon_test_valid_probe_params),
KUNIT_CASE(damos_test_filter_out),
KUNIT_CASE(damon_test_feed_loop_next_input),
KUNIT_CASE(damon_test_set_filters_default_reject),
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index d5dde97b3cd0..04ee2a2c6a4d 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -189,12 +189,22 @@ static int damon_va_three_regions(struct damon_target *t,
* <BIG UNMAPPED REGION 2>
* <stack>
*/
-static void __damon_va_init_regions(struct damon_target *t)
+static void __damon_va_init_regions(struct damon_ctx *ctx,
+ struct damon_target *t)
{
+ struct damon_target *ti;
struct damon_addr_range regions[3];
+ int tidx = 0;
- if (damon_va_three_regions(t, regions))
+ if (damon_va_three_regions(t, regions)) {
+ damon_for_each_target(ti, ctx) {
+ if (ti == t)
+ break;
+ tidx++;
+ }
+ pr_debug("Failed to get three regions of %dth target\n", tidx);
return;
+ }
damon_set_regions(t, regions, 3, DAMON_MIN_REGION_SZ);
}
@@ -207,7 +217,7 @@ static void damon_va_init(struct damon_ctx *ctx)
damon_for_each_target(t, ctx) {
/* the user may set the target regions as they want */
if (!damon_nr_regions(t))
- __damon_va_init_regions(t);
+ __damon_va_init_regions(ctx, t);
}
}
@@ -283,6 +293,40 @@ out:
}
#ifdef CONFIG_HUGETLB_PAGE
+static bool damon_hugetlb_ptep_mkold(pte_t *pte, struct mm_struct *mm,
+ struct vm_area_struct *vma, unsigned long addr, pte_t *entry)
+{
+ unsigned long psize = huge_page_size(hstate_vma(vma));
+
+ if (!pte_young(*entry))
+ return false;
+ *entry = huge_ptep_get_and_clear(mm, addr, pte, psize);
+ *entry = pte_mkold(*entry);
+ set_huge_pte_at(mm, addr, pte, *entry, psize);
+ return true;
+}
+
+static void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
+ struct vm_area_struct *vma, unsigned long addr)
+{
+ bool referenced = false;
+ pte_t entry = huge_ptep_get(mm, addr, pte);
+ struct folio *folio = pfn_folio(pte_pfn(entry));
+
+ folio_get(folio);
+
+ referenced = damon_hugetlb_ptep_mkold(pte, mm, vma, addr, &entry);
+ if (mmu_notifier_clear_young(mm, addr,
+ addr + huge_page_size(hstate_vma(vma))))
+ referenced = true;
+
+ if (referenced)
+ folio_set_young(folio);
+
+ folio_set_idle(folio);
+ folio_put(folio);
+}
+
static int damon_mkold_hugetlb_entry(pte_t *pte, unsigned long hmask,
unsigned long addr, unsigned long end,
struct mm_walk *walk)
@@ -483,243 +527,6 @@ static unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
return max_nr_accesses;
}
-static void damon_va_prep_probe_region(struct damon_ctx *ctx,
- struct mm_struct *mm, struct damon_region *r,
- struct damon_probe *probe)
-{
- struct damon_prep *p;
-
- damon_for_each_prep(p, probe) {
- switch (p->action) {
- case DAMON_PREP_SET_PGIDLE:
- damon_va_mkold(mm, r->sampling_addr);
- break;
- default:
- break;
- }
- }
-}
-
-static void damon_va_prep_probes(struct damon_ctx *ctx, bool set_samples)
-{
- struct damon_target *t;
- struct mm_struct *mm;
- struct damon_region *r;
- struct damon_probe *p;
-
- damon_for_each_target(t, ctx) {
- mm = damon_get_mm(t);
- if (!mm)
- continue;
- damon_for_each_region(r, t) {
- if (set_samples)
- r->sampling_addr = damon_rand(ctx, r->ar.start,
- r->ar.end);
- damon_for_each_probe(p, ctx)
- damon_va_prep_probe_region(ctx, mm, r, p);
- }
- mmput(mm);
- }
-}
-
-static bool damon_va_young_addr(struct folio *folio, pte_t *pte, pmd_t *pmd,
- struct mm_struct *mm, unsigned long addr)
-{
- bool young = false;
-
- if (pte)
- young = pte_young(*pte);
- else if (pmd)
- young = pmd_young(*pmd);
- young = young || !folio_test_idle(folio) ||
- mmu_notifier_test_young(mm, addr);
- return young;
-}
-
-static bool damon_va_filter_match(struct damon_filter *filter,
- struct folio *folio, pte_t *pte, pmd_t *pmd,
- struct mm_struct *mm, unsigned long addr)
-{
- bool matched = false;
-
- switch (filter->type) {
- case DAMON_FILTER_TYPE_PGIDLE_UNSET:
- if (!folio)
- matched = false;
- else
- matched = damon_va_young_addr(folio, pte, pmd, mm,
- addr);
- break;
- case DAMON_FILTER_TYPE_PGIDLE_SET:
- if (!folio)
- matched = false;
- else
- matched = !damon_va_young_addr(folio, pte, pmd, mm,
- addr);
- break;
- default:
- return damon_ops_filter_match(filter, folio);
- }
- return matched == filter->matching;
-}
-
-static bool damon_va_filter_pass(struct folio *folio, struct damon_probe *p,
- pte_t *pte, pmd_t *pmd, struct mm_struct *mm,
- unsigned long addr)
-{
- struct damon_filter *f;
- bool pass = true;
-
- damon_for_each_filter(f, p) {
- if (damon_va_filter_match(f, folio, pte, pmd, mm, addr)) {
- pass = f->allow;
- break;
- }
- pass = !f->allow;
- }
- return pass;
-}
-
-struct damon_va_probe_walk_private {
- struct damon_ctx *ctx;
- struct damon_region *r;
-};
-
-static void damon_va_probe_folio(struct damon_ctx *ctx,
- struct damon_region *r, struct folio *folio,
- pte_t *pte, pmd_t *pmd, struct mm_struct *mm)
-{
- struct damon_probe *probe;
- int i = 0;
-
- damon_for_each_probe(probe, ctx) {
- if (damon_va_filter_pass(folio, probe, pte, pmd, mm,
- r->sampling_addr))
- r->probe_hits[i]++;
- i++;
- }
-}
-
-static int damon_va_probe_pmd_entry(pmd_t *pmd, unsigned long addr,
- unsigned long next, struct mm_walk *walk)
-{
- pte_t *pte;
- pte_t ptent;
- spinlock_t *ptl;
- struct folio *folio;
- struct damon_va_probe_walk_private *priv = walk->private;
-
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- ptl = pmd_trans_huge_lock(pmd, walk->vma);
- if (ptl) {
- pmd_t pmde = pmdp_get(pmd);
-
- if (!pmd_present(pmde))
- goto huge_out;
- folio = vm_normal_folio_pmd(walk->vma, addr, pmde);
- if (!folio)
- goto huge_out;
- damon_va_probe_folio(priv->ctx, priv->r, folio, NULL, &pmde,
- walk->vma->vm_mm);
-
-huge_out:
- spin_unlock(ptl);
- return 0;
- }
-#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
-
- pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
- if (!pte)
- return 0;
- ptent = ptep_get(pte);
- if (!pte_present(ptent))
- goto out;
- folio = vm_normal_folio(walk->vma, addr, ptent);
- if (!folio)
- goto out;
- damon_va_probe_folio(priv->ctx, priv->r, folio, &ptent, NULL,
- walk->vma->vm_mm);
-
-out:
- pte_unmap_unlock(pte, ptl);
- return 0;
-}
-
-#ifdef CONFIG_HUGETLB_PAGE
-static int damon_va_probe_hugetlb_entry(pte_t *pte, unsigned long hmask,
- unsigned long addr, unsigned long end, struct mm_walk *walk)
-{
- struct damon_va_probe_walk_private *priv = walk->private;
- struct hstate *h = hstate_vma(walk->vma);
- struct folio *folio;
- spinlock_t *ptl;
- pte_t entry;
-
- ptl = huge_pte_lock(h, walk->mm, pte);
- entry = huge_ptep_get(walk->mm, addr, pte);
- if (!pte_present(entry))
- goto out;
-
- folio = pfn_folio(pte_pfn(entry));
- folio_get(folio);
- damon_va_probe_folio(priv->ctx, priv->r, folio, &entry, NULL,
- walk->vma->vm_mm);
- folio_put(folio);
-
-out:
- spin_unlock(ptl);
- return 0;
-}
-#else
-#define damon_va_probe_hugetlb_entry NULL
-#endif /* CONFIG_HUGETLB_PAGE */
-
-static void __damon_va_apply_probes(struct damon_ctx *ctx,
- struct mm_struct *mm, struct damon_region *r)
-{
- struct damon_va_probe_walk_private arg = {
- .ctx = ctx,
- .r = r,
- };
- struct mm_walk_ops damon_probe_walk_ops = {
- .pmd_entry = damon_va_probe_pmd_entry,
- .hugetlb_entry = damon_va_probe_hugetlb_entry,
- };
- unsigned long addr = r->sampling_addr;
-
- if (!mm)
- return;
-
- damon_va_walk_page_range(mm, addr, addr + 1, &damon_probe_walk_ops,
- &arg);
-}
-
-static unsigned int damon_va_apply_probes(struct damon_ctx *ctx,
- bool set_samples, bool return_max_wsum)
-{
- struct damon_target *t;
- struct mm_struct *mm;
- struct damon_region *r;
- unsigned int max_wsum = 0;
-
- damon_for_each_target(t, ctx) {
- mm = damon_get_mm(t);
- damon_for_each_region(r, t) {
- if (set_samples)
- r->sampling_addr = damon_rand(ctx, r->ar.start,
- r->ar.end);
- __damon_va_apply_probes(ctx, mm, r);
- if (return_max_wsum)
- max_wsum = max(damon_probe_hits_wsum(r, false,
- false, ctx), max_wsum);
- }
- if (mm)
- mmput(mm);
- }
-
- return max_wsum;
-}
-
static bool damos_va_filter_young_match(struct damos_filter *filter,
struct folio *folio, struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep, pmd_t *pmdp)
@@ -869,8 +676,6 @@ huge_out:
return 0;
for (; addr < next; pte += nr, addr += nr * PAGE_SIZE) {
- unsigned long page_idx;
-
nr = 1;
ptent = ptep_get(pte);
@@ -883,8 +688,7 @@ huge_out:
continue;
damos_va_migrate_dests_add(folio, walk->vma, addr, dests,
migration_lists);
- page_idx = folio_page_idx(folio, pte_page(ptent));
- nr = folio_nr_pages(folio) - page_idx;
+ nr = folio_nr_pages(folio);
}
pte_unmap_unlock(start_pte, ptl);
return 0;
@@ -1034,8 +838,6 @@ huge_unlock:
return 0;
for (; addr < next; pte += nr, addr += nr * PAGE_SIZE) {
- unsigned long page_idx;
-
nr = 1;
ptent = ptep_get(pte);
@@ -1049,8 +851,7 @@ huge_unlock:
if (!damos_va_filter_out(s, folio, vma, addr, pte, NULL))
*sz_filter_passed += folio_size(folio);
- page_idx = folio_page_idx(folio, pte_page(ptent));
- nr = folio_nr_pages(folio) - page_idx;
+ nr = folio_nr_pages(folio);
s->last_applied = folio;
}
pte_unmap_unlock(start_pte, ptl);
@@ -1148,8 +949,6 @@ static int __init damon_va_initcall(void)
.update = damon_va_update,
.prepare_access_checks = damon_va_prepare_access_checks,
.check_accesses = damon_va_check_accesses,
- .prep_probes = damon_va_prep_probes,
- .apply_probes = damon_va_apply_probes,
.target_valid = damon_va_target_valid,
.cleanup_target = damon_va_cleanup_target,
.apply_scheme = damon_va_apply_scheme,
diff --git a/mm/debug.c b/mm/debug.c
index 655e6bcc0e8d..9a0297b3988d 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -157,13 +157,17 @@ void dump_vma(const struct vm_area_struct *vma)
pr_emerg("vma %px start %px end %px mm %px\n"
"prot %lx anon_vma %px vm_ops %px\n"
"pgoff %lx file %px private_data %px\n"
+#ifdef CONFIG_PER_VMA_LOCK
"refcnt %x\n"
+#endif
"flags: %#lx(%pGv)\n",
vma, (void *)vma->vm_start, (void *)vma->vm_end, vma->vm_mm,
(unsigned long)pgprot_val(vma->vm_page_prot),
vma->anon_vma, vma->vm_ops, vma_start_pgoff(vma),
vma->vm_file, vma->vm_private_data,
+#ifdef CONFIG_PER_VMA_LOCK
refcount_read(&vma->vm_refcnt),
+#endif
vma->vm_flags, &vma->vm_flags);
}
EXPORT_SYMBOL(dump_vma);
diff --git a/mm/execmem.c b/mm/execmem.c
index 349cadd87486..74a178a87e75 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -51,8 +51,7 @@ static void *execmem_vmalloc(struct execmem_range *range, size_t size,
}
if (!p) {
- if (!(vm_flags & VM_REQUIRE_HUGE_VMAP))
- pr_warn_ratelimited("unable to allocate memory\n");
+ pr_warn_ratelimited("unable to allocate memory\n");
return NULL;
}
@@ -114,6 +113,28 @@ static inline unsigned long mas_range_len(struct ma_state *mas)
return mas->last - mas->index + 1;
}
+static int execmem_set_direct_map_valid(struct vm_struct *vm, bool valid)
+{
+ unsigned int nr = (1 << get_vm_area_page_order(vm));
+ unsigned int updated = 0;
+ int err = 0;
+
+ for (int i = 0; i < vm->nr_pages; i += nr) {
+ err = set_direct_map_valid_noflush(vm->pages[i], nr, valid);
+ if (err)
+ goto err_restore;
+ updated += nr;
+ }
+
+ return 0;
+
+err_restore:
+ for (int i = 0; i < updated; i += nr)
+ set_direct_map_valid_noflush(vm->pages[i], nr, !valid);
+
+ return err;
+}
+
static int execmem_force_rw(void *ptr, size_t size)
{
unsigned int nr = PAGE_ALIGN(size) >> PAGE_SHIFT;
@@ -138,30 +159,24 @@ int execmem_restore_rox(void *ptr, size_t size)
static void execmem_cache_clean(struct work_struct *work)
{
struct maple_tree *free_areas = &execmem_cache.free_areas;
+ struct mutex *mutex = &execmem_cache.mutex;
MA_STATE(mas, free_areas, 0, ULONG_MAX);
void *area;
- guard(mutex)(&execmem_cache.mutex);
+ mutex_lock(mutex);
mas_for_each(&mas, area, ULONG_MAX) {
- struct vm_struct *vm = find_vm_area(area);
size_t size = mas_range_len(&mas);
- if (vm && get_vm_area_size(vm) == size) {
- VM_WARN_ON_ONCE(!IS_ALIGNED(mas.index, PMD_SIZE) ||
- !IS_ALIGNED(size, PMD_SIZE));
+ if (IS_ALIGNED(size, PMD_SIZE) &&
+ IS_ALIGNED(mas.index, PMD_SIZE)) {
+ struct vm_struct *vm = find_vm_area(area);
- /*
- * Preallocate to ensure mas_store does not fail
- * If there is no memory for the tree update, bail out,
- * next execmem_free() might be more lucky
- */
- if (mas_preallocate(&mas, NULL, GFP_KERNEL))
- break;
-
- mas_store_prealloc(&mas, NULL);
+ execmem_set_direct_map_valid(vm, true);
+ mas_store_gfp(&mas, NULL, GFP_KERNEL);
vfree(area);
}
}
+ mutex_unlock(mutex);
}
static DECLARE_WORK(execmem_cache_clean_work, execmem_cache_clean);
@@ -227,34 +242,30 @@ static void *execmem_cache_alloc_locked(struct execmem_range *range, size_t size
addr = mas_free.index;
last = mas_free.last;
- mas_set_range(&mas_free, addr, addr + size - 1);
- if (mas_preallocate(&mas_free, NULL, GFP_KERNEL))
- return NULL;
-
/* insert allocated size to busy_areas at range [addr, addr + size) */
mas_set_range(&mas_busy, addr, addr + size - 1);
err = mas_store_gfp(&mas_busy, (void *)addr, GFP_KERNEL);
if (err)
- goto err_destroy_mas_free;
+ return NULL;
- mas_store_prealloc(&mas_free, NULL);
+ mas_store_gfp(&mas_free, NULL, GFP_KERNEL);
if (area_size > size) {
+ void *ptr = (void *)(addr + size);
+
/*
* re-insert remaining free size to free_areas at range
* [addr + size, last]
- * the range matches an existing entry, so this cannot allocate
*/
- ptr = (void *)(addr + size);
mas_set_range(&mas_free, addr + size, last);
- mas_store_gfp(&mas_free, ptr, GFP_KERNEL);
+ err = mas_store_gfp(&mas_free, ptr, GFP_KERNEL);
+ if (err) {
+ mas_store_gfp(&mas_busy, NULL, GFP_KERNEL);
+ return NULL;
+ }
}
ptr = (void *)addr;
return ptr;
-
-err_destroy_mas_free:
- mas_destroy(&mas_free);
- return NULL;
}
static void *__execmem_cache_alloc(struct execmem_range *range, size_t size)
@@ -264,55 +275,58 @@ static void *__execmem_cache_alloc(struct execmem_range *range, size_t size)
return execmem_cache_alloc_locked(range, size);
}
-static void *execmem_vmalloc_rox(struct execmem_range *range, size_t size,
- unsigned long vm_flags)
+static void *execmem_cache_populate_alloc(struct execmem_range *range, size_t size)
{
- void *p __free(vfree) = execmem_vmalloc(range, size, PAGE_KERNEL, vm_flags);
- int err;
+ unsigned long vm_flags = VM_ALLOW_HUGE_VMAP;
+ struct mutex *mutex = &execmem_cache.mutex;
+ struct vm_struct *vm;
+ size_t alloc_size;
+ int err = -ENOMEM;
+ void *p;
- if (!p)
- return NULL;
+ alloc_size = round_up(size, PMD_SIZE);
+ p = execmem_vmalloc(range, alloc_size, PAGE_KERNEL, vm_flags);
+ if (!p) {
+ alloc_size = size;
+ p = execmem_vmalloc(range, alloc_size, PAGE_KERNEL, vm_flags);
+ }
- /* fill memory with instructions that will trap */
- execmem_fill_trapping_insns(p, size);
- set_vm_flush_reset_perms(p);
- err = set_memory_rox((unsigned long)p, size >> PAGE_SHIFT);
- if (err)
+ if (!p)
return NULL;
- return no_free_ptr(p);
-}
+ vm = find_vm_area(p);
+ if (!vm)
+ goto err_free_mem;
-static void *execmem_cache_populate_alloc(struct execmem_range *range, size_t size)
-{
- unsigned long vm_flags = VM_REQUIRE_HUGE_VMAP;
- size_t alloc_size = round_up(size, PMD_SIZE);
- void *p __free(vfree) = NULL;
- int err;
+ /* fill memory with instructions that will trap */
+ execmem_fill_trapping_insns(p, alloc_size);
- p = execmem_vmalloc_rox(range, alloc_size, vm_flags);
- if (!p)
- return NULL;
+ err = set_memory_rox((unsigned long)p, vm->nr_pages);
+ if (err)
+ goto err_free_mem;
/*
* New memory blocks must be allocated and added to the cache
* as an atomic operation, otherwise they may be consumed
* by a parallel call to the execmem_cache_alloc function.
*/
- guard(mutex)(&execmem_cache.mutex);
+ mutex_lock(mutex);
err = execmem_cache_add_locked(p, alloc_size, GFP_KERNEL);
if (err)
- return NULL;
+ goto err_reset_direct_map;
- /* the chunk belongs to the cache now */
- retain_and_null_ptr(p);
+ p = execmem_cache_alloc_locked(range, size);
- return execmem_cache_alloc_locked(range, size);
-}
+ mutex_unlock(mutex);
-static void *execmem_alloc_rox(struct execmem_range *range, size_t size)
-{
- return execmem_vmalloc_rox(range, size, 0);
+ return p;
+
+err_reset_direct_map:
+ mutex_unlock(mutex);
+ execmem_set_direct_map_valid(vm, true);
+err_free_mem:
+ vfree(p);
+ return NULL;
}
static void *execmem_cache_alloc(struct execmem_range *range, size_t size)
@@ -442,11 +456,6 @@ static void *execmem_cache_alloc(struct execmem_range *range, size_t size)
return NULL;
}
-static void *execmem_alloc_rox(struct execmem_range *range, size_t size)
-{
- return NULL;
-}
-
static bool execmem_cache_free(void *ptr)
{
return false;
@@ -456,20 +465,17 @@ static bool execmem_cache_free(void *ptr)
void *execmem_alloc(enum execmem_type type, size_t size)
{
struct execmem_range *range = &execmem_info->ranges[type];
- bool use_rox_cache = range->flags & EXECMEM_ROX_CACHE;
+ bool use_cache = range->flags & EXECMEM_ROX_CACHE;
unsigned long vm_flags = VM_FLUSH_RESET_PERMS;
pgprot_t pgprot = range->pgprot;
void *p = NULL;
size = PAGE_ALIGN(size);
- if (use_rox_cache) {
+ if (use_cache)
p = execmem_cache_alloc(range, size);
- if (!p)
- p = execmem_alloc_rox(range, size);
- } else {
+ else
p = execmem_vmalloc(range, size, pgprot, vm_flags);
- }
return kasan_reset_tag(p);
}
diff --git a/mm/folio.c b/mm/folio.c
index 47a437e0f7fd..50a6dbe55998 100644
--- a/mm/folio.c
+++ b/mm/folio.c
@@ -354,28 +354,26 @@ static void __lru_cache_activate_folio(struct folio *folio)
static void lru_gen_inc_refs(struct folio *folio)
{
- unsigned long new_flags, old_flags = READ_ONCE(*folio_flags(folio, 0));
- int refs;
+ unsigned long new_flags, old_flags = READ_ONCE(folio->flags.f);
if (folio_test_unevictable(folio))
return;
/* see the comment on LRU_REFS_FLAGS */
- if (!folio_lru_refs(folio)) {
- folio_set_lru_refs(folio, 1);
+ if (!folio_test_referenced(folio)) {
+ set_mask_bits(&folio->flags.f, LRU_REFS_MASK, BIT(PG_referenced));
return;
}
do {
- new_flags = old_flags;
- refs = lru_get_refs_flags(old_flags);
- if (refs == LRU_REFS_MAX) {
+ if ((old_flags & LRU_REFS_MASK) == LRU_REFS_MASK) {
if (!folio_test_workingset(folio))
folio_set_workingset(folio);
return;
}
- lru_set_refs_flags(&new_flags, refs + 1);
- } while (!try_cmpxchg(folio_flags(folio, 0), &old_flags, new_flags));
+
+ new_flags = old_flags + BIT(LRU_REFS_PGOFF);
+ } while (!try_cmpxchg(&folio->flags.f, &old_flags, new_flags));
}
static bool lru_gen_clear_refs(struct folio *folio)
@@ -387,8 +385,7 @@ static bool lru_gen_clear_refs(struct folio *folio)
if (gen < 0)
return true;
- folio_set_lru_refs(folio, 0);
- folio_clear_workingset(folio);
+ set_mask_bits(&folio->flags.f, LRU_REFS_FLAGS | BIT(PG_workingset), 0);
rcu_read_lock();
seq = READ_ONCE(folio_lruvec(folio)->lrugen.min_seq[type]);
diff --git a/mm/gup.c b/mm/gup.c
index c2dfcb4744bc..a4036c02e213 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2700,9 +2700,8 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
* Before activating this code, please be aware that the following assumptions
* are currently made:
*
- * *) tlb_remove_table() is used to free pages containing page tables, with
- * the free deferred until an RCU grace period has elapsed (see
- * mm/mmu_gather.c).
+ * *) Either MMU_GATHER_RCU_TABLE_FREE is enabled, and tlb_remove_table() is used to
+ * free pages containing page tables or TLB flushing requires IPI broadcast.
*
* *) ptes can be read atomically by the architecture.
*
diff --git a/mm/gup_test.c b/mm/gup_test.c
index 185ba3bb8ed1..ba74bf3f4104 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -116,7 +116,8 @@ static int __gup_test_ioctl(unsigned int cmd,
bool needs_mmap_lock =
cmd != GUP_FAST_BENCHMARK && cmd != PIN_FAST_BENCHMARK;
- if (gup->addr > ULONG_MAX || gup->size > ULONG_MAX)
+ if (gup->addr > ULONG_MAX || gup->size > ULONG_MAX || !gup->size ||
+ !gup->nr_pages_per_call || !PAGE_ALIGNED(gup->size))
return -EINVAL;
if (check_add_overflow((unsigned long)gup->addr,
(unsigned long)gup->size, &end))
@@ -139,11 +140,9 @@ static int __gup_test_ioctl(unsigned int cmd,
if (nr != gup->nr_pages_per_call)
break;
+ nr = min_t(unsigned long, nr, (end - addr) / PAGE_SIZE);
+
next = addr + nr * PAGE_SIZE;
- if (next > end) {
- next = end;
- nr = (next - addr) / PAGE_SIZE;
- }
switch (cmd) {
case GUP_FAST_BENCHMARK:
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 4cd917f77f3f..1e5d68acf62a 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1064,8 +1064,7 @@ int folio_memcg_alloc_deferred(struct folio *folio)
static int __init thp_shrinker_init(void)
{
deferred_split_shrinker = shrinker_alloc(SHRINKER_NUMA_AWARE |
- SHRINKER_MEMCG_AWARE |
- SHRINKER_NONSLAB,
+ SHRINKER_MEMCG_AWARE,
"thp-deferred_split");
if (!deferred_split_shrinker)
return -ENOMEM;
@@ -1147,7 +1146,6 @@ subsys_initcall(hugepage_init);
static int __init setup_transparent_hugepage(char *str)
{
int ret = 0;
-
if (!str)
goto out;
if (!strcmp(str, "always")) {
@@ -1554,7 +1552,6 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm,
struct folio *zero_folio)
{
pmd_t entry;
-
entry = folio_mk_pmd(zero_folio, vma->vm_page_prot);
entry = pmd_mkspecial(entry);
pgtable_trans_huge_deposit(mm, pmd, pgtable);
@@ -2426,10 +2423,6 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
}
folio = pmd_folio(orig_pmd);
-
- if (folio_is_zone_device(folio))
- goto out;
-
/*
* If other processes are mapping this folio, we couldn't discard
* the folio unless they all do MADV_FREE so let's skip the folio.
@@ -2479,7 +2472,7 @@ static inline void zap_deposited_table(struct mm_struct *mm, pmd_t *pmd)
pgtable_t pgtable;
pgtable = pgtable_trans_huge_withdraw(mm, pmd);
- pte_free_defer(mm, pgtable);
+ pte_free(mm, pgtable);
mm_dec_nr_ptes(mm);
}
@@ -2529,11 +2522,11 @@ static bool has_deposited_pgtable(struct vm_area_struct *vma, pmd_t pmdval,
return true;
/*
- * Huge zero PMDs have a deposited page table only for anonymous VMAs,
- * see set_huge_zero_folio().
+ * Huge zero always deposited except for DAX which handles itself, see
+ * set_huge_zero_folio().
*/
if (is_huge_zero_pmd(pmdval))
- return vma_is_anonymous(vma);
+ return !vma_is_dax(vma);
/*
* Otherwise, only anonymous folios are deposited, see
@@ -2664,7 +2657,6 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,
if (pmd_move_must_withdraw(new_ptl, old_ptl, vma)) {
pgtable_t pgtable;
-
pgtable = pgtable_trans_huge_withdraw(mm, old_pmd);
pgtable_trans_huge_deposit(mm, new_pmd, pgtable);
}
@@ -3763,10 +3755,6 @@ static void __split_folio_to_order(struct folio *folio, int old_order,
*/
VM_WARN_ON_ONCE_PAGE(new_folio->private, new_head);
- /*
- * Not all folio fields are valid during a split, so open-code
- * the swap entry rather than using folio_swap_entry().
- */
if (folio_test_swapcache(folio))
new_folio->swap.val = folio->swap.val + i;
@@ -3957,8 +3945,9 @@ int folio_check_splittable(struct folio *folio, unsigned int new_order,
* swapcache folio split. Only uniform split to order-0 can be used
* here.
*/
- if ((split_type == SPLIT_TYPE_NON_UNIFORM || new_order) && folio_test_swapcache(folio))
+ if ((split_type == SPLIT_TYPE_NON_UNIFORM || new_order) && folio_test_swapcache(folio)) {
return -EINVAL;
+ }
if (is_huge_zero_folio(folio))
return -EINVAL;
@@ -3977,25 +3966,6 @@ static unsigned int folio_cache_ref_count(const struct folio *folio)
return folio_nr_pages(folio);
}
-static void folio_reset_partially_mapped(struct folio *folio)
-{
- /* Folio must be frozen. */
- VM_WARN_ON_FOLIO(folio_ref_count(folio), folio);
-
- if (!folio_test_partially_mapped(folio))
- return;
-
- /*
- * Order-1 folios have no _deferred_list. The flag is only ever set
- * on folios that do, so the list can be checked after the flag.
- */
- VM_WARN_ON_FOLIO(!list_empty(&folio->_deferred_list), folio);
-
- folio_clear_partially_mapped(folio);
- mod_mthp_stat(folio_order(folio),
- MTHP_STAT_NR_ANON_PARTIALLY_MAPPED, -1);
-}
-
static int __folio_freeze_and_split_unmapped(struct folio *folio, unsigned int new_order,
struct page *split_at, struct xa_state *xas,
struct address_space *mapping, bool do_lru,
@@ -4004,24 +3974,43 @@ static int __folio_freeze_and_split_unmapped(struct folio *folio, unsigned int n
{
struct folio *end_folio = folio_next(folio);
struct folio *new_folio, *next;
+ int old_order = folio_order(folio);
+ struct list_lru_one *lru;
+ bool dequeue_deferred;
int ret = 0;
VM_WARN_ON_ONCE(!mapping && end);
-
+ /*
+ * If this folio can be on the deferred split queue, lock out
+ * the shrinker before freezing the ref. If the shrinker sees
+ * a 0-ref folio, it assumes it beat folio_put() to the list
+ * lock and must clean up the LRU state - the same dequeue we
+ * will do below as part of the split.
+ */
+ dequeue_deferred = folio_test_anon(folio) && old_order > 1;
+ if (dequeue_deferred) {
+ struct mem_cgroup *memcg;
+
+ rcu_read_lock();
+ memcg = folio_memcg(folio);
+ lru = list_lru_lock(&deferred_split_lru,
+ folio_nid(folio), &memcg);
+ }
if (folio_ref_freeze(folio, folio_cache_ref_count(folio) + 1)) {
struct swap_cluster_info *ci = NULL;
struct lruvec *lruvec;
- /* Take off the deferred split queue while frozen and memcg set */
- folio_unqueue_deferred_split(folio);
-
- /*
- * deferred_split_scan() takes the folio off the queue before it
- * splits it, so the unqueue above finds an empty list and
- * leaves PG_partially_mapped set.
- * Clear it here: the flag does not survive the split.
- */
- folio_reset_partially_mapped(folio);
+ if (dequeue_deferred) {
+ __list_lru_del(&deferred_split_lru, lru,
+ &folio->_deferred_list, folio_nid(folio));
+ if (folio_test_partially_mapped(folio)) {
+ folio_clear_partially_mapped(folio);
+ mod_mthp_stat(old_order,
+ MTHP_STAT_NR_ANON_PARTIALLY_MAPPED, -1);
+ }
+ list_lru_unlock(lru);
+ rcu_read_unlock();
+ }
if (mapping) {
int nr = folio_nr_pages(folio);
@@ -4122,6 +4111,10 @@ static int __folio_freeze_and_split_unmapped(struct folio *folio, unsigned int n
if (ci)
swap_cluster_unlock(ci);
} else {
+ if (dequeue_deferred) {
+ list_lru_unlock(lru);
+ rcu_read_unlock();
+ }
return -EAGAIN;
}
@@ -4535,7 +4528,11 @@ bool __folio_unqueue_deferred_split(struct folio *folio)
memcg = folio_memcg(folio);
lru = list_lru_lock_irqsave(&deferred_split_lru, nid, &memcg, &flags);
if (__list_lru_del(&deferred_split_lru, lru, &folio->_deferred_list, nid)) {
- folio_reset_partially_mapped(folio);
+ if (folio_test_partially_mapped(folio)) {
+ folio_clear_partially_mapped(folio);
+ mod_mthp_stat(folio_order(folio),
+ MTHP_STAT_NR_ANON_PARTIALLY_MAPPED, -1);
+ }
unqueued = true;
}
list_lru_unlock_irqrestore(lru, &flags);
@@ -4637,11 +4634,22 @@ static enum lru_status deferred_split_isolate(struct list_head *item,
struct folio *folio = container_of(item, struct folio, _deferred_list);
struct list_head *freeable = cb_arg;
- /* Lost race to folio_put() or the folio is under folio_ref_freeze() */
- if (!folio_try_get(folio))
- return LRU_SKIP;
+ if (folio_try_get(folio)) {
+ list_lru_isolate_move(lru, item, freeable);
+ return LRU_REMOVED;
+ }
- list_lru_isolate_move(lru, item, freeable);
+ /*
+ * We lost race with folio_put(). Read folio state before the
+ * isolate: folio_unqueue_deferred_split() checks list_empty()
+ * locklessly, so once removed the folio can be freed any time.
+ */
+ if (folio_test_partially_mapped(folio)) {
+ folio_clear_partially_mapped(folio);
+ mod_mthp_stat(folio_order(folio),
+ MTHP_STAT_NR_ANON_PARTIALLY_MAPPED, -1);
+ }
+ list_lru_isolate(lru, item);
return LRU_REMOVED;
}
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d3a0650ff690..49ffbcb54f8c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -38,7 +38,6 @@
#include <linux/mm_inline.h>
#include <linux/padata.h>
#include <linux/pgalloc.h>
-#include <linux/vmemmap-optimization.h>
#include <asm/page.h>
#include <asm/tlb.h>
@@ -55,20 +54,12 @@
#include "mm_init.h"
#include <linux/page-isolation.h>
-#define HUGE_BOOTMEM_ZONES_VALID BIT(0)
-
-struct huge_bootmem_page {
- struct list_head list;
- struct hstate *hstate;
- unsigned long flags;
-};
-
int hugetlb_max_hstate __read_mostly;
unsigned int default_hstate_idx;
struct hstate hstates[HUGE_MAX_HSTATE];
__initdata nodemask_t hugetlb_bootmem_nodes;
-static struct list_head huge_boot_pages[MAX_NUMNODES] __initdata;
+__initdata struct list_head huge_boot_pages[MAX_NUMNODES];
/*
* Due to ordering constraints across the init code for various
@@ -125,7 +116,6 @@ struct mutex *hugetlb_fault_mutex_table __ro_after_init;
/* Forward declaration */
static int hugetlb_acct_memory(struct hstate *h, long delta);
-static unsigned int allowed_mems_nr(struct hstate *h);
static void hugetlb_vma_lock_free(struct vm_area_struct *vma);
static void hugetlb_vma_lock_alloc(struct vm_area_struct *vma);
static void __hugetlb_vma_unlock_write_free(struct vm_area_struct *vma);
@@ -1397,11 +1387,8 @@ void remove_hugetlb_folio(struct hstate *h, struct folio *folio,
VM_BUG_ON_FOLIO(hugetlb_cgroup_from_folio_rsvd(folio), folio);
lockdep_assert_held(&hugetlb_lock);
- if (hstate_is_gigantic_no_runtime(h)) {
- /* Callers must filter gigantic_no_runtime upstream. */
- VM_WARN_ON_ONCE(1);
+ if (hstate_is_gigantic_no_runtime(h))
return;
- }
list_del(&folio->lru);
@@ -1462,11 +1449,8 @@ static void __update_and_free_hugetlb_folio(struct hstate *h,
{
bool clear_flag = folio_test_hugetlb_vmemmap_optimized(folio);
- if (hstate_is_gigantic_no_runtime(h)) {
- /* Callers must filter gigantic_no_runtime upstream. */
- VM_WARN_ON_ONCE(1);
+ if (hstate_is_gigantic_no_runtime(h))
return;
- }
/*
* If we don't know which subpages are hwpoisoned, we can't free
@@ -2203,10 +2187,8 @@ struct folio *alloc_hugetlb_folio_reserve(struct hstate *h, int preferred_nid,
folio = dequeue_hugetlb_folio_nodemask(h, gfp_mask, preferred_nid,
nmask);
- if (folio) {
- folio_set_hugetlb_restore_reserve(folio);
+ if (folio)
h->resv_huge_pages--;
- }
spin_unlock_irq(&hugetlb_lock);
return folio;
@@ -2254,19 +2236,6 @@ static nodemask_t *policy_mbind_nodemask(gfp_t gfp)
}
/*
- * Reservations are globally accounted, but they must also be backed by free
- * pages on nodes allowed by the current cpuset and MPOL_BIND policy.
- */
-static long surplus_pages_needed(struct hstate *h, long delta, long allocated)
-{
- long global_free = (long)h->free_huge_pages + allocated;
- long allowed_free = (long)allowed_mems_nr(h) + allocated;
-
- return max((long)h->resv_huge_pages + delta - global_free,
- delta - allowed_free);
-}
-
-/*
* Increase the hugetlb pool such that it can accommodate a reservation
* of size 'delta'.
*/
@@ -2288,7 +2257,7 @@ static int gather_surplus_pages(struct hstate *h, long delta)
alloc_nodemask = cpuset_current_mems_allowed;
lockdep_assert_held(&hugetlb_lock);
- needed = surplus_pages_needed(h, delta, 0);
+ needed = (h->resv_huge_pages + delta) - h->free_huge_pages;
if (needed <= 0) {
h->resv_huge_pages += delta;
return 0;
@@ -2319,10 +2288,11 @@ retry:
/*
* After retaking hugetlb_lock, we need to recalculate 'needed'
- * because either resv_huge_pages or the free page counts may have changed.
+ * because either resv_huge_pages or free_huge_pages may have changed.
*/
spin_lock_irq(&hugetlb_lock);
- needed = surplus_pages_needed(h, delta, allocated);
+ needed = (h->resv_huge_pages + delta) -
+ (h->free_huge_pages + allocated);
if (needed > 0) {
if (alloc_ok)
goto retry;
@@ -2857,7 +2827,6 @@ void wait_for_freed_hugetlb_folios(void)
* hugetlb_alloc_folio - Allocate a hugetlb folio.
* @h: Hugetlb state control block.
* @mpoli: Interpreted memory policy to use for allocation.
- * @mm: Memory descriptor of the allocation target.
* @alloc_flags: Flags controlling the allocation behavior.
*
* Allocates a hugetlb folio and handles cgroup charging and global hstate
@@ -2865,10 +2834,10 @@ void wait_for_freed_hugetlb_folios(void)
*
* Return: A pointer to the allocated folio, or an ERR_PTR on failure.
* -ENOSPC if cgroup charging fails or no folio is available.
+ * -ENOMEM if mem cgroup charging fails.
*/
struct folio *hugetlb_alloc_folio(struct hstate *h,
- struct mempolicy_interpreted *mpoli, struct mm_struct *mm,
- u8 alloc_flags)
+ struct mempolicy_interpreted *mpoli, u8 alloc_flags)
{
bool charge_hugetlb_cgroup_rsvd = alloc_flags &
HUGETLB_ALLOC_CHARG_CGROUP_RSVD;
@@ -2923,8 +2892,7 @@ struct folio *hugetlb_alloc_folio(struct hstate *h,
spin_unlock_irq(&hugetlb_lock);
- ret = mem_cgroup_charge_hugetlb(folio, mm,
- gfp | __GFP_RETRY_MAYFAIL);
+ ret = mem_cgroup_charge_hugetlb(folio, gfp | __GFP_RETRY_MAYFAIL);
/*
* Unconditionally increment NR_HUGETLB here because if
* mem_cgroup_charge_hugetlb failed, freeing the page will
@@ -2933,17 +2901,13 @@ struct folio *hugetlb_alloc_folio(struct hstate *h,
lruvec_stat_mod_folio(folio, NR_HUGETLB, nr_pages);
if (ret == -ENOMEM) {
- folio_put(folio);
+ free_huge_folio(folio);
/*
* Skip uncharging hugetlb_cgroup since the charges
* were committed to the folio and freeing the folio
* would have cleared those up.
*/
- /*
- * Return -ENOSPC, since retrying the fault is futile:
- * the OOM killer is not triggered for HugeTLB.
- */
- return ERR_PTR(-ENOSPC);
+ return ERR_PTR(ret);
}
return folio;
@@ -3067,7 +3031,7 @@ struct folio *alloc_hugetlb_folio(struct vm_area_struct *vma,
.nodemask = nodemask,
};
- folio = hugetlb_alloc_folio(h, &mpoli, vma->vm_mm, alloc_flags);
+ folio = hugetlb_alloc_folio(h, &mpoli, alloc_flags);
mpol_cond_put(mpol);
@@ -3177,7 +3141,7 @@ static bool __init alloc_bootmem_huge_page(struct hstate *h, int nid)
*/
INIT_LIST_HEAD(&m->list);
m->hstate = h;
- m->flags = 0;
+ m->flags = hugetlb_early_cma(h) ? HUGE_BOOTMEM_CMA : 0;
/* CMA pages: zone-crossing is validated in hugetlb_cma_reserve(). */
if (!hugetlb_early_cma(h) &&
@@ -3195,7 +3159,6 @@ static bool __init alloc_bootmem_huge_page(struct hstate *h, int nid)
} else {
list_add_tail(&m->list, &huge_boot_pages[nid]);
m->flags |= HUGE_BOOTMEM_ZONES_VALID;
- hugetlb_vmemmap_optimize_bootmem_page(pfn, huge_page_order(h));
/*
* Only initialize the head struct page in memmap_init_reserved_pages,
* rest of the struct pages will be initialized by the HugeTLB
@@ -3253,6 +3216,16 @@ static void __init hugetlb_folio_init_vmemmap(struct folio *folio,
prep_compound_head(&folio->page, huge_page_order(h));
}
+static bool __init hugetlb_bootmem_page_prehvo(struct huge_bootmem_page *m)
+{
+ return m->flags & HUGE_BOOTMEM_HVO;
+}
+
+static bool __init hugetlb_bootmem_page_earlycma(struct huge_bootmem_page *m)
+{
+ return m->flags & HUGE_BOOTMEM_CMA;
+}
+
/*
* memblock-allocated pageblocks might not have the migrate type set
* if marked with the 'noinit' flag. Set it to the default (MIGRATE_MOVABLE)
@@ -3322,7 +3295,6 @@ static void __init gather_bootmem_prealloc_node(unsigned long nid)
list_for_each_entry_safe(m, tm, &huge_boot_pages[nid], list) {
struct page *page = virt_to_page(m);
struct folio *folio = (void *)page;
- const unsigned long pfn = folio_pfn(folio);
h = m->hstate;
/*
@@ -3340,9 +3312,16 @@ static void __init gather_bootmem_prealloc_node(unsigned long nid)
HUGETLB_VMEMMAP_RESERVE_PAGES);
init_new_hugetlb_folio(folio);
- if (vmemmap_optimizable_order(pfn_to_section_compound_order(pfn)))
+ if (hugetlb_bootmem_page_prehvo(m))
+ /*
+ * If pre-HVO was done, just set the
+ * flag, the HVO code will then skip
+ * this folio.
+ */
folio_set_hugetlb_vmemmap_optimized(folio);
- section_set_compound_order_range(pfn, folio_nr_pages(folio), 0);
+
+ if (hugetlb_bootmem_page_earlycma(m))
+ folio_set_hugetlb_cma(folio);
list_add(&folio->lru, &folio_list);
@@ -3354,9 +3333,7 @@ static void __init gather_bootmem_prealloc_node(unsigned long nid)
* For CMA pages, this is done in init_cma_pageblock
* (via hugetlb_bootmem_init_migratetype), so skip it here.
*/
- if (hugetlb_early_cma(h))
- folio_set_hugetlb_cma(folio);
- else
+ if (!folio_test_hugetlb_cma(folio))
adjust_managed_page_count(page, pages_per_huge_page(h));
cond_resched();
}
@@ -3385,6 +3362,31 @@ void __init hugetlb_bootmem_struct_page_init(void)
.max_threads = num_node_state(N_MEMORY),
.numa_aware = true,
};
+#ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+ struct zone *zone;
+
+ for_each_zone(zone) {
+ for (int i = 0; i < NR_VMEMMAP_TAILS; i++) {
+ struct page *tail, *p;
+ unsigned int order;
+
+ tail = zone->vmemmap_tails[i];
+ if (!tail)
+ continue;
+
+ order = i + VMEMMAP_TAIL_MIN_ORDER;
+ p = page_to_virt(tail);
+ /*
+ * prep_and_add_bootmem_folios() can access pageblock
+ * flags on bootmem HugeTLB pages, so initialize the
+ * shared tail struct pages here before bootmem folios
+ * start using them.
+ */
+ for (int j = 0; j < PAGE_SIZE / sizeof(struct page); j++)
+ init_compound_tail(p + j, NULL, order, zone);
+ }
+ }
+#endif
padata_do_multithreaded(&job);
}
@@ -3434,7 +3436,7 @@ static void __init hugetlb_hstate_alloc_pages_onenode(struct hstate *h, int nid)
folio = only_alloc_fresh_hugetlb_folio(h, gfp_mask, nid,
&node_states[N_MEMORY], NULL);
if (!folio && !list_empty(&folio_list) &&
- hugetlb_vmemmap_optimizable(h)) {
+ hugetlb_vmemmap_optimizable_size(h)) {
prep_and_add_allocated_folios(h, &folio_list);
INIT_LIST_HEAD(&folio_list);
folio = only_alloc_fresh_hugetlb_folio(h, gfp_mask, nid,
@@ -3503,7 +3505,7 @@ static void __init hugetlb_pages_alloc_boot_node(unsigned long start, unsigned l
for (i = 0; i < num; ++i) {
struct folio *folio;
- if (hugetlb_vmemmap_optimizable(h) &&
+ if (hugetlb_vmemmap_optimizable_size(h) &&
(si_mem_available() == 0) && !list_empty(&folio_list)) {
prep_and_add_allocated_folios(h, &folio_list);
INIT_LIST_HEAD(&folio_list);
@@ -4030,7 +4032,6 @@ long demote_pool_huge_page(struct hstate *src, nodemask_t *nodes_allowed,
struct hstate *dst;
long rc = 0;
long nr_demoted = 0;
- long nr_persistent = 0;
lockdep_assert_held(&hugetlb_lock);
@@ -4043,60 +4044,22 @@ long demote_pool_huge_page(struct hstate *src, nodemask_t *nodes_allowed,
for_each_node_mask_to_free(src, nr_nodes, node, nodes_allowed) {
LIST_HEAD(list);
- LIST_HEAD(surplus_list);
struct folio *folio, *next;
- unsigned long nr_available, nr_target;
-
- /*
- * Re-check available each node batch: the previous
- * batch released hugetlb_lock for vmemmap restore/split,
- * and a new reservation could have been added in that
- * window, shrinking the budget. available is global
- * (resv is not per-node), so 0 means no node can
- * contribute -- stop the whole scan.
- */
- nr_available = available_huge_pages(src);
- if (!nr_available)
- break;
-
- /*
- * Cap this batch at the current budget; expressed as a
- * cumulative stop point because nr_demoted is running.
- */
- nr_target = nr_demoted + min_t(unsigned long,
- nr_to_demote - nr_demoted, nr_available);
list_for_each_entry_safe(folio, next, &src->hugepage_freelists[node], lru) {
- bool adjust_surplus;
-
if (folio_test_hwpoison(folio))
continue;
- /* Surplus accounting is maintained per node, not per folio. */
- adjust_surplus = src->surplus_huge_pages_node[node] > 0;
- remove_hugetlb_folio(src, folio, adjust_surplus);
- list_add(&folio->lru, adjust_surplus ? &surplus_list : &list);
- if (!adjust_surplus)
- nr_persistent++;
+ remove_hugetlb_folio(src, folio, false);
+ list_add(&folio->lru, &list);
- if (++nr_demoted == nr_target)
+ if (++nr_demoted == nr_to_demote)
break;
}
- if (list_empty(&list) && list_empty(&surplus_list))
- continue;
-
spin_unlock_irq(&hugetlb_lock);
- if (!list_empty(&list))
- rc = demote_free_hugetlb_folios(src, dst, &list);
- if (!list_empty(&surplus_list)) {
- long tmp_rc;
-
- tmp_rc = demote_free_hugetlb_folios(src, dst, &surplus_list);
- if (rc >= 0)
- rc = tmp_rc;
- }
+ rc = demote_free_hugetlb_folios(src, dst, &list);
spin_lock_irq(&hugetlb_lock);
@@ -4105,14 +4068,6 @@ long demote_pool_huge_page(struct hstate *src, nodemask_t *nodes_allowed,
add_hugetlb_folio(src, folio, false);
nr_demoted--;
- nr_persistent--;
- }
-
- list_for_each_entry_safe(folio, next, &surplus_list, lru) {
- list_del(&folio->lru);
- add_hugetlb_folio(src, folio, true);
-
- nr_demoted--;
}
if (rc < 0 || nr_demoted == nr_to_demote)
@@ -4123,7 +4078,7 @@ long demote_pool_huge_page(struct hstate *src, nodemask_t *nodes_allowed,
* Not absolutely necessary, but for consistency update max_huge_pages
* based on pool changes for the demoted page.
*/
- src->max_huge_pages -= nr_persistent;
+ src->max_huge_pages -= nr_demoted;
dst->max_huge_pages += nr_demoted << (huge_page_order(src) - huge_page_order(dst));
if (rc < 0)
@@ -5226,21 +5181,21 @@ int move_hugetlb_page_tables(struct vm_area_struct *vma,
hugetlb_vma_lock_write(vma);
i_mmap_lock_write(mapping);
for (; old_addr < old_end; old_addr += sz, new_addr += sz) {
- const unsigned long remaining_size =
+ const unsigned long offset_to_last_entry =
(old_addr | last_addr_mask) - old_addr;
src_pte = hugetlb_walk(vma, old_addr, sz);
if (!src_pte) {
- old_addr += remaining_size;
- new_addr += remaining_size;
+ old_addr += offset_to_last_entry;
+ new_addr += offset_to_last_entry;
continue;
}
if (huge_pte_none(huge_ptep_get(mm, old_addr, src_pte)))
continue;
if (huge_pmd_unshare(&tlb, vma, old_addr, src_pte)) {
- old_addr += remaining_size;
- new_addr += remaining_size;
+ old_addr += offset_to_last_entry;
+ new_addr += offset_to_last_entry;
continue;
}
@@ -6878,15 +6833,6 @@ long hugetlb_reserve_pages(struct inode *inode,
out_put_pages:
spool_resv = chg - gbl_reserve;
- /* Restore used_hpages for pages that failed global reservation */
- if (gbl_reserve && spool) {
- unsigned long flags;
-
- spin_lock_irqsave(&spool->lock, flags);
- if (spool->max_hpages != -1)
- spool->used_hpages -= gbl_reserve;
- unlock_or_release_subpool(spool, flags);
- }
if (spool_resv) {
/* put sub pool's reservation back, chg - gbl_reserve */
gbl_resv = hugepage_subpool_put_pages(spool, spool_resv);
@@ -6896,6 +6842,15 @@ out_put_pages:
*/
hugetlb_acct_memory(h, -gbl_resv);
}
+ /* Restore used_hpages for pages that failed global reservation */
+ if (gbl_reserve && spool) {
+ unsigned long flags;
+
+ spin_lock_irqsave(&spool->lock, flags);
+ if (spool->max_hpages != -1)
+ spool->used_hpages -= gbl_reserve;
+ unlock_or_release_subpool(spool, flags);
+ }
out_uncharge_cgroup:
hugetlb_cgroup_uncharge_cgroup_rsvd(hstate_index(h),
chg * pages_per_huge_page(h), h_cg);
diff --git a/mm/hugetlb_sysfs.c b/mm/hugetlb_sysfs.c
index 326a54b4d991..79ece91406bf 100644
--- a/mm/hugetlb_sysfs.c
+++ b/mm/hugetlb_sysfs.c
@@ -211,15 +211,15 @@ static ssize_t demote_store(struct kobject *kobj,
* Check for available pages to demote each time thorough the
* loop as demote_pool_huge_page will drop hugetlb_lock.
*/
- nr_available = h->free_huge_pages - h->resv_huge_pages;
if (nid != NUMA_NO_NODE)
- nr_available = min(nr_available,
- h->free_huge_pages_node[nid]);
+ nr_available = h->free_huge_pages_node[nid];
+ else
+ nr_available = h->free_huge_pages;
+ nr_available -= h->resv_huge_pages;
if (!nr_available)
break;
- rc = demote_pool_huge_page(h, n_mask,
- min(nr_demote, nr_available));
+ rc = demote_pool_huge_page(h, n_mask, nr_demote);
if (rc < 0) {
err = rc;
break;
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index a27f46fffb54..917db0984143 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -15,7 +15,6 @@
#include <linux/mmdebug.h>
#include <linux/pagewalk.h>
#include <linux/pgalloc.h>
-#include <linux/vmemmap-optimization.h>
#include <asm/tlbflush.h>
#include "hugetlb_vmemmap.h"
@@ -493,6 +492,32 @@ static bool vmemmap_should_optimize_folio(const struct hstate *h, struct folio *
return true;
}
+static struct page *vmemmap_get_tail(unsigned int order, struct zone *zone)
+{
+ const unsigned int idx = order - VMEMMAP_TAIL_MIN_ORDER;
+ struct page *tail, *p;
+ int node = zone_to_nid(zone);
+
+ tail = READ_ONCE(zone->vmemmap_tails[idx]);
+ if (likely(tail))
+ return tail;
+
+ tail = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
+ if (!tail)
+ return NULL;
+
+ p = page_to_virt(tail);
+ for (int i = 0; i < PAGE_SIZE / sizeof(struct page); i++)
+ init_compound_tail(p + i, NULL, order, zone);
+
+ if (cmpxchg(&zone->vmemmap_tails[idx], NULL, tail)) {
+ __free_page(tail);
+ tail = READ_ONCE(zone->vmemmap_tails[idx]);
+ }
+
+ return tail;
+}
+
static int __hugetlb_vmemmap_optimize_folio(const struct hstate *h,
struct folio *folio,
struct list_head *vmemmap_pages,
@@ -509,7 +534,7 @@ static int __hugetlb_vmemmap_optimize_folio(const struct hstate *h,
return ret;
nid = folio_nid(folio);
- vmemmap_tail = vmemmap_shared_tail_page(h->order, folio_zone(folio));
+ vmemmap_tail = vmemmap_get_tail(h->order, folio_zone(folio));
if (!vmemmap_tail)
return -ENOMEM;
@@ -680,13 +705,109 @@ void hugetlb_vmemmap_optimize_bootmem_folios(struct hstate *h, struct list_head
__hugetlb_vmemmap_optimize_folios(h, folio_list, true);
}
-void __init hugetlb_vmemmap_optimize_bootmem_page(unsigned long pfn, unsigned int order)
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+
+/* Return true of a bootmem allocated HugeTLB page should be pre-HVO-ed */
+static bool vmemmap_should_optimize_bootmem_page(struct huge_bootmem_page *m)
{
+ unsigned long section_size, psize, pmd_vmemmap_size;
+ phys_addr_t paddr;
+
+ if (!READ_ONCE(vmemmap_optimize_enabled))
+ return false;
+
+ if (!hugetlb_vmemmap_optimizable(m->hstate))
+ return false;
+
+ psize = huge_page_size(m->hstate);
+ paddr = virt_to_phys(m);
+
+ /*
+ * Pre-HVO only works if the bootmem huge page
+ * is aligned to the section size.
+ */
+ section_size = (1UL << PA_SECTION_SHIFT);
+ if (!IS_ALIGNED(paddr, section_size) ||
+ !IS_ALIGNED(psize, section_size))
+ return false;
+
+ /*
+ * The pre-HVO code does not deal with splitting PMDS,
+ * so the bootmem page must be aligned to the number
+ * of base pages that can be mapped with one vmemmap PMD.
+ */
+ pmd_vmemmap_size = (PMD_SIZE / (sizeof(struct page))) << PAGE_SHIFT;
+ if (!IS_ALIGNED(paddr, pmd_vmemmap_size) ||
+ !IS_ALIGNED(psize, pmd_vmemmap_size))
+ return false;
+
+ return true;
+}
+
+static struct zone *pfn_to_zone(unsigned nid, unsigned long pfn)
+{
+ struct zone *zone;
+ enum zone_type zone_type;
+
+ for (zone_type = 0; zone_type < MAX_NR_ZONES; zone_type++) {
+ zone = &NODE_DATA(nid)->node_zones[zone_type];
+ if (zone_spans_pfn(zone, pfn))
+ return zone;
+ }
+
+ return NULL;
+}
+
+/*
+ * Initialize memmap section for a gigantic page, HVO-style.
+ */
+void __init hugetlb_vmemmap_init_early(int nid)
+{
+ unsigned long psize, paddr, section_size;
+ unsigned long ns, i, pnum, pfn, nr_pages;
+ unsigned long start, end;
+ struct huge_bootmem_page *m = NULL;
+ void *map;
+
if (!READ_ONCE(vmemmap_optimize_enabled))
return;
- section_set_compound_order_range(pfn, 1UL << order, order);
+ section_size = (1UL << PA_SECTION_SHIFT);
+
+ list_for_each_entry(m, &huge_boot_pages[nid], list) {
+ struct zone *zone;
+
+ if (!vmemmap_should_optimize_bootmem_page(m))
+ continue;
+
+ nr_pages = pages_per_huge_page(m->hstate);
+ psize = nr_pages << PAGE_SHIFT;
+ paddr = virt_to_phys(m);
+ pfn = PHYS_PFN(paddr);
+ map = pfn_to_page(pfn);
+ start = (unsigned long)map;
+ end = start + hugetlb_vmemmap_size(m->hstate);
+ zone = pfn_to_zone(nid, pfn);
+
+ if (vmemmap_populate_hvo(start, end, huge_page_order(m->hstate),
+ zone, HUGETLB_VMEMMAP_RESERVE_SIZE))
+ panic("Failed to allocate memmap for HugeTLB page\n");
+ memmap_boot_pages_add(DIV_ROUND_UP(HUGETLB_VMEMMAP_RESERVE_SIZE, PAGE_SIZE));
+
+ pnum = pfn_to_section_nr(pfn);
+ ns = psize / section_size;
+
+ for (i = 0; i < ns; i++) {
+ sparse_init_early_section(nid, map, pnum,
+ SECTION_IS_VMEMMAP_PREINIT);
+ map += section_map_size();
+ pnum++;
+ }
+
+ m->flags |= HUGE_BOOTMEM_HVO;
+ }
}
+#endif
static const struct ctl_table hugetlb_vmemmap_sysctls[] = {
{
diff --git a/mm/hugetlb_vmemmap.h b/mm/hugetlb_vmemmap.h
index 464192e32dec..7ac49c52457d 100644
--- a/mm/hugetlb_vmemmap.h
+++ b/mm/hugetlb_vmemmap.h
@@ -9,6 +9,8 @@
#ifndef _LINUX_HUGETLB_VMEMMAP_H
#define _LINUX_HUGETLB_VMEMMAP_H
#include <linux/hugetlb.h>
+#include <linux/io.h>
+#include <linux/memblock.h>
/*
* Reserve one vmemmap page, all vmemmap addresses are mapped to it. See
@@ -25,7 +27,10 @@ long hugetlb_vmemmap_restore_folios(const struct hstate *h,
void hugetlb_vmemmap_optimize_folio(const struct hstate *h, struct folio *folio);
void hugetlb_vmemmap_optimize_folios(struct hstate *h, struct list_head *folio_list);
void hugetlb_vmemmap_optimize_bootmem_folios(struct hstate *h, struct list_head *folio_list);
-void hugetlb_vmemmap_optimize_bootmem_page(unsigned long pfn, unsigned int order);
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+void hugetlb_vmemmap_init_early(int nid);
+#endif
+
static inline unsigned int hugetlb_vmemmap_size(const struct hstate *h)
{
@@ -71,13 +76,13 @@ static inline void hugetlb_vmemmap_optimize_bootmem_folios(struct hstate *h,
{
}
-static inline unsigned int hugetlb_vmemmap_optimizable_size(const struct hstate *h)
+static inline void hugetlb_vmemmap_init_early(int nid)
{
- return 0;
}
-static inline void hugetlb_vmemmap_optimize_bootmem_page(unsigned long pfn, unsigned int order)
+static inline unsigned int hugetlb_vmemmap_optimizable_size(const struct hstate *h)
{
+ return 0;
}
#endif /* CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP */
diff --git a/mm/init-mm.c b/mm/init-mm.c
index a1bb2c2d0284..3e792aad7626 100644
--- a/mm/init-mm.c
+++ b/mm/init-mm.c
@@ -39,8 +39,10 @@ struct mm_struct init_mm = {
.page_table_lock = __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
.arg_lock = __SPIN_LOCK_UNLOCKED(init_mm.arg_lock),
.mmlist = LIST_HEAD_INIT(init_mm.mmlist),
+#ifdef CONFIG_PER_VMA_LOCK
.vma_writer_wait = __RCUWAIT_INITIALIZER(init_mm.vma_writer_wait),
.mm_lock_seq = SEQCNT_ZERO(init_mm.mm_lock_seq),
+#endif
#ifdef CONFIG_SCHED_MM_CID
.mm_cid.lock = __RAW_SPIN_LOCK_UNLOCKED(init_mm.mm_cid.lock),
#endif
diff --git a/mm/internal.h b/mm/internal.h
index 0dca33db068f..38b1165212c9 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -23,6 +23,13 @@
#include "vma.h"
struct folio_batch;
+struct hstate;
+
+struct huge_bootmem_page {
+ struct list_head list;
+ struct hstate *hstate;
+ unsigned long flags;
+};
/* mm/workingset.c */
bool workingset_test_recent(void *shadow, bool file, bool *workingset,
@@ -78,6 +85,10 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg,
gfp_t gfp_mask,
unsigned int reclaim_options,
int *swappiness);
+unsigned long mem_cgroup_shrink_node(struct mem_cgroup *memcg,
+ gfp_t gfp_mask, bool noswap,
+ pg_data_t *pgdat,
+ unsigned long *nr_scanned);
#ifdef CONFIG_NUMA
extern int sysctl_min_unmapped_ratio;
@@ -226,18 +237,15 @@ static inline int mmap_file(struct file *file, struct vm_area_struct *vma)
{
int err = vfs_mmap(file, vma);
+ if (likely(!err))
+ return 0;
+
/*
- * Either we tried to call the file hook for mmap() and an error arose
- * or a driver set vma->vm_ops = NULL intending there to be no VMA
- * operations.
- *
- * In the former case the VMA is in an inconsistent state and we mustn't
- * invoke any further hooks on it, in the latter case the hook actually
- * wanted no further hooks to be invoked, so fix both by setting dummy
- * VMA ops.
+ * OK, we tried to call the file hook for mmap(), but an error
+ * arose. The mapping is in an inconsistent state and we must not invoke
+ * any further hooks on it.
*/
- if (unlikely(err || !vma->vm_ops))
- vma->vm_ops = &vma_dummy_vm_ops;
+ vma->vm_ops = &vma_dummy_vm_ops;
return err;
}
@@ -287,6 +295,11 @@ static inline void anon_vma_lock_write(struct anon_vma *anon_vma)
down_write(&anon_vma->root->rwsem);
}
+static inline int anon_vma_trylock_write(struct anon_vma *anon_vma)
+{
+ return down_write_trylock(&anon_vma->root->rwsem);
+}
+
static inline void anon_vma_unlock_write(struct anon_vma *anon_vma)
{
up_write(&anon_vma->root->rwsem);
@@ -786,6 +799,15 @@ static inline void prep_compound_tail(struct page *tail,
VM_WARN_ON_ONCE(tail->private);
}
+static inline void init_compound_tail(struct page *tail,
+ const struct page *head, unsigned int order, struct zone *zone)
+{
+ atomic_set(&tail->_mapcount, -1);
+ set_page_node(tail, zone_to_nid(zone));
+ set_page_zone(tail, zone_idx(zone));
+ prep_compound_tail(tail, head, order);
+}
+
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
/*
@@ -1632,7 +1654,4 @@ static inline bool can_spin_trylock(void)
return true;
}
-/* char-mem.c */
-bool file_is_dev_zero(const struct file *file);
-
#endif /* __MM_INTERNAL_H */
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 0d8cd44b14c5..75639298efc2 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -26,10 +26,44 @@
#include <linux/cleanup.h>
#include <asm/tlb.h>
-#include "collapse.h"
#include "internal.h"
-#include "mm_slot.h"
#include "page_alloc.h"
+#include "mm_slot.h"
+
+enum scan_result {
+ SCAN_FAIL,
+ SCAN_SUCCEED,
+ SCAN_NO_PTE_TABLE,
+ SCAN_PMD_MAPPED,
+ SCAN_EXCEED_NONE_PTE,
+ SCAN_EXCEED_SWAP_PTE,
+ SCAN_EXCEED_SHARED_PTE,
+ SCAN_PTE_NON_PRESENT,
+ SCAN_PTE_UFFD,
+ SCAN_PTE_MAPPED_HUGEPAGE,
+ SCAN_LACK_REFERENCED_PAGE,
+ SCAN_PAGE_NULL,
+ SCAN_SCAN_ABORT,
+ SCAN_PAGE_COUNT,
+ SCAN_PAGE_LRU,
+ SCAN_PAGE_LOCK,
+ SCAN_PAGE_ANON,
+ SCAN_PAGE_LAZYFREE,
+ SCAN_PAGE_COMPOUND,
+ SCAN_ANY_PROCESS,
+ SCAN_VMA_NULL,
+ SCAN_VMA_CHECK,
+ SCAN_ADDRESS_RANGE,
+ SCAN_DEL_PAGE_LRU,
+ SCAN_ALLOC_HUGE_PAGE_FAIL,
+ SCAN_CGROUP_CHARGE_FAIL,
+ SCAN_TRUNCATED,
+ SCAN_PAGE_HAS_PRIVATE,
+ SCAN_STORE_FAILED,
+ SCAN_COPY_MC,
+ SCAN_PAGE_FILLED,
+ SCAN_PAGE_DIRTY_OR_WRITEBACK,
+};
#define CREATE_TRACE_POINTS
#include <trace/events/huge_memory.h>
@@ -57,6 +91,7 @@ static DECLARE_WAIT_QUEUE_HEAD(khugepaged_wait);
*
* Note that these are only respected if collapse was initiated by khugepaged.
*/
+#define KHUGEPAGED_MAX_PTES_LIMIT (HPAGE_PMD_NR - 1)
unsigned int khugepaged_max_ptes_none __read_mostly;
static unsigned int khugepaged_max_ptes_swap __read_mostly;
static unsigned int khugepaged_max_ptes_shared __read_mostly;
@@ -66,6 +101,24 @@ static DEFINE_READ_MOSTLY_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
static struct kmem_cache *mm_slot_cache __ro_after_init;
+#define KHUGEPAGED_MIN_MTHP_ORDER 2
+
+struct collapse_control {
+ bool is_khugepaged;
+
+ /* Num pages scanned per node */
+ u32 node_load[MAX_NUMNODES];
+
+ /* Num pages scanned (see khugepaged_pages_to_scan) */
+ unsigned int progress;
+
+ /* nodemask for allocation fallback */
+ nodemask_t alloc_nmask;
+
+ /* Each bit represents a single occupied (!none/zero) page. */
+ DECLARE_BITMAP(mthp_present_ptes, MAX_PTRS_PER_PTE);
+};
+
/**
* struct khugepaged_scan - cursor for scanning
* @mm_head: the head of the mm list to scan
@@ -214,7 +267,7 @@ static ssize_t max_ptes_none_store(struct kobject *kobj,
unsigned long max_ptes_none;
err = kstrtoul(buf, 10, &max_ptes_none);
- if (err || max_ptes_none > COLLAPSE_MAX_PTES_LIMIT)
+ if (err || max_ptes_none > KHUGEPAGED_MAX_PTES_LIMIT)
return -EINVAL;
khugepaged_max_ptes_none = max_ptes_none;
@@ -239,7 +292,7 @@ static ssize_t max_ptes_swap_store(struct kobject *kobj,
unsigned long max_ptes_swap;
err = kstrtoul(buf, 10, &max_ptes_swap);
- if (err || max_ptes_swap > COLLAPSE_MAX_PTES_LIMIT)
+ if (err || max_ptes_swap > KHUGEPAGED_MAX_PTES_LIMIT)
return -EINVAL;
khugepaged_max_ptes_swap = max_ptes_swap;
@@ -265,7 +318,7 @@ static ssize_t max_ptes_shared_store(struct kobject *kobj,
unsigned long max_ptes_shared;
err = kstrtoul(buf, 10, &max_ptes_shared);
- if (err || max_ptes_shared > COLLAPSE_MAX_PTES_LIMIT)
+ if (err || max_ptes_shared > KHUGEPAGED_MAX_PTES_LIMIT)
return -EINVAL;
khugepaged_max_ptes_shared = max_ptes_shared;
@@ -314,27 +367,30 @@ static bool pte_none_or_zero(pte_t pte)
static unsigned int collapse_max_ptes_none(struct collapse_control *cc,
struct vm_area_struct *vma, unsigned int order)
{
- const unsigned int max_ptes_none = cc->policy.max_ptes_none;
+ const unsigned int max_ptes_none = khugepaged_max_ptes_none;
if (vma && userfaultfd_armed(vma))
return 0;
- /* The limit as given, at the PMD order and wherever it is not capped */
- if (is_pmd_order(order) || !cc->policy.strict_sub_pmd)
+ /* for MADV_COLLAPSE, allow any empty/shared zeropage PTEs */
+ if (!cc->is_khugepaged)
+ return HPAGE_PMD_NR;
+ /* for PMD collapse, respect the user defined maximum */
+ if (is_pmd_order(order))
return max_ptes_none;
/*
- * for mTHP collapse with the sysctl value set to COLLAPSE_MAX_PTES_LIMIT,
+ * for mTHP collapse with the sysctl value set to KHUGEPAGED_MAX_PTES_LIMIT,
* scale the maximum number of PTEs to the order of the collapse.
*/
- if (max_ptes_none == COLLAPSE_MAX_PTES_LIMIT)
+ if (max_ptes_none == KHUGEPAGED_MAX_PTES_LIMIT)
return (1 << order) - 1;
/*
- * For mTHP collapse of values other than 0 or COLLAPSE_MAX_PTES_LIMIT,
+ * For mTHP collapse of values other than 0 or KHUGEPAGED_MAX_PTES_LIMIT,
* emit a warning and return 0.
*/
if (max_ptes_none)
pr_warn_once("mTHP collapse does not support max_ptes_none"
" values other than 0 or %u, defaulting to 0.\n",
- COLLAPSE_MAX_PTES_LIMIT);
+ KHUGEPAGED_MAX_PTES_LIMIT);
return 0;
}
@@ -351,12 +407,19 @@ static unsigned int collapse_max_ptes_shared(struct collapse_control *cc,
unsigned int order)
{
/*
- * A sub-PMD window held to the strict rule takes no shared page at all:
- * an mTHP is not worth the CoW-breaking.
+ * For MADV_COLLAPSE, do not restrict the number of PTEs that map shared
+ * anonymous pages.
*/
- if (!is_pmd_order(order) && cc->policy.strict_sub_pmd)
+ if (!cc->is_khugepaged)
+ return HPAGE_PMD_NR;
+ /*
+ * for mTHP collapse do not allow collapsing anonymous memory pages that
+ * are shared between processes.
+ */
+ if (!is_pmd_order(order))
return 0;
- return cc->policy.max_ptes_shared;
+ /* for PMD collapse, respect the user defined maximum */
+ return khugepaged_max_ptes_shared;
}
/**
@@ -372,12 +435,16 @@ static unsigned int collapse_max_ptes_swap(struct collapse_control *cc,
unsigned int order)
{
/*
- * A sub-PMD window held to the strict rule takes nothing non-present:
- * reading pages back to build an mTHP is not worth the latency.
+ * For MADV_COLLAPSE, do not restrict the number PTEs entries or
+ * pagecache entries that are non-present.
*/
- if (!is_pmd_order(order) && cc->policy.strict_sub_pmd)
+ if (!cc->is_khugepaged)
+ return HPAGE_PMD_NR;
+ /* for mTHP collapse do not allow any non-present PTEs or pagecache entries */
+ if (!is_pmd_order(order))
return 0;
- return cc->policy.max_ptes_swap;
+ /* for PMD collapse, respect the user defined maximum */
+ return khugepaged_max_ptes_swap;
}
int hugepage_madvise(struct vm_area_struct *vma,
@@ -409,7 +476,7 @@ int __init khugepaged_init(void)
return -ENOMEM;
khugepaged_pages_to_scan = HPAGE_PMD_NR * 8;
- khugepaged_max_ptes_none = COLLAPSE_MAX_PTES_LIMIT;
+ khugepaged_max_ptes_none = KHUGEPAGED_MAX_PTES_LIMIT;
khugepaged_max_ptes_swap = HPAGE_PMD_NR / 8;
khugepaged_max_ptes_shared = HPAGE_PMD_NR / 2;
@@ -498,7 +565,7 @@ void __khugepaged_enter(struct mm_struct *mm)
* Check what orders are possible based on the vma and collapse type.
* This is used to determine if mTHP collapse is a viable option.
*/
-unsigned long collapse_possible_orders(struct vm_area_struct *vma,
+static unsigned long collapse_possible_orders(struct vm_area_struct *vma,
vm_flags_t vm_flags, enum tva_type tva_flags)
{
unsigned long orders;
@@ -512,11 +579,17 @@ unsigned long collapse_possible_orders(struct vm_area_struct *vma,
return thp_vma_allowable_orders(vma, vm_flags, tva_flags, orders);
}
+static bool collapse_possible(struct vm_area_struct *vma,
+ vm_flags_t vm_flags, enum tva_type tva_flags)
+{
+ return collapse_possible_orders(vma, vm_flags, tva_flags);
+}
+
void khugepaged_enter_vma(struct vm_area_struct *vma,
vm_flags_t vm_flags)
{
- if (!mm_flags_test(MMF_VM_HUGEPAGE, vma->vm_mm) && hugepage_enabled() &&
- collapse_possible_orders(vma, vm_flags, TVA_KHUGEPAGED))
+ if (!mm_flags_test(MMF_VM_HUGEPAGE, vma->vm_mm) && hugepage_enabled()
+ && collapse_possible(vma, vm_flags, TVA_KHUGEPAGED))
__khugepaged_enter(vma->vm_mm);
}
@@ -550,11 +623,11 @@ void __khugepaged_exit(struct mm_struct *mm)
}
}
-static void collapse_scan_reset(struct collapse_control *cc)
+static void collapse_control_init_scan(struct collapse_control *cc)
{
memset(cc->node_load, 0, sizeof(cc->node_load));
nodes_clear(cc->alloc_nmask);
- bitmap_zero(cc->eligible_ptes, MAX_PTRS_PER_PTE);
+ bitmap_zero(cc->mthp_present_ptes, MAX_PTRS_PER_PTE);
}
static void release_pte_folio(struct folio *folio)
@@ -658,7 +731,7 @@ static enum scan_result __collapse_huge_page_isolate(struct vm_area_struct *vma,
* If the vma has the VM_DROPPABLE flag, the collapse will
* preserve the lazyfree property without needing to skip.
*/
- if (cc->policy.skip_lazyfree && !(vma->vm_flags & VM_DROPPABLE) &&
+ if (cc->is_khugepaged && !(vma->vm_flags & VM_DROPPABLE) &&
folio_test_lazyfree(folio) && !pte_dirty(pteval)) {
result = SCAN_PAGE_LAZYFREE;
goto out;
@@ -747,12 +820,12 @@ static enum scan_result __collapse_huge_page_isolate(struct vm_area_struct *vma,
if (folio_test_large(folio))
list_add_tail(&folio->lru, compound_pagelist);
next:
- if (cc->policy.require_referenced &&
+ if (cc->is_khugepaged &&
folio_pte_referenced(folio, vma, addr, pteval))
referenced++;
}
- if (unlikely(cc->policy.require_referenced && !referenced)) {
+ if (unlikely(cc->is_khugepaged && !referenced)) {
result = SCAN_LACK_REFERENCED_PAGE;
} else {
result = SCAN_SUCCEED;
@@ -918,7 +991,9 @@ static void khugepaged_alloc_sleep(void)
remove_wait_queue(&khugepaged_wait, &wait);
}
-static struct collapse_control khugepaged_collapse_control;
+static struct collapse_control khugepaged_collapse_control = {
+ .is_khugepaged = true,
+};
static bool collapse_scan_abort(int nid, struct collapse_control *cc)
{
@@ -954,21 +1029,6 @@ static inline gfp_t alloc_hugepage_khugepaged_gfpmask(void)
return khugepaged_defrag() ? GFP_TRANSHUGE : GFP_TRANSHUGE_LIGHT;
}
-/* khugepaged collapses on its own initiative, so it obeys its own settings */
-static void collapse_policy_khugepaged(struct collapse_policy *p)
-{
- p->max_ptes_none = READ_ONCE(khugepaged_max_ptes_none);
- p->max_ptes_swap = READ_ONCE(khugepaged_max_ptes_swap);
- p->max_ptes_shared = READ_ONCE(khugepaged_max_ptes_shared);
- p->strict_sub_pmd = true;
- p->skip_lazyfree = true;
- p->require_referenced = true;
- p->install_pmd = false;
- p->writeback_dirty = false;
- p->gfp = alloc_hugepage_khugepaged_gfpmask();
- p->tva_type = TVA_KHUGEPAGED;
-}
-
#ifdef CONFIG_NUMA
static int collapse_find_target_node(struct collapse_control *cc)
{
@@ -1001,12 +1061,13 @@ static int collapse_find_target_node(struct collapse_control *cc)
* Returns enum scan_result value.
*/
-enum scan_result collapse_vma_revalidate(struct mm_struct *mm, unsigned long address,
+static enum scan_result hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address,
bool expect_anon, struct vm_area_struct **vmap,
struct collapse_control *cc, unsigned int order)
{
struct vm_area_struct *vma;
- enum tva_type type = cc->policy.tva_type;
+ enum tva_type type = cc->is_khugepaged ? TVA_KHUGEPAGED :
+ TVA_FORCED_COLLAPSE;
if (unlikely(collapse_test_exit_or_disable(mm)))
return SCAN_ANY_PROCESS;
@@ -1189,7 +1250,8 @@ out:
static enum scan_result alloc_charge_folio(struct folio **foliop, struct mm_struct *mm,
struct collapse_control *cc, unsigned int order)
{
- gfp_t gfp = cc->policy.gfp;
+ gfp_t gfp = (cc->is_khugepaged ? alloc_hugepage_khugepaged_gfpmask() :
+ GFP_TRANSHUGE);
int node = collapse_find_target_node(cc);
struct folio *folio;
@@ -1249,7 +1311,7 @@ static enum scan_result collapse_huge_page(struct mm_struct *mm, unsigned long s
}
mmap_read_lock(mm);
- result = collapse_vma_revalidate(mm, pmd_addr, /*expect_anon=*/ true,
+ result = hugepage_vma_revalidate(mm, pmd_addr, /*expect_anon=*/ true,
&vma, cc, order);
if (result != SCAN_SUCCEED) {
mmap_read_unlock(mm);
@@ -1284,7 +1346,7 @@ static enum scan_result collapse_huge_page(struct mm_struct *mm, unsigned long s
* mmap_lock.
*/
mmap_write_lock(mm);
- result = collapse_vma_revalidate(mm, pmd_addr, /*expect_anon=*/ true,
+ result = hugepage_vma_revalidate(mm, pmd_addr, /*expect_anon=*/ true,
&vma, cc, order);
if (result != SCAN_SUCCEED)
goto out_up_write;
@@ -1420,15 +1482,15 @@ static unsigned int max_order_from_offset(unsigned int offset)
* mthp_collapse() consumes the bitmap that is generated during
* collapse_scan_pmd() to determine what regions and mTHP orders fit best.
*
- * Each bit in cc->eligible_ptes marks a PTE the scan accepted as a collapse
- * source. We start at the PMD order and check if it is eligible for collapse;
+ * Each bit in cc->mthp_present_ptes represents a single occupied (!none/zero)
+ * page. We start at the PMD order and check if it is eligible for collapse;
* if not, we check the left and right halves of the PTE page table we are
* examining at a lower order.
*
- * For each of these, we count the eligible PTEs in the range we propose to
- * collapse, then we compare this to the number of eligible PTEs the range
- * would need for a collapse to be permitted at that order (accounting for
- * max_ptes_none).
+ * For each of these, we determine how many PTE entries are occupied in the
+ * range of PTE entries we propose to collapse, then we compare this to a
+ * threshold number of PTE entries which would need to be occupied for a
+ * collapse to be permitted at that order (accounting for max_ptes_none).
*
* If a collapse is permitted, we attempt to collapse the PTE range into a
* mTHP.
@@ -1437,7 +1499,7 @@ static enum scan_result mthp_collapse(struct mm_struct *mm,
unsigned long address, int referenced, int unmapped,
struct collapse_control *cc, unsigned long enabled_orders)
{
- unsigned int nr_eligible_ptes, nr_ptes, max_ptes_none;
+ unsigned int nr_occupied_ptes, nr_ptes, max_ptes_none;
enum scan_result last_result = SCAN_FAIL;
int collapsed = 0;
bool alloc_failed = false;
@@ -1452,18 +1514,18 @@ static enum scan_result mthp_collapse(struct mm_struct *mm,
goto next_order;
max_ptes_none = collapse_max_ptes_none(cc, NULL, order);
- nr_eligible_ptes = bitmap_weight_from(cc->eligible_ptes, offset,
+ nr_occupied_ptes = bitmap_weight_from(cc->mthp_present_ptes, offset,
offset + nr_ptes);
/*
* Swap PTEs accepted during the scan are counted in @unmapped,
- * not in cc->eligible_ptes. Account them for the PMD-order
+ * not in the present-PTE bitmap. Account them for the PMD-order
* candidate.
*/
if (is_pmd_order(order))
- nr_eligible_ptes += unmapped;
+ nr_occupied_ptes += unmapped;
- if (nr_eligible_ptes >= nr_ptes - max_ptes_none) {
+ if (nr_occupied_ptes >= nr_ptes - max_ptes_none) {
enum scan_result ret;
collapse_address = address + offset * PAGE_SIZE;
@@ -1509,8 +1571,8 @@ next_order:
* any smaller order enabled. When at the smallest order
* we must always move to the next offset.
*/
- if (order > COLLAPSE_MIN_MTHP_ORDER &&
- (enabled_orders & GENMASK(order - 1, 0))) {
+ if (order > KHUGEPAGED_MIN_MTHP_ORDER &&
+ (enabled_orders & GENMASK(order - 1, 0))) {
order--;
continue;
}
@@ -1535,14 +1597,14 @@ done:
return last_result;
}
-static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
- unsigned long start_addr, struct collapse_control *cc,
- unsigned long enabled_orders)
+static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
+ struct vm_area_struct *vma, unsigned long start_addr,
+ bool *lock_dropped, struct collapse_control *cc)
{
const unsigned int max_ptes_shared = collapse_max_ptes_shared(cc, HPAGE_PMD_ORDER);
const unsigned int max_ptes_swap = collapse_max_ptes_swap(cc, HPAGE_PMD_ORDER);
unsigned int max_ptes_none = collapse_max_ptes_none(cc, vma, HPAGE_PMD_ORDER);
- struct mm_struct *mm = vma->vm_mm;
+ enum tva_type tva_flags = cc->is_khugepaged ? TVA_KHUGEPAGED : TVA_FORCED_COLLAPSE;
pmd_t *pmd;
pte_t *pte, *_pte, pteval;
int i;
@@ -1550,8 +1612,8 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
enum scan_result result = SCAN_FAIL;
struct page *page = NULL;
struct folio *folio = NULL;
- unsigned long failed_pfn = -1;
unsigned long addr;
+ unsigned long enabled_orders;
spinlock_t *ptl;
int node = NUMA_NO_NODE, unmapped = 0;
@@ -1563,7 +1625,9 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
goto out;
}
- collapse_scan_reset(cc);
+ collapse_control_init_scan(cc);
+
+ enabled_orders = collapse_possible_orders(vma, vma->vm_flags, tva_flags);
/*
* If PMD is the only enabled order, enforce max_ptes_none, otherwise
@@ -1571,7 +1635,7 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
* is then checked again in mthp_collapse() for each attempted order.
*/
if (enabled_orders != BIT(HPAGE_PMD_ORDER))
- max_ptes_none = COLLAPSE_MAX_PTES_LIMIT;
+ max_ptes_none = KHUGEPAGED_MAX_PTES_LIMIT;
pte = pte_offset_map_lock(mm, pmd, start_addr, &ptl);
if (!pte) {
@@ -1639,16 +1703,14 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
* If the vma has the VM_DROPPABLE flag, the collapse will
* preserve the lazyfree property without needing to skip.
*/
- if (cc->policy.skip_lazyfree && !(vma->vm_flags & VM_DROPPABLE) &&
+ if (cc->is_khugepaged && !(vma->vm_flags & VM_DROPPABLE) &&
folio_test_lazyfree(folio) && !pte_dirty(pteval)) {
result = SCAN_PAGE_LAZYFREE;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
if (!folio_test_anon(folio)) {
result = SCAN_PAGE_ANON;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
@@ -1659,15 +1721,14 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
if (folio_maybe_mapped_shared(folio)) {
if (++shared > max_ptes_shared) {
result = SCAN_EXCEED_SHARED_PTE;
- failed_pfn = folio_pfn(folio);
count_collapse_event(HPAGE_PMD_ORDER, THP_SCAN_EXCEED_SHARED_PTE,
MTHP_STAT_COLLAPSE_EXCEED_SHARED);
goto out_unmap;
}
}
- /* The scan accepted this PTE as a collapse source */
- __set_bit(i, cc->eligible_ptes);
+ /* Set bit for occupied pages */
+ __set_bit(i, cc->mthp_present_ptes);
/*
* Record which node the original page is from and save this
* information to cc->node_load[].
@@ -1677,18 +1738,15 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
node = folio_nid(folio);
if (collapse_scan_abort(node, cc)) {
result = SCAN_SCAN_ABORT;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
cc->node_load[node]++;
if (!folio_test_lru(folio)) {
result = SCAN_PAGE_LRU;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
if (folio_test_locked(folio)) {
result = SCAN_PAGE_LOCK;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
@@ -1701,17 +1759,16 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
*/
if (folio_expected_ref_count(folio) != folio_ref_count(folio)) {
result = SCAN_PAGE_COUNT;
- failed_pfn = folio_pfn(folio);
goto out_unmap;
}
- if (cc->policy.require_referenced &&
+ if (cc->is_khugepaged &&
folio_pte_referenced(folio, vma, addr, pteval))
referenced++;
}
- if (cc->policy.require_referenced &&
- (!referenced ||
- (unmapped && referenced < HPAGE_PMD_NR / 2))) {
+ if (cc->is_khugepaged &&
+ (!referenced ||
+ (unmapped && referenced < HPAGE_PMD_NR / 2))) {
result = SCAN_LACK_REFERENCED_PAGE;
} else {
result = SCAN_SUCCEED;
@@ -1719,12 +1776,15 @@ static enum scan_result collapse_scan_anon_pmd(struct vm_area_struct *vma,
out_unmap:
pte_unmap_unlock(pte, ptl);
if (result == SCAN_SUCCEED) {
- cc->scan_orders = enabled_orders;
- cc->scan_referenced = referenced;
- cc->scan_unmapped = unmapped;
+ /* collapse_huge_page() expects the lock to be dropped before calling */
+ mmap_read_unlock(mm);
+ result = mthp_collapse(mm, start_addr, referenced,
+ unmapped, cc, enabled_orders);
+ /* mmap_lock was released above, set lock_dropped */
+ *lock_dropped = true;
}
out:
- trace_mm_khugepaged_scan_pmd(mm, failed_pfn, referenced,
+ trace_mm_khugepaged_scan_pmd(mm, folio, referenced,
none_or_zero, result, unmapped);
return result;
}
@@ -1834,13 +1894,6 @@ static enum scan_result try_collapse_pte_mapped_thp(struct mm_struct *mm, unsign
if (userfaultfd_protected(vma))
return SCAN_PTE_UFFD;
- /*
- * Userfaultfd-minor-registered VMAs should not be collapsed, as
- * userspace is expecting to explicitly install PTEs.
- */
- if (userfaultfd_minor(vma))
- return SCAN_PTE_UFFD;
-
folio = filemap_lock_folio(vma->vm_file->f_mapping,
linear_page_index(vma, haddr));
if (IS_ERR(folio))
@@ -2192,14 +2245,12 @@ static enum scan_result collapse_file(struct mm_struct *mm, unsigned long addr,
struct address_space *mapping = file->f_mapping;
struct page *dst;
struct folio *folio, *tmp, *new_folio;
- unsigned long new_pfn = -1;
pgoff_t index = 0, end = start + HPAGE_PMD_NR;
LIST_HEAD(pagelist);
XA_STATE_ORDER(xas, &mapping->i_pages, start, HPAGE_PMD_ORDER);
enum scan_result result = SCAN_SUCCEED;
int nr_none = 0;
bool is_shmem = shmem_file(file);
- bool need_unlock = false;
/*
* MADV_COLLAPSE ignores shmem huge config, so do not check shmem
@@ -2213,16 +2264,6 @@ static enum scan_result collapse_file(struct mm_struct *mm, unsigned long addr,
result = alloc_charge_folio(&new_folio, mm, cc, HPAGE_PMD_ORDER);
if (result != SCAN_SUCCEED)
goto out;
- new_pfn = folio_pfn(new_folio);
-
- /*
- * Take invalidate_lock before any folio lock: the readahead below
- * needs it, and truncate holds it while waiting on folio locks.
- */
- if (!is_shmem) {
- filemap_invalidate_lock_shared(mapping);
- need_unlock = true;
- }
mapping_set_update(&xas, mapping);
@@ -2290,20 +2331,10 @@ static enum scan_result collapse_file(struct mm_struct *mm, unsigned long addr,
}
} else { /* !is_shmem */
if (!folio || xa_is_value(folio)) {
- DEFINE_READAHEAD(ractl, file, &file->f_ra,
- mapping, index);
- pgoff_t eof = DIV_ROUND_UP(i_size_read(mapping->host),
- PAGE_SIZE);
-
xas_unlock_irq(&xas);
- /*
- * invalidate_lock held above; don't retake it.
- * page_cache_ra_unbounded(), unlike the readahead
- * helper this replaces, does not clamp to EOF.
- */
- if (index < eof)
- page_cache_ra_unbounded(&ractl,
- min(end, eof) - index, 0);
+ page_cache_sync_readahead(mapping, &file->f_ra,
+ file, index,
+ end - index);
/* drain lru cache to help folio_isolate_lru() */
lru_add_drain();
folio = filemap_lock_folio(mapping, index);
@@ -2587,11 +2618,11 @@ immap_locked:
xas_unlock_irq(&xas);
/*
- * Remove pte page tables, so we can re-fault the page as huge. A
- * caller that wants the PMD mapped now is told to go and do that.
+ * Remove pte page tables, so we can re-fault the page as huge.
+ * If MADV_COLLAPSE, adjust result to call try_collapse_pte_mapped_thp().
*/
retract_page_tables(mapping, start);
- if (cc->policy.install_pmd)
+ if (cc && !cc->is_khugepaged)
result = SCAN_PTE_MAPPED_HUGEPAGE;
folio_unlock(new_folio);
@@ -2635,10 +2666,8 @@ rollback:
folio_unlock(new_folio);
folio_put(new_folio);
out:
- if (need_unlock)
- filemap_invalidate_unlock_shared(mapping);
VM_BUG_ON(!list_empty(&pagelist));
- trace_mm_khugepaged_collapse_file(mm, new_pfn, index, addr, is_shmem, file, HPAGE_PMD_NR, result);
+ trace_mm_khugepaged_collapse_file(mm, new_folio, index, addr, is_shmem, file, HPAGE_PMD_NR, result);
return result;
}
@@ -2654,11 +2683,10 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
int present, swap;
int node = NUMA_NO_NODE;
enum scan_result result = SCAN_SUCCEED;
- unsigned long failed_pfn = -1;
present = 0;
swap = 0;
- collapse_scan_reset(cc);
+ collapse_control_init_scan(cc);
rcu_read_lock();
xas_for_each(&xas, folio, start + HPAGE_PMD_NR - 1) {
if (xas_retry(&xas, folio))
@@ -2687,7 +2715,6 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
if (is_pmd_order(folio_order(folio))) {
result = SCAN_PTE_MAPPED_HUGEPAGE;
- failed_pfn = folio_pfn(folio);
/*
* PMD-sized THP implies that we can only try
* retracting the PTE table.
@@ -2699,7 +2726,6 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
node = folio_nid(folio);
if (collapse_scan_abort(node, cc)) {
result = SCAN_SCAN_ABORT;
- failed_pfn = folio_pfn(folio);
folio_put(folio);
break;
}
@@ -2707,14 +2733,12 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
if (!folio_test_lru(folio)) {
result = SCAN_PAGE_LRU;
- failed_pfn = folio_pfn(folio);
folio_put(folio);
break;
}
if (folio_expected_ref_count(folio) + 1 != folio_ref_count(folio)) {
result = SCAN_PAGE_COUNT;
- failed_pfn = folio_pfn(folio);
folio_put(folio);
break;
}
@@ -2740,99 +2764,53 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
else
cc->progress += HPAGE_PMD_NR;
- if (result == SCAN_SUCCEED && present < HPAGE_PMD_NR - max_ptes_none) {
- result = SCAN_EXCEED_NONE_PTE;
- count_vm_event(THP_SCAN_EXCEED_NONE_PTE);
- }
-
- trace_mm_khugepaged_scan_file(mm, failed_pfn, file, present, swap,
- result);
- return result;
-}
-
-void collapse_control_init(struct collapse_control *cc)
-{
- cc->progress = 0;
- cc->scan_file = NULL;
-}
-
-void collapse_control_release(struct collapse_control *cc)
-{
- /* A scan that took a file reference should have been run */
- if (WARN_ON_ONCE(cc->scan_file)) {
- fput(cc->scan_file);
- cc->scan_file = NULL;
- }
-}
-
-enum scan_result collapse_scan_pmd(struct vm_area_struct *vma,
- unsigned long addr, struct collapse_control *cc,
- unsigned long orders)
-{
- enum scan_result result;
- pgoff_t pgoff;
-
- mmap_assert_locked(vma->vm_mm);
- /* Whatever the last scan found has to have been run by now */
- if (WARN_ON_ONCE(cc->scan_file)) {
- fput(cc->scan_file);
- cc->scan_file = NULL;
- }
-
- if (vma_is_anonymous(vma))
- return collapse_scan_anon_pmd(vma, addr, cc, orders);
-
- pgoff = linear_page_index(vma, addr);
- result = collapse_scan_file(vma->vm_mm, addr, vma->vm_file, pgoff, cc);
- switch (result) {
- case SCAN_SUCCEED:
- cc->scan_retract_only = false;
- break;
- case SCAN_PTE_MAPPED_HUGEPAGE:
- /*
- * The page cache already holds the PMD folio; what is left is
- * to retract the PTE table, which is the run's job.
- */
- cc->scan_retract_only = true;
- result = SCAN_SUCCEED;
- break;
- default:
- return result;
+ if (result == SCAN_SUCCEED) {
+ if (present < HPAGE_PMD_NR - max_ptes_none) {
+ result = SCAN_EXCEED_NONE_PTE;
+ count_vm_event(THP_SCAN_EXCEED_NONE_PTE);
+ } else {
+ result = collapse_file(mm, addr, file, start, cc);
+ }
}
- /*
- * A file collapse works on the page cache and never sees a VMA, so take
- * what it needs from this one while it is still here.
- */
- cc->scan_file = get_file(vma->vm_file);
- cc->scan_pgoff = pgoff;
+ trace_mm_khugepaged_scan_file(mm, folio, file, present, swap, result);
return result;
}
-enum scan_result collapse_run_pmd(struct mm_struct *mm, unsigned long addr,
+/*
+ * Try to collapse a single PMD starting at a PMD aligned addr, and return
+ * the results.
+ */
+static enum scan_result collapse_single_pmd(unsigned long addr,
+ struct vm_area_struct *vma, bool *lock_dropped,
struct collapse_control *cc)
{
- struct file *file = cc->scan_file;
+ struct mm_struct *mm = vma->vm_mm;
bool triggered_wb = false;
enum scan_result result;
+ struct file *file;
pgoff_t pgoff;
- if (!file)
- return mthp_collapse(mm, addr, cc->scan_referenced,
- cc->scan_unmapped, cc, cc->scan_orders);
-
- cc->scan_file = NULL;
- pgoff = cc->scan_pgoff;
+ mmap_assert_locked(mm);
- if (cc->scan_retract_only) {
- result = SCAN_PTE_MAPPED_HUGEPAGE;
- goto retract;
+ if (vma_is_anonymous(vma)) {
+ result = collapse_scan_pmd(mm, vma, addr, lock_dropped, cc);
+ goto end;
}
+
+ file = get_file(vma->vm_file);
+ pgoff = linear_page_index(vma, addr);
+
+ mmap_read_unlock(mm);
+ *lock_dropped = true;
retry:
- result = collapse_file(mm, addr, file, pgoff, cc);
+ result = collapse_scan_file(mm, addr, file, pgoff, cc);
- /* Dirty pages are worth a writeback and one more try, if asked for */
- if (cc->policy.writeback_dirty && result == SCAN_PAGE_DIRTY_OR_WRITEBACK &&
+ /*
+ * For MADV_COLLAPSE, when encountering dirty pages, try to writeback,
+ * then retry the collapse one time.
+ */
+ if (!cc->is_khugepaged && result == SCAN_PAGE_DIRTY_OR_WRITEBACK &&
!triggered_wb && mapping_can_writeback(file->f_mapping)) {
const loff_t lstart = (loff_t)pgoff << PAGE_SHIFT;
const loff_t lend = lstart + HPAGE_PMD_SIZE - 1;
@@ -2841,24 +2819,22 @@ retry:
triggered_wb = true;
goto retry;
}
-retract:
fput(file);
- /*
- * A PMD folio is in the page cache, whether the collapse just put it
- * there or found it: retract the PTE table, and map the PMD if asked.
- */
if (result == SCAN_PTE_MAPPED_HUGEPAGE) {
mmap_read_lock(mm);
if (collapse_test_exit_or_disable(mm))
result = SCAN_ANY_PROCESS;
else
result = try_collapse_pte_mapped_thp(mm, addr,
- cc->policy.install_pmd);
+ !cc->is_khugepaged);
if (result == SCAN_PMD_MAPPED)
result = SCAN_SUCCEED;
mmap_read_unlock(mm);
}
+end:
+ if (cc->is_khugepaged && result == SCAN_SUCCEED)
+ ++khugepaged_pages_collapsed;
return result;
}
@@ -2901,17 +2877,14 @@ static void collapse_scan_mm_slot(unsigned int progress_max,
vma_iter_init(&vmi, mm, khugepaged_scan.address);
for_each_vma(vmi, vma) {
- unsigned long hstart, hend, orders;
+ unsigned long hstart, hend;
cond_resched();
if (unlikely(collapse_test_exit_or_disable(mm))) {
cc->progress++;
break;
}
- /* One mask for the whole VMA */
- orders = collapse_possible_orders(vma, vma->vm_flags,
- cc->policy.tva_type);
- if (!orders) {
+ if (!collapse_possible(vma, vma->vm_flags, TVA_KHUGEPAGED)) {
cc->progress++;
continue;
}
@@ -2926,7 +2899,7 @@ static void collapse_scan_mm_slot(unsigned int progress_max,
VM_BUG_ON(khugepaged_scan.address & ~HPAGE_PMD_MASK);
while (khugepaged_scan.address < hend) {
- unsigned long addr;
+ bool lock_dropped = false;
cond_resched();
if (unlikely(collapse_test_exit_or_disable(mm)))
@@ -2936,29 +2909,21 @@ static void collapse_scan_mm_slot(unsigned int progress_max,
khugepaged_scan.address + HPAGE_PMD_SIZE >
hend);
- addr = khugepaged_scan.address;
+ *result = collapse_single_pmd(khugepaged_scan.address,
+ vma, &lock_dropped, cc);
/* move to next address */
khugepaged_scan.address += HPAGE_PMD_SIZE;
-
- *result = collapse_scan_pmd(vma, addr, cc, orders);
- /* Nothing to collapse here, and the lock is still ours */
- if (*result != SCAN_SUCCEED) {
- if (cc->progress >= progress_max)
- goto breakouterloop;
- continue;
- }
-
- /*
- * A collapse takes its own locks and is slow enough
- * that a writer should not wait behind it, so give the
- * lock up. That ends this walk: vma and the mm are
- * whatever the collapse leaves them.
- */
- mmap_read_unlock(mm);
- *result = collapse_run_pmd(mm, addr, cc);
- if (*result == SCAN_SUCCEED)
- khugepaged_pages_collapsed++;
- goto breakouterloop_mmap_lock;
+ if (lock_dropped)
+ /*
+ * We released mmap_lock so break loop. Note
+ * that we drop mmap_lock before all hugepage
+ * allocations, so if allocation fails, we are
+ * guaranteed to break here and report the
+ * correct result back to caller.
+ */
+ goto breakouterloop_mmap_lock;
+ if (cc->progress >= progress_max)
+ goto breakouterloop;
}
}
breakouterloop:
@@ -3012,10 +2977,7 @@ static void khugepaged_do_scan(struct collapse_control *cc)
lru_add_drain_all();
- collapse_control_init(cc);
- /* One policy for the whole pass, so every table is judged the same */
- collapse_policy_khugepaged(&cc->policy);
-
+ cc->progress = 0;
while (true) {
cond_resched();
@@ -3046,8 +3008,6 @@ static void khugepaged_do_scan(struct collapse_control *cc)
khugepaged_alloc_sleep();
}
}
-
- collapse_control_release(cc);
}
static bool khugepaged_should_wakeup(void)
@@ -3186,3 +3146,126 @@ bool current_is_khugepaged(void)
{
return kthread_func(current) == khugepaged;
}
+
+static int madvise_collapse_errno(enum scan_result r)
+{
+ /*
+ * MADV_COLLAPSE breaks from existing madvise(2) conventions to provide
+ * actionable feedback to caller, so they may take an appropriate
+ * fallback measure depending on the nature of the failure.
+ */
+ switch (r) {
+ case SCAN_ALLOC_HUGE_PAGE_FAIL:
+ return -ENOMEM;
+ case SCAN_CGROUP_CHARGE_FAIL:
+ case SCAN_EXCEED_NONE_PTE:
+ return -EBUSY;
+ /* Resource temporary unavailable - trying again might succeed */
+ case SCAN_PAGE_COUNT:
+ case SCAN_PAGE_LOCK:
+ case SCAN_PAGE_LRU:
+ case SCAN_DEL_PAGE_LRU:
+ case SCAN_PAGE_FILLED:
+ case SCAN_PAGE_HAS_PRIVATE:
+ case SCAN_PAGE_DIRTY_OR_WRITEBACK:
+ return -EAGAIN;
+ /*
+ * Other: Trying again likely not to succeed / error intrinsic to
+ * specified memory range. khugepaged likely won't be able to collapse
+ * either.
+ */
+ default:
+ return -EINVAL;
+ }
+}
+
+int madvise_collapse(struct vm_area_struct *vma, unsigned long start,
+ unsigned long end, bool *lock_dropped)
+{
+ struct collapse_control *cc;
+ struct mm_struct *mm = vma->vm_mm;
+ unsigned long hstart, hend, addr;
+ enum scan_result last_fail = SCAN_FAIL;
+ int thps = 0;
+ bool mmap_unlocked = false;
+
+ BUG_ON(vma->vm_start > start);
+ BUG_ON(vma->vm_end < end);
+
+ if (!collapse_possible(vma, vma->vm_flags, TVA_FORCED_COLLAPSE))
+ return -EINVAL;
+
+ hstart = ALIGN(start, HPAGE_PMD_SIZE);
+ hend = ALIGN_DOWN(end, HPAGE_PMD_SIZE);
+
+ if (hstart >= hend)
+ return 0;
+
+ cc = kmalloc_obj(*cc);
+ if (!cc)
+ return -ENOMEM;
+ cc->is_khugepaged = false;
+ cc->progress = 0;
+
+ mmgrab(mm);
+ lru_add_drain_all();
+
+ for (addr = hstart; addr < hend; addr += HPAGE_PMD_SIZE) {
+ enum scan_result result = SCAN_FAIL;
+
+ if (mmap_unlocked) {
+ cond_resched();
+ mmap_read_lock(mm);
+ mmap_unlocked = false;
+ *lock_dropped = true;
+ result = hugepage_vma_revalidate(mm, addr, false, &vma,
+ cc, HPAGE_PMD_ORDER);
+ if (result != SCAN_SUCCEED) {
+ last_fail = result;
+ goto out_nolock;
+ }
+
+ hend = min(hend, vma->vm_end & HPAGE_PMD_MASK);
+ }
+
+ result = collapse_single_pmd(addr, vma, &mmap_unlocked, cc);
+
+ switch (result) {
+ case SCAN_SUCCEED:
+ case SCAN_PMD_MAPPED:
+ ++thps;
+ break;
+ /* Whitelisted set of results where continuing OK */
+ case SCAN_NO_PTE_TABLE:
+ case SCAN_PTE_NON_PRESENT:
+ case SCAN_PTE_UFFD:
+ case SCAN_LACK_REFERENCED_PAGE:
+ case SCAN_PAGE_NULL:
+ case SCAN_PAGE_COUNT:
+ case SCAN_PAGE_LOCK:
+ case SCAN_PAGE_COMPOUND:
+ case SCAN_PAGE_LRU:
+ case SCAN_DEL_PAGE_LRU:
+ last_fail = result;
+ break;
+ default:
+ last_fail = result;
+ /* Other error, exit */
+ goto out_maybelock;
+ }
+ }
+
+out_maybelock:
+ /* Caller expects us to hold mmap_lock on return */
+ if (mmap_unlocked) {
+ *lock_dropped = true;
+ mmap_read_lock(mm);
+ }
+out_nolock:
+ mmap_assert_locked(mm);
+ mmdrop(mm);
+ kfree(cc);
+
+ return thps == ((hend - hstart) >> HPAGE_PMD_SHIFT) ? 0
+ : madvise_collapse_errno(last_fail);
+}
diff --git a/mm/ksm.c b/mm/ksm.c
index 624f37975e12..49d48d1e0998 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -348,7 +348,7 @@ static enum ksm_advisor_type ksm_advisor;
* Only called through the sysfs control interface:
*/
-/* Initial number of pages to scan per batch. */
+/* At least scan this many pages per batch. */
static unsigned long ksm_advisor_min_pages_to_scan = 500;
static void set_advisor_defaults(void)
@@ -1115,8 +1115,7 @@ static inline void folio_set_stable_node(struct folio *folio,
struct ksm_stable_node *stable_node)
{
VM_WARN_ON_FOLIO(folio_test_anon(folio) && PageAnonExclusive(&folio->page), folio);
- WRITE_ONCE(folio->mapping,
- (void *)((unsigned long)stable_node | FOLIO_MAPPING_KSM));
+ folio->mapping = (void *)((unsigned long)stable_node | FOLIO_MAPPING_KSM);
}
#ifdef CONFIG_SYSFS
@@ -3317,7 +3316,7 @@ void folio_migrate_ksm(struct folio *newfolio, struct folio *folio)
stable_node = folio_stable_node(folio);
if (stable_node) {
VM_BUG_ON_FOLIO(stable_node->kpfn != folio_pfn(folio), folio);
- WRITE_ONCE(stable_node->kpfn, folio_pfn(newfolio));
+ stable_node->kpfn = folio_pfn(newfolio);
/*
* newfolio->mapping was set in advance; now we need smp_wmb()
* to make sure that the new stable_node->kpfn is visible
diff --git a/mm/list_lru.c b/mm/list_lru.c
index 8a6dd0a489e1..36662d02ff96 100644
--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -666,17 +666,12 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware, struct shrinker *shr
int i;
#ifdef CONFIG_MEMCG
- /*
- * If the shrinker fell back to being non-memcg-aware (e.g. with
- * cgroup.memory=nokmem), its id was never assigned and holds a
- * stale 0. Don't let set_shrinker_bit() act on it.
- */
- if (shrinker && (shrinker->flags & SHRINKER_MEMCG_AWARE))
+ if (shrinker)
lru->shrinker_id = shrinker->id;
else
lru->shrinker_id = -1;
- if (mem_cgroup_disabled() || mem_cgroup_kmem_disabled())
+ if (mem_cgroup_kmem_disabled())
memcg_aware = false;
#endif
diff --git a/mm/madvise.c b/mm/madvise.c
index fbb72ab49aa6..eeee82cf2b3f 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -38,7 +38,6 @@
#include "internal.h"
#include "swap.h"
-#include "collapse.h"
#define __MADV_SET_ANON_VMA_NAME (-1)
@@ -298,12 +297,11 @@ static long madvise_willneed(struct madvise_behavior *madv_behavior)
loff_t offset;
#ifdef CONFIG_SWAP
- if (vma_is_cow_mapping(vma) && vma->anon_vma) {
+ if (!file) {
walk_page_range_vma(vma, start, end, &swapin_walk_ops, vma);
lru_add_drain(); /* Push any new pages onto the LRU now */
- }
- if (!file)
return 0;
+ }
if (shmem_mapping(file->f_mapping)) {
shmem_swapin_range(vma, start, end, file->f_mapping);
@@ -395,18 +393,16 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
return 0;
orig_pmd = *pmd;
+ if (is_huge_zero_pmd(orig_pmd))
+ goto huge_unlock;
+
if (unlikely(!pmd_present(orig_pmd))) {
VM_WARN_ON_ONCE(!pmd_is_migration_entry(orig_pmd) &&
!pmd_is_device_private_entry(orig_pmd));
goto huge_unlock;
}
- folio = vm_normal_folio_pmd(vma, addr, orig_pmd);
- if (!folio)
- goto huge_unlock;
-
- if (folio_is_zone_device(folio))
- goto huge_unlock;
+ folio = pmd_folio(orig_pmd);
/* Do not interfere with other mappings of this folio */
if (folio_maybe_mapped_shared(folio))
@@ -906,171 +902,6 @@ bool madvise_dontneed_free_valid_vma(struct madvise_behavior *madv_behavior)
return true;
}
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
-
-/* MADV_COLLAPSE was asked for explicitly, so it is not held to those */
-static void collapse_policy_forced(struct collapse_policy *p)
-{
- p->max_ptes_none = HPAGE_PMD_NR;
- p->max_ptes_swap = HPAGE_PMD_NR;
- p->max_ptes_shared = HPAGE_PMD_NR;
- p->strict_sub_pmd = false;
- p->skip_lazyfree = false;
- p->require_referenced = false;
- p->install_pmd = true;
- p->writeback_dirty = true;
- p->gfp = GFP_TRANSHUGE;
- p->tva_type = TVA_FORCED_COLLAPSE;
-}
-
-static int madvise_collapse_errno(enum scan_result r)
-{
- /*
- * MADV_COLLAPSE breaks from existing madvise(2) conventions to provide
- * actionable feedback to caller, so they may take an appropriate
- * fallback measure depending on the nature of the failure.
- */
- switch (r) {
- case SCAN_ALLOC_HUGE_PAGE_FAIL:
- return -ENOMEM;
- case SCAN_CGROUP_CHARGE_FAIL:
- case SCAN_EXCEED_NONE_PTE:
- return -EBUSY;
- /* Resource temporary unavailable - trying again might succeed */
- case SCAN_PAGE_COUNT:
- case SCAN_PAGE_LOCK:
- case SCAN_PAGE_LRU:
- case SCAN_DEL_PAGE_LRU:
- case SCAN_PAGE_FILLED:
- case SCAN_PAGE_HAS_PRIVATE:
- case SCAN_PAGE_DIRTY_OR_WRITEBACK:
- return -EAGAIN;
- /*
- * Other: Trying again likely not to succeed / error intrinsic to
- * specified memory range. khugepaged likely won't be able to collapse
- * either.
- */
- default:
- return -EINVAL;
- }
-}
-
-static int madvise_collapse(struct madvise_behavior *madv_behavior)
-{
- struct madvise_behavior_range *range = &madv_behavior->range;
- struct vm_area_struct *vma = madv_behavior->vma;
- struct mm_struct *mm = madv_behavior->mm;
- struct collapse_control *cc;
- unsigned long hstart, hend, addr, orders;
- enum scan_result last_fail = SCAN_FAIL;
- int thps = 0;
-
- BUG_ON(vma->vm_start > range->start);
- BUG_ON(vma->vm_end < range->end);
-
- orders = collapse_possible_orders(vma, vma->vm_flags,
- TVA_FORCED_COLLAPSE);
- if (!orders)
- return -EINVAL;
-
- hstart = ALIGN(range->start, HPAGE_PMD_SIZE);
- hend = ALIGN_DOWN(range->end, HPAGE_PMD_SIZE);
-
- if (hstart >= hend)
- return 0;
-
- cc = kmalloc_obj(*cc);
- if (!cc)
- return -ENOMEM;
- collapse_control_init(cc);
- collapse_policy_forced(&cc->policy);
-
- lru_add_drain_all();
-
- for (addr = hstart; addr < hend; addr += HPAGE_PMD_SIZE) {
- struct vm_area_struct *found;
- enum scan_result result;
-
- /*
- * A collapse gives the lock up, so the VMA has to be found
- * again after one: it can shrink while nothing is held. A scan
- * that finds nothing to collapse leaves the lock alone, so a
- * range that is already collapsed walks on without relocking.
- */
- if (!vma) {
- cond_resched();
- mmap_read_lock(mm);
- result = collapse_vma_revalidate(mm, addr, false, &found,
- cc, HPAGE_PMD_ORDER);
- if (result != SCAN_SUCCEED) {
- last_fail = result;
- goto out_locked;
- }
- vma = found;
- hend = min(hend, vma->vm_end & HPAGE_PMD_MASK);
- orders = collapse_possible_orders(vma, vma->vm_flags,
- cc->policy.tva_type);
- }
-
- result = collapse_scan_pmd(vma, addr, cc, orders);
- /* Nothing to collapse here, and the lock is still ours */
- if (result != SCAN_SUCCEED)
- goto tally;
-
- /* The collapse takes its own locks, so give this up */
- mmap_read_unlock(mm);
- mark_mmap_lock_dropped(madv_behavior);
- vma = NULL;
-
- result = collapse_run_pmd(mm, addr, cc);
-tally:
- switch (result) {
- case SCAN_SUCCEED:
- case SCAN_PMD_MAPPED:
- ++thps;
- break;
- /* Whitelisted set of results where continuing OK */
- case SCAN_NO_PTE_TABLE:
- case SCAN_PTE_NON_PRESENT:
- case SCAN_PTE_UFFD:
- case SCAN_LACK_REFERENCED_PAGE:
- case SCAN_PAGE_NULL:
- case SCAN_PAGE_COUNT:
- case SCAN_PAGE_LOCK:
- case SCAN_PAGE_COMPOUND:
- case SCAN_PAGE_LRU:
- case SCAN_DEL_PAGE_LRU:
- last_fail = result;
- break;
- default:
- last_fail = result;
- /* Other error, exit */
- goto out;
- }
- }
-
-out:
- /* Caller expects us to hold mmap_lock on return */
- if (!vma)
- mmap_read_lock(mm);
-out_locked:
- mmap_assert_locked(mm);
- collapse_control_release(cc);
- kfree(cc);
-
- return thps == ((hend - hstart) >> HPAGE_PMD_SHIFT) ? 0
- : madvise_collapse_errno(last_fail);
-}
-
-#else /* CONFIG_TRANSPARENT_HUGEPAGE */
-
-static int madvise_collapse(struct madvise_behavior *madv_behavior)
-{
- return -EINVAL;
-}
-
-#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
-
static long madvise_dontneed_free(struct madvise_behavior *madv_behavior)
{
struct mm_struct *mm = madv_behavior->mm;
@@ -1538,7 +1369,8 @@ static int madvise_vma_behavior(struct madvise_behavior *madv_behavior)
case MADV_DONTNEED_LOCKED:
return madvise_dontneed_free(madv_behavior);
case MADV_COLLAPSE:
- return madvise_collapse(madv_behavior);
+ return madvise_collapse(vma, range->start, range->end,
+ &madv_behavior->lock_dropped);
case MADV_GUARD_INSTALL:
return madvise_guard_install(madv_behavior);
case MADV_GUARD_REMOVE:
diff --git a/mm/memblock.c b/mm/memblock.c
index 22d14a637f24..e6fdf95a0534 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -2465,6 +2465,8 @@ static unsigned long __init free_low_memory_core_early(void)
return count;
}
+static int reset_managed_pages_done __initdata;
+
static void __init reset_node_managed_pages(pg_data_t *pgdat)
{
struct zone *z;
@@ -2473,12 +2475,17 @@ static void __init reset_node_managed_pages(pg_data_t *pgdat)
atomic_long_set(&z->managed_pages, 0);
}
-static void __init reset_all_zones_managed_pages(void)
+void __init reset_all_zones_managed_pages(void)
{
struct pglist_data *pgdat;
+ if (reset_managed_pages_done)
+ return;
+
for_each_online_pgdat(pgdat)
reset_node_managed_pages(pgdat);
+
+ reset_managed_pages_done = 1;
}
/**
@@ -2693,10 +2700,15 @@ err_report:
static int __init reserve_mem_init(void)
{
+ int err;
+
if (!kho_is_enabled() || !reserved_mem_count)
return 0;
- return prepare_kho_fdt();
+ err = prepare_kho_fdt();
+ if (err)
+ return err;
+ return err;
}
late_initcall(reserve_mem_init);
@@ -2816,17 +2828,12 @@ static int __init reserve_mem(char *p)
if (*p != ':')
goto err_param;
- if (!IS_ALIGNED(size, PAGE_SIZE) || !IS_ALIGNED(align, PAGE_SIZE)) {
- pr_err("reserve_mem: size and align must be multiples of the page size\n");
- return -EINVAL;
- }
-
/*
* memblock_phys_alloc() doesn't like a zero size align,
* but it is OK for this command to have it.
*/
- if (!align)
- align = PAGE_SIZE;
+ if (align < SMP_CACHE_BYTES)
+ align = SMP_CACHE_BYTES;
name = p + 1;
len = strlen(name);
@@ -2879,6 +2886,7 @@ static const char * const flagname[] = {
[ilog2(MEMBLOCK_RSRV_NOINIT)] = "RSV_NIT",
[ilog2(MEMBLOCK_RSRV_KERN)] = "RSV_KERN",
[ilog2(MEMBLOCK_KHO_SCRATCH)] = "KHO_SCRATCH",
+ [ilog2(MEMBLOCK_RSRV_HUGETLB)] = "RSV_HUGETLB",
};
static int memblock_debug_show(struct seq_file *m, void *private)
diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index bf2c7d53b01b..05ef55cae4dc 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -17,6 +17,30 @@
#include "swap_table.h"
#include "memcontrol-v1.h"
+/*
+ * Cgroups above their limits are maintained in a RB-Tree, independent of
+ * their hierarchy representation
+ */
+
+struct mem_cgroup_tree_per_node {
+ struct rb_root rb_root;
+ struct rb_node *rb_rightmost;
+ spinlock_t lock;
+};
+
+struct mem_cgroup_tree {
+ struct mem_cgroup_tree_per_node *rb_tree_per_node[MAX_NUMNODES];
+};
+
+static struct mem_cgroup_tree soft_limit_tree __read_mostly;
+
+/*
+ * Maximum loops in mem_cgroup_soft_reclaim(), used for soft
+ * limit reclaim to prevent infinite loops, if they ever occur.
+ */
+#define MEM_CGROUP_MAX_RECLAIM_LOOPS 100
+#define MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS 2
+
/* for OOM */
struct mem_cgroup_eventfd_list {
struct list_head list;
@@ -82,6 +106,301 @@ static struct lockdep_map memcg_oom_lock_dep_map = {
DEFINE_SPINLOCK(memcg_oom_lock);
+static void __mem_cgroup_insert_exceeded(struct mem_cgroup_per_node *mz,
+ struct mem_cgroup_tree_per_node *mctz,
+ unsigned long new_usage_in_excess)
+{
+ struct rb_node **p = &mctz->rb_root.rb_node;
+ struct rb_node *parent = NULL;
+ struct mem_cgroup_per_node *mz_node;
+ bool rightmost = true;
+
+ if (mz->on_tree)
+ return;
+
+ mz->usage_in_excess = new_usage_in_excess;
+ if (!mz->usage_in_excess)
+ return;
+ while (*p) {
+ parent = *p;
+ mz_node = rb_entry(parent, struct mem_cgroup_per_node,
+ tree_node);
+ if (mz->usage_in_excess < mz_node->usage_in_excess) {
+ p = &(*p)->rb_left;
+ rightmost = false;
+ } else {
+ p = &(*p)->rb_right;
+ }
+ }
+
+ if (rightmost)
+ mctz->rb_rightmost = &mz->tree_node;
+
+ rb_link_node(&mz->tree_node, parent, p);
+ rb_insert_color(&mz->tree_node, &mctz->rb_root);
+ mz->on_tree = true;
+}
+
+static void __mem_cgroup_remove_exceeded(struct mem_cgroup_per_node *mz,
+ struct mem_cgroup_tree_per_node *mctz)
+{
+ if (!mz->on_tree)
+ return;
+
+ if (&mz->tree_node == mctz->rb_rightmost)
+ mctz->rb_rightmost = rb_prev(&mz->tree_node);
+
+ rb_erase(&mz->tree_node, &mctz->rb_root);
+ mz->on_tree = false;
+}
+
+static void mem_cgroup_remove_exceeded(struct mem_cgroup_per_node *mz,
+ struct mem_cgroup_tree_per_node *mctz)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&mctz->lock, flags);
+ __mem_cgroup_remove_exceeded(mz, mctz);
+ spin_unlock_irqrestore(&mctz->lock, flags);
+}
+
+static unsigned long soft_limit_excess(struct mem_cgroup *memcg)
+{
+ unsigned long nr_pages = page_counter_read(&memcg->memory);
+ unsigned long soft_limit = READ_ONCE(memcg->soft_limit);
+ unsigned long excess = 0;
+
+ if (nr_pages > soft_limit)
+ excess = nr_pages - soft_limit;
+
+ return excess;
+}
+
+static void memcg1_update_tree(struct mem_cgroup *memcg, int nid)
+{
+ unsigned long excess;
+ struct mem_cgroup_per_node *mz;
+ struct mem_cgroup_tree_per_node *mctz;
+
+ if (lru_gen_enabled()) {
+ if (soft_limit_excess(memcg))
+ lru_gen_soft_reclaim(memcg, nid);
+ return;
+ }
+
+ mctz = soft_limit_tree.rb_tree_per_node[nid];
+ if (!mctz)
+ return;
+ /*
+ * Necessary to update all ancestors when hierarchy is used.
+ * because their event counter is not touched.
+ */
+ for (; memcg; memcg = parent_mem_cgroup(memcg)) {
+ mz = memcg->nodeinfo[nid];
+ excess = soft_limit_excess(memcg);
+ /*
+ * We have to update the tree if mz is on RB-tree or
+ * mem is over its softlimit.
+ */
+ if (excess || mz->on_tree) {
+ unsigned long flags;
+
+ spin_lock_irqsave(&mctz->lock, flags);
+ /* if on-tree, remove it */
+ if (mz->on_tree)
+ __mem_cgroup_remove_exceeded(mz, mctz);
+ /*
+ * Insert again. mz->usage_in_excess will be updated.
+ * If excess is 0, no tree ops.
+ */
+ __mem_cgroup_insert_exceeded(mz, mctz, excess);
+ spin_unlock_irqrestore(&mctz->lock, flags);
+ }
+ }
+}
+
+void memcg1_remove_from_trees(struct mem_cgroup *memcg)
+{
+ struct mem_cgroup_tree_per_node *mctz;
+ struct mem_cgroup_per_node *mz;
+ int nid;
+
+ for_each_node(nid) {
+ mz = memcg->nodeinfo[nid];
+ mctz = soft_limit_tree.rb_tree_per_node[nid];
+ if (mctz)
+ mem_cgroup_remove_exceeded(mz, mctz);
+ }
+}
+
+static struct mem_cgroup_per_node *
+__mem_cgroup_largest_soft_limit_node(struct mem_cgroup_tree_per_node *mctz)
+{
+ struct mem_cgroup_per_node *mz;
+
+retry:
+ mz = NULL;
+ if (!mctz->rb_rightmost)
+ goto done; /* Nothing to reclaim from */
+
+ mz = rb_entry(mctz->rb_rightmost,
+ struct mem_cgroup_per_node, tree_node);
+ /*
+ * Remove the node now but someone else can add it back,
+ * we will to add it back at the end of reclaim to its correct
+ * position in the tree.
+ */
+ __mem_cgroup_remove_exceeded(mz, mctz);
+ if (!soft_limit_excess(mz->memcg) ||
+ !css_tryget(&mz->memcg->css))
+ goto retry;
+done:
+ return mz;
+}
+
+static struct mem_cgroup_per_node *
+mem_cgroup_largest_soft_limit_node(struct mem_cgroup_tree_per_node *mctz)
+{
+ struct mem_cgroup_per_node *mz;
+
+ spin_lock_irq(&mctz->lock);
+ mz = __mem_cgroup_largest_soft_limit_node(mctz);
+ spin_unlock_irq(&mctz->lock);
+ return mz;
+}
+
+static int mem_cgroup_soft_reclaim(struct mem_cgroup *root_memcg,
+ pg_data_t *pgdat,
+ gfp_t gfp_mask,
+ unsigned long *total_scanned)
+{
+ struct mem_cgroup *victim = NULL;
+ int total = 0;
+ int loop = 0;
+ unsigned long excess;
+ unsigned long nr_scanned;
+ struct mem_cgroup_reclaim_cookie reclaim = {
+ .pgdat = pgdat,
+ };
+
+ excess = soft_limit_excess(root_memcg);
+
+ while (1) {
+ victim = mem_cgroup_iter(root_memcg, victim, &reclaim);
+ if (!victim) {
+ loop++;
+ if (loop >= 2) {
+ /*
+ * If we have not been able to reclaim
+ * anything, it might because there are
+ * no reclaimable pages under this hierarchy
+ */
+ if (!total)
+ break;
+ /*
+ * We want to do more targeted reclaim.
+ * excess >> 2 is not to excessive so as to
+ * reclaim too much, nor too less that we keep
+ * coming back to reclaim from this cgroup
+ */
+ if (total >= (excess >> 2) ||
+ (loop > MEM_CGROUP_MAX_RECLAIM_LOOPS))
+ break;
+ }
+ continue;
+ }
+ total += mem_cgroup_shrink_node(victim, gfp_mask, false,
+ pgdat, &nr_scanned);
+ *total_scanned += nr_scanned;
+ if (!soft_limit_excess(root_memcg))
+ break;
+ }
+ mem_cgroup_iter_break(root_memcg, victim);
+ return total;
+}
+
+unsigned long memcg1_soft_limit_reclaim(pg_data_t *pgdat, int order,
+ gfp_t gfp_mask,
+ unsigned long *total_scanned)
+{
+ unsigned long nr_reclaimed = 0;
+ struct mem_cgroup_per_node *mz, *next_mz = NULL;
+ unsigned long reclaimed;
+ int loop = 0;
+ struct mem_cgroup_tree_per_node *mctz;
+ unsigned long excess;
+
+ if (lru_gen_enabled())
+ return 0;
+
+ if (order > 0)
+ return 0;
+
+ mctz = soft_limit_tree.rb_tree_per_node[pgdat->node_id];
+
+ /*
+ * Do not even bother to check the largest node if the root
+ * is empty. Do it lockless to prevent lock bouncing. Races
+ * are acceptable as soft limit is best effort anyway.
+ */
+ if (!mctz || RB_EMPTY_ROOT(&mctz->rb_root))
+ return 0;
+
+ /*
+ * This loop can run a while, specially if mem_cgroup's continuously
+ * keep exceeding their soft limit and putting the system under
+ * pressure
+ */
+ do {
+ if (next_mz)
+ mz = next_mz;
+ else
+ mz = mem_cgroup_largest_soft_limit_node(mctz);
+ if (!mz)
+ break;
+
+ reclaimed = mem_cgroup_soft_reclaim(mz->memcg, pgdat,
+ gfp_mask, total_scanned);
+ nr_reclaimed += reclaimed;
+ spin_lock_irq(&mctz->lock);
+
+ /*
+ * If we failed to reclaim anything from this memory cgroup
+ * it is time to move on to the next cgroup
+ */
+ next_mz = NULL;
+ if (!reclaimed)
+ next_mz = __mem_cgroup_largest_soft_limit_node(mctz);
+
+ excess = soft_limit_excess(mz->memcg);
+ /*
+ * One school of thought says that we should not add
+ * back the node to the tree if reclaim returns 0.
+ * But our reclaim could return 0, simply because due
+ * to priority we are exposing a smaller subset of
+ * memory to reclaim from. Consider this as a longer
+ * term TODO.
+ */
+ /* If excess == 0, no tree ops */
+ __mem_cgroup_insert_exceeded(mz, mctz, excess);
+ spin_unlock_irq(&mctz->lock);
+ css_put(&mz->memcg->css);
+ loop++;
+ /*
+ * Could not reclaim anything and there are no more
+ * mem cgroups to try or we seem to be looping without
+ * reclaiming anything.
+ */
+ if (!nr_reclaimed &&
+ (next_mz == NULL ||
+ loop > MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS))
+ break;
+ } while (!nr_reclaimed);
+ if (next_mz)
+ css_put(&next_mz->memcg->css);
+ return nr_reclaimed;
+}
+
static u64 mem_cgroup_move_charge_read(struct cgroup_subsys_state *css,
struct cftype *cft)
{
@@ -192,7 +511,7 @@ static void mem_cgroup_threshold(struct mem_cgroup *memcg)
}
}
-/* Cgroup1: threshold notifications */
+/* Cgroup1: threshold notifications & softlimit tree updates */
/*
* Per memcg event counter is incremented at every pagein/pageout. With THP,
@@ -200,9 +519,15 @@ static void mem_cgroup_threshold(struct mem_cgroup *memcg)
* to trigger some periodic events. This is straightforward and better
* than using jiffies etc. to handle periodic memcg event.
*/
+enum mem_cgroup_events_target {
+ MEM_CGROUP_TARGET_THRESH,
+ MEM_CGROUP_TARGET_SOFTLIMIT,
+ MEM_CGROUP_NTARGETS,
+};
+
struct memcg1_events_percpu {
unsigned long nr_page_events;
- unsigned long threshold_target;
+ unsigned long targets[MEM_CGROUP_NTARGETS];
};
static void memcg1_charge_statistics(struct mem_cgroup *memcg, int nr_pages)
@@ -219,29 +544,53 @@ static void memcg1_charge_statistics(struct mem_cgroup *memcg, int nr_pages)
}
#define THRESHOLDS_EVENTS_TARGET 128
+#define SOFTLIMIT_EVENTS_TARGET 1024
-static bool memcg1_event_ratelimit(struct mem_cgroup *memcg)
+static bool memcg1_event_ratelimit(struct mem_cgroup *memcg,
+ enum mem_cgroup_events_target target)
{
unsigned long val, next;
val = __this_cpu_read(memcg->events_percpu->nr_page_events);
- next = __this_cpu_read(memcg->events_percpu->threshold_target);
+ next = __this_cpu_read(memcg->events_percpu->targets[target]);
/* from time_after() in jiffies.h */
if ((long)(next - val) < 0) {
- __this_cpu_write(memcg->events_percpu->threshold_target,
- val + THRESHOLDS_EVENTS_TARGET);
+ switch (target) {
+ case MEM_CGROUP_TARGET_THRESH:
+ next = val + THRESHOLDS_EVENTS_TARGET;
+ break;
+ case MEM_CGROUP_TARGET_SOFTLIMIT:
+ next = val + SOFTLIMIT_EVENTS_TARGET;
+ break;
+ default:
+ break;
+ }
+ __this_cpu_write(memcg->events_percpu->targets[target], next);
return true;
}
return false;
}
-static void memcg1_check_events(struct mem_cgroup *memcg)
+/*
+ * Check events in order.
+ *
+ */
+static void memcg1_check_events(struct mem_cgroup *memcg, int nid)
{
if (IS_ENABLED(CONFIG_PREEMPT_RT))
return;
- if (unlikely(memcg1_event_ratelimit(memcg)))
+ /* threshold event is triggered in finer grain than soft limit */
+ if (unlikely(memcg1_event_ratelimit(memcg,
+ MEM_CGROUP_TARGET_THRESH))) {
+ bool do_softlimit;
+
+ do_softlimit = memcg1_event_ratelimit(memcg,
+ MEM_CGROUP_TARGET_SOFTLIMIT);
mem_cgroup_threshold(memcg);
+ if (unlikely(do_softlimit))
+ memcg1_update_tree(memcg, nid);
+ }
}
void memcg1_commit_charge(struct folio *folio, struct mem_cgroup *memcg)
@@ -250,7 +599,7 @@ void memcg1_commit_charge(struct folio *folio, struct mem_cgroup *memcg)
local_irq_save(flags);
memcg1_charge_statistics(memcg, folio_nr_pages(folio));
- memcg1_check_events(memcg);
+ memcg1_check_events(memcg, folio_nid(folio));
local_irq_restore(flags);
}
@@ -323,7 +672,7 @@ void __memcg1_swapout(struct folio *folio, struct swap_cluster_info *ci)
VM_WARN_ON_IRQS_ENABLED();
memcg1_charge_statistics(memcg, -folio_nr_pages(folio));
preempt_enable_nested();
- memcg1_check_events(memcg);
+ memcg1_check_events(memcg, folio_nid(folio));
rcu_read_unlock();
obj_cgroup_put(objcg);
@@ -377,14 +726,14 @@ void memcg1_swapin(struct folio *folio)
#endif
void memcg1_uncharge_batch(struct mem_cgroup *memcg, unsigned long pgpgout,
- unsigned long nr_memory)
+ unsigned long nr_memory, int nid)
{
unsigned long flags;
local_irq_save(flags);
count_memcg_events(memcg, PGPGOUT, pgpgout);
__this_cpu_add(memcg->events_percpu->nr_page_events, nr_memory);
- memcg1_check_events(memcg);
+ memcg1_check_events(memcg, nid);
local_irq_restore(flags);
}
@@ -2217,3 +2566,22 @@ void memcg1_free_events(struct mem_cgroup *memcg)
{
free_percpu(memcg->events_percpu);
}
+
+static int __init memcg1_init(void)
+{
+ int node;
+
+ for_each_node(node) {
+ struct mem_cgroup_tree_per_node *rtpn;
+
+ rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, node);
+
+ rtpn->rb_root = RB_ROOT;
+ rtpn->rb_rightmost = NULL;
+ spin_lock_init(&rtpn->lock);
+ soft_limit_tree.rb_tree_per_node[node] = rtpn;
+ }
+
+ return 0;
+}
+subsys_initcall(memcg1_init);
diff --git a/mm/memcontrol-v1.h b/mm/memcontrol-v1.h
index b9a21f0fd2c3..1e394269c613 100644
--- a/mm/memcontrol-v1.h
+++ b/mm/memcontrol-v1.h
@@ -41,6 +41,12 @@ bool memcg1_alloc_events(struct mem_cgroup *memcg);
void memcg1_free_events(struct mem_cgroup *memcg);
void memcg1_memcg_init(struct mem_cgroup *memcg);
+void memcg1_remove_from_trees(struct mem_cgroup *memcg);
+
+static inline void memcg1_soft_limit_reset(struct mem_cgroup *memcg)
+{
+ WRITE_ONCE(memcg->soft_limit, PAGE_COUNTER_MAX);
+}
struct cgroup_taskset;
void memcg1_css_offline(struct mem_cgroup *memcg);
@@ -59,7 +65,7 @@ void memcg1_oom_recover(struct mem_cgroup *memcg);
void memcg1_commit_charge(struct folio *folio, struct mem_cgroup *memcg);
void memcg1_uncharge_batch(struct mem_cgroup *memcg, unsigned long pgpgout,
- unsigned long nr_memory);
+ unsigned long nr_memory, int nid);
void memcg1_stat_format(struct mem_cgroup *memcg, struct seq_buf *s);
void reparent_memcg1_state_local(struct mem_cgroup *memcg, struct mem_cgroup *parent);
@@ -92,6 +98,8 @@ static inline bool memcg1_alloc_events(struct mem_cgroup *memcg) { return true;
static inline void memcg1_free_events(struct mem_cgroup *memcg) {}
static inline void memcg1_memcg_init(struct mem_cgroup *memcg) {}
+static inline void memcg1_remove_from_trees(struct mem_cgroup *memcg) {}
+static inline void memcg1_soft_limit_reset(struct mem_cgroup *memcg) {}
static inline void memcg1_css_offline(struct mem_cgroup *memcg) {}
static inline bool memcg1_oom_prepare(struct mem_cgroup *memcg, bool *locked)
@@ -107,7 +115,7 @@ static inline void memcg1_commit_charge(struct folio *folio,
static inline void memcg1_uncharge_batch(struct mem_cgroup *memcg,
unsigned long pgpgout,
- unsigned long nr_memory) {}
+ unsigned long nr_memory, int nid) {}
static inline void memcg1_stat_format(struct mem_cgroup *memcg, struct seq_buf *s) {}
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 1460cba53588..856a7d07586c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -62,7 +62,6 @@
#include <linux/seq_buf.h>
#include <linux/sched/isolation.h>
#include <linux/kmemleak.h>
-#include <linux/irq_work.h>
#include "internal.h"
#include "swap.h"
#include "swap_table.h"
@@ -676,11 +675,9 @@ struct memcg_vmstats {
long state[MEMCG_VMSTAT_SIZE];
unsigned long events[NR_MEMCG_EVENTS];
-#ifdef CONFIG_MEMCG_V1
/* Non-hierarchical (CPU aggregated) page state & events */
long state_local[MEMCG_VMSTAT_SIZE];
unsigned long events_local[NR_MEMCG_EVENTS];
-#endif
/* Pending child counts during tree propagation */
long state_pending[MEMCG_VMSTAT_SIZE];
@@ -691,31 +688,6 @@ struct memcg_vmstats {
};
/*
- * The non-hierarchical memcg-wide counters are read back only by the legacy
- * memory.stat and memory.numa_stat, and by reparenting on offline, all of which
- * are v1-only. If the kernel is built without CONFIG_MEMCG_V1, or if the boot
- * param cgroup_no_v1= has blocked the memory controller from v1 hierarchies,
- * then nothing reads them and writers can skip the updates.
- */
-static long *memcg_state_local_array(struct mem_cgroup *memcg)
-{
-#ifdef CONFIG_MEMCG_V1
- if (!cgroup1_ssid_disabled(memory_cgrp_id))
- return memcg->vmstats->state_local;
-#endif
- return NULL;
-}
-
-static unsigned long *memcg_events_local_array(struct mem_cgroup *memcg)
-{
-#ifdef CONFIG_MEMCG_V1
- if (!cgroup1_ssid_disabled(memory_cgrp_id))
- return memcg->vmstats->events_local;
-#endif
- return NULL;
-}
-
-/*
* memcg and lruvec stats flushing
*
* Many codepaths leading to stats update or read are performance sensitive and
@@ -785,7 +757,7 @@ static void __mem_cgroup_flush_stats(struct mem_cgroup *memcg, bool force)
return;
if (mem_cgroup_is_root(memcg))
- WRITE_ONCE(flush_last_time, get_jiffies_64());
+ WRITE_ONCE(flush_last_time, jiffies_64);
css_rstat_flush(&memcg->css);
}
@@ -813,7 +785,7 @@ void mem_cgroup_flush_stats(struct mem_cgroup *memcg)
void mem_cgroup_flush_stats_ratelimited(struct mem_cgroup *memcg)
{
/* Only flush if the periodic flusher is one full cycle late */
- if (time_after64(get_jiffies_64(), READ_ONCE(flush_last_time) + 2 * FLUSH_TIME))
+ if (time_after64(jiffies_64, READ_ONCE(flush_last_time) + 2*FLUSH_TIME))
mem_cgroup_flush_stats(memcg);
}
@@ -873,21 +845,16 @@ static long memcg_state_val_in_pages(int idx, long val)
return val < 0 ? -res : res;
}
+#ifdef CONFIG_MEMCG_V1
/*
- * Used in mod_memcg_state() and mod_memcg_lruvec_state() to avoid race
- * with reparenting of non-hierarchical state_locals. Offlining a
- * memcg is rare, so do the redirection for all cgroup hierarchies.
+ * Used in mod_memcg_state() and mod_memcg_lruvec_state() to avoid race with
+ * reparenting of non-hierarchical state_locals.
*/
-static inline struct mem_cgroup *
-get_non_dying_memcg_start(struct mem_cgroup *memcg, bool *rcu_locked)
+static inline struct mem_cgroup *get_non_dying_memcg_start(struct mem_cgroup *memcg,
+ bool *rcu_locked)
{
- /*
- * Fast path: the caller holds a reference to @memcg, so reading
- * its CSS_DYING flag without the RCU lock is safe. The RCU lock
- * is only needed to walk up to a non-dying ancestor, which
- * happens only while a memcg is actually being offlined.
- */
- if (!memcg_is_dying(memcg)) {
+ /* Rebinding can cause this value to be changed at runtime */
+ if (cgroup_subsys_on_dfl(memory_cgrp_subsys)) {
*rcu_locked = false;
return memcg;
}
@@ -908,6 +875,17 @@ static inline void get_non_dying_memcg_end(bool rcu_locked)
rcu_read_unlock();
}
+#else
+static inline struct mem_cgroup *get_non_dying_memcg_start(struct mem_cgroup *memcg,
+ bool *rcu_locked)
+{
+ return memcg;
+}
+
+static inline void get_non_dying_memcg_end(bool rcu_locked)
+{
+}
+#endif
static void __mod_memcg_state(struct mem_cgroup *memcg,
enum memcg_stat_item idx, long val)
@@ -1551,12 +1529,28 @@ void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru,
int zid, long nr_pages)
{
struct mem_cgroup_per_node *mz;
+ unsigned long *lru_size;
+ long size;
if (mem_cgroup_disabled())
return;
mz = container_of(lruvec, struct mem_cgroup_per_node, lruvec);
- mz->lru_zone_size[zid][lru] += nr_pages;
+ lru_size = &mz->lru_zone_size[zid][lru];
+
+ if (nr_pages < 0)
+ *lru_size += nr_pages;
+
+ size = *lru_size;
+ if (WARN_ONCE(size < 0,
+ "%s(%p, %d, %ld): lru_size %ld\n",
+ __func__, lruvec, lru, nr_pages, size)) {
+ VM_BUG_ON(1);
+ *lru_size = 0;
+ }
+
+ if (nr_pages > 0)
+ *lru_size += nr_pages;
}
/**
@@ -2054,15 +2048,6 @@ void mem_cgroup_print_oom_group(struct mem_cgroup *memcg)
* nr_pages in a single cacheline. This may change in future.
*/
#define NR_MEMCG_STOCK 7
-
-/*
- * Watermarks for a charge stock slot, in the spirit of pcp->high and
- * pcp->batch: MEMCG_STOCK_HIGH is the high watermark at which a slot is
- * trimmed, and it is trimmed down to MEMCG_STOCK_LOW rather than emptied.
- */
-#define MEMCG_STOCK_LOW (MEMCG_CHARGE_BATCH / 2)
-#define MEMCG_STOCK_HIGH (MEMCG_CHARGE_BATCH)
-
#define FLUSHING_CACHED_CHARGE 0
struct memcg_stock_pcp {
local_trylock_t lock;
@@ -2243,18 +2228,17 @@ static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
{
struct memcg_stock_pcp *stock;
struct mem_cgroup *cached;
- unsigned int stock_pages;
+ uint8_t stock_pages;
bool success = false;
int empty_slot = -1;
int i;
/*
- * nr_pages[] is a uint8_t and a slot's count is capped at
- * MEMCG_STOCK_HIGH. Raising MEMCG_CHARGE_BATCH beyond 127 would need
- * more careful handling of nr_pages[] in struct memcg_stock_pcp.
+ * For now limit MEMCG_CHARGE_BATCH to 127 and less. In future if we
+ * decide to increase it more than 127 then we will need more careful
+ * handling of nr_pages[] in struct memcg_stock_pcp.
*/
BUILD_BUG_ON(MEMCG_CHARGE_BATCH > S8_MAX);
- BUILD_BUG_ON(MEMCG_STOCK_HIGH > U8_MAX);
VM_WARN_ON_ONCE(mem_cgroup_is_root(memcg));
@@ -2275,12 +2259,9 @@ static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
empty_slot = i;
if (memcg == READ_ONCE(stock->cached[i])) {
stock_pages = READ_ONCE(stock->nr_pages[i]) + nr_pages;
- if (stock_pages > MEMCG_STOCK_HIGH) {
- memcg_uncharge(memcg,
- stock_pages - MEMCG_STOCK_LOW);
- stock_pages = MEMCG_STOCK_LOW;
- }
WRITE_ONCE(stock->nr_pages[i], stock_pages);
+ if (stock_pages > MEMCG_CHARGE_BATCH)
+ drain_stock(stock, i);
success = true;
break;
}
@@ -2325,7 +2306,7 @@ static bool is_memcg_drain_needed(struct memcg_stock_pcp *stock,
return flush;
}
-static bool schedule_drain_work(int cpu, struct work_struct *work)
+static void schedule_drain_work(int cpu, struct work_struct *work)
{
/*
* Protect housekeeping cpumask read and work enqueue together
@@ -2334,11 +2315,8 @@ static bool schedule_drain_work(int cpu, struct work_struct *work)
* pending work on newly isolated CPUs.
*/
guard(rcu)();
- if (cpu_is_isolated(cpu))
- return false;
-
- queue_work_on(cpu, memcg_wq, work);
- return true;
+ if (!cpu_is_isolated(cpu))
+ queue_work_on(cpu, memcg_wq, work);
}
/*
@@ -2370,9 +2348,8 @@ void drain_all_stock(struct mem_cgroup *root_memcg)
&memcg_st->flags)) {
if (cpu == curcpu)
drain_local_memcg_stock(&memcg_st->work);
- else if (!schedule_drain_work(cpu, &memcg_st->work))
- clear_bit(FLUSHING_CACHED_CHARGE,
- &memcg_st->flags);
+ else
+ schedule_drain_work(cpu, &memcg_st->work);
}
if (!test_bit(FLUSHING_CACHED_CHARGE, &obj_st->flags) &&
@@ -2381,9 +2358,8 @@ void drain_all_stock(struct mem_cgroup *root_memcg)
&obj_st->flags)) {
if (cpu == curcpu)
drain_local_obj_stock(&obj_st->work);
- else if (!schedule_drain_work(cpu, &obj_st->work))
- clear_bit(FLUSHING_CACHED_CHARGE,
- &obj_st->flags);
+ else
+ schedule_drain_work(cpu, &obj_st->work);
}
}
migrate_enable();
@@ -2392,21 +2368,9 @@ void drain_all_stock(struct mem_cgroup *root_memcg)
static int memcg_hotplug_cpu_dead(unsigned int cpu)
{
- struct memcg_stock_pcp *memcg_st = &per_cpu(memcg_stock, cpu);
- struct obj_stock_pcp *obj_st = &per_cpu(obj_stock, cpu);
-
/* no need for the local lock */
- drain_obj_stock(obj_st);
- drain_stock_fully(memcg_st);
-
- /*
- * A drain work queued before the CPU went away is executed by an
- * unbound worker on some other CPU and clears that CPU's flag, so
- * clear the flags here to make these stocks drainable again once
- * the CPU comes back online.
- */
- clear_bit(FLUSHING_CACHED_CHARGE, &memcg_st->flags);
- clear_bit(FLUSHING_CACHED_CHARGE, &obj_st->flags);
+ drain_obj_stock(&per_cpu(obj_stock, cpu));
+ drain_stock_fully(&per_cpu(memcg_stock, cpu));
return 0;
}
@@ -2446,11 +2410,6 @@ static void high_work_func(struct work_struct *work)
reclaim_high(memcg, MEMCG_CHARGE_BATCH, GFP_KERNEL);
}
-static void high_irq_work_func(struct irq_work *work)
-{
- schedule_work(&container_of(work, struct mem_cgroup, high_irq_work)->high_work);
-}
-
/*
* Clamp the maximum sleep time per allocation batch to 2 seconds. This is
* enough to still cause a significant slowdown in most cases, while still
@@ -2556,7 +2515,8 @@ static u64 swap_find_max_overage(struct mem_cgroup *memcg)
* Get the number of jiffies that we should penalise a mischievous cgroup which
* is exceeding its memory.high by checking both it and its ancestors.
*/
-static unsigned long calculate_high_delay(unsigned int nr_pages,
+static unsigned long calculate_high_delay(struct mem_cgroup *memcg,
+ unsigned int nr_pages,
u64 max_overage)
{
unsigned long penalty_jiffies;
@@ -2634,10 +2594,10 @@ retry_reclaim:
* memory.high is breached and reclaim is unable to keep up. Throttle
* allocators proactively to slow down excessive growth.
*/
- penalty_jiffies = calculate_high_delay(nr_pages,
+ penalty_jiffies = calculate_high_delay(memcg, nr_pages,
mem_find_max_overage(memcg));
- penalty_jiffies += calculate_high_delay(nr_pages,
+ penalty_jiffies += calculate_high_delay(memcg, nr_pages,
swap_find_max_overage(memcg));
/*
@@ -2696,11 +2656,10 @@ static int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask,
bool raised_max_event = false;
unsigned long pflags;
bool allow_spinning = gfpflags_allow_spinning(gfp_mask);
- int ret = 0;
retry:
if (consume_stock(memcg, nr_pages))
- return ret;
+ return 0;
if (!allow_spinning)
/* Avoid the refill and flush of the older stock */
@@ -2811,12 +2770,17 @@ nomem:
* put the burden of reclaim on regular allocation requests
* and let these go through as privileged allocations.
*/
- if (!(gfp_mask & (__GFP_NOFAIL | __GFP_HIGH))) {
- ret = -ENOMEM;
- goto out;
- }
+ if (!(gfp_mask & (__GFP_NOFAIL | __GFP_HIGH)))
+ return -ENOMEM;
force:
/*
+ * If the allocation has to be enforced, don't forget to raise
+ * a MEMCG_MAX event.
+ */
+ if (!raised_max_event)
+ __memcg_memory_event(mem_over_limit, MEMCG_MAX, allow_spinning);
+
+ /*
* The allocation either can't fail or will lead to more memory
* being freed very soon. Allow memory usage go over the limit
* temporarily by force charging it.
@@ -2825,15 +2789,7 @@ force:
if (do_memsw_account())
page_counter_charge(&memcg->memsw, nr_pages);
-out:
- /*
- * Don't forget to raise a MEMCG_MAX event for forced or rejected
- * requests.
- */
- if (!raised_max_event)
- __memcg_memory_event(mem_over_limit, MEMCG_MAX, allow_spinning);
-
- return ret;
+ return 0;
done_restock:
if (batch > nr_pages)
@@ -2859,10 +2815,7 @@ done_restock:
/* Don't bother a random interrupted task */
if (!in_task()) {
if (mem_high) {
- if (allow_spinning)
- schedule_work(&memcg->high_work);
- else
- irq_work_queue(&memcg->high_irq_work);
+ schedule_work(&memcg->high_work);
break;
}
continue;
@@ -2895,7 +2848,7 @@ done_restock:
!(current->flags & PF_MEMALLOC) &&
gfpflags_allow_blocking(gfp_mask))
__mem_cgroup_handle_over_high(gfp_mask);
- return ret;
+ return 0;
}
static inline int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
@@ -3803,7 +3756,7 @@ static void memcg_online_kmem(struct mem_cgroup *memcg)
static_branch_enable(&memcg_kmem_online_key);
- memcg->kmemcg_id = memcg->private_id;
+ memcg->kmemcg_id = memcg->id.id;
}
static void memcg_offline_kmem(struct mem_cgroup *memcg)
@@ -3993,7 +3946,7 @@ void mem_cgroup_flush_foreign(struct bdi_writeback *wb)
{
struct mem_cgroup *memcg = mem_cgroup_from_css(wb->memcg_css);
unsigned long intv = msecs_to_jiffies(dirty_expire_interval * 10);
- u64 now = get_jiffies_64();
+ u64 now = jiffies_64;
int i;
for (i = 0; i < MEMCG_CGWB_FRN_CNT; i++) {
@@ -4062,15 +4015,15 @@ static DEFINE_XARRAY_ALLOC1(mem_cgroup_private_ids);
static void mem_cgroup_private_id_remove(struct mem_cgroup *memcg)
{
- if (memcg->private_id > 0) {
- xa_erase(&mem_cgroup_private_ids, memcg->private_id);
- memcg->private_id = 0;
+ if (memcg->id.id > 0) {
+ xa_erase(&mem_cgroup_private_ids, memcg->id.id);
+ memcg->id.id = 0;
}
}
static inline void mem_cgroup_private_id_put(struct mem_cgroup *memcg, unsigned int n)
{
- if (refcount_sub_and_test(n, &memcg->private_id_ref)) {
+ if (refcount_sub_and_test(n, &memcg->id.ref)) {
mem_cgroup_private_id_remove(memcg);
/* Memcg ID pins CSS */
@@ -4080,7 +4033,7 @@ static inline void mem_cgroup_private_id_put(struct mem_cgroup *memcg, unsigned
struct mem_cgroup *mem_cgroup_private_id_get_online(struct mem_cgroup *memcg, unsigned int n)
{
- while (!refcount_add_not_zero(n, &memcg->private_id_ref)) {
+ while (!refcount_add_not_zero(n, &memcg->id.ref)) {
/*
* The root cgroup cannot be destroyed, so it's refcount must
* always be >= 1.
@@ -4204,7 +4157,7 @@ static struct mem_cgroup *mem_cgroup_alloc(struct mem_cgroup *parent)
if (!memcg)
return ERR_PTR(-ENOMEM);
- error = xa_alloc(&mem_cgroup_private_ids, &memcg->private_id, NULL,
+ error = xa_alloc(&mem_cgroup_private_ids, &memcg->id.id, NULL,
XA_LIMIT(1, MEM_CGROUP_ID_MAX), GFP_KERNEL);
if (error)
goto fail;
@@ -4237,7 +4190,6 @@ static struct mem_cgroup *mem_cgroup_alloc(struct mem_cgroup *parent)
goto fail;
INIT_WORK(&memcg->high_work, high_work_func);
- init_irq_work(&memcg->high_irq_work, high_irq_work_func);
vmpressure_init(&memcg->vmpressure);
INIT_LIST_HEAD(&memcg->memory_peaks);
INIT_LIST_HEAD(&memcg->swap_peaks);
@@ -4276,6 +4228,7 @@ mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
return ERR_CAST(memcg);
page_counter_set_high(&memcg->memory, PAGE_COUNTER_MAX);
+ memcg1_soft_limit_reset(memcg);
#ifdef CONFIG_ZSWAP
memcg->zswap_max = PAGE_COUNTER_MAX;
WRITE_ONCE(memcg->zswap_writeback, true);
@@ -4351,7 +4304,7 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css)
lru_gen_online_memcg(memcg);
/* Online state pins memcg ID, memcg ID pins CSS */
- refcount_set(&memcg->private_id_ref, 1);
+ refcount_set(&memcg->id.ref, 1);
css_get(css);
/*
@@ -4364,7 +4317,7 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css)
* publish it here at the end of onlining. This matches the
* regular ID destruction during offlining.
*/
- xa_store(&mem_cgroup_private_ids, memcg->private_id, memcg, GFP_KERNEL);
+ xa_store(&mem_cgroup_private_ids, memcg->id.id, memcg, GFP_KERNEL);
return 0;
free_objcg:
@@ -4446,8 +4399,8 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
static_branch_dec(&memcg_bpf_enabled_key);
vmpressure_cleanup(&memcg->vmpressure);
- irq_work_sync(&memcg->high_irq_work);
cancel_work_sync(&memcg->high_work);
+ memcg1_remove_from_trees(memcg);
free_shrinker_info(memcg);
mem_cgroup_free(memcg);
}
@@ -4483,6 +4436,7 @@ static void mem_cgroup_css_reset(struct cgroup_subsys_state *css)
page_counter_set_min(&memcg->memory, 0);
page_counter_set_low(&memcg->memory, 0);
page_counter_set_high(&memcg->memory, PAGE_COUNTER_MAX);
+ memcg1_soft_limit_reset(memcg);
page_counter_set_high(&memcg->swap, PAGE_COUNTER_MAX);
memcg_wb_domain_size_changed(memcg);
}
@@ -4490,10 +4444,7 @@ static void mem_cgroup_css_reset(struct cgroup_subsys_state *css)
struct aggregate_control {
/* pointer to the aggregated (CPU and subtree aggregated) counters */
long *aggregate;
- /*
- * pointer to the non-hierarchical (CPU aggregated) counters or NULL to
- * skip updating them (see memcg_state_local_array())
- */
+ /* pointer to the non-hierarchichal (CPU aggregated) counters */
long *local;
/* pointer to the pending child counters during tree propagation */
long *pending;
@@ -4532,7 +4483,7 @@ static void mem_cgroup_stat_aggregate(struct aggregate_control *ac)
}
/* Aggregate counts on this level and propagate upwards */
- if (delta_cpu && ac->local)
+ if (delta_cpu)
ac->local[i] += delta_cpu;
if (delta) {
@@ -4546,7 +4497,6 @@ static void mem_cgroup_stat_aggregate(struct aggregate_control *ac)
#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
static void flush_nmi_stats(struct mem_cgroup *memcg, struct mem_cgroup *parent)
{
- long *state_local = memcg_state_local_array(memcg);
int nid;
if (atomic_read(&memcg->kmem_stat)) {
@@ -4554,8 +4504,7 @@ static void flush_nmi_stats(struct mem_cgroup *memcg, struct mem_cgroup *parent)
int index = memcg_stats_index(MEMCG_KMEM);
memcg->vmstats->state[index] += kmem;
- if (state_local)
- state_local[index] += kmem;
+ memcg->vmstats->state_local[index] += kmem;
if (parent)
parent->vmstats->state_pending[index] += kmem;
}
@@ -4577,8 +4526,7 @@ static void flush_nmi_stats(struct mem_cgroup *memcg, struct mem_cgroup *parent)
if (plstats)
plstats->state_pending[index] += slab;
memcg->vmstats->state[index] += slab;
- if (state_local)
- state_local[index] += slab;
+ memcg->vmstats->state_local[index] += slab;
if (parent)
parent->vmstats->state_pending[index] += slab;
}
@@ -4591,8 +4539,7 @@ static void flush_nmi_stats(struct mem_cgroup *memcg, struct mem_cgroup *parent)
if (plstats)
plstats->state_pending[index] += slab;
memcg->vmstats->state[index] += slab;
- if (state_local)
- state_local[index] += slab;
+ memcg->vmstats->state_local[index] += slab;
if (parent)
parent->vmstats->state_pending[index] += slab;
}
@@ -4617,7 +4564,7 @@ static void mem_cgroup_css_rstat_flush(struct cgroup_subsys_state *css, int cpu)
ac = (struct aggregate_control) {
.aggregate = memcg->vmstats->state,
- .local = memcg_state_local_array(memcg),
+ .local = memcg->vmstats->state_local,
.pending = memcg->vmstats->state_pending,
.ppending = parent ? parent->vmstats->state_pending : NULL,
.cstat = statc->state,
@@ -4628,7 +4575,7 @@ static void mem_cgroup_css_rstat_flush(struct cgroup_subsys_state *css, int cpu)
ac = (struct aggregate_control) {
.aggregate = memcg->vmstats->events,
- .local = memcg_events_local_array(memcg),
+ .local = memcg->vmstats->events_local,
.pending = memcg->vmstats->events_pending,
.ppending = parent ? parent->vmstats->events_pending : NULL,
.cstat = statc->events,
@@ -4772,7 +4719,6 @@ static int memory_peak_show(struct seq_file *sf, void *v)
{
struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(sf));
- guard(spinlock)(&memcg->peaks_lock);
return peak_show(sf, v, &memcg->memory);
}
@@ -4802,7 +4748,7 @@ static ssize_t peak_write(struct kernfs_open_file *of, char *buf, size_t nbytes,
loff_t off, struct page_counter *pc,
struct list_head *watchers)
{
- unsigned long usage, old_watermark;
+ unsigned long usage;
struct cgroup_of_peak *peer_ctx;
struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of));
struct cgroup_of_peak *ofp = of_peak(of);
@@ -4810,12 +4756,11 @@ static ssize_t peak_write(struct kernfs_open_file *of, char *buf, size_t nbytes,
spin_lock(&memcg->peaks_lock);
usage = page_counter_read(pc);
- old_watermark = READ_ONCE(pc->local_watermark);
WRITE_ONCE(pc->local_watermark, usage);
list_for_each_entry(peer_ctx, watchers, list)
- if (peer_ctx != ofp && old_watermark > peer_ctx->value)
- WRITE_ONCE(peer_ctx->value, old_watermark);
+ if (usage > peer_ctx->value)
+ WRITE_ONCE(peer_ctx->value, usage);
/* initial write, register watcher */
if (ofp->value == OFP_PEAK_UNSET)
@@ -5253,51 +5198,6 @@ void mem_cgroup_calculate_protection(struct mem_cgroup *root,
page_counter_calculate_protection(&root->memory, &memcg->memory, recursive_protection);
}
-#ifdef CONFIG_LRU_GEN
-/**
- * mem_cgroup_calculate_protection_path - compute protection along a path
- * @root: the top ancestor of the sub-tree being checked (NULL for root_mem_cgroup)
- * @memcg: the target memory cgroup
- *
- * Walk the ancestor path from @root down to @memcg and compute the effective
- * protection at each level. This is safe for isolated queries because it
- * ensures parents are computed before children.
- */
-void mem_cgroup_calculate_protection_path(struct mem_cgroup *root,
- struct mem_cgroup *memcg)
-{
- bool recursive_protection =
- cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_RECURSIVE_PROT;
- struct cgroup *cg;
- int root_level, i;
-
- if (mem_cgroup_disabled())
- return;
-
- if (!root)
- root = root_mem_cgroup;
-
- if (memcg == root)
- return;
-
- root_level = root->css.cgroup->level;
- cg = memcg->css.cgroup;
-
- rcu_read_lock();
- for (i = root_level + 1; i <= cg->level; i++) {
- struct mem_cgroup *cur;
-
- cur = mem_cgroup_from_css(cgroup_css(cg->ancestors[i],
- &memory_cgrp_subsys));
- if (cur)
- page_counter_calculate_protection(&root->memory,
- &cur->memory,
- recursive_protection);
- }
- rcu_read_unlock();
-}
-#endif /* CONFIG_LRU_GEN */
-
static int charge_memcg(struct folio *folio, struct mem_cgroup *memcg,
gfp_t gfp)
{
@@ -5333,7 +5233,6 @@ int __mem_cgroup_charge(struct folio *folio, struct mm_struct *mm, gfp_t gfp)
/**
* mem_cgroup_charge_hugetlb - charge the memcg for a hugetlb folio
* @folio: folio being charged
- * @mm: mm context of the allocation target
* @gfp: reclaim mode
*
* This function is called when allocating a huge page folio, after the page has
@@ -5343,10 +5242,9 @@ int __mem_cgroup_charge(struct folio *folio, struct mm_struct *mm, gfp_t gfp)
* Returns ENOMEM if the memcg is already full.
* Returns 0 if either the charge was successful, or if we skip the charging.
*/
-int mem_cgroup_charge_hugetlb(struct folio *folio, struct mm_struct *mm,
- gfp_t gfp)
+int mem_cgroup_charge_hugetlb(struct folio *folio, gfp_t gfp)
{
- struct mem_cgroup *memcg = get_mem_cgroup_from_mm(mm);
+ struct mem_cgroup *memcg = get_mem_cgroup_from_current();
int ret = 0;
/*
@@ -5404,6 +5302,7 @@ struct uncharge_gather {
unsigned long nr_memory;
unsigned long pgpgout;
unsigned long nr_kmem;
+ int nid;
};
static inline void uncharge_gather_clear(struct uncharge_gather *ug)
@@ -5426,7 +5325,7 @@ static void uncharge_batch(const struct uncharge_gather *ug)
memcg1_oom_recover(memcg);
}
- memcg1_uncharge_batch(memcg, ug->pgpgout, ug->nr_memory);
+ memcg1_uncharge_batch(memcg, ug->pgpgout, ug->nr_memory, ug->nid);
rcu_read_unlock();
/* drop reference from uncharge_folio */
@@ -5455,6 +5354,7 @@ static void uncharge_folio(struct folio *folio, struct uncharge_gather *ug)
uncharge_gather_clear(ug);
}
ug->objcg = objcg;
+ ug->nid = folio_nid(folio);
/* pairs with obj_cgroup_put in uncharge_batch */
obj_cgroup_get(objcg);
@@ -5784,108 +5684,6 @@ __setup("cgroup.memory=", cgroup_memory);
* basically everything that doesn't depend on a specific mem_cgroup structure
* should be initialized from here.
*/
-/*
- * Fields are grouped by access pattern. Putting a field in the wrong group
- * breaks the build here.
- */
-static void __init memcg_struct_check(void)
-{
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- socket_pressure);
-#if BITS_PER_LONG < 64
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- socket_pressure_seqlock);
-#endif
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- memory_events);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- memory_events_local);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- vmpressure);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- private_id_ref);
-#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- kmem_stat);
-#endif
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- high_irq_work);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_write_hot,
- high_work);
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- memory_peaks);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- swap_peaks);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- peaks_lock);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- events_file);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- events_local_file);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- swap_events_file);
-#ifdef CONFIG_CGROUP_WRITEBACK
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- cgwb_list);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- cgwb_domain);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- cgwb_frn);
-#endif
-#ifdef CONFIG_LRU_GEN_WALKS_MMU
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_cold,
- mm_list);
-#endif
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- vmstats_percpu);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- vmstats);
-#ifdef CONFIG_ZSWAP
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- zswap_max);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- zswap_writeback);
-#endif
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- private_id);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- kmemcg_id);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup, memcg_read_mostly,
- oom_group);
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_read_mostly, memcg);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_read_mostly, lruvec_stats_percpu);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_read_mostly, lruvec_stats);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_read_mostly, shrinker_info);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_read_mostly, objcg);
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_lruvec, lruvec);
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_write_hot, lru_zone_size);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_write_hot, iter);
-#ifdef CONFIG_MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_write_hot, slab_reclaimable);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_write_hot, slab_unreclaimable);
-#endif
-
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_cold, orig_objcg);
- CACHELINE_ASSERT_GROUP_MEMBER(struct mem_cgroup_per_node,
- memcg_pn_cold, objcg_list);
-}
-
int __init mem_cgroup_init(void)
{
unsigned int memcg_size;
@@ -5899,8 +5697,6 @@ int __init mem_cgroup_init(void)
*/
BUILD_BUG_ON(MEMCG_CHARGE_BATCH > S32_MAX / PAGE_SIZE);
- memcg_struct_check();
-
cpuhp_setup_state_nocalls(CPUHP_MM_MEMCQ_DEAD, "mm/memctrl:dead", NULL,
memcg_hotplug_cpu_dead);
@@ -6006,35 +5802,15 @@ long mem_cgroup_get_nr_swap_pages(struct mem_cgroup *memcg)
{
long nr_swap_pages = get_nr_swap_pages();
- if (!mem_cgroup_disabled() && !do_memsw_account())
- nr_swap_pages = min(nr_swap_pages, page_counter_margin(&memcg->swap));
-
+ if (mem_cgroup_disabled() || do_memsw_account())
+ return nr_swap_pages;
+ for (; !mem_cgroup_is_root(memcg); memcg = parent_mem_cgroup(memcg))
+ nr_swap_pages = min_t(long, nr_swap_pages,
+ READ_ONCE(memcg->swap.max) -
+ page_counter_read(&memcg->swap));
return nr_swap_pages;
}
-/**
- * mem_cgroup_get_folio_swap_margin - get a folio's memcg swap margin
- * @folio: folio whose memcg margin is queried
- *
- * Return: Remaining chargeable pages in the folio's memcg hierarchy.
- */
-long mem_cgroup_get_folio_swap_margin(struct folio *folio)
-{
- struct mem_cgroup *memcg;
- long margin;
-
- if (mem_cgroup_disabled() || do_memsw_account() ||
- !folio_memcg_charged(folio))
- return PAGE_COUNTER_MAX;
-
- rcu_read_lock();
- memcg = folio_memcg(folio);
- margin = page_counter_margin(&memcg->swap);
- rcu_read_unlock();
-
- return margin;
-}
-
bool mem_cgroup_swap_full(struct folio *folio)
{
struct mem_cgroup *memcg;
@@ -6088,7 +5864,6 @@ static int swap_peak_show(struct seq_file *sf, void *v)
{
struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(sf));
- guard(spinlock)(&memcg->peaks_lock);
return peak_show(sf, v, &memcg->swap);
}
diff --git a/mm/memfd.c b/mm/memfd.c
index 0f6fff004f5e..c708d92533f4 100644
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -82,31 +82,22 @@ struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
struct hstate *h = hstate_file(memfd);
int err = -ENOMEM;
long nr_resv;
- u32 hash;
gfp_mask = htlb_alloc_mask(h);
gfp_mask &= ~(__GFP_HIGHMEM | __GFP_MOVABLE);
idx >>= huge_page_order(h);
- /*
- * Serialize hugepage allocation and instantiation to prevent
- * races with concurrent allocations, as required by all other
- * callers of hugetlb_add_to_page_cache().
- */
- hash = hugetlb_fault_mutex_hash(memfd->f_mapping, idx);
- mutex_lock(&hugetlb_fault_mutex_table[hash]);
-
nr_resv = hugetlb_reserve_pages(inode, idx, idx + 1, NULL, EMPTY_VMA_FLAGS);
- if (nr_resv < 0) {
- err = nr_resv;
- goto out_unlock;
- }
+ if (nr_resv < 0)
+ return ERR_PTR(nr_resv);
folio = alloc_hugetlb_folio_reserve(h,
numa_node_id(),
NULL,
gfp_mask);
if (folio) {
+ u32 hash;
+
/*
* Zero the folio to prevent information leaks to userspace.
* Use folio_zero_user() which is optimized for huge/gigantic
@@ -121,9 +112,20 @@ struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
*/
__folio_mark_uptodate(folio);
+ /*
+ * Serialize hugepage allocation and instantiation to prevent
+ * races with concurrent allocations, as required by all other
+ * callers of hugetlb_add_to_page_cache().
+ */
+ hash = hugetlb_fault_mutex_hash(memfd->f_mapping, idx);
+ mutex_lock(&hugetlb_fault_mutex_table[hash]);
+
err = hugetlb_add_to_page_cache(folio,
memfd->f_mapping,
idx);
+
+ mutex_unlock(&hugetlb_fault_mutex_table[hash]);
+
if (err) {
folio_put(folio);
goto err_unresv;
@@ -131,14 +133,11 @@ struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
hugetlb_set_folio_subpool(folio, subpool_inode(inode));
folio_unlock(folio);
- mutex_unlock(&hugetlb_fault_mutex_table[hash]);
return folio;
}
err_unresv:
if (nr_resv > 0)
hugetlb_unreserve_pages(inode, idx, idx + 1, 0);
-out_unlock:
- mutex_unlock(&hugetlb_fault_mutex_table[hash]);
return ERR_PTR(err);
}
#endif
diff --git a/mm/memory.c b/mm/memory.c
index 926276d41920..8b0c2c735d3d 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -492,10 +492,34 @@ static inline void add_mm_rss_vec(struct mm_struct *mm, int *rss)
add_mm_counter(mm, i, rss[i]);
}
-/* Allow a burst of 60 bad page map reports per minute. */
-static DEFINE_RATELIMIT_STATE(bad_page_map_ratelimit, 60 * HZ, 60);
+static bool is_bad_page_map_ratelimited(void)
+{
+ static unsigned long resume;
+ static unsigned long nr_shown;
+ static unsigned long nr_unshown;
-void ptval_bytes_to_hex_str(char *buf, size_t buf_size, const void *entry, size_t entry_size)
+ /*
+ * Allow a burst of 60 reports, then keep quiet for that minute;
+ * or allow a steady drip of one report per second.
+ */
+ if (nr_shown == 60) {
+ if (time_before(jiffies, resume)) {
+ nr_unshown++;
+ return true;
+ }
+ if (nr_unshown) {
+ pr_alert("BUG: Bad page map: %lu messages suppressed\n",
+ nr_unshown);
+ nr_unshown = 0;
+ }
+ nr_shown = 0;
+ }
+ if (nr_shown++ == 0)
+ resume = jiffies + 60 * HZ;
+ return false;
+}
+
+static void ptval_bytes_to_hex_str(char *buf, size_t buf_size, const void *entry, size_t entry_size)
{
if (WARN_ON_ONCE(buf_size < entry_size * 2 + 1)) {
snprintf(buf, buf_size, "overflow");
@@ -522,6 +546,19 @@ void ptval_bytes_to_hex_str(char *buf, size_t buf_size, const void *entry, size_
}
}
+#define ptval_to_str(buf, val) \
+ do { \
+ auto __val = (val); \
+ \
+ ptval_bytes_to_hex_str((buf), sizeof(buf), &__val, sizeof(__val)); \
+ } while (0)
+
+#if defined(__SIZEOF_INT128__)
+#define PTVAL_STR_MAX (32 + 1) /* Max 128-bit value in hex + NUL */
+#else
+#define PTVAL_STR_MAX (16 + 1) /* Max 64-bit value in hex + NUL */
+#endif
+
static void __print_bad_page_map_pgtable(struct mm_struct *mm, unsigned long addr)
{
char pgd_str[PTVAL_STR_MAX];
@@ -596,7 +633,7 @@ static void print_bad_page_map(struct vm_area_struct *vma,
char entry_str[PTVAL_STR_MAX];
pgoff_t index, anon_index;
- if (!__ratelimit(&bad_page_map_ratelimit))
+ if (is_bad_page_map_ratelimited())
return;
mapping = vma->vm_file ? vma->vm_file->f_mapping : NULL;
@@ -2528,22 +2565,20 @@ static int insert_pages(struct vm_area_struct *vma, unsigned long addr,
unsigned long curr_page_idx = 0;
unsigned long remaining_pages_total = *num;
unsigned long pages_to_write_in_pmd;
- int err = 0;
+ int ret;
more:
+ ret = -EFAULT;
pmd = walk_to_pmd(mm, addr);
- if (!pmd) {
- err = -ENOMEM;
+ if (!pmd)
goto out;
- }
pages_to_write_in_pmd = min_t(unsigned long,
remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
/* Allocate the PTE if necessary; takes PMD lock once only. */
- if (pte_alloc(mm, pmd)) {
- err = -ENOMEM;
+ ret = -ENOMEM;
+ if (pte_alloc(mm, pmd))
goto out;
- }
while (pages_to_write_in_pmd) {
int pte_idx = 0;
@@ -2551,14 +2586,15 @@ more:
start_pte = pte_offset_map_lock(mm, pmd, addr, &pte_lock);
if (!start_pte) {
- err = -EFAULT;
+ ret = -EFAULT;
goto out;
}
for (pte = start_pte; pte_idx < batch_size; ++pte, ++pte_idx) {
- err = insert_page_in_batch_locked(vma, pte, addr,
- pages[curr_page_idx], prot);
+ int err = insert_page_in_batch_locked(vma, pte,
+ addr, pages[curr_page_idx], prot);
if (unlikely(err)) {
pte_unmap_unlock(start_pte, pte_lock);
+ ret = err;
remaining_pages_total -= pte_idx;
goto out;
}
@@ -2571,9 +2607,10 @@ more:
}
if (remaining_pages_total)
goto more;
+ ret = 0;
out:
*num = remaining_pages_total;
- return err;
+ return ret;
}
/**
@@ -4889,21 +4926,18 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
goto unlock;
/*
- * Get a folio reference while we know the folio can't
- * be freed.
+ * Get a page reference while we know the page can't be
+ * freed.
*/
- folio = page_folio(vmf->page);
- if (folio_trylock(folio)) {
+ if (trylock_page(vmf->page)) {
struct dev_pagemap *pgmap;
- folio_get(folio);
+ get_page(vmf->page);
pte_unmap_unlock(vmf->pte, vmf->ptl);
pgmap = page_pgmap(vmf->page);
ret = pgmap->ops->migrate_to_ram(vmf);
- /* migrate_to_ram() might have split the folio. */
- folio = page_folio(vmf->page);
- folio_unlock(folio);
- folio_put(folio);
+ unlock_page(vmf->page);
+ put_page(vmf->page);
} else {
pte_unmap(vmf->pte);
softleaf_entry_wait_on_locked(entry, vmf->ptl);
@@ -4919,13 +4953,10 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
goto out;
}
- /* Prevent swapoff from happening to us, and reject a bad entry. */
+ /* Prevent swapoff from happening to us. */
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si)) {
- if (IS_ERR(si))
- ret = VM_FAULT_SIGBUS;
+ if (unlikely(!si))
goto out;
- }
folio = swap_cache_get_folio(entry);
if (folio)
@@ -5234,7 +5265,7 @@ unlock:
if (vmf->pte)
pte_unmap_unlock(vmf->pte, vmf->ptl);
out:
- if (!IS_ERR_OR_NULL(si))
+ if (si)
put_swap_device(si);
return ret;
out_nomap:
@@ -6786,6 +6817,7 @@ static vm_fault_t sanitize_fault_flags(struct vm_area_struct *vma,
!vma_is_cow_mapping(vma)))
return VM_FAULT_SIGSEGV;
}
+#ifdef CONFIG_PER_VMA_LOCK
/*
* Per-VMA locks can't be used with FAULT_FLAG_RETRY_NOWAIT because of
* the assumption that lock is dropped on VM_FAULT_RETRY.
@@ -6794,6 +6826,7 @@ static vm_fault_t sanitize_fault_flags(struct vm_area_struct *vma,
(FAULT_FLAG_VMA_LOCK | FAULT_FLAG_RETRY_NOWAIT)) ==
(FAULT_FLAG_VMA_LOCK | FAULT_FLAG_RETRY_NOWAIT)))
return VM_FAULT_SIGSEGV;
+#endif
return 0;
}
@@ -7131,12 +7164,6 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
bool writable;
struct follow_pfnmap_args args = { .vma = vma, .address = addr };
- /*
- * Limit access to one page at a time, as that's what follow_pfnmap_start()
- * guarantees; expect the caller to retry to read larger ranges.
- */
- len = min_t(int, len, PAGE_SIZE - offset);
-
retry:
if (follow_pfnmap_start(&args))
return -EINVAL;
@@ -7148,7 +7175,7 @@ retry:
if ((write & FOLL_WRITE) && !writable)
return -EINVAL;
- maddr = ioremap_prot(phys_addr, PAGE_SIZE, prot);
+ maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot);
if (!maddr)
return -ENOMEM;
@@ -7156,7 +7183,7 @@ retry:
goto out_unmap;
if ((pgprot_val(prot) != pgprot_val(args.pgprot)) ||
- (phys_addr != ((resource_size_t)args.pfn << PAGE_SHIFT)) ||
+ (phys_addr != (args.pfn << PAGE_SHIFT)) ||
(writable != args.writable)) {
follow_pfnmap_end(&args);
iounmap(maddr);
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index d7a59167bec4..226ab9cb078a 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -43,7 +43,6 @@
#include "mm_init.h"
#include "page_alloc.h"
#include "shuffle.h"
-#include "sparse.h"
enum {
MEMMAP_ON_MEMORY_DISABLE = 0,
@@ -555,9 +554,8 @@ void remove_pfn_range_from_zone(struct zone *zone,
/* Select all remaining pages up to the next section boundary */
cur_nr_pages =
min(end_pfn - pfn, SECTION_ALIGN_UP(pfn + 1) - pfn);
- if (!section_vmemmap_optimizable(__pfn_to_section(pfn)))
- page_init_poison(pfn_to_page(pfn),
- sizeof(struct page) * cur_nr_pages);
+ page_init_poison(pfn_to_page(pfn),
+ sizeof(struct page) * cur_nr_pages);
}
/*
@@ -1787,37 +1785,6 @@ bool mhp_range_allowed(u64 start, u64 size, bool need_mapping)
}
#ifdef CONFIG_MEMORY_HOTREMOVE
-
-static int check_no_memblock_for_node_cb(struct memory_block *mem, void *arg)
-{
- int nid = *(int *)arg;
-
- /*
- * If a memory block belongs to multiple nodes, the stored nid is not
- * reliable. However, such blocks are always online (e.g., cannot get
- * offlined) and, therefore, are still spanned by the node.
- */
- return mem->nid == nid ? -EEXIST : 0;
-}
-
-/* Caller must hold the memory hotplug lock for this check. */
-static bool node_is_memoryless(int nid)
-{
- /*
- * A node still spanning pages (especially ZONE_DEVICE) is not
- * memoryless. A node spans memory after move_pfn_range_to_zone(),
- * e.g. once a memory block has been onlined.
- */
- if (node_spanned_pages(nid))
- return false;
- /*
- * Offline memory blocks may not be spanned by the node yet, but they
- * link to it in sysfs and can be onlined later, so the node is not
- * memoryless while any remain.
- */
- return !for_each_memory_block(&nid, check_no_memblock_for_node_cb);
-}
-
/*
* Scan pfn range [start,end) to find movable/migratable pages (LRU and
* hugetlb folio, movable_ops pages). Will skip over most unmovable
@@ -2247,6 +2214,18 @@ static int check_cpu_on_node(int nid)
return 0;
}
+static int check_no_memblock_for_node_cb(struct memory_block *mem, void *arg)
+{
+ int nid = *(int *)arg;
+
+ /*
+ * If a memory block belongs to multiple nodes, the stored nid is not
+ * reliable. However, such blocks are always online (e.g., cannot get
+ * offlined) and, therefore, are still spanned by the node.
+ */
+ return mem->nid == nid ? -EEXIST : 0;
+}
+
/**
* try_offline_node
* @nid: the node ID
@@ -2258,7 +2237,23 @@ static int check_cpu_on_node(int nid)
*/
void try_offline_node(int nid)
{
- if (!node_is_memoryless(nid))
+ int rc;
+
+ /*
+ * If the node still spans pages (especially ZONE_DEVICE), don't
+ * offline it. A node spans memory after move_pfn_range_to_zone(),
+ * e.g., after the memory block was onlined.
+ */
+ if (node_spanned_pages(nid))
+ return;
+
+ /*
+ * Especially offline memory blocks might not be spanned by the
+ * node. They will get spanned by the node once they get onlined.
+ * However, they link to the node in sysfs and can get onlined later.
+ */
+ rc = for_each_memory_block(&nid, check_no_memblock_for_node_cb);
+ if (rc)
return;
if (check_cpu_on_node(nid))
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 8fc8a975657e..79053ece02cd 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -112,7 +112,6 @@
#include <linux/printk.h>
#include <linux/leafops.h>
#include <linux/gcd.h>
-#include <linux/srcu.h>
#include <asm/tlbflush.h>
#include <asm/tlb.h>
@@ -158,7 +157,6 @@ static const int weightiness = 32;
*/
struct weighted_interleave_state {
bool mode_auto;
- struct rcu_head rcu;
u8 iw_table[];
};
static struct weighted_interleave_state __rcu *wi_state;
@@ -170,24 +168,6 @@ static unsigned int *node_bw_table;
*/
static DEFINE_MUTEX(wi_state_lock);
-/* Readers that sleep while walking iw_table hold this instead */
-DEFINE_STATIC_SRCU_FAST(wi_srcu);
-
-static void wi_state_free_rcu(struct rcu_head *head)
-{
- struct weighted_interleave_state *state =
- container_of(head, struct weighted_interleave_state, rcu);
-
- kfree_rcu(state, rcu);
-}
-
-/* Retire through both flavors: sleeping readers use SRCU, the rest RCU */
-static void wi_state_retire(struct weighted_interleave_state *state)
-{
- if (state)
- call_srcu(&wi_srcu, &state->rcu, wi_state_free_rcu);
-}
-
static u8 get_il_weight(int node)
{
struct weighted_interleave_state *state;
@@ -286,7 +266,10 @@ int mempolicy_set_node_perf(unsigned int node, struct access_coordinate *coords)
rcu_assign_pointer(wi_state, new_wi_state);
mutex_unlock(&wi_state_lock);
- wi_state_retire(old_wi_state);
+ if (old_wi_state) {
+ synchronize_rcu();
+ kfree(old_wi_state);
+ }
out:
kfree(old_bw);
return 0;
@@ -667,8 +650,7 @@ static inline bool queue_folio_required(struct folio *folio,
return node_isset(nid, *qp->nmask) == !(flags & MPOL_MF_INVERT);
}
-static void queue_folios_pmd(pmd_t *pmd, unsigned long addr,
- struct mm_walk *walk)
+static void queue_folios_pmd(pmd_t *pmd, struct mm_walk *walk)
{
struct folio *folio;
struct queue_pages *qp = walk->private;
@@ -679,14 +661,11 @@ static void queue_folios_pmd(pmd_t *pmd, unsigned long addr,
qp->nr_failed++;
return;
}
- folio = vm_normal_folio_pmd(walk->vma, addr, pmdval);
- if (!folio) {
- if (is_huge_zero_pmd(pmdval))
- walk->action = ACTION_CONTINUE;
+ folio = pmd_folio(pmdval);
+ if (is_huge_zero_folio(folio)) {
+ walk->action = ACTION_CONTINUE;
return;
}
- if (folio_is_zone_device(folio))
- return;
if (!queue_folio_required(folio, qp))
return;
if (!(qp->flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) ||
@@ -719,7 +698,7 @@ static int queue_folios_pte_range(pmd_t *pmd, unsigned long addr,
ptl = pmd_trans_huge_lock(pmd, vma);
if (ptl) {
- queue_folios_pmd(pmd, addr, walk);
+ queue_folios_pmd(pmd, walk);
spin_unlock(ptl);
goto out;
}
@@ -2201,15 +2180,34 @@ unsigned int mempolicy_slab_node(void)
}
}
+static unsigned int read_once_policy_nodemask(struct mempolicy *pol,
+ nodemask_t *mask)
+{
+ /*
+ * barrier stabilizes the nodemask locally so that it can be iterated
+ * over safely without concern for changes. Allocators validate node
+ * selection does not violate mems_allowed, so this is safe.
+ */
+ barrier();
+ memcpy(mask, &pol->nodes, sizeof(nodemask_t));
+ barrier();
+ return nodes_weight(*mask);
+}
+
static unsigned int weighted_interleave_nid(struct mempolicy *pol, pgoff_t ilx)
{
struct weighted_interleave_state *state;
- unsigned int target, nnodes = 0;
+ nodemask_t nodemask;
+ unsigned int target, nr_nodes;
u8 *table = NULL;
unsigned int weight_total = 0;
u8 weight;
int nid = 0;
+ nr_nodes = read_once_policy_nodemask(pol, &nodemask);
+ if (!nr_nodes)
+ return numa_node_id();
+
rcu_read_lock();
state = rcu_dereference(wi_state);
@@ -2217,40 +2215,22 @@ static unsigned int weighted_interleave_nid(struct mempolicy *pol, pgoff_t ilx)
if (state)
table = state->iw_table;
- /* calculate the total weight and the node count */
- for_each_node_mask(nid, pol->nodes) {
+ /* calculate the total weight */
+ for_each_node_mask(nid, nodemask)
weight_total += table ? table[nid] : 1;
- nnodes++;
- }
-
- /* the mask is empty */
- if (!weight_total) {
- rcu_read_unlock();
- return numa_node_id();
- }
/* Calculate the node offset based on totals */
target = ilx % weight_total;
- nid = first_node(pol->nodes);
-
- /*
- * The target was calculated in a separate loop, and a concurrent
- * rebind can change the total number of nodes. Clamp this loop to
- * a single pass (nnodes) to keep the walk bounded by node count.
- */
- while (target && nnodes-- && nid < MAX_NUMNODES) {
+ nid = first_node(nodemask);
+ while (target) {
/* detect system default usage */
weight = table ? table[nid] : 1;
if (target < weight)
break;
target -= weight;
- nid = next_node_in(nid, pol->nodes);
+ nid = next_node_in(nid, nodemask);
}
rcu_read_unlock();
-
- /* the mask emptied under the walk */
- if (nid >= MAX_NUMNODES)
- return numa_node_id();
return nid;
}
@@ -2261,21 +2241,18 @@ static unsigned int weighted_interleave_nid(struct mempolicy *pol, pgoff_t ilx)
*/
static unsigned int interleave_nid(struct mempolicy *pol, pgoff_t ilx)
{
+ nodemask_t nodemask;
unsigned int target, nnodes;
int i;
int nid;
- nnodes = nodes_weight(pol->nodes);
+ nnodes = read_once_policy_nodemask(pol, &nodemask);
if (!nnodes)
return numa_node_id();
target = ilx % nnodes;
- nid = first_node(pol->nodes);
- for (i = 0; i < target && nid < MAX_NUMNODES; i++)
- nid = next_node_in(nid, pol->nodes);
-
- /* the mask emptied under the walk */
- if (nid >= MAX_NUMNODES)
- return numa_node_id();
+ nid = first_node(nodemask);
+ for (i = 0; i < target; i++)
+ nid = next_node(nid, nodemask);
return nid;
}
@@ -2615,7 +2592,6 @@ static unsigned long alloc_pages_bulk_interleave(gfp_t gfp,
struct mempolicy *pol, unsigned long nr_pages,
struct page **page_array)
{
- unsigned int cpuset_mems_cookie;
int nodes;
unsigned long nr_pages_per_node;
int delta;
@@ -2623,16 +2599,7 @@ static unsigned long alloc_pages_bulk_interleave(gfp_t gfp,
unsigned long nr_allocated;
unsigned long total_allocated = 0;
- /* count the nodes, retry if a rebind happened during the read */
- do {
- cpuset_mems_cookie = read_mems_allowed_begin();
- nodes = nodes_weight(pol->nodes);
- } while (read_mems_allowed_retry(cpuset_mems_cookie));
-
- /* if the nodemask has become invalid, we cannot do anything */
- if (!nodes)
- return 0;
-
+ nodes = nodes_weight(pol->nodes);
nr_pages_per_node = nr_pages / nodes;
delta = nr_pages - nodes * nr_pages_per_node;
@@ -2667,10 +2634,10 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
unsigned long nr_allocated = 0;
unsigned long rounds;
unsigned long node_pages, delta;
- struct srcu_ctr __percpu *scp;
- u8 *table, weight;
+ u8 *weights, weight;
unsigned int weight_total = 0;
unsigned long rem_pages = nr_pages;
+ nodemask_t nodes;
int nnodes, node;
int resume_node = MAX_NUMNODES - 1;
u8 resume_weight = 0;
@@ -2680,10 +2647,10 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
if (!nr_pages)
return 0;
- /* count the nodes, retry if a rebind happened during the read */
+ /* read the nodes onto the stack, retry if done during rebind */
do {
cpuset_mems_cookie = read_mems_allowed_begin();
- nnodes = nodes_weight(pol->nodes);
+ nnodes = read_once_policy_nodemask(pol, &nodes);
} while (read_mems_allowed_retry(cpuset_mems_cookie));
/* if the nodemask has become invalid, we cannot do anything */
@@ -2693,7 +2660,7 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
/* Continue allocating from most recent node and adjust the nr_pages */
node = me->il_prev;
weight = me->il_weight;
- if (weight && node_isset(node, pol->nodes)) {
+ if (weight && node_isset(node, nodes)) {
node_pages = min(rem_pages, weight);
nr_allocated = __alloc_pages_bulk(gfp, node, NULL, node_pages,
page_array);
@@ -2711,18 +2678,25 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
me->il_weight = 0;
prev_node = node;
- /* The page allocator may sleep, pin the weight table with SRCU */
- scp = srcu_read_lock_fast(&wi_srcu);
- state = srcu_dereference(wi_state, &wi_srcu);
- table = state ? state->iw_table : NULL;
+ /* create a local copy of node weights to operate on outside rcu */
+ weights = kmalloc(nr_node_ids, gfp & GFP_RECLAIM_MASK);
+ if (!weights)
+ return total_allocated;
- /* calculate total, detect system default usage */
- for_each_node_mask(node, pol->nodes)
- weight_total += table ? table[node] : 1;
+ rcu_read_lock();
+ state = rcu_dereference(wi_state);
+ if (state) {
+ memcpy(weights, state->iw_table, nr_node_ids * sizeof(u8));
+ rcu_read_unlock();
+ } else {
+ rcu_read_unlock();
+ for (i = 0; i < nr_node_ids; i++)
+ weights[i] = 1;
+ }
- /* the mask emptied since it was counted */
- if (!weight_total)
- goto out;
+ /* calculate total, detect system default usage */
+ for_each_node_mask(node, nodes)
+ weight_total += weights[node];
/*
* Calculate rounds/partial rounds to minimize __alloc_pages_bulk calls.
@@ -2733,15 +2707,11 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
*/
rounds = rem_pages / weight_total;
delta = rem_pages % weight_total;
- resume_node = next_node_in(prev_node, pol->nodes);
- if (resume_node >= MAX_NUMNODES)
- goto out;
- resume_weight = table ? table[resume_node] : 1;
+ resume_node = next_node_in(prev_node, nodes);
+ resume_weight = weights[resume_node];
for (i = 0; i < nnodes; i++) {
- node = next_node_in(prev_node, pol->nodes);
- if (node >= MAX_NUMNODES)
- break;
- weight = table ? table[node] : 1;
+ node = next_node_in(prev_node, nodes);
+ weight = weights[node];
node_pages = weight * rounds;
/* If a delta exists, add this node's portion of the delta */
if (delta > weight) {
@@ -2757,8 +2727,6 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
/* node_pages can be 0 if an allocation fails and rounds == 0 */
if (!node_pages)
break;
- /* a rebind can invalidate the counts: never overrun page_array */
- node_pages = min(node_pages, nr_pages - total_allocated);
nr_allocated = __alloc_pages_bulk(gfp, node, NULL, node_pages,
page_array);
page_array += nr_allocated;
@@ -2769,8 +2737,7 @@ static unsigned long alloc_pages_bulk_weighted_interleave(gfp_t gfp,
}
me->il_prev = resume_node;
me->il_weight = resume_weight;
-out:
- srcu_read_unlock_fast(&wi_srcu, scp);
+ kfree(weights);
return total_allocated;
}
@@ -3696,7 +3663,10 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
rcu_assign_pointer(wi_state, new_wi_state);
mutex_unlock(&wi_state_lock);
- wi_state_retire(old_wi_state);
+ if (old_wi_state) {
+ synchronize_rcu();
+ kfree(old_wi_state);
+ }
return count;
}
@@ -3762,7 +3732,10 @@ static ssize_t weighted_interleave_auto_store(struct kobject *kobj,
update_wi_state:
rcu_assign_pointer(wi_state, new_wi_state);
mutex_unlock(&wi_state_lock);
- wi_state_retire(old_wi_state);
+ if (old_wi_state) {
+ synchronize_rcu();
+ kfree(old_wi_state);
+ }
return count;
}
@@ -3806,7 +3779,10 @@ static void wi_state_free(void)
rcu_assign_pointer(wi_state, NULL);
mutex_unlock(&wi_state_lock);
- wi_state_retire(old_wi_state);
+ if (old_wi_state) {
+ synchronize_rcu();
+ kfree(old_wi_state);
+ }
}
static struct kobj_attribute wi_auto_attr = {
diff --git a/mm/migrate.c b/mm/migrate.c
index a369d0c95c38..15b45832bcfa 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -776,9 +776,8 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
{
int cpupid;
- /* Copy the reference state, including PG_referenced */
- folio_migrate_lru_refs(newfolio, folio);
-
+ if (folio_test_referenced(folio))
+ folio_set_referenced(newfolio);
if (folio_test_uptodate(folio))
folio_mark_uptodate(newfolio);
if (folio_test_clear_active(folio)) {
@@ -808,6 +807,7 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
if (folio_test_idle(folio))
folio_set_idle(newfolio);
+ folio_migrate_refs(newfolio, folio);
/*
* Copy NUMA information to the new page, to prevent over-eager
* future migrations of this same page.
diff --git a/mm/migrate_device.c b/mm/migrate_device.c
index 0c437004329d..009bfa8b212d 100644
--- a/mm/migrate_device.c
+++ b/mm/migrate_device.c
@@ -1398,9 +1398,9 @@ static unsigned long migrate_device_pfn_lock(unsigned long pfn)
* @start: starting pfn in the range to migrate.
* @npages: number of pages to migrate.
*
- * migrate_device_range() is similar in concept to migrate_vma_setup(), except
- * that instead of looking up pages based on virtual address mappings, a range
- * of device pfns that should be migrated to system memory is used.
+ * migrate_vma_setup() is similar in concept to migrate_vma_setup() except that
+ * instead of looking up pages based on virtual address mappings a range of
+ * device pfns that should be migrated to system memory is used instead.
*
* This is useful when a driver needs to free device memory but doesn't know the
* virtual mappings of every page that may be in device memory. For example this
diff --git a/mm/mincore.c b/mm/mincore.c
index c086836bc4bc..ff4ac8281768 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -71,7 +71,7 @@ static unsigned char mincore_swap(swp_entry_t entry, bool shmem)
*/
if (shmem) {
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
return 0;
}
folio = swap_cache_get_folio(entry);
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 9ce6060de06d..1533aebafb68 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -29,7 +29,6 @@
#include <linux/cma.h>
#include <linux/crash_dump.h>
#include <linux/execmem.h>
-#include <linux/sizes.h>
#include <linux/vmstat.h>
#include <linux/kexec_handover.h>
#include <linux/hugetlb.h>
@@ -678,33 +677,21 @@ static inline void fixup_hashdist(void)
static inline void fixup_hashdist(void) {}
#endif /* CONFIG_NUMA */
+#if defined(CONFIG_ZONE_DEVICE) || defined(CONFIG_DEFERRED_STRUCT_PAGE_INIT)
static __meminit void pageblock_migratetype_init_range(unsigned long pfn,
- unsigned long nr_pages, int migratetype, bool isolate, bool atomic)
+ unsigned long nr_pages, int migratetype, bool atomic)
{
const unsigned long end = pfn + nr_pages;
for (pfn = pageblock_align(pfn); pfn < end; pfn += pageblock_nr_pages) {
enum migratetype mt = kho_scratch_migratetype(pfn, migratetype);
- init_pageblock_migratetype(pfn_to_page(pfn), mt, isolate);
- if (!atomic && IS_ALIGNED(pfn, PFN_DOWN(SZ_1G)))
+ init_pageblock_migratetype(pfn_to_page(pfn), mt, false);
+ if (!atomic && IS_ALIGNED(pfn, PAGES_PER_SECTION))
cond_resched();
}
}
-
-struct zone __meminit *pfn_to_zone(unsigned long pfn, int nid)
-{
- pg_data_t *pgdat = NODE_DATA(nid);
-
- for (enum zone_type zone_type = 0; zone_type < MAX_NR_ZONES; zone_type++) {
- struct zone *zone = &pgdat->node_zones[zone_type];
-
- if (zone_spans_pfn(zone, pfn))
- return zone;
- }
-
- return NULL;
-}
+#endif
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
static inline void pgdat_set_deferred_range(pg_data_t *pgdat)
@@ -764,14 +751,20 @@ defer_init(int nid, unsigned long pfn, unsigned long end_pfn)
static void __meminit __init_deferred_page(unsigned long pfn, int nid)
{
- struct zone *zone;
+ pg_data_t *pgdat = NODE_DATA(nid);
+ int zid;
if (early_page_initialised(pfn, nid))
return;
- zone = pfn_to_zone(pfn, nid);
- __init_single_page(pfn_to_page(pfn), pfn,
- zone ? zone_idx(zone) : MAX_NR_ZONES, nid);
+ for (zid = 0; zid < MAX_NR_ZONES; zid++) {
+ struct zone *zone = &pgdat->node_zones[zid];
+
+ if (zone_spans_pfn(zone, pfn))
+ break;
+ }
+ __init_single_page(pfn_to_page(pfn), pfn, zid, nid);
+
if (pageblock_aligned(pfn)) {
enum migratetype mt =
kho_scratch_migratetype(pfn, MIGRATE_MOVABLE);
@@ -893,17 +886,6 @@ void __meminit memmap_init_range(unsigned long size, int nid, unsigned long zone
}
}
- /*
- * Vmemmap-optimizable PFNs are backed by shared tail struct pages,
- * which have already been initialized during vmemmap population.
- */
- if (vmemmap_optimizable_pfn(pfn)) {
- const unsigned int order = pfn_to_section_compound_order(pfn);
-
- pfn = min(ALIGN(pfn, 1UL << order), end_pfn);
- continue;
- }
-
page = pfn_to_page(pfn);
__init_single_page(page, pfn, zone, nid);
if (context == MEMINIT_HOTPLUG) {
@@ -915,13 +897,19 @@ void __meminit memmap_init_range(unsigned long size, int nid, unsigned long zone
__SetPageOffline(page);
}
- if (pageblock_aligned(pfn))
+ /*
+ * Usually, we want to mark the pageblock MIGRATE_MOVABLE,
+ * such that unmovable allocations won't be scattered all
+ * over the place during system boot.
+ */
+ if (pageblock_aligned(pfn)) {
+ enum migratetype mt = kho_scratch_migratetype(pfn, migratetype);
+
+ init_pageblock_migratetype(page, mt, isolate_pageblock);
cond_resched();
+ }
pfn++;
}
-
- pageblock_migratetype_init_range(start_pfn, pfn - start_pfn, migratetype,
- isolate_pageblock, /* atomic */ false);
}
static void __init memmap_init_zone_range(struct zone *zone,
@@ -1012,9 +1000,13 @@ static void __ref __init_zone_device_page(struct page *page, unsigned long pfn,
page->zone_device_data = NULL;
/*
- * MEMORY_DEVICE_GENERIC pages regain a refcount of 1 in the free
- * path. The remaining ZONE_DEVICE types start from 0 here and raise
- * the count again when the allocator or driver hands the page out.
+ * ZONE_DEVICE pages other than MEMORY_TYPE_GENERIC are released
+ * directly to the driver page allocator which will set the page count
+ * to 1 when allocating the page.
+ *
+ * MEMORY_TYPE_GENERIC and MEMORY_TYPE_FS_DAX pages automatically have
+ * their refcount reset to one whenever they are freed (ie. after
+ * their refcount drops to 0).
*/
switch (pgmap->type) {
case MEMORY_DEVICE_FS_DAX:
@@ -1029,17 +1021,6 @@ static void __ref __init_zone_device_page(struct page *page, unsigned long pfn,
}
}
-static void zone_device_page_init_from_template(struct page *page,
- unsigned long pfn, struct page *template)
-{
- set_page_section_from_pfn(template, pfn);
-#ifdef WANT_PAGE_VIRTUAL
- if (!is_highmem_idx(ZONE_DEVICE))
- set_page_address(template, __va(pfn << PAGE_SHIFT));
-#endif
- memcpy_nontemporal(page, template, sizeof(*page));
-}
-
/*
* With compound page geometry and when struct pages are stored in ram most
* tail pages are reused. Consequently, the amount of unique struct pages to
@@ -1049,14 +1030,19 @@ static void zone_device_page_init_from_template(struct page *page,
* of an altmap. See vmemmap_populate_compound_pages().
*/
static inline unsigned long compound_nr_pages(unsigned long pfn,
+ struct vmem_altmap *altmap,
struct dev_pagemap *pgmap)
{
- const struct mem_section *ms = __pfn_to_section(pfn);
-
- if (!section_vmemmap_optimizable(ms))
+ /*
+ * If DAX memory is hot-plugged into an unoccupied subsection
+ * of an early section, the unoptimized boot memmap is reused.
+ * See section_activate().
+ */
+ if (early_section(__pfn_to_section(pfn)) ||
+ !vmemmap_can_optimize(altmap, pgmap))
return pgmap_vmemmap_nr(pgmap);
- return VMEMMAP_OPTIMIZATION_PAGES * (PAGE_SIZE / sizeof(struct page));
+ return VMEMMAP_RESERVE_NR * (PAGE_SIZE / sizeof(struct page));
}
static void __ref memmap_init_compound(struct page *head,
@@ -1067,8 +1053,6 @@ static void __ref memmap_init_compound(struct page *head,
{
unsigned long pfn, end_pfn = head_pfn + nr_pages;
unsigned int order = pgmap->vmemmap_shift;
- struct page template;
- struct page *page;
/*
* We have to initialize the pages, including setting up page links.
@@ -1077,23 +1061,13 @@ static void __ref memmap_init_compound(struct page *head,
* the pages in the same go.
*/
__SetPageHead(head);
+ for (pfn = head_pfn + 1; pfn < end_pfn; pfn++) {
+ struct page *page = pfn_to_page(pfn);
- /*
- * All tails of the same compound page share the state established by
- * prep_compound_tail(). Reuse one tail template for the whole range and
- * refresh only the PFN-dependent fields in that template before each copy.
- */
- pfn = head_pfn + 1;
- page = pfn_to_page(pfn);
- __init_zone_device_page(page, pfn, zone_idx, nid, pgmap);
- prep_compound_tail(page, head, order);
- set_page_count(page, 0);
- memcpy(&template, page, sizeof(*page));
-
- /* Initialize the remaining tail pages from template. */
- for (pfn = head_pfn + 2; pfn < end_pfn; pfn++)
- zone_device_page_init_from_template(pfn_to_page(pfn), pfn,
- &template);
+ __init_zone_device_page(page, pfn, zone_idx, nid, pgmap);
+ prep_compound_tail(page, head, order);
+ set_page_count(page, 0);
+ }
prep_compound_head(head, order);
}
@@ -1109,8 +1083,6 @@ void __ref memmap_init_zone_device(struct zone *zone,
unsigned long zone_idx = zone_idx(zone);
unsigned long start = jiffies;
int nid = pgdat->node_id;
- struct page template;
- struct page *page;
if (WARN_ON_ONCE(!pgmap || zone_idx != ZONE_DEVICE))
return;
@@ -1125,28 +1097,10 @@ void __ref memmap_init_zone_device(struct zone *zone,
nr_pages = end_pfn - start_pfn;
}
- if (!nr_pages)
- return;
-
- /*
- * Seed the reusable head-page template from the first real struct
- * page. The normal page-init and refcount helpers must operate on
- * a real memmap entry rather than a stack object.
- */
- pfn = start_pfn;
- page = pfn_to_page(pfn);
- __init_zone_device_page(page, pfn, zone_idx, nid, pgmap);
- memcpy(&template, page, sizeof(*page));
- if (pfns_per_compound != 1)
- memmap_init_compound(page, pfn, zone_idx, nid, pgmap,
- compound_nr_pages(pfn, pgmap));
- pfn += pfns_per_compound;
-
- /* Initialize the remaining head pages from template. */
- for (; pfn < end_pfn; pfn += pfns_per_compound) {
- page = pfn_to_page(pfn);
+ for (pfn = start_pfn; pfn < end_pfn; pfn += pfns_per_compound) {
+ struct page *page = pfn_to_page(pfn);
- zone_device_page_init_from_template(page, pfn, &template);
+ __init_zone_device_page(page, pfn, zone_idx, nid, pgmap);
if (IS_ALIGNED(pfn, PAGES_PER_SECTION))
cond_resched();
@@ -1155,11 +1109,10 @@ void __ref memmap_init_zone_device(struct zone *zone,
continue;
memmap_init_compound(page, pfn, zone_idx, nid, pgmap,
- compound_nr_pages(pfn, pgmap));
+ compound_nr_pages(pfn, altmap, pgmap));
}
- pageblock_migratetype_init_range(start_pfn, nr_pages, MIGRATE_MOVABLE,
- /* isolate */ false, /* atomic */ false);
+ pageblock_migratetype_init_range(start_pfn, nr_pages, MIGRATE_MOVABLE, false);
pr_debug("%s initialised %lu pages in %ums\n", __func__,
nr_pages, jiffies_to_msecs(jiffies - start));
@@ -1213,10 +1166,6 @@ static unsigned long __init __absent_pages_in_range(int nid,
unsigned long start_pfn, end_pfn;
int i;
- /* range is empty, nothing to do */
- if (!nr_absent)
- return 0;
-
for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn);
end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn);
@@ -1238,9 +1187,22 @@ unsigned long __init absent_pages_in_range(unsigned long start_pfn,
return __absent_pages_in_range(MAX_NUMNODES, start_pfn, end_pfn);
}
+/* Return the number of page frames in holes in a zone on a node */
+static unsigned long __init zone_absent_pages_in_node(int nid,
+ unsigned long zone_type,
+ unsigned long zone_start_pfn,
+ unsigned long zone_end_pfn)
+{
+ /* zone is empty, we don't have any absent pages */
+ if (zone_start_pfn == zone_end_pfn)
+ return 0;
+
+ return __absent_pages_in_range(nid, zone_start_pfn, zone_end_pfn);
+}
+
/*
* Return the number of pages a zone spans in a node, including holes
- * present_pages = zone_spanned_pages_in_node() - __absent_pages_in_range()
+ * present_pages = zone_spanned_pages_in_node() - zone_absent_pages_in_node()
*/
static unsigned long __init zone_spanned_pages_in_node(int nid,
unsigned long zone_type,
@@ -1330,8 +1292,9 @@ static void __init calculate_node_totalpages(struct pglist_data *pgdat,
node_end_pfn,
&zone_start_pfn,
&zone_end_pfn);
- absent = __absent_pages_in_range(pgdat->node_id, zone_start_pfn,
- zone_end_pfn);
+ absent = zone_absent_pages_in_node(pgdat->node_id, i,
+ zone_start_pfn,
+ zone_end_pfn);
real_size = spanned - absent;
@@ -1958,8 +1921,7 @@ static void __init deferred_free_pages(unsigned long pfn,
if (!nr_pages)
return;
- pageblock_migratetype_init_range(pfn, nr_pages, MIGRATE_MOVABLE,
- /* isolate */ false, /* atomic */ true);
+ pageblock_migratetype_init_range(pfn, nr_pages, MIGRATE_MOVABLE, true);
page = pfn_to_page(pfn);
@@ -2666,7 +2628,6 @@ void __init mm_core_init_early(void)
{
kho_memory_init_early();
- sparse_sections_init();
free_area_init();
hugetlb_cma_reserve();
diff --git a/mm/mm_init.h b/mm/mm_init.h
index c9fc35e7e9f1..39f75df9be1c 100644
--- a/mm/mm_init.h
+++ b/mm/mm_init.h
@@ -39,7 +39,6 @@ void memmap_init_range(unsigned long size, int nid, unsigned long zone,
enum meminit_context context,
struct vmem_altmap *altmap, int migratetype,
bool isolate_pageblock);
-struct zone *pfn_to_zone(unsigned long pfn, int nid);
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
/* Free whole pageblock and set its migration type to MIGRATE_CMA. */
diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c
index 2f94ee0fdee2..898c2ef1e958 100644
--- a/mm/mmap_lock.c
+++ b/mm/mmap_lock.c
@@ -43,6 +43,9 @@ void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write)
EXPORT_SYMBOL(__mmap_lock_do_trace_released);
#endif /* CONFIG_TRACING */
+#ifdef CONFIG_MMU
+#ifdef CONFIG_PER_VMA_LOCK
+
/* State shared across __vma_[start, end]_exclude_readers. */
struct vma_exclude_readers_state {
/* Input parameters. */
@@ -296,8 +299,6 @@ struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
MA_STATE(mas, &mm->mm_mt, address, address);
struct vm_area_struct *vma;
- if (!IS_ENABLED(CONFIG_MMU))
- return NULL;
retry:
rcu_read_lock();
vma = mas_walk(&mas);
@@ -340,41 +341,6 @@ inval:
return NULL;
}
-/**
- * vma_start_read_unlocked() - Find the VMA covering 'address' and read-lock it.
- * @mm: the mm_struct of the address space to search
- * @address: address that the vma should contain
- *
- * The fast path does not take mmap_lock. Waits for writers to finish if the
- * VMA is being modified by taking mmap_lock.
- * Use when mmap_lock is not held, otherwise use vma_start_read_locked().
- * Nothing prevents VMAs being unmapped/mapped before or after the VMA is
- * looked up, if a stronger guarantee is required, take an mmap_lock.
- *
- * Return: If a VMA exists which spans @address, return that VMA, read-locked.
- * If no VMA is mapped there or, very unlikely, a reference count overflow
- * occurred, return NULL.
- */
-struct vm_area_struct *vma_start_read_unlocked(struct mm_struct *mm,
- unsigned long address)
-{
- struct vm_area_struct *vma;
-
- /* Fast path: return stable VMA covering 'address': */
- vma = lock_vma_under_rcu(mm, address);
- if (vma)
- return vma;
-
- /* Slow path: preclude VMA writers by temporarily getting mmap read lock. */
- mmap_read_lock(mm);
- vma = vma_lookup(mm, address);
- if (vma && !vma_start_read_locked(vma))
- vma = NULL;
- mmap_read_unlock(mm);
-
- return vma;
-}
-
static struct vm_area_struct *lock_next_vma_under_mmap_lock(struct mm_struct *mm,
struct vma_iterator *vmi,
unsigned long from_addr)
@@ -465,6 +431,7 @@ fallback:
return vma;
}
+#endif /* CONFIG_PER_VMA_LOCK */
#ifdef CONFIG_LOCK_MM_AND_FIND_VMA
#include <linux/extable.h>
@@ -581,3 +548,23 @@ fail:
return NULL;
}
#endif /* CONFIG_LOCK_MM_AND_FIND_VMA */
+
+#else /* CONFIG_MMU */
+
+/*
+ * At least xtensa ends up having protection faults even with no
+ * MMU.. No stack expansion, at least.
+ */
+struct vm_area_struct *lock_mm_and_find_vma(struct mm_struct *mm,
+ unsigned long addr, struct pt_regs *regs)
+{
+ struct vm_area_struct *vma;
+
+ mmap_read_lock(mm);
+ vma = vma_lookup(mm, addr);
+ if (!vma)
+ mmap_read_unlock(mm);
+ return vma;
+}
+
+#endif /* CONFIG_MMU */
diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c
index 2a72a9686773..3985d856de7f 100644
--- a/mm/mmu_gather.c
+++ b/mm/mmu_gather.c
@@ -218,6 +218,8 @@ bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page, int page_
#endif /* MMU_GATHER_NO_GATHER */
+#ifdef CONFIG_MMU_GATHER_TABLE_FREE
+
static void __tlb_remove_table_free(struct mmu_table_batch *batch)
{
int i;
@@ -228,8 +230,10 @@ static void __tlb_remove_table_free(struct mmu_table_batch *batch)
free_page((unsigned long)batch);
}
+#ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE
+
/*
- * RCU freeing of the page directories.
+ * Semi RCU freeing of the page directories.
*
* This is needed by some architectures to implement software pagetable walkers.
*
@@ -255,13 +259,13 @@ static void __tlb_remove_table_free(struct mmu_table_batch *batch)
* means.
*
* What we do is batch the freed directory pages (tables) and RCU free them.
- * Disabling IRQs or preemption holds off RCU grace periods, so this protects
- * both rcu_read_lock() and IRQ-disabling walkers.
+ * We use the sched RCU variant, as that guarantees that IRQ/preempt disabling
+ * holds off grace periods.
*
* However, in order to batch these pages we need to allocate storage, this
* allocation is deep inside the MM code and can thus easily fail on memory
- * pressure. To guarantee progress we fall back to single table freeing, which
- * is also RCU-deferred - see the implementation of tlb_remove_table_one().
+ * pressure. To guarantee progress we fall back to single table freeing, see
+ * the implementation of tlb_remove_table_one().
*
*/
@@ -311,6 +315,15 @@ void tlb_remove_table_sync_rcu(void)
synchronize_rcu();
}
+#else /* !CONFIG_MMU_GATHER_RCU_TABLE_FREE */
+
+static void tlb_remove_table_free(struct mmu_table_batch *batch)
+{
+ __tlb_remove_table_free(batch);
+}
+
+#endif /* CONFIG_MMU_GATHER_RCU_TABLE_FREE */
+
/*
* If we want tlb_remove_table() to imply TLB invalidates.
*/
@@ -390,6 +403,13 @@ static inline void tlb_table_init(struct mmu_gather *tlb)
tlb->batch = NULL;
}
+#else /* !CONFIG_MMU_GATHER_TABLE_FREE */
+
+static inline void tlb_table_flush(struct mmu_gather *tlb) { }
+static inline void tlb_table_init(struct mmu_gather *tlb) { }
+
+#endif /* CONFIG_MMU_GATHER_TABLE_FREE */
+
static void tlb_flush_mmu_free(struct mmu_gather *tlb)
{
tlb_table_flush(tlb);
diff --git a/mm/nommu.c b/mm/nommu.c
index ed44510e3770..498e01ee40b0 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1674,9 +1674,6 @@ static int __access_remote_vm(struct mm_struct *mm, unsigned long addr,
struct vm_area_struct *vma;
int write = gup_flags & FOLL_WRITE;
- if (addr + len < addr)
- return 0;
-
if (mmap_read_lock_killable(mm))
return 0;
@@ -1730,6 +1727,9 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
{
struct mm_struct *mm;
+ if (addr + len < addr)
+ return 0;
+
mm = get_task_mm(tsk);
if (!mm)
return 0;
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 5d48bd862c27..5f372f6e26fa 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -230,7 +230,7 @@ long oom_badness(struct task_struct *p, unsigned long totalpages)
task_unlock(p);
/* Normalize to oom_score_adj units */
- adj *= totalpages / OOM_SCORE_ADJ_MAX;
+ adj *= totalpages / 1000;
points += adj;
return points;
@@ -267,11 +267,18 @@ static enum oom_constraint constrained_alloc(struct oom_control *oc)
if (!oc->zonelist)
return CONSTRAINT_NONE;
+ /*
+ * Reach here only when __GFP_NOFAIL is used. So, we should avoid
+ * to kill current.We have to random task kill in this case.
+ * Hopefully, CONSTRAINT_THISNODE...but no way to handle it, now.
+ */
+ if (oc->gfp_mask & __GFP_THISNODE)
+ return CONSTRAINT_NONE;
/*
- * A truncated nodemask in the page allocator means a mempolicy
- * is in effect. Cpuset policy is enforced in
- * get_page_from_freelist().
+ * This is not a __GFP_THISNODE allocation, so a truncated nodemask in
+ * the page allocator means a mempolicy is in effect. Cpuset policy
+ * is enforced in get_page_from_freelist().
*/
if (oc->nodemask &&
!nodes_subset(node_states[N_MEMORY], *oc->nodemask)) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bcdde83ab83d..30d0a6b9ff55 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -613,13 +613,31 @@ static inline bool __maybe_unused bad_range(struct zone *zone, struct page *page
}
#endif
-/* Allow a burst of 60 reports per minute */
-static DEFINE_RATELIMIT_STATE(bad_page_ratelimit, 60 * HZ, 60);
-
static void bad_page(struct page *page, const char *reason)
{
- if (!__ratelimit(&bad_page_ratelimit))
- goto out;
+ static unsigned long resume;
+ static unsigned long nr_shown;
+ static unsigned long nr_unshown;
+
+ /*
+ * Allow a burst of 60 reports, then keep quiet for that minute;
+ * or allow a steady drip of one report per second.
+ */
+ if (nr_shown == 60) {
+ if (time_before(jiffies, resume)) {
+ nr_unshown++;
+ goto out;
+ }
+ if (nr_unshown) {
+ pr_alert(
+ "BUG: Bad page state: %lu messages suppressed\n",
+ nr_unshown);
+ nr_unshown = 0;
+ }
+ nr_shown = 0;
+ }
+ if (nr_shown++ == 0)
+ resume = jiffies + 60 * HZ;
pr_alert("BUG: Bad page state in process %s pfn:%05lx\n",
current->comm, page_to_pfn(page));
@@ -4798,7 +4816,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
if (unlikely(nofail)) {
/*
- * We don't support __GFP_NOFAIL without __GFP_DIRECT_RECLAIM,
+ * Also we don't support __GFP_NOFAIL without __GFP_DIRECT_RECLAIM,
* otherwise, we may result in lockup.
*/
WARN_ON_ONCE(!can_direct_reclaim);
@@ -5273,8 +5291,6 @@ retry_this_zone:
nr_account++;
prep_new_page(page, 0, gfp, ALLOC_DEFAULT);
- trace_mm_page_alloc(page, 0, gfp, ac.migratetype);
- kmsan_alloc_page(page, 0, gfp & ~__GFP_RECLAIM);
set_page_refcounted(page);
page_array[nr_populated++] = page;
}
@@ -7974,7 +7990,7 @@ static bool cond_accept_memory(struct zone *zone, unsigned int order,
/*
* Watermarks have not been initialized yet.
*
- * Accepting one MAX_PAGE_ORDER page to ensure progress.
+ * Accepting one MAX_ORDER page to ensure progress.
*/
if (!wmark)
return try_to_accept_memory_one(zone);
diff --git a/mm/page_counter.c b/mm/page_counter.c
index 98322803941a..661e0f2a5127 100644
--- a/mm/page_counter.c
+++ b/mm/page_counter.c
@@ -8,7 +8,6 @@
#include <linux/page_counter.h>
#include <linux/atomic.h>
#include <linux/kernel.h>
-#include <linux/math64.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/bug.h>
@@ -48,26 +47,6 @@ static void propagate_protected_usage(struct page_counter *c,
}
/**
- * page_counter_margin - remaining usable space within hierarchical limits
- * @counter: counter
- *
- * Return: The minimum value of max minus usage across @counter and all of
- * its ancestors. The value may be negative during a concurrent charge.
- */
-long page_counter_margin(struct page_counter *counter)
-{
- long margin = PAGE_COUNTER_MAX;
-
- do {
- long m = READ_ONCE(counter->max) - page_counter_read(counter);
-
- margin = min(margin, m);
- } while ((counter = counter->parent));
-
- return margin;
-}
-
-/**
* page_counter_cancel - take pages out of the local counter
* @counter: counter
* @nr_pages: number of pages to cancel
@@ -377,8 +356,7 @@ static unsigned long effective_protection(unsigned long usage,
* otherwise get a smaller chunk than what they claimed.
*/
if (siblings_protected > parent_effective)
- return mul_u64_u64_div_u64(protected, parent_effective,
- siblings_protected);
+ return protected * parent_effective / siblings_protected;
/*
* Ok, utilized protection of all children is within what the
@@ -419,20 +397,13 @@ static unsigned long effective_protection(unsigned long usage,
if (parent_effective > siblings_protected &&
parent_usage > siblings_protected &&
usage > protected) {
- unsigned long parent_unclaimed, parent_unprotected, unprotected;
+ unsigned long unclaimed;
- parent_unclaimed = parent_effective - siblings_protected;
- parent_unprotected = parent_usage - siblings_protected;
-
- /*
- * The usages aren't read atomically, so a child can transiently
- * appear to use more than its parent, making the ratio exceed 1
- * and the quotient overflow 64 bits (#DE on x86). Cap it.
- */
- unprotected = min(usage - protected, parent_unprotected);
+ unclaimed = parent_effective - siblings_protected;
+ unclaimed *= usage - protected;
+ unclaimed /= parent_usage - siblings_protected;
- ep += mul_u64_u64_div_u64(parent_unclaimed, unprotected,
- parent_unprotected);
+ ep += unclaimed;
}
return ep;
diff --git a/mm/page_io.c b/mm/page_io.c
index 1da4ff484f09..88962571cb93 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -160,7 +160,7 @@ static void swap_zeromap_folio_set(struct folio *folio)
struct obj_cgroup *objcg = get_obj_cgroup_from_folio(folio);
int nr_pages = folio_nr_pages(folio);
struct swap_cluster_info *ci;
- swp_entry_t entry = folio->swap;
+ swp_entry_t entry;
unsigned int i;
VM_WARN_ON_ONCE_FOLIO(!folio_test_swapcache(folio), folio);
@@ -168,8 +168,8 @@ static void swap_zeromap_folio_set(struct folio *folio)
ci = swap_cluster_get_and_lock(folio);
for (i = 0; i < folio_nr_pages(folio); i++) {
+ entry = page_swap_entry(folio_page(folio, i));
__swap_table_set_zero(ci, swp_cluster_offset(entry));
- entry.val++;
}
swap_cluster_unlock(ci);
@@ -183,7 +183,7 @@ static void swap_zeromap_folio_set(struct folio *folio)
static void swap_zeromap_folio_clear(struct folio *folio)
{
struct swap_cluster_info *ci;
- swp_entry_t entry = folio->swap;
+ swp_entry_t entry;
unsigned int i;
VM_WARN_ON_ONCE_FOLIO(!folio_test_swapcache(folio), folio);
@@ -191,8 +191,8 @@ static void swap_zeromap_folio_clear(struct folio *folio)
ci = swap_cluster_get_and_lock(folio);
for (i = 0; i < folio_nr_pages(folio); i++) {
+ entry = page_swap_entry(folio_page(folio, i));
__swap_table_clear_zero(ci, swp_cluster_offset(entry));
- entry.val++;
}
swap_cluster_unlock(ci);
}
@@ -209,7 +209,7 @@ int swap_writeout(struct swap_io_ctx *ctx, struct folio *folio)
goto out_unlock;
/*
- * Arch code may have to preserve more data than just the folio
+ * Arch code may have to preserve more data than just the page
* contents, e.g. memory tags.
*/
ret = arch_prepare_to_swap(folio);
@@ -220,7 +220,7 @@ int swap_writeout(struct swap_io_ctx *ctx, struct folio *folio)
/*
* Use the swap table zero mark to avoid doing IO for zero-filled
- * folios. The zero mark is protected by the cluster lock, which is
+ * pages. The zero mark is protected by the cluster lock, which is
* acquired internally by swap_zeromap_folio_set/clear.
*/
if (is_folio_zero_filled(folio)) {
@@ -248,7 +248,7 @@ int swap_writeout(struct swap_io_ctx *ctx, struct folio *folio)
}
rcu_read_unlock();
- __swap_writeout(ctx, folio);
+ __swap_writepage(ctx, folio);
return 0;
out_unlock:
folio_unlock(folio);
@@ -277,7 +277,7 @@ static bool folio_blkg_can_merge(struct folio *folio, struct folio *prev_folio)
return can_merge;
}
-static void bio_associate_blkg_from_folio(struct bio *bio, struct folio *folio)
+static void bio_associate_blkg_from_page(struct bio *bio, struct folio *folio)
{
struct cgroup_subsys_state *css;
@@ -298,9 +298,7 @@ static bool folio_blkg_can_merge(struct folio *folio, struct folio *prev_folio)
{
return true;
}
-static void bio_associate_blkg_from_folio(struct bio *bio, struct folio *folio)
-{
-}
+#define bio_associate_blkg_from_page(bio, folio) do { } while (0)
#endif /* CONFIG_MEMCG && CONFIG_BLK_CGROUP */
static mempool_t *sio_pool;
@@ -369,7 +367,7 @@ static void swap_add_folio(struct swap_io_ctx *ctx, struct folio *folio, int rw)
}
}
-void __swap_writeout(struct swap_io_ctx *ctx, struct folio *folio)
+void __swap_writepage(struct swap_io_ctx *ctx, struct folio *folio)
{
VM_BUG_ON_FOLIO(!folio_test_swapcache(folio), folio);
@@ -499,13 +497,13 @@ static void swap_write_end(struct swap_iocb *sio, bool failed)
int p;
for (p = 0; p < sio->nr_bvecs; p++) {
- struct folio *folio = bvec_folio(&sio->bvecs[p]);
+ struct page *page = sio->bvecs[p].bv_page;
if (failed) {
- folio_mark_dirty(folio);
- folio_clear_reclaim(folio);
+ set_page_dirty(page);
+ ClearPageReclaim(page);
}
- folio_end_writeback(folio);
+ end_page_writeback(page);
}
mempool_free(sio, sio_pool);
}
@@ -516,16 +514,16 @@ static void swap_fs_write_complete(struct kiocb *iocb, long ret)
bool failed = ret != sio->len;
if (failed) {
- struct folio *folio = bvec_folio(&sio->bvecs[0]);
+ struct page *page = sio->bvecs[0].bv_page;
/*
* In the case of swap-over-nfs, this can be a temporary failure
* if the system has limited memory for allocating transmit
- * buffers. Mark the folio dirty and avoid
+ * buffers. Mark the page dirty and avoid
* folio_rotate_reclaimable but rate-limit the messages.
*/
pr_err_ratelimited("Write error %ld on dio swapfile (%llu)\n",
- ret, swap_dev_pos(folio->swap));
+ ret, swap_dev_pos(page_swap_entry(page)));
}
swap_write_end(sio, failed);
@@ -598,7 +596,7 @@ static void swap_bdev_submit_write(struct swap_io_ctx *ctx)
REQ_OP_WRITE | REQ_SWAP);
bio->bi_iter.bi_size = sio->len;
bio->bi_iter.bi_sector = swap_folio_sector(bio_first_folio_all(bio));
- bio_associate_blkg_from_folio(bio, bio_first_folio_all(bio));
+ bio_associate_blkg_from_page(bio, bio_first_folio_all(bio));
if (ctx->sis->flags & SWP_SYNCHRONOUS_IO) {
submit_bio_wait(bio);
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 5aaad037384e..e5dfc7bf4944 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -388,19 +388,13 @@ static int isolate_single_pageblock(unsigned long boundary_pfn,
}
if (PageBuddy(page)) {
- unsigned int order = buddy_order_unsafe(page);
+ int order = buddy_order(page);
- /* buddy_order_unsafe() is racy. Validate the order before shifting. */
- if (order <= MAX_PAGE_ORDER &&
- /*
- * pageblock_isolate_and_move_free_pages() splits
- * cross-boundary PageBuddy, verify it.
- */
- pfn + (1UL << order) <= boundary_pfn) {
- pfn += 1UL << order;
- continue;
- }
- goto failed;
+ /* pageblock_isolate_and_move_free_pages() handled this */
+ VM_WARN_ON_ONCE(pfn + (1 << order) > boundary_pfn);
+
+ pfn += 1UL << order;
+ continue;
}
/*
@@ -419,28 +413,10 @@ static int isolate_single_pageblock(unsigned long boundary_pfn,
if (PageCompound(page)) {
struct page *head = compound_head(page);
unsigned long head_pfn = page_to_pfn(head);
- unsigned int order = compound_order(head);
- unsigned long nr_pages;
-
- /* compound_order() is racy. Cap it at MAX_FOLIO_ORDER. */
- if (order > MAX_FOLIO_ORDER)
- goto failed;
-
- nr_pages = 1UL << order;
-
- /*
- * compound_head() is also racy, so the derived head_pfn
- * needs additional checks to make sure it is valid.
- * Otherwise, just fail the check. pfn comes from
- * __first_valid_page() as a legitimate PFN, so use it to
- * check head_pfn.
- */
- if (head_pfn > pfn || !IS_ALIGNED(head_pfn, nr_pages) ||
- pfn - head_pfn >= nr_pages)
- goto failed;
+ unsigned long nr_pages = compound_nr(head);
if (head_pfn + nr_pages <= boundary_pfn ||
- PageHuge(head)) {
+ PageHuge(page)) {
pfn = head_pfn + nr_pages;
continue;
}
diff --git a/mm/page_owner.c b/mm/page_owner.c
index cfc31c92d765..fbbda7ba914b 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -307,8 +307,8 @@ static inline void __update_page_owner_free_handle(struct page *page,
page_owner->free_handle = handle;
}
page_owner->free_ts_nsec = free_ts_nsec;
- page_owner->free_pid = pid;
- page_owner->free_tgid = tgid;
+ page_owner->free_pid = current->pid;
+ page_owner->free_tgid = current->tgid;
}
rcu_read_unlock();
}
@@ -575,7 +575,7 @@ static inline int print_page_owner_memcg(char *kbuf, size_t count, int ret,
}
objcg = (void *)(memcg_data & ~OBJEXTS_FLAGS_MASK);
- memcg = obj_cgroup_memcg(objcg);
+ memcg = objcg ? obj_cgroup_memcg(objcg) : NULL;
if (!memcg)
goto out_unlock;
diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 143a918c0bde..6ffc536359cd 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -67,7 +67,7 @@ static void page_table_check_clear(unsigned long pfn, unsigned long pgcnt)
struct page *page;
bool anon;
- if (!pfn_valid(pfn) || is_zero_pfn(pfn) || is_huge_zero_pfn(pfn))
+ if (!pfn_valid(pfn))
return;
page = pfn_to_page(pfn);
@@ -102,7 +102,7 @@ static void page_table_check_set(unsigned long pfn, unsigned long pgcnt,
struct page *page;
bool anon;
- if (!pfn_valid(pfn) || is_zero_pfn(pfn) || is_huge_zero_pfn(pfn))
+ if (!pfn_valid(pfn))
return;
page = pfn_to_page(pfn);
@@ -278,7 +278,7 @@ void __page_table_check_pte_clear_range(struct mm_struct *mm,
if (&init_mm == mm)
return;
- if (!pmd_none(pmd) && !pmd_bad(pmd) && !pmd_leaf(pmd)) {
+ if (!pmd_bad(pmd) && !pmd_leaf(pmd)) {
pte_t *ptep = pte_offset_map(&pmd, addr);
unsigned long i;
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 28e306fdb3a5..4e964545e5e8 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c
@@ -142,7 +142,6 @@ static bool check_pte(struct page_vma_mapped_walk *pvmw, unsigned long pte_nr)
return true;
}
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
/* Returns true if the two ranges overlap. Careful to not overflow. */
static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
{
@@ -152,12 +151,6 @@ static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
return false;
return true;
}
-#else
-static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
-{
- return false;
-}
-#endif
static void step_forward(struct page_vma_mapped_walk *pvmw, unsigned long size)
{
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 7411702a37f5..cc07fcf50e87 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -444,6 +444,7 @@ static inline void process_mm_walk_lock(struct mm_struct *mm,
static inline void process_vma_walk_lock(struct vm_area_struct *vma,
enum page_walk_lock walk_lock)
{
+#ifdef CONFIG_PER_VMA_LOCK
switch (walk_lock) {
case PGWALK_WRLOCK:
vma_start_write(vma);
@@ -458,6 +459,7 @@ static inline void process_vma_walk_lock(struct vm_area_struct *vma,
/* PGWALK_RDLOCK is handled by process_mm_walk_lock */
break;
}
+#endif
}
/*
diff --git a/mm/percpu.c b/mm/percpu.c
index 3eff382e565a..a802d72c116f 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -100,7 +100,7 @@
/*
* The slots are sorted by the size of the biggest continuous free area.
- * [PCPU_MIN_ALLOC_SIZE..15] bytes share the same slot.
+ * 1-31 bytes share the same slot.
*/
#define PCPU_SLOT_BASE_SHIFT 5
/* chunks in slots below this are subject to being sidelined on failed alloc */
@@ -758,6 +758,7 @@ static void pcpu_chunk_refresh_hint(struct pcpu_chunk *chunk, bool full_scan)
chunk_md->contig_hint = 0;
}
+ bits = 0;
pcpu_for_each_md_free_region(chunk, bit_off, bits)
pcpu_block_update(chunk_md, bit_off, bit_off + bits);
}
@@ -1121,6 +1122,7 @@ static int pcpu_find_block_fit(struct pcpu_chunk *chunk, int alloc_bits,
return -1;
bit_off = pcpu_next_hint(chunk_md, alloc_bits);
+ bits = 0;
pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) {
if (!pop_only || pcpu_is_populated(chunk, bit_off, bits,
&next_off))
@@ -2817,7 +2819,7 @@ static struct pcpu_alloc_info * __init __flatten pcpu_build_alloc_info(
static int group_cnt[NR_CPUS] __initdata;
static struct cpumask mask __initdata;
const size_t static_size = __per_cpu_end - __per_cpu_start;
- int nr_groups, nr_units = 0;
+ int nr_groups = 1, nr_units = 0;
size_t size_sum, min_unit_size, alloc_size;
int upa, max_upa, best_upa; /* units_per_alloc */
int last_allocs, group, unit;
@@ -2828,6 +2830,7 @@ static struct pcpu_alloc_info * __init __flatten pcpu_build_alloc_info(
/* this function may be called multiple times */
memset(group_map, 0, sizeof(group_map));
memset(group_cnt, 0, sizeof(group_cnt));
+ cpumask_clear(&mask);
/* calculate size_sum and ensure dyn_size is enough for early alloc */
size_sum = PFN_ALIGN(static_size + reserved_size +
@@ -3178,6 +3181,8 @@ void __init __weak pcpu_populate_pte(unsigned long addr)
new = memblock_alloc_or_panic(PTE_TABLE_SIZE, PTE_TABLE_SIZE);
pmd_populate_kernel(&init_mm, pmd, new);
}
+
+ return;
}
/**
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index f3754cefb19e..b91b1a98029c 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -26,20 +26,14 @@
void pgd_clear_bad(pgd_t *pgd)
{
- char str[PTVAL_STR_MAX];
-
- ptval_to_str(str, pgd_val(*pgd));
- pr_err("bad pgd %s.\n", str);
+ pgd_ERROR(*pgd);
pgd_clear(pgd);
}
#ifndef __PAGETABLE_P4D_FOLDED
void p4d_clear_bad(p4d_t *p4d)
{
- char str[PTVAL_STR_MAX];
-
- ptval_to_str(str, p4d_val(*p4d));
- pr_err("bad p4d %s.\n", str);
+ p4d_ERROR(*p4d);
p4d_clear(p4d);
}
#endif
@@ -47,10 +41,7 @@ void p4d_clear_bad(p4d_t *p4d)
#ifndef __PAGETABLE_PUD_FOLDED
void pud_clear_bad(pud_t *pud)
{
- char str[PTVAL_STR_MAX];
-
- ptval_to_str(str, pud_val(*pud));
- pr_err("bad pud %s.\n", str);
+ pud_ERROR(*pud);
pud_clear(pud);
}
#endif
@@ -62,10 +53,7 @@ void pud_clear_bad(pud_t *pud)
*/
void pmd_clear_bad(pmd_t *pmd)
{
- char str[PTVAL_STR_MAX];
-
- ptval_to_str(str, pmd_val(*pmd));
- pr_err("bad pmd %s.\n", str);
+ pmd_ERROR(*pmd);
pmd_clear(pmd);
}
@@ -397,17 +385,10 @@ pte_t *pte_offset_map_rw_nolock(struct mm_struct *mm, pmd_t *pmd,
* Note: "RO" / "RW" expresses the intended semantics, not that the *kmap* will
* be read-only/read-write protected.
*
- * Note that free_pgtables(), used after unmapping detached vmas or when exiting
- * the whole mm, does not take a page table lock before freeing a page table.
- *
- * As page table freeing itself is RCU-safe, page table readers can safely run
- * concurrently with page table teardown.
- *
- * However, writers CANNOT as, without a lock being held, nothing prevents
- * concurrent teardown.
- *
- * Also note that the PGD itself is freed at mmdrop() time, not under RCU - so
- * the walker must keep the mm alive either by pinning the mm or the VMA.
+ * Note that free_pgtables(), used after unmapping detached vmas, or when
+ * exiting the whole mm, does not take page table lock before freeing a page
+ * table, and may not use RCU at all: "outsiders" like khugepaged should avoid
+ * pte_offset_map() and co once the vma is detached from mm or mm_users is zero.
*/
pte_t *pte_offset_map_lock(struct mm_struct *mm, pmd_t *pmd,
unsigned long addr, spinlock_t **ptlp)
diff --git a/mm/rmap.c b/mm/rmap.c
index 5332c52909be..f3b21aaa34ee 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -264,9 +264,11 @@ static void check_anon_vma_clone(struct vm_area_struct *dst,
/* For the anon_vma to be compatible, it can only be singular. */
VM_WARN_ON_ONCE(operation == VMA_OP_MERGE_UNFAULTED &&
!list_is_singular(&src->anon_vma_chain));
+#ifdef CONFIG_PER_VMA_LOCK
/* Only merging an unfaulted VMA leaves the destination attached. */
VM_WARN_ON_ONCE(operation != VMA_OP_MERGE_UNFAULTED &&
vma_is_attached(dst));
+#endif
}
static void maybe_reuse_anon_vma(struct vm_area_struct *dst,
@@ -2147,7 +2149,7 @@ static bool ttu_anon_swapbacked_folio(struct vm_area_struct *vma,
{
const bool anon_exclusive = folio_test_anon(folio) &&
PageAnonExclusive(page);
- swp_entry_t entry = folio_page_swap_entry(folio, page);
+ swp_entry_t entry = page_swap_entry(page);
struct mm_struct *mm = vma->vm_mm;
if (folio_dup_swap(folio, page) < 0)
@@ -2301,8 +2303,11 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma,
VM_BUG_ON_FOLIO(!pvmw.pte, folio);
address = pvmw.address;
- pteval = ptep_get(pvmw.pte);
-
+ if (folio_test_hugetlb(folio)) {
+ pteval = huge_ptep_get(mm, address, pvmw.pte);
+ } else {
+ pteval = ptep_get(pvmw.pte);
+ }
if (likely(pte_present(pteval))) {
pfn = pte_pfn(pteval);
} else {
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 6cbb8efc994a..384f5cfc457f 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -139,7 +139,7 @@ retry:
goto out;
}
- err = set_direct_map_invalid_noflush(folio_page(folio, 0), 1);
+ err = set_direct_map_invalid_noflush(folio_page(folio, 0));
if (err) {
secretmem_unaccount_folio(state, folio);
folio_put(folio);
@@ -156,7 +156,7 @@ retry:
* already happened when we marked the page invalid
* which guarantees that this call won't fail
*/
- set_direct_map_default_noflush(folio_page(folio, 0), 1);
+ set_direct_map_default_noflush(folio_page(folio, 0));
folio_put(folio);
if (err == -EEXIST)
goto retry;
@@ -228,7 +228,7 @@ static int secretmem_migrate_folio(struct address_space *mapping,
static void secretmem_free_folio(struct folio *folio)
{
- set_direct_map_default_noflush(folio_page(folio, 0), 1);
+ set_direct_map_default_noflush(folio_page(folio, 0));
folio_zero_segment(folio, 0, folio_size(folio));
}
diff --git a/mm/shmem.c b/mm/shmem.c
index b572c60f2af8..c6be59619562 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -725,258 +725,51 @@ static const char *shmem_format_huge(int huge)
}
#endif
-static bool is_shmem_unused_huge_isolated(struct shmem_inode_info *info)
-{
-
- return info->shrinklist_nid == -1;
-}
-
-static void set_shmem_unused_huge_isolated(struct shmem_inode_info *info)
-{
- info->shrinklist_nid = -1;
-}
-
-static struct obj_cgroup *shmem_get_and_clear_objcg(struct shmem_inode_info *info)
-{
- struct obj_cgroup *objcg = info->shrinklist_objcg;
-
- info->shrinklist_objcg = NULL;
-
- return objcg;
-}
-
-#ifdef CONFIG_MEMCG
-static struct obj_cgroup *
-shmem_unused_huge_alloc_lru(struct shmem_sb_info *sbinfo, struct folio *folio,
- gfp_t gfp)
-{
- int ret;
-
- ret = folio_memcg_list_lru_alloc(folio, &sbinfo->shrinklist, gfp);
- if (ret)
- return ERR_PTR(ret);
-
- return get_obj_cgroup_from_folio(folio);
-}
-#else
-static struct obj_cgroup *
-shmem_unused_huge_alloc_lru(struct shmem_sb_info *sbinfo, struct folio *folio,
- gfp_t gfp)
-{
- return NULL;
-}
-#endif
-
-static void shmem_unused_huge_lru_add(struct shmem_sb_info *sbinfo,
- struct list_head *item, int nid,
- struct obj_cgroup *objcg)
-{
- struct mem_cgroup *memcg;
-
- rcu_read_lock();
- memcg = obj_cgroup_memcg(objcg);
- list_lru_add(&sbinfo->shrinklist, item, nid, memcg);
- rcu_read_unlock();
-}
-
-static void shmem_unused_huge_lru_del(struct shmem_sb_info *sbinfo,
- struct list_head *item, int nid,
- struct obj_cgroup *objcg)
-{
- struct mem_cgroup *memcg;
-
- rcu_read_lock();
- memcg = obj_cgroup_memcg(objcg);
- list_lru_del(&sbinfo->shrinklist, item, nid, memcg);
- rcu_read_unlock();
-}
-
-static void shmem_unused_huge_add(struct inode *inode, struct folio *folio,
- gfp_t gfp)
-{
- struct shmem_inode_info *info = SHMEM_I(inode);
- struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
- int nid = folio_nid(folio);
- struct obj_cgroup *objcg = NULL, *old_objcg = NULL;
-
- objcg = shmem_unused_huge_alloc_lru(sbinfo, folio, gfp);
- if (IS_ERR(objcg))
- return;
-
- spin_lock(&info->lock);
- if (!list_empty(&info->shrinklist)) {
- /* isolated on scan list, let shrink handle it */
- if (is_shmem_unused_huge_isolated(info))
- goto unlock;
-
- if (info->shrinklist_nid == nid &&
- info->shrinklist_objcg == objcg)
- goto unlock;
-
- shmem_unused_huge_lru_del(sbinfo, &info->shrinklist,
- info->shrinklist_nid,
- info->shrinklist_objcg);
- old_objcg = shmem_get_and_clear_objcg(info);
- }
-
- info->shrinklist_objcg = objcg;
- info->shrinklist_nid = nid;
- shmem_unused_huge_lru_add(sbinfo, &info->shrinklist, nid, objcg);
- objcg = NULL;
-unlock:
- spin_unlock(&info->lock);
- obj_cgroup_put(old_objcg);
- obj_cgroup_put(objcg);
-}
-
-static void shmem_unused_huge_del(struct inode *inode)
-{
- struct shmem_inode_info *info = SHMEM_I(inode);
- struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
- struct obj_cgroup *objcg = NULL;
-
- spin_lock(&info->lock);
- if (!list_empty(&info->shrinklist)) {
- shmem_unused_huge_lru_del(sbinfo, &info->shrinklist,
- info->shrinklist_nid,
- info->shrinklist_objcg);
- objcg = shmem_get_and_clear_objcg(info);
- }
- spin_unlock(&info->lock);
-
- obj_cgroup_put(objcg);
-}
-
-struct shmem_unused_huge_scan {
- struct list_head list;
- struct shrink_control *sc;
-};
-
-static enum lru_status shmem_unused_huge_isolate(struct list_head *item,
- struct list_lru_one *lru,
- void *arg)
-{
- struct shmem_unused_huge_scan *scan = arg;
- struct shmem_inode_info *info;
- struct inode *inode;
- struct obj_cgroup *objcg = NULL;
-
- info = list_entry(item, struct shmem_inode_info, shrinklist);
-
- /*
- * Use trylock to avoid ABBA deadlock: add/del path takes info->lock
- * before the list_lru bucket lock, while here the order is reversed.
- */
- if (!spin_trylock(&info->lock))
- return LRU_SKIP;
-
- /* pin the inode */
- inode = igrab(&info->vfs_inode);
- /* inode is about to be evicted */
- if (!inode) {
- list_lru_isolate(lru, item);
- objcg = shmem_get_and_clear_objcg(info);
- spin_unlock(&info->lock);
- obj_cgroup_put(objcg);
- return LRU_REMOVED;
- }
-
- list_lru_isolate(lru, item);
- objcg = shmem_get_and_clear_objcg(info);
- set_shmem_unused_huge_isolated(info);
- list_add_tail(&info->shrinklist, &scan->list);
- spin_unlock(&info->lock);
- obj_cgroup_put(objcg);
-
- return LRU_REMOVED;
-}
-
-static bool is_shmem_unused_huge_match(struct folio *folio,
- struct shrink_control *sc)
-{
- struct mem_cgroup *memcg = NULL;
- bool match;
-
- /* shmem quota reclaim has no NUMA node or memcg restriction */
- if (!sc)
- return true;
-
- if (folio_nid(folio) != sc->nid)
- return false;
-
- /*
- * Only non-root memcg reclaim needs to match the folio charge against
- * sc->memcg. Skip the folio memcg check for global shrinker reclaim and
- * root memcg reclaim.
- */
- if (!sc->memcg || mem_cgroup_is_root(sc->memcg))
- return true;
-
- memcg = get_mem_cgroup_from_folio(folio);
- match = memcg == sc->memcg;
- mem_cgroup_put(memcg);
-
- return match;
-}
-
-static void shmem_unused_huge_drop(struct inode *inode)
-{
- struct shmem_inode_info *info = SHMEM_I(inode);
-
- spin_lock(&info->lock);
- list_del_init(&info->shrinklist);
- spin_unlock(&info->lock);
-}
-
-static void shmem_unused_huge_requeue(struct inode *inode, struct folio *folio)
-{
- struct shmem_inode_info *info = SHMEM_I(inode);
- struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
- struct obj_cgroup *objcg;
- int nid = folio_nid(folio);
-
- objcg = shmem_unused_huge_alloc_lru(sbinfo, folio, GFP_NOWAIT);
- if (IS_ERR(objcg)) {
- shmem_unused_huge_drop(inode);
- return;
- }
-
- spin_lock(&info->lock);
- /* Requeue the inode to shrinklist */
- list_del_init(&info->shrinklist);
- shmem_unused_huge_lru_add(sbinfo, &info->shrinklist, nid, objcg);
- info->shrinklist_objcg = objcg;
- info->shrinklist_nid = nid;
- spin_unlock(&info->lock);
-}
-
static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
struct shrink_control *sc, unsigned long nr_to_free)
{
- struct shmem_unused_huge_scan scan;
+ LIST_HEAD(list), *pos, *next;
struct inode *inode;
struct shmem_inode_info *info;
struct folio *folio;
- struct list_head *pos, *next;
+ unsigned long batch = sc ? sc->nr_to_scan : 128;
unsigned long split = 0, freed = 0;
- INIT_LIST_HEAD(&scan.list);
- scan.sc = sc;
- if (sc)
- list_lru_shrink_walk(&sbinfo->shrinklist, sc,
- shmem_unused_huge_isolate, &scan);
- else
- list_lru_walk(&sbinfo->shrinklist, shmem_unused_huge_isolate,
- &scan, 128);
+ if (list_empty(&sbinfo->shrinklist))
+ return SHRINK_STOP;
+
+ spin_lock(&sbinfo->shrinklist_lock);
+ list_for_each_safe(pos, next, &sbinfo->shrinklist) {
+ info = list_entry(pos, struct shmem_inode_info, shrinklist);
+
+ /* pin the inode */
+ inode = igrab(&info->vfs_inode);
+
+ /* inode is about to be evicted */
+ if (!inode) {
+ list_del_init(&info->shrinklist);
+ goto next;
+ }
+
+ list_move(&info->shrinklist, &list);
+next:
+ sbinfo->shrinklist_len--;
+ if (!--batch)
+ break;
+ }
+ spin_unlock(&sbinfo->shrinklist_lock);
- list_for_each_safe(pos, next, &scan.list) {
- pgoff_t folio_end, end;
+ list_for_each_safe(pos, next, &list) {
+ pgoff_t next, end;
loff_t i_size;
int ret;
info = list_entry(pos, struct shmem_inode_info, shrinklist);
inode = &info->vfs_inode;
+ if (nr_to_free && freed >= nr_to_free)
+ goto move_back;
+
i_size = i_size_read(inode);
folio = filemap_get_entry(inode->i_mapping, i_size / PAGE_SIZE);
if (!folio || xa_is_value(folio))
@@ -989,19 +782,13 @@ static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
}
/* Check if there is anything to gain from splitting */
- folio_end = folio_next_index(folio);
+ next = folio_next_index(folio);
end = shmem_fallocend(inode, DIV_ROUND_UP(i_size, PAGE_SIZE));
- if (end <= folio->index || end >= folio_end) {
+ if (end <= folio->index || end >= next) {
folio_put(folio);
goto drop;
}
- if (!is_shmem_unused_huge_match(folio, scan.sc))
- goto move_back;
-
- if (nr_to_free && freed >= nr_to_free)
- goto move_back;
-
/*
* Move the inode on the list back to shrinklist if we failed
* to lock the page at this time.
@@ -1009,30 +796,35 @@ static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
* Waiting for the lock may lead to deadlock in the
* reclaim path.
*/
- if (!folio_trylock(folio))
- goto move_back;
-
- if (!is_shmem_unused_huge_match(folio, scan.sc)) {
- folio_unlock(folio);
+ if (!folio_trylock(folio)) {
+ folio_put(folio);
goto move_back;
}
ret = split_folio(folio);
folio_unlock(folio);
+ folio_put(folio);
/* If split failed move the inode on the list back to shrinklist */
if (ret)
goto move_back;
- freed += folio_end - end;
+ freed += next - end;
split++;
- folio_put(folio);
drop:
- shmem_unused_huge_drop(inode);
+ list_del_init(&info->shrinklist);
goto put;
move_back:
- shmem_unused_huge_requeue(inode, folio);
- folio_put(folio);
+ /*
+ * Make sure the inode is either on the global list or deleted
+ * from any local list before iput() since it could be deleted
+ * in another thread once we put the inode (then the local list
+ * is corrupted).
+ */
+ spin_lock(&sbinfo->shrinklist_lock);
+ list_move(&info->shrinklist, &sbinfo->shrinklist);
+ sbinfo->shrinklist_len++;
+ spin_unlock(&sbinfo->shrinklist_lock);
put:
iput(inode);
}
@@ -1045,7 +837,7 @@ static long shmem_unused_huge_scan(struct super_block *sb,
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
- if (!list_lru_shrink_count(&sbinfo->shrinklist, sc))
+ if (!READ_ONCE(sbinfo->shrinklist_len))
return SHRINK_STOP;
return shmem_unused_huge_shrink(sbinfo, sc, 0);
@@ -1056,21 +848,21 @@ static long shmem_unused_huge_count(struct super_block *sb,
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
- return list_lru_shrink_count(&sbinfo->shrinklist, sc);
+ /*
+ * The per-superblock shrinklist is filesystem-global and does not
+ * honour sc->memcg, so it is only meaningful on the global (kswapd or
+ * root direct reclaim) shrink path. Skip the per-memcg iterations of
+ * shrink_slab_memcg() to avoid queueing duplicate global work.
+ */
+ if (!mem_cgroup_shrink_is_root(sc))
+ return 0;
+
+ return READ_ONCE(sbinfo->shrinklist_len);
}
#else /* !CONFIG_TRANSPARENT_HUGEPAGE */
#define shmem_huge SHMEM_HUGE_DENY
-static void shmem_unused_huge_add(struct inode *inode, struct folio *folio,
- gfp_t gfp)
-{
-}
-
-static void shmem_unused_huge_del(struct inode *inode)
-{
-}
-
static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
struct shrink_control *sc, unsigned long nr_to_free)
{
@@ -1626,7 +1418,14 @@ static void shmem_evict_inode(struct inode *inode)
inode->i_size = 0;
mapping_set_exiting(inode->i_mapping);
shmem_truncate_range(inode, 0, (loff_t)-1);
- shmem_unused_huge_del(inode);
+ if (!list_empty(&info->shrinklist)) {
+ spin_lock(&sbinfo->shrinklist_lock);
+ if (!list_empty(&info->shrinklist)) {
+ list_del_init(&info->shrinklist);
+ sbinfo->shrinklist_len--;
+ }
+ spin_unlock(&sbinfo->shrinklist_lock);
+ }
while (!list_empty(&info->swaplist)) {
/* Wait while shmem_unuse() is scanning this inode... */
wait_var_event(&info->stop_eviction,
@@ -1813,7 +1612,7 @@ int shmem_writeout(struct swap_io_ctx *ctx, struct folio *folio,
struct shmem_inode_info *info = SHMEM_I(inode);
struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
pgoff_t index;
- int nr_pages, ret;
+ int nr_pages;
bool split = false;
if ((info->flags & SHMEM_F_LOCKED) || sbinfo->noswap)
@@ -1894,8 +1693,7 @@ try_split:
folio_mark_uptodate(folio);
}
- ret = folio_alloc_swap(folio);
- if (!ret) {
+ if (!folio_alloc_swap(folio)) {
bool first_swapped = shmem_recalc_inode(inode, 0, nr_pages);
int error;
@@ -1948,7 +1746,7 @@ try_split:
swap_cache_del_folio(folio);
goto redirty;
}
- if (nr_pages > 1 && ret == -E2BIG)
+ if (nr_pages > 1)
goto try_split;
redirty:
folio_mark_dirty(folio);
@@ -2482,7 +2280,7 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
si = get_swap_device(index_entry);
order = shmem_confirm_swap(mapping, index, index_entry);
- if (IS_ERR_OR_NULL(si)) {
+ if (unlikely(!si)) {
if (order < 0)
return -EEXIST;
else
@@ -2741,6 +2539,27 @@ repeat:
alloced:
alloced = true;
+ if (folio_test_large(folio) &&
+ DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE) <
+ folio_next_index(folio)) {
+ struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
+ struct shmem_inode_info *info = SHMEM_I(inode);
+ /*
+ * Part of the large folio is beyond i_size: subject
+ * to shrink under memory pressure.
+ */
+ spin_lock(&sbinfo->shrinklist_lock);
+ /*
+ * _careful to defend against unlocked access to
+ * ->shrink_list in shmem_unused_huge_shrink()
+ */
+ if (list_empty_careful(&info->shrinklist)) {
+ list_add_tail(&info->shrinklist,
+ &sbinfo->shrinklist);
+ sbinfo->shrinklist_len++;
+ }
+ spin_unlock(&sbinfo->shrinklist_lock);
+ }
if (sgp == SGP_WRITE)
folio_set_referenced(folio);
@@ -2770,20 +2589,6 @@ clear:
error = -EINVAL;
goto unlock;
}
-
- /*
- * Queue the inode on the shrink list only after all checks that might
- * remove the folio have passed. Otherwise the inode could be left on
- * the shrinker list with a stale folio.
- */
- if (alloced && folio_test_large(folio) &&
- DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE) < folio_next_index(folio)) {
- /*
- * Part of the large folio is beyond i_size: subject
- * to shrink under memory pressure.
- */
- shmem_unused_huge_add(inode, folio, gfp);
- }
out:
*foliop = folio;
return 0;
@@ -2984,7 +2789,7 @@ unsigned long shmem_get_unmapped_area(struct file *file,
sb = file_inode(file)->i_sb;
} else {
/*
- * Called directly from mm/mmap.c, or mm/char-mem.c
+ * Called directly from mm/mmap.c, or drivers/char/mem.c
* for "/dev/zero", to create a shared anonymous object.
*/
if (IS_ERR(shm_mnt))
@@ -3260,10 +3065,6 @@ static struct inode *__shmem_get_inode(struct mnt_idmap *idmap,
if (info->fsflags)
shmem_set_inode_flags(inode, info->fsflags, NULL);
INIT_LIST_HEAD(&info->shrinklist);
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- info->shrinklist_objcg = NULL;
- info->shrinklist_nid = -1;
-#endif
INIT_LIST_HEAD(&info->swaplist);
cache_no_acl(inode);
if (sbinfo->noswap)
@@ -5139,9 +4940,6 @@ static void shmem_put_super(struct super_block *sb)
#endif
free_percpu(sbinfo->ino_batch);
percpu_counter_destroy(&sbinfo->used_blocks);
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- list_lru_destroy(&sbinfo->shrinklist);
-#endif
mpol_put(sbinfo->mpol);
#ifdef CONFIG_TMPFS_XATTR
simple_xattr_cache_cleanup(&sbinfo->xa_cache);
@@ -5236,11 +5034,8 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
raw_spin_lock_init(&sbinfo->stat_lock);
if (percpu_counter_init(&sbinfo->used_blocks, 0, GFP_KERNEL))
goto failed;
-
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- if (list_lru_init_memcg(&sbinfo->shrinklist, sb->s_shrink))
- goto failed;
-#endif
+ spin_lock_init(&sbinfo->shrinklist_lock);
+ INIT_LIST_HEAD(&sbinfo->shrinklist);
sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize = PAGE_SIZE;
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 28bf035a58f3..7223a7596dab 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -102,7 +102,7 @@ static bool kmem_cache_is_duplicate_name(const char *name)
static int kmem_cache_sanity_check(const char *name, unsigned int size)
{
- if (!name || in_interrupt() || !size || size > KMALLOC_MAX_SIZE) {
+ if (!name || in_interrupt() || size > KMALLOC_MAX_SIZE) {
pr_err("kmem_cache_create(%s) integrity check failed\n", name);
return -EINVAL;
}
diff --git a/mm/slub.c b/mm/slub.c
index 96dca4846b4e..54ec12503357 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -360,64 +360,33 @@ enum add_mode {
ADD_TO_TAIL,
};
-#define STAT_ITEMS \
- /* Allocation from percpu sheaves */ \
- ITEM_EXP(ALLOC_FASTPATH, alloc_fastpath) \
- /* Allocation from partial or new slab */ \
- ITEM_EXP(ALLOC_SLOWPATH, alloc_slowpath) \
- /* Free to rcu_free sheaf */ \
- ITEM_EXP(FREE_RCU_SHEAF, free_rcu_sheaf) \
- /* Failed to free to a rcu_free sheaf */ \
- ITEM_EXP(FREE_RCU_SHEAF_FAIL, free_rcu_sheaf_fail) \
- /* Free to percpu sheaves */ \
- ITEM_EXP(FREE_FASTPATH, free_fastpath) \
- /* Free to a slab */ \
- ITEM_EXP(FREE_SLOWPATH, free_slowpath) \
- /* Freeing moves slab to partial list */ \
- ITEM_EXP(FREE_ADD_PARTIAL, free_add_partial) \
- /* Freeing removes last object */ \
- ITEM_EXP(FREE_REMOVE_PARTIAL, free_remove_partial) \
- /* New slab acquired from page allocator */ \
- ITEM_EXP(ALLOC_SLAB, alloc_slab) \
- /* Requested node different from cpu sheaf */ \
- ITEM_EXP(ALLOC_NODE_MISMATCH, alloc_node_mismatch) \
- /* Slab freed to the page allocator */ \
- ITEM_EXP(FREE_SLAB, free_slab) \
- /* Number of times fallback was necessary */ \
- ITEM_EXP(ORDER_FALLBACK, order_fallback) \
- /* Failures of slab freelist update */ \
- ITEM_EXP(CMPXCHG_DOUBLE_FAIL, cmpxchg_double_fail) \
- /* Objects flushed from a sheaf */ \
- ITEM_EXP(SHEAF_FLUSH, sheaf_flush) \
- /* Objects refilled to a sheaf */ \
- ITEM_EXP(SHEAF_REFILL, sheaf_refill) \
- /* Allocation of an empty sheaf including oversized ones */ \
- ITEM_EXP(SHEAF_ALLOC, sheaf_alloc) \
- /* Freeing of an empty sheaf including oversized ones */ \
- ITEM_EXP(SHEAF_FREE, sheaf_free) \
- /* Got full sheaf from barn */ \
- ITEM_EXP(BARN_GET, barn_get) \
- /* Failed to get full sheaf from barn */ \
- ITEM_EXP(BARN_GET_FAIL, barn_get_fail) \
- /* Put full sheaf to barn */ \
- ITEM_EXP(BARN_PUT, barn_put) \
- /* Failed to put full sheaf to barn */ \
- ITEM_EXP(BARN_PUT_FAIL, barn_put_fail) \
- /* Sheaf prefill grabbed the spare sheaf */ \
- ITEM_EXP(SHEAF_PREFILL_FAST, sheaf_prefill_fast) \
- /* Sheaf prefill found no spare sheaf */ \
- ITEM_EXP(SHEAF_PREFILL_SLOW, sheaf_prefill_slow) \
- /* Allocation of oversize sheaf for prefill */ \
- ITEM_EXP(SHEAF_PREFILL_OVERSIZE, sheaf_prefill_oversize) \
- /* Sheaf return reattached spare sheaf */ \
- ITEM_EXP(SHEAF_RETURN_FAST, sheaf_return_fast) \
- /* Sheaf return could not reattach spare */ \
- ITEM_EXP(SHEAF_RETURN_SLOW, sheaf_return_slow)
-
enum stat_item {
-#define ITEM_EXP(name, unused) name,
- STAT_ITEMS
-#undef ITEM_EXP
+ ALLOC_FASTPATH, /* Allocation from percpu sheaves */
+ ALLOC_SLOWPATH, /* Allocation from partial or new slab */
+ FREE_RCU_SHEAF, /* Free to rcu_free sheaf */
+ FREE_RCU_SHEAF_FAIL, /* Failed to free to a rcu_free sheaf */
+ FREE_FASTPATH, /* Free to percpu sheaves */
+ FREE_SLOWPATH, /* Free to a slab */
+ FREE_ADD_PARTIAL, /* Freeing moves slab to partial list */
+ FREE_REMOVE_PARTIAL, /* Freeing removes last object */
+ ALLOC_SLAB, /* New slab acquired from page allocator */
+ ALLOC_NODE_MISMATCH, /* Requested node different from cpu sheaf */
+ FREE_SLAB, /* Slab freed to the page allocator */
+ ORDER_FALLBACK, /* Number of times fallback was necessary */
+ CMPXCHG_DOUBLE_FAIL, /* Failures of slab freelist update */
+ SHEAF_FLUSH, /* Objects flushed from a sheaf */
+ SHEAF_REFILL, /* Objects refilled to a sheaf */
+ SHEAF_ALLOC, /* Allocation of an empty sheaf including oversized ones */
+ SHEAF_FREE, /* Freeing of an empty sheaf including oversized ones */
+ BARN_GET, /* Got full sheaf from barn */
+ BARN_GET_FAIL, /* Failed to get full sheaf from barn */
+ BARN_PUT, /* Put full sheaf to barn */
+ BARN_PUT_FAIL, /* Failed to put full sheaf to barn */
+ SHEAF_PREFILL_FAST, /* Sheaf prefill grabbed the spare sheaf */
+ SHEAF_PREFILL_SLOW, /* Sheaf prefill found no spare sheaf */
+ SHEAF_PREFILL_OVERSIZE, /* Allocation of oversize sheaf for prefill */
+ SHEAF_RETURN_FAST, /* Sheaf return reattached spare sheaf */
+ SHEAF_RETURN_SLOW, /* Sheaf return could not reattach spare */
NR_SLUB_STAT_ITEMS
};
@@ -5373,12 +5342,7 @@ static void *___kmalloc_large_node(size_t size, gfp_t flags, int node)
{
struct page *page;
void *ptr = NULL;
- unsigned int order;
-
- if (WARN_ON_ONCE_GFP(size > KMALLOC_MAX_SIZE, flags))
- return NULL;
-
- order = get_order(size);
+ unsigned int order = get_order(size);
if (unlikely(flags & GFP_SLAB_BUG_MASK))
flags = kmalloc_fix_flags(flags);
@@ -9550,12 +9514,34 @@ static ssize_t text##_store(struct kmem_cache *s, \
clear_stat(s, si); \
return length; \
} \
-SLAB_ATTR(text);
-
-#define ITEM_EXP(name, text) STAT_ATTR(name, text)
-STAT_ITEMS
-#undef ITEM_EXP
-
+SLAB_ATTR(text); \
+
+STAT_ATTR(ALLOC_FASTPATH, alloc_fastpath);
+STAT_ATTR(ALLOC_SLOWPATH, alloc_slowpath);
+STAT_ATTR(FREE_RCU_SHEAF, free_rcu_sheaf);
+STAT_ATTR(FREE_RCU_SHEAF_FAIL, free_rcu_sheaf_fail);
+STAT_ATTR(FREE_FASTPATH, free_fastpath);
+STAT_ATTR(FREE_SLOWPATH, free_slowpath);
+STAT_ATTR(FREE_ADD_PARTIAL, free_add_partial);
+STAT_ATTR(FREE_REMOVE_PARTIAL, free_remove_partial);
+STAT_ATTR(ALLOC_SLAB, alloc_slab);
+STAT_ATTR(ALLOC_NODE_MISMATCH, alloc_node_mismatch);
+STAT_ATTR(FREE_SLAB, free_slab);
+STAT_ATTR(ORDER_FALLBACK, order_fallback);
+STAT_ATTR(CMPXCHG_DOUBLE_FAIL, cmpxchg_double_fail);
+STAT_ATTR(SHEAF_FLUSH, sheaf_flush);
+STAT_ATTR(SHEAF_REFILL, sheaf_refill);
+STAT_ATTR(SHEAF_ALLOC, sheaf_alloc);
+STAT_ATTR(SHEAF_FREE, sheaf_free);
+STAT_ATTR(BARN_GET, barn_get);
+STAT_ATTR(BARN_GET_FAIL, barn_get_fail);
+STAT_ATTR(BARN_PUT, barn_put);
+STAT_ATTR(BARN_PUT_FAIL, barn_put_fail);
+STAT_ATTR(SHEAF_PREFILL_FAST, sheaf_prefill_fast);
+STAT_ATTR(SHEAF_PREFILL_SLOW, sheaf_prefill_slow);
+STAT_ATTR(SHEAF_PREFILL_OVERSIZE, sheaf_prefill_oversize);
+STAT_ATTR(SHEAF_RETURN_FAST, sheaf_return_fast);
+STAT_ATTR(SHEAF_RETURN_SLOW, sheaf_return_slow);
#endif /* CONFIG_SLUB_STATS */
#ifdef CONFIG_KFENCE
@@ -9618,9 +9604,32 @@ static const struct attribute *const slab_attrs[] = {
&remote_node_defrag_ratio_attr.attr,
#endif
#ifdef CONFIG_SLUB_STATS
-#define ITEM_EXP(unused, text) &text##_attr.attr,
- STAT_ITEMS
-#undef ITEM_EXP
+ &alloc_fastpath_attr.attr,
+ &alloc_slowpath_attr.attr,
+ &free_rcu_sheaf_attr.attr,
+ &free_rcu_sheaf_fail_attr.attr,
+ &free_fastpath_attr.attr,
+ &free_slowpath_attr.attr,
+ &free_add_partial_attr.attr,
+ &free_remove_partial_attr.attr,
+ &alloc_slab_attr.attr,
+ &alloc_node_mismatch_attr.attr,
+ &free_slab_attr.attr,
+ &order_fallback_attr.attr,
+ &cmpxchg_double_fail_attr.attr,
+ &sheaf_flush_attr.attr,
+ &sheaf_refill_attr.attr,
+ &sheaf_alloc_attr.attr,
+ &sheaf_free_attr.attr,
+ &barn_get_attr.attr,
+ &barn_get_fail_attr.attr,
+ &barn_put_attr.attr,
+ &barn_put_fail_attr.attr,
+ &sheaf_prefill_fast_attr.attr,
+ &sheaf_prefill_slow_attr.attr,
+ &sheaf_prefill_oversize_attr.attr,
+ &sheaf_return_fast_attr.attr,
+ &sheaf_return_slow_attr.attr,
#endif
#ifdef CONFIG_FAILSLAB
&failslab_attr.attr,
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 96506f594924..5a2469fb1838 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -32,23 +32,39 @@
#include <asm/dma.h>
#include <asm/tlbflush.h>
+#include "hugetlb_vmemmap.h"
+
/*
* Flags for vmemmap_populate_range and friends.
*/
-/* Vmemmap population for ZONE_DEVICE compound pages */
-#define VMEMMAP_POPULATE_DAX 0x0001
+/* Get a ref on the head page struct page, for ZONE_DEVICE compound pages */
+#define VMEMMAP_POPULATE_PAGEREF 0x0001
#include "internal.h"
#include "mm_init.h"
#include "sparse.h"
-void __ref *vmemmap_alloc_block(unsigned long size, int node)
+/*
+ * Allocate a block of memory to be used to back the virtual memory map
+ * or to back the page tables that are used to create the mapping.
+ * Uses the main allocators if they are available, else bootmem.
+ */
+
+static void * __ref __earlyonly_bootmem_alloc(int node,
+ unsigned long size,
+ unsigned long align,
+ unsigned long goal)
+{
+ return memmap_alloc(size, align, goal, node, false);
+}
+
+void * __meminit vmemmap_alloc_block(unsigned long size, int node)
{
/* If the main allocator is up use that, fallback to bootmem. */
if (slab_is_available()) {
gfp_t gfp_mask = GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN;
int order = get_order(size);
- static bool warned;
+ static bool warned __meminitdata;
struct page *page;
page = alloc_pages_node(node, gfp_mask, order);
@@ -62,7 +78,8 @@ void __ref *vmemmap_alloc_block(unsigned long size, int node)
}
return NULL;
} else
- return memmap_alloc(size, size, __pa(MAX_DMA_ADDRESS), node, false);
+ return __earlyonly_bootmem_alloc(node, size, size,
+ __pa(MAX_DMA_ADDRESS));
}
static void * __meminit altmap_alloc_block_buf(unsigned long size,
@@ -131,117 +148,17 @@ void __meminit vmemmap_verify(pte_t *pte, int node,
start, end - 1);
}
-int __meminit section_nr_vmemmap_pages(unsigned long pfn, unsigned long nr_pages)
-{
- const struct mem_section *ms = __pfn_to_section(pfn);
- const int order = section_compound_order(ms);
- const unsigned long pages_per_compound = 1UL << order;
-
- VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, PAGES_PER_SUBSECTION));
- VM_WARN_ON_ONCE(nr_pages > PAGES_PER_SECTION);
-
- if (!section_vmemmap_optimizable(ms))
- return DIV_ROUND_UP(nr_pages * sizeof(struct page), PAGE_SIZE);
-
- if (order < PFN_SECTION_SHIFT) {
- VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, pages_per_compound));
- return VMEMMAP_OPTIMIZATION_PAGES * nr_pages / pages_per_compound;
- }
-
- VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, PAGES_PER_SECTION));
-
- if (IS_ALIGNED(pfn, pages_per_compound))
- return VMEMMAP_OPTIMIZATION_PAGES;
-
- return 0;
-}
-
-static void * __meminit vmemmap_alloc_block_zero(unsigned long size, int node)
-{
- void *p = vmemmap_alloc_block(size, node);
-
- if (!p)
- return NULL;
- memset(p, 0, size);
-
- return p;
-}
-
-struct page __ref *vmemmap_shared_tail_page(unsigned int order, struct zone *zone)
-{
- void *addr;
- struct page *page;
- const unsigned int idx = order - VMEMMAP_OPTIMIZATION_MIN_ORDER;
-
- if (WARN_ON_ONCE(idx >= ARRAY_SIZE(zone->vmemmap_tails)))
- return NULL;
-
- page = READ_ONCE(zone->vmemmap_tails[idx]);
- if (likely(page))
- return page;
-
- addr = vmemmap_alloc_block(PAGE_SIZE, zone_to_nid(zone));
- if (!addr)
- return NULL;
-
- for (int i = 0; i < PAGE_SIZE / sizeof(struct page); i++) {
- page = (struct page *)addr + i;
- mm_zero_struct_page(page);
- atomic_set(&page->_mapcount, -1);
- set_page_node(page, zone_to_nid(zone));
- set_page_zone(page, zone_idx(zone));
- prep_compound_tail(page, NULL, order);
- if (zone_is_zone_device(zone))
- __SetPageReserved(page);
- }
-
- page = virt_to_page(addr);
- if (cmpxchg(&zone->vmemmap_tails[idx], NULL, page) != NULL) {
- if (slab_is_available())
- __free_page(page);
- else
- memblock_free(addr, PAGE_SIZE);
- page = READ_ONCE(zone->vmemmap_tails[idx]);
- }
-
- return page;
-}
-
-static __meminit void *vmemmap_alloc_pte(unsigned long pfn, int node,
- struct vmem_altmap *altmap, unsigned long flags)
-{
- struct zone *zone;
- struct page *page;
- const unsigned int order = pfn_to_section_compound_order(pfn);
-
- /*
- * Device DAX still relies on vmemmap_populate_compound_pages() for
- * head/first-tail allocation and tail-page reuse.
- */
- if (!vmemmap_optimizable_pfn(pfn) || flags & VMEMMAP_POPULATE_DAX)
- return vmemmap_alloc_block_buf(PAGE_SIZE, node, altmap);
-
- zone = pfn_to_zone(pfn, node);
- page = vmemmap_shared_tail_page(order, zone);
- if (!page)
- return NULL;
-
- return page_address(page);
-}
-
static pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node,
struct vmem_altmap *altmap,
unsigned long ptpfn, unsigned long flags)
{
pte_t *pte = pte_offset_kernel(pmd, addr);
- unsigned long pfn = page_to_pfn((struct page *)addr);
-
if (pte_none(ptep_get(pte))) {
pte_t entry;
+ void *p;
if (ptpfn == (unsigned long)-1) {
- void *p = vmemmap_alloc_pte(pfn, node, altmap, flags);
-
+ p = vmemmap_alloc_block_buf(PAGE_SIZE, node, altmap);
if (!p)
return NULL;
ptpfn = PHYS_PFN(__pa(p));
@@ -255,16 +172,26 @@ static pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, in
* and through vmemmap_populate_compound_pages() when
* slab is available.
*/
- if (flags & VMEMMAP_POPULATE_DAX)
+ if (flags & VMEMMAP_POPULATE_PAGEREF)
get_page(pfn_to_page(ptpfn));
}
entry = pfn_pte(ptpfn, PAGE_KERNEL);
set_pte_at(&init_mm, addr, pte, entry);
- } else if (WARN_ON_ONCE(vmemmap_optimizable_pfn(pfn)))
- return NULL;
+ }
return pte;
}
+static void * __meminit vmemmap_alloc_block_zero(unsigned long size, int node)
+{
+ void *p = vmemmap_alloc_block(size, node);
+
+ if (!p)
+ return NULL;
+ memset(p, 0, size);
+
+ return p;
+}
+
static pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node)
{
pmd_t *pmd = pmd_offset(pud, addr);
@@ -395,6 +322,69 @@ void vmemmap_wrprotect_hvo(unsigned long addr, unsigned long end,
}
}
+#ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+static __meminit struct page *vmemmap_get_tail(unsigned int order, struct zone *zone)
+{
+ struct page *p, *tail;
+ unsigned int idx;
+ int node = zone_to_nid(zone);
+
+ if (WARN_ON_ONCE(order < VMEMMAP_TAIL_MIN_ORDER))
+ return NULL;
+ if (WARN_ON_ONCE(order > MAX_FOLIO_ORDER))
+ return NULL;
+
+ idx = order - VMEMMAP_TAIL_MIN_ORDER;
+ tail = zone->vmemmap_tails[idx];
+ if (tail)
+ return tail;
+
+ /*
+ * Only allocate the page, but do not initialize it.
+ *
+ * Any initialization done here will be overwritten by memmap_init().
+ *
+ * hugetlb_bootmem_struct_page_init() will take care of initialization
+ * after memmap_init().
+ */
+
+ p = vmemmap_alloc_block_zero(PAGE_SIZE, node);
+ if (!p)
+ return NULL;
+
+ tail = virt_to_page(p);
+ zone->vmemmap_tails[idx] = tail;
+
+ return tail;
+}
+
+int __meminit vmemmap_populate_hvo(unsigned long addr, unsigned long end,
+ unsigned int order, struct zone *zone,
+ unsigned long headsize)
+{
+ unsigned long maddr;
+ struct page *tail;
+ pte_t *pte;
+ int node = zone_to_nid(zone);
+
+ tail = vmemmap_get_tail(order, zone);
+ if (!tail)
+ return -ENOMEM;
+
+ for (maddr = addr; maddr < addr + headsize; maddr += PAGE_SIZE) {
+ pte = vmemmap_populate_address(maddr, node, NULL, -1, 0);
+ if (!pte)
+ return -ENOMEM;
+ }
+
+ /*
+ * Reuse the last page struct page mapped above for the rest.
+ */
+ return vmemmap_populate_range(maddr, end, node, NULL,
+ page_to_pfn(tail), 0);
+}
+#endif
+
void __weak __meminit vmemmap_set_pmd(pmd_t *pmd, void *p, int node,
unsigned long addr, unsigned long next)
{
@@ -422,9 +412,6 @@ int __meminit vmemmap_populate_hugepages(unsigned long start, unsigned long end,
pmd_t *pmd;
for (addr = start; addr < end; addr = next) {
- unsigned long pfn = page_to_pfn((struct page *)addr);
- const struct mem_section *ms = __pfn_to_section(pfn);
-
next = pmd_addr_end(addr, end);
pgd = vmemmap_pgd_populate(addr, node);
@@ -440,7 +427,7 @@ int __meminit vmemmap_populate_hugepages(unsigned long start, unsigned long end,
return -ENOMEM;
pmd = pmd_offset(pud, addr);
- if (pmd_none(pmdp_get(pmd)) && !section_vmemmap_optimizable(ms)) {
+ if (pmd_none(pmdp_get(pmd))) {
void *p;
p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap);
@@ -458,11 +445,8 @@ int __meminit vmemmap_populate_hugepages(unsigned long start, unsigned long end,
*/
return -ENOMEM;
}
- } else if (vmemmap_check_pmd(pmd, node, addr, next)) {
- if (WARN_ON_ONCE(section_vmemmap_optimizable(ms)))
- return -EOPNOTSUPP;
+ } else if (vmemmap_check_pmd(pmd, node, addr, next))
continue;
- }
if (vmemmap_populate_basepages(addr, next, node, altmap))
return -ENOMEM;
}
@@ -490,6 +474,23 @@ static bool __meminit reuse_compound_section(unsigned long start_pfn,
return !IS_ALIGNED(offset, nr_pages) && nr_pages > PAGES_PER_SUBSECTION;
}
+static pte_t * __meminit compound_section_tail_page(unsigned long addr)
+{
+ pte_t *pte;
+
+ addr -= PAGE_SIZE;
+
+ /*
+ * Assuming sections are populated sequentially, the previous section's
+ * page data can be reused.
+ */
+ pte = pte_offset_kernel(pmd_off_k(addr), addr);
+ if (!pte)
+ return NULL;
+
+ return pte;
+}
+
static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
unsigned long start,
unsigned long end, int node,
@@ -498,34 +499,44 @@ static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
unsigned long size, addr;
pte_t *pte;
int rc;
- unsigned long flags = VMEMMAP_POPULATE_DAX;
- struct page *page;
- unsigned int order = pfn_to_section_compound_order(start_pfn);
- page = vmemmap_shared_tail_page(order, device_zone(node));
- if (!page)
- return -ENOMEM;
+ if (reuse_compound_section(start_pfn, pgmap)) {
+ pte = compound_section_tail_page(start);
+ if (!pte)
+ return -ENOMEM;
- if (reuse_compound_section(start_pfn, pgmap))
+ /*
+ * Reuse the page that was populated in the prior iteration
+ * with just tail struct pages.
+ */
return vmemmap_populate_range(start, end, node, NULL,
- page_to_pfn(page), flags);
+ pte_pfn(ptep_get(pte)),
+ VMEMMAP_POPULATE_PAGEREF);
+ }
- size = min(end - start, (1UL << order) * sizeof(struct page));
+ size = min(end - start, pgmap_vmemmap_nr(pgmap) * sizeof(struct page));
for (addr = start; addr < end; addr += size) {
unsigned long next, last = addr + size;
/* Populate the head page vmemmap page */
- pte = vmemmap_populate_address(addr, node, NULL, -1, flags);
+ pte = vmemmap_populate_address(addr, node, NULL, -1, 0);
+ if (!pte)
+ return -ENOMEM;
+
+ /* Populate the tail pages vmemmap page */
+ next = addr + PAGE_SIZE;
+ pte = vmemmap_populate_address(next, node, NULL, -1, 0);
if (!pte)
return -ENOMEM;
/*
- * Reuse the shared page for the rest of tail pages
+ * Reuse the previous page for the rest of tail pages
* See layout diagram in Documentation/mm/vmemmap_dedup.rst
*/
- next = addr + PAGE_SIZE;
+ next += PAGE_SIZE;
rc = vmemmap_populate_range(next, last, node, NULL,
- page_to_pfn(page), flags);
+ pte_pfn(ptep_get(pte)),
+ VMEMMAP_POPULATE_PAGEREF);
if (rc)
return -ENOMEM;
}
@@ -547,7 +558,7 @@ struct page * __meminit __populate_section_memmap(unsigned long pfn,
!IS_ALIGNED(nr_pages, PAGES_PER_SUBSECTION)))
return NULL;
- if (pgmap && section_vmemmap_optimizable(__pfn_to_section(pfn)))
+ if (vmemmap_can_optimize(altmap, pgmap))
r = vmemmap_populate_compound_pages(pfn, start, end, nid, pgmap);
else
r = vmemmap_populate(start, end, nid, altmap);
@@ -560,6 +571,20 @@ struct page * __meminit __populate_section_memmap(unsigned long pfn,
return pfn_to_page(pfn);
}
+#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
+/*
+ * This is called just before initializing sections for a NUMA node.
+ * Any special initialization that needs to be done before the
+ * generic initialization can be done from here. Sections that
+ * are initialized in hooks called from here will be skipped by
+ * the generic initialization.
+ */
+void __init sparse_vmemmap_init_nid_early(int nid)
+{
+ hugetlb_vmemmap_init_early(nid);
+}
+#endif
+
static void subsection_mask_set(unsigned long *map, unsigned long pfn,
unsigned long nr_pages)
{
@@ -629,6 +654,31 @@ void offline_mem_sections(unsigned long start_pfn, unsigned long end_pfn)
}
}
+static int __meminit section_nr_vmemmap_pages(unsigned long pfn, unsigned long nr_pages,
+ struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
+{
+ const unsigned int order = pgmap ? pgmap->vmemmap_shift : 0;
+ const unsigned long pages_per_compound = 1UL << order;
+
+ VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, PAGES_PER_SUBSECTION));
+ VM_WARN_ON_ONCE(nr_pages > PAGES_PER_SECTION);
+
+ if (!vmemmap_can_optimize(altmap, pgmap))
+ return DIV_ROUND_UP(nr_pages * sizeof(struct page), PAGE_SIZE);
+
+ if (order < PFN_SECTION_SHIFT) {
+ VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, pages_per_compound));
+ return VMEMMAP_RESERVE_NR * nr_pages / pages_per_compound;
+ }
+
+ VM_WARN_ON_ONCE(!IS_ALIGNED(pfn | nr_pages, PAGES_PER_SECTION));
+
+ if (IS_ALIGNED(pfn, pages_per_compound))
+ return VMEMMAP_RESERVE_NR;
+
+ return 0;
+}
+
static struct page * __meminit populate_section_memmap(unsigned long pfn,
unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
struct dev_pagemap *pgmap)
@@ -636,7 +686,7 @@ static struct page * __meminit populate_section_memmap(unsigned long pfn,
struct page *page = __populate_section_memmap(pfn, nr_pages, nid, altmap,
pgmap);
- memmap_pages_add(section_nr_vmemmap_pages(pfn, nr_pages));
+ memmap_pages_add(section_nr_vmemmap_pages(pfn, nr_pages, altmap, pgmap));
return page;
}
@@ -647,7 +697,7 @@ static void depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages,
unsigned long start = (unsigned long) pfn_to_page(pfn);
unsigned long end = start + nr_pages * sizeof(struct page);
- memmap_pages_add(-section_nr_vmemmap_pages(pfn, nr_pages));
+ memmap_pages_add(-section_nr_vmemmap_pages(pfn, nr_pages, altmap, pgmap));
vmemmap_free(start, end, altmap);
}
@@ -657,7 +707,8 @@ static void free_map_bootmem(struct page *memmap)
unsigned long end = (unsigned long)(memmap + PAGES_PER_SECTION);
unsigned long pfn = page_to_pfn(memmap);
- memmap_boot_pages_add(-section_nr_vmemmap_pages(pfn, PAGES_PER_SECTION));
+ memmap_boot_pages_add(-section_nr_vmemmap_pages(pfn, PAGES_PER_SECTION,
+ NULL, NULL));
vmemmap_free(start, end, NULL);
}
@@ -765,10 +816,8 @@ static void section_deactivate(unsigned long pfn, unsigned long nr_pages,
else if (memmap)
free_map_bootmem(memmap);
- if (empty) {
+ if (empty)
ms->section_mem_map = (unsigned long)NULL;
- section_set_compound_order(ms, 0);
- }
}
static struct page * __meminit section_activate(int nid, unsigned long pfn,
@@ -778,13 +827,8 @@ static struct page * __meminit section_activate(int nid, unsigned long pfn,
struct mem_section *ms = __pfn_to_section(pfn);
struct mem_section_usage *usage = NULL;
struct page *memmap;
- unsigned int order;
int rc;
- order = vmemmap_can_optimize(altmap, pgmap) ? pgmap->vmemmap_shift : 0;
- if (nr_pages < PAGES_PER_SECTION && section_compound_order(ms))
- return ERR_PTR(-EOPNOTSUPP);
-
if (!ms->usage) {
usage = kzalloc(mem_section_usage_size(), GFP_KERNEL);
if (!usage)
@@ -810,7 +854,6 @@ static struct page * __meminit section_activate(int nid, unsigned long pfn,
if (nr_pages < PAGES_PER_SECTION && early_section(ms))
return pfn_to_page(pfn);
- section_set_compound_order_range(pfn, nr_pages, order);
memmap = populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap);
if (!memmap) {
section_deactivate(pfn, nr_pages, altmap, pgmap);
@@ -856,14 +899,13 @@ int __meminit sparse_add_section(int nid, unsigned long start_pfn,
if (IS_ERR(memmap))
return PTR_ERR(memmap);
- ms = __nr_to_section(section_nr);
/*
* Poison uninitialized struct pages in order to catch invalid flags
* combinations.
*/
- if (!section_vmemmap_optimizable(ms))
- page_init_poison(memmap, sizeof(struct page) * nr_pages);
+ page_init_poison(memmap, sizeof(struct page) * nr_pages);
+ ms = __nr_to_section(section_nr);
__section_mark_present(ms, section_nr);
/* Align memmap to section boundary in the subsection case */
diff --git a/mm/sparse.c b/mm/sparse.c
index b75921c622ed..7c15406e77f5 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -191,7 +191,12 @@ static void __init memory_present(int nid, unsigned long start, unsigned long en
}
}
-void __init sparse_sections_init(void)
+/*
+ * Mark all memblocks as present using memory_present().
+ * This is a convenience function that is useful to mark all of the systems
+ * memory as present during initialization.
+ */
+static void __init memblocks_present(void)
{
unsigned long start, end;
int i, nid;
@@ -208,12 +213,23 @@ void __init sparse_sections_init(void)
memory_present(nid, start, end);
}
-#ifndef CONFIG_SPARSEMEM_VMEMMAP
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
+unsigned long __init section_map_size(void)
+{
+ return ALIGN(sizeof(struct page) * PAGES_PER_SECTION, PMD_SIZE);
+}
+
+#else
+unsigned long __init section_map_size(void)
+{
+ return PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION);
+}
+
struct page __init *__populate_section_memmap(unsigned long pfn,
unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
struct dev_pagemap *pgmap)
{
- const unsigned long size = PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION);
+ unsigned long size = section_map_size();
return memmap_alloc(size, size, __pa(MAX_DMA_ADDRESS), nid, false);
}
@@ -223,6 +239,42 @@ void __weak __meminit vmemmap_populate_print_last(void)
{
}
+static void *sparse_usagebuf __initdata;
+static void *sparse_usagebuf_end __initdata;
+
+/*
+ * Helper function that is used for generic section initialization, and
+ * can also be used by any hooks added above.
+ */
+void __init sparse_init_early_section(int nid, struct page *map,
+ unsigned long pnum, unsigned long flags)
+{
+ BUG_ON(!sparse_usagebuf || sparse_usagebuf >= sparse_usagebuf_end);
+ sparse_init_one_section(__nr_to_section(pnum), pnum, map,
+ sparse_usagebuf, SECTION_IS_EARLY | flags);
+ sparse_usagebuf = (void *)sparse_usagebuf + mem_section_usage_size();
+}
+
+static int __init sparse_usage_init(int nid, unsigned long map_count)
+{
+ unsigned long size;
+
+ size = mem_section_usage_size() * map_count;
+ sparse_usagebuf = memblock_alloc_node(size, SMP_CACHE_BYTES, nid);
+ if (!sparse_usagebuf) {
+ sparse_usagebuf_end = NULL;
+ return -ENOMEM;
+ }
+
+ sparse_usagebuf_end = sparse_usagebuf + size;
+ return 0;
+}
+
+static void __init sparse_usage_fini(void)
+{
+ sparse_usagebuf = sparse_usagebuf_end = NULL;
+}
+
/*
* Initialize sparse on a specific node. The node spans [pnum_begin, pnum_end)
* And number of present sections in this node is map_count.
@@ -232,29 +284,33 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin,
unsigned long map_count)
{
unsigned long pnum;
- struct mem_section_usage *usage;
- usage = memblock_alloc_node(map_count * mem_section_usage_size(),
- SMP_CACHE_BYTES, nid);
- if (!usage)
+ if (sparse_usage_init(nid, map_count))
panic("Failed to allocate usemap for node %d\n", nid);
+ sparse_vmemmap_init_nid_early(nid);
+
for_each_present_section_nr(pnum_begin, pnum) {
+ struct mem_section *ms;
unsigned long pfn = section_nr_to_pfn(pnum);
- struct page *map;
if (pnum >= pnum_end)
break;
- map = __populate_section_memmap(pfn, PAGES_PER_SECTION,
- nid, NULL, NULL);
- if (!map)
- panic("Failed to allocate memmap for section %lu\n", pnum);
- memmap_boot_pages_add(section_nr_vmemmap_pages(pfn, PAGES_PER_SECTION));
- sparse_init_one_section(__nr_to_section(pnum), pnum, map, usage,
- SECTION_IS_EARLY);
- usage = (void *)usage + mem_section_usage_size();
+ ms = __nr_to_section(pnum);
+ if (!preinited_vmemmap_section(ms)) {
+ struct page *map;
+
+ map = __populate_section_memmap(pfn, PAGES_PER_SECTION,
+ nid, NULL, NULL);
+ if (!map)
+ panic("Failed to allocate memmap for section %lu\n", pnum);
+ memmap_boot_pages_add(DIV_ROUND_UP(PAGES_PER_SECTION * sizeof(struct page),
+ PAGE_SIZE));
+ sparse_init_early_section(nid, map, pnum, 0);
+ }
}
+ sparse_usage_fini();
}
/*
@@ -266,6 +322,10 @@ void __init sparse_init(void)
unsigned long pnum_end, pnum_begin, map_count = 1;
int nid_begin;
+ /* see include/linux/mmzone.h 'struct mem_section' definition */
+ BUILD_BUG_ON(!is_power_of_2(sizeof(struct mem_section)));
+ memblocks_present();
+
if (compound_info_has_mask()) {
VM_WARN_ON_ONCE(!IS_ALIGNED((unsigned long) pfn_to_page(0),
MAX_FOLIO_VMEMMAP_ALIGN));
diff --git a/mm/sparse.h b/mm/sparse.h
index 530692cdd516..3b744667a7e6 100644
--- a/mm/sparse.h
+++ b/mm/sparse.h
@@ -9,14 +9,12 @@
#define __MM_SPARSE_H
#include <linux/mmzone.h>
-#include <linux/vmemmap-optimization.h>
/*
* mm/sparse.c
*/
#ifdef CONFIG_SPARSEMEM
void sparse_init(void);
-void sparse_sections_init(void);
int sparse_index_init(unsigned long section_nr, int nid);
static inline void sparse_init_one_section(struct mem_section *ms,
@@ -55,14 +53,8 @@ static inline size_t mem_section_usage_size(void)
return struct_size_t(struct mem_section_usage, pageblock_flags,
BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS));
}
-
-static inline bool section_vmemmap_optimizable(const struct mem_section *ms)
-{
- return vmemmap_optimizable_order(section_compound_order(ms));
-}
#else
static inline void sparse_init(void) {}
-static inline void sparse_sections_init(void) {}
#endif /* CONFIG_SPARSEMEM */
/*
@@ -70,13 +62,8 @@ static inline void sparse_sections_init(void) {}
*/
#ifdef CONFIG_SPARSEMEM_VMEMMAP
void sparse_init_subsection_map(void);
-int section_nr_vmemmap_pages(unsigned long pfn, unsigned long nr_pages);
#else
static inline void sparse_init_subsection_map(void) {}
-static inline int section_nr_vmemmap_pages(unsigned long pfn, unsigned long nr_pages)
-{
- return DIV_ROUND_UP(nr_pages * sizeof(struct page), PAGE_SIZE);
-}
#endif /* CONFIG_SPARSEMEM_VMEMMAP */
#endif /* __MM_SPARSE_H */
diff --git a/mm/swap.h b/mm/swap.h
index b3b54c28929a..90a551a88df6 100644
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -258,7 +258,7 @@ void swap_read_folio(struct swap_io_ctx *ctx, struct folio *folio);
void swap_read_submit(struct swap_io_ctx *ctx);
void swap_write_submit(struct swap_io_ctx *ctx);
int swap_writeout(struct swap_io_ctx *ctx, struct folio *folio);
-void __swap_writeout(struct swap_io_ctx *ctx, struct folio *folio);
+void __swap_writepage(struct swap_io_ctx *ctx, struct folio *folio);
/* linux/mm/swap_state.c */
extern struct address_space swap_space __read_mostly;
@@ -319,12 +319,12 @@ struct folio *swap_cache_alloc_folio(swp_entry_t target_entry, gfp_t gfp_mask,
void __swap_cache_add_folio(struct swap_cluster_info *ci,
struct folio *folio, swp_entry_t entry);
void __swap_cache_del_folio(struct swap_cluster_info *ci,
- struct folio *folio, swp_entry_t entry, void *shadow,
- bool swapout);
+ struct folio *folio, swp_entry_t entry, void *shadow);
void __swap_cache_replace_folio(struct swap_cluster_info *ci,
struct folio *old, struct folio *new);
void show_swap_cache_info(void);
+void swapcache_clear(struct swap_info_struct *si, swp_entry_t entry, int nr);
struct folio *read_swap_cache_async(struct swap_io_ctx *ctx, swp_entry_t entry,
gfp_t gfp_mask, struct vm_area_struct *vma, unsigned long addr);
struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t flag,
@@ -453,8 +453,7 @@ static inline void swap_cache_del_folio(struct folio *folio)
}
static inline void __swap_cache_del_folio(struct swap_cluster_info *ci,
- struct folio *folio, swp_entry_t entry, void *shadow,
- bool swapout)
+ struct folio *folio, swp_entry_t entry, void *shadow)
{
}
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 625c185a1ca4..f3961fdd857d 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -306,28 +306,21 @@ static void __swap_cache_do_del_folio(struct swap_cluster_info *ci,
* @folio: The folio.
* @entry: The first swap entry that the folio corresponds to.
* @shadow: shadow value to be filled in the swap cache.
- * @swapout: whether this folio is being reclaimed after swapout.
*
* Removes a folio from the swap cache and fills a shadow in place.
* This won't put the folio's refcount. The caller has to do that.
*
* Context: Caller must ensure the folio is locked and in the swap cache
* using the index of @entry, and lock the cluster that holds the entries.
- * If @swapout is set, the folio should be in reclaim path and IRQs
- * should be disabled.
*/
void __swap_cache_del_folio(struct swap_cluster_info *ci, struct folio *folio,
- swp_entry_t entry, void *shadow, bool swapout)
+ swp_entry_t entry, void *shadow)
{
unsigned long nr_pages = folio_nr_pages(folio);
+ __swap_cache_do_del_folio(ci, folio, entry, shadow);
node_stat_mod_folio(folio, NR_FILE_PAGES, -nr_pages);
lruvec_stat_mod_folio(folio, NR_SWAPCACHE, -nr_pages);
-
- if (swapout)
- __memcg1_swapout(folio, ci);
-
- __swap_cache_do_del_folio(ci, folio, entry, shadow);
}
/**
@@ -346,7 +339,7 @@ void swap_cache_del_folio(struct folio *folio)
swp_entry_t entry = folio->swap;
ci = swap_cluster_lock(__swap_entry_to_info(entry), swp_offset(entry));
- __swap_cache_del_folio(ci, folio, entry, NULL, false);
+ __swap_cache_del_folio(ci, folio, entry, NULL);
swap_cluster_unlock(ci);
folio_ref_sub(folio, folio_nr_pages(folio));
@@ -723,7 +716,7 @@ struct folio *read_swap_cache_async(struct swap_io_ctx *ctx, swp_entry_t entry,
struct folio *folio;
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
return NULL;
mpol = get_vma_policy(vma, addr, 0, &ilx);
@@ -959,7 +952,7 @@ static struct folio *swap_vma_readahead(swp_entry_t targ_entry, gfp_t gfp_mask,
*/
if (swp_type(entry) != swp_type(targ_entry)) {
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
continue;
}
folio = swap_cache_read_folio(&ctx, entry, gfp_mask, mpol, ilx,
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2cd0d0ba966c..601979b97f95 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -370,6 +370,8 @@ static void discard_swap_cluster(struct swap_info_struct *si,
}
}
+#define LATENCY_LIMIT 256
+
static inline bool cluster_is_empty(struct swap_cluster_info *info)
{
return info->count == 0;
@@ -416,17 +418,6 @@ static void swap_cluster_free_table_folio_rcu_cb(struct rcu_head *head)
folio_put(folio);
}
-static void swap_cluster_free_count_table(struct swap_table *table)
-{
- if (!SWP_TABLE_USE_PAGE) {
- kmem_cache_free(swap_table_cachep, table);
- return;
- }
-
- call_rcu(&(folio_page(virt_to_folio(table), 0)->rcu_head),
- swap_cluster_free_table_folio_rcu_cb);
-}
-
static void swap_cluster_free_table(struct swap_cluster_info *ci)
{
struct swap_table *table;
@@ -446,7 +437,13 @@ static void swap_cluster_free_table(struct swap_cluster_info *ci)
return;
rcu_assign_pointer(ci->table, NULL);
- swap_cluster_free_count_table(table);
+ if (!SWP_TABLE_USE_PAGE) {
+ kmem_cache_free(swap_table_cachep, table);
+ return;
+ }
+
+ call_rcu(&(folio_page(virt_to_folio(table), 0)->rcu_head),
+ swap_cluster_free_table_folio_rcu_cb);
}
static int swap_cluster_alloc_table(struct swap_cluster_info *ci, gfp_t gfp)
@@ -469,12 +466,14 @@ static int swap_cluster_alloc_table(struct swap_cluster_info *ci, gfp_t gfp)
if (!table)
return -ENOMEM;
+ rcu_assign_pointer(ci->table, table);
+
#ifdef CONFIG_MEMCG
if (!mem_cgroup_disabled()) {
VM_WARN_ON_ONCE(ci->memcg_table);
ci->memcg_table = kzalloc_obj(*ci->memcg_table, gfp);
if (!ci->memcg_table) {
- swap_cluster_free_count_table(table);
+ swap_cluster_free_table(ci);
return -ENOMEM;
}
}
@@ -485,16 +484,9 @@ static int swap_cluster_alloc_table(struct swap_cluster_info *ci, gfp_t gfp)
ci->zero_bitmap = bitmap_zalloc(SWAPFILE_CLUSTER, gfp);
if (!ci->zero_bitmap) {
swap_cluster_free_table(ci);
- swap_cluster_free_count_table(table);
return -ENOMEM;
}
#endif
-
- /*
- * Make tables visible to cluster_is_usable() after everything is
- * ready.
- */
- rcu_assign_pointer(ci->table, table);
return 0;
}
@@ -1326,8 +1318,10 @@ static void swap_range_free(struct swap_info_struct *si, unsigned long offset,
{
unsigned long end = offset + nr_entries - 1;
void (*swap_slot_free_notify)(struct block_device *, unsigned long);
+ unsigned int i;
- zswap_invalidate(si->type, offset, nr_entries);
+ for (i = 0; i < nr_entries; i++)
+ zswap_invalidate(swp_entry(si->type, offset + i));
if (si->flags & SWP_BLKDEV)
swap_slot_free_notify =
@@ -1510,7 +1504,7 @@ int swap_retry_table_alloc(swp_entry_t entry, gfp_t gfp)
unsigned long offset = swp_offset(entry);
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
return 0;
ci = __swap_offset_to_cluster(si, offset);
@@ -1523,17 +1517,20 @@ int swap_retry_table_alloc(swp_entry_t entry, gfp_t gfp)
static void swap_extend_table_try_free(struct swap_cluster_info *ci)
{
unsigned long i;
+ bool can_free = true;
if (!ci->extend_table)
return;
for (i = 0; i < SWAPFILE_CLUSTER; i++) {
if (ci->extend_table[i])
- return;
+ can_free = false;
}
- kfree(ci->extend_table);
- ci->extend_table = NULL;
+ if (can_free) {
+ kfree(ci->extend_table);
+ ci->extend_table = NULL;
+ }
}
/* Decrease the swap count of one slot, without freeing it */
@@ -1725,6 +1722,7 @@ restart:
failed:
while (ci_off-- > ci_start)
__swap_cluster_put_entry(ci, ci_off);
+ swap_extend_table_try_free(ci);
swap_cluster_unlock(ci);
return err;
}
@@ -1737,9 +1735,7 @@ failed:
* swap cache.
*
* Context: Caller needs to hold the folio lock.
- * Return: %0 on success, %-E2BIG if splitting the folio might allow swapout,
- * %-ENOSPC if no global swap space is available, or %-ENOMEM if splitting
- * would not help.
+ * Return: Whether the folio was added to the swap cache.
*/
int folio_alloc_swap(struct folio *folio)
{
@@ -1751,11 +1747,11 @@ int folio_alloc_swap(struct folio *folio)
if (order) {
/*
- * Reject large allocation when THP_SWAP is disabled. Check below
- * whether splitting and retrying can make progress.
+ * Reject large allocation when THP_SWAP is disabled,
+ * the caller should split the folio and try again.
*/
if (!IS_ENABLED(CONFIG_THP_SWAP))
- goto failed;
+ return -EAGAIN;
/*
* Allocation size should never exceed cluster size
@@ -1763,7 +1759,7 @@ int folio_alloc_swap(struct folio *folio)
*/
if (size > SWAPFILE_CLUSTER) {
VM_WARN_ON_ONCE(1);
- goto failed;
+ return -EINVAL;
}
}
@@ -1779,23 +1775,13 @@ again:
}
/* Need to call this even if allocation failed, for MEMCG_SWAP_FAIL. */
- if (unlikely(mem_cgroup_try_charge_swap(folio))) {
+ if (unlikely(mem_cgroup_try_charge_swap(folio)))
swap_cache_del_folio(folio);
- goto failed;
- }
if (unlikely(!folio_test_swapcache(folio)))
- goto failed;
-
- return 0;
-
-failed:
- if (get_nr_swap_pages() <= 0)
- return -ENOSPC;
- if (mem_cgroup_get_folio_swap_margin(folio) <= 0)
return -ENOMEM;
- return order ? -E2BIG : -ENOMEM;
+ return 0;
}
/**
@@ -1824,7 +1810,7 @@ int folio_dup_swap(struct folio *folio, struct page *page)
VM_WARN_ON_FOLIO(!folio_test_swapcache(folio), folio);
if (page) {
- entry = folio_page_swap_entry(folio, page);
+ entry.val += folio_page_idx(folio, page);
nr_pages = 1;
}
@@ -1851,7 +1837,7 @@ void folio_put_swap(struct folio *folio, struct page *page)
VM_WARN_ON_FOLIO(!folio_test_swapcache(folio), folio);
if (page) {
- entry = folio_page_swap_entry(folio, page);
+ entry.val += folio_page_idx(folio, page);
nr_pages = 1;
}
@@ -1873,10 +1859,7 @@ void folio_put_swap(struct folio *folio, struct page *page)
* Check whether swap entry is valid in the swap device. If so,
* return pointer to swap_info_struct, and keep the swap entry valid
* via preventing the swap device from being swapoff, until
- * put_swap_device() is called. Return NULL for an empty entry or a
- * device that is going away, and ERR_PTR(-EIO) if the entry's type
- * names no swap device or its offset is past the end of one. These EIOs
- * are preceded by pr_err().
+ * put_swap_device() is called. Otherwise return NULL.
*
* Notice that swapoff or swapoff+swapon can still happen before the
* percpu_ref_tryget_live() in get_swap_device() or after the
@@ -1917,14 +1900,12 @@ struct swap_info_struct *get_swap_device(swp_entry_t entry)
return si;
bad_nofile:
pr_err_ratelimited("%s: %s%08lx\n", __func__, Bad_file, entry.val);
- return ERR_PTR(-EIO);
-
out:
return NULL;
put_out:
pr_err_ratelimited("%s: %s%08lx\n", __func__, Bad_offset, entry.val);
percpu_ref_put(&si->users);
- return ERR_PTR(-EIO);
+ return NULL;
}
/*
@@ -2020,7 +2001,7 @@ int swp_swapcount(swp_entry_t entry)
int count;
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
return 0;
ci = swap_cluster_lock(si, swp_offset(entry));
@@ -2146,7 +2127,7 @@ void swap_put_entries_direct(swp_entry_t entry, int nr)
struct swap_info_struct *si;
si = get_swap_device(entry);
- if (WARN_ON_ONCE(IS_ERR_OR_NULL(si)))
+ if (WARN_ON_ONCE(!si))
return;
if (WARN_ON_ONCE(end_offset > si->max))
goto out;
@@ -2728,9 +2709,7 @@ unlock:
static unsigned int find_next_to_unuse(struct swap_info_struct *si,
unsigned int prev)
{
- struct swap_cluster_info *ci;
- unsigned long i, end;
- unsigned int ci_off;
+ unsigned int i;
unsigned long swp_tb;
/*
@@ -2739,36 +2718,19 @@ static unsigned int find_next_to_unuse(struct swap_info_struct *si,
* hits are okay, and sys_swapoff() has already prevented new
* allocations from this area (while holding swap_lock).
*/
- i = prev + 1;
- while (i < si->max) {
- ci = __swap_offset_to_cluster(si, i);
- end = min_t(unsigned long,
- ALIGN_DOWN(i, SWAPFILE_CLUSTER) + SWAPFILE_CLUSTER,
- si->max);
-
- /*
- * An empty cluster has no slot in use, so skip it whole.
- * A slot is uncounted only after its folio left the swap
- * cache, so there is nothing here for try_to_unuse() to act on.
- * Count only drops here, so a READ_ONCE() without ci->lock is
- * enough, unlike in every other cluster_is_empty() caller.
- */
- if (!READ_ONCE(ci->count)) {
- i = end;
+ for (i = prev + 1; i < si->max; i++) {
+ swp_tb = swap_table_get(__swap_offset_to_cluster(si, i),
+ i % SWAPFILE_CLUSTER);
+ if (!swp_tb_is_null(swp_tb) && !swp_tb_is_bad(swp_tb))
+ break;
+ if ((i % LATENCY_LIMIT) == 0)
cond_resched();
- continue;
- }
-
- ci_off = i % SWAPFILE_CLUSTER;
- for (; i < end; ci_off++, i++) {
- swp_tb = swap_table_get(ci, ci_off);
- if (!swp_tb_is_null(swp_tb) && !swp_tb_is_bad(swp_tb))
- return i;
- }
- cond_resched();
}
- return 0;
+ if (i == si->max)
+ i = 0;
+
+ return i;
}
static int try_to_unuse(unsigned int type)
@@ -2966,7 +2928,7 @@ EXPORT_SYMBOL_GPL(add_swap_extent);
/*
* A `swap extent' is a simple thing which maps a contiguous range of pages
* onto a contiguous range of disk blocks. A rbtree of swap extents is
- * built at swapon time and is then used at swap_writeout/swap_read_folio
+ * built at swapon time and is then used at swap_writepage/swap_read_folio
* time for locating where on disk a page belongs.
*
* If the swapfile is an S_ISBLK block device, a single extent is installed.
@@ -3759,6 +3721,11 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
maxpages = si->max;
+ /* Set up the swap cluster info */
+ error = setup_swap_clusters_info(si, swap_header, maxpages);
+ if (error)
+ goto bad_swap_unlock_inode;
+
if (si->bdev && bdev_stable_writes(si->bdev))
si->flags |= SWP_STABLE_WRITES;
@@ -3772,14 +3739,6 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
inced_nr_rotate_swap = true;
}
- /*
- * Set up the swap cluster info after SWP_ flags handling as
- * setup_swap_clusters_info() checks SWP_SOLIDSTATE.
- */
- error = setup_swap_clusters_info(si, swap_header, maxpages);
- if (error)
- goto bad_swap_unlock_inode;
-
if ((swap_flags & SWAP_FLAG_DISCARD) &&
si->bdev && bdev_max_discard_sectors(si->bdev)) {
/*
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index 79cc7b546f13..74f04c323c50 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -122,6 +122,7 @@ struct vm_area_struct *find_vma_and_prepare_anon(struct mm_struct *mm,
return vma;
}
+#ifdef CONFIG_PER_VMA_LOCK
/*
* uffd_lock_vma() - Lookup and lock vma corresponding to @address.
* @mm: mm to search vma in.
@@ -129,10 +130,8 @@ struct vm_area_struct *find_vma_and_prepare_anon(struct mm_struct *mm,
*
* Should be called without holding mmap_lock.
*
- * Return: A locked vma containing @address, -ENOENT if no vma is found,
- * -ENOMEM if anon_vma couldn't be allocated, or -EAGAIN if vma refcount
- * overflow happened due to high number of readers and the caller should
- * retry later.
+ * Return: A locked vma containing @address, -ENOENT if no vma is found, or
+ * -ENOMEM if anon_vma couldn't be allocated.
*/
static struct vm_area_struct *uffd_lock_vma(struct mm_struct *mm,
unsigned long address)
@@ -183,6 +182,34 @@ static void uffd_mfill_unlock(struct vm_area_struct *vma)
vma_end_read(vma);
}
+#else
+
+static struct vm_area_struct *uffd_mfill_lock(struct mm_struct *dst_mm,
+ unsigned long dst_start,
+ unsigned long len)
+{
+ struct vm_area_struct *dst_vma;
+
+ mmap_read_lock(dst_mm);
+ dst_vma = find_vma_and_prepare_anon(dst_mm, dst_start);
+ if (IS_ERR(dst_vma))
+ goto out_unlock;
+
+ if (validate_dst_vma(dst_vma, dst_start + len))
+ return dst_vma;
+
+ dst_vma = ERR_PTR(-ENOENT);
+out_unlock:
+ mmap_read_unlock(dst_mm);
+ return dst_vma;
+}
+
+static void uffd_mfill_unlock(struct vm_area_struct *vma)
+{
+ mmap_read_unlock(vma->vm_mm);
+}
+#endif
+
static void mfill_put_vma(struct mfill_state *state)
{
if (!state->vma)
@@ -1673,7 +1700,7 @@ retry:
}
si = get_swap_device(entry);
- if (IS_ERR_OR_NULL(si)) {
+ if (unlikely(!si)) {
ret = -EAGAIN;
goto out;
}
@@ -1730,7 +1757,7 @@ out:
if (dst_pte)
pte_unmap(dst_pte);
mmu_notifier_invalidate_range_end(&range);
- if (!IS_ERR_OR_NULL(si))
+ if (si)
put_swap_device(si);
return ret;
@@ -1823,6 +1850,7 @@ out_success:
return 0;
}
+#ifdef CONFIG_PER_VMA_LOCK
static int uffd_move_lock(struct mm_struct *mm,
unsigned long dst_start,
unsigned long src_start,
@@ -1897,6 +1925,31 @@ static void uffd_move_unlock(struct vm_area_struct *dst_vma,
vma_end_read(dst_vma);
}
+#else
+
+static int uffd_move_lock(struct mm_struct *mm,
+ unsigned long dst_start,
+ unsigned long src_start,
+ struct vm_area_struct **dst_vmap,
+ struct vm_area_struct **src_vmap)
+{
+ int err;
+
+ mmap_read_lock(mm);
+ err = find_vmas_mm_locked(mm, dst_start, src_start, dst_vmap, src_vmap);
+ if (err)
+ mmap_read_unlock(mm);
+ return err;
+}
+
+static void uffd_move_unlock(struct vm_area_struct *dst_vma,
+ struct vm_area_struct *src_vma)
+{
+ mmap_assert_locked(src_vma->vm_mm);
+ mmap_read_unlock(dst_vma->vm_mm);
+}
+#endif
+
/**
* move_pages - move arbitrary anonymous pages of an existing vma
* @ctx: pointer to the userfaultfd context
diff --git a/mm/vma.c b/mm/vma.c
index 55917d097933..9f0a0acf694a 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -2629,23 +2629,6 @@ static int __mmap_new_file_vma(struct mmap_state *map,
return 0;
}
-static void map_set_anon(struct mmap_state *map)
-{
- map->file = NULL;
- map->vm_ops = NULL;
- map->pgoff = map->addr >> PAGE_SHIFT;
-}
-
-static bool map_is_private(const struct mmap_state *map)
-{
- return !vma_flags_test(&map->vma_flags, VMA_SHARED_BIT);
-}
-
-static bool map_is_anon(const struct mmap_state *map)
-{
- return map_is_private(map) && !map->file;
-}
-
/*
* __mmap_new_vma() - Allocate a new VMA for the region, as merging was not
* possible.
@@ -2659,7 +2642,8 @@ static bool map_is_anon(const struct mmap_state *map)
static int __mmap_new_vma(struct mmap_state *map, struct vm_area_struct **vmap,
struct mmap_action *action)
{
- const bool is_anon = map_is_anon(map);
+ const bool is_anon = !map->file &&
+ !vma_flags_test(&map->vma_flags, VMA_SHARED_BIT);
struct vma_iterator *vmi = map->vmi;
int error = 0;
struct vm_area_struct *vma;
@@ -2801,10 +2785,6 @@ static int call_mmap_prepare(struct mmap_state *map,
if (err)
return err;
- /* It's invalid for mmap_preprare hooks to clear vm_ops. */
- if (!desc->vm_ops)
- return -EINVAL;
-
err = call_action_prepare(map, desc);
if (err)
return err;
@@ -2821,21 +2801,16 @@ static int call_mmap_prepare(struct mmap_state *map,
map->vm_ops = desc->vm_ops;
map->vm_private_data = desc->private_data;
- /*
- * MAP_PRIVATE-/dev/zero mappings are an ancient way of getting
- * anonymous mappings. Rather than allowing these mappings to be odd
- * outliers, simply make them truly anonymous.
- */
- if (map_is_private(map) && file_is_dev_zero(map->file))
- map_set_anon(map);
-
return 0;
}
static void set_vma_user_defined_fields(struct vm_area_struct *vma,
struct mmap_state *map)
{
- vma->vm_ops = map->vm_ops;
+ if (map->vm_ops)
+ vma->vm_ops = map->vm_ops;
+ else /* Only /dev/zero should do this. */
+ vma_set_anonymous(vma);
vma->vm_private_data = map->vm_private_data;
}
@@ -2917,7 +2892,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr,
allocated_new = true;
}
- if (have_mmap_prepare && !map_is_anon(&map))
+ if (have_mmap_prepare)
set_vma_user_defined_fields(vma, &map);
__mmap_complete(&map, vma);
diff --git a/mm/vma.h b/mm/vma.h
index e97bd2dfa786..024fabe63560 100644
--- a/mm/vma.h
+++ b/mm/vma.h
@@ -267,6 +267,9 @@ static inline void assert_sane_pgoff(struct vm_area_struct *vma, pgoff_t pgoff)
*/
if (!vma_is_anonymous(vma))
return;
+ /* MAP_PRIVATE-/dev/zero is anon, non-NULL vm_file, but has file pgoff. */
+ if (vma->vm_file)
+ return;
/* If faulted in, could have been remapped. */
if (vma->anon_vma)
return;
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 859e6d2d57a3..89c327a6ce7d 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1090,12 +1090,7 @@ RB_DECLARE_CALLBACKS_MAX(static, free_vmap_area_rb_augment_cb,
static void reclaim_and_purge_vmap_areas(void);
static BLOCKING_NOTIFIER_HEAD(vmap_notify_list);
static void drain_vmap_area_work(struct work_struct *work);
-/*
- * Keep the work item, whose pending bit is updated by freeing CPUs,
- * away from vmap metadata read by allocation and free paths.
- */
-static __cacheline_aligned_in_smp
-DECLARE_WORK(drain_vmap_work, drain_vmap_area_work);
+static DECLARE_WORK(drain_vmap_work, drain_vmap_area_work);
static struct workqueue_struct *drain_vmap_helpers_wq;
static struct workqueue_struct *drain_vmap_wq;
@@ -2452,8 +2447,7 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end,
static void reclaim_and_purge_vmap_areas(void)
{
- if (!mutex_trylock(&vmap_purge_lock))
- return;
+ mutex_lock(&vmap_purge_lock);
purge_fragmented_blocks_allcpus();
__purge_vmap_area_lazy(ULONG_MAX, 0, true);
mutex_unlock(&vmap_purge_lock);
@@ -3138,7 +3132,7 @@ EXPORT_SYMBOL(vm_map_ram);
static struct vm_struct *vmlist __initdata;
-static inline unsigned int vm_area_page_order(const struct vm_struct *vm)
+static inline unsigned int vm_area_page_order(struct vm_struct *vm)
{
#ifdef CONFIG_HAVE_ARCH_HUGE_VMALLOC
return vm->page_order;
@@ -3147,7 +3141,7 @@ static inline unsigned int vm_area_page_order(const struct vm_struct *vm)
#endif
}
-unsigned int get_vm_area_page_order(const struct vm_struct *vm)
+unsigned int get_vm_area_page_order(struct vm_struct *vm)
{
return vm_area_page_order(vm);
}
@@ -3372,18 +3366,14 @@ struct vm_struct *remove_vm_area(const void *addr)
}
static inline void set_area_direct_map(const struct vm_struct *area,
- int (*set_direct_map)(struct page *page,
- unsigned int nr))
+ int (*set_direct_map)(struct page *page))
{
- unsigned int nr = (1U << vm_area_page_order(area));
-
- for (unsigned long i = 0; i < area->nr_pages; i += nr) {
- if (page_address(area->pages[i])) {
- int err = set_direct_map(area->pages[i], nr);
+ unsigned long i;
- WARN_ON_ONCE(err);
- }
- }
+ /* HUGE_VMALLOC passes small pages to set_direct_map */
+ for (i = 0; i < area->nr_pages; i++)
+ if (page_address(area->pages[i]))
+ set_direct_map(area->pages[i]);
}
/*
@@ -3890,7 +3880,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
unsigned long size = get_vm_area_size(area);
unsigned long array_size;
unsigned long nr_small_pages = size >> PAGE_SHIFT;
- unsigned int page_order = page_shift - PAGE_SHIFT;
+ unsigned int page_order;
unsigned int flags;
int ret;
@@ -3918,6 +3908,9 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
goto fail;
}
+ set_vm_area_page_order(area, page_shift - PAGE_SHIFT);
+ page_order = vm_area_page_order(area);
+
/*
* High-order nofail allocations are really expensive and
* potentially dangerous (pre-mature OOM, disruptive reclaim
@@ -3972,7 +3965,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
goto fail;
}
- set_vm_area_page_order(area, page_order);
return area->addr;
fail:
@@ -4035,12 +4027,6 @@ static gfp_t vmalloc_fix_flags(gfp_t flags)
* %__GFP_SKIP_KASAN can be used to skip unpoisoning of mapped pages
* (when prot=%PAGE_KERNEL).
*
- * %VM_ALLOW_HUGE_VMAP allocates huge pages when possible and falls back to
- * base pages if huge page allocation fails.
- *
- * %VM_REQUIRE_HUGE_VMAP implies %VM_ALLOW_HUGE_VMAP and fails instead of
- * silently falling back to base pages.
- *
* Can not be called from interrupt nor NMI contexts.
* Return: the address of the area or %NULL on failure
*/
@@ -4066,10 +4052,6 @@ void *__vmalloc_node_range_noprof(unsigned long size, unsigned long align,
return NULL;
}
- /* VM_REQUIRE_HUGE_VMAP implies VM_ALLOW_HUGE_VMAP */
- if (vm_flags & VM_REQUIRE_HUGE_VMAP)
- vm_flags |= VM_ALLOW_HUGE_VMAP;
-
if (vmap_allow_huge && (vm_flags & VM_ALLOW_HUGE_VMAP)) {
/*
* Try huge pages. Only try for PAGE_KERNEL allocations,
@@ -4086,9 +4068,6 @@ void *__vmalloc_node_range_noprof(unsigned long size, unsigned long align,
align = max(original_align, 1UL << shift);
}
- if ((vm_flags & VM_REQUIRE_HUGE_VMAP) && shift == PAGE_SHIFT)
- return NULL;
-
again:
area = __get_vm_area_node(size, align, shift, VM_ALLOC |
VM_UNINITIALIZED | vm_flags, start, end, node,
@@ -4163,7 +4142,7 @@ again:
return area->addr;
fail:
- if (shift > PAGE_SHIFT && !(vm_flags & VM_REQUIRE_HUGE_VMAP)) {
+ if (shift > PAGE_SHIFT) {
shift = PAGE_SHIFT;
align = original_align;
goto again;
@@ -5548,20 +5527,10 @@ vmap_node_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{
struct vmap_node *vn;
- /*
- * This shrinker is invoked from direct reclaim where memory
- * pressure is already high. Blocking on vmap_purge_lock here
- * can deadlock the system: the lock holder may be blocked in
- * flush_work() waiting for a worker that is stuck in this same
- * reclaim path trying to acquire the same lock. Use trylock
- * to avoid this; skipping a pool decay cycle is harmless.
- */
- if (!mutex_trylock(&vmap_purge_lock))
- return SHRINK_STOP;
+ guard(mutex)(&vmap_purge_lock);
for_each_vmap_node(vn)
decay_va_pool_node(vn, true);
- mutex_unlock(&vmap_purge_lock);
return SHRINK_STOP;
}
diff --git a/mm/vmalloc.h b/mm/vmalloc.h
index 211869f36509..8866ddcff668 100644
--- a/mm/vmalloc.h
+++ b/mm/vmalloc.h
@@ -12,7 +12,7 @@ void __init vmalloc_init(void);
int __must_check vmap_pages_range_noflush(unsigned long addr, unsigned long end,
pgprot_t prot, struct page **pages,
unsigned int page_shift, gfp_t gfp_mask);
-unsigned int get_vm_area_page_order(const struct vm_struct *vm);
+unsigned int get_vm_area_page_order(struct vm_struct *vm);
#else
static inline void vmalloc_init(void) {}
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 3de99fef3928..9629240d77ad 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -30,6 +30,9 @@
*
* As the vmscan reclaimer logic works with chunks which are multiple of
* SWAP_CLUSTER_MAX, it makes sense to use it for the window size as well.
+ *
+ * TODO: Make the window size depend on machine size, as we do for vmstat
+ * thresholds. Currently we set it to 512 pages (2MB for 4KB pages).
*/
const unsigned long vmpressure_win = SWAP_CLUSTER_MAX * 16;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index aaceed4759ee..f11491ee9ed5 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -182,37 +182,17 @@ struct scan_control {
};
#ifdef ARCH_HAS_PREFETCHW
-static inline void prefetchw_prev_lru_folio(struct folio *folio,
- struct list_head *base)
-{
- if (folio->lru.prev != base) {
- struct folio *prev;
-
- prev = lru_to_folio(&folio->lru);
- prefetchw(&prev->flags);
- }
-}
-
-static inline void prefetchw_next_lru_folio(struct folio *folio,
- struct list_head *base)
-{
- if (folio->lru.next != base) {
- struct folio *next;
-
- next = list_entry(folio->lru.next, struct folio, lru);
- prefetchw(&next->flags);
- }
-}
+#define prefetchw_prev_lru_folio(_folio, _base, _field) \
+ do { \
+ if ((_folio)->lru.prev != _base) { \
+ struct folio *prev; \
+ \
+ prev = lru_to_folio(&(_folio->lru)); \
+ prefetchw(&prev->_field); \
+ } \
+ } while (0)
#else
-static inline void prefetchw_prev_lru_folio(struct folio *folio,
- struct list_head *base)
-{
-}
-
-static inline void prefetchw_next_lru_folio(struct folio *folio,
- struct list_head *base)
-{
-}
+#define prefetchw_prev_lru_folio(_folio, _base, _field) do { } while (0)
#endif
/*
@@ -362,72 +342,20 @@ static bool can_demote(int nid, struct scan_control *sc,
return !nodes_empty(allowed_mask);
}
-#ifdef CONFIG_SWAP
-static inline bool reclaimable_anon_is_low(struct mem_cgroup *memcg,
- int nid, struct scan_control *sc)
-{
- pg_data_t *pgdat = NODE_DATA(nid);
- unsigned long anon_pages, swapcache;
-
- /*
- * A GFP_NOIO reclaimer can only reclaim anon that is already in the
- * swapcache (adding anon to the swapcache needs IO). When swapcache is
- * far below the anon LRU, scanning anon reclaims nothing and only burns
- * CPU. The 1/64 threshold keeps this to the case where anon is
- * effectively unreclaimable.
- */
- if (!sc || (sc->gfp_mask & __GFP_IO))
- return false;
-
- /*
- * FIXME: MGLRU doesn't fully respect can_reclaim_anon_pages() for the
- * scanning type, so only apply this to the traditional LRU for now.
- */
- if (lru_gen_enabled())
- return false;
-
- if (memcg) {
- struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat);
-
- anon_pages = lruvec_page_state(lruvec, NR_INACTIVE_ANON) +
- lruvec_page_state(lruvec, NR_ACTIVE_ANON);
- swapcache = lruvec_page_state(lruvec, NR_SWAPCACHE);
- } else {
- anon_pages = node_page_state(pgdat, NR_INACTIVE_ANON) +
- node_page_state(pgdat, NR_ACTIVE_ANON);
- swapcache = node_page_state(pgdat, NR_SWAPCACHE);
- }
-
- return swapcache < (anon_pages >> 6);
-}
-#else
-static inline bool reclaimable_anon_is_low(struct mem_cgroup *memcg,
- int nid, struct scan_control *sc)
-{
- return true;
-}
-#endif /* CONFIG_SWAP */
-
static inline bool can_reclaim_anon_pages(struct mem_cgroup *memcg,
int nid,
struct scan_control *sc)
{
if (memcg == NULL) {
/*
- * For non-memcg reclaim, is there space in any swap device?
- * And under GFP_NOIO, is there enough swapcached anon to make
- * scanning anon worthwhile?
+ * For non-memcg reclaim, is there
+ * space in any swap device?
*/
- if (get_nr_swap_pages() > 0 &&
- !reclaimable_anon_is_low(memcg, nid, sc))
+ if (get_nr_swap_pages() > 0)
return true;
} else {
- /*
- * Is the memcg below its swap limit, and under GFP_NOIO does
- * it have enough swapcached anon to make scanning worthwhile?
- */
- if (mem_cgroup_get_nr_swap_pages(memcg) > 0 &&
- !reclaimable_anon_is_low(memcg, nid, sc))
+ /* Is the memcg below its swap limit? */
+ if (mem_cgroup_get_nr_swap_pages(memcg) > 0)
return true;
}
@@ -807,7 +735,8 @@ static int __remove_mapping(struct address_space *mapping, struct folio *folio,
if (reclaimed && !mapping_exiting(mapping))
shadow = workingset_eviction(folio, target_memcg);
- __swap_cache_del_folio(ci, folio, swap, shadow, true);
+ __memcg1_swapout(folio, ci);
+ __swap_cache_del_folio(ci, folio, swap, shadow);
swap_cluster_unlock_irq(ci);
} else {
void (*free_folio)(struct folio *);
@@ -914,22 +843,19 @@ static bool lru_gen_set_refs(struct folio *folio, const vma_flags_t *vma_flags)
if (!folio_test_referenced(folio) && !folio_test_workingset(folio)) {
/* Activate file-backed executable folios after first usage. */
if (is_exec_file_folio(folio, vma_flags)) {
- folio_set_workingset(folio);
- folio_set_lru_refs(folio, 0);
+ set_mask_bits(&folio->flags.f, LRU_REFS_FLAGS, BIT(PG_workingset));
return true;
}
- folio_set_lru_refs(folio, 1);
+ set_mask_bits(&folio->flags.f, LRU_REFS_MASK, BIT(PG_referenced));
return false;
}
/* Promote on second access */
- if (folio_lru_refs(folio) > 1) {
- folio_set_workingset(folio);
- folio_set_lru_refs(folio, 0);
- } else {
+ if (folio_lru_refs(folio) > 1)
+ set_mask_bits(&folio->flags.f, LRU_REFS_FLAGS, BIT(PG_workingset));
+ else
folio_mark_accessed(folio);
- }
return true;
}
#else
@@ -1333,8 +1259,6 @@ retry:
*/
if (folio_test_anon(folio) && folio_test_swapbacked(folio) &&
!folio_test_swapcache(folio)) {
- int ret;
-
if (!(sc->gfp_mask & __GFP_IO))
goto keep_locked;
if (folio_maybe_dma_pinned(folio))
@@ -1353,14 +1277,11 @@ retry:
split_folio_to_list(folio, folio_list))
goto activate_locked;
}
- ret = folio_alloc_swap(folio);
- if (ret) {
+ if (folio_alloc_swap(folio)) {
int __maybe_unused order = folio_order(folio);
if (!folio_test_large(folio))
goto activate_locked_split;
- if (ret != -E2BIG)
- goto activate_locked;
/* Fallback to swap normal pages */
if (split_folio_to_list(folio, folio_list))
goto activate_locked;
@@ -1774,7 +1695,7 @@ static unsigned long isolate_lru_folios(unsigned long nr_to_scan,
struct folio *folio;
folio = lru_to_folio(src);
- prefetchw_prev_lru_folio(folio, src);
+ prefetchw_prev_lru_folio(folio, src, flags);
nr_pages = folio_nr_pages(folio);
total_scan += nr_pages;
@@ -3274,8 +3195,8 @@ struct ctrl_pos {
int gain;
};
-static void read_ctrl_pos(struct lruvec *lruvec, int type, int tier_min,
- int tier_max, int gain, struct ctrl_pos *pos)
+static void read_ctrl_pos(struct lruvec *lruvec, int type, int tier, int gain,
+ struct ctrl_pos *pos)
{
int i;
struct lru_gen_folio *lrugen = &lruvec->lrugen;
@@ -3284,7 +3205,7 @@ static void read_ctrl_pos(struct lruvec *lruvec, int type, int tier_min,
pos->gain = gain;
pos->refaulted = pos->total = 0;
- for (i = tier_min; i <= tier_max; i++) {
+ for (i = tier % MAX_NR_TIERS; i <= min(tier, MAX_NR_TIERS - 1); i++) {
pos->refaulted += lrugen->avg_refaulted[type][i] +
atomic_long_read(&lrugen->refaulted[hist][type][i]);
pos->total += lrugen->avg_total[type][i] +
@@ -3345,11 +3266,11 @@ static bool positive_ctrl_err(struct ctrl_pos *sp, struct ctrl_pos *pv)
******************************************************************************/
/* promote pages accessed through page tables */
-static int folio_update_gen(struct folio *folio, int new_gen, int *type,
- const vma_flags_t *vma_flags)
+static int folio_update_gen(struct folio *folio, int gen, const vma_flags_t *vma_flags)
{
- unsigned long new_flags, old_flags = READ_ONCE(*folio_flags(folio, 0));
- int old_gen;
+ unsigned long new_flags, old_flags = READ_ONCE(folio->flags.f);
+
+ VM_WARN_ON_ONCE(gen >= MAX_NR_GENS);
/*
* See the comment on LRU_REFS_FLAGS, and activate file-backed
@@ -3358,71 +3279,53 @@ static int folio_update_gen(struct folio *folio, int new_gen, int *type,
*/
if (!folio_test_referenced(folio) && !folio_test_workingset(folio) &&
!is_exec_file_folio(folio, vma_flags)) {
- folio_set_lru_refs(folio, 1);
+ set_mask_bits(&folio->flags.f, LRU_REFS_MASK, BIT(PG_referenced));
return -1;
}
do {
- old_gen = lru_get_gen_flags(old_flags);
- new_flags = old_flags;
-
/* lru_gen_del_folio() has isolated this page? */
- if (old_gen < 0)
- break;
+ if (!(old_flags & LRU_GEN_MASK))
+ return -1;
- lru_set_gen_flags(&new_flags, new_gen);
- lru_set_refs_flags(&new_flags, 0);
- new_flags |= BIT(PG_workingset);
- } while (!try_cmpxchg(folio_flags(folio, 0), &old_flags, new_flags));
+ new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_FLAGS);
+ new_flags |= ((gen + 1UL) << LRU_GEN_PGOFF) | BIT(PG_workingset);
+ } while (!try_cmpxchg(&folio->flags.f, &old_flags, new_flags));
- *type = folio_flags_is_file_lru(&old_flags);
- return old_gen;
+ return ((old_flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
}
-static int __folio_inc_gen(struct folio *folio, int old_gen, bool *increased)
+/* protect pages accessed multiple times through file descriptors */
+static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio)
{
- unsigned long new_flags, old_flags = READ_ONCE(*folio_flags(folio, 0));
- int new_gen;
+ int type = folio_is_file_lru(folio);
+ struct lru_gen_folio *lrugen = &lruvec->lrugen;
+ int new_gen, old_gen = lru_gen_from_seq(lrugen->min_seq[type]);
+ unsigned long new_flags, old_flags = READ_ONCE(folio->flags.f);
- do {
- new_gen = lru_get_gen_flags(old_flags);
+ VM_WARN_ON_ONCE_FOLIO(!(old_flags & LRU_GEN_MASK), folio);
+ do {
+ new_gen = ((old_flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
/* folio_update_gen() has promoted this page? */
- if (new_gen >= 0 && new_gen != old_gen) {
- if (increased)
- *increased = false;
+ if (new_gen >= 0 && new_gen != old_gen)
return new_gen;
- }
- new_flags = old_flags;
new_gen = (old_gen + 1) % MAX_NR_GENS;
- lru_set_gen_flags(&new_flags, new_gen);
- lru_set_refs_flags(&new_flags, 0);
- } while (!try_cmpxchg(folio_flags(folio, 0), &old_flags, new_flags));
-
- if (increased)
- *increased = true;
- return new_gen;
-}
+ new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_FLAGS);
+ new_flags |= (new_gen + 1UL) << LRU_GEN_PGOFF;
+ } while (!try_cmpxchg(&folio->flags.f, &old_flags, new_flags));
-/* protect pages accessed multiple times through file descriptors */
-static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio)
-{
- int type = folio_is_file_lru(folio);
- struct lru_gen_folio *lrugen = &lruvec->lrugen;
- int new_gen, old_gen = lru_gen_from_seq(lrugen->min_seq[type]);
- bool gen_increased;
+ lru_gen_update_size(lruvec, folio, old_gen, new_gen);
- new_gen = __folio_inc_gen(folio, old_gen, &gen_increased);
- if (gen_increased)
- lru_gen_update_size(lruvec, folio, old_gen, new_gen);
return new_gen;
}
static void update_batch_size(struct lru_gen_mm_walk *walk, struct folio *folio,
- int old_gen, int new_gen, int type)
+ int old_gen, int new_gen)
{
+ int type = folio_is_file_lru(folio);
int zone = folio_zonenum(folio);
int delta = folio_nr_pages(folio);
@@ -3609,24 +3512,22 @@ static bool suitable_to_scan(int total, int young)
}
static void walk_update_folio(struct lru_gen_mm_walk *walk, struct vm_area_struct *vma,
- struct lruvec *lruvec, struct folio *folio, bool dirty)
+ struct folio *folio, int new_gen, bool dirty)
{
- int new_gen, old_gen, type;
+ int old_gen;
if (!folio)
return;
- new_gen = lru_gen_from_seq(READ_ONCE(lruvec->lrugen.max_seq));
-
if (dirty && !folio_test_dirty(folio) &&
!(folio_test_anon(folio) && folio_test_swapbacked(folio) &&
!folio_test_swapcache(folio)))
folio_mark_dirty(folio);
if (walk) {
- old_gen = folio_update_gen(folio, new_gen, &type, &vma->flags);
+ old_gen = folio_update_gen(folio, new_gen, &vma->flags);
if (old_gen >= 0 && old_gen != new_gen)
- update_batch_size(walk, folio, old_gen, new_gen, type);
+ update_batch_size(walk, folio, old_gen, new_gen);
} else if (lru_gen_set_refs(folio, &vma->flags)) {
old_gen = folio_lru_gen(folio);
if (old_gen >= 0 && old_gen != new_gen)
@@ -3648,6 +3549,8 @@ static bool walk_pte_range(pmd_t *pmd, unsigned long start, unsigned long end,
struct lru_gen_mm_walk *walk = args->private;
struct mem_cgroup *memcg = lruvec_memcg(walk->lruvec);
struct pglist_data *pgdat = lruvec_pgdat(walk->lruvec);
+ DEFINE_MAX_SEQ(walk->lruvec);
+ int gen = lru_gen_from_seq(max_seq);
unsigned int nr;
pmd_t pmdval;
@@ -3698,7 +3601,7 @@ restart:
continue;
if (last != folio) {
- walk_update_folio(walk, args->vma, walk->lruvec, last, dirty);
+ walk_update_folio(walk, args->vma, last, gen, dirty);
last = folio;
dirty = false;
@@ -3711,7 +3614,7 @@ restart:
walk->mm_stats[MM_LEAF_YOUNG] += nr;
}
- walk_update_folio(walk, args->vma, walk->lruvec, last, dirty);
+ walk_update_folio(walk, args->vma, last, gen, dirty);
last = NULL;
if (i < PTRS_PER_PTE && get_next_vma(PMD_MASK, PAGE_SIZE, args, &start, &end))
@@ -3734,6 +3637,8 @@ static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area
struct lru_gen_mm_walk *walk = args->private;
struct mem_cgroup *memcg = lruvec_memcg(walk->lruvec);
struct pglist_data *pgdat = lruvec_pgdat(walk->lruvec);
+ DEFINE_MAX_SEQ(walk->lruvec);
+ int gen = lru_gen_from_seq(max_seq);
VM_WARN_ON_ONCE(pud_leaf(*pud));
@@ -3787,7 +3692,7 @@ static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area
goto next;
if (last != folio) {
- walk_update_folio(walk, vma, walk->lruvec, last, dirty);
+ walk_update_folio(walk, vma, last, gen, dirty);
last = folio;
dirty = false;
@@ -3801,7 +3706,7 @@ next:
i = i > MIN_LRU_BATCH ? 0 : find_next_bit(bitmap, MIN_LRU_BATCH, i) + 1;
} while (i <= MIN_LRU_BATCH);
- walk_update_folio(walk, vma, walk->lruvec, last, dirty);
+ walk_update_folio(walk, vma, last, gen, dirty);
lazy_mmu_mode_disable();
spin_unlock(ptl);
@@ -3992,19 +3897,6 @@ static void clear_mm_walk(void)
kfree(walk);
}
-static inline void flush_lru_batch(struct list_head *head, struct list_head **batch_end,
- struct list_head *dst)
-{
- LIST_HEAD(movable);
-
- if (!*batch_end)
- return;
-
- list_cut_position(&movable, head, *batch_end);
- list_splice_tail_init(&movable, dst);
- *batch_end = NULL;
-}
-
static bool inc_min_seq(struct lruvec *lruvec, int type, int swappiness)
{
int zone;
@@ -4012,7 +3904,6 @@ static bool inc_min_seq(struct lruvec *lruvec, int type, int swappiness)
struct lru_gen_folio *lrugen = &lruvec->lrugen;
int hist = lru_hist_from_seq(lrugen->min_seq[type]);
int new_gen, old_gen = lru_gen_from_seq(lrugen->min_seq[type]);
- int target_gen = (old_gen + 1) % MAX_NR_GENS;
/* For file type, skip the check if swappiness is anon only */
if (type && (swappiness == SWAPPINESS_ANON_ONLY))
@@ -4022,63 +3913,35 @@ static bool inc_min_seq(struct lruvec *lruvec, int type, int swappiness)
if (!type && !swappiness)
goto done;
- VM_WARN_ON_ONCE(get_nr_gens(lruvec, type) != MAX_NR_GENS);
- VM_WARN_ON_ONCE(lru_gen_is_active(lruvec, old_gen) !=
- lru_gen_is_active(lruvec, target_gen));
/* prevent cold/hot inversion if the type is evictable */
for (zone = 0; zone < MAX_NR_ZONES; zone++) {
- struct list_head *target_list = &lrugen->folios[target_gen][type][zone];
struct list_head *head = &lrugen->folios[old_gen][type][zone];
- struct list_head *pos = head->next;
- struct list_head *batch_end = NULL;
- long delta = 0;
- while (pos != head) {
- struct folio *folio = list_entry(pos, struct folio, lru);
- long nr_pages = folio_nr_pages(folio);
+ while (!list_empty(head)) {
+ struct folio *folio = lru_to_folio(head);
int refs = folio_lru_refs(folio);
bool workingset = folio_test_workingset(folio);
- bool gen_increased;
VM_WARN_ON_ONCE_FOLIO(folio_test_unevictable(folio), folio);
VM_WARN_ON_ONCE_FOLIO(folio_test_active(folio), folio);
VM_WARN_ON_ONCE_FOLIO(folio_is_file_lru(folio) != type, folio);
VM_WARN_ON_ONCE_FOLIO(folio_zonenum(folio) != zone, folio);
- prefetchw_next_lru_folio(folio, head);
- pos = pos->next;
- new_gen = __folio_inc_gen(folio, old_gen, &gen_increased);
- /*
- * If gen_increased is false, this is a promotion. Put folios
- * at the head of the promoted gen. Otherwise, put them at
- * the tail of the second-oldest gen.
- */
- if (gen_increased) {
- delta += nr_pages;
- batch_end = &folio->lru;
+ new_gen = folio_inc_gen(lruvec, folio);
+ list_move_tail(&folio->lru, &lrugen->folios[new_gen][type][zone]);
- /* don't count the workingset being lazily promoted */
- if (refs + workingset != BIT(LRU_REFS_WIDTH) + 1) {
- int tier = lru_tier_from_refs(refs, workingset);
+ /* don't count the workingset being lazily promoted */
+ if (refs + workingset != BIT(LRU_REFS_WIDTH) + 1) {
+ int tier = lru_tier_from_refs(refs, workingset);
+ int delta = folio_nr_pages(folio);
- WRITE_ONCE(lrugen->protected[hist][type][tier],
- lrugen->protected[hist][type][tier] + nr_pages);
- }
- } else {
- flush_lru_batch(head, &batch_end, target_list);
- list_move(&folio->lru, &lrugen->folios[new_gen][type][zone]);
+ WRITE_ONCE(lrugen->protected[hist][type][tier],
+ lrugen->protected[hist][type][tier] + delta);
}
+
if (!--remaining)
- break;
+ return false;
}
- flush_lru_batch(head, &batch_end, target_list);
-
- WRITE_ONCE(lrugen->nr_pages[old_gen][type][zone],
- lrugen->nr_pages[old_gen][type][zone] - delta);
- WRITE_ONCE(lrugen->nr_pages[target_gen][type][zone],
- lrugen->nr_pages[target_gen][type][zone] + delta);
- if (!remaining)
- return false;
}
done:
reset_ctrl_pos(lruvec, type, true);
@@ -4407,6 +4270,8 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
struct pglist_data *pgdat = folio_pgdat(folio);
struct lruvec *lruvec;
struct lru_gen_mm_state *mm_state;
+ unsigned long max_seq;
+ int gen;
lockdep_assert_held(pvmw->ptl);
VM_WARN_ON_ONCE_FOLIO(folio_test_lru(folio), folio);
@@ -4443,6 +4308,8 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
memcg = get_mem_cgroup_from_folio(folio);
lruvec = mem_cgroup_lruvec(memcg, pgdat);
+ max_seq = READ_ONCE((lruvec)->lrugen.max_seq);
+ gen = lru_gen_from_seq(max_seq);
mm_state = get_mm_state(lruvec);
lazy_mmu_mode_enable();
@@ -4474,7 +4341,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
continue;
if (last != folio) {
- walk_update_folio(walk, vma, lruvec, last, dirty);
+ walk_update_folio(walk, vma, last, gen, dirty);
last = folio;
dirty = false;
@@ -4486,14 +4353,13 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
young += nr;
}
- walk_update_folio(walk, vma, lruvec, last, dirty);
+ walk_update_folio(walk, vma, last, gen, dirty);
lazy_mmu_mode_disable();
/* feedback from rmap walkers to page table walkers */
if (mm_state && suitable_to_scan(i, young))
- update_bloom_filter(mm_state, READ_ONCE(lruvec->lrugen.max_seq),
- pvmw->pmd);
+ update_bloom_filter(mm_state, max_seq, pvmw->pmd);
mem_cgroup_put(memcg);
@@ -4507,6 +4373,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
/* see the comment on MEMCG_NR_GENS */
enum {
MEMCG_LRU_NOP,
+ MEMCG_LRU_HEAD,
MEMCG_LRU_TAIL,
MEMCG_LRU_OLD,
MEMCG_LRU_YOUNG,
@@ -4528,7 +4395,9 @@ static void lru_gen_rotate_memcg(struct lruvec *lruvec, int op)
new = old = lruvec->lrugen.gen;
/* see the comment on MEMCG_NR_GENS */
- if (op == MEMCG_LRU_TAIL)
+ if (op == MEMCG_LRU_HEAD)
+ seg = MEMCG_LRU_HEAD;
+ else if (op == MEMCG_LRU_TAIL)
seg = MEMCG_LRU_TAIL;
else if (op == MEMCG_LRU_OLD)
new = get_memcg_gen(pgdat->memcg_lru.seq);
@@ -4542,7 +4411,7 @@ static void lru_gen_rotate_memcg(struct lruvec *lruvec, int op)
hlist_nulls_del_rcu(&lruvec->lrugen.list);
- if (op == MEMCG_LRU_OLD)
+ if (op == MEMCG_LRU_HEAD || op == MEMCG_LRU_OLD)
hlist_nulls_add_head_rcu(&lruvec->lrugen.list, &pgdat->memcg_lru.fifo[new][bin]);
else
hlist_nulls_add_tail_rcu(&lruvec->lrugen.list, &pgdat->memcg_lru.fifo[new][bin]);
@@ -4620,6 +4489,15 @@ unlock:
}
}
+void lru_gen_soft_reclaim(struct mem_cgroup *memcg, int nid)
+{
+ struct lruvec *lruvec = get_lruvec(memcg, nid);
+
+ /* see the comment on MEMCG_NR_GENS */
+ if (READ_ONCE(lruvec->lrugen.seg) != MEMCG_LRU_HEAD)
+ lru_gen_rotate_memcg(lruvec, MEMCG_LRU_HEAD);
+}
+
bool recheck_lru_gen_max_memcg(struct mem_cgroup *memcg, int nid)
{
struct lruvec *lruvec = get_lruvec(memcg, nid);
@@ -4838,7 +4716,7 @@ static bool isolate_folio(struct lruvec *lruvec, struct folio *folio, struct sca
/* see the comment on LRU_REFS_FLAGS */
if (!folio_test_referenced(folio))
- folio_set_lru_refs(folio, 0);
+ set_mask_bits(&folio->flags.f, LRU_REFS_MASK, 0);
success = lru_gen_del_folio(lruvec, folio, true);
VM_WARN_ON_ONCE_FOLIO(!success, folio);
@@ -4931,9 +4809,9 @@ static int get_tier_idx(struct lruvec *lruvec, int type)
* This value is chosen because any other tier would have at least twice
* as many refaults as the first tier.
*/
- read_ctrl_pos(lruvec, type, LRU_TIER_MIN, LRU_TIER_MIN, 2, &sp);
- for (tier = LRU_TIER_MIN + 1; tier <= LRU_TIER_MAX; tier++) {
- read_ctrl_pos(lruvec, type, tier, tier, 3, &pv);
+ read_ctrl_pos(lruvec, type, 0, 2, &sp);
+ for (tier = 1; tier < MAX_NR_TIERS; tier++) {
+ read_ctrl_pos(lruvec, type, tier, 3, &pv);
if (!positive_ctrl_err(&sp, &pv))
break;
}
@@ -4954,59 +4832,41 @@ static int get_type_to_scan(struct lruvec *lruvec, int swappiness)
* Compare the sum of all tiers of anon with that of file to determine
* which type to scan.
*/
- read_ctrl_pos(lruvec, LRU_GEN_ANON, LRU_TIER_MIN, LRU_TIER_MAX,
- swappiness, &sp);
- read_ctrl_pos(lruvec, LRU_GEN_FILE, LRU_TIER_MIN, LRU_TIER_MAX,
- MAX_SWAPPINESS - swappiness, &pv);
+ read_ctrl_pos(lruvec, LRU_GEN_ANON, MAX_NR_TIERS, swappiness, &sp);
+ read_ctrl_pos(lruvec, LRU_GEN_FILE, MAX_NR_TIERS, MAX_SWAPPINESS - swappiness, &pv);
return positive_ctrl_err(&sp, &pv);
}
-static inline bool is_single_type_reclaim(int swappiness)
-{
- return swappiness == MIN_SWAPPINESS ||
- swappiness == SWAPPINESS_ANON_ONLY;
-}
-
static int isolate_folios(unsigned long nr_to_scan, struct lruvec *lruvec,
struct scan_control *sc, int swappiness,
struct list_head *list, int *isolated,
int *isolate_type, int *isolate_scanned)
{
- bool type_fallback_allowed = !is_single_type_reclaim(swappiness);
+ int i;
+ int total_scanned = 0;
int type = get_type_to_scan(lruvec, swappiness);
- int total_scanned = 0, scanned, tier;
- bool tried = false;
-retry:
- tier = get_tier_idx(lruvec, type);
- scanned = scan_folios(nr_to_scan, lruvec, sc,
- type, tier, list, isolated);
+ for_each_evictable_type(i, swappiness) {
+ int scanned;
+ int tier = get_tier_idx(lruvec, type);
- total_scanned += scanned;
- if (*isolated) {
- *isolate_type = type;
- *isolate_scanned = scanned;
- return total_scanned;
- }
+ scanned = scan_folios(nr_to_scan, lruvec, sc,
+ type, tier, list, isolated);
- /*
- * We are running out of the current reclaim type. Fall back to
- * the other type if allowed.
- */
- if (!scanned && !tried && type_fallback_allowed) {
- type = !type;
- tried = true;
- type_fallback_allowed = false;
- goto retry;
- }
- /*
- * We scanned some folios but failed to isolate any due to promotions,
- * protections, or races. Retry once to avoid a larger loop.
- */
- if (scanned && !tried) {
- tried = true;
- goto retry;
+ total_scanned += scanned;
+ if (*isolated) {
+ *isolate_type = type;
+ *isolate_scanned = scanned;
+ break;
+ }
+ /*
+ * If scanned > 0 and isolated == 0, avoid falling back to the
+ * other type, as this type remains sufficient. Falling back
+ * too readily can disrupt the positive_ctrl_err() bias.
+ */
+ if (!scanned)
+ type = !type;
}
return total_scanned;
@@ -5071,12 +4931,9 @@ retry:
continue;
}
- /* See the comments on LRU_REFS_FLAGS */
- folio_set_lru_refs(folio, 0);
-
/* don't add rejected folios to the oldest generation */
if (lru_gen_folio_seq(lruvec, folio, false) == min_seq[type])
- folio_set_active(folio);
+ set_mask_bits(&folio->flags.f, LRU_REFS_FLAGS, BIT(PG_active));
}
move_folios_to_lru(&list);
@@ -5245,13 +5102,7 @@ static int shrink_one(struct lruvec *lruvec, struct scan_control *sc)
struct mem_cgroup *memcg = lruvec_memcg(lruvec);
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
- /*
- * For kswapd, mem_cgroup_calculate_protection() has already
- * been called during the top-down cgroup traversal.
- */
- if (!current_is_kswapd())
- mem_cgroup_calculate_protection_path(NULL, memcg);
-
+ /* lru_gen_age_node() called mem_cgroup_calculate_protection() */
if (mem_cgroup_below_min(NULL, memcg))
return MEMCG_LRU_YOUNG;
@@ -5456,17 +5307,7 @@ static bool fill_evictable(struct lruvec *lruvec)
while (!list_empty(head)) {
bool success;
- struct folio *folio;
-
- /*
- * lru_gen_add_folio() uses list_add_tail() rather
- * than list_add() when reclaiming is true. Match
- * its ordering to avoid cold/hot inversion.
- */
- if (active)
- folio = lru_to_folio(head);
- else
- folio = list_first_entry(head, struct folio, lru);
+ struct folio *folio = lru_to_folio(head);
VM_WARN_ON_ONCE_FOLIO(folio_test_unevictable(folio), folio);
VM_WARN_ON_ONCE_FOLIO(folio_test_active(folio) != active, folio);
@@ -5474,11 +5315,7 @@ static bool fill_evictable(struct lruvec *lruvec)
VM_WARN_ON_ONCE_FOLIO(folio_lru_gen(folio) != -1, folio);
lruvec_del_folio(lruvec, folio);
- /*
- * Borrow reclaiming=true to place inactive folios in
- * the older gens.
- */
- success = lru_gen_add_folio(lruvec, folio, !active);
+ success = lru_gen_add_folio(lruvec, folio, false);
VM_WARN_ON_ONCE(!success);
if (!--remaining)
@@ -6588,6 +6425,8 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
{
struct zoneref *z;
struct zone *zone;
+ unsigned long nr_soft_reclaimed;
+ unsigned long nr_soft_scanned;
gfp_t orig_mask;
pg_data_t *last_pgdat = NULL;
pg_data_t *first_pgdat = NULL;
@@ -6629,17 +6468,35 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
sc->compaction_ready = true;
continue;
}
+
+ /*
+ * Shrink each node in the zonelist once. If the
+ * zonelist is ordered by zone (not the default) then a
+ * node may be shrunk multiple times but in that case
+ * the user prefers lower zones being preserved.
+ */
+ if (zone->zone_pgdat == last_pgdat)
+ continue;
+
+ /*
+ * This steals pages from memory cgroups over softlimit
+ * and returns the number of reclaimed pages and
+ * scanned pages. This works for global memory pressure
+ * and balancing, not for a memcg's limit.
+ */
+ nr_soft_scanned = 0;
+ nr_soft_reclaimed = memcg1_soft_limit_reclaim(zone->zone_pgdat,
+ sc->order, sc->gfp_mask,
+ &nr_soft_scanned);
+ sc->nr_reclaimed += nr_soft_reclaimed;
+ sc->nr_scanned += nr_soft_scanned;
+ /* need some check for avoid more shrink_zone() */
}
if (!first_pgdat)
first_pgdat = zone->zone_pgdat;
- /*
- * Shrink each node in the zonelist once. If the zonelist is
- * ordered by zone (not the default) then a node may be shrunk
- * multiple times but in that case the user prefers lower zones
- * being preserved.
- */
+ /* See comment about same check for global reclaim above */
if (zone->zone_pgdat == last_pgdat)
continue;
last_pgdat = zone->zone_pgdat;
@@ -6954,6 +6811,47 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
#ifdef CONFIG_MEMCG
+/* Only used by soft limit reclaim. Do not reuse for anything else. */
+unsigned long mem_cgroup_shrink_node(struct mem_cgroup *memcg,
+ gfp_t gfp_mask, bool noswap,
+ pg_data_t *pgdat,
+ unsigned long *nr_scanned)
+{
+ struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat);
+ struct scan_control sc = {
+ .nr_to_reclaim = SWAP_CLUSTER_MAX,
+ .target_mem_cgroup = memcg,
+ .may_writepage = 1,
+ .may_unmap = 1,
+ .reclaim_idx = MAX_NR_ZONES - 1,
+ .may_swap = !noswap,
+ };
+
+ WARN_ON_ONCE(!current->reclaim_state);
+
+ sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) |
+ (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK);
+
+ trace_mm_vmscan_memcg_softlimit_reclaim_begin(sc.gfp_mask,
+ sc.order,
+ memcg);
+
+ /*
+ * NOTE: Although we can get the priority field, using it
+ * here is not a good idea, since it limits the pages we can scan.
+ * if we don't reclaim here, the shrink_node from balance_pgdat
+ * will pick up pages from other mem cgroup's as well. We hack
+ * the priority and make it zero.
+ */
+ shrink_lruvec(lruvec, &sc);
+
+ trace_mm_vmscan_memcg_softlimit_reclaim_end(sc.nr_reclaimed, memcg);
+
+ *nr_scanned = sc.nr_scanned;
+
+ return sc.nr_reclaimed;
+}
+
unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg,
unsigned long nr_pages,
gfp_t gfp_mask,
@@ -7259,6 +7157,8 @@ clear_reclaim_active(pg_data_t *pgdat, int highest_zoneidx)
static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx)
{
int i;
+ unsigned long nr_soft_reclaimed;
+ unsigned long nr_soft_scanned;
unsigned long pflags;
unsigned long nr_boost_reclaim;
unsigned long zone_boosts[MAX_NR_ZONES] = { 0, };
@@ -7364,7 +7264,12 @@ restart:
*/
kswapd_age_node(pgdat, &sc);
+ /* Call soft limit reclaim before calling shrink_node. */
sc.nr_scanned = 0;
+ nr_soft_scanned = 0;
+ nr_soft_reclaimed = memcg1_soft_limit_reclaim(pgdat, sc.order,
+ sc.gfp_mask, &nr_soft_scanned);
+ sc.nr_reclaimed += nr_soft_reclaimed;
/*
* There should be no need to raise the scanning priority if
@@ -7603,7 +7508,7 @@ static int kswapd(void *p)
* us from recursively trying to free more memory as we're
* trying to free the first piece of memory in the first place).
*/
- tsk->flags |= PF_MEMALLOC;
+ tsk->flags |= PF_MEMALLOC | PF_KSWAPD;
set_freezable();
WRITE_ONCE(pgdat->kswapd_order, 0);
@@ -7653,17 +7558,11 @@ kswapd_try_sleep:
goto kswapd_try_sleep;
}
- tsk->flags &= ~PF_MEMALLOC;
+ tsk->flags &= ~(PF_MEMALLOC | PF_KSWAPD);
return 0;
}
-bool current_is_kswapd(void)
-{
- return kthread_func(current) == kswapd;
-}
-EXPORT_SYMBOL_GPL(current_is_kswapd);
-
/*
* A zone is low on free memory or too fragmented for high-order memory. If
* kswapd should reclaim (direct reclaim is deferred), wake it up for the zone's
@@ -7952,9 +7851,16 @@ static unsigned long __node_reclaim(struct pglist_data *pgdat,
noreclaim_flag = memalloc_noreclaim_save();
set_task_reclaim_state(p, &sc->reclaim_state);
- do {
- shrink_node(pgdat, sc);
- } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0);
+ if (node_pagecache_reclaimable(pgdat) > pgdat->min_unmapped_pages ||
+ node_page_state_pages(pgdat, NR_SLAB_RECLAIMABLE_B) > pgdat->min_slab_pages) {
+ /*
+ * Free memory by calling shrink node with increasing
+ * priorities until we have enough memory freed.
+ */
+ do {
+ shrink_node(pgdat, sc);
+ } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0);
+ }
set_task_reclaim_state(p, NULL);
memalloc_noreclaim_restore(noreclaim_flag);
diff --git a/mm/vmstat.c b/mm/vmstat.c
index a3e809c57f29..cb57714539fb 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1837,11 +1837,6 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
struct per_cpu_zonestat __maybe_unused *pzstats;
pcp = per_cpu_ptr(zone->per_cpu_pageset, i);
- /*
- * Access to the per-cpu pageset fields is lockless as they
- * are used only for printing purposes. Use data_race to
- * avoid KCSAN warning.
- */
seq_printf(m,
"\n cpu: %i"
"\n count: %i"
@@ -1850,15 +1845,15 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
"\n high_min: %i"
"\n high_max: %i",
i,
- data_race(pcp->count),
- data_race(pcp->high),
- data_race(pcp->batch),
- data_race(pcp->high_min),
- data_race(pcp->high_max));
+ pcp->count,
+ pcp->high,
+ pcp->batch,
+ pcp->high_min,
+ pcp->high_max);
#ifdef CONFIG_SMP
pzstats = per_cpu_ptr(zone->per_cpu_zonestats, i);
seq_printf(m, "\n vm stats threshold: %d",
- data_race(pzstats->stat_threshold));
+ pzstats->stat_threshold);
#endif
}
seq_printf(m,
diff --git a/mm/workingset.c b/mm/workingset.c
index 8412f4840ae3..7ac2b88c80ae 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -688,9 +688,10 @@ static unsigned long count_shadow_nodes(struct shrinker *shrinker,
mem_cgroup_flush_stats_ratelimited(sc->memcg);
lruvec = mem_cgroup_lruvec(sc->memcg, NODE_DATA(sc->nid));
+
for (pages = 0, i = 0; i < NR_LRU_LISTS; i++)
- pages += lruvec_page_state_local(lruvec,
- NR_LRU_BASE + i);
+ pages += lruvec_lru_size(lruvec, i, MAX_NR_ZONES - 1);
+
pages += lruvec_page_state_local(
lruvec, NR_SLAB_RECLAIMABLE_B) >> PAGE_SHIFT;
pages += lruvec_page_state_local(
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 11be37c43171..825022a7a328 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1134,6 +1134,83 @@ unsigned long zs_get_total_pages(struct zs_pool *pool)
}
EXPORT_SYMBOL_GPL(zs_get_total_pages);
+void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
+ size_t mem_len, void *local_copy)
+{
+ struct zspage *zspage;
+ struct zpdesc *zpdesc;
+ unsigned long obj, off;
+ unsigned int obj_idx;
+ struct size_class *class;
+ void *addr;
+
+ /* Guarantee we can get zspage from handle safely */
+ read_lock(&pool->lock);
+ obj = handle_to_obj(handle);
+ obj_to_location(obj, &zpdesc, &obj_idx);
+ zspage = get_zspage(zpdesc);
+
+ /* Make sure migration doesn't move any pages in this zspage */
+ zspage_read_lock(zspage);
+ read_unlock(&pool->lock);
+
+ class = zspage_class(pool, zspage);
+ off = offset_in_page(class->size * obj_idx);
+
+ if (!ZsHugePage(zspage))
+ off += ZS_HANDLE_SIZE;
+
+ if (off + mem_len <= PAGE_SIZE) {
+ /* this object is contained entirely within a page */
+ addr = kmap_local_zpdesc(zpdesc);
+ addr += off;
+ } else {
+ size_t sizes[2];
+
+ /* this object spans two pages */
+ sizes[0] = PAGE_SIZE - off;
+ sizes[1] = mem_len - sizes[0];
+ addr = local_copy;
+
+ memcpy_from_page(addr, zpdesc_page(zpdesc),
+ off, sizes[0]);
+ zpdesc = get_next_zpdesc(zpdesc);
+ memcpy_from_page(addr + sizes[0],
+ zpdesc_page(zpdesc),
+ 0, sizes[1]);
+ }
+
+ return addr;
+}
+EXPORT_SYMBOL_GPL(zs_obj_read_begin);
+
+void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
+ size_t mem_len, void *handle_mem)
+{
+ struct zspage *zspage;
+ struct zpdesc *zpdesc;
+ unsigned long obj, off;
+ unsigned int obj_idx;
+ struct size_class *class;
+
+ obj = handle_to_obj(handle);
+ obj_to_location(obj, &zpdesc, &obj_idx);
+ zspage = get_zspage(zpdesc);
+ class = zspage_class(pool, zspage);
+ off = offset_in_page(class->size * obj_idx);
+
+ if (!ZsHugePage(zspage))
+ off += ZS_HANDLE_SIZE;
+
+ if (off + mem_len <= PAGE_SIZE) {
+ handle_mem -= off;
+ kunmap_local(handle_mem);
+ }
+
+ zspage_read_unlock(zspage);
+}
+EXPORT_SYMBOL_GPL(zs_obj_read_end);
+
void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
struct scatterlist *sg, size_t mem_len)
{
diff --git a/mm/zswap.c b/mm/zswap.c
index 68044d43d097..37f34e406c8e 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -34,7 +34,6 @@
#include <linux/writeback.h>
#include <linux/pagemap.h>
#include <linux/workqueue.h>
-#include <linux/xarray.h>
#include <linux/list_lru.h>
#include <linux/zsmalloc.h>
@@ -155,23 +154,12 @@ struct zswap_pool {
struct zs_pool *zs_pool;
struct crypto_acomp_ctx __percpu *acomp_ctx;
struct percpu_ref ref;
- struct rcu_work release_rwork;
+ struct list_head list;
+ struct work_struct release_work;
struct hlist_node node;
- u8 idx;
char tfm_name[CRYPTO_MAX_ALG_NAME];
};
-/*
- * Live pools keyed by id (1..ZSWAP_MAX_POOL_ID). XA_FLAGS_ALLOC1 keeps id 0
- * reserved so it is never handed to a live pool. XA_FLAGS_LOCK_BH makes the
- * xa_lock softirq-safe: it is taken from __zswap_pool_empty(), which runs from
- * a percpu_ref release callback in softirq context.
- */
-#define ZSWAP_FIRST_POOL_ID 1
-#define ZSWAP_MAX_POOL_ID U8_MAX
-static DEFINE_XARRAY_FLAGS(zswap_pools, XA_FLAGS_ALLOC1 | XA_FLAGS_LOCK_BH);
-static struct zswap_pool __rcu *zswap_current_pool;
-
/* Global LRU lists shared by all zswap pools. */
static struct list_lru zswap_list_lru;
@@ -194,7 +182,7 @@ static struct shrinker *zswap_shrinker;
* writeback logic. The entry is only reclaimed by the writeback
* logic if referenced is unset. See comments in the shrinker
* section for context.
- * pool_idx - id of the zswap_pool that the entry's data is in.
+ * pool - the zswap_pool the entry's data is in
* handle - zsmalloc allocation handle that stores the compressed page data
* objcg - the obj_cgroup that the compressed memory is charged to
* lru - handle to the pool's lru used to evict pages.
@@ -203,25 +191,19 @@ struct zswap_entry {
swp_entry_t swpentry;
unsigned int length;
bool referenced;
- u8 pool_idx;
+ struct zswap_pool *pool;
unsigned long handle;
struct obj_cgroup *objcg;
struct list_head lru;
};
-/*
- * No RCU section is needed around the returned pointer: a stored entry pins
- * its pool via percpu_ref (taken in zswap_store_page()), so the id cannot be
- * reused under us. Callers WARN and handle a NULL from a corrupt pool_idx.
- */
-static struct zswap_pool *zswap_entry_pool(struct zswap_entry *entry)
-{
- return xa_load(&zswap_pools, entry->pool_idx);
-}
-
static struct xarray *zswap_trees[MAX_SWAPFILES];
static unsigned int nr_zswap_trees[MAX_SWAPFILES];
+/* RCU-protected iteration */
+static LIST_HEAD(zswap_pools);
+/* protects zswap_pools list modification */
+static DEFINE_SPINLOCK(zswap_pools_lock);
/* pool counter to provide unique names to zsmalloc */
static atomic_t zswap_pools_count = ATOMIC_INIT(0);
@@ -246,15 +228,10 @@ static bool zswap_has_pool;
/* One swap address space for each 64M swap space */
#define ZSWAP_ADDRESS_SPACE_SHIFT 14
#define ZSWAP_ADDRESS_SPACE_PAGES (1 << ZSWAP_ADDRESS_SPACE_SHIFT)
-
-static inline struct xarray *zswap_tree(int type, pgoff_t offset)
-{
- return &zswap_trees[type][offset >> ZSWAP_ADDRESS_SPACE_SHIFT];
-}
-
static inline struct xarray *swap_zswap_tree(swp_entry_t swp)
{
- return zswap_tree(swp_type(swp), swp_offset(swp));
+ return &zswap_trees[swp_type(swp)][swp_offset(swp)
+ >> ZSWAP_ADDRESS_SPACE_SHIFT];
}
#define zswap_pool_debug(msg, p) \
@@ -298,7 +275,6 @@ static struct zswap_pool *zswap_pool_create(char *compressor)
struct zswap_pool *pool;
char name[38]; /* 'zswap' + 32 char (max) num + \0 */
int ret, cpu;
- u32 id;
if (!zswap_has_pool && !strcmp(compressor, ZSWAP_PARAM_UNSET))
return NULL;
@@ -344,31 +320,12 @@ static struct zswap_pool *zswap_pool_create(char *compressor)
PERCPU_REF_ALLOW_REINIT, GFP_KERNEL);
if (ret)
goto ref_fail;
-
- /*
- * Publish only after the pool is fully built, so lockless walkers
- * never see a half-initialized pool. The _bh variant pairs with the
- * softirq-context xa_lock taken in __zswap_pool_empty().
- */
- ret = xa_alloc_bh(&zswap_pools, &id, pool,
- XA_LIMIT(ZSWAP_FIRST_POOL_ID, ZSWAP_MAX_POOL_ID),
- GFP_KERNEL);
- if (ret) {
- if (ret == -EBUSY)
- pr_err("cannot allocate pool id (max %d live pools)\n",
- ZSWAP_MAX_POOL_ID - ZSWAP_FIRST_POOL_ID + 1);
- goto xa_fail;
- }
- pool->idx = id;
+ INIT_LIST_HEAD(&pool->list);
zswap_pool_debug("created", pool);
- static_branch_enable(&zswap_ever_enabled);
-
return pool;
-xa_fail:
- percpu_ref_exit(&pool->ref);
ref_fail:
cpuhp_state_remove_instance(CPUHP_MM_ZSWP_POOL_PREPARE, &pool->node);
@@ -422,29 +379,37 @@ static void zswap_pool_destroy(struct zswap_pool *pool)
static void __zswap_pool_release(struct work_struct *work)
{
- struct zswap_pool *pool = container_of(to_rcu_work(work),
- typeof(*pool), release_rwork);
+ struct zswap_pool *pool = container_of(work, typeof(*pool),
+ release_work);
+
+ synchronize_rcu();
/* nobody should have been able to get a ref... */
WARN_ON(!percpu_ref_is_zero(&pool->ref));
percpu_ref_exit(&pool->ref);
- /* The pool is no longer in zswap_pools and has no references. */
+ /* pool is now off zswap_pools list and has no references. */
zswap_pool_destroy(pool);
}
+static struct zswap_pool *zswap_pool_current(void);
+
static void __zswap_pool_empty(struct percpu_ref *ref)
{
struct zswap_pool *pool;
pool = container_of(ref, typeof(*pool), ref);
- WARN_ON(pool == rcu_access_pointer(zswap_current_pool));
+ spin_lock_bh(&zswap_pools_lock);
+
+ WARN_ON(pool == zswap_pool_current());
+
+ list_del_rcu(&pool->list);
- xa_erase_bh(&zswap_pools, pool->idx);
+ INIT_WORK(&pool->release_work, __zswap_pool_release);
+ schedule_work(&pool->release_work);
- INIT_RCU_WORK(&pool->release_rwork, __zswap_pool_release);
- queue_rcu_work(system_percpu_wq, &pool->release_rwork);
+ spin_unlock_bh(&zswap_pools_lock);
}
static int __must_check zswap_pool_tryget(struct zswap_pool *pool)
@@ -470,13 +435,20 @@ static struct zswap_pool *__zswap_pool_current(void)
{
struct zswap_pool *pool;
- pool = rcu_dereference(zswap_current_pool);
+ pool = list_first_or_null_rcu(&zswap_pools, typeof(*pool), list);
WARN_ONCE(!pool && zswap_has_pool,
"%s: no page storage pool!\n", __func__);
return pool;
}
+static struct zswap_pool *zswap_pool_current(void)
+{
+ assert_spin_locked(&zswap_pools_lock);
+
+ return __zswap_pool_current();
+}
+
static struct zswap_pool *zswap_pool_current_get(void)
{
struct zswap_pool *pool;
@@ -492,28 +464,23 @@ static struct zswap_pool *zswap_pool_current_get(void)
return pool;
}
-/* compressor must be null-terminated */
+/* type and compressor must be null-terminated */
static struct zswap_pool *zswap_pool_find_get(char *compressor)
{
struct zswap_pool *pool;
- unsigned long id;
- /*
- * __zswap_pool_empty() can erase from zswap_pools in softirq while we
- * walk. rcu_read_lock() keeps the walk consistent and each pool alive
- * across tryget(). xa_for_each()'s own RCU does not span the loop body.
- */
- rcu_read_lock();
- xa_for_each(&zswap_pools, id, pool) {
+ assert_spin_locked(&zswap_pools_lock);
+
+ list_for_each_entry_rcu(pool, &zswap_pools, list) {
if (strcmp(pool->tfm_name, compressor))
continue;
/* if we can't get it, it's about to be destroyed */
- if (zswap_pool_tryget(pool))
- break;
+ if (!zswap_pool_tryget(pool))
+ continue;
+ return pool;
}
- rcu_read_unlock();
- return pool;
+ return NULL;
}
static unsigned long zswap_max_pages(void)
@@ -530,14 +497,9 @@ unsigned long zswap_total_pages(void)
{
struct zswap_pool *pool;
unsigned long total = 0;
- unsigned long id;
- /*
- * rcu_read_lock() keeps each pool alive across zs_get_total_pages().
- * xa_for_each()'s own RCU does not span the loop body.
- */
rcu_read_lock();
- xa_for_each(&zswap_pools, id, pool)
+ list_for_each_entry_rcu(pool, &zswap_pools, list)
total += zs_get_total_pages(pool->zs_pool);
rcu_read_unlock();
@@ -594,13 +556,20 @@ static int zswap_compressor_param_set(const char *val, const struct kernel_param
return -ENOENT;
}
+ spin_lock_bh(&zswap_pools_lock);
+
pool = zswap_pool_find_get(s);
- if (!pool) {
- pool = zswap_pool_create(s);
- } else {
+ if (pool) {
zswap_pool_debug("using existing", pool);
- WARN_ON(pool == rcu_access_pointer(zswap_current_pool));
+ WARN_ON(pool == zswap_pool_current());
+ list_del_rcu(&pool->list);
+ }
+
+ spin_unlock_bh(&zswap_pools_lock);
+ if (!pool)
+ pool = zswap_pool_create(s);
+ else {
/*
* Restore the initial ref dropped by percpu_ref_kill()
* when the pool was decommissioned and switch it again
@@ -617,18 +586,24 @@ static int zswap_compressor_param_set(const char *val, const struct kernel_param
else
ret = -EINVAL;
- /*
- * Compressor switches are serialized by the kernel param lock, so this
- * is the only writer of zswap_current_pool: no xa_lock needed.
- */
+ spin_lock_bh(&zswap_pools_lock);
+
if (!ret) {
- put_pool = rcu_access_pointer(zswap_current_pool);
- rcu_assign_pointer(zswap_current_pool, pool);
+ put_pool = zswap_pool_current();
+ list_add_rcu(&pool->list, &zswap_pools);
zswap_has_pool = true;
} else if (pool) {
+ /*
+ * Add the possibly pre-existing pool to the end of the pools
+ * list; if it's new (and empty) then it'll be removed and
+ * destroyed by the put after we drop the lock
+ */
+ list_add_tail_rcu(&pool->list, &zswap_pools);
put_pool = pool;
}
+ spin_unlock_bh(&zswap_pools_lock);
+
/*
* Drop the ref from either the old current pool,
* or the new pool we failed to add
@@ -672,6 +647,19 @@ static int zswap_enabled_param_set(const char *val,
* lru functions
**********************************/
+/* should be called under RCU */
+#ifdef CONFIG_MEMCG
+static inline struct mem_cgroup *mem_cgroup_from_entry(struct zswap_entry *entry)
+{
+ return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL;
+}
+#else
+static inline struct mem_cgroup *mem_cgroup_from_entry(struct zswap_entry *entry)
+{
+ return NULL;
+}
+#endif
+
static inline int entry_to_nid(struct zswap_entry *entry)
{
return page_to_nid(virt_to_page(entry));
@@ -694,7 +682,7 @@ static void zswap_lru_add(struct zswap_entry *entry)
* Similar reasoning holds for list_lru_del().
*/
rcu_read_lock();
- memcg = obj_cgroup_memcg(entry->objcg);
+ memcg = mem_cgroup_from_entry(entry);
/* will always succeed */
list_lru_add(&zswap_list_lru, &entry->lru, nid, memcg);
rcu_read_unlock();
@@ -706,7 +694,7 @@ static void zswap_lru_del(struct zswap_entry *entry)
struct mem_cgroup *memcg;
rcu_read_lock();
- memcg = obj_cgroup_memcg(entry->objcg);
+ memcg = mem_cgroup_from_entry(entry);
/* will always succeed */
list_lru_del(&zswap_list_lru, &entry->lru, nid, memcg);
rcu_read_unlock();
@@ -776,13 +764,9 @@ static void zswap_entry_cache_free(struct zswap_entry *entry)
*/
static void zswap_entry_free(struct zswap_entry *entry)
{
- struct zswap_pool *pool = zswap_entry_pool(entry);
-
zswap_lru_del(entry);
- if (!WARN_ON_ONCE(!pool)) {
- zs_free(pool->zs_pool, entry->handle);
- zswap_pool_put(pool);
- }
+ zs_free(entry->pool->zs_pool, entry->handle);
+ zswap_pool_put(entry->pool);
if (entry->objcg) {
obj_cgroup_uncharge_zswap(entry->objcg, entry->length);
obj_cgroup_put(entry->objcg);
@@ -853,8 +837,8 @@ fail:
return ret;
}
-static bool zswap_compress(struct folio *folio, long index,
- struct zswap_entry *entry, struct zswap_pool *pool)
+static bool zswap_compress(struct page *page, struct zswap_entry *entry,
+ struct zswap_pool *pool)
{
struct crypto_acomp_ctx *acomp_ctx;
struct scatterlist input, output;
@@ -870,7 +854,7 @@ static bool zswap_compress(struct folio *folio, long index,
dst = acomp_ctx->buffer;
sg_init_table(&input, 1);
- sg_set_folio(&input, folio, PAGE_SIZE, index * PAGE_SIZE);
+ sg_set_page(&input, page, PAGE_SIZE, 0);
sg_init_one(&output, dst, PAGE_SIZE);
acomp_request_set_params(acomp_ctx->req, &input, &output, PAGE_SIZE, dlen);
@@ -899,7 +883,8 @@ static bool zswap_compress(struct folio *folio, long index,
*/
if (comp_ret || !dlen || dlen >= PAGE_SIZE) {
rcu_read_lock();
- if (!mem_cgroup_zswap_writeback_enabled(folio_memcg(folio))) {
+ if (!mem_cgroup_zswap_writeback_enabled(
+ folio_memcg(page_folio(page)))) {
rcu_read_unlock();
comp_ret = comp_ret ? comp_ret : -EINVAL;
goto unlock;
@@ -907,12 +892,12 @@ static bool zswap_compress(struct folio *folio, long index,
rcu_read_unlock();
comp_ret = 0;
dlen = PAGE_SIZE;
- dst = kmap_local_folio(folio, index * PAGE_SIZE);
+ dst = kmap_local_page(page);
mapped = true;
}
gfp = GFP_NOWAIT | __GFP_NORETRY | __GFP_HIGHMEM | __GFP_MOVABLE;
- handle = zs_malloc(pool->zs_pool, dlen, gfp, folio_nid(folio));
+ handle = zs_malloc(pool->zs_pool, dlen, gfp, page_to_nid(page));
if (IS_ERR_VALUE(handle)) {
alloc_ret = PTR_ERR((void *)handle);
goto unlock;
@@ -938,15 +923,12 @@ unlock:
static bool zswap_decompress(struct zswap_entry *entry, struct folio *folio)
{
- struct zswap_pool *pool = zswap_entry_pool(entry);
+ struct zswap_pool *pool = entry->pool;
struct scatterlist input[2]; /* zsmalloc returns an SG list 1-2 entries */
struct scatterlist output;
struct crypto_acomp_ctx *acomp_ctx;
int ret = 0, dlen;
- if (WARN_ON_ONCE(!pool))
- return false;
-
acomp_ctx = raw_cpu_ptr(pool->acomp_ctx);
mutex_lock(&acomp_ctx->mutex);
zs_obj_read_sg_begin(pool->zs_pool, entry->handle, input, entry->length);
@@ -982,7 +964,7 @@ static bool zswap_decompress(struct zswap_entry *entry, struct folio *folio)
pr_alert_ratelimited("Decompression error from zswap (%d:%lu %s %u->%d)\n",
swp_type(entry->swpentry),
swp_offset(entry->swpentry),
- pool->tfm_name,
+ entry->pool->tfm_name,
entry->length, dlen);
return false;
}
@@ -1015,7 +997,7 @@ static int zswap_writeback_entry(struct zswap_entry *entry,
/* try to allocate swap cache folio */
si = get_swap_device(swpentry);
- if (IS_ERR_OR_NULL(si))
+ if (!si)
return -EEXIST;
mpol = get_task_policy(current);
@@ -1068,7 +1050,7 @@ static int zswap_writeback_entry(struct zswap_entry *entry,
folio_set_reclaim(folio);
/* start writeback */
- __swap_writeout(&ctx, folio);
+ __swap_writepage(&ctx, folio);
swap_write_submit(&ctx);
out:
@@ -1283,8 +1265,8 @@ static struct shrinker *zswap_alloc_shrinker(void)
{
struct shrinker *shrinker;
- shrinker = shrinker_alloc(SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE |
- SHRINKER_NONSLAB, "mm-zswap");
+ shrinker =
+ shrinker_alloc(SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE, "mm-zswap");
if (!shrinker)
return NULL;
@@ -1423,30 +1405,23 @@ resched:
* main API
**********************************/
-static bool zswap_store_page(struct folio *folio, long index,
+static bool zswap_store_page(struct page *page,
struct obj_cgroup *objcg,
struct zswap_pool *pool)
{
- swp_entry_t page_swpentry = folio_swap_entry(folio, index);
+ swp_entry_t page_swpentry = page_swap_entry(page);
struct zswap_entry *entry, *old;
/* allocate entry */
- entry = zswap_entry_cache_alloc(GFP_KERNEL, folio_nid(folio));
+ entry = zswap_entry_cache_alloc(GFP_KERNEL, page_to_nid(page));
if (!entry) {
zswap_reject_kmemcache_fail++;
return false;
}
- if (!zswap_compress(folio, index, entry, pool))
+ if (!zswap_compress(page, entry, pool))
goto compress_failed;
- /*
- * Set pool_idx before the xa_store() below publishes the entry, or a
- * concurrent reader could resolve a stale pool_idx left by slab reuse
- * to an unrelated live pool.
- */
- entry->pool_idx = pool->idx;
-
old = xa_store(swap_zswap_tree(page_swpentry),
swp_offset(page_swpentry),
entry, GFP_KERNEL);
@@ -1492,6 +1467,7 @@ static bool zswap_store_page(struct folio *folio, long index,
* The publishing order matters to prevent writeback from seeing
* an incoherent entry.
*/
+ entry->pool = pool;
entry->swpentry = page_swpentry;
entry->objcg = objcg;
entry->referenced = true;
@@ -1552,7 +1528,9 @@ bool zswap_store(struct folio *folio)
}
for (index = 0; index < nr_pages; ++index) {
- if (!zswap_store_page(folio, index, objcg, pool))
+ struct page *page = folio_page(folio, index);
+
+ if (!zswap_store_page(page, objcg, pool))
goto put_pool;
}
@@ -1576,51 +1554,39 @@ check_old:
* offsets corresponding to each page of the folio. Otherwise,
* writeback could overwrite the new data in the swapfile.
*/
- if (!ret)
- zswap_invalidate(swp_type(swp), swp_offset(swp), nr_pages);
+ if (!ret) {
+ unsigned type = swp_type(swp);
+ pgoff_t offset = swp_offset(swp);
+ struct zswap_entry *entry;
+ struct xarray *tree;
+
+ for (index = 0; index < nr_pages; ++index) {
+ tree = swap_zswap_tree(swp_entry(type, offset + index));
+ entry = xa_erase(tree, offset + index);
+ if (entry)
+ zswap_entry_free(entry);
+ }
+ }
return ret;
}
/**
- * zswap_is_present() - is any slot in [entry, entry + nr) in zswap?
- * @entry: base swap entry of the range
- * @nr: number of contiguous slots to check
- *
- * Context: The caller must keep the range pinned, otherwise the answer can
- * change under it.
- * Return: true if at least one slot in the range is in zswap.
- */
-static bool zswap_is_present(swp_entry_t entry, unsigned int nr)
-{
- pgoff_t offset = swp_offset(entry);
- struct xarray *tree = swap_zswap_tree(entry);
- unsigned long index = offset;
-
- /*
- * A pinned range is at most SWAPFILE_CLUSTER slots and is aligned to
- * its own size, so one tree covers all of it and a single lookup is
- * enough. Scanning only part of the range would report a false
- * "absent" and let the caller read a stale copy from the device.
- */
- BUILD_BUG_ON(SWAPFILE_CLUSTER > ZSWAP_ADDRESS_SPACE_PAGES);
-
- return xa_find(tree, &index, offset + nr - 1, XA_PRESENT);
-}
-
-/**
* zswap_load() - load a folio from zswap
* @folio: folio to load
*
* Return: 0 on success, with the folio unlocked and marked up-to-date, or one
* of the following error codes:
*
- * -EIO: if the swapped out content was in zswap but could not be handed
- * back, either because decompression failed or because a slot in a
- * large-folio range is still in zswap and zswap cannot reconstruct a large
- * folio from per-page entries. The folio is unlocked, but NOT marked
- * up-to-date, so that an IO error is emitted (e.g. do_swap_page() will
- * SIGBUS).
+ * -EIO: if the swapped out content was in zswap, but could not be loaded
+ * into the page due to a decompression failure. The folio is unlocked, but
+ * NOT marked up-to-date, so that an IO error is emitted (e.g. do_swap_page()
+ * will SIGBUS).
+ *
+ * -EINVAL: if the swapped out content was in zswap, but the page belongs
+ * to a large folio, which is not supported by zswap. The folio is unlocked,
+ * but NOT marked up-to-date, so that an IO error is emitted (e.g.
+ * do_swap_page() will SIGBUS).
*
* -ENOENT: if the swapped out content was not in zswap. The folio remains
* locked on return.
@@ -1639,18 +1605,13 @@ int zswap_load(struct folio *folio)
return -ENOENT;
/*
- * A large folio can legitimately reach zswap_load() with its whole
- * range on the backing device, so scan the range rather than rejecting
- * it outright. The caller has pinned every slot, so zswap cannot start
- * a store or a writeback into the range while we look.
+ * Large folios should not be swapped in while zswap is being used, as
+ * they are not properly handled. Zswap does not properly load large
+ * folios, and a large folio may only be partially in zswap.
*/
- if (folio_test_large(folio)) {
- if (WARN_ON_ONCE(zswap_is_present(swp,
- folio_nr_pages(folio)))) {
- folio_unlock(folio);
- return -EIO;
- }
- return -ENOENT;
+ if (WARN_ON_ONCE(folio_test_large(folio))) {
+ folio_unlock(folio);
+ return -EINVAL;
}
entry = xa_load(tree, offset);
@@ -1683,25 +1644,18 @@ int zswap_load(struct folio *folio)
return 0;
}
-void zswap_invalidate(int type, pgoff_t offset, unsigned long nr_entries)
+void zswap_invalidate(swp_entry_t swp)
{
+ pgoff_t offset = swp_offset(swp);
+ struct xarray *tree = swap_zswap_tree(swp);
struct zswap_entry *entry;
- struct xarray *tree;
- unsigned long i;
- if (zswap_never_enabled())
+ if (xa_empty(tree))
return;
- for (i = 0; i < nr_entries; i++) {
- tree = zswap_tree(type, offset + i);
-
- if (xa_empty(tree))
- continue;
-
- entry = xa_erase(tree, offset + i);
- if (entry)
- zswap_entry_free(entry);
- }
+ entry = xa_erase(tree, offset);
+ if (entry)
+ zswap_entry_free(entry);
}
int zswap_swapon(int type, unsigned long nr_pages)
@@ -1849,8 +1803,9 @@ static int zswap_setup(void)
pool = __zswap_pool_create_fallback();
if (pool) {
pr_info("loaded using pool %s\n", pool->tfm_name);
- rcu_assign_pointer(zswap_current_pool, pool);
+ list_add(&pool->list, &zswap_pools);
zswap_has_pool = true;
+ static_branch_enable(&zswap_ever_enabled);
} else {
pr_err("pool creation failed\n");
zswap_enabled = false;
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index 6da52d12df68..5214786e61d1 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -292,10 +292,13 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
struct atm_vcc *vcc;
int ret;
+ if (!pskb_may_pull(skb, 1)) {
+ kfree_skb(skb);
+ return DROP_PACKET;
+ }
+
ATM_SKB(skb)->vcc = pvcc->atmvcc;
pr_debug("(skb=0x%p, vcc=0x%p)\n", skb, pvcc->atmvcc);
- if (skb->data[0] == '\0' && (pvcc->flags & SC_COMP_PROT))
- (void) skb_pull(skb, 1);
vcc = ATM_SKB(skb)->vcc;
bh_lock_sock(sk_atm(vcc));
@@ -317,23 +320,13 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
switch (pvcc->encaps) { /* LLC encapsulation needed */
case e_llc:
- if (skb_headroom(skb) < LLC_LEN) {
- struct sk_buff *n;
- n = skb_realloc_headroom(skb, LLC_LEN);
- if (n != NULL &&
- !pppoatm_may_send(pvcc, n->truesize)) {
- kfree_skb(n);
- goto nospace;
- }
- consume_skb(skb);
- skb = n;
- if (skb == NULL) {
- bh_unlock_sock(sk_atm(vcc));
- return DROP_PACKET;
- }
- } else if (!pppoatm_may_send(pvcc, skb->truesize))
+ if (skb_cow_head(skb, LLC_LEN)) {
+ bh_unlock_sock(sk_atm(vcc));
+ kfree_skb(skb);
+ return DROP_PACKET;
+ }
+ if (!pppoatm_may_send(pvcc, skb->truesize))
goto nospace;
- memcpy(skb_push(skb, LLC_LEN), pppllc, LLC_LEN);
break;
case e_vc:
if (!pppoatm_may_send(pvcc, skb->truesize))
@@ -346,6 +339,12 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
return 1;
}
+ if (skb->data[0] == '\0' && (pvcc->flags & SC_COMP_PROT))
+ skb_pull(skb, 1);
+
+ if (pvcc->encaps == e_llc)
+ memcpy(skb_push(skb, LLC_LEN), pppllc, LLC_LEN);
+
atm_account_tx(vcc, skb);
pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
@@ -355,13 +354,6 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
return ret;
nospace:
bh_unlock_sock(sk_atm(vcc));
- /*
- * We don't have space to send this SKB now, but we might have
- * already applied SC_COMP_PROT compression, so may need to undo
- */
- if ((pvcc->flags & SC_COMP_PROT) && skb_headroom(skb) > 0 &&
- skb->data[-1] == '\0')
- (void) skb_push(skb, 1);
return 0;
}
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 033287c09224..a22edd2baf5e 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4014,9 +4014,6 @@ static void l2cap_ecred_rsp_defer(struct l2cap_chan *chan, void *data)
if (chan->mode != L2CAP_MODE_EXT_FLOWCTL)
return;
- if (chan->mode != L2CAP_MODE_EXT_FLOWCTL)
- return;
-
/* Check if channel for outgoing connection or if it wasn't deferred
* since in those cases it must be skipped.
*/
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 72b75757ac85..34ede0f3e452 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -388,12 +388,12 @@ out_filt:
goto out;
}
-static int __vlan_del(struct net_bridge_vlan *v)
+static void __vlan_del(struct net_bridge_vlan *v)
{
struct net_bridge_vlan *masterv = v;
struct net_bridge_vlan_group *vg;
struct net_bridge_port *p = NULL;
- int err = 0;
+ int err;
if (br_vlan_is_master(v)) {
vg = br_vlan_group(v->br);
@@ -407,12 +407,16 @@ static int __vlan_del(struct net_bridge_vlan *v)
if (p) {
err = __vlan_vid_del(p->dev, p->br, v);
if (err)
- goto out;
+ br_warn(p->br,
+ "port %u(%s) failed to delete vlan %u from switchdev: %pe\n",
+ (unsigned int)p->port_no, p->dev->name,
+ v->vid, ERR_PTR(err));
} else {
err = br_switchdev_port_vlan_del(v->br->dev, v->vid);
if (err && err != -EOPNOTSUPP)
- goto out;
- err = 0;
+ br_warn(v->br,
+ "failed to delete bridge vlan %u from switchdev: %pe\n",
+ v->vid, ERR_PTR(err));
}
if (br_vlan_should_use(v)) {
@@ -432,8 +436,6 @@ static int __vlan_del(struct net_bridge_vlan *v)
}
br_vlan_put_master(masterv);
-out:
- return err;
}
static void __vlan_group_free(struct net_bridge_vlan_group *vg)
@@ -450,7 +452,6 @@ static void __vlan_flush(const struct net_bridge *br,
{
struct net_bridge_vlan *vlan, *tmp;
u16 v_start = 0, v_end = 0;
- int err;
__vlan_delete_pvid(vg, vg->pvid);
list_for_each_entry_safe(vlan, tmp, &vg->vlan_list, vlist) {
@@ -464,13 +465,7 @@ static void __vlan_flush(const struct net_bridge *br,
}
v_end = vlan->vid;
- err = __vlan_del(vlan);
- if (err) {
- br_err(br,
- "port %u(%s) failed to delete vlan %d: %pe\n",
- (unsigned int) p->port_no, p->dev->name,
- vlan->vid, ERR_PTR(err));
- }
+ __vlan_del(vlan);
}
/* notify about the last/whole vlan range */
@@ -838,8 +833,9 @@ int br_vlan_delete(struct net_bridge *br, u16 vid)
br_fdb_delete_by_port(br, NULL, vid, 0);
vlan_tunnel_info_del(vg, v);
+ __vlan_del(v);
- return __vlan_del(v);
+ return 0;
}
void br_vlan_flush(struct net_bridge *br)
@@ -1369,8 +1365,9 @@ int nbp_vlan_delete(struct net_bridge_port *port, u16 vid)
return -ENOENT;
br_fdb_find_delete_local(port->br, port, port->dev->dev_addr, vid);
br_fdb_delete_by_port(port->br, port, vid, 0);
+ __vlan_del(v);
- return __vlan_del(v);
+ return 0;
}
void nbp_vlan_flush(struct net_bridge_port *port)
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index abaf108ac4db..edc660778408 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -141,9 +141,8 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
al = sizeof(struct net_dm_alert_msg);
al += dm_hit_limit * sizeof(struct net_dm_drop_point);
- al += sizeof(struct nlattr);
- skb = genlmsg_new(al, GFP_KERNEL);
+ skb = genlmsg_new(nla_total_size(al), GFP_KERNEL);
if (!skb)
goto err;
@@ -448,7 +447,7 @@ net_dm_hw_trap_summary_probe(void *ignore, const struct devlink *devlink,
if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
return;
- hw_data = this_cpu_ptr(&dm_hw_cpu_data);
+ hw_data = raw_cpu_ptr(&dm_hw_cpu_data);
raw_spin_lock_irqsave(&hw_data->lock, flags);
hw_entries = hw_data->hw_entries;
@@ -516,7 +515,7 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
*/
nskb->tstamp = tstamp;
- data = this_cpu_ptr(&dm_cpu_data);
+ data = raw_cpu_ptr(&dm_cpu_data);
spin_lock_irqsave(&data->drop_queue.lock, flags);
if (skb_queue_len(&data->drop_queue) < net_dm_queue_len)
@@ -983,7 +982,7 @@ net_dm_hw_trap_packet_probe(void *ignore, const struct devlink *devlink,
NET_DM_SKB_CB(nskb)->hw_metadata = n_hw_metadata;
nskb->tstamp = tstamp;
- hw_data = this_cpu_ptr(&dm_hw_cpu_data);
+ hw_data = raw_cpu_ptr(&dm_hw_cpu_data);
spin_lock_irqsave(&hw_data->drop_queue.lock, flags);
if (skb_queue_len(&hw_data->drop_queue) < net_dm_queue_len)
@@ -1083,7 +1082,7 @@ err_module_put:
struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu);
struct sk_buff *skb;
- timer_delete_sync(&hw_data->send_timer);
+ timer_shutdown_sync(&hw_data->send_timer);
cancel_work_sync(&hw_data->dm_alert_work);
while ((skb = __skb_dequeue(&hw_data->drop_queue))) {
struct devlink_trap_metadata *hw_metadata;
@@ -1117,7 +1116,7 @@ static void net_dm_hw_monitor_stop(struct netlink_ext_ack *extack)
struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu);
struct sk_buff *skb;
- timer_delete_sync(&hw_data->send_timer);
+ timer_shutdown_sync(&hw_data->send_timer);
cancel_work_sync(&hw_data->dm_alert_work);
while ((skb = __skb_dequeue(&hw_data->drop_queue))) {
struct devlink_trap_metadata *hw_metadata;
@@ -1173,12 +1172,13 @@ static int net_dm_trace_on_set(struct netlink_ext_ack *extack)
err_unregister_trace:
unregister_trace_kfree_skb(ops->kfree_skb_probe, NULL);
+ tracepoint_synchronize_unregister();
err_module_put:
for_each_possible_cpu(cpu) {
struct per_cpu_dm_data *data = &per_cpu(dm_cpu_data, cpu);
struct sk_buff *skb;
- timer_delete_sync(&data->send_timer);
+ timer_shutdown_sync(&data->send_timer);
cancel_work_sync(&data->dm_alert_work);
while ((skb = __skb_dequeue(&data->drop_queue)))
consume_skb(skb);
@@ -1206,7 +1206,7 @@ static void net_dm_trace_off_set(void)
struct per_cpu_dm_data *data = &per_cpu(dm_cpu_data, cpu);
struct sk_buff *skb;
- timer_delete_sync(&data->send_timer);
+ timer_shutdown_sync(&data->send_timer);
cancel_work_sync(&data->dm_alert_work);
while ((skb = __skb_dequeue(&data->drop_queue)))
consume_skb(skb);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 82309efd417e..5e877018e006 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1084,7 +1084,7 @@ static int __net_init ipgre_init_net(struct net *net)
static void __net_exit ipgre_exit_rtnl(struct net *net,
struct list_head *dev_to_kill)
{
- ip_tunnel_delete_net(net, ipgre_net_id, &ipgre_link_ops, dev_to_kill);
+ ip_tunnel_delete_net(net, ipgre_net_id, dev_to_kill);
}
static struct pernet_operations ipgre_net_ops = {
@@ -1728,7 +1728,7 @@ static int __net_init ipgre_tap_init_net(struct net *net)
static void __net_exit ipgre_tap_exit_rtnl(struct net *net,
struct list_head *dev_to_kill)
{
- ip_tunnel_delete_net(net, gre_tap_net_id, &ipgre_tap_ops, dev_to_kill);
+ ip_tunnel_delete_net(net, gre_tap_net_id, dev_to_kill);
}
static struct pernet_operations ipgre_tap_net_ops = {
@@ -1747,7 +1747,7 @@ static int __net_init erspan_init_net(struct net *net)
static void __net_exit erspan_exit_rtnl(struct net *net,
struct list_head *dev_to_kill)
{
- ip_tunnel_delete_net(net, erspan_net_id, &erspan_link_ops, dev_to_kill);
+ ip_tunnel_delete_net(net, erspan_net_id, dev_to_kill);
}
static struct pernet_operations erspan_net_ops = {
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 13b5e35e8790..0875474a578a 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -205,6 +205,11 @@ static void ip_tunnel_del(struct ip_tunnel_net *itn, struct ip_tunnel *t)
hlist_del_init_rcu(&t->hash_node);
}
+static bool ip_tunnel_unregistering(struct ip_tunnel *t)
+{
+ return hlist_unhashed(&t->hash_node);
+}
+
static struct ip_tunnel *ip_tunnel_find(struct ip_tunnel_net *itn,
struct ip_tunnel_parm_kern *parms,
int type)
@@ -219,7 +224,8 @@ static struct ip_tunnel *ip_tunnel_find(struct ip_tunnel_net *itn,
ip_tunnel_flags_copy(flags, parms->i_flags);
- hlist_for_each_entry_rcu(t, head, hash_node, lockdep_rtnl_is_held()) {
+ hlist_for_each_entry_rcu(t, head, hash_node,
+ lockdep_is_held(&itn->tunnels_lock)) {
if (local == t->parms.iph.saddr &&
remote == t->parms.iph.daddr &&
link == READ_ONCE(t->parms.link) &&
@@ -892,13 +898,37 @@ static void ip_tunnel_update(struct ip_tunnel_net *itn,
netdev_state_change(dev);
}
+static void __ip_tunnel_dellink(struct net *net, struct net_device *dev,
+ struct list_head *head)
+{
+ struct ip_tunnel *tunnel = netdev_priv(dev);
+ struct ip_tunnel_net *itn;
+
+ itn = net_generic(tunnel->net, tunnel->ip_tnl_net_id);
+ ip_tunnel_del(itn, tunnel);
+ unregister_netdevice_queue_net(net, dev, head);
+}
+
int ip_tunnel_ctl(struct net_device *dev, struct ip_tunnel_parm_kern *p,
int cmd)
{
- int err = 0;
struct ip_tunnel *t = netdev_priv(dev);
+ struct net *orig_net = dev_net(dev);
+ struct ip_tunnel_net *itn;
+ LIST_HEAD(dev_kill_list);
struct net *net = t->net;
- struct ip_tunnel_net *itn = net_generic(net, t->ip_tnl_net_id);
+ int err = 0;
+
+ DEBUG_NET_WARN_ON_ONCE(netdev_need_ops_lock(dev));
+
+ itn = net_generic(net, t->ip_tnl_net_id);
+
+ mutex_lock(&itn->tunnels_lock);
+
+ if (!check_net(net)) {
+ err = -EBUSY;
+ goto done;
+ }
switch (cmd) {
case SIOCGETTUNNEL:
@@ -959,7 +989,7 @@ int ip_tunnel_ctl(struct net_device *dev, struct ip_tunnel_parm_kern *p,
}
}
- if (t) {
+ if (t && !ip_tunnel_unregistering(t)) {
err = 0;
ip_tunnel_update(itn, t, dev, p, true, 0);
} else {
@@ -982,7 +1012,10 @@ int ip_tunnel_ctl(struct net_device *dev, struct ip_tunnel_parm_kern *p,
goto done;
dev = t->dev;
}
- unregister_netdevice(dev);
+
+ if (!ip_tunnel_unregistering(t))
+ __ip_tunnel_dellink(orig_net, dev, &dev_kill_list);
+
err = 0;
break;
@@ -991,6 +1024,10 @@ int ip_tunnel_ctl(struct net_device *dev, struct ip_tunnel_parm_kern *p,
}
done:
+ mutex_unlock(&itn->tunnels_lock);
+
+ unregister_netdevice_many(&dev_kill_list);
+
return err;
}
EXPORT_SYMBOL_GPL(ip_tunnel_ctl);
@@ -1085,8 +1122,10 @@ void ip_tunnel_dellink(struct net_device *dev, struct list_head *head)
itn = net_generic(tunnel->net, tunnel->ip_tnl_net_id);
if (itn->fb_tunnel_dev != dev) {
- ip_tunnel_del(itn, netdev_priv(dev));
- unregister_netdevice_queue(dev, head);
+ mutex_lock(&itn->tunnels_lock);
+ if (!ip_tunnel_unregistering(tunnel))
+ __ip_tunnel_dellink(dev_net(dev), dev, head);
+ mutex_unlock(&itn->tunnels_lock);
}
}
EXPORT_SYMBOL_GPL(ip_tunnel_dellink);
@@ -1118,6 +1157,8 @@ int ip_tunnel_init_net(struct net *net, unsigned int ip_tnl_net_id,
for (i = 0; i < IP_TNL_HASH_SIZE; i++)
INIT_HLIST_HEAD(&itn->tunnels[i]);
+ mutex_init(&itn->tunnels_lock);
+
if (!ops || !net_has_fallback_tunnels(net)) {
struct ip_tunnel_net *it_init_net;
@@ -1149,31 +1190,27 @@ int ip_tunnel_init_net(struct net *net, unsigned int ip_tnl_net_id,
EXPORT_SYMBOL_GPL(ip_tunnel_init_net);
void ip_tunnel_delete_net(struct net *net, unsigned int id,
- struct rtnl_link_ops *ops,
struct list_head *head)
{
struct ip_tunnel_net *itn = net_generic(net, id);
- struct net_device *dev, *aux;
int h;
ASSERT_RTNL_NET(net);
- for_each_netdev_safe(net, dev, aux)
- if (dev->rtnl_link_ops == ops)
- unregister_netdevice_queue(dev, head);
+ mutex_lock(&itn->tunnels_lock);
+
+ WRITE_ONCE(itn->fb_tunnel_dev, NULL);
for (h = 0; h < IP_TNL_HASH_SIZE; h++) {
- struct ip_tunnel *t;
- struct hlist_node *n;
struct hlist_head *thead = &itn->tunnels[h];
+ struct hlist_node *n;
+ struct ip_tunnel *t;
hlist_for_each_entry_safe(t, n, thead, hash_node)
- /* If dev is in the same netns, it has already
- * been added to the list by the previous loop.
- */
- if (!net_eq(dev_net(t->dev), net))
- unregister_netdevice_queue(t->dev, head);
+ __ip_tunnel_dellink(net, t->dev, head);
}
+
+ mutex_unlock(&itn->tunnels_lock);
}
EXPORT_SYMBOL_GPL(ip_tunnel_delete_net);
@@ -1181,21 +1218,25 @@ int ip_tunnel_newlink(struct net *net, struct net_device *dev,
struct nlattr *tb[], struct ip_tunnel_parm_kern *p,
__u32 fwmark)
{
- struct ip_tunnel *nt;
struct ip_tunnel_net *itn;
+ struct ip_tunnel *nt;
+ int err = 0;
int mtu;
- int err;
nt = netdev_priv(dev);
itn = net_generic(net, nt->ip_tnl_net_id);
+ mutex_lock(&itn->tunnels_lock);
+
if (nt->collect_md) {
if (rtnl_dereference(itn->collect_md_tun))
- return -EEXIST;
+ err = -EEXIST;
} else {
if (ip_tunnel_find(itn, p, dev->type))
- return -EEXIST;
+ err = -EEXIST;
}
+ if (err)
+ goto out;
nt->net = net;
nt->parms = *p;
@@ -1222,31 +1263,41 @@ int ip_tunnel_newlink(struct net *net, struct net_device *dev,
goto err_dev_set_mtu;
ip_tunnel_add(itn, nt);
- return 0;
+out:
+ mutex_unlock(&itn->tunnels_lock);
+
+ return err;
err_dev_set_mtu:
unregister_netdevice(dev);
err_register_netdevice:
- return err;
+ goto out;
}
EXPORT_SYMBOL_GPL(ip_tunnel_newlink);
int ip_tunnel_changelink(struct net_device *dev, struct nlattr *tb[],
struct ip_tunnel_parm_kern *p, __u32 fwmark)
{
- struct ip_tunnel *t;
struct ip_tunnel *tunnel = netdev_priv(dev);
struct net *net = tunnel->net;
- struct ip_tunnel_net *itn = net_generic(net, tunnel->ip_tnl_net_id);
+ struct ip_tunnel_net *itn;
+ struct ip_tunnel *t;
+ int err = 0;
+
+ itn = net_generic(net, tunnel->ip_tnl_net_id);
if (dev == itn->fb_tunnel_dev)
return -EINVAL;
+ mutex_lock(&itn->tunnels_lock);
+
t = ip_tunnel_find(itn, p, dev->type);
if (t) {
- if (t->dev != dev)
- return -EEXIST;
+ if (t->dev != dev) {
+ err = -EEXIST;
+ goto out;
+ }
} else {
t = tunnel;
@@ -1259,13 +1310,23 @@ int ip_tunnel_changelink(struct net_device *dev, struct nlattr *tb[],
nflags = IFF_POINTOPOINT;
if ((dev->flags ^ nflags) &
- (IFF_POINTOPOINT | IFF_BROADCAST))
- return -EINVAL;
+ (IFF_POINTOPOINT | IFF_BROADCAST)) {
+ err = -EINVAL;
+ goto out;
+ }
}
}
+ if (ip_tunnel_unregistering(t)) {
+ err = -ENODEV;
+ goto out;
+ }
+
ip_tunnel_update(itn, t, dev, p, !tb[IFLA_MTU], fwmark);
- return 0;
+out:
+ mutex_unlock(&itn->tunnels_lock);
+
+ return err;
}
EXPORT_SYMBOL_GPL(ip_tunnel_changelink);
@@ -1303,13 +1364,6 @@ EXPORT_SYMBOL_GPL(__ip_tunnel_init);
void ip_tunnel_uninit(struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
- struct net *net = tunnel->net;
- struct ip_tunnel_net *itn;
-
- itn = net_generic(net, tunnel->ip_tnl_net_id);
- ip_tunnel_del(itn, netdev_priv(dev));
- if (itn->fb_tunnel_dev == dev)
- WRITE_ONCE(itn->fb_tunnel_dev, NULL);
dst_cache_reset(&tunnel->dst_cache);
}
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 5168d546ea2f..bab42b9e277f 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -680,8 +680,14 @@ static int ip_tun_get_optlen(struct nlattr *attr,
}
static int ip_tun_set_opts(struct nlattr *attr, struct ip_tunnel_info *info,
- struct netlink_ext_ack *extack)
+ int opts_len, struct netlink_ext_ack *extack)
{
+ /* `options_len` is the __counted_by() annotation of the `options`
+ * flexible array, it must be initialized before parsing writes
+ * into it.
+ */
+ info->options_len = opts_len;
+
return ip_tun_parse_opts(attr, info, extack);
}
@@ -712,7 +718,8 @@ static int ip_tun_build_state(struct net *net, struct nlattr *attr,
tun_info = lwt_tun_info(new_state);
- err = ip_tun_set_opts(tb[LWTUNNEL_IP_OPTS], tun_info, extack);
+ err = ip_tun_set_opts(tb[LWTUNNEL_IP_OPTS], tun_info, opt_len,
+ extack);
if (err < 0) {
lwtstate_free(new_state);
return err;
@@ -753,7 +760,6 @@ static int ip_tun_build_state(struct net *net, struct nlattr *attr,
}
tun_info->mode = IP_TUNNEL_INFO_TX;
- tun_info->options_len = opt_len;
*ts = new_state;
@@ -1006,7 +1012,8 @@ static int ip6_tun_build_state(struct net *net, struct nlattr *attr,
tun_info = lwt_tun_info(new_state);
- err = ip_tun_set_opts(tb[LWTUNNEL_IP6_OPTS], tun_info, extack);
+ err = ip_tun_set_opts(tb[LWTUNNEL_IP6_OPTS], tun_info, opt_len,
+ extack);
if (err < 0) {
lwtstate_free(new_state);
return err;
@@ -1040,7 +1047,6 @@ static int ip6_tun_build_state(struct net *net, struct nlattr *attr,
}
tun_info->mode = IP_TUNNEL_INFO_TX | IP_TUNNEL_INFO_IPV6;
- tun_info->options_len = opt_len;
*ts = new_state;
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 3b80929994a0..c4f14d42df24 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -526,7 +526,7 @@ static int __net_init vti_init_net(struct net *net)
static void __net_exit vti_exit_rtnl(struct net *net,
struct list_head *dev_to_kill)
{
- ip_tunnel_delete_net(net, vti_net_id, &vti_link_ops, dev_to_kill);
+ ip_tunnel_delete_net(net, vti_net_id, dev_to_kill);
}
static struct pernet_operations vti_net_ops = {
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index f684baf8e58f..2ffe64e736e0 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -645,7 +645,7 @@ static int __net_init ipip_init_net(struct net *net)
static void __net_exit ipip_exit_rtnl(struct net *net,
struct list_head *dev_to_kill)
{
- ip_tunnel_delete_net(net, ipip_net_id, &ipip_link_ops, dev_to_kill);
+ ip_tunnel_delete_net(net, ipip_net_id, dev_to_kill);
}
static struct pernet_operations ipip_net_ops = {
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 1187bfc8a09d..e4c51ca47301 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -479,6 +479,7 @@ static struct net_device *ipmr_new_tunnel(struct net *net, struct vifctl *v)
{
struct net_device *tunnel_dev, *new_dev;
struct ip_tunnel_parm_kern p = { };
+ LIST_HEAD(dev_kill_list);
int err;
tunnel_dev = __dev_get_by_name(net, "tunl0");
@@ -520,7 +521,8 @@ static struct net_device *ipmr_new_tunnel(struct net *net, struct vifctl *v)
return new_dev;
out_unregister:
- unregister_netdevice(new_dev);
+ new_dev->rtnl_link_ops->dellink(new_dev, &dev_kill_list);
+ unregister_netdevice_many(&dev_kill_list);
out:
return ERR_PTR(-ENOBUFS);
}
@@ -733,8 +735,12 @@ static int vif_delete(struct mr_table *mrt, int vifi, int notify,
ip_rt_multicast_event(in_dev);
}
- if (v->flags & (VIFF_TUNNEL | VIFF_REGISTER) && !notify)
- unregister_netdevice_queue(dev, head);
+ if (!notify) {
+ if (v->flags & VIFF_TUNNEL)
+ dev->rtnl_link_ops->dellink(dev, head);
+ else if (v->flags & VIFF_REGISTER)
+ unregister_netdevice_queue(dev, head);
+ }
netdev_put(dev, &v->dev_tracker);
return 0;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 2f0363bca2a8..e3760daa3470 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -51,6 +51,8 @@ static int tcp_ecn_mode_max = 5;
static u32 icmp_errors_extension_mask_all =
GENMASK_U8(ICMP_ERR_EXT_COUNT - 1, 0);
+static int tcp_min_rcvbuf = 4096;
+
/* obsolete */
static int sysctl_tcp_low_latency __read_mostly;
@@ -1462,7 +1464,7 @@ static const struct ctl_table ipv4_net_table[] = {
.maxlen = sizeof(init_net.ipv4.sysctl_tcp_rmem),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
- .extra1 = SYSCTL_ONE,
+ .extra1 = &tcp_min_rcvbuf,
},
{
.procname = "tcp_comp_sack_delay_ns",
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5588310bc648..3ac485685279 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -578,8 +578,13 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
* blocking on fresh not-connected or disconnected socket. --ANK
*/
shutdown = READ_ONCE(sk->sk_shutdown);
- if (shutdown == SHUTDOWN_MASK || state == TCP_CLOSE)
+ if (shutdown == SHUTDOWN_MASK || state == TCP_CLOSE) {
mask |= EPOLLHUP;
+ /* Coupled with smp_wmb() in tcp_done_with_error() to ensure
+ * sk->sk_err is visible if socket closure was observed.
+ */
+ smp_rmb();
+ }
if (shutdown & RCV_SHUTDOWN)
mask |= EPOLLIN | EPOLLRDNORM | EPOLLRDHUP;
@@ -626,8 +631,6 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
*/
mask |= EPOLLOUT | EPOLLWRNORM;
}
- /* This barrier is coupled with smp_wmb() in tcp_done_with_error() */
- smp_rmb();
if (READ_ONCE(sk->sk_err) ||
!skb_queue_empty_lockless(&sk->sk_error_queue))
mask |= EPOLLERR;
@@ -2167,18 +2170,27 @@ static void tcp_zc_finalize_rx_tstamp(struct sock *sk,
}
static struct vm_area_struct *find_tcp_vma(struct mm_struct *mm,
- unsigned long address)
+ unsigned long address,
+ bool *mmap_locked)
{
- struct vm_area_struct *vma = vma_start_read_unlocked(mm, address);
+ struct vm_area_struct *vma = lock_vma_under_rcu(mm, address);
- if (!vma)
- return NULL;
+ if (vma) {
+ if (vma->vm_ops != &tcp_vm_ops) {
+ vma_end_read(vma);
+ return NULL;
+ }
+ *mmap_locked = false;
+ return vma;
+ }
- if (vma->vm_ops != &tcp_vm_ops) {
- vma_end_read(vma);
+ mmap_read_lock(mm);
+ vma = vma_lookup(mm, address);
+ if (!vma || vma->vm_ops != &tcp_vm_ops) {
+ mmap_read_unlock(mm);
return NULL;
}
-
+ *mmap_locked = true;
return vma;
}
@@ -2199,6 +2211,7 @@ static int tcp_zerocopy_receive(struct sock *sk,
u32 seq = tp->copied_seq;
u32 total_bytes_to_map;
int inq = tcp_inq(sk);
+ bool mmap_locked;
int ret;
zc->copybuf_len = 0;
@@ -2223,7 +2236,7 @@ static int tcp_zerocopy_receive(struct sock *sk,
return 0;
}
- vma = find_tcp_vma(current->mm, address);
+ vma = find_tcp_vma(current->mm, address, &mmap_locked);
if (!vma)
return -EINVAL;
@@ -2305,7 +2318,10 @@ static int tcp_zerocopy_receive(struct sock *sk,
zc, total_bytes_to_map);
}
out:
- vma_end_read(vma);
+ if (mmap_locked)
+ mmap_read_unlock(current->mm);
+ else
+ vma_end_read(vma);
/* Try to copy straggler data. */
if (!ret)
copylen = tcp_zc_handle_leftover(zc, sk, skb, &seq, copybuf_len, tss);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b55d036c7f4d..afb4d8e9fa67 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1604,7 +1604,8 @@ int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
by tcp. Feel free to propose better solution.
--ANK (980728)
*/
- if (np->rxopt.all && sk->sk_state != TCP_LISTEN)
+ if (np->rxopt.all &&
+ !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)))
opt_skb = skb_clone_and_charge_r(skb, sk);
if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 0832213430f4..ce9fb19d8c18 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -98,7 +98,7 @@ static void ieee80211_send_addba_request(struct sta_info *sta, u16 tid,
if (sta->sta.deflink.he_cap.has_he)
ieee80211_add_addbaext(skb, 0, agg_size);
- ieee80211_tx_skb_tid(sdata, skb, tid, -1);
+ ieee80211_tx_skb_tid(sdata, skb, NULL, tid, -1);
}
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
@@ -127,7 +127,7 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
IEEE80211_TX_CTL_REQ_TX_STATUS;
- ieee80211_tx_skb_tid(sdata, skb, tid, -1);
+ ieee80211_tx_skb_tid(sdata, skb, NULL, tid, -1);
}
EXPORT_SYMBOL(ieee80211_send_bar);
diff --git a/net/mac80211/ap.c b/net/mac80211/ap.c
index e7ac99c5a22e..fe255891c35f 100644
--- a/net/mac80211/ap.c
+++ b/net/mac80211/ap.c
@@ -82,9 +82,6 @@ ieee80211_rx_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata,
if (!ift_ext_capa)
return;
- if (!status->link_valid)
- return;
-
sta = sta_info_get_bss(sdata, mgmt->sa);
if (!sta)
return;
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index e1e1b7f82f3f..c5c2113fa4f7 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -545,7 +545,7 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
info->status_data = IEEE80211_STATUS_TYPE_SMPS |
u16_encode_bits(status_link_id << 2 | smps,
IEEE80211_STATUS_SUBDATA_MASK);
- ieee80211_tx_skb_tid(sdata, skb, 7, link_id);
+ ieee80211_tx_skb_tid(sdata, skb, NULL, 7, link_id);
return 0;
}
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index eb5496044f2d..10767666c45c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -2471,7 +2471,8 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta, struct sk_buff *skb);
void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb, int tid, int link_id,
+ struct sk_buff *skb, struct sta_info *sta,
+ int tid, int link_id,
enum nl80211_band band);
static inline bool ieee80211_require_encrypted_assoc(__le16 fc,
@@ -2486,18 +2487,20 @@ ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
enum nl80211_band band)
{
rcu_read_lock();
- __ieee80211_tx_skb_tid_band(sdata, skb, tid, -1, band);
+ __ieee80211_tx_skb_tid_band(sdata, skb, ERR_PTR(-ENOENT),
+ tid, -1, band);
rcu_read_unlock();
}
void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb, int tid, int link_id);
+ struct sk_buff *skb, struct sta_info *sta,
+ int tid, int link_id);
static inline void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
/* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
- ieee80211_tx_skb_tid(sdata, skb, 7, -1);
+ ieee80211_tx_skb_tid(sdata, skb, NULL, 7, -1);
}
/**
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 77f34f433f17..8535dd478633 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1707,11 +1707,8 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local,
break;
status = IEEE80211_SKB_RXCB(skb);
- if (!status->link_valid)
- link_sta = &sta->deflink;
- else
- link_sta = rcu_dereference_protected(sta->link[status->link_id],
- lockdep_is_held(&local->hw.wiphy->mtx));
+ link_sta = wiphy_dereference(local->hw.wiphy,
+ sta->link[status->link_id]);
if (link_sta)
ieee80211_ht_handle_chanwidth_notif(local, sdata, sta,
link_sta, chanwidth,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 47ec703f1094..189dd3467f76 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -11827,12 +11827,10 @@ void ieee80211_sta_rx_queued_frame(struct ieee80211_sub_if_data *sdata,
rx_status = (struct ieee80211_rx_status *) skb->cb;
fc = le16_to_cpu(mgmt->frame_control);
- if (rx_status->link_valid) {
- link = sdata_dereference(sdata->link[rx_status->link_id],
- sdata);
- if (!link)
- return;
- }
+ link = sdata_dereference(sdata->link[rx_status->link_id],
+ sdata);
+ if (!link)
+ return;
switch (fc & IEEE80211_FCTL_STYPE) {
case IEEE80211_STYPE_BEACON:
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index e30767853c36..4b40b461ca78 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -861,8 +861,10 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
need_offchan = true;
rcu_read_lock();
- sta = sta_info_get_bss(sdata, mgmt->da);
- mlo_sta = sta && sta->sta.mlo;
+ if (!params->no_sta) {
+ sta = sta_info_get_bss(sdata, mgmt->da);
+ mlo_sta = sta && sta->sta.mlo;
+ }
if (!ieee80211_is_action(mgmt->frame_control) ||
mgmt->u.action.category == WLAN_CATEGORY_PUBLIC ||
@@ -891,7 +893,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
local->ops->remain_on_channel &&
memcmp(sdata->vif.cfg.ap_addr, mgmt->bssid, ETH_ALEN))) {
need_offchan = true;
- } else if (sdata->u.mgd.associated &&
+ } else if (!params->no_sta &&
+ sdata->u.mgd.associated &&
ether_addr_equal(sdata->vif.cfg.ap_addr, mgmt->da)) {
sta = sta_info_get_bss(sdata, mgmt->da);
mlo_sta = sta && sta->sta.mlo;
@@ -1029,7 +1032,9 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
}
if (!need_offchan) {
- ieee80211_tx_skb_tid(sdata, skb, 7, link_id);
+ ieee80211_tx_skb_tid(sdata, skb,
+ params->no_sta ? ERR_PTR(-ENOENT) : sta,
+ 7, link_id);
ret = 0;
goto out_unlock;
}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 31dc6f83781b..d6755a4c7d3c 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -222,43 +222,21 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local,
}
static void __ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,
- int link_id,
- struct sta_info *sta,
+ struct link_sta_info *link_sta,
struct sk_buff *skb)
{
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-
- if (link_id >= 0) {
- status->link_valid = 1;
- status->link_id = link_id;
- } else {
- status->link_valid = 0;
- }
-
skb_queue_tail(&sdata->skb_queue, skb);
wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
- if (sta) {
- struct link_sta_info *link_sta_info;
-
- if (link_id >= 0) {
- link_sta_info = rcu_dereference(sta->link[link_id]);
- if (!link_sta_info)
- return;
- } else {
- link_sta_info = &sta->deflink;
- }
-
- link_sta_info->rx_stats.packets++;
- }
+ if (link_sta)
+ link_sta->rx_stats.packets++;
}
static void ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,
- int link_id,
- struct sta_info *sta,
+ struct link_sta_info *link_sta,
struct sk_buff *skb)
{
skb->protocol = 0;
- __ieee80211_queue_skb_to_iface(sdata, link_id, sta, skb);
+ __ieee80211_queue_skb_to_iface(sdata, link_sta, skb);
}
static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata,
@@ -301,7 +279,7 @@ static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata,
if (!skb)
return;
- ieee80211_queue_skb_to_iface(sdata, -1, NULL, skb);
+ ieee80211_queue_skb_to_iface(sdata, NULL, skb);
}
/*
@@ -1500,7 +1478,7 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx,
/* if this mpdu is fragmented - terminate rx aggregation session */
sc = le16_to_cpu(hdr->seq_ctrl);
if (sc & IEEE80211_SCTL_FRAG) {
- ieee80211_queue_skb_to_iface(rx->sdata, rx->link_id, NULL, skb);
+ ieee80211_queue_skb_to_iface(rx->sdata, NULL, skb);
return;
}
@@ -2524,7 +2502,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
out:
ieee80211_led_rx(rx->local);
- if (rx->sta)
+ if (rx->link_sta)
rx->link_sta->rx_stats.packets++;
return RX_CONTINUE;
}
@@ -3335,8 +3313,8 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
(tf->action_code == WLAN_TDLS_CHANNEL_SWITCH_REQUEST ||
tf->action_code == WLAN_TDLS_CHANNEL_SWITCH_RESPONSE)) {
rx->skb->protocol = cpu_to_be16(ETH_P_TDLS);
- __ieee80211_queue_skb_to_iface(sdata, rx->link_id,
- rx->sta, rx->skb);
+ __ieee80211_queue_skb_to_iface(sdata, rx->link_sta,
+ rx->skb);
return RX_QUEUED;
}
}
@@ -3991,7 +3969,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
return RX_QUEUED;
queue:
- ieee80211_queue_skb_to_iface(sdata, rx->link_id, rx->sta, rx->skb);
+ ieee80211_queue_skb_to_iface(sdata, rx->link_sta, rx->skb);
return RX_QUEUED;
}
@@ -4005,6 +3983,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
.len = rx->skb->len,
.link_id = rx->link_id,
.have_link_id = rx->link_id >= 0,
+ .no_sta = !rx->sta,
};
/* skip known-bad action frames and return them in the next handler */
@@ -4127,7 +4106,7 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
local->hw.offchannel_tx_hw_queue;
}
- __ieee80211_tx_skb_tid_band(rx->sdata, nskb, 7, -1,
+ __ieee80211_tx_skb_tid_band(rx->sdata, nskb, rx->sta, 7, -1,
status->band);
}
@@ -4147,7 +4126,7 @@ ieee80211_rx_h_ext(struct ieee80211_rx_data *rx)
return RX_DROP_U_UNEXPECTED_EXT_FRAME;
/* for now only beacons are ext, so queue them */
- ieee80211_queue_skb_to_iface(sdata, rx->link_id, rx->sta, rx->skb);
+ ieee80211_queue_skb_to_iface(sdata, rx->link_sta, rx->skb);
return RX_QUEUED;
}
@@ -4204,7 +4183,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
return RX_DROP_U_UNHANDLED_MGMT_STYPE;
}
- ieee80211_queue_skb_to_iface(sdata, rx->link_id, rx->sta, rx->skb);
+ ieee80211_queue_skb_to_iface(sdata, rx->link_sta, rx->skb);
return RX_QUEUED;
}
@@ -4248,12 +4227,28 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx,
spin_lock_bh(&rx->local->rx_path_lock);
while ((skb = __skb_dequeue(frames))) {
+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+
/*
- * all the other fields are valid across frames
- * that belong to an aMPDU since they are on the
- * same TID from the same station
+ * Most fields are valid across frames. However,
+ * in the case of reordering frames may have arrived
+ * on different links, so adjust the link_id, link
+ * and link_sta accordingly.
*/
rx->skb = skb;
+ if (ieee80211_vif_is_mld(&rx->sdata->vif) &&
+ unlikely(rx->link_id != status->link_id)) {
+ if (rx->sta) {
+ rx->link_sta =
+ rcu_dereference(rx->sta->link[rx->link_id]);
+
+ /* Link got disabled, just use deflink */
+ if (!rx->link_sta)
+ rx->link_sta = &rx->sta->deflink;
+ }
+ rx->link_id = status->link_id;
+ rx->link = rcu_dereference(rx->sdata->link[status->link_id]);
+ }
if (WARN_ON_ONCE(!rx->link)) {
res = RX_DROP_U_NO_LINK;
@@ -4323,7 +4318,34 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx)
static bool
ieee80211_rx_is_valid_sta_link_id(struct ieee80211_sta *sta, u8 link_id)
{
- return !!(sta->valid_links & BIT(link_id));
+ if (sta->mlo)
+ return sta->valid_links & BIT(link_id);
+
+ return sta->deflink.link_id == link_id;
+}
+
+static bool ieee80211_rx_data_set_link_sta(struct ieee80211_rx_data *rx,
+ struct link_sta_info *link_sta)
+{
+ struct sta_info *sta;
+
+ if (WARN_ON_ONCE(!link_sta) ||
+ !ieee80211_rx_is_valid_sta_link_id(&link_sta->sta->sta,
+ link_sta->link_id))
+ return false;
+
+ sta = link_sta->sta;
+
+ rx->sta = sta;
+ rx->local = sta->sdata->local;
+ rx->link = rcu_dereference(sta->sdata->link[link_sta->link_id]);
+ if (!rx->link)
+ return false;
+
+ rx->link_id = rx->link->link_id;
+ rx->link_sta = link_sta;
+
+ return true;
}
static bool ieee80211_rx_data_set_link(struct ieee80211_rx_data *rx,
@@ -4360,11 +4382,13 @@ static bool ieee80211_rx_data_set_sta(struct ieee80211_rx_data *rx,
if (link_id < 0) {
if (ieee80211_vif_is_mld(&rx->sdata->vif) &&
- sta && !sta->sta.valid_links)
+ sta && !sta->sta.valid_links) {
rx->link =
rcu_dereference(rx->sdata->link[sta->deflink.link_id]);
- else
+ rx->link_sta = &sta->deflink;
+ } else {
rx->link = &rx->sdata->deflink;
+ }
} else if (!ieee80211_rx_data_set_link(rx, link_id)) {
return false;
}
@@ -4387,7 +4411,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
struct tid_ampdu_rx *tid_agg_rx;
int link_id = -1;
- /* FIXME: statistics won't be right with this */
+ /* NOTE: the correct link STA for the frame is set later */
if (sta->sta.valid_links)
link_id = ffs(sta->sta.valid_links) - 1;
@@ -4914,20 +4938,14 @@ static void ieee80211_rx_8023(struct ieee80211_rx_data *rx,
{
struct ieee80211_sta_rx_stats *stats;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
- struct sta_info *sta = rx->sta;
- struct link_sta_info *link_sta;
+ struct link_sta_info *link_sta = rx->link_sta;
struct sk_buff *skb = rx->skb;
void *sa = skb->data + ETH_ALEN;
void *da = skb->data;
- if (rx->link_id >= 0) {
- link_sta = rcu_dereference(sta->link[rx->link_id]);
- if (WARN_ON_ONCE(!link_sta)) {
- dev_kfree_skb(rx->skb);
- return;
- }
- } else {
- link_sta = &sta->deflink;
+ if (WARN_ON_ONCE(!link_sta)) {
+ dev_kfree_skb(rx->skb);
+ return;
}
stats = &link_sta->rx_stats;
@@ -5154,6 +5172,9 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
goto drop;
}
+ status = IEEE80211_SKB_RXCB(skb);
+ status->link_id = rx->link_id < 0 ? 0 : rx->link_id;
+
ieee80211_rx_8023(rx, fast_rx, orig_len);
return true;
@@ -5178,6 +5199,7 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
struct ieee80211_hdr *hdr = (void *)skb->data;
struct link_sta_info *link_sta = rx->link_sta;
struct ieee80211_link_data *link = rx->link;
+ struct ieee80211_rx_status *status;
rx->skb = skb;
@@ -5221,6 +5243,9 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
hdr = (struct ieee80211_hdr *)rx->skb->data;
}
+ status = IEEE80211_SKB_RXCB(rx->skb);
+ status->link_id = rx->link_id < 0 ? 0 : rx->link_id;
+
if (ieee80211_is_s1g_beacon(hdr->frame_control)) {
ieee80211_invoke_rx_handlers(rx);
return true;
@@ -5256,22 +5281,19 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
}
static void __ieee80211_rx_handle_8023(struct ieee80211_hw *hw,
- struct ieee80211_sta *pubsta,
+ struct ieee80211_link_sta *link_pubsta,
struct sk_buff *skb,
struct list_head *list)
{
struct ieee80211_local *local = hw_to_local(hw);
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_fast_rx *fast_rx;
struct ieee80211_rx_data rx;
struct sta_info *sta;
- int link_id = -1;
memset(&rx, 0, sizeof(rx));
rx.skb = skb;
rx.local = local;
rx.list = list;
- rx.link_id = -1;
I802_DEBUG_INC(local->dot11ReceivedFragmentCount);
@@ -5279,23 +5301,15 @@ static void __ieee80211_rx_handle_8023(struct ieee80211_hw *hw,
if (skb->len < sizeof(struct ethhdr))
goto drop;
- if (!pubsta)
+ if (!link_pubsta)
goto drop;
- if (status->link_valid)
- link_id = status->link_id;
-
- /*
- * TODO: Should the frame be dropped if the right link_id is not
- * available? Or may be it is fine in the current form to proceed with
- * the frame processing because with frame being in 802.3 format,
- * link_id is used only for stats purpose and updating the stats on
- * the deflink is fine?
- */
- sta = container_of(pubsta, struct sta_info, sta);
- if (!ieee80211_rx_data_set_sta(&rx, sta, link_id))
+ sta = container_of(link_pubsta->sta, struct sta_info, sta);
+ if (!ieee80211_rx_data_set_sta(&rx, sta, link_pubsta->link_id))
goto drop;
+ rx.link_id = link_pubsta->link_id;
+
fast_rx = rcu_dereference(rx.sta->fast_rx);
if (!fast_rx)
goto drop;
@@ -5307,59 +5321,19 @@ drop:
dev_kfree_skb(skb);
}
-static bool ieee80211_rx_for_interface(struct ieee80211_rx_data *rx,
- struct sk_buff *skb, bool consume)
+static bool ieee80211_rx_valid_freq(int freq, struct ieee80211_link_data *link)
{
- struct link_sta_info *link_sta;
- struct ieee80211_hdr *hdr = (void *)skb->data;
- struct sta_info *sta;
- int link_id = -1;
-
- if (ieee80211_is_s1g_beacon(hdr->frame_control)) {
- if (!ieee80211_rx_data_set_sta(rx, NULL, -1))
- return false;
-
- return ieee80211_prepare_and_rx_handle(rx, skb, consume);
- }
+ struct ieee80211_chanctx_conf *conf;
- /*
- * Look up link station first, in case there's a
- * chance that they might have a link address that
- * is identical to the MLD address, that way we'll
- * have the link information if needed.
- */
- link_sta = link_sta_info_get_bss(rx->sdata, hdr->addr2);
- if (link_sta) {
- sta = link_sta->sta;
- link_id = link_sta->link_id;
- } else {
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-
- sta = sta_info_get_bss(rx->sdata, hdr->addr2);
- if (status->link_valid) {
- link_id = status->link_id;
- } else if (ieee80211_vif_is_mld(&rx->sdata->vif) &&
- status->freq) {
- struct ieee80211_link_data *link;
- struct ieee80211_chanctx_conf *conf;
-
- for_each_link_data_rcu(rx->sdata, link) {
- conf = rcu_dereference(link->conf->chanctx_conf);
- if (!conf || !conf->def.chan)
- continue;
-
- if (status->freq == conf->def.chan->center_freq) {
- link_id = link->link_id;
- break;
- }
- }
- }
- }
+ if (!freq || link->sdata->vif.type == NL80211_IFTYPE_NAN ||
+ link->sdata->vif.type == NL80211_IFTYPE_NAN_DATA)
+ return true;
- if (!ieee80211_rx_data_set_sta(rx, sta, link_id))
+ conf = rcu_dereference(link->conf->chanctx_conf);
+ if (!conf || !conf->def.chan)
return false;
- return ieee80211_prepare_and_rx_handle(rx, skb, consume);
+ return freq == conf->def.chan->center_freq;
}
/*
@@ -5367,18 +5341,20 @@ static bool ieee80211_rx_for_interface(struct ieee80211_rx_data *rx,
* be called with rcu_read_lock protection.
*/
static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
- struct ieee80211_sta *pubsta,
+ struct ieee80211_link_sta *link_pubsta,
struct sk_buff *skb,
struct list_head *list)
{
struct ieee80211_local *local = hw_to_local(hw);
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_sub_if_data *sdata;
+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr;
+ struct link_sta_info *link_sta;
+ struct sta_info *sta;
__le16 fc;
struct ieee80211_rx_data rx;
- struct ieee80211_sub_if_data *prev;
struct rhlist_head *tmp;
+ bool rx_data_pending;
int err = 0;
fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
@@ -5386,7 +5362,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
rx.skb = skb;
rx.local = local;
rx.list = list;
- rx.link_id = -1;
if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc))
I802_DEBUG_INC(local->dot11ReceivedFragmentCount);
@@ -5426,97 +5401,102 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
ieee80211_is_s1g_beacon(hdr->frame_control)))
ieee80211_scan_rx(local, skb);
+ /*
+ * RX of a data frame should only happen to existing stations.
+ * It is therefore more efficient to use the one provided by the driver
+ * or search based on the station's address.
+ *
+ * Note we will fall through and handle a spurious data frame in the
+ * same way as a management frame.
+ */
if (ieee80211_is_data(fc)) {
- struct sta_info *sta, *prev_sta;
- int link_id = -1;
-
- if (status->link_valid)
- link_id = status->link_id;
-
- if (pubsta) {
- sta = container_of(pubsta, struct sta_info, sta);
- if (!ieee80211_rx_data_set_sta(&rx, sta, link_id))
- goto out;
-
- /*
- * In MLO connection, fetch the link_id using addr2
- * when the driver does not pass link_id in status.
- * When the address translation is already performed by
- * driver/hw, the valid link_id must be passed in
- * status.
- */
-
- if (!status->link_valid && pubsta->mlo) {
- struct link_sta_info *link_sta;
-
- link_sta = link_sta_info_get_bss(rx.sdata,
- hdr->addr2);
- if (!link_sta)
- goto out;
-
- if (!ieee80211_rx_data_set_link(&rx,
- link_sta->link_id))
- goto out;
- }
-
- if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
+ if (link_pubsta) {
+ sta = container_of(link_pubsta->sta, struct sta_info,
+ sta);
+ link_sta = rcu_dereference(sta->link[link_pubsta->link_id]);
+
+ rx.sdata = sta->sdata;
+ if (ieee80211_rx_data_set_link_sta(&rx, link_sta) &&
+ ieee80211_prepare_and_rx_handle(&rx, skb, true))
return;
+
goto out;
}
- prev_sta = NULL;
+ rx_data_pending = false;
+ /* Search for stations on non-MLD interfaces */
for_each_sta_info(local, hdr->addr2, sta, tmp) {
- if (!prev_sta) {
- prev_sta = sta;
- continue;
- }
+ struct ieee80211_link_data *link;
- rx.sdata = prev_sta->sdata;
- if (!status->link_valid && prev_sta->sta.mlo) {
- struct link_sta_info *link_sta;
+ if (ieee80211_vif_is_mld(&sta->sdata->vif))
+ continue;
- link_sta = link_sta_info_get_bss(rx.sdata,
- hdr->addr2);
- if (!link_sta)
- continue;
+ link = &sta->sdata->deflink;
+ if (!ieee80211_rx_valid_freq(status->freq, link))
+ continue;
- link_id = link_sta->link_id;
+ if (rx_data_pending) {
+ ieee80211_prepare_and_rx_handle(&rx, skb,
+ false);
+ rx_data_pending = false;
}
- if (!ieee80211_rx_data_set_sta(&rx, prev_sta, link_id))
- goto out;
-
- ieee80211_prepare_and_rx_handle(&rx, skb, false);
+ rx.sdata = sta->sdata;
+ if (!ieee80211_rx_data_set_link_sta(&rx, &sta->deflink))
+ continue;
- prev_sta = sta;
+ rx_data_pending = true;
}
- if (prev_sta) {
- rx.sdata = prev_sta->sdata;
- if (!status->link_valid && prev_sta->sta.mlo) {
- struct link_sta_info *link_sta;
+ /* And search stations on MLD interfaces */
+ for_each_link_sta_info(local, hdr->addr2, link_sta, tmp) {
+ struct ieee80211_link_data *link;
- link_sta = link_sta_info_get_bss(rx.sdata,
- hdr->addr2);
- if (!link_sta)
- goto out;
+ sta = link_sta->sta;
+ sdata = sta->sdata;
+ link = rcu_dereference(sdata->link[link_sta->link_id]);
- link_id = link_sta->link_id;
+ if (!ieee80211_rx_valid_freq(status->freq, link))
+ continue;
+
+ if (rx_data_pending) {
+ ieee80211_prepare_and_rx_handle(&rx, skb,
+ false);
+ rx_data_pending = false;
}
- if (!ieee80211_rx_data_set_sta(&rx, prev_sta, link_id))
- goto out;
+ rx.sdata = sta->sdata;
+ if (!ieee80211_rx_data_set_link_sta(&rx, link_sta))
+ continue;
+
+ rx_data_pending = true;
+ }
+ if (rx_data_pending) {
if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
return;
+
goto out;
}
+
+ /* fall through, e.g. for spurious frame notification */
}
- prev = NULL;
+ /*
+ * This is a management frame (or a data frame without a station) and
+ * it will be delivered independent of whether a station exists,
+ * so iterate the interfaces.
+ */
+ rx_data_pending = false;
+
+ /* We expect the driver to provide frequency information */
+ if (WARN_ON_ONCE(!local->emulate_chanctx && !status->freq))
+ goto out;
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+ struct ieee80211_link_data *link = NULL;
+
if (!ieee80211_sdata_running(sdata))
continue;
@@ -5524,30 +5504,85 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
continue;
+ link_sta = NULL;
+ link = NULL;
+
+ /* Try to resolve the station */
+ if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ sta = sta_info_get_bss(sdata, hdr->addr2);
+
+ if (sta) {
+ link_sta = &sta->deflink;
+ link = &sdata->deflink;
+ }
+ } else {
+ link_sta = link_sta_info_get_bss(sdata, hdr->addr2);
+
+ if (link_sta)
+ link = rcu_dereference(sdata->link[link_sta->link_id]);
+ }
+
/*
- * frame is destined for this interface, but if it's
- * not also for the previous one we handle that after
- * the loop to avoid copying the SKB once too much
+ * If we found a STA and it has a valid link information, then
+ * RX using the station.
*/
+ if (link_sta && link &&
+ ieee80211_rx_valid_freq(status->freq, link)) {
+ if (rx_data_pending) {
+ ieee80211_prepare_and_rx_handle(&rx, skb, false);
+ rx_data_pending = false;
+ }
+
+ /* No valid_links check as we need to RX beacons */
+
+ rx.sdata = sdata;
+ if (ieee80211_rx_data_set_link_sta(&rx, link_sta))
+ rx_data_pending = true;
- if (!prev) {
- prev = sdata;
continue;
}
- rx.sdata = prev;
- ieee80211_rx_for_interface(&rx, skb, false);
+ /* No station, try to resolve the link and RX */
+ if (ieee80211_vif_is_mld(&sdata->vif)) {
+ struct ieee80211_chanctx_conf *conf;
+ bool found = false;
- prev = sdata;
- }
+ for_each_link_data_rcu(sdata, link) {
+ conf = rcu_dereference(link->conf->chanctx_conf);
+ if (!conf || !conf->def.chan)
+ continue;
- if (prev) {
- rx.sdata = prev;
+ if (status->freq == conf->def.chan->center_freq) {
+ found = true;
+ break;
+ }
+ }
- if (ieee80211_rx_for_interface(&rx, skb, true))
- return;
+ if (!found)
+ link = &sdata->deflink;
+ } else {
+ link = &sdata->deflink;
+ }
+
+ if (rx_data_pending) {
+ ieee80211_prepare_and_rx_handle(&rx, skb, false);
+ rx_data_pending = false;
+ }
+
+ rx.sdata = sdata;
+ rx.local = sdata->local;
+ rx.link = link;
+ rx.link_id = link->link_id;
+ rx.sta = NULL;
+ rx.link_sta = NULL;
+
+ rx_data_pending = true;
}
+ if (rx_data_pending &&
+ ieee80211_prepare_and_rx_handle(&rx, skb, true))
+ return;
+
out:
dev_kfree_skb(skb);
}
@@ -5556,7 +5591,8 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
* This is the receive path handler. It is called by a low level driver when an
* 802.11 MPDU is received from the hardware.
*/
-void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
+void ieee80211_rx_list(struct ieee80211_hw *hw,
+ struct ieee80211_link_sta *link_pubsta,
struct sk_buff *skb, struct list_head *list)
{
struct ieee80211_local *local = hw_to_local(hw);
@@ -5694,9 +5730,6 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
}
}
- if (WARN_ON_ONCE(status->link_id >= IEEE80211_LINK_UNSPECIFIED))
- goto drop;
-
status->rx_flags = 0;
kcov_remote_start_common(skb_get_kcov_handle(skb));
@@ -5715,9 +5748,10 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
ieee80211_tpt_led_trig_rx(local, skb->len);
if (status->flag & RX_FLAG_8023)
- __ieee80211_rx_handle_8023(hw, pubsta, skb, list);
+ __ieee80211_rx_handle_8023(hw, link_pubsta, skb, list);
else
- __ieee80211_rx_handle_packet(hw, pubsta, skb, list);
+ __ieee80211_rx_handle_packet(hw, link_pubsta, skb,
+ list);
}
kcov_remote_stop();
@@ -5727,7 +5761,8 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
}
EXPORT_SYMBOL(ieee80211_rx_list);
-void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
+void ieee80211_rx_napi(struct ieee80211_hw *hw,
+ struct ieee80211_link_sta *link_pubsta,
struct sk_buff *skb, struct napi_struct *napi)
{
struct sk_buff *tmp;
@@ -5740,7 +5775,7 @@ void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
* receive processing
*/
rcu_read_lock();
- ieee80211_rx_list(hw, pubsta, skb, &list);
+ ieee80211_rx_list(hw, link_pubsta, skb, &list);
rcu_read_unlock();
if (!napi) {
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 8e950ef6d1ea..a4bca412e577 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -9,7 +9,7 @@
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
* Copyright 2013-2015 Intel Mobile Communications GmbH
* Copyright 2016-2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2025 Intel Corporation
+ * Copyright (C) 2018-2026 Intel Corporation
*/
#include <linux/if_arp.h>
@@ -204,12 +204,10 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
* an indication on which of the links the frame was received
*/
if (ieee80211_vif_is_mld(&scan_sdata->vif)) {
- if (rx_status->link_valid) {
- s8 link_id = rx_status->link_id;
+ s8 link_id = rx_status->link_id;
- link_conf =
- rcu_dereference(scan_sdata->vif.link_conf[link_id]);
- }
+ link_conf =
+ rcu_dereference(scan_sdata->vif.link_conf[link_id]);
} else {
link_conf = &scan_sdata->vif.bss_conf;
}
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 2d72bc8672cd..68bd64328937 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1066,7 +1066,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
}
if (action_code == WLAN_PUB_ACTION_TDLS_DISCOVER_RES) {
- ieee80211_tx_skb_tid(sdata, skb, 7, link_id);
+ ieee80211_tx_skb_tid(sdata, skb, sta, 7, link_id);
return 0;
}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c856d1f12a65..fa47fad2d50c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -6481,7 +6481,8 @@ void ieee80211_unreserve_tid(struct ieee80211_sta *pubsta, u8 tid)
EXPORT_SYMBOL(ieee80211_unreserve_tid);
void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb, int tid, int link_id,
+ struct sk_buff *skb, struct sta_info *sta,
+ int tid, int link_id,
enum nl80211_band band)
{
const struct ieee80211_hdr *hdr = (void *)skb->data;
@@ -6533,12 +6534,13 @@ void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
*/
local_bh_disable();
IEEE80211_SKB_CB(skb)->band = band;
- ieee80211_xmit(sdata, NULL, skb);
+ ieee80211_xmit(sdata, sta, skb);
local_bh_enable();
}
void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb, int tid, int link_id)
+ struct sk_buff *skb, struct sta_info *sta,
+ int tid, int link_id)
{
struct ieee80211_chanctx_conf *chanctx_conf;
enum nl80211_band band;
@@ -6564,7 +6566,7 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
band = 0;
}
- __ieee80211_tx_skb_tid_band(sdata, skb, tid, link_id, band);
+ __ieee80211_tx_skb_tid_band(sdata, skb, sta, tid, link_id, band);
rcu_read_unlock();
}
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 537562aacb7e..1e594baf7adf 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -922,9 +922,9 @@ netlink_update_subscriptions(struct sock *sk, unsigned int subscriptions)
static int netlink_realloc_groups(struct sock *sk)
{
+ unsigned long *new_groups, *old_groups = NULL;
struct netlink_sock *nlk = nlk_sk(sk);
unsigned int groups;
- unsigned long *new_groups;
int err = 0;
netlink_table_grab();
@@ -938,18 +938,37 @@ static int netlink_realloc_groups(struct sock *sk)
if (nlk->ngroups >= groups)
goto out_unlock;
- new_groups = krealloc(nlk->groups, NLGRPSZ(groups), GFP_ATOMIC);
- if (new_groups == NULL) {
+ /* Can not use krealloc(), because the old buffer might be freed
+ * immediately, while lockless readers (netlink diag dump and
+ * /proc/net/netlink) can still be looking at it.
+ */
+ new_groups = kzalloc(NLGRPSZ(groups), GFP_ATOMIC);
+ if (!new_groups) {
err = -ENOMEM;
goto out_unlock;
}
- memset((char *)new_groups + NLGRPSZ(nlk->ngroups), 0,
- NLGRPSZ(groups) - NLGRPSZ(nlk->ngroups));
+ old_groups = nlk->groups;
+ if (old_groups)
+ memcpy(new_groups, old_groups, NLGRPSZ(nlk->ngroups));
+
+ /* Publish the new bitmap and its content: pairs with the address
+ * dependency in lockless readers, which can pick up the new pointer
+ * while still seeing the old (smaller) nlk->ngroups.
+ */
+ smp_store_release(&nlk->groups, new_groups);
+
+ /* Then publish the new size: pairs with smp_load_acquire() from
+ * lockless readers, so that they can not read NLGRPSZ(new ngroups)
+ * bytes from the old buffer.
+ */
+ smp_store_release(&nlk->ngroups, groups);
- nlk->groups = new_groups;
- nlk->ngroups = groups;
out_unlock:
netlink_table_ungrab();
+
+ if (old_groups)
+ kfree_rcu_mightsleep(old_groups);
+
return err;
}
@@ -2705,11 +2724,18 @@ static int netlink_native_seq_show(struct seq_file *seq, void *v)
} else {
struct sock *s = v;
struct netlink_sock *nlk = nlk_sk(s);
+ const unsigned long *groups;
+
+ /* Lockless read : netlink_realloc_groups() can change
+ * nlk->groups under us. The old buffer is freed after an
+ * RCU grace period, and this walk is RCU protected.
+ */
+ groups = READ_ONCE(nlk->groups);
seq_printf(seq, "0 %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8u %-8llu\n",
s->sk_protocol,
nlk->portid,
- nlk->groups ? (u32)nlk->groups[0] : 0,
+ groups ? (u32)groups[0] : 0,
sk_rmem_alloc_get(s),
sk_wmem_alloc_get(s),
READ_ONCE(nlk->cb_running),
diff --git a/net/netlink/diag.c b/net/netlink/diag.c
index 0b3e021bd0ed..7979bd9b2606 100644
--- a/net/netlink/diag.c
+++ b/net/netlink/diag.c
@@ -12,12 +12,24 @@
static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb)
{
struct netlink_sock *nlk = nlk_sk(sk);
-
- if (nlk->groups == NULL)
+ unsigned long *groups;
+ unsigned int ngroups;
+
+ /* Hashed sockets are dumped from the rhashtable walk, which only
+ * holds rcu_read_lock(), while netlink_realloc_groups() can replace
+ * nlk->groups and nlk->ngroups at any time.
+ *
+ * Read nlk->ngroups first : this pairs with smp_store_release()
+ * from netlink_realloc_groups(), so that we can not use the new
+ * (bigger) size with the old (smaller) buffer. The old buffer is
+ * freed after an RCU grace period.
+ */
+ ngroups = smp_load_acquire(&nlk->ngroups);
+ groups = READ_ONCE(nlk->groups);
+ if (!groups)
return 0;
- return nla_put(nlskb, NETLINK_DIAG_GROUPS, NLGRPSZ(nlk->ngroups),
- nlk->groups);
+ return nla_put(nlskb, NETLINK_DIAG_GROUPS, NLGRPSZ(ngroups), groups);
}
static int sk_diag_put_flags(struct sock *sk, struct sk_buff *skb)
diff --git a/net/netlink/policy.c b/net/netlink/policy.c
index 08b006c48f06..574d44b7d518 100644
--- a/net/netlink/policy.c
+++ b/net/netlink/policy.c
@@ -234,6 +234,11 @@ int netlink_policy_dump_attr_size_estimate(const struct nla_policy *pt)
/* maximum is common, u64 min/max with padding */
return common +
2 * (nla_attr_size(0) + nla_attr_size(sizeof(u64)));
+ case NLA_BE16:
+ case NLA_BE32:
+ /* same as the unsigned types, plus the byte order */
+ return common + nla_attr_size(sizeof(u32)) +
+ 2 * (nla_attr_size(0) + nla_attr_size(sizeof(u64)));
case NLA_BITFIELD32:
return common + nla_attr_size(sizeof(u32));
case NLA_STRING:
@@ -289,21 +294,28 @@ __netlink_policy_dump_write_attr(struct netlink_policy_dump_state *state,
case NLA_U16:
case NLA_U32:
case NLA_U64:
+ case NLA_BE16:
+ case NLA_BE32:
case NLA_UINT:
case NLA_MSECS: {
struct netlink_range_validation range;
if (pt->type == NLA_U8)
type = NL_ATTR_TYPE_U8;
- else if (pt->type == NLA_U16)
+ else if (pt->type == NLA_U16 || pt->type == NLA_BE16)
type = NL_ATTR_TYPE_U16;
- else if (pt->type == NLA_U32)
+ else if (pt->type == NLA_U32 || pt->type == NLA_BE32)
type = NL_ATTR_TYPE_U32;
else if (pt->type == NLA_U64)
type = NL_ATTR_TYPE_U64;
else
type = NL_ATTR_TYPE_UINT;
+ if ((pt->type == NLA_BE16 || pt->type == NLA_BE32) &&
+ nla_put_u32(skb, NL_POLICY_TYPE_ATTR_BYTE_ORDER,
+ NL_POLICY_BYTE_ORDER_BIG_ENDIAN))
+ goto nla_put_failure;
+
if (pt->validation_type == NLA_VALIDATE_MASK) {
if (nla_put_u64_64bit(skb, NL_POLICY_TYPE_ATTR_MASK,
pt->mask,
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 27115967e5d9..0f433688e17b 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -366,7 +366,7 @@ static struct nf_conn_labels *ovs_ct_get_conn_labels(struct nf_conn *ct)
struct nf_conn_labels *cl;
cl = nf_ct_labels_find(ct);
- if (!cl) {
+ if (!cl && !nf_ct_is_confirmed(ct)) {
nf_ct_labels_ext_add(ct);
cl = nf_ct_labels_find(ct);
}
diff --git a/net/psp/psp.h b/net/psp/psp.h
index bbb39e2f5b0a..b123c2427905 100644
--- a/net/psp/psp.h
+++ b/net/psp/psp.h
@@ -19,6 +19,7 @@ bool psp_has_assoc_dev_in_ns(struct psp_dev *psd, struct net *net);
int psp_attach_netdev_notifier(void);
void psp_nl_notify_dev(struct psp_dev *psd, u32 cmd);
+void psp_nl_notify_disassoc(struct psp_dev *psd, struct net *net);
struct psp_assoc *psp_assoc_create(struct psp_dev *psd);
struct psp_dev *psp_dev_get_for_sock(struct sock *sk);
diff --git a/net/psp/psp_main.c b/net/psp/psp_main.c
index 91473f96ad21..273b010d2355 100644
--- a/net/psp/psp_main.c
+++ b/net/psp/psp_main.c
@@ -408,7 +408,7 @@ int psp_dev_rcv(struct sk_buff *skb, u16 dev_id, u8 generation, bool strip_icv)
}
EXPORT_SYMBOL(psp_dev_rcv);
-static void psp_dev_disassoc_one(struct psp_dev *psd, struct net_device *dev)
+static bool psp_dev_disassoc_one(struct psp_dev *psd, struct net_device *dev)
{
struct psp_assoc_dev *entry;
@@ -419,9 +419,11 @@ static void psp_dev_disassoc_one(struct psp_dev *psd, struct net_device *dev)
rcu_assign_pointer(entry->assoc_dev->psp_dev, NULL);
netdev_put(entry->assoc_dev, &entry->dev_tracker);
kfree(entry);
- return;
+ return true;
}
}
+
+ return false;
}
static int psp_netdev_event(struct notifier_block *nb, unsigned long event,
@@ -438,9 +440,13 @@ static int psp_netdev_event(struct notifier_block *nb, unsigned long event,
if (psd && psp_dev_tryget(psd)) {
rcu_read_unlock();
mutex_lock(&psd->lock);
- if (psp_dev_is_registered(psd))
- psp_nl_notify_dev(psd, PSP_CMD_DEV_CHANGE_NTF);
- psp_dev_disassoc_one(psd, dev);
+ /* Nothing to report if the device was never on the list,
+ * dev-assoc may have failed after publishing dev->psp_dev,
+ * and this is also the main netdevice's path.
+ */
+ if (psp_dev_disassoc_one(psd, dev) &&
+ psp_dev_is_registered(psd))
+ psp_nl_notify_disassoc(psd, dev_net(dev));
mutex_unlock(&psd->lock);
psp_dev_put(psd);
} else {
diff --git a/net/psp/psp_nl.c b/net/psp/psp_nl.c
index f91665748dde..cdfc2d72fb39 100644
--- a/net/psp/psp_nl.c
+++ b/net/psp/psp_nl.c
@@ -294,13 +294,16 @@ psp_nl_dev_fill(struct psp_dev *psd, struct sk_buff *rsp,
return -EMSGSIZE;
if (nla_put_u32(rsp, PSP_A_DEV_ID, psd->id) ||
- nla_put_u32(rsp, PSP_A_DEV_IFINDEX, psd->main_netdev->ifindex) ||
nla_put_u32(rsp, PSP_A_DEV_PSP_VERSIONS_CAP, psd->caps->versions) ||
nla_put_u32(rsp, PSP_A_DEV_PSP_VERSIONS_ENA, psd->config.versions))
goto err_cancel_msg;
if (cur_net == dev_net(psd->main_netdev)) {
- /* Primary device - dump assoc list */
+ /* Primary device - report the netdev, dump assoc list. */
+ if (nla_put_u32(rsp, PSP_A_DEV_IFINDEX,
+ psd->main_netdev->ifindex))
+ goto err_cancel_msg;
+
err = psp_nl_fill_assoc_dev_list(psd, rsp, cur_net, NULL);
if (err)
goto err_cancel_msg;
@@ -353,6 +356,40 @@ void psp_nl_notify_dev(struct psp_dev *psd, u32 cmd)
psp_nl_build_dev_ntf, &cmd);
}
+/**
+ * psp_nl_notify_disassoc() - notify about a device losing an association
+ * @psd: PSP device (must be locked)
+ * @net: netns of the netdevice which got disassociated
+ *
+ * Must be called once @psd no longer has the association, so that the
+ * notifications carry the state after the change.
+ */
+void psp_nl_notify_disassoc(struct psp_dev *psd, struct net *net)
+{
+ struct sk_buff *ntf;
+ bool still_visible;
+ u32 cmd;
+
+ lockdep_assert_held(&psd->lock);
+
+ psp_nl_notify_dev(psd, PSP_CMD_DEV_CHANGE_NTF);
+
+ /* psp_nl_notify_dev() reaches the main netdevice's netns and every
+ * netns which still has an associated device. If @net is neither,
+ * the device is gone from @net and we should send a delete ntf.
+ */
+ still_visible = !psp_dev_check_access(psd, net, false);
+ if (still_visible || !maybe_get_net(net))
+ return;
+
+ cmd = PSP_CMD_DEV_DEL_NTF;
+ ntf = psp_nl_build_dev_ntf(psd, net, &cmd);
+ if (ntf)
+ genlmsg_multicast_netns(&psp_nl_family, net, ntf, 0,
+ PSP_NLGRP_MGMT, GFP_KERNEL);
+ put_net(net);
+}
+
int psp_nl_dev_get_doit(struct sk_buff *req, struct genl_info *info)
{
struct psp_dev *psd = info->user_ptr[0];
@@ -617,13 +654,6 @@ int psp_nl_dev_disassoc_doit(struct sk_buff *skb, struct genl_info *info)
return -ENOMEM;
}
- put_net(net);
-
- /* Notify before removal so listeners in the disassociated namespace
- * still receive the notification.
- */
- psp_nl_notify_dev(psd, PSP_CMD_DEV_CHANGE_NTF);
-
/* Remove from the association list */
list_del(&found->dev_list);
psd->assoc_dev_cnt--;
@@ -631,6 +661,9 @@ int psp_nl_dev_disassoc_doit(struct sk_buff *skb, struct genl_info *info)
netdev_put(found->assoc_dev, &found->dev_tracker);
kfree(found);
+ psp_nl_notify_disassoc(psd, net);
+ put_net(net);
+
return psp_nl_reply_send(rsp, info);
}
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 19501dc99464..3f653721c45f 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1218,11 +1218,16 @@ static int tcf_action_put(struct tc_action *p)
static void tcf_action_put_many(struct tc_action *actions[])
{
- struct tc_action *a;
int i;
- tcf_act_for_each_action(i, a, actions) {
- const struct tc_action_ops *ops = a->ops;
+ /* Deletion may have cleared entries before failing. */
+ for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
+ struct tc_action *a = actions[i];
+ const struct tc_action_ops *ops;
+
+ if (!a)
+ continue;
+ ops = a->ops;
if (tcf_action_put(a))
module_put(ops->owner);
}
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index fc72f825fbd9..5dec1ed969ad 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -527,7 +527,7 @@ static void hhf_destroy(struct Qdisc *sch)
static const struct nla_policy hhf_policy[TCA_HHF_MAX + 1] = {
[TCA_HHF_BACKLOG_LIMIT] = { .type = NLA_U32 },
[TCA_HHF_QUANTUM] = { .type = NLA_U32 },
- [TCA_HHF_HH_FLOWS_LIMIT] = { .type = NLA_U32 },
+ [TCA_HHF_HH_FLOWS_LIMIT] = NLA_POLICY_MAX(NLA_U32, 2 * HH_FLOWS_CNT),
[TCA_HHF_RESET_TIMEOUT] = { .type = NLA_U32 },
[TCA_HHF_ADMIT_BYTES] = { .type = NLA_U32 },
[TCA_HHF_EVICT_TIMEOUT] = { .type = NLA_U32 },
@@ -546,7 +546,7 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt,
u32 new_hhf_non_hh_weight = q->hhf_non_hh_weight;
err = nla_parse_nested_deprecated(tb, TCA_HHF_MAX, opt, hhf_policy,
- NULL);
+ extack);
if (err < 0)
return err;
@@ -624,6 +624,9 @@ static int hhf_init(struct Qdisc *sch, struct nlattr *opt,
q->hhf_evict_timeout = HZ; /* 1 sec */
q->hhf_non_hh_weight = 2;
+ /* Cap max active HHs at twice len of hh_flows table. */
+ q->hh_flows_limit = 2 * HH_FLOWS_CNT;
+
if (opt) {
int err = hhf_change(sch, opt, extack);
@@ -639,8 +642,6 @@ static int hhf_init(struct Qdisc *sch, struct nlattr *opt,
for (i = 0; i < HH_FLOWS_CNT; i++)
INIT_LIST_HEAD(&q->hh_flows[i]);
- /* Cap max active HHs at twice len of hh_flows table. */
- q->hh_flows_limit = 2 * HH_FLOWS_CNT;
q->hh_flows_overlimit = 0;
q->hh_flows_total_cnt = 0;
q->hh_flows_current_cnt = 0;
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 9fcaaf55cba5..da774f56ca64 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -374,7 +374,7 @@ static bool unix_vertex_dead(struct unix_vertex *vertex)
static LIST_HEAD(unix_visited_vertices);
static unsigned long unix_vertex_grouped_index = UNIX_VERTEX_INDEX_MARK2;
-static bool unix_scc_dead(struct list_head *scc, bool fast)
+static bool unix_scc_dead(struct list_head *scc)
{
struct unix_vertex *vertex;
bool scc_dead = true;
@@ -386,10 +386,6 @@ static bool unix_scc_dead(struct list_head *scc, bool fast)
/* Don't restart DFS from this vertex. */
list_move_tail(&vertex->entry, &unix_visited_vertices);
- /* Mark vertex as off-stack for __unix_walk_scc(). */
- if (!fast)
- vertex->index = unix_vertex_grouped_index;
-
if (scc_dead)
scc_dead = unix_vertex_dead(vertex);
}
@@ -521,6 +517,7 @@ prev_vertex:
}
if (vertex->index == vertex->scc_index) {
+ struct unix_vertex *v;
struct list_head scc;
/* SCC finalised.
@@ -530,7 +527,13 @@ prev_vertex:
*/
__list_cut_position(&scc, &vertex_stack, &vertex->scc_entry);
- if (unix_scc_dead(&scc, false)) {
+ list_for_each_entry_reverse(v, &scc, scc_entry) {
+ /* Mark vertex as off-stack and assign a unique ID. */
+ v->index = unix_vertex_grouped_index;
+ v->scc_index = vertex->scc_index;
+ }
+
+ if (unix_scc_dead(&scc)) {
unix_collect_skb(&scc, hitlist);
} else {
if (unix_vertex_max_scc_index < vertex->scc_index)
@@ -588,7 +591,7 @@ static void unix_walk_scc_fast(struct sk_buff_head *hitlist)
vertex = list_first_entry(&unix_unvisited_vertices, typeof(*vertex), entry);
list_add(&scc, &vertex->scc_entry);
- if (unix_scc_dead(&scc, true)) {
+ if (unix_scc_dead(&scc)) {
cyclic_sccs--;
unix_collect_skb(&scc, hitlist);
}
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 1ee7f3c466f3..726c5fdf043b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1097,6 +1097,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_NPCA_PUNCT_BITMAP] =
NLA_POLICY_FULL_RANGE(NLA_U32, &nl80211_punct_bitmap_range),
[NL80211_ATTR_STA_DUMP_LINK_STATS] = { .type = NLA_FLAG },
+ [NL80211_ATTR_FRAME_NO_STA] = { .type = NLA_FLAG },
};
/* policy for the key attributes */
@@ -14891,6 +14892,9 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
!(wdev->valid_links & BIT(params.link_id)))
return -EINVAL;
+ params.no_sta =
+ nla_get_flag(info->attrs[NL80211_ATTR_FRAME_NO_STA]);
+
params.buf = nla_data(info->attrs[NL80211_ATTR_FRAME]);
params.len = nla_len(info->attrs[NL80211_ATTR_FRAME]);
@@ -18462,6 +18466,7 @@ static int nl80211_set_multicast_to_unicast(struct sk_buff *skb,
static int nl80211_set_pmk(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wiphy *wiphy = &rdev->wiphy;
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_pmk_conf pmk_conf = {};
@@ -18470,7 +18475,9 @@ static int nl80211_set_pmk(struct sk_buff *skb, struct genl_info *info)
wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
return -EOPNOTSUPP;
- if (!wiphy_ext_feature_isset(&rdev->wiphy,
+ if (!wiphy_ext_feature_isset(wiphy,
+ NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD) &&
+ !wiphy_ext_feature_isset(wiphy,
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X))
return -EOPNOTSUPP;
@@ -18500,6 +18507,7 @@ static int nl80211_set_pmk(struct sk_buff *skb, struct genl_info *info)
static int nl80211_del_pmk(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wiphy *wiphy = &rdev->wiphy;
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
const u8 *aa;
@@ -18508,7 +18516,9 @@ static int nl80211_del_pmk(struct sk_buff *skb, struct genl_info *info)
wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
return -EOPNOTSUPP;
- if (!wiphy_ext_feature_isset(&rdev->wiphy,
+ if (!wiphy_ext_feature_isset(wiphy,
+ NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD) &&
+ !wiphy_ext_feature_isset(wiphy,
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X))
return -EOPNOTSUPP;
@@ -22051,7 +22061,9 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
(info->ack_tstamp && nla_put_u64_64bit(msg,
NL80211_ATTR_TX_HW_TIMESTAMP,
info->ack_tstamp,
- NL80211_ATTR_PAD)))
+ NL80211_ATTR_PAD)) ||
+ (info->no_sta &&
+ nla_put_flag(msg, NL80211_ATTR_FRAME_NO_STA)))
goto nla_put_failure;
genlmsg_end(msg, hdr);
diff --git a/rust/kernel/mm.rs b/rust/kernel/mm.rs
index 58bc1793fdaf..4764d7b68f2a 100644
--- a/rust/kernel/mm.rs
+++ b/rust/kernel/mm.rs
@@ -170,48 +170,30 @@ impl MmWithUser {
///
/// This is an optimistic trylock operation, so it may fail if there is contention. In that
/// case, you should fall back to taking the mmap read lock.
+ ///
+ /// When per-vma locks are disabled, this always returns `None`.
#[inline]
pub fn lock_vma_under_rcu(&self, vma_addr: usize) -> Option<VmaReadGuard<'_>> {
- // SAFETY: Calling `bindings::lock_vma_under_rcu` is always okay given an mm where
- // `mm_users` is non-zero.
- let vma = unsafe { bindings::lock_vma_under_rcu(self.as_raw(), vma_addr) };
- if vma.is_null() {
- return None;
+ #[cfg(CONFIG_PER_VMA_LOCK)]
+ {
+ // SAFETY: Calling `bindings::lock_vma_under_rcu` is always okay given an mm where
+ // `mm_users` is non-zero.
+ let vma = unsafe { bindings::lock_vma_under_rcu(self.as_raw(), vma_addr) };
+ if !vma.is_null() {
+ return Some(VmaReadGuard {
+ // SAFETY: If `lock_vma_under_rcu` returns a non-null ptr, then it points at a
+ // valid vma. The vma is stable for as long as the vma read lock is held.
+ vma: unsafe { VmaRef::from_raw(vma) },
+ _nts: NotThreadSafe,
+ });
+ }
}
- Some(VmaReadGuard {
- // SAFETY: If `lock_vma_under_rcu` returns a non-null ptr, then it points at a
- // valid vma. The vma is stable for as long as the vma read lock is held.
- vma: unsafe { VmaRef::from_raw(vma) },
- _nts: NotThreadSafe,
- })
- }
- /// Find the VMA covering 'address' and read-lock it.
- ///
- /// The fast path does not take mmap_lock. Waits for writers to finish if the
- /// VMA is being modified by taking mmap_lock.
- /// Use when mmap_lock is not held, otherwise use vma_start_read_locked().
- /// Nothing prevents VMAs being unmapped/mapped before or after the VMA is
- /// looked up, if a stronger guarantee is required, take an mmap_lock.
- ///
- /// Return: If a VMA exists which spans @address, return that VMA, read-locked.
- /// If no VMA is mapped there or, very unlikely, a reference count overflow
- /// occurred, return NULL.
- #[inline]
- pub fn vma_start_read_unlocked(&self, vma_addr: usize) -> Option<VmaReadGuard<'_>> {
- // SAFETY: We may invoke `vma_start_read_unlocked` because we know this `mm` has non-zero
- // `mm_users`.
- let vma = unsafe { bindings::vma_start_read_unlocked(self.as_raw(), vma_addr) };
- if vma.is_null() {
- return None;
- }
- // INVARIANT: We just acquired the VMA read lock.
- Some(VmaReadGuard {
- // SAFETY: If `vma_start_read_unlocked` returns a non-null ptr, then it points at a
- // valid vma. The vma is stable for as long as the vma read lock is held.
- vma: unsafe { VmaRef::from_raw(vma) },
- _nts: NotThreadSafe,
- })
+ // Silence warnings about unused variables.
+ #[cfg(not(CONFIG_PER_VMA_LOCK))]
+ let _ = vma_addr;
+
+ None
}
/// Lock the mmap read lock.
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index 27dc88bdf7a0..d1123ebbfab9 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -52,11 +52,6 @@ module_param(detect_node_addresses, bool, 0600);
static struct damon_ctx *ctxs[2];
-/*
- * Use phys_addr_t instead of damon_addr_range (unsigned long) for physical
- * addresses. On 32-bit systems with more than 4GB memory, phys_addr_t will
- * be 64-bit while unsigned long is 32-bit.
- */
struct region_range {
phys_addr_t start;
phys_addr_t end;
@@ -161,6 +156,9 @@ static struct damon_ctx *damon_sample_mtier_build_ctx(bool promote)
if (!scheme)
goto free_out;
damon_set_schemes(ctx, &scheme, 1);
+ /* zero target value causes division by zero in damos_quota_store() */
+ if (!node0_mem_used_bp || !node0_mem_free_bp)
+ goto free_out;
quota_goal = damos_new_quota_goal(
promote ? DAMOS_QUOTA_NODE_MEM_USED_BP :
DAMOS_QUOTA_NODE_MEM_FREE_BP,
diff --git a/samples/damon/prcl.c b/samples/damon/prcl.c
index 83ddf12811d5..842099bd6228 100644
--- a/samples/damon/prcl.c
+++ b/samples/damon/prcl.c
@@ -32,6 +32,7 @@ module_param_cb(enabled, &enabled_param_ops, &enabled, 0600);
MODULE_PARM_DESC(enabled, "Enable or disable DAMON_SAMPLE_PRCL");
static struct damon_ctx *ctx;
+static struct pid *target_pidp;
static int damon_sample_prcl_repeat_call_fn(void *data)
{
@@ -78,10 +79,12 @@ static int damon_sample_prcl_start(void)
return -ENOMEM;
}
damon_add_target(ctx, target);
- if (damon_set_target_pid(target, target_pid)) {
+ target_pidp = find_get_pid(target_pid);
+ if (!target_pidp) {
damon_destroy_ctx(ctx);
return -EINVAL;
}
+ target->pid = target_pidp;
scheme = damon_new_scheme(
&(struct damos_access_pattern) {
diff --git a/samples/damon/wsse.c b/samples/damon/wsse.c
index 53944aea8428..37fd5da20158 100644
--- a/samples/damon/wsse.c
+++ b/samples/damon/wsse.c
@@ -33,6 +33,7 @@ module_param_cb(enabled, &enabled_param_ops, &enabled, 0600);
MODULE_PARM_DESC(enabled, "Enable or disable DAMON_SAMPLE_WSSE");
static struct damon_ctx *ctx;
+static struct pid *target_pidp;
static int damon_sample_wsse_repeat_call_fn(void *data)
{
@@ -78,10 +79,12 @@ static int damon_sample_wsse_start(void)
return -ENOMEM;
}
damon_add_target(ctx, target);
- if (damon_set_target_pid(target, target_pid)) {
+ target_pidp = find_get_pid(target_pid);
+ if (!target_pidp) {
damon_destroy_ctx(ctx);
return -EINVAL;
}
+ target->pid = target_pidp;
err = damon_start(&ctx, 1, true);
if (err) {
diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py
index 193a88d763ab..dffadccbb01d 100644
--- a/scripts/gdb/linux/mm.py
+++ b/scripts/gdb/linux/mm.py
@@ -56,7 +56,7 @@ class x86_page_ops():
self.MAX_PHYSMEM_BITS = 46
self.SECTION_SIZE_BITS = 27
- self.MAX_PAGE_ORDER = 10
+ self.MAX_ORDER = 10
self.SECTIONS_SHIFT = self.MAX_PHYSMEM_BITS - self.SECTION_SIZE_BITS
self.NR_MEM_SECTIONS = 1 << self.SECTIONS_SHIFT
@@ -70,6 +70,7 @@ class x86_page_ops():
self.SECTIONS_PER_ROOT = 1
self.NR_SECTION_ROOTS = DIV_ROUND_UP(self.NR_MEM_SECTIONS, self.SECTIONS_PER_ROOT)
+ self.SECTION_ROOT_MASK = self.SECTIONS_PER_ROOT - 1
try:
self.SECTION_HAS_MEM_MAP = 1 << int(gdb.parse_and_eval('SECTION_HAS_MEM_MAP_BIT'))
@@ -99,7 +100,7 @@ class x86_page_ops():
def __nr_to_section(self, nr):
root = self.SECTION_NR_TO_ROOT(nr)
mem_section = gdb.parse_and_eval("mem_section")
- return mem_section[root][nr % self.SECTIONS_PER_ROOT]
+ return mem_section[root][nr & self.SECTION_ROOT_MASK]
def pfn_to_section_nr(self, pfn):
return pfn >> self.PFN_SECTION_SHIFT
@@ -232,11 +233,11 @@ class aarch64_page_ops():
self.SECTIONS_SHIFT = self.MAX_PHYSMEM_BITS - self.SECTION_SIZE_BITS
if str(constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER).isdigit():
- self.MAX_PAGE_ORDER = constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER
+ self.MAX_ORDER = constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER
else:
- self.MAX_PAGE_ORDER = 10
+ self.MAX_ORDER = 10
- self.MAX_ORDER_NR_PAGES = 1 << (self.MAX_PAGE_ORDER)
+ self.MAX_ORDER_NR_PAGES = 1 << (self.MAX_ORDER)
self.PFN_SECTION_SHIFT = self.SECTION_SIZE_BITS - self.PAGE_SHIFT
self.NR_MEM_SECTIONS = 1 << self.SECTIONS_SHIFT
self.PAGES_PER_SECTION = 1 << self.PFN_SECTION_SHIFT
@@ -248,6 +249,7 @@ class aarch64_page_ops():
self.SECTIONS_PER_ROOT = 1
self.NR_SECTION_ROOTS = DIV_ROUND_UP(self.NR_MEM_SECTIONS, self.SECTIONS_PER_ROOT)
+ self.SECTION_ROOT_MASK = self.SECTIONS_PER_ROOT - 1
self.SUBSECTION_SHIFT = 21
self.SEBSECTION_SIZE = 1 << self.SUBSECTION_SHIFT
self.PFN_SUBSECTION_SHIFT = self.SUBSECTION_SHIFT - self.PAGE_SHIFT
@@ -302,7 +304,7 @@ class aarch64_page_ops():
def __nr_to_section(self, nr):
root = self.SECTION_NR_TO_ROOT(nr)
mem_section = gdb.parse_and_eval("mem_section")
- return mem_section[root][nr % self.SECTIONS_PER_ROOT]
+ return mem_section[root][nr & self.SECTION_ROOT_MASK]
def pfn_to_section_nr(self, pfn):
return pfn >> self.PFN_SECTION_SHIFT
diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c
index 1d02d57f4c48..400a2f928de3 100644
--- a/security/landlock/syscalls.c
+++ b/security/landlock/syscalls.c
@@ -204,7 +204,7 @@ const int landlock_abi_version = 11;
* scoped;
* - %E2BIG: @attr or @size inconsistencies;
* - %EFAULT: @attr or @size inconsistencies;
- * - %ENOMSG: empty &landlock_ruleset_attr.handled_access_fs.
+ * - %ENOMSG: empty handled_access_fs, handled_access_net, and scoped fields.
*
* .. kernel-doc:: include/uapi/linux/landlock.h
* :identifiers: landlock_create_ruleset_flags
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index a9401d6c2e5f..560a82c6d682 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -1149,8 +1149,11 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid,
u32 denied;
struct avc_node *node;
- if (WARN_ON(!requested))
+ if (WARN_ON(!requested)) {
+ /* Provide a deny-all, audit-all decision to the caller. */
+ *avd = (struct av_decision){ .auditdeny = 0xffffffff };
return -EACCES;
+ }
rcu_read_lock();
node = avc_lookup(ssid, tsid, tclass);
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 0e8ff953f502..f2394cf6646e 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1673,26 +1673,32 @@ static int cred_has_capability(const struct cred *cred,
return rc;
}
-/* Check whether a task has a particular permission to an inode.
- The 'adp' parameter is optional and allows other audit
- data to be passed (e.g. the dentry). */
-static int inode_has_perm(const struct cred *cred,
- struct inode *inode,
- u32 perms,
- struct common_audit_data *adp)
+/*
+ * Check whether a SID has a particular permission to an inode. The 'adp'
+ * parameter is optional and allows other audit data to be passed (e.g. the
+ * dentry).
+ */
+static int inode_sid_has_perm(u32 sid, struct inode *inode, u32 perms,
+ struct common_audit_data *adp)
{
struct inode_security_struct *isec;
- u32 sid;
if (unlikely(IS_PRIVATE(inode)))
return 0;
- sid = cred_sid(cred);
isec = selinux_inode(inode);
return avc_has_perm(sid, isec->sid, isec->sclass, perms, adp);
}
+static int inode_has_perm(const struct cred *cred,
+ struct inode *inode,
+ u32 perms,
+ struct common_audit_data *adp)
+{
+ return inode_sid_has_perm(cred_sid(cred), inode, perms, adp);
+}
+
/* Same as inode_has_perm, but pass explicit audit data containing
the dentry to help the auditing code to more easily generate the
pathname if needed. */
@@ -3879,17 +3885,74 @@ static int selinux_file_alloc_security(struct file *file)
return 0;
}
+static inline u32 selinux_file_user_sid(const struct file *file)
+{
+ if (unlikely(file->f_mode & FMODE_BACKING))
+ return selinux_backing_file(file)->uf_sid;
+ return selinux_file(file)->sid;
+}
+
static int selinux_backing_file_alloc(struct file *backing_file,
const struct file *user_file)
{
struct backing_file_security_struct *bfsec;
+ const struct backing_file_security_struct *ubfsec;
+ struct backing_file_security_layer *layer;
+ u32 i;
bfsec = selinux_backing_file(backing_file);
- bfsec->uf_sid = selinux_file(user_file)->sid;
+ bfsec->uf_sid = selinux_file_user_sid(user_file);
+ if (!(user_file->f_mode & FMODE_BACKING))
+ return 0;
+
+ ubfsec = selinux_backing_file(user_file);
+ /* a wrapped count would make kmalloc_array() return ZERO_SIZE_PTR */
+ if (unlikely(ubfsec->layer_count == U32_MAX))
+ return -EOVERFLOW;
+
+ /*
+ * The final VMA only retains the lowest backing file, so record the
+ * whole chain here rather than in the mmap hook, where concurrent
+ * mappings would have to be serialized. Size it dynamically: erofs
+ * inode sharing adds a backing file without bumping s_stack_depth.
+ */
+ bfsec->layers = kmalloc_array(ubfsec->layer_count + 1,
+ sizeof(*bfsec->layers), GFP_KERNEL);
+ if (!bfsec->layers)
+ return -ENOMEM;
+
+ for (i = 0; i < ubfsec->layer_count; i++) {
+ layer = &bfsec->layers[i];
+ *layer = ubfsec->layers[i];
+ path_get(&layer->path);
+ }
+
+ /* f_path, not file_user_path(): this layer, not the top-level file */
+ layer = &bfsec->layers[i];
+ layer->path = user_file->f_path;
+ layer->mounter_sid = cred_sid(user_file->f_cred);
+ layer->fd_sid = selinux_file(user_file)->sid;
+ path_get(&layer->path);
+ bfsec->layer_count = ubfsec->layer_count + 1;
return 0;
}
+static void selinux_backing_file_free(struct file *backing_file)
+{
+ struct backing_file_security_struct *bfsec;
+
+ /* security_backing_file_free() may be called twice after an error */
+ if (!backing_file_security(backing_file))
+ return;
+
+ bfsec = selinux_backing_file(backing_file);
+ while (bfsec->layer_count)
+ path_put(&bfsec->layers[--bfsec->layer_count].path);
+ kfree(bfsec->layers);
+ bfsec->layers = NULL;
+}
+
/*
* Check whether a task has the ioctl permission and cmd
* operation to an inode.
@@ -4007,6 +4070,53 @@ static int selinux_file_ioctl_compat(struct file *file, unsigned int cmd,
static int default_noexec __ro_after_init;
+static u32 file_map_prot_to_av(unsigned long prot, bool shared)
+{
+ u32 av = FILE__READ;
+
+ if (shared && (prot & PROT_WRITE))
+ av |= FILE__WRITE;
+ if (prot & PROT_EXEC)
+ av |= FILE__EXECUTE;
+
+ return av;
+}
+
+static int backing_mounters_has_perm(const struct file *file, u32 av)
+{
+ const struct backing_file_security_struct *bfsec;
+ const struct backing_file_security_layer *layer;
+ struct common_audit_data ad;
+ struct inode *inode;
+ u32 i;
+ int rc;
+
+ if (WARN_ON_ONCE(!(file->f_mode & FMODE_BACKING)))
+ return -EIO;
+
+ bfsec = selinux_backing_file(file);
+ for (i = 0; i < bfsec->layer_count; i++) {
+ layer = &bfsec->layers[i];
+ inode = d_inode(layer->path.dentry);
+
+ ad.type = LSM_AUDIT_DATA_PATH;
+ ad.u.path = layer->path;
+
+ if (layer->mounter_sid != layer->fd_sid) {
+ rc = avc_has_perm(layer->mounter_sid, layer->fd_sid,
+ SECCLASS_FD, FD__USE, &ad);
+ if (rc)
+ return rc;
+ }
+
+ rc = inode_sid_has_perm(layer->mounter_sid, inode, av, &ad);
+ if (rc)
+ return rc;
+ }
+
+ return 0;
+}
+
static int __file_map_prot_check(const struct file *file, unsigned long prot,
bool shared, bool mounter_check,
bool bf_user_file)
@@ -4040,14 +4150,10 @@ static int __file_map_prot_check(const struct file *file, unsigned long prot,
if (file) {
const struct cred *cred = mounter_check ?
file->f_cred : current_cred();
- /* "read" always possible, "write" only if shared */
- u32 av = FILE__READ;
- if (shared && prot_write)
- av |= FILE__WRITE;
- if (prot_exec)
- av |= FILE__EXECUTE;
- return __file_has_perm(cred, file, av, bf_user_file);
+ return __file_has_perm(cred, file,
+ file_map_prot_to_av(prot, shared),
+ bf_user_file);
}
return 0;
@@ -4142,6 +4248,7 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
int rc;
const struct cred *cred = current_cred();
u32 sid = cred_sid(cred);
+ u32 av;
const struct file *file = vma->vm_file;
bool backing_file;
bool shared = vma->vm_flags & VM_SHARED;
@@ -4185,6 +4292,10 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
if (rc)
return rc;
if (backing_file) {
+ rc = backing_mounters_has_perm(file,
+ FILE__EXECMOD);
+ if (rc)
+ return rc;
rc = file_has_perm(file->f_cred, file,
FILE__EXECMOD);
if (rc)
@@ -4197,6 +4308,10 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
if (rc)
return rc;
if (backing_file) {
+ av = file_map_prot_to_av(prot, shared);
+ rc = backing_mounters_has_perm(file, av);
+ if (rc)
+ return rc;
rc = file_map_prot_check(file, prot, shared, true);
if (rc)
return rc;
@@ -7656,6 +7771,7 @@ static struct security_hook_list selinux_hooks[] __ro_after_init = {
LSM_HOOK_INIT(file_permission, selinux_file_permission),
LSM_HOOK_INIT(file_alloc_security, selinux_file_alloc_security),
LSM_HOOK_INIT(backing_file_alloc, selinux_backing_file_alloc),
+ LSM_HOOK_INIT(backing_file_free, selinux_backing_file_free),
LSM_HOOK_INIT(file_ioctl, selinux_file_ioctl),
LSM_HOOK_INIT(file_ioctl_compat, selinux_file_ioctl_compat),
LSM_HOOK_INIT(mmap_file, selinux_mmap_file),
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h
index 3c0a16ec978b..2f21568251ff 100644
--- a/security/selinux/include/objsec.h
+++ b/security/selinux/include/objsec.h
@@ -86,8 +86,16 @@ struct file_security_struct {
u32 pseqno; /* Policy seqno at the time of file open */
};
+struct backing_file_security_layer {
+ struct path path; /* this layer's real path */
+ u32 mounter_sid; /* SID of the mounter that opened it */
+ u32 fd_sid; /* SID of its open file description */
+};
+
struct backing_file_security_struct {
- u32 uf_sid; /* associated user file fsec->sid */
+ u32 uf_sid; /* top-level user file fsec->sid */
+ u32 layer_count; /* number of intermediate backing files */
+ struct backing_file_security_layer *layers;
};
struct superblock_security_struct {
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index f60f92e2ac34..5260751ee67e 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -246,11 +246,6 @@ static int sel_mmap_handle_status(struct file *filp,
/* only allows one page from the head */
if (vma->vm_pgoff > 0 || size != PAGE_SIZE)
return -EIO;
- /* disallow writable mapping */
- if (vma->vm_flags & VM_WRITE)
- return -EPERM;
- /* disallow mprotect() turns it into writable */
- vm_flags_clear(vma, VM_MAYWRITE);
return remap_pfn_range(vma, vma->vm_start,
page_to_pfn(status),
@@ -1573,7 +1568,8 @@ static inline u64 sel_class_to_ino(u16 class)
static inline u16 sel_ino_to_class(u64 ino)
{
- return (ino & SEL_INO_MASK) / (SEL_VEC_MAX + 1);
+ u32 ino_masked = ino & SEL_INO_MASK;
+ return ino_masked / (SEL_VEC_MAX + 1);
}
static inline u64 sel_perm_to_ino(u16 class, u32 perm)
@@ -1583,7 +1579,8 @@ static inline u64 sel_perm_to_ino(u16 class, u32 perm)
static inline u32 sel_ino_to_perm(u64 ino)
{
- return (ino & SEL_INO_MASK) % (SEL_VEC_MAX + 1);
+ u32 ino_masked = ino & SEL_INO_MASK;
+ return ino_masked % (SEL_VEC_MAX + 1);
}
static ssize_t sel_read_class(struct file *file, char __user *buf,
@@ -1817,6 +1814,17 @@ static struct dentry *sel_make_swapover_dir(struct super_block *sb, u64 *ino)
#define NULL_FILE_NAME "null"
+static void sel_mark_immutable(struct dentry *root, const char *name)
+{
+ struct qstr q = QSTR(name);
+ struct dentry *dentry = try_lookup_noperm(&q, root);
+
+ if (!IS_ERR_OR_NULL(dentry)) {
+ d_inode(dentry)->i_flags |= S_IMMUTABLE;
+ dput(dentry);
+ }
+}
+
static int sel_fill_super(struct super_block *sb, struct fs_context *fc)
{
struct selinux_fs_info *fsi;
@@ -1856,6 +1864,9 @@ static int sel_fill_super(struct super_block *sb, struct fs_context *fc)
if (ret)
goto err;
+ sel_mark_immutable(sb->s_root, "status");
+ sel_mark_immutable(sb->s_root, "policy");
+
fsi = sb->s_fs_info;
fsi->bool_dir = sel_make_dir(sb->s_root, BOOL_DIR_NAME, &fsi->last_ino);
if (IS_ERR(fsi->bool_dir)) {
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 1aece46c8b06..6586e07431c3 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -376,7 +376,7 @@ delete_seq_queue(int queue)
/*
- * free device informations - private_free callback of port
+ * free device information - private_free callback of port
*/
static void
free_devinfo(void *private)
diff --git a/sound/firewire/bebob/bebob_hwdep.c b/sound/firewire/bebob/bebob_hwdep.c
index 216d1fceb6e7..1c523525fad2 100644
--- a/sound/firewire/bebob/bebob_hwdep.c
+++ b/sound/firewire/bebob/bebob_hwdep.c
@@ -8,7 +8,7 @@
/*
* This codes give three functionality.
*
- * 1.get firewire node infomation
+ * 1.get firewire node information
* 2.get notification about starting/stopping stream
* 3.lock/unlock stream
*/
diff --git a/sound/hda/codecs/hdmi/hdmi.c b/sound/hda/codecs/hdmi/hdmi.c
index 1e7a05c87733..a8aac0b36c73 100644
--- a/sound/hda/codecs/hdmi/hdmi.c
+++ b/sound/hda/codecs/hdmi/hdmi.c
@@ -1671,7 +1671,7 @@ int snd_hda_hdmi_generic_pcm_prepare(struct hda_pcm_stream *hinfo,
* After S3, the audio driver restores pin:cvt selections
* but this can happen before gfx is ready and such selection
* is overlooked by HW. Thus multiple pins can share a same
- * default convertor and mute control will affect each other,
+ * default converter and mute control will affect each other,
* which can cause a resumed audio playback become silent
* after S3.
*/
diff --git a/sound/hda/codecs/realtek/alc882.c b/sound/hda/codecs/realtek/alc882.c
index fd466b6985f0..800c3d6f5134 100644
--- a/sound/hda/codecs/realtek/alc882.c
+++ b/sound/hda/codecs/realtek/alc882.c
@@ -372,7 +372,7 @@ static const struct hda_fixup alc882_fixups[] = {
[ALC883_FIXUP_ACER_EAPD] = {
.type = HDA_FIXUP_VERBS,
.v.verbs = (const struct hda_verb[]) {
- /* eanable EAPD on Acer laptops */
+ /* enable EAPD on Acer laptops */
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
{ 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
{ }
diff --git a/sound/hda/codecs/sigmatel.c b/sound/hda/codecs/sigmatel.c
index ee3bd21adc36..9a8ba43667f7 100644
--- a/sound/hda/codecs/sigmatel.c
+++ b/sound/hda/codecs/sigmatel.c
@@ -361,7 +361,7 @@ static unsigned int stac_vref_led_power_filter(struct hda_codec *codec,
return snd_hda_gen_path_power_filter(codec, nid, power_state);
}
-/* update mute-LED accoring to the master switch */
+/* update mute-LED according to the master switch */
static void stac_update_led_status(struct hda_codec *codec, bool muted)
{
struct sigmatel_spec *spec = codec->spec;
@@ -1710,7 +1710,7 @@ static const struct hda_pintbl ref92hd73xx_pin_configs[] = {
{ 0x11, 0x01014030 },
// CD in
{ 0x12, 0x02319040 },
- // Digial Mic ins
+ // Digital Mic ins
{ 0x13, 0x90a000f0 },
{ 0x14, 0x90a000f0 },
// Digital outs
@@ -3817,7 +3817,7 @@ static const struct hda_pintbl dell_3st_pin_configs[] = {
static void stac927x_fixup_ref_no_jd(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
- /* no jack detecion for ref-no-jd model */
+ /* no jack detection for ref-no-jd model */
if (action == HDA_FIXUP_ACT_PRE_PROBE)
codec->no_jack_detect = 1;
}
diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c
index 5d9b53bd64ea..c61fd79c48f3 100644
--- a/sound/hda/common/codec.c
+++ b/sound/hda/common/codec.c
@@ -3774,7 +3774,7 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec,
EXPORT_SYMBOL_GPL(snd_hda_multi_out_analog_open);
/**
- * snd_hda_multi_out_analog_prepare - Preapre the analog outputs.
+ * snd_hda_multi_out_analog_prepare - Prepare the analog outputs.
* @codec: the HDA codec
* @mout: hda_multi_out object
* @stream_tag: stream tag to assign
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c
index 6ef5fffda8d7..9405d985a87d 100644
--- a/sound/i2c/other/ak4113.c
+++ b/sound/i2c/other/ak4113.c
@@ -130,7 +130,7 @@ void snd_ak4113_reinit(struct ak4113 *chip)
scoped_guard(mutex, &chip->reinit_mutex) {
ak4113_init_regs(chip);
}
- /* bring up statistics / event queing */
+ /* bring up statistics / event queuing */
if (atomic_dec_and_test(&chip->wq_processing))
schedule_delayed_work(&chip->work, HZ / 10);
}
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index 71efb29b6c7c..4c3dbbf8c316 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -135,7 +135,7 @@ void snd_ak4114_reinit(struct ak4114 *chip)
scoped_guard(mutex, &chip->reinit_mutex) {
ak4114_init_regs(chip);
}
- /* bring up statistics / event queing */
+ /* bring up statistics / event queuing */
if (atomic_dec_and_test(&chip->wq_processing))
schedule_delayed_work(&chip->work, HZ / 10);
}
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index 9dd36b82a6ac..e7410f0f8660 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(snd_akm4xxx_reset);
* Volume conversion table for non-linear volumes
* from -63.5dB (mute) to 0dB step 0.5dB
*
- * Used for AK4524/AK4620 input/ouput attenuation, AK4528, and
+ * Used for AK4524/AK4620 input/output attenuation, AK4528, and
* AK5365 input attenuation
*/
static const unsigned char vol_cvt_datt[128] = {
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index abaa3ed3ab5c..8a6db40ff893 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -378,7 +378,7 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip,
*/
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(21), 0x82, 0xff);
/*
- * This bit sets OPTI931 to automaticaly select FM
+ * This bit sets OPTI931 to automatically select FM
* or digital input signal.
*/
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(26), 0x01, 0x01);
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 2beb6a0dc3b7..84f265335cf9 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -375,7 +375,7 @@ static void hal2_setup_dac(struct snd_hal2 *hal2)
hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECTX);
/* Setup the HAL2 for playback */
hal2_set_dac_rate(hal2);
- /* Set endianess */
+ /* Set endianness */
hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECTX);
/* Set DMA bus */
hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
@@ -400,7 +400,7 @@ static void hal2_setup_adc(struct snd_hal2 *hal2)
hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECR);
/* Setup the HAL2 for record */
hal2_set_adc_rate(hal2);
- /* Set endianess */
+ /* Set endianness */
hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECR);
/* Set DMA bus */
hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 0bb65be021d9..207ce083593f 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2960,7 +2960,7 @@ int snd_ac97_tune_hardware(struct snd_ac97 *ac97,
{
int result;
- /* quirk overriden? */
+ /* quirk overridden? */
if (override && strcmp(override, "-1") && strcmp(override, "default")) {
result = apply_quirk_str(ac97, override);
if (result < 0)
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 64cc39dd2008..8577a2e0510c 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -430,7 +430,7 @@ static int patch_yamaha_ymf753(struct snd_ac97 * ac97)
/* Patch for Yamaha YMF753, Copyright (c) by David Shust, dshust@shustring.com.
This chip has nonstandard and extended behaviour with regard to its S/PDIF output.
The AC'97 spec states that the S/PDIF signal is to be output at pin 48.
- The YMF753 will ouput the S/PDIF signal to pin 43, 47 (EAPD), or 48.
+ The YMF753 will output the S/PDIF signal to pin 43, 47 (EAPD), or 48.
By default, no output pin is selected, and the S/PDIF signal is not output.
There is also a bit to mute S/PDIF output in a vendor-specific register.
*/
diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h
index 6cbb2bc4a048..f97a0303da3e 100644
--- a/sound/pci/au88x0/au88x0.h
+++ b/sound/pci/au88x0/au88x0.h
@@ -28,7 +28,7 @@
/* Vortex MPU401 defines. */
#define MIDI_CLOCK_DIV 0x61
-/* Standart MPU401 defines. */
+/* Standard MPU401 defines. */
#define MPU401_RESET 0xff
#define MPU401_ENTER_UART 0x3f
#define MPU401_ACK 0xfe
diff --git a/sound/pci/au88x0/au88x0_mpu401.c b/sound/pci/au88x0/au88x0_mpu401.c
index 164f6b7039ab..dff4bf80ab96 100644
--- a/sound/pci/au88x0/au88x0_mpu401.c
+++ b/sound/pci/au88x0/au88x0_mpu401.c
@@ -22,7 +22,7 @@
/* Vortex MPU401 defines. */
#define MIDI_CLOCK_DIV 0x61
-/* Standart MPU401 defines. */
+/* Standard MPU401 defines. */
#define MPU401_RESET 0xff
#define MPU401_ENTER_UART 0x3f
#define MPU401_ACK 0xfe
diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c
index c84f1a45194f..6857a0ec2924 100644
--- a/sound/pci/aw2/aw2-saa7146.c
+++ b/sound/pci/aw2/aw2-saa7146.c
@@ -147,7 +147,7 @@ void snd_aw2_saa7146_pcm_init_playback(struct snd_aw2_saa7146 *chip,
unsigned long dw_page, dw_limit;
/* Configure DMA for substream
- Configuration informations: ALSA has allocated continuous memory
+ Configuration information: ALSA has allocated continuous memory
pages. So we don't need to use MMU of saa7146.
*/
@@ -204,7 +204,7 @@ void snd_aw2_saa7146_pcm_init_capture(struct snd_aw2_saa7146 *chip,
unsigned long dw_page, dw_limit;
/* Configure DMA for substream
- Configuration informations: ALSA has allocated continuous memory
+ Configuration information: ALSA has allocated continuous memory
pages. So we don't need to use MMU of saa7146.
*/
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index f51f4bb63766..27ceda6278c5 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -324,7 +324,7 @@ MODULE_PARM_DESC(dual_codec, "Secondary Codec ID (0 = disabled).");
#define BA0_SSCR_XLPSRC (1<<8) /* External SRC Loopback Mode */
#define BA0_SSCR_LPSRC (1<<7) /* SRC Loopback Mode */
#define BA0_SSCR_CDTX (1<<5) /* CD Transfer Data */
-#define BA0_SSCR_HVC (1<<3) /* Harware Volume Control Enable */
+#define BA0_SSCR_HVC (1<<3) /* Hardware Volume Control Enable */
#define BA0_FMLVC 0x0754 /* FM Synthesis Left Volume Control */
#define BA0_FMRVC 0x0758 /* FM Synthesis Right Volume Control */
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index f6db08b75649..797a5f09cade 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -315,7 +315,7 @@ int snd_cs46xx_download(struct snd_cs46xx *chip,
dst = chip->region.idx[bank+1].remap_addr + offset;
len /= sizeof(u32);
- /* writel already converts 32-bit value to right endianess */
+ /* writel already converts 32-bit value to right endianness */
while (len-- > 0) {
writel(*src++, dst);
dst += sizeof(u32);
@@ -474,7 +474,7 @@ int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip,
dst = chip->region.idx[bank+1].remap_addr + offset;
len /= sizeof(u32);
- /* writel already converts 32-bit value to right endianess */
+ /* writel already converts 32-bit value to right endianness */
while (len-- > 0) {
writel(0, dst);
dst += sizeof(u32);
@@ -3039,7 +3039,7 @@ static int snd_cs46xx_chip_init(struct snd_cs46xx *chip)
#endif
/*
- * Assert the vaid frame signal so that we can start sending commands
+ * Assert the valid frame signal so that we can start sending commands
* to the AC97 codec.
*/
snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN);
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index fd19365026b4..71eee5cb478f 100644
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c
@@ -160,15 +160,15 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor *
{
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
- /* check integrety */
+ /* check integrity */
if (snd_BUG_ON(scb->index < 0 ||
scb->index >= ins->nscb ||
(ins->scbs + scb->index) != scb))
return;
#if 0
- /* can't remove a SCB with childs before
- removing childs first */
+ /* can't remove a SCB with children before
+ removing children first */
if (snd_BUG_ON(scb->sub_list_ptr != ins->the_null_scb ||
scb->next_scb_ptr != ins->the_null_scb))
goto _end;
@@ -1656,7 +1656,7 @@ int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip)
return -EBUSY;
}
- /* check integrety */
+ /* check integrity */
if (snd_BUG_ON(!ins->asynch_tx_scb))
return -EINVAL;
if (snd_BUG_ON(!ins->spdif_pcm_input_scb))
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 214d68657707..8b4637231deb 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -270,7 +270,7 @@ static int pcm_open(struct snd_pcm_substream *substream,
return -ENOMEM;
pipe->index = -1; /* Not configured yet */
- /* Set up hw capabilities and contraints */
+ /* Set up hw capabilities and constraints */
memcpy(&pipe->hw, &pcm_hardware_skel, sizeof(struct snd_pcm_hardware));
dev_dbg(chip->card->dev, "max_channels=%d\n", max_channels);
pipe->constr.list = channels_list;
@@ -1720,7 +1720,7 @@ static const struct snd_kcontrol_new snd_echo_vumeters = {
-/*** Channels info - it exports informations about the number of channels ***/
+/*** Channels info - it exports information about the number of channels ***/
static int snd_echo_channels_info_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h
index 7a5744bf3155..ac4507b7cc78 100644
--- a/sound/pci/echoaudio/echoaudio.h
+++ b/sound/pci/echoaudio/echoaudio.h
@@ -394,8 +394,8 @@ struct echoaudio {
u16 digital_modes; /* Bitmask of supported modes
* (see ECHOCAPS_HAS_DIGITAL_MODE_*) */
- u16 input_clock_types; /* Suppoted input clock types */
- u16 output_clock_types; /* Suppoted output clock types -
+ u16 input_clock_types; /* Supported input clock types */
+ u16 output_clock_types; /* Supported output clock types -
* Layla20 only */
u16 device_id, subdevice_id;
u16 *dsp_code; /* Current DSP code loaded,
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 9909f1067871..ae265dd19333 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -364,7 +364,7 @@ int lx_dsp_get_mac(struct lx6464es *chip)
macmsb = lx_dsp_reg_read(chip, eReg_ADMACESMSB) & 0x00FFFFFF;
maclsb = lx_dsp_reg_read(chip, eReg_ADMACESLSB) & 0x00FFFFFF;
- /* todo: endianess handling */
+ /* todo: endianness handling */
chip->mac_address[5] = ((u8 *)(&maclsb))[0];
chip->mac_address[4] = ((u8 *)(&maclsb))[1];
chip->mac_address[3] = ((u8 *)(&maclsb))[2];
diff --git a/sound/pci/lx6464es/lx_defs.h b/sound/pci/lx6464es/lx_defs.h
index eca5367ba561..89e433d3f7a2 100644
--- a/sound/pci/lx6464es/lx_defs.h
+++ b/sound/pci/lx6464es/lx_defs.h
@@ -315,7 +315,7 @@ enum stream_flags {
#define ED_XILINX_ERROR (ED_RT | 0x07)
#define ED_COBRANET_ITF_NOT_RESPONDING (ED_RT | 0x08)
-/* Complete BOARD error code for the invaid standard object class */
+/* Complete BOARD error code for the invalid standard object class */
#define EB_ISO (ERROR_VALUE | E_SOURCE_BOARD | \
E_CLASS_INVALID_STD_OBJECT)
#define EB_INVALID_EFFECT (EB_ISO | 0x00)
diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c
index b3b9ab4f303e..f855d3bfad4b 100644
--- a/sound/pci/pcxhr/pcxhr_core.c
+++ b/sound/pci/pcxhr/pcxhr_core.c
@@ -802,7 +802,7 @@ static int pcxhr_prepair_pipe_start(struct pcxhr_mgr *mgr,
err);
return err;
}
- /* if the pipe couldn't be prepaired for start,
+ /* if the pipe couldn't be prepared for start,
* retry it later
*/
if (rmh.stat[0] == 0)
@@ -913,7 +913,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask,
if (err)
return err;
if (state == 0)
- break; /* success, all pipes prepaired */
+ break; /* success, all pipes prepared */
mdelay(1); /* wait 1 millisecond and retry */
}
} else {
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 99c00e46ce23..697fece744e7 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -264,7 +264,7 @@ MODULE_PARM_DESC(opl3_port, "OPL3 port # for Riptide driver.");
#define SEND_SI2S(p,b) sendcmd(p,PARM,SI2S,WORD2(b),RET(0))
#define EOB_STATUS 0x80000000 /* status flags : block boundary */
-#define EOS_STATUS 0x40000000 /* : stoppped */
+#define EOS_STATUS 0x40000000 /* : stopped */
#define EOC_STATUS 0x20000000 /* : stream end */
#define ERR_STATUS 0x10000000
#define EMPTY_STATUS 0x08000000
@@ -453,7 +453,7 @@ struct snd_riptide {
int in_suspend;
};
-struct sgd { /* scatter gather desriptor */
+struct sgd { /* scatter gather descriptor */
__le32 dwNextLink;
__le32 dwSegPtrPhys;
__le32 dwSegLen;
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c
index 454a30a2c07e..1d5390621908 100644
--- a/sound/pci/rme32.c
+++ b/sound/pci/rme32.c
@@ -8,7 +8,7 @@
* Thanks to : Anders Torger <torger@ludd.luth.se>,
* Henk Hesselink <henk@anda.nl>
* for writing the digi96-driver
- * and RME for all informations.
+ * and RME for all information.
*
* ****************************************************************************
*
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 31cc2d91c8d2..0ade73057731 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -3664,7 +3664,7 @@ snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
snd_iprintf(buffer, "\n");
- /* Informations about H9632 specific controls */
+ /* Information about H9632 specific controls */
if (hdsp->io_type == H9632) {
char *tmp;
diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c
index 81f6348191dc..4ed0e7d68322 100644
--- a/sound/pci/trident/trident_memory.c
+++ b/sound/pci/trident/trident_memory.c
@@ -27,7 +27,7 @@
#if PAGE_SIZE == 4096
/* page size == SNDRV_TRIDENT_PAGE_SIZE */
#define ALIGN_PAGE_SIZE PAGE_SIZE /* minimum page size for allocation */
-#define MAX_ALIGN_PAGES SNDRV_TRIDENT_MAX_PAGES /* maxmium aligned pages */
+#define MAX_ALIGN_PAGES SNDRV_TRIDENT_MAX_PAGES /* maximum aligned pages */
/* fill TLB entrie(s) corresponding to page with ptr */
#define set_tlb_bus(trident,page,addr) __set_tlb_bus(trident,page,addr)
/* fill TLB entrie(s) corresponding to page with silence pointer */
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index b6459dbdb1b0..40f3716c478f 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -431,7 +431,7 @@ static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *ds
/*
* vx_test_and_ack - test and acknowledge interrupt
*
- * called from irq hander, too
+ * called from irq handler, too
*
* spinlock held!
*/
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
index 4211e7239138..e52b61125629 100644
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -265,7 +265,7 @@ static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw
/*
* vx_test_and_ack - test and acknowledge interrupt
*
- * called from irq hander, too
+ * called from irq handler, too
*
* spinlock held!
*/
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 139c7b25927a..7ba52e7a24d7 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1134,7 +1134,7 @@ static long tumbler_find_device(const char *device, const char *platform,
gp->active_val = 0x4;
gp->inactive_val = 0x5;
/* Here are some crude hacks to extract the GPIO polarity and
- * open collector informations out of the do-platform script
+ * open collector information out of the do-platform script
* as we don't yet have an interpreter for these things
*/
if (platform)
diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
index 6eac42bac855..1a05d4288a46 100644
--- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
@@ -205,9 +205,19 @@ static int create_sdw_dailink(struct snd_soc_card *card,
return -EINVAL;
}
+ if (!soc_end->link_mask) {
+ dev_err(dev, "invalid zero link_mask\n");
+ return -EINVAL;
+ }
+ if ((ffs(soc_end->link_mask) - 1) >= amd_ctx->max_sdw_links) {
+ dev_err(dev, "link_id %d exceeds max_sdw_links %d\n",
+ ffs(soc_end->link_mask) - 1, amd_ctx->max_sdw_links);
+ return -EINVAL;
+ }
+
switch (amd_ctx->acp_rev) {
case ACP63_PCI_REV:
- ret = get_acp63_cpu_pin_id(ffs(soc_end->link_mask - 1),
+ ret = get_acp63_cpu_pin_id(ffs(soc_end->link_mask) - 1,
*be_id, &cpu_pin_id, dev);
if (ret)
return ret;
@@ -215,7 +225,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
case ACP70_PCI_REV:
case ACP71_PCI_REV:
case ACP72_PCI_REV:
- ret = get_acp70_cpu_pin_id(ffs(soc_end->link_mask - 1),
+ ret = get_acp70_cpu_pin_id(ffs(soc_end->link_mask) - 1,
*be_id, &cpu_pin_id, dev);
if (ret)
return ret;
diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index a9cd1f335167..ec3e1f5f1052 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -121,9 +121,18 @@ static int create_sdw_dailink(struct snd_soc_card *card,
return -EINVAL;
}
+ if (!sof_end->link_mask) {
+ dev_err(dev, "invalid zero link_mask\n");
+ return -EINVAL;
+ }
+ if ((ffs(sof_end->link_mask) - 1) >= amd_ctx->max_sdw_links) {
+ dev_err(dev, "link_id %d exceeds max_sdw_links %d\n",
+ ffs(sof_end->link_mask) - 1, amd_ctx->max_sdw_links);
+ return -EINVAL;
+ }
switch (amd_ctx->acp_rev) {
case ACP63_PCI_REV:
- ret = get_acp63_cpu_pin_id(ffs(sof_end->link_mask - 1),
+ ret = get_acp63_cpu_pin_id(ffs(sof_end->link_mask) - 1,
*be_id, &cpu_pin_id, dev);
if (ret)
return ret;
@@ -131,7 +140,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
case ACP70_PCI_REV:
case ACP71_PCI_REV:
case ACP72_PCI_REV:
- ret = get_acp70_cpu_pin_id(ffs(sof_end->link_mask - 1),
+ ret = get_acp70_cpu_pin_id(ffs(sof_end->link_mask) - 1,
*be_id, &cpu_pin_id, dev);
if (ret)
return ret;
@@ -277,6 +286,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
int num_devs = 0;
int num_ends = 0;
int num_aux = 0;
+ int num_confs;
int num_links;
int be_id = 0;
int ret;
@@ -287,6 +297,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
return ret;
}
+ num_confs = num_ends;
/* One per DAI link, worst case is a DAI link for every endpoint */
struct asoc_sdw_dailink *sof_dais __free(kfree) =
kzalloc_objs(*sof_dais, num_ends);
@@ -303,7 +314,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
if (!sof_aux)
return -ENOMEM;
- ret = asoc_sdw_parse_sdw_endpoints(dev, ctx, sof_aux, sof_dais, sof_ends, &num_devs);
+ ret = asoc_sdw_parse_sdw_endpoints(dev, ctx, sof_aux, sof_dais, sof_ends, &num_confs);
if (ret < 0)
return ret;
@@ -315,7 +326,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num);
- codec_conf = devm_kcalloc(dev, num_devs, sizeof(*codec_conf), GFP_KERNEL);
+ codec_conf = devm_kcalloc(dev, num_confs, sizeof(*codec_conf), GFP_KERNEL);
if (!codec_conf)
return -ENOMEM;
@@ -326,7 +337,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
return -ENOMEM;
card->codec_conf = codec_conf;
- card->num_configs = num_devs;
+ card->num_configs = num_confs;
card->dai_link = dai_links;
card->num_links = num_links;
card->aux_dev = sof_aux;
@@ -379,7 +390,7 @@ static int mc_probe(struct platform_device *pdev)
ctx->private = amd_ctx;
card = &ctx->card;
card->dev = &pdev->dev;
- card->name = "amd-soundwire";
+ card->name = "amd-sdw";
card->owner = THIS_MODULE;
card->late_probe = asoc_sdw_card_late_probe;
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 385fede6d77f..246e18c66272 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -55,6 +55,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
{
.driver_data = &acp6x_card,
.matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 215-23"),
+ }
+ },
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Lecoo"),
DMI_MATCH(DMI_PRODUCT_NAME, "Bellator N176"),
}
diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c
index 98bb4542b914..b2507a6a37c1 100644
--- a/sound/soc/codecs/cs35l56-sdw.c
+++ b/sound/soc/codecs/cs35l56-sdw.c
@@ -9,6 +9,7 @@
#include <linux/device.h>
#include <linux/err.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/soundwire/sdw.h>
@@ -36,6 +37,9 @@
#define CS35L56_LATE_READ_POLL_US 10
#define CS35L56_LATE_READ_TIMEOUT_US 1000
+static DEFINE_MUTEX(cs35l56_fw_idle_wait_lock);
+static bool cs35l56_fw_idle_wait_pending;
+
static int cs35l56_sdw_poll_mem_status(struct sdw_slave *peripheral,
unsigned int mask,
unsigned int match)
@@ -382,14 +386,34 @@ static int __maybe_unused cs35l56_sdw_runtime_resume(struct device *dev)
return 0;
}
+static int cs35l56_sdw_system_suspend_prepare(struct device *dev)
+{
+ cs35l56_fw_idle_wait_pending = true;
+
+ return 0;
+}
+
static int __maybe_unused cs35l56_sdw_system_suspend(struct device *dev)
{
struct cs35l56_private *cs35l56 = dev_get_drvdata(dev);
+ int ret;
if (cs35l56->sdw_attached)
cs35l56_mask_soundwire_interrupts(cs35l56);
- return cs35l56_system_suspend(dev);
+ ret = cs35l56_system_suspend(dev);
+ if (ret < 0)
+ return ret;
+
+ scoped_guard(mutex, &cs35l56_fw_idle_wait_lock) {
+ if (cs35l56_fw_idle_wait_pending && cs35l56->needs_wait_for_fw_idle) {
+ dev_dbg(cs35l56->base.dev, "Wait for FW timer expiry\n");
+ msleep(CS35L56_FW_REQ_ACTIVE_TIMEOUT_MS + 10);
+ cs35l56_fw_idle_wait_pending = false;
+ }
+ }
+
+ return 0;
}
static int cs35l56_sdw_probe(struct sdw_slave *peripheral, const struct sdw_device_id *id)
@@ -455,6 +479,7 @@ static void cs35l56_sdw_remove(struct sdw_slave *peripheral)
}
static const struct dev_pm_ops cs35l56_sdw_pm = {
+ .prepare = cs35l56_sdw_system_suspend_prepare,
SET_RUNTIME_PM_OPS(cs35l56_sdw_runtime_suspend, cs35l56_sdw_runtime_resume, NULL)
SYSTEM_SLEEP_PM_OPS(cs35l56_sdw_system_suspend, cs35l56_system_resume)
LATE_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_late, cs35l56_system_resume_early)
diff --git a/sound/soc/codecs/cs35l56-shared-test.c b/sound/soc/codecs/cs35l56-shared-test.c
index 4f52c8a192e5..34bb3d44b51f 100644
--- a/sound/soc/codecs/cs35l56-shared-test.c
+++ b/sound/soc/codecs/cs35l56-shared-test.c
@@ -29,6 +29,7 @@ struct cs35l56_shared_test_priv {
struct faux_device *gpio_dev;
struct cs35l56_shared_test_mock_gpio *gpio_priv;
struct regmap *registers;
+ const struct regmap_config *regmap_config;
unsigned int reg_offset;
struct cs35l56_base *cs35l56_base;
u8 applied_pad_pull_state[CS35L56_MAX_GPIO];
@@ -614,6 +615,55 @@ static void cs35l56_shared_test_get_speaker_id_from_host_gpio(struct kunit *test
KUNIT_EXPECT_EQ(test, cs35l56_get_speaker_id(priv->cs35l56_base), param->spkid);
}
+static void cs35l56_shared_test_sorted_regmap_defaults(struct kunit *test)
+{
+ struct cs35l56_shared_test_priv *priv = test->priv;
+ const struct reg_default *defaults;
+ int i;
+
+ KUNIT_ASSERT_NOT_NULL(test, priv->regmap_config);
+ defaults = priv->regmap_config->reg_defaults;
+ KUNIT_ASSERT_NOT_NULL(test, defaults);
+ KUNIT_ASSERT_NE(test, priv->regmap_config->num_reg_defaults, 0);
+
+ for (i = 1; i < priv->regmap_config->num_reg_defaults; i++)
+ KUNIT_EXPECT_LT(test, defaults[i - 1].reg, defaults[i].reg);
+}
+
+static void cs35l56_shared_test_regmap_defaults_not_volatile(struct kunit *test)
+{
+ struct cs35l56_shared_test_priv *priv = test->priv;
+ struct cs35l56_base *cs35l56_base = priv->cs35l56_base;
+ const struct regmap_config *config = priv->regmap_config;
+ int i;
+
+ KUNIT_ASSERT_NOT_NULL(test, config);
+ KUNIT_ASSERT_NOT_NULL(test, config->volatile_reg);
+
+ for (i = 0; i < config->num_reg_defaults; i++) {
+ KUNIT_EXPECT_FALSE(test,
+ config->volatile_reg(cs35l56_base->dev,
+ config->reg_defaults[i].reg));
+ }
+}
+
+static void cs35l56_shared_test_regmap_defaults_readable(struct kunit *test)
+{
+ struct cs35l56_shared_test_priv *priv = test->priv;
+ struct cs35l56_base *cs35l56_base = priv->cs35l56_base;
+ const struct regmap_config *config = priv->regmap_config;
+ int i;
+
+ KUNIT_ASSERT_NOT_NULL(test, config);
+ KUNIT_ASSERT_NOT_NULL(test, config->readable_reg);
+
+ for (i = 0; i < config->num_reg_defaults; i++) {
+ KUNIT_EXPECT_TRUE(test,
+ config->readable_reg(cs35l56_base->dev,
+ config->reg_defaults[i].reg));
+ }
+}
+
static int cs35l56_shared_test_case_regmap_init(struct kunit *test,
const struct regmap_config *regmap_config)
{
@@ -645,6 +695,8 @@ static int cs35l56_shared_test_case_regmap_init(struct kunit *test,
kunit_add_action_or_reset(test, regmap_exit_wrapper,
cs35l56_base->regmap));
+ priv->regmap_config = regmap_config;
+
return 0;
}
@@ -862,6 +914,10 @@ static struct kunit_case cs35l56_shared_test_cases[] = {
cs35l56_shared_test_host_gpio_spkid_gen_params,
{ KUNIT_SPEED_SLOW }),
+ KUNIT_CASE(cs35l56_shared_test_sorted_regmap_defaults),
+ KUNIT_CASE(cs35l56_shared_test_regmap_defaults_not_volatile),
+ KUNIT_CASE(cs35l56_shared_test_regmap_defaults_readable),
+
{ }
};
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 7b3e37d462d6..b37f65cd4d33 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -1379,6 +1379,44 @@ void cs35l56_warn_if_firmware_missing(struct cs35l56_base *cs35l56_base)
}
EXPORT_SYMBOL_NS_GPL(cs35l56_warn_if_firmware_missing, "SND_SOC_CS35L56_SHARED");
+bool cs35l56_needs_wait_for_firmware_timer_expiry(struct cs35l56_base *cs35l56_base)
+{
+ unsigned int fw_ver;
+ bool prot_sts;
+ int ret;
+
+ switch (cs35l56_base->type) {
+ case 0x54:
+ case 0x56:
+ case 0x57:
+ switch (cs35l56_base->rev) {
+ case 0xb0:
+ ret = cs35l56_read_prot_status(cs35l56_base, &prot_sts, &fw_ver);
+ if (ret)
+ return true;
+
+ if ((fw_ver & CS35L56_FW_MAIN_VERSION_MASK) < 0x30d07)
+ return true;
+
+ return false;
+ case 0xb2:
+ ret = cs35l56_read_prot_status(cs35l56_base, &prot_sts, &fw_ver);
+ if (ret)
+ return true;
+
+ if ((fw_ver & CS35L56_FW_MAIN_VERSION_MASK) < 0x40710)
+ return true;
+
+ return false;
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
+}
+EXPORT_SYMBOL_NS_GPL(cs35l56_needs_wait_for_firmware_timer_expiry, "SND_SOC_CS35L56_SHARED");
+
void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp)
{
__be32 pid, sid, tid;
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 74129fcc79dc..04402808dcde 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -1649,6 +1649,10 @@ int cs35l56_system_resume(struct device *dev)
dev_dbg(dev, "system_resume\n");
+ /* Assume the firmware reset to default until we can check it */
+ if (cs35l56->base.init_done)
+ cs35l56->needs_wait_for_fw_idle = true;
+
/*
* We might have done a hard reset or the CS35L56 was power-cycled
* so wait for control port to be ready.
@@ -1663,6 +1667,16 @@ int cs35l56_system_resume(struct device *dev)
if (ret)
return ret;
+ if (cs35l56->sdw_peripheral && cs35l56->base.init_done) {
+ ret = pm_runtime_resume_and_get(cs35l56->base.dev);
+ if (ret < 0)
+ return ret;
+
+ cs35l56->needs_wait_for_fw_idle =
+ cs35l56_needs_wait_for_firmware_timer_expiry(&cs35l56->base);
+ pm_runtime_put_autosuspend(cs35l56->base.dev);
+ }
+
/* Firmware won't have been loaded if the component hasn't probed */
if (!cs35l56->component)
return 0;
@@ -2187,6 +2201,9 @@ post_soft_reset:
if (ret)
return dev_err_probe(cs35l56->base.dev, ret, "Failed to write ASP1_CONTROL3\n");
+ cs35l56->needs_wait_for_fw_idle =
+ cs35l56_needs_wait_for_firmware_timer_expiry(&cs35l56->base);
+
cs35l56->base.init_done = true;
complete_all(&cs35l56->init_completion);
diff --git a/sound/soc/codecs/cs35l56.h b/sound/soc/codecs/cs35l56.h
index f7cf8aa653e2..b46f410f0e09 100644
--- a/sound/soc/codecs/cs35l56.h
+++ b/sound/soc/codecs/cs35l56.h
@@ -43,6 +43,7 @@ struct cs35l56_private {
bool soft_resetting;
bool sdw_attached;
bool component_registered;
+ bool needs_wait_for_fw_idle;
struct completion init_completion;
int speaker_id;
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index bc2c22436ba6..7aa50c5bd3df 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -426,10 +426,14 @@ static int hdmi_codec_iec958_default_put(struct snd_kcontrol *kcontrol,
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
+ if (!memcmp(hcp->iec_status, ucontrol->value.iec958.status,
+ sizeof(hcp->iec_status)))
+ return 0;
+
memcpy(hcp->iec_status, ucontrol->value.iec958.status,
sizeof(hcp->iec_status));
- return 0;
+ return 1;
}
static int hdmi_codec_iec958_mask_get(struct snd_kcontrol *kcontrol,
diff --git a/sound/soc/codecs/rt721-sdca-sdw.c b/sound/soc/codecs/rt721-sdca-sdw.c
index eae7d662efae..d0f3fc1978c3 100644
--- a/sound/soc/codecs/rt721-sdca-sdw.c
+++ b/sound/soc/codecs/rt721-sdca-sdw.c
@@ -25,16 +25,22 @@ static bool rt721_sdca_readable_register(struct device *dev, unsigned int reg)
case 0x2f50:
case 0x2f51:
case 0x2f58 ... 0x2f5d:
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_XUV,
RT721_SDCA_CTL_XUV, 0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_GE49,
RT721_SDCA_CTL_SELECTED_MODE, 0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_GE49,
RT721_SDCA_CTL_DETECTED_MODE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
case SDW_SDCA_CTL(FUNC_NUM_HID, RT721_SDCA_ENT_HID01,
RT721_SDCA_CTL_HIDTX_CURRENT_OWNER, 0) ... SDW_SDCA_CTL(FUNC_NUM_HID,
RT721_SDCA_ENT_HID01, RT721_SDCA_CTL_HIDTX_MESSAGE_LENGTH, 0):
case RT721_BUF_ADDR_HID1 ... RT721_BUF_ADDR_HID2:
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
return true;
default:
return false;
@@ -46,14 +52,20 @@ static bool rt721_sdca_volatile_register(struct device *dev, unsigned int reg)
switch (reg) {
case 0x2f01:
case 0x2f51:
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_GE49,
RT721_SDCA_CTL_DETECTED_MODE, 0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_XUV,
RT721_SDCA_CTL_XUV, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
case SDW_SDCA_CTL(FUNC_NUM_HID, RT721_SDCA_ENT_HID01,
RT721_SDCA_CTL_HIDTX_CURRENT_OWNER, 0) ... SDW_SDCA_CTL(FUNC_NUM_HID,
RT721_SDCA_ENT_HID01, RT721_SDCA_CTL_HIDTX_MESSAGE_LENGTH, 0):
case RT721_BUF_ADDR_HID1 ... RT721_BUF_ADDR_HID2:
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0):
return true;
default:
return false;
diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
index a9479d0e4941..0a936938385c 100644
--- a/sound/soc/codecs/rt721-sdca.c
+++ b/sound/soc/codecs/rt721-sdca.c
@@ -142,151 +142,192 @@ io_error:
static void rt721_sdca_dmic_preset(struct rt721_sdca_priv *rt721)
{
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
- RT721_VREF1_HV_CTRL1, 0xe000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8007);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL9, 0x2a2a);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL10, 0x2a00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL6, 0x2a2a);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL5, 0x2626);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL8, 0x1e00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL7, 0x1515);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_CH_FLOAT_CTL3, 0x0304);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_CH_FLOAT_CTL4, 0x0304);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_HDA_LEGACY_CTL1, 0x0000);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT_IT26,
- RT721_SDCA_CTL_VENDOR_DEF, 0), 0x01);
- regmap_write(rt721->mbq_regmap, 0x5910009, 0x2e01);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
- RT721_RC_CALIB_CTRL0, 0x0b00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
- RT721_RC_CALIB_CTRL0, 0x0b40);
- regmap_write(rt721->regmap, 0x2f5c, 0x25);
+ unsigned int mic_func_status;
+ struct device *dev = &rt721->slave->dev;
+
+ regmap_read(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT0, RT721_SDCA_CTL_FUNC_STATUS, 0),
+ &mic_func_status);
+ dev_dbg(dev, "%s mic func_status=0x%x\n", __func__, mic_func_status);
+
+ if ((mic_func_status & FUNCTION_NEEDS_INITIALIZATION) || (!rt721->first_hw_init)) {
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
+ RT721_VREF1_HV_CTRL1, 0xe000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8007);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL9, 0x2a2a);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL10, 0x2a00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL6, 0x2a2a);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL5, 0x2626);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL8, 0x1e00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL7, 0x1515);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_CH_FLOAT_CTL3, 0x0304);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_CH_FLOAT_CTL4, 0x0304);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_HDA_LEGACY_CTL1, 0x0000);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT_IT26,
+ RT721_SDCA_CTL_VENDOR_DEF, 0), 0x01);
+ regmap_write(rt721->mbq_regmap, 0x5910009, 0x2e01);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
+ RT721_RC_CALIB_CTRL0, 0x0b00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
+ RT721_RC_CALIB_CTRL0, 0x0b40);
+ regmap_write(rt721->regmap, 0x2f5c, 0x25);
+ /* clear flag */
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0), FUNCTION_NEEDS_INITIALIZATION);
+ }
}
static void rt721_sdca_amp_preset(struct rt721_sdca_priv *rt721)
{
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
- RT721_VREF1_HV_CTRL1, 0xe000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8007);
- regmap_write(rt721->mbq_regmap, 0x5810000, 0x6420);
- regmap_write(rt721->mbq_regmap, 0x5810000, 0x6421);
- regmap_write(rt721->mbq_regmap, 0x5810000, 0xe421);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_CH_FLOAT_CTL6, 0x5561);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_REG,
- RT721_GPIO_PAD_CTRL5, 0x8003);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_OT23,
- RT721_SDCA_CTL_VENDOR_DEF, 0), 0x04);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_PDE23,
- RT721_SDCA_CTL_FU_MUTE, CH_01), 0x00);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_PDE23,
- RT721_SDCA_CTL_FU_MUTE, CH_02), 0x00);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_FU55,
- RT721_SDCA_CTL_FU_MUTE, CH_01), 0x00);
- regmap_write(rt721->regmap,
- SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_FU55,
- RT721_SDCA_CTL_FU_MUTE, CH_02), 0x00);
- regmap_write(rt721->regmap, 0x2f5d, 0x1);
+ unsigned int amp_func_status;
+ struct device *dev = &rt721->slave->dev;
+
+ regmap_read(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT0, RT721_SDCA_CTL_FUNC_STATUS, 0),
+ &amp_func_status);
+ dev_dbg(dev, "%s amp func_status=0x%x\n", __func__, amp_func_status);
+
+ if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) || (!rt721->first_hw_init)) {
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
+ RT721_VREF1_HV_CTRL1, 0xe000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8007);
+ regmap_write(rt721->mbq_regmap, 0x5810000, 0x6420);
+ regmap_write(rt721->mbq_regmap, 0x5810000, 0x6421);
+ regmap_write(rt721->mbq_regmap, 0x5810000, 0xe421);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_CH_FLOAT_CTL6, 0x5561);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_REG,
+ RT721_GPIO_PAD_CTRL5, 0x8003);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_OT23,
+ RT721_SDCA_CTL_VENDOR_DEF, 0), 0x04);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_PDE23,
+ RT721_SDCA_CTL_FU_MUTE, CH_01), 0x00);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_PDE23,
+ RT721_SDCA_CTL_FU_MUTE, CH_02), 0x00);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_FU55,
+ RT721_SDCA_CTL_FU_MUTE, CH_01), 0x00);
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT_FU55,
+ RT721_SDCA_CTL_FU_MUTE, CH_02), 0x00);
+ regmap_write(rt721->regmap, 0x2f5d, 0x1);
+ /* clear flag */
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT721_SDCA_ENT0, RT721_SDCA_CTL_FUNC_STATUS, 0),
+ FUNCTION_NEEDS_INITIALIZATION);
+ }
}
static void rt721_sdca_jack_preset(struct rt721_sdca_priv *rt721)
{
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
- RT721_VREF1_HV_CTRL1, 0xe000);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_MISC_POWER_CTL31, 0x8007);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_GE_REL_CTRL1, 0x8011);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_UMP_HID_CTRL3, 0xcf00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_UMP_HID_CTRL4, 0x000f);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_UMP_HID_CTRL1, 0x1100);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_UMP_HID_CTRL5, 0x0c12);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_JD_CTRL,
- RT721_JD_1PIN_GAT_CTRL2, 0xc002);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
- RT721_RC_CALIB_CTRL0, 0x0b00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
- RT721_RC_CALIB_CTRL0, 0x0b40);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_UAJ_TOP_TCON14, 0x3333);
- regmap_write(rt721->mbq_regmap, 0x5810035, 0x0036);
- regmap_write(rt721->mbq_regmap, 0x5810030, 0xee00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
- RT721_HP_AMP_2CH_CAL1, 0x0140);
- regmap_write(rt721->mbq_regmap, 0x5810000, 0x0021);
- regmap_write(rt721->mbq_regmap, 0x5810000, 0x8021);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
- RT721_HP_AMP_2CH_CAL18, 0x5522);
- regmap_write(rt721->mbq_regmap, 0x5b10007, 0x2000);
- regmap_write(rt721->mbq_regmap, 0x5B10017, 0x1b0f);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_CBJ_CTRL,
- RT721_CBJ_A0_GAT_CTRL1, 0x2205);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
- RT721_HP_AMP_2CH_CAL4, 0xa105);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_UAJ_TOP_TCON14, 0x3b33);
- regmap_write(rt721->mbq_regmap, 0x310400, 0x3043);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_UAJ_TOP_TCON14, 0x3f33);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_UAJ_TOP_TCON13, 0x6048);
- regmap_write(rt721->mbq_regmap, 0x310401, 0x3000);
- regmap_write(rt721->mbq_regmap, 0x310402, 0x1b00);
- regmap_write(rt721->mbq_regmap, 0x310300, 0x000f);
- regmap_write(rt721->mbq_regmap, 0x310301, 0x3000);
- regmap_write(rt721->mbq_regmap, 0x310302, 0x1b00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
- RT721_UAJ_TOP_TCON17, 0x0008);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_DAC_CTRL,
- RT721_DAC_2CH_CTRL3, 0x55ff);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_DAC_CTRL,
- RT721_DAC_2CH_CTRL4, 0xcc00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
- RT721_MBIAS_LV_CTRL2, 0x6677);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
- RT721_VREF2_LV_CTRL1, 0x7600);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL2, 0x1234);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL3, 0x3512);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL1, 0x4040);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_ENT_FLOAT_CTL4, 0x1201);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
- RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
- regmap_write(rt721->regmap, 0x2f58, 0x07);
-
- regmap_write(rt721->regmap, 0x2f51, 0x00);
- rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
- RT721_MISC_CTL, 0x0004);
+ unsigned int jack_func_status;
+ struct device *dev = &rt721->slave->dev;
+
+ regmap_read(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT0, RT721_SDCA_CTL_FUNC_STATUS, 0),
+ &jack_func_status);
+ dev_dbg(dev, "%s jack func_status=0x%x\n", __func__, jack_func_status);
+
+ if ((jack_func_status & FUNCTION_NEEDS_INITIALIZATION) || (!rt721->first_hw_init)) {
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
+ RT721_VREF1_HV_CTRL1, 0xe000);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_MISC_POWER_CTL31, 0x8007);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_GE_REL_CTRL1, 0x8011);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_UMP_HID_CTRL3, 0xcf00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_UMP_HID_CTRL4, 0x000f);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_UMP_HID_CTRL1, 0x1100);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_UMP_HID_CTRL5, 0x0c12);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_JD_CTRL,
+ RT721_JD_1PIN_GAT_CTRL2, 0xc002);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
+ RT721_RC_CALIB_CTRL0, 0x0b00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_RC_CALIB_CTRL,
+ RT721_RC_CALIB_CTRL0, 0x0b40);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_UAJ_TOP_TCON14, 0x3333);
+ regmap_write(rt721->mbq_regmap, 0x5810035, 0x0036);
+ regmap_write(rt721->mbq_regmap, 0x5810030, 0xee00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
+ RT721_HP_AMP_2CH_CAL1, 0x0140);
+ regmap_write(rt721->mbq_regmap, 0x5810000, 0x0021);
+ regmap_write(rt721->mbq_regmap, 0x5810000, 0x8021);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
+ RT721_HP_AMP_2CH_CAL18, 0x5522);
+ regmap_write(rt721->mbq_regmap, 0x5b10007, 0x2000);
+ regmap_write(rt721->mbq_regmap, 0x5B10017, 0x1b0f);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_CBJ_CTRL,
+ RT721_CBJ_A0_GAT_CTRL1, 0x2205);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
+ RT721_HP_AMP_2CH_CAL4, 0xa105);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_UAJ_TOP_TCON14, 0x3b33);
+ regmap_write(rt721->mbq_regmap, 0x310400, 0x3043);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_UAJ_TOP_TCON14, 0x3f33);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_UAJ_TOP_TCON13, 0x6048);
+ regmap_write(rt721->mbq_regmap, 0x310401, 0x3000);
+ regmap_write(rt721->mbq_regmap, 0x310402, 0x1b00);
+ regmap_write(rt721->mbq_regmap, 0x310300, 0x000f);
+ regmap_write(rt721->mbq_regmap, 0x310301, 0x3000);
+ regmap_write(rt721->mbq_regmap, 0x310302, 0x1b00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
+ RT721_UAJ_TOP_TCON17, 0x0008);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_DAC_CTRL,
+ RT721_DAC_2CH_CTRL3, 0x55ff);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_DAC_CTRL,
+ RT721_DAC_2CH_CTRL4, 0xcc00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
+ RT721_MBIAS_LV_CTRL2, 0x6677);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_ANA_POW_PART,
+ RT721_VREF2_LV_CTRL1, 0x7600);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL2, 0x1234);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL3, 0x3512);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL1, 0x4040);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_ENT_FLOAT_CTL4, 0x1201);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
+ RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
+ regmap_write(rt721->regmap, 0x2f58, 0x07);
+ regmap_write(rt721->regmap, 0x2f51, 0x00);
+ rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+ RT721_MISC_CTL, 0x0004);
+ /* clear flag */
+ regmap_write(rt721->regmap,
+ SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT0,
+ RT721_SDCA_CTL_FUNC_STATUS, 0), FUNCTION_NEEDS_INITIALIZATION);
+ }
}
static void rt721_sdca_jack_init(struct rt721_sdca_priv *rt721)
diff --git a/sound/soc/codecs/rt721-sdca.h b/sound/soc/codecs/rt721-sdca.h
index 24ce188562ba..b8873b18a648 100644
--- a/sound/soc/codecs/rt721-sdca.h
+++ b/sound/soc/codecs/rt721-sdca.h
@@ -214,6 +214,7 @@ struct rt721_sdca_dmic_kctrl_priv {
#define RT721_SDCA_ENT_XU03 0x03
#define RT721_SDCA_ENT_XU0D 0x0d
#define RT721_SDCA_ENT_FU55 0x55
+#define RT721_SDCA_ENT0 0x00
/* RT721 SDCA control */
#define RT721_SDCA_CTL_SAMPLE_FREQ_INDEX 0x10
@@ -229,6 +230,7 @@ struct rt721_sdca_dmic_kctrl_priv {
#define RT721_SDCA_CTL_VENDOR_DEF 0x30
#define RT721_SDCA_CTL_XUV 0x34
#define RT721_SDCA_CTL_FU_CH_GAIN 0x0b
+#define RT721_SDCA_CTL_FUNC_STATUS 0x10
/* RT721 SDCA channel */
#define CH_L 0x01
@@ -261,6 +263,9 @@ struct rt721_sdca_dmic_kctrl_priv {
/* RT721 HID ID */
#define RT721_SDCA_HID_ID 0x11
+/* Function_Status */
+#define FUNCTION_NEEDS_INITIALIZATION BIT(5)
+
enum {
RT721_AIF1, /* For headset mic and headphone */
RT721_AIF2, /* For speaker */
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 0a8a6d891d1f..127c2e6b308e 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -629,6 +629,7 @@ static int graph_probe(struct platform_device *pdev)
card->dapm_widgets = graph_dapm_widgets;
card->num_dapm_widgets = ARRAY_SIZE(graph_dapm_widgets);
card->probe = graph_util_card_probe;
+ card->remove = graph_util_card_remove;
if (of_device_get_match_data(dev))
priv->dpcm_selectable = 1;
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 9fb3d3df5cf6..e11bc8135cb0 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -1310,6 +1310,7 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
goto end;
card->probe = graph_util_card_probe;
+ card->remove = graph_util_card_remove;
card->owner = THIS_MODULE;
card->dev = dev;
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 7df5253499cd..de27163eeb0b 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -825,6 +825,16 @@ int simple_util_init_jack(struct snd_soc_card *card,
}
EXPORT_SYMBOL_GPL(simple_util_init_jack);
+void simple_util_remove_jack(struct simple_util_jack *sjack)
+{
+ if (!sjack->gpio.desc)
+ return;
+
+ snd_soc_jack_free_gpios(&sjack->jack, 1, &sjack->gpio);
+ sjack->gpio.desc = NULL;
+}
+EXPORT_SYMBOL_GPL(simple_util_remove_jack);
+
int simple_util_init_aux_jacks(struct snd_soc_card *card, char *prefix)
{
struct simple_util_priv *priv = snd_soc_card_get_drvdata(card);
@@ -1018,6 +1028,17 @@ end:
}
EXPORT_SYMBOL_GPL(graph_util_card_probe);
+int graph_util_card_remove(struct snd_soc_card *card)
+{
+ struct simple_util_priv *priv = snd_soc_card_get_drvdata(card);
+
+ simple_util_remove_jack(&priv->hp_jack);
+ simple_util_remove_jack(&priv->mic_jack);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(graph_util_card_remove);
+
int graph_util_is_ports0(struct device_node *np)
{
struct device_node *parent __free(device_node) = of_get_parent(np);
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 0a769c177149..b2fc91b8ab81 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -666,6 +666,16 @@ end:
return simple_ret(priv, ret);
}
+static int simple_soc_remove(struct snd_soc_card *card)
+{
+ struct simple_util_priv *priv = snd_soc_card_get_drvdata(card);
+
+ simple_util_remove_jack(&priv->hp_jack);
+ simple_util_remove_jack(&priv->mic_jack);
+
+ return 0;
+}
+
static int simple_parse_of(struct simple_util_priv *priv)
{
struct snd_soc_card *card = simple_priv_to_card(priv);
@@ -754,6 +764,7 @@ static int simple_probe(struct platform_device *pdev)
card->owner = THIS_MODULE;
card->dev = dev;
card->probe = simple_soc_probe;
+ card->remove = simple_soc_remove;
card->driver_name = "simple-card";
return simple_parse_of(priv);
diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 8174d2ebfa99..2d7ced953fde 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -1065,7 +1065,7 @@ finalize:
return 0;
err_load_libs:
- avs_remove_topology(component);
+ snd_soc_tplg_component_remove(component);
return ret;
}
@@ -1083,7 +1083,7 @@ static void avs_component_remove(struct snd_soc_component *component)
mutex_unlock(&adev->comp_list_mutex);
if (mach->tplg_filename) {
- ret = avs_remove_topology(component);
+ ret = snd_soc_tplg_component_remove(component);
if (ret < 0)
dev_err(component->dev, "unload topology failed: %d\n", ret);
}
diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index 5d70be63a4a7..1085090d5a9c 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -2226,28 +2226,3 @@ struct avs_tplg *avs_tplg_new(struct snd_soc_component *comp)
return tplg;
}
-
-int avs_load_topology(struct snd_soc_component *comp, const char *filename)
-{
- const struct firmware *fw __free(firmware) = NULL;
- int ret;
-
- ret = request_firmware(&fw, filename, comp->dev);
- if (ret < 0) {
- dev_err(comp->dev, "request topology \"%s\" failed: %d\n", filename, ret);
- return ret;
- }
-
- ret = snd_soc_tplg_component_load(comp, &avs_tplg_ops, fw);
- if (ret < 0)
- dev_err(comp->dev, "load topology \"%s\" failed: %d\n", filename, ret);
-
- return ret;
-}
-
-int avs_remove_topology(struct snd_soc_component *comp)
-{
- snd_soc_tplg_component_remove(comp);
-
- return 0;
-}
diff --git a/sound/soc/intel/avs/topology.h b/sound/soc/intel/avs/topology.h
index 189984ce7b51..25f3888a1939 100644
--- a/sound/soc/intel/avs/topology.h
+++ b/sound/soc/intel/avs/topology.h
@@ -233,7 +233,4 @@ struct avs_tplg_module {
extern const struct snd_soc_tplg_ops avs_tplg_ops;
struct avs_tplg *avs_tplg_new(struct snd_soc_component *comp);
-int avs_load_topology(struct snd_soc_component *comp, const char *filename);
-int avs_remove_topology(struct snd_soc_component *comp);
-
#endif
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index b72ce1e9bfb1..879d0451536e 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -449,7 +449,9 @@ static void push_back_to_ready_list(struct snd_usb_endpoint *ep,
struct snd_urb_ctx *ctx)
{
guard(spinlock_irqsave)(&ep->lock);
- list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
+ /* ctx may still be linked: a stale completion racing a stop/restart. */
+ if (list_empty(&ctx->ready_list))
+ list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
}
/*
@@ -1037,6 +1039,7 @@ void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep)
*/
static int stop_urbs(struct snd_usb_endpoint *ep, bool force, bool keep_pending)
{
+ struct snd_urb_ctx *ctx, *n;
unsigned int i;
if (!force && atomic_read(&ep->running))
@@ -1046,7 +1049,9 @@ static int stop_urbs(struct snd_usb_endpoint *ep, bool force, bool keep_pending)
return 0;
scoped_guard(spinlock_irqsave, &ep->lock) {
- INIT_LIST_HEAD(&ep->ready_playback_urbs);
+ /* Unlink each ctx; INIT_LIST_HEAD() alone would leave them looking linked. */
+ list_for_each_entry_safe(ctx, n, &ep->ready_playback_urbs, ready_list)
+ list_del_init(&ctx->ready_list);
ep->next_packet_head = 0;
ep->next_packet_queued = 0;
}
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ecaa8bc08d7c..33a6a1281410 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -786,7 +786,7 @@ static int parse_term_uac2_iterm_unit(struct mixer_build *state,
return err;
/* save input term properties after recursion,
- * to ensure they are not overriden by the recursion calls
+ * to ensure they are not overridden by the recursion calls
*/
term->id = id;
term->type = le16_to_cpu(d->wTerminalType);
@@ -809,7 +809,7 @@ static int parse_term_uac3_iterm_unit(struct mixer_build *state,
return err;
/* save input term properties after recursion,
- * to ensure they are not overriden by the recursion calls
+ * to ensure they are not overridden by the recursion calls
*/
term->id = id;
term->type = le16_to_cpu(d->wTerminalType);
diff --git a/sound/usb/mixer_us16x08.h b/sound/usb/mixer_us16x08.h
index 7b8583dd3b07..e98fe55265d1 100644
--- a/sound/usb/mixer_us16x08.h
+++ b/sound/usb/mixer_us16x08.h
@@ -60,7 +60,7 @@
#define SND_US16X08_ID_EQHIGHMIDLEVEL 0x03
#define SND_US16X08_ID_EQHIGHLEVEL 0x04
-/* EQ frequence IDs */
+/* EQ frequency IDs */
#define SND_US16X08_ID_EQLOWFREQ 0x11
#define SND_US16X08_ID_EQLOWMIDFREQ 0x12
#define SND_US16X08_ID_EQHIGHMIDFREQ 0x13
diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
index d586a510e6e1..84b5954f66c3 100644
--- a/tools/include/linux/mm.h
+++ b/tools/include/linux/mm.h
@@ -33,6 +33,10 @@ static inline phys_addr_t virt_to_phys(volatile void *address)
return (phys_addr_t)address;
}
+static inline void totalram_pages_inc(void)
+{
+}
+
static inline void totalram_pages_add(long count)
{
}
diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c
index 6c2ac5d9dc4b..22b3b500d33a 100644
--- a/tools/mm/page_owner_sort.c
+++ b/tools/mm/page_owner_sort.c
@@ -25,13 +25,11 @@
#include <getopt.h>
#define TASK_COMM_LEN 16
-#define MODULE_NAME_LEN 64
struct block_list {
char *txt;
char *comm; // task command name
char *stacktrace;
- char *module; // kernel module name
__u64 ts_nsec;
int len;
int num;
@@ -43,8 +41,7 @@ struct block_list {
enum FILTER_BIT {
FILTER_PID = 1<<1,
FILTER_TGID = 1<<2,
- FILTER_COMM = 1<<3,
- FILTER_MODULE = 1<<4
+ FILTER_COMM = 1<<3
};
enum FILTER_RESULT {
@@ -58,8 +55,7 @@ enum CULL_BIT {
CULL_TGID = 1<<2,
CULL_COMM = 1<<3,
CULL_STACKTRACE = 1<<4,
- CULL_ALLOCATOR = 1<<5,
- CULL_MODULE = 1<<6
+ CULL_ALLOCATOR = 1<<5
};
enum ALLOCATOR_BIT {
ALLOCATOR_CMA = 1<<1,
@@ -69,8 +65,7 @@ enum ALLOCATOR_BIT {
};
enum ARG_TYPE {
ARG_TXT, ARG_COMM, ARG_STACKTRACE, ARG_ALLOC_TS, ARG_CULL_TIME,
- ARG_PAGE_NUM, ARG_PID, ARG_TGID, ARG_UNKNOWN, ARG_ALLOCATOR,
- ARG_MODULE
+ ARG_PAGE_NUM, ARG_PID, ARG_TGID, ARG_UNKNOWN, ARG_ALLOCATOR
};
enum SORT_ORDER {
SORT_ASC = 1,
@@ -84,18 +79,15 @@ enum COMP_FLAG {
COMP_STACK = 1<<3,
COMP_NUM = 1<<4,
COMP_TGID = 1<<5,
- COMP_COMM = 1<<6,
- COMP_MODULE = 1<<7
+ COMP_COMM = 1<<6
};
struct filter_condition {
pid_t *pids;
pid_t *tgids;
char **comms;
- char **modules;
int pids_size;
int tgids_size;
int comms_size;
- int modules_size;
};
struct sort_condition {
int (**cmps)(const void *, const void *);
@@ -109,7 +101,6 @@ static regex_t pid_pattern;
static regex_t tgid_pattern;
static regex_t comm_pattern;
static regex_t ts_nsec_pattern;
-static regex_t module_pattern;
static struct block_list *list;
static int list_size;
static int max_size;
@@ -193,13 +184,6 @@ static int compare_comm(const void *p1, const void *p2)
return strcmp(l1->comm, l2->comm);
}
-static int compare_module(const void *p1, const void *p2)
-{
- const struct block_list *l1 = p1, *l2 = p2;
-
- return strcmp(l1->module, l2->module);
-}
-
static int compare_ts(const void *p1, const void *p2)
{
const struct block_list *l1 = p1, *l2 = p2;
@@ -223,8 +207,6 @@ static int compare_cull_condition(const void *p1, const void *p2)
return compare_tgid(p1, p2);
if ((cull & CULL_COMM) && compare_comm(p1, p2))
return compare_comm(p1, p2);
- if ((cull & CULL_MODULE) && compare_module(p1, p2))
- return compare_module(p1, p2);
if ((cull & CULL_ALLOCATOR) && compare_allocator(p1, p2))
return compare_allocator(p1, p2);
return 0;
@@ -429,33 +411,9 @@ static char *get_comm(char *buf)
return comm_str;
}
-static char *get_module(char *buf)
-{
- char *module_str = malloc(MODULE_NAME_LEN);
- regmatch_t pmatch[2];
- int val_len;
-
- if (!module_str)
- return NULL;
- memset(module_str, 0, MODULE_NAME_LEN);
- if (regexec(&module_pattern, buf, 2, pmatch, REG_NOTBOL) != 0 || pmatch[1].rm_so == -1) {
- strcpy(module_str, "vmlinux");
- return module_str;
- }
-
- val_len = pmatch[1].rm_eo - pmatch[1].rm_so;
- if ((size_t)val_len >= MODULE_NAME_LEN)
- val_len = MODULE_NAME_LEN - 1;
- memcpy(module_str, buf + pmatch[1].rm_so, val_len);
- module_str[val_len] = '\0';
-
- return module_str;
-}
-
static void free_block_list(struct block_list *block)
{
free(block->comm);
- free(block->module);
free(block->txt);
}
@@ -475,8 +433,6 @@ static int get_arg_type(const char *arg)
return ARG_ALLOC_TS;
else if (!strcmp(arg, "allocator") || !strcmp(arg, "ator"))
return ARG_ALLOCATOR;
- else if (!strcmp(arg, "module") || !strcmp(arg, "mod"))
- return ARG_MODULE;
else {
return ARG_UNKNOWN;
}
@@ -527,36 +483,25 @@ static bool match_str_list(const char *str, char **list, int list_size)
static enum FILTER_RESULT filter_record(char *buf)
{
- char *comm, *module;
+ char *comm;
if ((filter & FILTER_PID) && !match_num_list(get_pid(buf), fc.pids, fc.pids_size))
return FILTER_SKIP;
if ((filter & FILTER_TGID) &&
!match_num_list(get_tgid(buf), fc.tgids, fc.tgids_size))
return FILTER_SKIP;
- if (!(filter & (FILTER_COMM | FILTER_MODULE)))
+ if (!(filter & FILTER_COMM))
return FILTER_MATCH;
- if (filter & FILTER_COMM) {
- comm = get_comm(buf);
- if (!comm)
- return FILTER_ERROR;
- if (!match_str_list(comm, fc.comms, fc.comms_size)) {
- free(comm);
- return FILTER_SKIP;
- }
+ comm = get_comm(buf);
+ if (!comm)
+ return FILTER_ERROR;
+
+ if (!match_str_list(comm, fc.comms, fc.comms_size)) {
free(comm);
+ return FILTER_SKIP;
}
- if (filter & FILTER_MODULE) {
- module = get_module(buf);
- if (!module)
- return FILTER_ERROR;
- if (!match_str_list(module, fc.modules, fc.modules_size)) {
- free(module);
- return FILTER_SKIP;
- }
- free(module);
- }
+ free(comm);
return FILTER_MATCH;
}
@@ -602,12 +547,6 @@ static bool add_list(char *buf, int len, char *ext_buf)
list[list_size].stacktrace++;
list[list_size].ts_nsec = get_ts_nsec(buf);
list[list_size].allocator = get_allocator(buf, ext_buf);
- list[list_size].module = get_module(buf);
- if (!list[list_size].module) {
- fprintf(stderr, "Out of memory\n");
- free_block_list(&list[list_size]);
- return false;
- }
list_size++;
if (list_size % 1000 == 0) {
printf("loaded %d\r", list_size);
@@ -634,8 +573,6 @@ static bool parse_cull_args(const char *arg_str)
cull |= CULL_STACKTRACE;
else if (arg_type == ARG_ALLOCATOR)
cull |= CULL_ALLOCATOR;
- else if (arg_type == ARG_MODULE)
- cull |= CULL_MODULE;
else {
free_explode(args, size);
return false;
@@ -698,8 +635,6 @@ static bool parse_sort_args(const char *arg_str)
sc.cmps[i] = compare_txt;
else if (arg_type == ARG_ALLOCATOR)
sc.cmps[i] = compare_allocator;
- else if (arg_type == ARG_MODULE)
- sc.cmps[i] = compare_module;
else {
free_explode(args, size);
sc.size = 0;
@@ -756,8 +691,7 @@ static void usage(void)
"-p\t\t\tSort by pid.\n"
"-P\t\t\tSort by tgid.\n"
"-s\t\t\tSort by the stacktrace.\n"
- "-t\t\t\tSort by number of times record is seen (default).\n"
- "-M\t\t\tSort by module name.\n\n"
+ "-t\t\t\tSort by number of times record is seen (default).\n\n"
"--pid <pidlist>\t\tSelect by pid. This selects the information"
" of\n\t\t\tblocks whose process ID numbers appear in <pidlist>.\n"
"--tgid <tgidlist>\tSelect by tgid. This selects the information"
@@ -766,21 +700,11 @@ static void usage(void)
"--name <cmdlist>\tSelect by command name. This selects the"
" information\n\t\t\tof blocks whose command name appears in"
" <cmdlist>.\n"
- "--module <modlist>\tSelect by module name. This selects the information\n"
- "\t\t\tof blocks whose module name appears in <modlist>.\n"
- "--cull <rules>\t\tCull by user-defined rules. <rules> is a single\n"
- "\t\t\targument in the form of a comma-separated list with some\n"
- "\t\t\tcommon fields predefined (pid, tgid, comm, stacktrace, allocator, module)\n"
+ "--cull <rules>\t\tCull by user-defined rules. <rules> is a "
+ "single\n\t\t\targument in the form of a comma-separated list "
+ "with some\n\t\t\tcommon fields predefined (pid, tgid, comm, "
+ "stacktrace, allocator)\n"
"--sort <order>\t\tSpecify sort order as: [+|-]key[,[+|-]key[,...]]\n"
- "\t\t\tAvailable keys:\n"
- "\t\t\t pid(p), tgid(tg), name(n), stacktrace(st),\n"
- "\t\t\t txt(T), alloc_ts(at), allocator(ator), module(mod)\n"
- "\t\t\tThe \"+\" is optional since default direction is\n"
- "\t\t\tincreasing numerical or lexicographic order.\n"
- "\t\t\tMixed use of abbreviated and complete-form is allowed.\n"
- "\t\t\tExamples:\n"
- "\t\t\t --sort=n,+pid,-tgid\n"
- "\t\t\t --sort=mod,at\n"
);
}
@@ -797,14 +721,13 @@ int main(int argc, char **argv)
{ "name", required_argument, NULL, 3 },
{ "cull", required_argument, NULL, 4 },
{ "sort", required_argument, NULL, 5 },
- { "module", required_argument, NULL, 6 },
{ "help", no_argument, NULL, 'h' },
{ 0, 0, 0, 0},
};
compare_flag = COMP_NO_FLAG;
- while ((opt = getopt_long(argc, argv, "admnpstPMh", longopts, NULL)) != -1)
+ while ((opt = getopt_long(argc, argv, "admnpstPh", longopts, NULL)) != -1)
switch (opt) {
case 'a':
compare_flag |= COMP_ALLOC;
@@ -830,9 +753,6 @@ int main(int argc, char **argv)
case 'n':
compare_flag |= COMP_COMM;
break;
- case 'M':
- compare_flag |= COMP_MODULE;
- break;
case 'h':
usage();
exit(0);
@@ -872,10 +792,6 @@ int main(int argc, char **argv)
exit(1);
}
break;
- case 6:
- filter = filter | FILTER_MODULE;
- fc.modules = explode(',', optarg, &fc.modules_size);
- break;
default:
usage();
exit(1);
@@ -905,9 +821,6 @@ int main(int argc, char **argv)
set_single_cmp(compare_stacktrace, SORT_ASC);
break;
case COMP_NO_FLAG:
- if (sc.size > 0)
- break;
- /* fallthrough */
case COMP_NUM:
set_single_cmp(compare_num, SORT_DESC);
break;
@@ -917,9 +830,6 @@ int main(int argc, char **argv)
case COMP_COMM:
set_single_cmp(compare_comm, SORT_ASC);
break;
- case COMP_MODULE:
- set_single_cmp(compare_module, SORT_ASC);
- break;
default:
usage();
exit(1);
@@ -942,8 +852,6 @@ int main(int argc, char **argv)
goto out_comm;
if (!check_regcomp(&ts_nsec_pattern, "ts\\s*([0-9]*)\\s*ns"))
goto out_ts;
- if (!check_regcomp(&module_pattern, "\\+0x[0-9a-f]+/0x[0-9a-f]+\\s*\\[([a-zA-Z0-9_-]+)\\]"))
- goto out_module;
fstat(fileno(fin), &st);
max_size = st.st_size / 100; /* hack ... */
@@ -1009,8 +917,6 @@ int main(int argc, char **argv)
fprintf(fout, ", TGID %d", list[i].tgid);
if (cull & CULL_COMM || filter & FILTER_COMM)
fprintf(fout, ", task_comm_name: %s", list[i].comm);
- if (cull & CULL_MODULE || filter & FILTER_MODULE)
- fprintf(fout, ", module: %s", list[i].module);
if (cull & CULL_ALLOCATOR) {
fprintf(fout, ", ");
print_allocator(fout, list[i].allocator);
@@ -1031,8 +937,6 @@ out_free:
free_block_list(&list[i]);
free(list);
}
-out_module:
- regfree(&module_pattern);
out_ts:
regfree(&ts_nsec_pattern);
out_comm:
diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
index 2771375339d9..1e746e25e2bc 100644
--- a/tools/net/ynl/Makefile.deps
+++ b/tools/net/ynl/Makefile.deps
@@ -30,7 +30,8 @@ CFLAGS_mptcp_pm:=$(call get_hdr_inc,_LINUX_MPTCP_PM_H,mptcp_pm.h)
CFLAGS_net_shaper:=$(call get_hdr_inc,_LINUX_NET_SHAPER_H,net_shaper.h)
CFLAGS_netdev:=$(call get_hdr_inc,_LINUX_NETDEV_H,netdev.h)
CFLAGS_nl80211:=$(call get_hdr_inc,__LINUX_NL802121_H,nl80211.h)
-CFLAGS_nlctrl:=$(call get_hdr_inc,__LINUX_GENERIC_NETLINK_H,genetlink.h)
+CFLAGS_nlctrl:=$(call get_hdr_inc,__LINUX_GENERIC_NETLINK_H,genetlink.h) \
+ $(call get_hdr_inc,__LINUX_NETLINK_H,netlink.h)
CFLAGS_nfsd:=$(call get_hdr_inc,_LINUX_NFSD_NETLINK_H,nfsd_netlink.h)
CFLAGS_ovpn:=$(call get_hdr_inc,_LINUX_OVPN_H,ovpn.h)
CFLAGS_ovs_datapath:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h)
diff --git a/tools/net/ynl/pyynl/lib/ynl.py b/tools/net/ynl/pyynl/lib/ynl.py
index 8682bf588e1f..fb5acb8acded 100644
--- a/tools/net/ynl/pyynl/lib/ynl.py
+++ b/tools/net/ynl/pyynl/lib/ynl.py
@@ -115,6 +115,7 @@ class Netlink:
NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 10
NL_POLICY_TYPE_ATTR_PAD = 11
NL_POLICY_TYPE_ATTR_MASK = 12
+ NL_POLICY_TYPE_ATTR_BYTE_ORDER = 13
AttrType = Enum('AttrType', ['flag', 'u8', 'u16', 'u32', 'u64',
's8', 's16', 's32', 's64',
@@ -122,6 +123,8 @@ class Netlink:
'nested', 'nested-array',
'bitfield32', 'sint', 'uint'])
+ ByteOrder = Enum('ByteOrder', ['big-endian'], start=1)
+
class NlError(Exception):
def __init__(self, nl_msg):
self.nl_msg = nl_msg
@@ -158,7 +161,7 @@ class NlPolicy:
Each policy entry always has a 'type' attribute (e.g. u32, string,
nested). Optional attributes depending on the 'type': min-value,
- max-value, min-length, max-length, mask.
+ max-value, min-length, max-length, mask, byte-order.
Policies can form infinite nesting loops. These loops are trimmed
when policy is converted to a dict with pol.to_dict().
@@ -454,6 +457,9 @@ def _genl_decode_policy(raw):
policy['bitfield32-mask'] = attr.as_scalar('u32')
elif attr.type == Netlink.NL_POLICY_TYPE_ATTR_MASK:
policy['mask'] = attr.as_scalar('u64')
+ elif attr.type == Netlink.NL_POLICY_TYPE_ATTR_BYTE_ORDER:
+ byte_order = attr.as_scalar('u32')
+ policy['byte-order'] = Netlink.ByteOrder(byte_order).name
return policy
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h
index 7753aee3f6f0..a14afc66b1cd 100644
--- a/tools/sched_ext/include/scx/common.bpf.h
+++ b/tools/sched_ext/include/scx/common.bpf.h
@@ -31,6 +31,8 @@
#define PF_IDLE 0x00000002 /* I am an IDLE thread */
#define PF_IO_WORKER 0x00000010 /* Task is an IO worker */
#define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */
+#define PF_KCOMPACTD 0x00010000 /* I am kcompactd */
+#define PF_KSWAPD 0x00020000 /* I am kswapd */
#define PF_KTHREAD 0x00200000 /* I am a kernel thread */
#define PF_EXITING 0x00000004
#define CLOCK_MONOTONIC 1
@@ -111,6 +113,7 @@ s32 scx_bpf_this_cid(void) __ksym __weak;
struct task_struct *scx_bpf_cid_curr(s32 cid) __ksym __weak;
u32 scx_bpf_nr_cids(void) __ksym __weak;
u32 scx_bpf_nr_online_cids(void) __ksym __weak;
+const void __arena *scx_bpf_online_cmask(void) __ksym __weak;
u32 scx_bpf_cidperf_cap(s32 cid) __ksym __weak;
u32 scx_bpf_cidperf_cur(s32 cid) __ksym __weak;
s32 scx_bpf_cidperf_set(s32 cid, u32 perf) __ksym __weak;
diff --git a/tools/sched_ext/scx_qmap.bpf.c b/tools/sched_ext/scx_qmap.bpf.c
index bda56c37acb5..67b7c01cae55 100644
--- a/tools/sched_ext/scx_qmap.bpf.c
+++ b/tools/sched_ext/scx_qmap.bpf.c
@@ -818,10 +818,10 @@ void BPF_STRUCT_OPS(qmap_dispatch, s32 cid, struct task_struct *prev)
batch--;
cpuc->dsp_cnt--;
if (!batch || !scx_bpf_dispatch_nr_slots()) {
- if (scan_shared_dsq(false))
+ if (scan_shared_dsq(false) ||
+ scx_bpf_dsq_move_to_local(SHARED_DSQ, needs_immed(cid)))
return;
- scx_bpf_dsq_move_to_local(SHARED_DSQ, needs_immed(cid));
- return;
+ goto prev;
}
if (!cpuc->dsp_cnt)
break;
@@ -832,10 +832,14 @@ void BPF_STRUCT_OPS(qmap_dispatch, s32 cid, struct task_struct *prev)
if (scan_shared_dsq(false))
return;
-
+prev:
/*
* No other tasks. @prev will keep running. Update its core_sched_seq as
* if the task were enqueued and dispatched immediately.
+ *
+ * No @prev to keep running means the CPU goes idle. If its claim was
+ * never used, that is not a transition and ops.update_idle() stays
+ * silent. Restore the claim here.
*/
if (prev) {
taskc = lookup_task_ctx(prev);
@@ -844,6 +848,8 @@ void BPF_STRUCT_OPS(qmap_dispatch, s32 cid, struct task_struct *prev)
taskc->core_sched_seq =
qa.core_sched_tail_seqs[weight_to_idx(prev->scx.weight)]++;
+ } else {
+ cmask_set(cid, &qa.idle_cids.mask);
}
}
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 221be4addb0e..3eb1051b1ee8 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -18,6 +18,7 @@ static int interleave_arithmetic;
static bool extended_linear_cache;
static bool fail_autoassemble;
static bool type2_test;
+static bool mock_zero_size_decoders;
#define FAKE_QTG_ID 42
@@ -872,14 +873,13 @@ static int cxld_registry_restore(struct cxl_decoder *cxld,
cxld_copy(cxld, &td->cxled.cxld);
cxled->state = td->cxled.state;
cxled->skip = td->cxled.skip;
- if (range_len(&td->dpa_range)) {
- rc = devm_cxl_dpa_reserve(cxled, td->dpa_range.start,
- range_len(&td->dpa_range),
- td->cxled.skip);
- if (rc) {
- init_disabled_mock_decoder(cxld);
- return rc;
- }
+ /* enabled endpoint decoders hold a reservation, sized or not */
+ rc = devm_cxl_dpa_reserve(cxled, td->dpa_range.start,
+ range_len(&td->dpa_range),
+ td->cxled.skip);
+ if (rc) {
+ init_disabled_mock_decoder(cxld);
+ return rc;
}
port->commit_end = cxld->id;
}
@@ -1072,16 +1072,49 @@ static void default_mock_decoder(struct cxl_decoder *cxld)
WARN_ON_ONCE(!cxld_registry_new(cxld));
}
-static int first_decoder(struct device *dev, const void *data)
+static int match_decoder_by_index(struct device *dev, const void *data)
{
+ int target_id = *(const int *)data;
struct cxl_decoder *cxld;
if (!is_switch_decoder(dev))
return 0;
cxld = to_cxl_decoder(dev);
- if (cxld->id == 0)
- return 1;
- return 0;
+ return cxld->id == target_id;
+}
+
+/*
+ * Mock a committed, locked, empty decoder
+ * (CXL r4.0 8.2.4.20.12). Gated by the mock_zero_size_decoders module
+ * param so the default cxl_test topology, shared by the region test
+ * suite, is left undisturbed.
+ */
+static void size_zero_mock_decoder_ep(struct cxl_decoder *cxld, u64 base)
+{
+ struct cxl_endpoint_decoder *cxled = to_cxl_endpoint_decoder(&cxld->dev);
+
+ cxld->hpa_range = DEFINE_RANGE(base, base - 1);
+ cxld->interleave_ways = 2;
+ cxld->interleave_granularity = 4096;
+ cxld->target_type = CXL_DECODER_HOSTONLYMEM;
+ cxld->flags = CXL_DECODER_F_ENABLE | CXL_DECODER_F_LOCK;
+ cxled->state = CXL_DECODER_STATE_AUTO;
+ /* decoder[0] reserved [0, size/2), empty decoders sit at that watermark */
+ devm_cxl_dpa_reserve(cxled, mock_auto_region_size / 2, 0, 0);
+ cxld->commit = mock_decoder_commit;
+ cxld->reset = mock_decoder_reset;
+}
+
+static void size_zero_mock_decoder_sw(struct cxl_decoder *cxld, u64 base,
+ int level)
+{
+ cxld->flags = CXL_DECODER_F_ENABLE | CXL_DECODER_F_LOCK;
+ cxld->target_type = CXL_DECODER_HOSTONLYMEM;
+ cxld->interleave_ways = level == 0 ? 2 : 1;
+ cxld->interleave_granularity = 4096;
+ cxld->hpa_range = DEFINE_RANGE(base, base - 1);
+ cxld->commit = mock_decoder_commit;
+ cxld->reset = mock_decoder_reset;
}
enum cxld_init_type {
@@ -1114,7 +1147,7 @@ static enum cxld_init_type get_decoder_init_type(struct cxl_decoder *cxld,
* See 'cxl list -BMPu -m cxl_mem.0,cxl_mem.4'
*/
if (!is_endpoint_decoder(&cxld->dev) || !hb0 || pdev->id % 4 ||
- pdev->id > 4 || cxld->id > 0)
+ pdev->id > 4 || cxld->id > (mock_zero_size_decoders ? 2 : 0))
return MOCK_DECODER_INIT_DEFAULT;
return type2_test ? MOCK_DECODER_INIT_TYPE2_AUTO :
@@ -1147,6 +1180,7 @@ static void mock_init_hdm_type2_cxled(struct cxl_endpoint_decoder *cxled,
struct cxl_port *root_port;
struct device *dev;
u64 base;
+ int id = 0;
base = window->base_hpa;
cxld->hpa_range = (struct range) {
@@ -1172,7 +1206,7 @@ static void mock_init_hdm_type2_cxled(struct cxl_endpoint_decoder *cxled,
*/
dport = port->parent_dport;
root_port = dport->port;
- dev = device_find_child(&root_port->dev, NULL, first_decoder);
+ dev = device_find_child(&root_port->dev, &id, match_decoder_by_index);
/*
* Ancestor ports are guaranteed to be enumerated before
* @port, and all ports have at least one decoder.
@@ -1232,6 +1266,20 @@ static void mock_init_hdm_type3_cxled(struct cxl_endpoint_decoder *cxled,
base = window->base_hpa;
if (extended_linear_cache)
base += mock_auto_region_size;
+
+ /*
+ * With mock_zero_size_decoders, decoders 1 and 2 of the special
+ * endpoints mock committed, locked, empty decoders above the
+ * decoder[0] auto-region (CXL r4.0 8.2.4.20.12). commit_end then
+ * points at a zero-size decoder, exercising the zero-size
+ * reservation and poison-by-endpoint code paths.
+ */
+ if (cxld->id == 1 || cxld->id == 2) {
+ size_zero_mock_decoder_ep(cxld, base);
+ port->commit_end = cxld->id;
+ WARN_ON_ONCE(!cxld_registry_new(cxld));
+ return;
+ }
cxld->hpa_range = (struct range) {
.start = base,
.end = base + mock_auto_region_size - 1,
@@ -1255,9 +1303,11 @@ static void mock_init_hdm_type3_cxled(struct cxl_endpoint_decoder *cxled,
*/
iter = port;
for (i = 0; i < 2; i++) {
+ int id = 0;
+
dport = iter->parent_dport;
iter = dport->port;
- dev = device_find_child(&iter->dev, NULL, first_decoder);
+ dev = device_find_child(&iter->dev, &id, match_decoder_by_index);
/*
* Ancestor ports are guaranteed to be enumerated before
* @port, and all ports have at least one decoder.
@@ -1307,6 +1357,26 @@ static void mock_init_hdm_type3_cxled(struct cxl_endpoint_decoder *cxled,
cxld_registry_update(cxld);
put_device(dev);
+
+ if (!mock_zero_size_decoders)
+ continue;
+
+ /*
+ * Mirror the endpoint: commit the next two switch decoders
+ * as zero-size + locked so the empty-decoder layout extends
+ * end-to-end through the switch and host bridge.
+ */
+ for (id = 1; id <= 2; id++) {
+ dev = device_find_child(&iter->dev, &id,
+ match_decoder_by_index);
+ if (WARN_ON(!dev))
+ continue;
+ cxld = to_cxl_decoder(dev);
+ size_zero_mock_decoder_sw(cxld, base, i);
+ iter->commit_end = id;
+ cxld_registry_update(cxld);
+ put_device(dev);
+ }
}
}
@@ -2076,6 +2146,12 @@ static bool __init have_multiple_modparms(void)
count++;
if (type2_test)
count++;
+ if (mock_zero_size_decoders)
+ count++;
+
+ /* Zero-size decoders require decoder[0] to preserve commit order. */
+ if (fail_autoassemble && mock_zero_size_decoders)
+ return true;
return count > 1;
}
@@ -2484,6 +2560,9 @@ module_param(fail_autoassemble, bool, 0444);
MODULE_PARM_DESC(fail_autoassemble, "Simulate missing member of an auto-region");
module_param(type2_test, bool, 0444);
MODULE_PARM_DESC(type2_test, "Enable type 2 support testing");
+module_param(mock_zero_size_decoders, bool, 0444);
+MODULE_PARM_DESC(mock_zero_size_decoders,
+ "Mock committed, locked, empty decoders under host-bridge0");
module_init(cxl_test_init);
module_exit(cxl_test_exit);
MODULE_LICENSE("GPL v2");
diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile
index 20524fcbe3c7..d80982ccdc20 100644
--- a/tools/testing/memblock/Makefile
+++ b/tools/testing/memblock/Makefile
@@ -7,8 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \
LDFLAGS += -fsanitize=address -fsanitize=undefined
TARGETS = main
TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \
- tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o \
- tests/alloc_low_api.o
+ tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o
DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o cmdline.o
OFILES = main.o $(DEP_OFILES) $(TEST_OFILES)
EXTR_SRC = ../../../mm/memblock.c
diff --git a/tools/testing/memblock/README b/tools/testing/memblock/README
index 4ea293209548..b435f48d8a70 100644
--- a/tools/testing/memblock/README
+++ b/tools/testing/memblock/README
@@ -67,13 +67,13 @@ memblock
|-- tests
| |-- alloc_api.(c|h) -- memblock_alloc tests
| |-- alloc_helpers_api.(c|h) -- memblock_alloc_from tests
-| |-- alloc_low_api.(c|h) -- memblock_alloc_low tests
| |-- alloc_nid_api.(c|h) -- memblock_alloc_try_nid tests
| |-- basic_api.(c|h) -- memblock_add/memblock_reserve/... tests
| |-- common.(c|h) -- helper functions for resetting memblock;
|-- main.c --------------. dummy physical memory definition
|-- Makefile `- test runner
|-- README
+|-- TODO
|-- .gitignore
Simulating physical memory
@@ -101,10 +101,12 @@ There's no need to explicitly free the dummy memory from memblock via
memblock_free() call. The entry will be erased by reset_memblock_regions(),
called at the beginning of each test.
-The simulator defines ARCH_LOW_ADDRESS_LIMIT in asm/dma.h using the midpoint
-of the MEM_SIZE range registered by setup_memblock(). This leaves registered
-memory both below and above the limit. The limit is the first address an
-allocation must not use; an allocation's base plus its size may equal the limit.
+Known issues
+============
+
+1. Tests for memblock_alloc_low() can't be easily implemented. The function uses
+ ARCH_LOW_ADDRESS_LIMIT marco, which can't be changed to point at the low
+ memory of the memory_block.
References
==========
diff --git a/tools/testing/memblock/TODO b/tools/testing/memblock/TODO
new file mode 100644
index 000000000000..c13ad0dae776
--- /dev/null
+++ b/tools/testing/memblock/TODO
@@ -0,0 +1,5 @@
+TODO
+=====
+
+1. Add tests for memblock_alloc_low() once the simulator can model
+ ARCH_LOW_ADDRESS_LIMIT against the low memory in memory_block
diff --git a/tools/testing/memblock/asm/dma.h b/tools/testing/memblock/asm/dma.h
index 6607408dcf25..13ff8e5d22ef 100644
--- a/tools/testing/memblock/asm/dma.h
+++ b/tools/testing/memblock/asm/dma.h
@@ -2,10 +2,4 @@
#ifndef _TOOLS_DMA_H
#define _TOOLS_DMA_H
-#include <linux/types.h>
-
-phys_addr_t dummy_physical_memory_low_limit(void);
-
-#define ARCH_LOW_ADDRESS_LIMIT dummy_physical_memory_low_limit()
-
#endif
diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c
index 9a96e178551b..278f9dec5008 100644
--- a/tools/testing/memblock/main.c
+++ b/tools/testing/memblock/main.c
@@ -4,7 +4,6 @@
#include "tests/alloc_helpers_api.h"
#include "tests/alloc_nid_api.h"
#include "tests/alloc_exact_nid_api.h"
-#include "tests/alloc_low_api.h"
#include "tests/common.h"
int main(int argc, char **argv)
@@ -13,7 +12,6 @@ int main(int argc, char **argv)
memblock_basic_checks();
memblock_alloc_checks();
memblock_alloc_helpers_checks();
- memblock_alloc_low_checks();
memblock_alloc_nid_checks();
memblock_alloc_exact_nid_checks();
diff --git a/tools/testing/memblock/tests/alloc_low_api.c b/tools/testing/memblock/tests/alloc_low_api.c
deleted file mode 100644
index a117431f1f71..000000000000
--- a/tools/testing/memblock/tests/alloc_low_api.c
+++ /dev/null
@@ -1,148 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-#include "alloc_low_api.h"
-#include <linux/align.h>
-
-/* Allocate at the first or last aligned address below the low limit. */
-static int alloc_low_simple_check(void)
-{
- struct memblock_region *rgn = &memblock.reserved.regions[0];
- phys_addr_t size = SZ_64;
- phys_addr_t expected;
- void *allocated_ptr;
-
- PREFIX_PUSH();
- setup_memblock();
-
- /* Simulated physical RAM is not necessarily SMP_CACHE_BYTES aligned. */
- if (memblock_bottom_up())
- expected = ALIGN(memblock_start_of_DRAM(), SMP_CACHE_BYTES);
- else
- expected = ALIGN_DOWN(ARCH_LOW_ADDRESS_LIMIT - size,
- SMP_CACHE_BYTES);
-
- allocated_ptr = memblock_alloc_low(size, SMP_CACHE_BYTES);
-
- ASSERT_NE(allocated_ptr, NULL);
- ASSERT_EQ((phys_addr_t)(uintptr_t)allocated_ptr, expected);
- ASSERT_MEM_EQ(allocated_ptr, 0, size);
- ASSERT_EQ(rgn->base, expected);
- ASSERT_EQ(rgn->size, size);
- ASSERT_LE(region_end(rgn), ARCH_LOW_ADDRESS_LIMIT);
- ASSERT_EQ(memblock.reserved.cnt, 1);
- ASSERT_EQ(memblock.reserved.total_size, size);
-
- test_pass_pop();
- return 0;
-}
-
-/* The last byte of the allocation is immediately below the low limit. */
-static int alloc_low_exact_limit_check(void)
-{
- phys_addr_t limit = ARCH_LOW_ADDRESS_LIMIT;
- phys_addr_t base = ALIGN_DOWN(limit - SZ_64, SMP_CACHE_BYTES);
- phys_addr_t size = limit - base;
- void *allocated_ptr;
-
- PREFIX_PUSH();
- setup_memblock();
- ASSERT_EQ(memblock_remove(memblock_start_of_DRAM(),
- base - memblock_start_of_DRAM()), 0);
-
- allocated_ptr = memblock_alloc_low(size, SMP_CACHE_BYTES);
-
- ASSERT_NE(allocated_ptr, NULL);
- ASSERT_EQ((phys_addr_t)(uintptr_t)allocated_ptr, base);
- ASSERT_MEM_EQ(allocated_ptr, 0, size);
- ASSERT_EQ(memblock.reserved.regions[0].base, base);
- ASSERT_EQ(region_end(&memblock.reserved.regions[0]), limit);
- ASSERT_EQ(memblock.reserved.cnt, 1);
- ASSERT_EQ(memblock.reserved.total_size, size);
-
- test_pass_pop();
- return 0;
-}
-
-/*
- * There are size bytes below the limit, but aligning the start makes the
- * allocation cross it. Memory above the limit must not satisfy the request.
- */
-static int alloc_low_alignment_crosses_limit_check(void)
-{
- phys_addr_t limit = ARCH_LOW_ADDRESS_LIMIT;
- phys_addr_t base = ALIGN_DOWN(limit, SMP_CACHE_BYTES) - 1;
- phys_addr_t size = limit - base;
- void *allocated_ptr;
-
- PREFIX_PUSH();
- setup_memblock();
- ASSERT_EQ(memblock_remove(memblock_start_of_DRAM(),
- base - memblock_start_of_DRAM()), 0);
-
- allocated_ptr = memblock_alloc_low(size, SMP_CACHE_BYTES);
-
- ASSERT_EQ(allocated_ptr, NULL);
- ASSERT_EQ(memblock.reserved.cnt, 0);
- ASSERT_EQ(memblock.reserved.total_size, 0);
- ASSERT_MEM_EQ((void *)(uintptr_t)base, 1, memblock_end_of_DRAM() - base);
-
- test_pass_pop();
- return 0;
-}
-
-/* Allocation must fail after reserving all low memory, with high memory free. */
-static int alloc_low_reserved_check(void)
-{
- phys_addr_t limit = ARCH_LOW_ADDRESS_LIMIT;
- phys_addr_t base = dummy_physical_memory_base();
- phys_addr_t size = SZ_64;
- void *allocated_ptr;
-
- PREFIX_PUSH();
- setup_memblock();
- ASSERT_EQ(memblock_reserve(base, limit - base), 0);
-
- allocated_ptr = memblock_alloc_low(size, SMP_CACHE_BYTES);
-
- ASSERT_EQ(allocated_ptr, NULL);
- ASSERT_EQ(memblock.reserved.cnt, 1);
- ASSERT_EQ(memblock.reserved.regions[0].base, base);
- ASSERT_EQ(memblock.reserved.regions[0].size, limit - base);
- ASSERT_EQ(memblock.reserved.total_size, limit - base);
- ASSERT_MEM_EQ((void *)(uintptr_t)base, 1, MEM_SIZE);
-
- allocated_ptr = memblock_alloc(size, SMP_CACHE_BYTES);
- ASSERT_NE(allocated_ptr, NULL);
- ASSERT_LE(limit, (phys_addr_t)(uintptr_t)allocated_ptr);
- ASSERT_MEM_EQ(allocated_ptr, 0, size);
-
- test_pass_pop();
- return 0;
-}
-
-static int alloc_low_checks(void)
-{
- alloc_low_simple_check();
- alloc_low_exact_limit_check();
- alloc_low_alignment_crosses_limit_check();
- alloc_low_reserved_check();
-
- return 0;
-}
-
-int memblock_alloc_low_checks(void)
-{
- prefix_reset();
- prefix_push("memblock_alloc_low");
- test_print("Running memblock_alloc_low tests...\n");
-
- reset_memblock_attributes();
- dummy_physical_memory_init();
-
- run_top_down(alloc_low_checks);
- run_bottom_up(alloc_low_checks);
-
- dummy_physical_memory_cleanup();
- prefix_pop();
-
- return 0;
-}
diff --git a/tools/testing/memblock/tests/alloc_low_api.h b/tools/testing/memblock/tests/alloc_low_api.h
deleted file mode 100644
index 2e3cbe336f5d..000000000000
--- a/tools/testing/memblock/tests/alloc_low_api.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef _MEMBLOCK_ALLOC_LOW_H
-#define _MEMBLOCK_ALLOC_LOW_H
-
-#include "common.h"
-
-int memblock_alloc_low_checks(void);
-
-#endif
diff --git a/tools/testing/memblock/tests/common.c b/tools/testing/memblock/tests/common.c
index ac032610a56e..3250c8e5124b 100644
--- a/tools/testing/memblock/tests/common.c
+++ b/tools/testing/memblock/tests/common.c
@@ -118,12 +118,6 @@ phys_addr_t dummy_physical_memory_base(void)
return (phys_addr_t)memory_block.base;
}
-phys_addr_t dummy_physical_memory_low_limit(void)
-{
- /* The low limit is halfway through memory registered by setup_memblock(). */
- return dummy_physical_memory_base() + MEM_SIZE / 2;
-}
-
static void usage(const char *prog)
{
BUILD_BUG_ON(ARRAY_SIZE(help_opts) != ARRAY_SIZE(long_opts) - 1);
diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c
index 1ac779072775..8df54b59513a 100644
--- a/tools/testing/selftests/cgroup/test_zswap.c
+++ b/tools/testing/selftests/cgroup/test_zswap.c
@@ -409,8 +409,6 @@ static int test_zswap_writeback(const char *root, bool wb)
* Thus, the parent's setting shall be what's in effect. */
if (cg_write(test_group, "memory.zswap.max", "max"))
goto out;
- if (cg_read_strcmp_wait(test_group, "cgroup.events", "populated 0\n"))
- goto out;
if (cg_write(test_group, "cgroup.subtree_control", "+memory"))
goto out;
@@ -654,14 +652,11 @@ static int test_no_kmem_bypass(const char *root)
break;
/* If memory was pushed to zswap, verify it belongs to memcg */
if (stored_pages > stored_pages_threshold) {
- long zswapped = cg_read_key_long(
- test_group, "memory.stat", "zswapped ");
- long long delta =
- (long long)stored_pages * page_size - zswapped;
- long long max_delta =
- (long long)stored_pages * page_size / 4;
-
- ret = (delta < max_delta) ? KSFT_PASS : KSFT_FAIL;
+ int zswapped = cg_read_key_long(test_group, "memory.stat", "zswapped ");
+ int delta = stored_pages * page_size - zswapped;
+ int result_ok = delta < stored_pages * page_size / 4;
+
+ ret = result_ok ? KSFT_PASS : KSFT_FAIL;
break;
}
}
diff --git a/tools/testing/selftests/damon/_damon_sysfs.py b/tools/testing/selftests/damon/_damon_sysfs.py
index e7095c336524..e6a2265d721e 100644
--- a/tools/testing/selftests/damon/_damon_sysfs.py
+++ b/tools/testing/selftests/damon/_damon_sysfs.py
@@ -321,10 +321,8 @@ class DamosFilters:
filters = None
scheme = None # owner scheme
- def __init__(self, name, filters=None):
+ def __init__(self, name, filters=[]):
self.name = name
- if filters is None:
- filters = []
self.filters = filters
for idx, filter_ in enumerate(self.filters):
filter_.idx = idx
@@ -370,9 +368,7 @@ class DamosDests:
dests = None
scheme = None # owner scheme
- def __init__(self, dests=None):
- if dests is None:
- dests = []
+ def __init__(self, dests=[]):
self.dests = dests
for idx, dest in enumerate(self.dests):
dest.idx = idx
@@ -430,21 +426,15 @@ class Damos:
stats = None
tried_regions = None
- def __init__(self, action='stat', access_pattern=None, quota=None,
- watermarks=None, core_filters=None, ops_filters=None,
- filters=None, target_nid=0, dests=None,
- apply_interval_us=0):
+ def __init__(self, action='stat', access_pattern=DamosAccessPattern(),
+ quota=DamosQuota(), watermarks=DamosWatermarks(),
+ core_filters=[], ops_filters=[], filters=[], target_nid=0,
+ dests=DamosDests(), apply_interval_us=0):
self.action = action
- if access_pattern is None:
- access_pattern = DamosAccessPattern()
self.access_pattern = access_pattern
self.access_pattern.scheme = self
- if quota is None:
- quota = DamosQuota()
self.quota = quota
self.quota.scheme = self
- if watermarks is None:
- watermarks = DamosWatermarks()
self.watermarks = watermarks
self.watermarks.scheme = self
@@ -458,8 +448,6 @@ class Damos:
self.filters.scheme = self
self.target_nid = target_nid
- if dests is None:
- dests = DamosDests()
self.dests = dests
self.dests.scheme = self
@@ -570,117 +558,6 @@ class IntervalsGoal:
return err
return None
-class DamonFilter:
- type_ = None
- matching = None
- allow = None
- filters = None
- path = None
- idx = None
-
- def __init__(self, type_='anon', matching=False, allow=False, path=None):
- self.type_ = type_
- self.matching = matching
- self.allow = allow
- self.path = path
-
- def sysfs_dir(self):
- return os.path.join(self.filters.sysfs_dir(), '%d' % self.idx)
-
- def stage(self):
- err = write_file(os.path.join(self.sysfs_dir(), 'type'), self.type_)
- if err is not None:
- return err
- err = write_file(os.path.join(self.sysfs_dir(), 'matching'),
- 'Y' if self.matching else 'N')
- if err is not None:
- return err
- err = write_file(os.path.join(self.sysfs_dir(), 'allow'),
- 'Y' if self.allow else 'N')
- if err is not None:
- return err
- if self.type_ == 'memcg':
- err = write_file(os.path.join(self.sysfs_dir(), 'path'), self.path)
- if err is not None:
- return err
- return None
-
-class DamonFilters:
- filters = None
- probe = None
-
- def __init__(self, filters=None):
- if filters is None:
- filters = []
- self.filters = filters
- for idx, filter in enumerate(self.filters):
- filter.filters = self
- filter.idx = idx
-
- def sysfs_dir(self):
- return os.path.join(self.probe.sysfs_dir(), 'filters')
-
- def stage(self):
- err = write_file(
- os.path.join(self.sysfs_dir(), 'nr_filters'),
- len(self.filters))
- if err is not None:
- return err
- for filter in self.filters:
- err = filter.stage()
- if err is not None:
- return err
- return None
-
-class DamonProbe:
- weight = None
- filters = None
- probes = None
- idx = None
-
- def __init__(self, weight=0, filters=None):
- self.weight = weight
- if filters is None:
- filters = DamonFilters()
- self.filters = filters
- self.filters.probe = self
-
- def sysfs_dir(self):
- return os.path.join(self.probes.sysfs_dir(), '%d' % self.idx)
-
- def stage(self):
- err = write_file(
- os.path.join(self.sysfs_dir(), 'weight'), '%d' % self.weight)
- if err is not None:
- return err
- return self.filters.stage()
-
-class DamonProbes:
- probes = None
- attrs = None
-
- def __init__(self, probes=None):
- if probes is None:
- probes = []
- self.probes = probes
- for idx, probe in enumerate(self.probes):
- probe.probes = self
- probe.idx = idx
-
- def sysfs_dir(self):
- return os.path.join(self.attrs.sysfs_dir(), 'probes')
-
- def stage(self):
- err = write_file(os.path.join(self.sysfs_dir(), 'nr_probes'),
- len(self.probes))
- if err is not None:
- return err
- for probe in self.probes:
- err = probe.stage()
- if err is not None:
- return err
- return None
-
class DamonAttrs:
sample_us = None
aggr_us = None
@@ -688,25 +565,18 @@ class DamonAttrs:
update_us = None
min_nr_regions = None
max_nr_regions = None
- probes = None
context = None
def __init__(self, sample_us=5000, aggr_us=100000,
- intervals_goal=None, update_us=1000000, min_nr_regions=10,
- max_nr_regions=1000, probes=None):
+ intervals_goal=IntervalsGoal(), update_us=1000000,
+ min_nr_regions=10, max_nr_regions=1000):
self.sample_us = sample_us
self.aggr_us = aggr_us
- if intervals_goal is None:
- intervals_goal = IntervalsGoal()
self.intervals_goal = intervals_goal
self.intervals_goal.attrs = self
self.update_us = update_us
self.min_nr_regions = min_nr_regions
self.max_nr_regions = max_nr_regions
- if probes is None:
- probes = DamonProbes()
- self.probes = probes
- self.probes.attrs = self
def interval_sysfs_dir(self):
return os.path.join(self.context.sysfs_dir(), 'monitoring_attrs',
@@ -716,9 +586,6 @@ class DamonAttrs:
return os.path.join(self.context.sysfs_dir(), 'monitoring_attrs',
'nr_regions')
- def sysfs_dir(self):
- return os.path.join(self.context.sysfs_dir(), 'monitoring_attrs')
-
def stage(self):
err = write_file(os.path.join(self.interval_sysfs_dir(), 'sample_us'),
self.sample_us)
@@ -748,10 +615,6 @@ class DamonAttrs:
if err is not None:
return err
- err = self.probes.stage()
- if err is not None:
- return err
-
class DamonCtx:
ops = None
monitoring_attrs = None
@@ -840,9 +703,7 @@ class Kdamond:
idx = None # index of this kdamond between siblings
kdamonds = None # parent
- def __init__(self, contexts=None, refresh_ms=None):
- if contexts is None:
- contexts = []
+ def __init__(self, contexts=[], refresh_ms=None):
self.contexts = contexts
self.refresh_ms = refresh_ms
for idx, context in enumerate(self.contexts):
@@ -992,9 +853,7 @@ class Kdamond:
class Kdamonds:
kdamonds = []
- def __init__(self, kdamonds=None):
- if kdamonds is None:
- kdamonds = []
+ def __init__(self, kdamonds=[]):
self.kdamonds = kdamonds
for idx, kdamond in enumerate(self.kdamonds):
kdamond.idx = idx
diff --git a/tools/testing/selftests/damon/drgn_dump_damon_status.py b/tools/testing/selftests/damon/drgn_dump_damon_status.py
index 4622046fd011..09552e91bc78 100755
--- a/tools/testing/selftests/damon/drgn_dump_damon_status.py
+++ b/tools/testing/selftests/damon/drgn_dump_damon_status.py
@@ -48,37 +48,6 @@ def attrs_to_dict(attrs):
['max_nr_regions', int],
])
-def filter_to_dict(damon_filter):
- filter_type_keyword = {
- 0: 'anon',
- 1: 'memcg',
- }
- dict_ = {
- 'type': filter_type_keyword[int(damon_filter.type)],
- 'matching': bool(damon_filter.matching),
- 'allow': bool(damon_filter.allow),
- }
- type_ = dict_['type']
- if type_ == 'memcg':
- dict_['memcg_id'] = int(damon_filter.memcg_id)
- return dict_
-
-def filters_to_list(filters):
- return [filter_to_dict(f)
- for f in list_for_each_entry(
- 'struct damon_filter', filters.address_of_(), 'list')]
-
-def probe_to_dict(probe):
- return to_dict(probe, [
- ['weight', int],
- ['filters', filters_to_list],
- ])
-
-def probes_to_list(probes):
- return [probe_to_dict(p)
- for p in list_for_each_entry(
- 'struct damon_probe', probes.address_of_(), 'list')]
-
def addr_range_to_dict(addr_range):
return to_dict(addr_range, [
['start', int],
@@ -230,7 +199,6 @@ def damon_ctx_to_dict(ctx):
return to_dict(ctx, [
['ops', ops_to_dict],
['attrs', attrs_to_dict],
- ['probes', probes_to_list],
['adaptive_targets', targets_to_list],
['schemes', schemes_to_list],
['pause', bool],
diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py
index 66c826189320..3ffa054b6386 100755
--- a/tools/testing/selftests/damon/sysfs.py
+++ b/tools/testing/selftests/damon/sysfs.py
@@ -178,24 +178,6 @@ def assert_monitoring_attrs_committed(attrs, dump):
assert_true(dump['max_nr_regions'] == attrs.max_nr_regions,
'max_nr_regions', dump)
-def assert_damon_filters_committed(filters, dump):
- assert_true(len(dump) == len(filters.filters), 'probe filters', dump)
- for idx, damon_filter in enumerate(filters.filters):
- filter_dump = dump[idx]
- assert_true(filter_dump['type'] == damon_filter.type_, 'type',
- filter_dump)
- assert_true(filter_dump['matching'] == damon_filter.matching,
- 'matching', filter_dump)
- assert_true(filter_dump['allow'] == damon_filter.allow, 'allow',
- filter_dump)
-
-def assert_probes_committed(probes, dump):
- assert_true(len(dump) == len(probes.probes), 'probes length', dump)
- for idx, probe in enumerate(probes.probes):
- probe_dump = dump[idx]
- assert_true(probe.weight == probe_dump['weight'], 'weight', probe_dump)
- assert_damon_filters_committed(probe.filters, probe_dump['filters'])
-
def assert_monitoring_target_committed(target, dump):
# target.pid is the pid "number", while dump['pid'] is 'struct pid'
# pointer, and hence cannot be compared.
@@ -214,7 +196,6 @@ def assert_ctx_committed(ctx, dump):
}
assert_true(dump['ops']['id'] == ops_val[ctx.ops], 'ops_id', dump)
assert_monitoring_attrs_committed(ctx.monitoring_attrs, dump['attrs'])
- assert_probes_committed(ctx.monitoring_attrs.probes, dump['probes'])
assert_monitoring_targets_committed(ctx.targets, dump['adaptive_targets'])
assert_schemes_committed(ctx.schemes, dump['schemes'])
assert_true(dump['pause'] == ctx.pause, 'pause', dump)
@@ -319,21 +300,7 @@ def main():
intervals_goal=_damon_sysfs.IntervalsGoal(
access_bp=400, aggrs=3, min_sample_us=5000,
max_sample_us=10000000),
- update_us=2000000,
- probes=_damon_sysfs.DamonProbes(
- probes=[_damon_sysfs.DamonProbe(
- weight=42,
- filters=_damon_sysfs.DamonFilters(
- filters=[
- _damon_sysfs.DamonFilter(
- type_='anon',
- matching=True,
- allow=True,
- ),
- ]),
- ),
- ]),
- ),
+ update_us=2000000),
schemes=[_damon_sysfs.Damos(
action='pageout',
access_pattern=_damon_sysfs.DamosAccessPattern(
@@ -418,10 +385,6 @@ def main():
assert_ctxs_committed(kdamonds)
kdamonds.stop()
- for proc in (proc1, proc2, proc3):
- proc.terminate()
- proc.communicate()
-
test_memcg_filter_memcg_path_staging()
if __name__ == '__main__':
diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh
index b66593c9ac47..f7fb94b84e71 100755
--- a/tools/testing/selftests/damon/sysfs.sh
+++ b/tools/testing/selftests/damon/sysfs.sh
@@ -210,7 +210,6 @@ test_goal()
ensure_write_succ "$fpath" "active_mem_bp" "valid input"
ensure_write_succ "$fpath" "inactive_mem_bp" "valid input"
ensure_write_succ "$fpath" "node_eligible_mem_bp" "valid input"
- ensure_write_succ "$fpath" "hugepage_mem_bp" "valid input"
ensure_write_fail "$fpath" "foo" "invalid input"
ensure_file "$goal_dir/nid" "exist" "600"
ensure_file "$goal_dir/path" "exist" "600"
@@ -362,32 +361,6 @@ test_intervals()
test_intervals_goal "$intervals_dir/intervals_goal"
}
-test_damon_prep()
-{
- damon_prep_dir=$1
- ensure_file "$damon_prep_dir/prep_action" "exist" "600"
- ensure_write_succ "$damon_prep_dir/prep_action" "set_pgidle" \
- "valid input"
- ensure_write_fail "$damon_prep_dir/prep_action" "foo" "invalid input"
-}
-
-test_damon_preps()
-{
- preps_dir=$1
- ensure_dir "$preps_dir" "exist"
- ensure_file "$preps_dir/nr_preps" "exist" "600"
- ensure_write_succ "$preps_dir/nr_preps" "1" "valid input"
- test_damon_prep "$preps_dir/0"
-
- ensure_write_succ "$preps_dir/nr_preps" "2" "valid input"
- test_damon_prep "$preps_dir/0"
- test_damon_prep "$preps_dir/1"
-
- ensure_write_succ "$preps_dir/nr_preps" "0" "valid input"
- ensure_dir "$preps_dir/0" "not_exist"
- ensure_dir "$preps_dir/1" "not_exist"
-}
-
test_damon_filter()
{
damon_filter_dir=$1
@@ -419,7 +392,6 @@ test_probe()
{
probe_dir=$1
ensure_dir "$probe_dir" "exist"
- test_damon_preps "$probe_dir/preps"
test_damon_filters "$probe_dir/filters"
}
diff --git a/tools/testing/selftests/drivers/net/hds.py b/tools/testing/selftests/drivers/net/hds.py
index c4fe049e9baa..606e26d75951 100755
--- a/tools/testing/selftests/drivers/net/hds.py
+++ b/tools/testing/selftests/drivers/net/hds.py
@@ -240,35 +240,6 @@ def enabled_set_xdp(cfg, netnl) -> None:
_xdp_onoff(cfg)
-def set_xdp(cfg, netnl) -> None:
- """
- Enable single-buffer XDP on the device.
- When HDS is in "auto" / UNKNOWN mode, XDP installation should work.
- """
- mode = _get_hds_mode(cfg, netnl)
- if mode == 'enabled':
- netnl.rings_set({'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'unknown'})
-
- _xdp_onoff(cfg)
-
-
-def enabled_set_xdp(cfg, netnl) -> None:
- """
- Enable single-buffer XDP on the device.
- When HDS is in "enabled" mode, XDP installation should not work.
- """
- _get_hds_mode(cfg, netnl) # Trigger skip if not supported
-
- netnl.rings_set({'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'enabled'})
- defer(netnl.rings_set, {'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'unknown'})
-
- with ksft_raises(CmdExitFailure) as e:
- _xdp_onoff(cfg)
-
-
def ioctl(cfg, netnl) -> None:
mode1 = _get_hds_mode(cfg, netnl)
_ioctl_ringparam_modify(cfg, netnl)
diff --git a/tools/testing/selftests/drivers/net/hw/devmem_lib.py b/tools/testing/selftests/drivers/net/hw/devmem_lib.py
index 3554954a6691..71b916c16196 100644
--- a/tools/testing/selftests/drivers/net/hw/devmem_lib.py
+++ b/tools/testing/selftests/drivers/net/hw/devmem_lib.py
@@ -201,7 +201,7 @@ def socat_send(cfg, port, buf_size=0):
else:
addr = cfg.baddr
- suffix = f",bind={cfg.remote_baddr}:{port}"
+ suffix = f",bind={cfg.remote_baddr}:{port},reuseaddr"
buf = ""
if buf_size:
@@ -213,7 +213,7 @@ def socat_send(cfg, port, buf_size=0):
def socat_listen(cfg, port):
"""Socat listen command for TX tests."""
- return f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port}"
+ return f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port},reuseaddr"
def setup_test(cfg, bin_local):
diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py
index 315648a770d0..13ff5188cca3 100755
--- a/tools/testing/selftests/drivers/net/psp.py
+++ b/tools/testing/selftests/drivers/net/psp.py
@@ -525,11 +525,11 @@ def data_stale_key(cfg):
def __nsim_psp_rereg(cfg):
# The PSP dev ID will change, remember what was there before
- before = set([x['id'] for x in cfg.pspnl.dev_get({}, dump=True)])
+ before = {x['id'] for x in cfg.pspnl.dev_get({}, dump=True)}
cfg._ns.nsims[0].dfs_write('psp_rereg', '1')
- after = set([x['id'] for x in cfg.pspnl.dev_get({}, dump=True)])
+ after = {x['id'] for x in cfg.pspnl.dev_get({}, dump=True)}
new_devs = list(after - before)
ksft_eq(len(new_devs), 1)
@@ -723,6 +723,111 @@ def _dev_change_notify_multi_ns_netkit(cfg):
f" in {label} namespace")
+def _subscribe_mgmt(cfg):
+ """Listen on the mgmt group in the guest and in the main namespace."""
+ # Listener in the guest namespace; socket stays bound to that ns
+ with NetNSEnter(cfg.netns.name):
+ peer_pspnl = PSPFamily()
+ peer_pspnl.ntf_subscribe('mgmt')
+
+ main_pspnl = PSPFamily()
+ main_pspnl.ntf_subscribe('mgmt')
+
+ return main_pspnl, peer_pspnl
+
+
+def _get_dev_ntf(cfg, pspnl, label):
+ """Wait for the next notification about the PSP device under test."""
+ for ntf in pspnl.poll_ntf(duration=10):
+ if ntf['msg'].get('id') == cfg.psp_dev_id:
+ return ntf
+ raise KsftFailEx(f"No notification received in the {label} namespace")
+
+
+def _check_disassoc_ntf(cfg, main_pspnl, peer_pspnl, ifindex):
+ """Check the notifications for a netns losing its last association."""
+ ntf = _get_dev_ntf(cfg, main_pspnl, "main")
+ ksft_eq(ntf['name'], 'dev-change-ntf')
+ for assoc in ntf['msg'].get('assoc-list', []):
+ if assoc['nsid'] != cfg.psp_dev_peer_nsid:
+ continue
+ ksft_ne(assoc['ifindex'], ifindex,
+ "Disassociated device still listed in the notification")
+
+ # The device is gone as far as the disassociated namespace is concerned
+ ntf = _get_dev_ntf(cfg, peer_pspnl, "guest")
+ ksft_eq(ntf['name'], 'dev-del-ntf')
+ ksft_true('ifindex' not in ntf['msg'],
+ "ifindex reported to an associated namespace")
+
+
+def _dev_disassoc_notify_multi_ns_netkit(cfg):
+ """ Test the notifications dev-disassoc generates in both namespaces """
+ _init_psp_dev(cfg, True)
+ defer(delattr, cfg, 'psp_dev_id')
+ defer(delattr, cfg, 'psp_info')
+
+ cfg.pspnl.dev_assoc({'id': cfg.psp_dev_id,
+ 'ifindex': cfg.nk_guest_ifindex,
+ 'nsid': cfg.psp_dev_peer_nsid})
+ defer(_try_disassoc, cfg, cfg.psp_dev_id, cfg.nk_guest_ifindex,
+ cfg.psp_dev_peer_nsid)
+
+ main_pspnl, peer_pspnl = _subscribe_mgmt(cfg)
+
+ cfg.pspnl.dev_disassoc({'id': cfg.psp_dev_id,
+ 'ifindex': cfg.nk_guest_ifindex,
+ 'nsid': cfg.psp_dev_peer_nsid})
+
+ _check_disassoc_ntf(cfg, main_pspnl, peer_pspnl, cfg.nk_guest_ifindex)
+
+
+def _dev_disassoc_notify_one_of_two_netkit(cfg):
+ """Test the notifications with two netkits associated in one netns.
+
+ Disassociating the first netkit leaves the PSP device visible in the
+ guest namespace, generates a dev-change-ntf.
+ Disassociating the second one takes the device out of its view,
+ generates 'dev-del-ntf'.
+ """
+ _init_psp_dev(cfg, True)
+ defer(delattr, cfg, 'psp_dev_id')
+ defer(delattr, cfg, 'psp_info')
+
+ tmp_ifindex, _ = _add_netkit_guest(cfg, "tmp_nk_host", "tmp_nk_guest")
+
+ for ifindex in [cfg.nk_guest_ifindex, tmp_ifindex]:
+ cfg.pspnl.dev_assoc({'id': cfg.psp_dev_id, 'ifindex': ifindex,
+ 'nsid': cfg.psp_dev_peer_nsid})
+ defer(_try_disassoc, cfg, cfg.psp_dev_id, ifindex,
+ cfg.psp_dev_peer_nsid)
+
+ main_pspnl, peer_pspnl = _subscribe_mgmt(cfg)
+
+ # One of the two goes away, the device stays visible in the guest netns
+ cfg.pspnl.dev_disassoc({'id': cfg.psp_dev_id, 'ifindex': tmp_ifindex,
+ 'nsid': cfg.psp_dev_peer_nsid})
+
+ ntf = _get_dev_ntf(cfg, main_pspnl, "main")
+ ksft_eq(ntf['name'], 'dev-change-ntf')
+
+ ntf = _get_dev_ntf(cfg, peer_pspnl, "guest")
+ ksft_eq(ntf['name'], 'dev-change-ntf')
+ found = False
+ for assoc in ntf['msg'].get('assoc-list', []):
+ ksft_ne(assoc['ifindex'], tmp_ifindex,
+ "Disassociated device still listed in the notification")
+ found |= assoc['ifindex'] == cfg.nk_guest_ifindex
+ ksft_true(found, "Remaining association missing from the notification")
+
+ # And now the last one, the device disappears from the guest netns
+ cfg.pspnl.dev_disassoc({'id': cfg.psp_dev_id,
+ 'ifindex': cfg.nk_guest_ifindex,
+ 'nsid': cfg.psp_dev_peer_nsid})
+
+ _check_disassoc_ntf(cfg, main_pspnl, peer_pspnl, cfg.nk_guest_ifindex)
+
+
def _psp_dev_get_check_netkit_psp_assoc(cfg):
""" Check psp dev-get output with netkit interface associated with PSP dev """
_assoc_nk_guest(cfg)
@@ -749,6 +854,10 @@ def _psp_dev_get_check_netkit_psp_assoc(cfg):
ksft_not_none(peer_dev, "No PSP device found with by-association flag in guest netns")
+ # ifindex of the main netdevice means nothing in this namespace
+ ksft_true('ifindex' not in peer_dev,
+ "ifindex reported to an associated namespace")
+
# Verify assoc-list contains the nk_guest device
ksft_true('assoc-list' in peer_dev and len(peer_dev['assoc-list']) > 0,
"Guest device should have assoc-list with local devices")
@@ -794,25 +903,18 @@ def _dev_assoc_no_nsid(cfg):
ksft_true(not found, "Device should not be in assoc-list after disassociation")
-def _psp_dev_assoc_cleanup_on_netkit_del(cfg):
- """Test that assoc-list is cleared when associated netkit is deleted.
+def _add_netkit_guest(cfg, host_name, guest_name):
+ """Create a netkit pair and move its peer into the test namespace.
- Creates a disposable netkit pair for this test to avoid destroying
- the shared environment.
+ Returns the peer's ifindex there and the defer() deleting the pair.
"""
- _init_psp_dev(cfg, True)
- defer(delattr, cfg, 'psp_dev_id')
- defer(delattr, cfg, 'psp_info')
-
- existing = {cfg.nk_host_ifindex, cfg.nk_guest_ifindex}
+ existing = {link['ifindex'] for link in ip("-d link show", json=True)
+ if link.get('linkinfo', {}).get('info_kind') == 'netkit'}
- # Create a temporary netkit pair
- tmp_host_name = "tmp_nk_host"
- tmp_guest_name = "tmp_nk_guest"
rtnl = RtnlFamily()
rtnl.newlink(
{
- "ifname": tmp_host_name,
+ "ifname": host_name,
"linkinfo": {
"kind": "netkit",
"data": {
@@ -824,25 +926,38 @@ def _psp_dev_assoc_cleanup_on_netkit_del(cfg):
},
flags=[Netlink.NLM_F_CREATE, Netlink.NLM_F_EXCL],
)
- cleanup_netkit = defer(ip, f"link del {tmp_host_name}")
+ cleanup = defer(ip, f"link del {host_name}")
# Find the peer by diffing against existing netkit ifindexes
all_links = ip("-d link show", json=True)
- tmp_peer = [link for link in all_links
- if link.get('linkinfo', {}).get('info_kind') == 'netkit'
- and link['ifindex'] not in existing
- and link['ifname'] != tmp_host_name]
- ksft_eq(len(tmp_peer), 1,
- "Failed to find temporary netkit peer")
- guest_name = tmp_peer[0]['ifname']
+ peer = [link for link in all_links
+ if link.get('linkinfo', {}).get('info_kind') == 'netkit'
+ and link['ifindex'] not in existing
+ and link['ifname'] != host_name]
+ ksft_eq(len(peer), 1, "Failed to find the new netkit peer")
# Rename and move guest end into the test namespace
- ip(f"link set dev {guest_name} name {tmp_guest_name}")
- ip(f"link set dev {tmp_guest_name} netns {cfg.netns.name}")
- tmp_guest_dev = ip(f"link show dev {tmp_guest_name}",
- json=True, ns=cfg.netns)[0]
- tmp_guest_ifindex = tmp_guest_dev['ifindex']
- ip(f"link set dev {tmp_guest_name} up", ns=cfg.netns)
+ ip(f"link set dev {peer[0]['ifname']} name {guest_name}")
+ ip(f"link set dev {guest_name} netns {cfg.netns.name}")
+ guest_dev = ip(f"link show dev {guest_name}", json=True, ns=cfg.netns)[0]
+ ip(f"link set dev {guest_name} up", ns=cfg.netns)
+
+ return guest_dev['ifindex'], cleanup
+
+
+def _psp_dev_assoc_cleanup_on_netkit_del(cfg):
+ """Test that assoc-list is cleared when associated netkit is deleted.
+
+ Creates a disposable netkit pair for this test to avoid destroying
+ the shared environment.
+ """
+ _init_psp_dev(cfg, True)
+ defer(delattr, cfg, 'psp_dev_id')
+ defer(delattr, cfg, 'psp_info')
+
+ tmp_host_name = "tmp_nk_host"
+ tmp_guest_ifindex, cleanup_netkit = _add_netkit_guest(cfg, tmp_host_name,
+ "tmp_nk_guest")
# Associate PSP device with the temporary guest interface
cfg.pspnl.dev_assoc({'id': cfg.psp_dev_id,
@@ -853,6 +968,9 @@ def _psp_dev_assoc_cleanup_on_netkit_del(cfg):
_check_assoc_list(cfg, cfg.psp_dev_id, tmp_guest_ifindex,
cfg.psp_dev_peer_nsid)
+ # Removing the netdevice is notified like a disassociation
+ main_pspnl, peer_pspnl = _subscribe_mgmt(cfg)
+
# Delete the temporary netkit pair (deleting one end removes both)
ip(f"link del {tmp_host_name}")
cleanup_netkit.cancel()
@@ -863,6 +981,8 @@ def _psp_dev_assoc_cleanup_on_netkit_del(cfg):
or len(dev_info['assoc-list']) == 0,
"assoc-list should be empty after netkit deletion")
+ _check_disassoc_ntf(cfg, main_pspnl, peer_pspnl, tmp_guest_ifindex)
+
def _try_disassoc(cfg, psp_dev_id, ifindex, nsid=None):
"""Best-effort disassociate, ignoring errors if already removed."""
@@ -981,6 +1101,8 @@ def main() -> None:
data_basic_send_netkit_psp_assoc,
_key_rotation_notify_multi_ns_netkit,
_dev_change_notify_multi_ns_netkit,
+ _dev_disassoc_notify_multi_ns_netkit,
+ _dev_disassoc_notify_one_of_two_netkit,
_psp_dev_get_check_netkit_psp_assoc,
_dev_assoc_no_nsid,
_psp_dev_assoc_cleanup_on_netkit_del,
diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
index 96bab7002d39..6a1482e3a286 100644
--- a/tools/testing/selftests/kvm/Makefile.kvm
+++ b/tools/testing/selftests/kvm/Makefile.kvm
@@ -189,6 +189,7 @@ TEST_GEN_PROGS_arm64 += arm64/stage2_block_transitions
TEST_GEN_PROGS_arm64 += arm64/vcpu_width_config
TEST_GEN_PROGS_arm64 += arm64/vgic_init
TEST_GEN_PROGS_arm64 += arm64/vgic_irq
+TEST_GEN_PROGS_arm64 += arm64/vgic_its_save
TEST_GEN_PROGS_arm64 += arm64/vgic_lpi_stress
TEST_GEN_PROGS_arm64 += arm64/vgic_v5
TEST_GEN_PROGS_arm64 += arm64/vpmu_counter_access
diff --git a/tools/testing/selftests/kvm/arm64/smccc_filter.c b/tools/testing/selftests/kvm/arm64/smccc_filter.c
index 21e41880261b..a41ed3e016ba 100644
--- a/tools/testing/selftests/kvm/arm64/smccc_filter.c
+++ b/tools/testing/selftests/kvm/arm64/smccc_filter.c
@@ -140,6 +140,10 @@ static void test_invalid_nr_functions(void)
TEST_ASSERT(r < 0 && errno == EINVAL,
"Attempt to filter 0 functions should return EINVAL");
+ r = __set_smccc_filter(vm, 0, 0, KVM_SMCCC_FILTER_DENY);
+ TEST_ASSERT(r < 0 && errno == EINVAL,
+ "Attempt to filter 0 functions at base 0 should return EINVAL");
+
kvm_vm_free(vm);
}
diff --git a/tools/testing/selftests/kvm/arm64/vgic_its_save.c b/tools/testing/selftests/kvm/arm64/vgic_its_save.c
new file mode 100644
index 000000000000..9a8a65fd7196
--- /dev/null
+++ b/tools/testing/selftests/kvm/arm64/vgic_its_save.c
@@ -0,0 +1,441 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * vgic_its_save - KVM_DEV_ARM_ITS_SAVE_TABLES against tables a guest broke.
+ *
+ * Both cases are reachable by a guest on its own, and neither may fail a save
+ * that userspace has to be able to issue:
+ *
+ * - Changing GITS_BASER<coll> drops the collections it described, so the save
+ * writes nothing but the terminating invalid entry.
+ * - A device the device table can no longer address is skipped, and the saved
+ * DTE chain skips it too rather than pointing at an entry never written.
+ *
+ * Both cases then reset and restore, which is what the save exists for.
+ *
+ * Copyright (c) 2026 Google LLC
+ * Author: Fuad Tabba <fuad.tabba@linux.dev>
+ */
+
+#include <endian.h>
+#include <linux/align.h>
+#include <linux/bitfield.h>
+#include <linux/sizes.h>
+
+#include "kvm_util.h"
+#include "gic.h"
+#include "gic_v3.h"
+#include "gic_v3_its.h"
+#include "processor.h"
+#include "ucall.h"
+#include "vgic.h"
+
+#define TEST_MEMSLOT_INDEX 1
+
+/* All three ITS table entry sizes are 8 bytes in ABI 0. */
+#define ESZ 8
+#define ENTRIES_PER_PAGE (SZ_64K / ESZ)
+
+/* CTE and DTE layout, mirroring KVM's KVM_ITS_* in arch/arm64/kvm/vgic/vgic.h */
+#define CTE_VALID_MASK BIT_ULL(63)
+#define DTE_VALID_MASK BIT_ULL(63)
+#define DTE_NEXT_SHIFT 49
+#define DTE_NEXT_MASK GENMASK_ULL(62, 49)
+
+/* L1 entry of an indirect table: valid bit plus a 64K aligned L2 address. */
+#define L1E_VALID_MASK BIT_ULL(63)
+#define L1E_ADDR_MASK GENMASK_ULL(51, 16)
+
+#define GITS_BASER_PAGES_MASK GENMASK_ULL(7, 0)
+
+#define POISON 0xdeadbeefdeadbeefULL
+
+/* The collection table starts at two pages and is shrunk to one. */
+#define COLL_TBL_PAGES 2
+#define COLL_TBL_SZ (COLL_TBL_PAGES * SZ_64K)
+
+/* One more collection than the shrunken table can hold. */
+#define NR_COLLECTIONS (ENTRIES_PER_PAGE + 1)
+
+/* Two devices, one per L2 block of the indirect device table. */
+#define DEVICE_A_ID 0
+#define DEVICE_B_ID ENTRIES_PER_PAGE
+
+/*
+ * its_send_mapd_cmd() encodes ilog2(itt_size) - 1 as num_eventid_bits, and
+ * vgic_its_restore_itt() scans BIT_ULL(num_eventid_bits) * ESZ, so the size
+ * handed to MAPD has to match the ITT allocated for it.
+ */
+#define ITT_EVENTID_BITS 13
+#define ITT_MAPD_SIZE BIT_ULL(ITT_EVENTID_BITS + 1)
+#define ITT_SZ (BIT_ULL(ITT_EVENTID_BITS) * ESZ)
+
+static struct kvm_vm *vm;
+static struct kvm_vcpu *vcpu;
+static int its_fd;
+static gpa_t gpa_base;
+
+static struct test_data {
+ gpa_t device_table;
+ gpa_t collection_table;
+ gpa_t cmdq_base;
+ void *cmdq_base_va;
+
+ gpa_t lpi_prop_table;
+ gpa_t lpi_pend_table;
+
+ void *device_l1_va;
+ gpa_t device_l2[2];
+ gpa_t itt_tables;
+} test_data;
+
+static unsigned long its_baser_offset(unsigned int type)
+{
+ int i;
+
+ for (i = 0; i < GITS_BASER_NR_REGS; i++) {
+ unsigned long offset = GITS_BASER + (i * sizeof(u64));
+ u64 baser = readq_relaxed(GITS_BASE_GVA + offset);
+
+ if (GITS_BASER_TYPE(baser) == type)
+ return offset;
+ }
+
+ GUEST_FAIL("Couldn't find an ITS BASER of type %u", type);
+ return -1;
+}
+
+static void its_set_enable(bool enable)
+{
+ u32 ctlr = readl_relaxed(GITS_BASE_GVA + GITS_CTLR);
+
+ if (enable)
+ ctlr |= GITS_CTLR_ENABLE;
+ else
+ ctlr &= ~GITS_CTLR_ENABLE;
+
+ writel_relaxed(ctlr, GITS_BASE_GVA + GITS_CTLR);
+}
+
+/*
+ * Shrink the collection table to a single page, leaving VALID set. BASER
+ * writes are ignored while the ITS is enabled.
+ */
+static void guest_shrink_coll_table(void)
+{
+ unsigned long offset = its_baser_offset(GITS_BASER_TYPE_COLLECTION);
+ u64 baser;
+
+ its_set_enable(false);
+
+ baser = readq_relaxed(GITS_BASE_GVA + offset);
+ baser &= ~GITS_BASER_PAGES_MASK;
+ writeq_relaxed(baser, GITS_BASE_GVA + offset);
+}
+
+static void guest_baser_change(void)
+{
+ u32 coll_id;
+
+ gic_init(GIC_V3, 1);
+ gic_rdist_enable_lpis(test_data.lpi_prop_table, SZ_64K,
+ test_data.lpi_pend_table);
+
+ its_init(test_data.collection_table, COLL_TBL_SZ,
+ test_data.device_table, SZ_64K,
+ test_data.cmdq_base, SZ_64K);
+
+ for (coll_id = 0; coll_id < NR_COLLECTIONS; coll_id++)
+ its_send_mapc_cmd(test_data.cmdq_base_va, 0, coll_id, true);
+
+ guest_shrink_coll_table();
+
+ GUEST_DONE();
+}
+
+/* Turn the already installed device table into an indirect one. */
+static void guest_make_device_table_indirect(void)
+{
+ unsigned long offset = its_baser_offset(GITS_BASER_TYPE_DEVICE);
+ u64 baser;
+
+ its_set_enable(false);
+
+ baser = readq_relaxed(GITS_BASE_GVA + offset);
+ writeq_relaxed(baser | GITS_BASER_INDIRECT, GITS_BASE_GVA + offset);
+
+ its_set_enable(true);
+}
+
+static void guest_unreachable_device(void)
+{
+ u64 *l1;
+
+ gic_init(GIC_V3, 1);
+ gic_rdist_enable_lpis(test_data.lpi_prop_table, SZ_64K,
+ test_data.lpi_pend_table);
+
+ its_init(test_data.collection_table, SZ_64K,
+ test_data.device_table, SZ_64K,
+ test_data.cmdq_base, SZ_64K);
+
+ guest_make_device_table_indirect();
+
+ /* Both L2 blocks present, so both MAPDs are in range. */
+ l1 = test_data.device_l1_va;
+ l1[0] = L1E_VALID_MASK | (test_data.device_l2[0] & L1E_ADDR_MASK);
+ l1[1] = L1E_VALID_MASK | (test_data.device_l2[1] & L1E_ADDR_MASK);
+
+ its_send_mapd_cmd(test_data.cmdq_base_va, DEVICE_A_ID,
+ test_data.itt_tables, ITT_MAPD_SIZE, true);
+ its_send_mapd_cmd(test_data.cmdq_base_va, DEVICE_B_ID,
+ test_data.itt_tables + ITT_SZ, ITT_MAPD_SIZE, true);
+
+ /*
+ * Drop the block holding device B. No ITS command and no GITS_BASER
+ * write is involved, so nothing tells KVM the device is now
+ * unreachable.
+ */
+ l1[1] = 0;
+
+ GUEST_DONE();
+}
+
+static void run_guest(void)
+{
+ struct ucall uc;
+
+ vcpu_run(vcpu);
+ switch (get_ucall(vcpu, &uc)) {
+ case UCALL_DONE:
+ break;
+ case UCALL_ABORT:
+ REPORT_GUEST_ASSERT(uc);
+ break;
+ default:
+ TEST_FAIL("Unexpected ucall: %lu", uc.cmd);
+ }
+}
+
+static int save_tables(void)
+{
+ return __kvm_device_attr_set(its_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_SAVE_TABLES, NULL);
+}
+
+static u64 its_reg_get(unsigned long offset)
+{
+ u64 val;
+
+ kvm_device_attr_get(its_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, offset,
+ &val);
+ return val;
+}
+
+static void its_reg_set(unsigned long offset, u64 val)
+{
+ kvm_device_attr_set(its_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, offset,
+ &val);
+}
+
+/*
+ * What a migration target does with the saved tables, in the order
+ * Documentation/virt/kvm/devices/arm-vgic-its.rst gives: the GITS_ registers
+ * first, then the tables. The reset in between clears GITS_BASER<n>.Valid,
+ * which is why the registers have to be written back before the restore.
+ */
+static void reset_and_restore_tables(void)
+{
+ u64 baser[GITS_BASER_NR_REGS];
+ int ret, i;
+
+ for (i = 0; i < GITS_BASER_NR_REGS; i++)
+ baser[i] = its_reg_get(GITS_BASER + (i * sizeof(u64)));
+
+ ret = __kvm_device_attr_set(its_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_CTRL_RESET, NULL);
+ TEST_ASSERT(!ret, "Expected the reset to succeed, got ret %d errno %d",
+ ret, errno);
+
+ for (i = 0; i < GITS_BASER_NR_REGS; i++)
+ its_reg_set(GITS_BASER + (i * sizeof(u64)), baser[i]);
+
+ ret = __kvm_device_attr_set(its_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_RESTORE_TABLES, NULL);
+ TEST_ASSERT(!ret, "Expected the restore to succeed, got ret %d errno %d",
+ ret, errno);
+}
+
+static void poison_range(gpa_t base, size_t size)
+{
+ u64 *entry = addr_gpa2hva(vm, base);
+ size_t i;
+
+ for (i = 0; i < size / ESZ; i++)
+ entry[i] = POISON;
+}
+
+static void setup_memslot(size_t sz)
+{
+ size_t pages = sz / vm->page_size;
+
+ gpa_base = ((vm_compute_max_gfn(vm) + 1) * vm->page_size) - sz;
+ vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, gpa_base,
+ TEST_MEMSLOT_INDEX, pages, 0);
+}
+
+static gpa_t alloc_64k(size_t nr)
+{
+ size_t pages_per_64k = vm_calc_num_guest_pages(vm->mode, SZ_64K);
+ gpa_t gpa = vm_phy_pages_alloc(vm, nr * pages_per_64k,
+ MEM_REGION_TEST_EXTRA);
+
+ TEST_ASSERT(IS_ALIGNED(gpa, SZ_64K),
+ "Allocation at 0x%lx is not 64K aligned, GITS_BASER cannot address it",
+ gpa);
+ return gpa;
+}
+
+static void map_to_guest(gpa_t gpa, size_t nr)
+{
+ size_t pages_per_64k = vm_calc_num_guest_pages(vm->mode, SZ_64K);
+
+ virt_map(vm, gpa, gpa, nr * pages_per_64k);
+}
+
+static void setup_common(void)
+{
+ test_data.cmdq_base = alloc_64k(1);
+ map_to_guest(test_data.cmdq_base, 1);
+ test_data.cmdq_base_va = (void *)test_data.cmdq_base;
+
+ test_data.lpi_prop_table = alloc_64k(1);
+ test_data.lpi_pend_table = alloc_64k(1);
+}
+
+static void teardown(void)
+{
+ close(its_fd);
+ kvm_vm_free(vm);
+ memset(&test_data, 0, sizeof(test_data));
+}
+
+/*
+ * A GITS_BASER<coll> write that changes the table drops the collections it
+ * described. The save then has an empty list, so it writes the terminating
+ * invalid entry and nothing else.
+ */
+static void test_baser_change_drops_collections(void)
+{
+ u64 *cte;
+ int ret, i;
+
+ pr_info("Testing that a GITS_BASER change drops the collections\n");
+
+ vm = vm_create_with_one_vcpu(&vcpu, guest_baser_change);
+ setup_memslot((4 + COLL_TBL_PAGES) * SZ_64K);
+ its_fd = vgic_its_setup(vm);
+
+ test_data.device_table = alloc_64k(1);
+ test_data.collection_table = alloc_64k(COLL_TBL_PAGES);
+ setup_common();
+
+ sync_global_to_guest(vm, test_data);
+ run_guest();
+
+ /* Anything KVM writes is then the only thing that changed. */
+ poison_range(test_data.collection_table, COLL_TBL_SZ);
+
+ ret = save_tables();
+ TEST_ASSERT(!ret, "Expected the save to succeed, got %d errno %d",
+ ret, errno);
+
+ cte = addr_gpa2hva(vm, test_data.collection_table);
+
+ /*
+ * Finding the terminator at the head of the table is also what proves
+ * the reads below landed in the saved table rather than elsewhere.
+ */
+ TEST_ASSERT(le64toh(cte[0]) == 0,
+ "CTE 0: expected the terminating invalid entry, got 0x%llx",
+ (unsigned long long)le64toh(cte[0]));
+
+ for (i = 1; i < COLL_TBL_SZ / ESZ; i++)
+ TEST_ASSERT(cte[i] == POISON,
+ "CTE %d: expected it untouched, got 0x%llx",
+ i, (unsigned long long)cte[i]);
+
+ reset_and_restore_tables();
+
+ teardown();
+}
+
+/*
+ * A device whose L2 block the guest dropped is skipped by the save, and the
+ * DTE chain skips it too: left alone, the surviving device would point at an
+ * entry the save never wrote.
+ */
+static void test_unreachable_device_skipped(void)
+{
+ u64 dte;
+ int ret;
+
+ pr_info("Testing that an unreachable device is skipped by the save\n");
+
+ vm = vm_create_with_one_vcpu(&vcpu, guest_unreachable_device);
+ setup_memslot(9 * SZ_64K);
+ its_fd = vgic_its_setup(vm);
+
+ test_data.device_table = alloc_64k(1);
+ test_data.collection_table = alloc_64k(1);
+ test_data.device_l2[0] = alloc_64k(1);
+ test_data.device_l2[1] = alloc_64k(1);
+ test_data.itt_tables = alloc_64k(2);
+ setup_common();
+
+ map_to_guest(test_data.device_table, 1);
+ test_data.device_l1_va = (void *)test_data.device_table;
+
+ sync_global_to_guest(vm, test_data);
+ run_guest();
+
+ poison_range(test_data.device_l2[0], SZ_64K);
+ poison_range(test_data.device_l2[1], SZ_64K);
+
+ ret = save_tables();
+ TEST_ASSERT(!ret, "Expected the save to succeed, got %d errno %d",
+ ret, errno);
+
+ dte = le64toh(*(u64 *)addr_gpa2hva(vm, test_data.device_l2[0]));
+
+ /* Device A is still reachable, so it is saved. */
+ TEST_ASSERT(dte & DTE_VALID_MASK,
+ "Device A: expected a valid DTE, got 0x%llx",
+ (unsigned long long)dte);
+
+ /*
+ * Device B is the only device after it and was skipped, so nothing
+ * follows A in the saved chain.
+ */
+ TEST_ASSERT(FIELD_GET(DTE_NEXT_MASK, dte) == 0,
+ "Device A: expected no next device, got offset %llu",
+ (unsigned long long)FIELD_GET(DTE_NEXT_MASK, dte));
+
+ /* And nothing was written into the block the guest dropped. */
+ TEST_ASSERT(*(u64 *)addr_gpa2hva(vm, test_data.device_l2[1]) == POISON,
+ "Device B: expected its entry untouched");
+
+ reset_and_restore_tables();
+
+ teardown();
+}
+
+int main(void)
+{
+ TEST_REQUIRE(kvm_supports_vgic_v3());
+
+ test_baser_change_drops_collections();
+ test_unreachable_device_skipped();
+
+ pr_info("All ok!\n");
+ return 0;
+}
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c
index e85e0f1e7fdb..82b94a82dd03 100644
--- a/tools/testing/selftests/kvm/steal_time.c
+++ b/tools/testing/selftests/kvm/steal_time.c
@@ -27,6 +27,9 @@
static void *st_gva[NR_VCPUS];
static u64 guest_stolen_time[NR_VCPUS];
+static struct kvm_vm *vm_create_steal_time(u32 nr_vcpus, void *guest_code,
+ struct kvm_vcpu *vcpus[]);
+
#if defined(__x86_64__)
/* steal_time must have 64-byte alignment */
@@ -210,17 +213,14 @@ static void check_steal_time_uapi(void)
u64 st_ipa;
int ret;
- vm = vm_create_with_one_vcpu(&vcpu, NULL);
-
struct kvm_device_attr dev = {
.group = KVM_ARM_VCPU_PVTIME_CTRL,
.attr = KVM_ARM_VCPU_PVTIME_IPA,
.addr = (u64)&st_ipa,
};
+ vm = vm_create_steal_time(1, NULL, &vcpu);
vcpu_ioctl(vcpu, KVM_HAS_DEVICE_ATTR, &dev);
- vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, ST_GPA_BASE, 1, 1, 0);
- virt_map(vm, ST_GPA_BASE, ST_GPA_BASE, 1);
st_ipa = (unsigned long)ST_GPA_BASE | 1;
ret = __vcpu_ioctl(vcpu, KVM_SET_DEVICE_ATTR, &dev);
@@ -500,13 +500,27 @@ static void run_vcpu(struct kvm_vcpu *vcpu)
}
}
+static struct kvm_vm *vm_create_steal_time(u32 nr_vcpus, void *guest_code,
+ struct kvm_vcpu *vcpus[])
+{
+ unsigned int gpages;
+ struct kvm_vm *vm;
+
+ /* Create a VM and an identity mapped memslot for the steal time structure */
+ vm = vm_create_with_vcpus(nr_vcpus, guest_code, vcpus);
+ gpages = vm_calc_num_guest_pages(VM_MODE_DEFAULT, STEAL_TIME_SIZE * nr_vcpus);
+ vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, ST_GPA_BASE, 1, gpages, 0);
+ virt_map(vm, ST_GPA_BASE, ST_GPA_BASE, gpages);
+
+ return vm;
+}
+
int main(int ac, char **av)
{
struct kvm_vcpu *vcpus[NR_VCPUS];
struct kvm_vm *vm;
pthread_t thread;
cpu_set_t cpuset;
- unsigned int gpages;
long stolen_time;
long run_delay;
bool verbose;
@@ -517,11 +531,7 @@ int main(int ac, char **av)
/* Set CPU affinity so we can force preemption of the VCPU */
cpu = pin_self_to_any_cpu();
- /* Create a VM and an identity mapped memslot for the steal time structure */
- vm = vm_create_with_vcpus(NR_VCPUS, guest_code, vcpus);
- gpages = vm_calc_num_guest_pages(VM_MODE_DEFAULT, STEAL_TIME_SIZE * NR_VCPUS);
- vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, ST_GPA_BASE, 1, gpages, 0);
- virt_map(vm, ST_GPA_BASE, ST_GPA_BASE, gpages);
+ vm = vm_create_steal_time(NR_VCPUS, guest_code, vcpus);
ksft_print_header();
TEST_REQUIRE(is_steal_time_supported(vcpus[0]));
diff --git a/tools/testing/selftests/mm/.gitignore b/tools/testing/selftests/mm/.gitignore
index a306d7754786..fcd892ed21e3 100644
--- a/tools/testing/selftests/mm/.gitignore
+++ b/tools/testing/selftests/mm/.gitignore
@@ -2,9 +2,7 @@
*
!/**/
!*.c
-*.mod.c
!*.h
-local_config.h
!*.sh
!.gitignore
!Makefile
diff --git a/tools/testing/selftests/mm/folio_split_race_test.c b/tools/testing/selftests/mm/folio_split_race_test.c
index 1960635a953e..45b84f7b364e 100644
--- a/tools/testing/selftests/mm/folio_split_race_test.c
+++ b/tools/testing/selftests/mm/folio_split_race_test.c
@@ -269,4 +269,6 @@ int main(void)
NUM_ITERATIONS);
ksft_exit(iter == NUM_ITERATIONS);
+
+ return 0;
}
diff --git a/tools/testing/selftests/mm/guard-regions.c b/tools/testing/selftests/mm/guard-regions.c
index b724d62d2b75..5c8ec3ca75d7 100644
--- a/tools/testing/selftests/mm/guard-regions.c
+++ b/tools/testing/selftests/mm/guard-regions.c
@@ -2257,18 +2257,8 @@ TEST_F(guard_regions, smaps)
char *ptr, *ptr2;
int i;
- /* Map then unmap placeholder to avoid adjacent merges */
- ptr = mmap_(self, variant, NULL, 12 * page_size, PROT_NONE, 0, 0);
- ASSERT_NE(ptr, MAP_FAILED);
- ASSERT_EQ(munmap(ptr, 12 * page_size), 0);
-
- /*
- * Map a region for the test. Since the preceding temporary mapping
- * succeeded, this mapping should also succeed without merging with
- * adjacent VMAs.
- */
- ptr = mmap_(self, variant, ptr + page_size, 10 * page_size,
- PROT_READ | PROT_WRITE, MAP_FIXED, 0);
+ /* Map a region. */
+ ptr = mmap_(self, variant, NULL, 10 * page_size, PROT_READ | PROT_WRITE, 0, 0);
ASSERT_NE(ptr, MAP_FAILED);
/* We shouldn't yet see a guard flag. */
diff --git a/tools/testing/selftests/mm/hugetlb-soft-offline.c b/tools/testing/selftests/mm/hugetlb-soft-offline.c
index 4af9d3db7b5b..bc202e4ed2bd 100644
--- a/tools/testing/selftests/mm/hugetlb-soft-offline.c
+++ b/tools/testing/selftests/mm/hugetlb-soft-offline.c
@@ -11,7 +11,6 @@
#define _GNU_SOURCE
#include <errno.h>
-#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -24,7 +23,6 @@
#include <sys/types.h>
#include "kselftest.h"
-#include "vm_util.h"
#include "hugepage_settings.h"
#ifndef MADV_SOFT_OFFLINE
@@ -33,8 +31,6 @@
#define EPREFIX " !!! "
-#define ENABLE_SOFT_OFFLINE_PATH "/proc/sys/vm/enable_soft_offline"
-
static int do_soft_offline(int fd, size_t len, int expect_errno)
{
char *filemap = NULL;
@@ -81,29 +77,26 @@ untruncate:
return ret;
}
-static unsigned long orig_enable_soft_offline = -1UL;
-
-/*
- * Runs from an atexit handler, so it must not call anything that
- * exits on failure: write_num() would re-enter exit() through
- * ksft_exit_fail_msg().
- */
-static void restore_enable_soft_offline(void)
+static int set_enable_soft_offline(int value)
{
- char buf[24];
- int fd, len;
+ char cmd[256] = {0};
+ FILE *cmdfile = NULL;
- if (orig_enable_soft_offline == -1UL)
- return;
+ if (value != 0 && value != 1)
+ return -EINVAL;
- len = snprintf(buf, sizeof(buf), "%lu", orig_enable_soft_offline);
- fd = open(ENABLE_SOFT_OFFLINE_PATH, O_WRONLY);
- if (fd < 0)
- return;
- if (write(fd, buf, len) != len)
- ksft_print_msg("failed to restore enable_soft_offline: %s\n",
- strerror(errno));
- close(fd);
+ sprintf(cmd, "echo %d > /proc/sys/vm/enable_soft_offline", value);
+ cmdfile = popen(cmd, "r");
+
+ if (cmdfile)
+ ksft_print_msg("enable_soft_offline => %d\n", value);
+ else {
+ ksft_perror(EPREFIX "failed to set enable_soft_offline");
+ return errno;
+ }
+
+ pclose(cmdfile);
+ return 0;
}
static int create_hugetlbfs_file(struct statfs *file_stat)
@@ -152,7 +145,10 @@ static void test_soft_offline_common(int enable_soft_offline)
hugepagesize_kb = file_stat.f_bsize / 1024;
ksft_print_msg("Hugepagesize is %ldkB\n", hugepagesize_kb);
- write_num(ENABLE_SOFT_OFFLINE_PATH, enable_soft_offline);
+ if (set_enable_soft_offline(enable_soft_offline) != 0) {
+ close(fd);
+ ksft_exit_fail_msg("Failed to set enable_soft_offline\n");
+ }
nr_hugepages_before = hugetlb_nr_default_pages();
@@ -196,9 +192,6 @@ int main(int argc, char **argv)
ksft_set_plan(2);
- orig_enable_soft_offline = read_num(ENABLE_SOFT_OFFLINE_PATH);
- atexit(restore_enable_soft_offline);
-
test_soft_offline_common(1);
test_soft_offline_common(0);
diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index f82673f5f6b4..1d2d6bd72fd2 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -337,15 +337,21 @@ static void *file_setup_area_common(int nr_hpages, enum file_setup_ops setup)
ksft_exit_fail_perror("open()");
size = nr_hpages * hpage_pmd_size;
- if (ftruncate(fd, size))
- ksft_exit_fail_perror("ftruncate()");
+ if (ftruncate(fd, size)) {
+ perror("ftruncate()");
+ exit(EXIT_FAILURE);
+ }
p = mmap(BASE_ADDR, size, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
- if (p != BASE_ADDR)
- ksft_exit_fail_perror("mmap()");
+ if (p != BASE_ADDR) {
+ perror("mmap()");
+ exit(EXIT_FAILURE);
+ }
fill_memory(p, 0, size);
- if (msync(p, size, MS_SYNC))
- ksft_exit_fail_perror("msync()");
+ if (msync(p, size, MS_SYNC)) {
+ perror("msync()");
+ exit(EXIT_FAILURE);
+ }
close(fd);
munmap(p, size);
success("OK");
@@ -420,7 +426,7 @@ static bool file_check_huge(void *addr, size_t len, int nr_hpages,
case VMA_SHMEM:
return check_huge_shmem(addr, len, nr_hpages, hpage_size);
default:
- ksft_exit_fail_msg("Unknown VMA type\n");
+ exit(EXIT_FAILURE);
return false;
}
}
@@ -1221,7 +1227,7 @@ static void parse_test_type(int argc, char **argv)
return;
}
- buf = argv[0];
+ buf = strdup(argv[0]);
token = strsep(&buf, ":");
if (!strcmp(token, "all")) {
diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c
index aef774be87f1..c55d84c5e613 100644
--- a/tools/testing/selftests/mm/memfd_secret.c
+++ b/tools/testing/selftests/mm/memfd_secret.c
@@ -145,8 +145,7 @@ static void try_ptrace(int fd, int pipefd[2])
exit(KSFT_FAIL);
}
- /* PEEKDATA on secret memory must fail, else protection is broken. */
- if (ptrace(PTRACE_PEEKDATA, ppid, mem, 0) == -1)
+ if (ptrace(PTRACE_PEEKDATA, ppid, mem, 0))
exit(KSFT_PASS);
exit(KSFT_FAIL);
diff --git a/tools/testing/selftests/mm/merge.c b/tools/testing/selftests/mm/merge.c
index 7dd2933417c1..52b8727b6628 100644
--- a/tools/testing/selftests/mm/merge.c
+++ b/tools/testing/selftests/mm/merge.c
@@ -1362,101 +1362,6 @@ TEST_F(merge, anon_and_page_offset_mismatch_memfd)
ASSERT_EQ(procmap->query.vma_end, (unsigned long)ptr + 5 * page_size);
}
-TEST_F(merge, merge_map_private_dev_zero_unfaulted)
-{
- struct procmap_fd *procmap = &self->procmap;
- unsigned int page_size = self->page_size;
- char *carveout = self->carveout;
- char *ptr, *ptr2;
- int fd_zero;
-
- if (access("/dev/zero", F_OK))
- SKIP(return, "No /dev/zero.");
- fd_zero = open("/dev/zero", O_RDWR);
- ASSERT_NE(fd_zero, -1);
-
- /*
- * Map two MAP_PRIVATE-/dev/zero VMAs next to one another with offset 0
- * each.
- *
- * With these being made truly anonymous upon mapping, they will
- * merge. If they were file-backed VMAs the page offsets would prevent
- * the merge:
- *
- * |-----||------| |-------------|
- * | ptr || ptr2 | -> | ptr |
- * |-----||------| |-------------|
- */
- ptr = mmap(carveout, 5 * page_size, PROT_READ | PROT_WRITE,
- MAP_FIXED | MAP_PRIVATE, fd_zero, 0);
- ptr2 = mmap(&carveout[5 * page_size], 5 * page_size,
- PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd_zero, 0);
- close(fd_zero);
- ASSERT_NE(ptr, MAP_FAILED);
- ASSERT_NE(ptr2, MAP_FAILED);
-
- /* Assert that they merged. */
- ASSERT_TRUE(find_vma_procmap(procmap, ptr));
- ASSERT_EQ(procmap->query.vma_start, (unsigned long)ptr);
- ASSERT_EQ(procmap->query.vma_end, (unsigned long)ptr + 10 * page_size);
-}
-
-TEST_F(merge, merge_map_private_dev_zero_faulted_unfaulted)
-{
- struct procmap_fd *procmap = &self->procmap;
- unsigned int page_size = self->page_size;
- char *carveout = self->carveout;
- char *ptr, *ptr2;
- int fd_zero;
-
- if (access("/dev/zero", F_OK))
- SKIP(return, "No /dev/zero.");
- fd_zero = open("/dev/zero", O_RDWR);
- ASSERT_NE(fd_zero, -1);
-
- /*
- * Map a MAP_PRIVATE mapping of /dev/zero with page offset 0, then fault
- * it in:
- *
- * |-------------------------------|
- * | faulted |
- * |-------------------------------|
- */
- ptr = mmap(carveout, 15 * page_size, PROT_READ | PROT_WRITE,
- MAP_FIXED | MAP_PRIVATE, fd_zero, 0);
- ASSERT_NE(ptr, MAP_FAILED);
- memset(ptr, 'x', 15 * page_size);
-
- /*
- * Unmap the middle:
- *
- * |---------| |---------|
- * | faulted | | faulted |
- * |---------| |---------|
- */
- ASSERT_EQ(munmap(&ptr[5 * page_size], 5 * page_size), 0);
-
- /*
- * Map in a new unfaulted mapping in the middle with page offset 0 -
- * this should merge and would not if it were treated as a file rather
- * than pure anon:
- *
- * |---------|-----------|---------|
- * | faulted | unfaulted | faulted |
- * |---------|-----------|---------|
- */
- ptr2 = mmap(&carveout[5 * page_size], 5 * page_size,
- PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE,
- fd_zero, 0);
- close(fd_zero);
- ASSERT_NE(ptr2, MAP_FAILED);
-
- /* Assert that they merged. */
- ASSERT_TRUE(find_vma_procmap(procmap, ptr));
- ASSERT_EQ(procmap->query.vma_start, (unsigned long)ptr);
- ASSERT_EQ(procmap->query.vma_end, (unsigned long)ptr + 15 * page_size);
-}
-
TEST_F(merge_with_fork, mremap_faulted_to_unfaulted_prev)
{
struct procmap_fd *procmap = &self->procmap;
diff --git a/tools/testing/selftests/mm/mlock-random-test.c b/tools/testing/selftests/mm/mlock-random-test.c
index 58772914fd79..16294bc7dae6 100644
--- a/tools/testing/selftests/mm/mlock-random-test.c
+++ b/tools/testing/selftests/mm/mlock-random-test.c
@@ -71,6 +71,7 @@ int get_proc_locked_vm_size(void)
fclose(f);
ksft_exit_fail_msg("cannot parse VmLck in /proc/self/status: %s\n", strerror(errno));
+ return -1;
}
/*
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index 97abf4713cc5..131d9d6db867 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -111,17 +111,18 @@ static unsigned long long get_mmap_min_addr(void)
return addr;
fp = fopen("/proc/sys/vm/mmap_min_addr", "r");
- if (!fp)
- ksft_exit_skip("Failed to open /proc/sys/vm/mmap_min_addr: %s\n",
- strerror(errno));
+ if (fp == NULL) {
+ ksft_print_msg("Failed to open /proc/sys/vm/mmap_min_addr: %s\n",
+ strerror(errno));
+ exit(KSFT_SKIP);
+ }
n_matched = fscanf(fp, "%llu", &addr);
if (n_matched != 1) {
- int err = errno;
-
+ ksft_print_msg("Failed to read /proc/sys/vm/mmap_min_addr: %s\n",
+ strerror(errno));
fclose(fp);
- ksft_exit_skip("Failed to read /proc/sys/vm/mmap_min_addr: %s\n",
- strerror(err));
+ exit(KSFT_SKIP);
}
fclose(fp);
@@ -155,7 +156,6 @@ static bool is_range_mapped(FILE *maps_fp, unsigned long start,
}
}
- free(line);
return success;
}
@@ -1164,11 +1164,10 @@ static void run_mremap_test_case(struct test test_case, int *failures,
rand_addr);
if (remap_time < 0) {
- if (test_case.expect_failure) {
- ksft_print_msg("%s: expected mremap failure\n",
- test_case.name);
- ksft_test_result_xfail("%s\n", test_case.name);
- } else {
+ if (test_case.expect_failure)
+ ksft_test_result_xfail("%s\n\tExpected mremap failure\n",
+ test_case.name);
+ else {
ksft_test_result_fail("%s\n", test_case.name);
*failures += 1;
}
@@ -1178,13 +1177,11 @@ static void run_mremap_test_case(struct test test_case, int *failures,
* was faulted in.
*/
if (threshold_mb == VALIDATION_NO_THRESHOLD ||
- test_case.config.region_size <= threshold_mb * _1MB) {
- ksft_print_msg("%s: mremap time: %12lldns\n",
- test_case.name, remap_time);
+ test_case.config.region_size <= threshold_mb * _1MB)
+ ksft_test_result_pass("%s\n\tmremap time: %12lldns\n",
+ test_case.name, remap_time);
+ else
ksft_test_result_pass("%s\n", test_case.name);
- } else {
- ksft_test_result_pass("%s\n", test_case.name);
- }
}
}
@@ -1253,18 +1250,13 @@ int main(int argc, char **argv)
time_t t;
FILE *maps_fp;
- ksft_print_header();
-
- get_mmap_min_addr();
-
pattern_seed = (unsigned int) time(&t);
if (parse_args(argc, argv, &threshold_mb, &pattern_seed) < 0)
exit(EXIT_FAILURE);
- ksft_print_msg("Test configs:\n");
- ksft_print_msg("threshold_mb=%u\n", threshold_mb);
- ksft_print_msg("pattern_seed=%u\n", pattern_seed);
+ ksft_print_msg("Test configs:\n\tthreshold_mb=%u\n\tpattern_seed=%u\n\n",
+ threshold_mb, pattern_seed);
/*
* set preallocated random array according to test configs; see the
diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c
index d9a4fb782ecf..eadc7159ca5b 100644
--- a/tools/testing/selftests/mm/pagemap_ioctl.c
+++ b/tools/testing/selftests/mm/pagemap_ioctl.c
@@ -36,15 +36,15 @@
#define TEST_ITERATIONS 100
#define PAGEMAP "/proc/self/pagemap"
-static int pagemap_fd;
-static int uffd;
-static size_t page_size;
-static size_t hpage_size;
-static const char *progname;
+int pagemap_fd;
+int uffd;
+size_t page_size;
+size_t hpage_size;
+const char *progname;
#define LEN(region) ((region.end - region.start)/page_size)
-static long pagemap_ioctl(void *start, size_t len, void *vec, size_t vec_len, int flag,
+static long pagemap_ioctl(void *start, int len, void *vec, int vec_len, int flag,
int max_pages, long required_mask, long anyof_mask, long excluded_mask,
long return_mask)
{
@@ -65,7 +65,7 @@ static long pagemap_ioctl(void *start, size_t len, void *vec, size_t vec_len, in
return ioctl(pagemap_fd, PAGEMAP_SCAN, &arg);
}
-static long pagemap_ioc(void *start, size_t len, void *vec, size_t vec_len, int flag,
+static long pagemap_ioc(void *start, int len, void *vec, int vec_len, int flag,
int max_pages, long required_mask, long anyof_mask, long excluded_mask,
long return_mask, long *walk_end)
{
@@ -92,7 +92,8 @@ static long pagemap_ioc(void *start, size_t len, void *vec, size_t vec_len, int
return ret;
}
-static int init_uffd(void)
+
+int init_uffd(void)
{
struct uffdio_api uffdio_api;
@@ -115,7 +116,7 @@ static int init_uffd(void)
return 0;
}
-static int wp_init(void *addr, size_t size)
+int wp_init(void *addr, long size)
{
struct uffdio_register uffdio_register;
struct uffdio_writeprotect wp;
@@ -139,7 +140,7 @@ static int wp_init(void *addr, size_t size)
return 0;
}
-static int wp_free(void *addr, size_t size)
+int wp_free(void *addr, long size)
{
struct uffdio_register uffdio_register;
@@ -151,7 +152,7 @@ static int wp_free(void *addr, size_t size)
return 0;
}
-static int wp_addr_range(void *addr, size_t size)
+int wp_addr_range(void *addr, int size)
{
if (pagemap_ioctl(addr, size, NULL, 0,
PM_SCAN_WP_MATCHING | PM_SCAN_CHECK_WPASYNC,
@@ -161,7 +162,7 @@ static int wp_addr_range(void *addr, size_t size)
return 0;
}
-static void *gethugetlb_mem(size_t size, int *shmid)
+void *gethugetlb_mem(int size, int *shmid)
{
char *mem;
@@ -185,10 +186,9 @@ static void *gethugetlb_mem(size_t size, int *shmid)
return mem;
}
-static int userfaultfd_tests(void)
+int userfaultfd_tests(void)
{
- size_t mem_size, vec_size, num_pages = 16;
- long written;
+ long mem_size, vec_size, written, num_pages = 16;
char *mem, *vec;
mem_size = num_pages * page_size;
@@ -229,10 +229,9 @@ static int userfaultfd_tests(void)
return 0;
}
-static int get_reads(struct page_region *vec, size_t vec_size)
+int get_reads(struct page_region *vec, int vec_size)
{
- size_t i;
- int sum = 0;
+ int i, sum = 0;
for (i = 0; i < vec_size; i++)
sum += LEN(vec[i]);
@@ -240,9 +239,9 @@ static int get_reads(struct page_region *vec, size_t vec_size)
return sum;
}
-static int sanity_tests_sd(void)
+int sanity_tests_sd(void)
{
- size_t mem_size, vec_size, i, total_pages = 0;
+ unsigned long long mem_size, vec_size, i, total_pages = 0;
long ret, ret2, ret3;
int num_pages = 1000;
int total_writes, total_reads, reads, count;
@@ -332,7 +331,7 @@ static int sanity_tests_sd(void)
if (ret < 0)
ksft_exit_fail_msg("error %ld %d %s\n", ret, errno, strerror(errno));
- ksft_test_result((size_t)ret == mem_size/(page_size * 2),
+ ksft_test_result((unsigned long long)ret == mem_size/(page_size * 2),
"%s Repeated pattern of written and non-written pages\n", __func__);
/* 4. Repeated pattern of written and non-written pages in parts */
@@ -683,9 +682,9 @@ static int sanity_tests_sd(void)
return 0;
}
-static int base_tests(char *prefix, char *mem, size_t mem_size, int skip)
+int base_tests(char *prefix, char *mem, unsigned long long mem_size, int skip)
{
- size_t vec_size;
+ unsigned long long vec_size;
int written;
struct page_region *vec, *vec2;
@@ -788,7 +787,7 @@ static int base_tests(char *prefix, char *mem, size_t mem_size, int skip)
return 0;
}
-static void *gethugepage(size_t map_size)
+void *gethugepage(int map_size)
{
int ret;
char *map;
@@ -806,13 +805,13 @@ static void *gethugepage(size_t map_size)
return map;
}
-static int hpage_unit_tests(void)
+int hpage_unit_tests(void)
{
char *map;
int ret, ret2;
size_t num_pages = 10;
- size_t map_size = hpage_size * num_pages;
- size_t vec_size = map_size/page_size;
+ unsigned long long map_size = hpage_size * num_pages;
+ unsigned long long vec_size = map_size/page_size;
struct page_region *vec, *vec2;
vec = calloc(vec_size, sizeof(struct page_region));
@@ -1000,12 +999,11 @@ static int hpage_unit_tests(void)
return 0;
}
-static int unmapped_region_tests(void)
+int unmapped_region_tests(void)
{
void *start = (void *)0x10000000;
- int written;
- size_t len = 0x00040000;
- size_t vec_size = len / page_size;
+ int written, len = 0x00040000;
+ long vec_size = len / page_size;
struct page_region *vec = calloc(vec_size, sizeof(struct page_region));
if (!vec)
ksft_exit_fail_msg("error nomem\n");
@@ -1074,7 +1072,7 @@ static void test_simple(void)
* with no page table, exercising pagemap_scan_pte_hole(); a base-page range
* leaves pte_none entries.
*/
-static void unpopulated_written_test(const char *name, char *mem, size_t size,
+static void unpopulated_written_test(const char *name, char *mem, long size,
bool use_thp)
{
long npages = size / page_size, fast = 0, slow = 0, ret;
@@ -1117,7 +1115,7 @@ out:
static void unpopulated_scan_test(void)
{
- size_t mem_size = 16 * page_size;
+ long mem_size = 16 * page_size;
char *mem;
mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE,
@@ -1157,10 +1155,10 @@ static void unpopulated_thp_scan_test(void)
munmap(area, 2 * hpage_size);
}
-static int sanity_tests(void)
+int sanity_tests(void)
{
- size_t mem_size, vec_size, i, buf_size;
- long ret, fd, nr_pages;
+ unsigned long long mem_size, vec_size;
+ long ret, fd, i, buf_size, nr_pages;
struct page_region *vec;
char *mem, *fmem;
struct stat sbuf;
@@ -1329,7 +1327,7 @@ static int sanity_tests(void)
return 0;
}
-static int mprotect_tests(void)
+int mprotect_tests(void)
{
int ret;
char *mem, *mem2;
@@ -1449,7 +1447,7 @@ static ssize_t get_dirty_pages_reset(char *mem, unsigned int count,
return cnt;
}
-static void *thread_proc(void *mem)
+void *thread_proc(void *mem)
{
int *m = mem;
long curr_faults, faults;
@@ -1489,7 +1487,7 @@ static void *thread_proc(void *mem)
return NULL;
}
-static void transact_test(void)
+static void transact_test(int page_size)
{
unsigned int i, count, extra_pages;
unsigned int c;
@@ -1582,11 +1580,11 @@ static void transact_test(void)
extra_thread_faults);
}
-static void zeropfn_tests(void)
+void zeropfn_tests(void)
{
- size_t mem_size, i;
+ unsigned long long mem_size;
struct page_region vec;
- int ret;
+ int i, ret;
char *mmap_mem, *mem;
/* Test with normal memory */
@@ -1644,8 +1642,8 @@ static void zeropfn_tests(void)
int main(int __attribute__((unused)) argc, char *argv[])
{
- int shmid, fd, ret;
- size_t mem_size, buf_size, i;
+ int shmid, buf_size, fd, i, ret;
+ unsigned long long mem_size;
char *mem, *map, *fmem;
struct stat sbuf;
@@ -1653,9 +1651,6 @@ int main(int __attribute__((unused)) argc, char *argv[])
ksft_print_header();
- page_size = getpagesize();
- hpage_size = read_pmd_pagesize();
-
if (init_uffd())
ksft_exit_skip("Failed to initialize userfaultfd\n");
@@ -1664,6 +1659,9 @@ int main(int __attribute__((unused)) argc, char *argv[])
ksft_set_plan(119);
+ page_size = getpagesize();
+ hpage_size = read_pmd_pagesize();
+
pagemap_fd = open(PAGEMAP, O_RDONLY);
if (pagemap_fd < 0)
ksft_exit_fail_msg("Failed to open " PAGEMAP "\n");
@@ -1823,7 +1821,7 @@ int main(int __attribute__((unused)) argc, char *argv[])
mprotect_tests();
/* 13. Transact test */
- transact_test();
+ transact_test(page_size);
/* 14. Sanity testing */
sanity_tests();
diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h
index 9b949951743d..46a8a1878dc1 100644
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -114,6 +114,13 @@ void record_pkey_malloc(void *ptr, long size, int prot);
#define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)
#endif
+/*
+ * FIXME: Remove once the generic PKEY_UNRESTRICTED definition is merged.
+ */
+#ifndef PKEY_UNRESTRICTED
+#define PKEY_UNRESTRICTED 0x0
+#endif
+
#ifndef set_pkey_bits
static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags)
{
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c
index f9c728ba96a5..c218d0510a2a 100644
--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c
+++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -543,12 +543,11 @@ static void (*pkey_tests[])(void) = {
int main(int argc, char *argv[])
{
ksft_print_header();
+ ksft_set_plan(ARRAY_SIZE(pkey_tests));
if (!is_pkeys_supported())
ksft_exit_skip("pkeys not supported\n");
- ksft_set_plan(ARRAY_SIZE(pkey_tests));
-
for (test_nr = 0; test_nr < ARRAY_SIZE(pkey_tests); test_nr++) {
tracing_on();
(*pkey_tests[test_nr])();
@@ -556,4 +555,5 @@ int main(int argc, char *argv[])
}
ksft_finished();
+ return 0;
}
diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 0935dbef4884..d09f9f6a384e 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -96,44 +96,26 @@ separated by spaces:
example: ./run_vmtests.sh -t "hmm mmap ksm"
EOF
+ exit 0
}
RUN_ALL=false
RUN_DESTRUCTIVE=false
TAP_PREFIX="# "
-VM_SELFTEST_ITEMS="default"
-
while getopts "aht:nd" OPT; do
case ${OPT} in
"a") RUN_ALL=true ;;
- "h") usage; exit 0 ;;
+ "h") usage ;;
"t") VM_SELFTEST_ITEMS=${OPTARG} ;;
"n") TAP_PREFIX= ;;
"d") RUN_DESTRUCTIVE=true ;;
- "?") exit 1 ;;
esac
done
shift $((OPTIND -1))
-# Normalize whitespace so validation and test_selected() use the same names.
-read -r -a selected_categories <<< "${VM_SELFTEST_ITEMS//$'\n'/ }"
-VM_SELFTEST_ITEMS="${selected_categories[*]}"
-if [ -z "$VM_SELFTEST_ITEMS" ]; then
- echo "No test categories specified" >&2
- exit 1
-fi
-
-if [ "$VM_SELFTEST_ITEMS" != "default" ]; then
- # Keep the documented category list as the source of valid names.
- valid_categories=$(usage | sed -n 's/^- //p')
- for category in "${selected_categories[@]}"; do
- if ! grep -Fxq -- "$category" <<< "$valid_categories"; then
- echo "Unknown test category: $category" >&2
- exit 1
- fi
- done
-fi
+# default behavior: run all tests
+VM_SELFTEST_ITEMS=${VM_SELFTEST_ITEMS:-default}
test_selected() {
if [ "$VM_SELFTEST_ITEMS" == "default" ]; then
@@ -370,7 +352,7 @@ CATEGORY="process_madv" run_test ./process_madv
CATEGORY="vma_merge" run_test ./merge
-if test_selected "memfd_secret" && [ -x ./memfd_secret ]
+if [ -x ./memfd_secret ]
then
if [ -f /proc/sys/kernel/yama/ptrace_scope ]; then
(echo 0 > /proc/sys/kernel/yama/ptrace_scope 2>&1) | tap_prefix
@@ -433,8 +415,7 @@ CATEGORY="thp" run_test ./khugepaged -c 4 mthp_khugepaged:anon
# Try to create XFS if not provided
if [ -z "${SPLIT_HUGE_PAGE_TEST_XFS_PATH}" ]; then
if test_selected "thp"; then
- if grep xfs /proc/filesystems &>/dev/null &&
- command -v mkfs.xfs &>/dev/null; then
+ if grep xfs /proc/filesystems &>/dev/null; then
XFS_IMG=$(mktemp /tmp/xfs_img_XXXXXX)
SPLIT_HUGE_PAGE_TEST_XFS_PATH=$(mktemp -d /tmp/xfs_dir_XXXXXX)
truncate -s 314572800 ${XFS_IMG}
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
index c01d227d7fd6..86a603692826 100644
--- a/tools/testing/selftests/mm/split_huge_page_test.c
+++ b/tools/testing/selftests/mm/split_huge_page_test.c
@@ -101,6 +101,7 @@ static bool is_backed_by_folio(char *vaddr, int order, int pagemap_fd,
return (pfn_flags & folio_tail_flags) != folio_tail_flags;
fail:
ksft_exit_fail_msg("Failed to get folio info\n");
+ return false;
}
static int check_after_split_folio_orders(char *vaddr_start, size_t len,
@@ -547,6 +548,7 @@ err_out_close:
err_out_unlink:
unlink(testfile);
ksft_exit_fail_msg("Failed to create large pagecache folios\n");
+ return -1;
}
static void split_thp_in_pagecache_to_order_at(size_t fd_size,
@@ -709,4 +711,6 @@ int main(int argc, char **argv)
free(expected_orders);
ksft_finished();
+
+ return 0;
}
diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index 6f2360f9b75d..ef9b3956bdcf 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -518,34 +518,19 @@ static void uffd_wp_fork_pin_with_event_test(uffd_global_test_opts_t *gopts, uff
uffd_wp_fork_pin_test_common(gopts, args, true);
}
-static int __check_memory_contents(unsigned long offset,
- unsigned long nr_pages,
- uffd_global_test_opts_t *gopts,
- char *p)
+static void check_memory_contents(uffd_global_test_opts_t *gopts, char *p)
{
unsigned long i, j;
uint8_t expected_byte;
- if (nr_pages + offset < nr_pages)
- err("overflow in memory check");
- if (nr_pages + offset > gopts->nr_pages)
- err("out of bounds memory check");
-
- for (i = offset; i < offset + nr_pages; ++i) {
+ for (i = 0; i < gopts->nr_pages; ++i) {
expected_byte = ~((uint8_t)(i % ((uint8_t)-1)));
for (j = 0; j < gopts->page_size; j++) {
uint8_t v = *(uint8_t *)(p + (i * gopts->page_size) + j);
if (v != expected_byte)
- return 1;
+ err("unexpected page contents");
}
}
-
- return 0;
-}
-
-static int check_memory_contents(uffd_global_test_opts_t *gopts, char *p)
-{
- return __check_memory_contents(0, gopts->nr_pages, gopts, p);
}
static void uffd_minor_test_common(uffd_global_test_opts_t *gopts, bool test_collapse, bool test_wp)
@@ -554,8 +539,6 @@ static void uffd_minor_test_common(uffd_global_test_opts_t *gopts, bool test_col
pthread_t uffd_mon;
char c = '\0';
struct uffd_args args = { 0 };
- unsigned long checked = 0;
- bool bad_contents;
args.gopts = gopts;
/*
@@ -581,65 +564,24 @@ static void uffd_minor_test_common(uffd_global_test_opts_t *gopts, bool test_col
if (pthread_create(&uffd_mon, NULL, uffd_poll_thread, &args))
err("uffd_poll_thread create");
- if (test_collapse) {
- /*
- * Read just a single page and try collapsing. The collapse
- * should either be rejected or be a no-op.
- */
- if (__check_memory_contents(0, 1, gopts, gopts->area_dst_alias))
- err("unexpected memory contents before collapse");
-
- /* MADV_COLLAPSE might return EINVAL for uffd-minor VMAs. */
- madvise(gopts->area_dst_alias, gopts->nr_pages * gopts->page_size,
- MADV_COLLAPSE);
- /*
- * If the above collapse mapped pages that were not explicitly
- * CONTINUE'd, the below __check_memory_contents() will not
- * fault on some pages, resulting in incorrect contents. The
- * PTE for the first page may get retracted, so avoid checking
- * that page, as we might take a second fault, flipping the
- * contents a second time.
- */
- checked = 1;
- }
-
/*
* Read each of the pages back using the UFFD-registered mapping. We
* expect that the first time we touch a page, it will result in a minor
* fault. uffd_poll_thread will resolve the fault by bit-flipping the
* page's contents, and then issuing a CONTINUE ioctl.
*/
- bad_contents = !!__check_memory_contents(checked, gopts->nr_pages - checked,
- gopts, gopts->area_dst_alias);
+ check_memory_contents(gopts, gopts->area_dst_alias);
if (write(gopts->pipefd[1], &c, sizeof(c)) != sizeof(c))
err("pipe write");
if (pthread_join(uffd_mon, NULL))
err("join() failed");
- if (bad_contents && test_collapse) {
- uffd_test_fail("unexpected memory contents after collapse");
- return;
- }
-
- if (bad_contents) {
- uffd_test_fail("unexpected memory contents");
- return;
- }
-
if (test_collapse) {
- /*
- * MADV_COLLAPSE will fail unless userfaultfd-minor is
- * unregistered.
- */
- if (uffd_unregister(gopts->uffd, gopts->area_dst_alias,
- gopts->nr_pages * gopts->page_size))
- err("uffd_unregister before MADV_COLLAPSE failed");
-
- /* MADV_COLLAPSE should succeed with userfaultfd unregistered. */
if (madvise(gopts->area_dst_alias, gopts->nr_pages * gopts->page_size,
MADV_COLLAPSE)) {
- uffd_test_fail("MADV_COLLAPSE failed");
+ /* It's fine to fail for this one... */
+ uffd_test_skip("MADV_COLLAPSE failed");
return;
}
@@ -651,10 +593,7 @@ static void uffd_minor_test_common(uffd_global_test_opts_t *gopts, bool test_col
* This won't cause uffd-fault - it purely just makes sure there
* was no corruption.
*/
- if (check_memory_contents(gopts, gopts->area_dst_alias)) {
- uffd_test_fail("unexpected memory contents");
- return;
- }
+ check_memory_contents(gopts, gopts->area_dst_alias);
}
if (args.missing_faults != 0 || args.minor_faults != gopts->nr_pages)
diff --git a/tools/testing/selftests/mm/uffd-wp-mremap.c b/tools/testing/selftests/mm/uffd-wp-mremap.c
index 572c2516e874..c973d6722720 100644
--- a/tools/testing/selftests/mm/uffd-wp-mremap.c
+++ b/tools/testing/selftests/mm/uffd-wp-mremap.c
@@ -347,8 +347,6 @@ int main(int argc, char **argv)
struct thp_settings settings;
int i, j, plan = 0;
- ksft_print_header();
-
hugepage_save_settings(true, true);
check_uffd_wp_feature_supported();
diff --git a/tools/testing/selftests/net/af_unix/scm_rights.c b/tools/testing/selftests/net/af_unix/scm_rights.c
index d82a79c21c17..c165f250220a 100644
--- a/tools/testing/selftests/net/af_unix/scm_rights.c
+++ b/tools/testing/selftests/net/af_unix/scm_rights.c
@@ -378,4 +378,21 @@ TEST_F(scm_rights, backtrack_from_scc)
close_sockets(10);
}
+TEST_F(scm_rights, mixed_lowpoint)
+{
+ create_sockets(6);
+
+ send_fd(0, 1);
+ send_fd(1, 2);
+ send_fd(2, 1);
+ send_fd(1, 0);
+
+ send_fd(3, 4);
+ send_fd(4, 5);
+ send_fd(5, 4);
+ send_fd(4, 3);
+
+ close_sockets(6);
+}
+
TEST_HARNESS_MAIN
diff --git a/tools/testing/selftests/proc/proc-self-map-files-001.c b/tools/testing/selftests/proc/proc-self-map-files-001.c
index bbca9f9e2743..4209c64283d6 100644
--- a/tools/testing/selftests/proc/proc-self-map-files-001.c
+++ b/tools/testing/selftests/proc/proc-self-map-files-001.c
@@ -51,7 +51,7 @@ int main(void)
int fd;
unsigned long a, b;
- fd = open("/proc/self/exe", O_RDONLY);
+ fd = open("/dev/zero", O_RDONLY);
if (fd == -1)
return 1;
diff --git a/tools/testing/selftests/proc/proc-self-map-files-002.c b/tools/testing/selftests/proc/proc-self-map-files-002.c
index 5786cdffbbf6..e6aa00a183bc 100644
--- a/tools/testing/selftests/proc/proc-self-map-files-002.c
+++ b/tools/testing/selftests/proc/proc-self-map-files-002.c
@@ -57,7 +57,7 @@ int main(void)
int fd;
unsigned long a, b;
- fd = open("/proc/self/exe", O_RDONLY);
+ fd = open("/dev/zero", O_RDONLY);
if (fd == -1)
return 1;
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json b/tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json
new file mode 100644
index 000000000000..ef7ca4a6775b
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/batch-delete.json
@@ -0,0 +1,115 @@
+[
+ {
+ "id": "d710",
+ "name": "Release tail references after first action deletion fails",
+ "category": [
+ "actions",
+ "gact"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC qdisc add dev $DEV1 ingress",
+ "$TC actions add action pass index 1",
+ "$TC actions add action pass index 2",
+ "$TC actions add action pass index 3",
+ "$TC filter add dev $DEV1 protocol ip ingress u32 match u32 0 0 action gact index 1"
+ ],
+ "cmdUnderTest": "$TC actions del action gact index 1 action gact index 2 action gact index 3",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions ls action gact",
+ "matchPattern": "total acts 3\\b.*index 1 ref 2 bind 1\\b.*index 2 ref 1 bind 0\\b.*index 3 ref 1 bind 0\\b",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DEV1 ingress",
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ]
+ ]
+ },
+ {
+ "id": "d711",
+ "name": "Release tail references after middle action deletion fails",
+ "category": [
+ "actions",
+ "gact"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC qdisc add dev $DEV1 ingress",
+ "$TC actions add action pass index 1",
+ "$TC actions add action pass index 2",
+ "$TC actions add action pass index 3",
+ "$TC filter add dev $DEV1 protocol ip ingress u32 match u32 0 0 action gact index 2"
+ ],
+ "cmdUnderTest": "$TC actions del action gact index 1 action gact index 2 action gact index 3",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions ls action gact",
+ "matchPattern": "total acts 2\\b.*index 2 ref 2 bind 1\\b.*index 3 ref 1 bind 0\\b",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DEV1 ingress",
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ]
+ ]
+ },
+ {
+ "id": "d713",
+ "name": "Delete a tail action once after a failed batch",
+ "category": [
+ "actions",
+ "gact"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC qdisc add dev $DEV1 ingress",
+ "$TC actions add action pass index 1",
+ "$TC actions add action pass index 2",
+ "$TC filter add dev $DEV1 protocol ip ingress u32 match u32 0 0 action gact index 1"
+ ],
+ "cmdUnderTest": "$TC actions del action gact index 1 action gact index 2",
+ "expExitCode": "255",
+ "verifyCmd": "sh -c '$TC actions del action gact index 2 && $TC actions ls action gact'",
+ "matchPattern": "total acts 1\\b.*index 1 ref 2 bind 1\\b",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DEV1 ingress",
+ [
+ "$TC actions flush action gact",
+ 0,
+ 1,
+ 255
+ ]
+ ]
+ }
+]
diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf_flows_limit.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf_flows_limit.json
new file mode 100644
index 000000000000..44538b9266b6
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf_flows_limit.json
@@ -0,0 +1,128 @@
+[
+ {
+ "id": "e3cc",
+ "name": "HHF hh_limit rejects value above 2*HH_FLOWS_CNT cap (4294967295)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY handle 1: root hhf"
+ ],
+ "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf hh_limit 4294967295",
+ "expExitCode": "2",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
+ },
+ {
+ "id": "f681",
+ "name": "HHF hh_limit rejects 65536 (above 2*HH_FLOWS_CNT cap)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY handle 1: root hhf"
+ ],
+ "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf hh_limit 65536",
+ "expExitCode": "2",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
+ },
+ {
+ "id": "223d",
+ "name": "HHF hh_limit accepts boundary value 2048 (2*HH_FLOWS_CNT)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY handle 1: root hhf hh_limit 100"
+ ],
+ "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf hh_limit 2048",
+ "expExitCode": "0",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
+ },
+ {
+ "id": "147f",
+ "name": "HHF hh_limit rejects first value above cap (2049)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY handle 1: root hhf"
+ ],
+ "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf hh_limit 2049",
+ "expExitCode": "2",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
+ },
+ {
+ "id": "4d4f",
+ "name": "HHF add-time hh_limit 500 is preserved (init does not clobber user value)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [],
+ "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf hh_limit 500",
+ "expExitCode": "0",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 500",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
+ },
+ {
+ "id": "ca99",
+ "name": "HHF add-time hh_limit 4294967295 is rejected (no qdisc installed)",
+ "category": [
+ "qdisc",
+ "hhf"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [],
+ "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf hh_limit 4294967295",
+ "expExitCode": "2",
+ "verifyCmd": "$TC qdisc show dev $DUMMY",
+ "matchPattern": "qdisc hhf 1: root",
+ "matchCount": "0",
+ "teardown": []
+ }
+]
diff --git a/tools/testing/vma/include/dup.h b/tools/testing/vma/include/dup.h
index 16c09dac59d9..4c58487b764e 100644
--- a/tools/testing/vma/include/dup.h
+++ b/tools/testing/vma/include/dup.h
@@ -560,6 +560,7 @@ struct vm_area_struct {
vma_flags_t flags;
};
+#ifdef CONFIG_PER_VMA_LOCK
/*
* Can only be written (using WRITE_ONCE()) while holding both:
* - mmap_lock (in write mode)
@@ -575,7 +576,7 @@ struct vm_area_struct {
* slowpath.
*/
unsigned int vm_lock_seq;
-
+#endif
unsigned int __vm_anon_pgoff_lo;
/*
@@ -609,8 +610,10 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA_BALANCING
struct vma_numab_state *numab_state; /* NUMA Balancing state */
#endif
+#ifdef CONFIG_PER_VMA_LOCK
/* Unstable RCU readers are allowed to read this. */
refcount_t vm_refcnt;
+#endif
#ifdef CONFIG_64BIT
unsigned int __vm_anon_pgoff_hi;
#endif
@@ -1635,15 +1638,9 @@ static inline pgoff_t linear_anon_page_index(const struct vm_area_struct *vma,
const pgoff_t pgoff = __linear_anon_page_index(vma, address);
VM_WARN_ON_ONCE(!vma_is_cow_mapping(vma));
- if (vma_is_anonymous(vma))
+ /* Account for MAP_PRIVATE-/dev/zero which is only semi-anonymous. */
+ if (vma_is_anonymous(vma) && !vma->vm_file)
VM_WARN_ON_ONCE(pgoff != linear_page_index(vma, address));
return pgoff;
}
-
-extern const struct file_operations zero_fops;
-
-static inline bool file_is_dev_zero(const struct file *file)
-{
- return file && file->f_op == &zero_fops;
-}
diff --git a/tools/testing/vma/shared.c b/tools/testing/vma/shared.c
index 8c4826499f40..4a39c9d50489 100644
--- a/tools/testing/vma/shared.c
+++ b/tools/testing/vma/shared.c
@@ -12,15 +12,6 @@ const struct vm_operations_struct vma_dummy_vm_ops;
struct anon_vma dummy_anon_vma;
struct task_struct __current;
-static int mmap_zero_prepare(struct vm_area_desc *desc)
-{
- return 0;
-}
-
-const struct file_operations zero_fops = {
- .mmap_prepare = mmap_zero_prepare,
-};
-
struct vm_area_struct *alloc_vma(struct mm_struct *mm,
unsigned long start, unsigned long end,
pgoff_t pgoff, vma_flags_t vma_flags)
diff --git a/tools/testing/vma/tests/mmap.c b/tools/testing/vma/tests/mmap.c
index 53e4abe6a63e..c85bc000d1cb 100644
--- a/tools/testing/vma/tests/mmap.c
+++ b/tools/testing/vma/tests/mmap.c
@@ -45,112 +45,7 @@ static bool test_mmap_region_basic(void)
return true;
}
-static bool mmap_region_fill_hole(bool merge)
-{
- const vma_flags_t vma_flags = mk_vma_flags(VMA_READ_BIT, VMA_WRITE_BIT,
- VMA_MAYREAD_BIT, VMA_MAYWRITE_BIT, VMA_MAYEXEC_BIT);
- vma_flags_t middle_flags = vma_flags;
- struct mm_struct mm = {};
- struct vm_area_struct *vma;
- unsigned long addr;
- int count = 0;
- VMA_ITERATOR(vmi, &mm, 0);
-
- current->mm = &mm;
- if (!merge)
- vma_flags_set(&middle_flags, VMA_EXEC_BIT);
-
- /* Map at 0x300000, length 0x3000. */
- addr = __mmap_region(NULL, 0x300000, 0x3000, vma_flags, 0x300, NULL);
- ASSERT_EQ(addr, 0x300000);
-
- /* Map at 0x306000, length 0x3000, leaving a hole. */
- addr = __mmap_region(NULL, 0x306000, 0x3000, vma_flags, 0x306, NULL);
- ASSERT_EQ(addr, 0x306000);
- ASSERT_EQ(mm.map_count, 2);
-
- /* Map at 0x303000, length 0x3000, filling the hole. */
- addr = __mmap_region(NULL, 0x303000, 0x3000, middle_flags, 0x303, NULL);
- ASSERT_EQ(addr, 0x303000);
- ASSERT_EQ(mm.map_count, merge ? 1 : 3);
-
- vma_iter_set(&vmi, 0);
- for_each_vma(vmi, vma) {
- const unsigned long start = 0x300000 + count * 0x3000;
- const unsigned long end = merge ? 0x309000 : start + 0x3000;
- /* Only the middle VMA in the non-merge case has VMA_EXEC. */
- const bool is_middle_vma = count == 1;
- const bool expect_exec_vma = is_middle_vma && !merge;
-
- ASSERT_EQ(vma->vm_start, start);
- ASSERT_EQ(vma->vm_end, end);
- ASSERT_EQ(vma_start_pgoff(vma), start >> PAGE_SHIFT);
- ASSERT_EQ(vma_start_anon_pgoff(vma), start >> PAGE_SHIFT);
-
- ASSERT_TRUE(vma_test_all(vma, VMA_READ_BIT, VMA_WRITE_BIT,
- VMA_MAYREAD_BIT, VMA_MAYWRITE_BIT,
- VMA_MAYEXEC_BIT));
- ASSERT_EQ(vma_test(vma, VMA_EXEC_BIT), expect_exec_vma);
-
- count++;
- }
-
- ASSERT_EQ(count, mm.map_count);
-
- ASSERT_EQ(cleanup_mm(&mm, &vmi), count);
- return true;
-}
-
-static bool test_mmap_region_fill_hole_merge(void)
-{
- return mmap_region_fill_hole(true);
-}
-
-static bool test_mmap_region_fill_hole_flags_mismatch(void)
-{
- return mmap_region_fill_hole(false);
-}
-
-static bool test_pure_anon_dev_zero(void)
-{
- const vma_flags_t vma_flags = mk_vma_flags(VMA_READ_BIT, VMA_WRITE_BIT,
- VMA_MAYREAD_BIT, VMA_MAYWRITE_BIT);
- struct file file = {
- .f_op = &zero_fops,
- };
- struct mm_struct mm = {};
- struct vm_area_struct *vma;
- unsigned long addr;
- VMA_ITERATOR(vmi, &mm, 0);
-
- current->mm = &mm;
-
- /*
- * Map a MAP_PRIVATE-/dev/zero mapping at address 0x300000 with a page
- * offset of 0x10, which we expect to be reset to the anonymous page
- * offset.
- */
- addr = __mmap_region(&file, 0x300000, 0x3000, vma_flags, 0x10, NULL);
- ASSERT_EQ(addr, 0x300000);
-
- /* Assert that it truly is an anonymous mapping. */
- vma = vma_lookup(&mm, addr);
- ASSERT_NE(vma, NULL);
- ASSERT_TRUE(vma_is_anonymous(vma));
- ASSERT_EQ(vma->vm_file, NULL);
- ASSERT_EQ(vma->vm_private_data, NULL);
- /* Expect anonymous page offsets. */
- ASSERT_EQ(vma->vm_pgoff, 0x300);
- ASSERT_EQ(vma_start_anon_pgoff(vma), 0x300);
-
- cleanup_mm(&mm, &vmi);
- return true;
-}
-
static void run_mmap_tests(int *num_tests, int *num_fail)
{
TEST(mmap_region_basic);
- TEST(mmap_region_fill_hole_merge);
- TEST(mmap_region_fill_hole_flags_mismatch);
- TEST(pure_anon_dev_zero);
}
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
index 54d5c3360aa2..8a48b231aa7a 100644
--- a/tools/testing/vma/vma_internal.h
+++ b/tools/testing/vma/vma_internal.h
@@ -15,6 +15,7 @@
#include <stdlib.h>
#define CONFIG_MMU 1
+#define CONFIG_PER_VMA_LOCK 1
#ifdef __CONCAT
#undef __CONCAT