Date: Sun, 15 Sep 2024 02:46:21 -0400 From: Paolo Bonzini To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [GIT PULL] First batch of KVM changes for Linux 6.12 Linus, The following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63: Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus-non-x86 for you to fetch changes up to 0cdcc99eeaedf2422c80d75760293fdbb476cec1: Merge tag 'kvm-riscv-6.12-1' of https://github.com/kvm-riscv/linux into HEAD (2024-09-15 02:43:17 -0400) These are the non-x86 changes (mostly ARM, as is usually the case). The generic and x86 changes will come later, in the meanwhile here is what's ready in case it helps you intersecting the travelling and pulling schedule. There is a trivial conflict in arch/arm64/include/asm/kvm_host.h with the arm64 tree. I'll also send a revert for 6.11 in a few minutes. Thanks, Paolo ---------------------------------------------------------------- ARM: * New Stage-2 page table dumper, reusing the main ptdump infrastructure * FP8 support * Nested virtualization now supports the address translation (FEAT_ATS1A) family of instructions * Add selftest checks for a bunch of timer emulation corner cases * Fix multiple cases where KVM/arm64 doesn't correctly handle the guest trying to use a GICv3 that wasn't advertised * Remove REG_HIDDEN_USER from the sysreg infrastructure, making things little simpler * Prevent MTE tags being restored by userspace if we are actively logging writes, as that's a recipe for disaster * Correct the refcount on a page that is not considered for MTE tag copying (such as a device) * When walking a page table to split block mappings, synchronize only at the end the walk rather than on every store * Fix boundary check when transfering memory using FFA * Fix pKVM TLB invalidation, only affecting currently out of tree code but worth addressing for peace of mind LoongArch: * Revert qspinlock to test-and-set simple lock on VM. * Add Loongson Binary Translation extension support. * Add PMU support for guest. * Enable paravirt feature control from VMM. * Implement function kvm_para_has_feature(). RISC-V: * Fix sbiret init before forwarding to userspace * Don't zero-out PMU snapshot area before freeing data * Allow legacy PMU access from guest * Fix to allow hpmcounter31 from the guest ---------------------------------------------------------------- Andrew Jones (1): RISC-V: KVM: Fix sbiret init before forwarding to userspace Anup Patel (1): RISC-V: KVM: Don't zero-out PMU snapshot area before freeing data Atish Patra (2): RISC-V: KVM: Allow legacy PMU access from guest RISC-V: KVM: Fix to allow hpmcounter31 from the guest Bibo Mao (6): LoongArch: Revert qspinlock to test-and-set simple lock on VM LoongArch: KVM: Add VM feature detection function LoongArch: KVM: Add Binary Translation extension support LoongArch: KVM: Add vm migration support for LBT registers LoongArch: KVM: Enable paravirt feature control from VMM LoongArch: KVM: Implement function kvm_para_has_feature() Colton Lewis (3): KVM: arm64: Move data barrier to end of split walk KVM: arm64: selftests: Ensure pending interrupts are handled in arch_timer test KVM: arm64: selftests: Add arch_timer_edge_cases selftest Joey Gouly (1): KVM: arm64: Make kvm_at() take an OP_AT_* Marc Zyngier (47): KVM: arm64: Move SVCR into the sysreg array KVM: arm64: Add predicate for FPMR support in a VM KVM: arm64: Move FPMR into the sysreg array KVM: arm64: Add save/restore support for FPMR KVM: arm64: Honor trap routing for FPMR KVM: arm64: Expose ID_AA64FPFR0_EL1 as a writable ID reg KVM: arm64: Enable FP8 support when available and configured KVM: arm64: Expose ID_AA64PFR2_EL1 to userspace and guests Merge branch kvm-arm64/tlbi-fixes-6.12 into kvmarm-master/next KVM: arm64: Move GICv3 trap configuration to kvm_calculate_traps() KVM: arm64: Force SRE traps when SRE access is not enabled KVM: arm64: Force GICv3 trap activation when no irqchip is configured on VHE KVM: arm64: Add helper for last ditch idreg adjustments KVM: arm64: Zero ID_AA64PFR0_EL1.GIC when no GICv3 is presented to the guest KVM: arm64: Add ICH_HCR_EL2 to the vcpu state KVM: arm64: Add trap routing information for ICH_HCR_EL2 KVM: arm64: Honor guest requested traps in GICv3 emulation KVM: arm64: Make most GICv3 accesses UNDEF if they trap KVM: arm64: Unify UNDEF injection helpers KVM: arm64: Add selftest checking how the absence of GICv3 is handled arm64: Add missing APTable and TCR_ELx.HPD masks arm64: Add PAR_EL1 field description arm64: Add system register encoding for PSTATE.PAN arm64: Add ESR_ELx_FSC_ADDRSZ_L() helper KVM: arm64: nv: Enforce S2 alignment when contiguous bit is set KVM: arm64: nv: Turn upper_attr for S2 walk into the full descriptor KVM: arm64: nv: Honor absence of FEAT_PAN2 KVM: arm64: nv: Add basic emulation of AT S1E{0,1}{R,W} KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P KVM: arm64: nv: Add basic emulation of AT S1E2{R,W} KVM: arm64: nv: Add emulation of AT S12E{0,1}{R,W} KVM: arm64: nv: Make ps_to_output_size() generally available KVM: arm64: nv: Add SW walker for AT S1 emulation KVM: arm64: nv: Sanitise SCTLR_EL1.EPAN according to VM configuration KVM: arm64: nv: Make AT+PAN instructions aware of FEAT_PAN3 KVM: arm64: nv: Plumb handling of AT S1* traps from EL2 KVM: arm64: nv: Add support for FEAT_ATS1A KVM: arm64: Simplify handling of CNTKCTL_EL12 KVM: arm64: Simplify visibility handling of AArch32 SPSR_* KVM: arm64: Get rid of REG_HIDDEN_USER visibility qualifier Merge branch kvm-arm64/mmu-misc-6.12 into kvmarm-master/next Merge branch kvm-arm64/fpmr into kvmarm-master/next Merge branch kvm-arm64/vgic-sre-traps into kvmarm-master/next Merge branch kvm-arm64/selftests-6.12 into kvmarm-master/next Merge branch kvm-arm64/nv-at-pan into kvmarm-master/next Merge branch kvm-arm64/s2-ptdump into kvmarm-master/next Merge branch kvm-arm64/visibility-cleanups into kvmarm-master/next Oliver Upton (1): KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs Paolo Bonzini (3): Merge tag 'kvmarm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Merge tag 'loongarch-kvm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD Merge tag 'kvm-riscv-6.12-1' of https://github.com/kvm-riscv/linux into HEAD Sean Christopherson (2): KVM: arm64: Release pfn, i.e. put page, if copying MTE tags hits ZONE_DEVICE KVM: arm64: Disallow copying MTE to guest memory while KVM is dirty logging Sebastian Ene (5): KVM: arm64: Move pagetable definitions to common header arm64: ptdump: Expose the attribute parsing functionality arm64: ptdump: Use the ptdump description from a local context arm64: ptdump: Don't override the level when operating on the stage-2 tables KVM: arm64: Register ptdump with debugfs on guest creation Snehal Koukuntla (1): KVM: arm64: Add memory length checks and remove inline in do_ffa_mem_xfer Song Gao (1): LoongArch: KVM: Add PMU support for guest Will Deacon (2): KVM: arm64: Invalidate EL1&0 TLB entries for all VMIDs in nvhe hyp init KVM: arm64: Ensure TLBI uses correct VMID after changing context arch/arm64/include/asm/esr.h | 5 +- arch/arm64/include/asm/kvm_arm.h | 1 + arch/arm64/include/asm/kvm_asm.h | 6 +- arch/arm64/include/asm/kvm_host.h | 22 +- arch/arm64/include/asm/kvm_mmu.h | 6 + arch/arm64/include/asm/kvm_nested.h | 40 +- arch/arm64/include/asm/kvm_pgtable.h | 42 + arch/arm64/include/asm/pgtable-hwdef.h | 9 + arch/arm64/include/asm/ptdump.h | 43 +- arch/arm64/include/asm/sysreg.h | 22 + arch/arm64/kvm/Kconfig | 17 + arch/arm64/kvm/Makefile | 3 +- arch/arm64/kvm/arm.c | 15 +- arch/arm64/kvm/at.c | 1101 ++++++++++++++++++++ arch/arm64/kvm/emulate-nested.c | 81 +- arch/arm64/kvm/fpsimd.c | 5 +- arch/arm64/kvm/guest.c | 6 + arch/arm64/kvm/hyp/include/hyp/fault.h | 2 +- arch/arm64/kvm/hyp/include/hyp/switch.h | 3 + arch/arm64/kvm/hyp/nvhe/ffa.c | 21 +- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 2 +- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 9 + arch/arm64/kvm/hyp/nvhe/switch.c | 9 + arch/arm64/kvm/hyp/nvhe/tlb.c | 6 +- arch/arm64/kvm/hyp/pgtable.c | 48 +- arch/arm64/kvm/hyp/vgic-v3-sr.c | 97 +- arch/arm64/kvm/hyp/vhe/switch.c | 3 + arch/arm64/kvm/nested.c | 55 +- arch/arm64/kvm/ptdump.c | 268 +++++ arch/arm64/kvm/sys_regs.c | 384 ++++--- arch/arm64/kvm/sys_regs.h | 23 +- arch/arm64/kvm/vgic/vgic-v3.c | 12 + arch/arm64/kvm/vgic/vgic.c | 14 +- arch/arm64/kvm/vgic/vgic.h | 6 +- arch/arm64/mm/ptdump.c | 70 +- arch/loongarch/include/asm/Kbuild | 1 - arch/loongarch/include/asm/kvm_csr.h | 6 + arch/loongarch/include/asm/kvm_host.h | 37 +- arch/loongarch/include/asm/kvm_para.h | 12 + arch/loongarch/include/asm/kvm_vcpu.h | 11 + arch/loongarch/include/asm/loongarch.h | 11 +- arch/loongarch/include/asm/paravirt.h | 7 + arch/loongarch/include/asm/qspinlock.h | 41 + arch/loongarch/include/uapi/asm/Kbuild | 2 - arch/loongarch/include/uapi/asm/kvm.h | 20 + arch/loongarch/include/uapi/asm/kvm_para.h | 21 + arch/loongarch/kernel/paravirt.c | 47 +- arch/loongarch/kernel/setup.c | 2 + arch/loongarch/kernel/smp.c | 4 +- arch/loongarch/kvm/exit.c | 46 +- arch/loongarch/kvm/vcpu.c | 340 +++++- arch/loongarch/kvm/vm.c | 69 +- arch/riscv/include/asm/kvm_vcpu_pmu.h | 21 +- arch/riscv/kvm/vcpu_pmu.c | 14 +- arch/riscv/kvm/vcpu_sbi.c | 4 +- tools/testing/selftests/kvm/Makefile | 2 + .../selftests/kvm/aarch64/arch_timer_edge_cases.c | 1062 +++++++++++++++++++ tools/testing/selftests/kvm/aarch64/no-vgic-v3.c | 175 ++++ tools/testing/selftests/kvm/aarch64/set_id_regs.c | 1 + tools/testing/selftests/kvm/aarch64/vgic_irq.c | 11 +- .../selftests/kvm/include/aarch64/arch_timer.h | 18 +- .../selftests/kvm/include/aarch64/processor.h | 3 + .../testing/selftests/kvm/lib/aarch64/processor.c | 6 + 63 files changed, 4041 insertions(+), 409 deletions(-) create mode 100644 arch/arm64/kvm/at.c create mode 100644 arch/arm64/kvm/ptdump.c create mode 100644 arch/loongarch/include/asm/qspinlock.h create mode 100644 arch/loongarch/include/uapi/asm/kvm_para.h create mode 100644 tools/testing/selftests/kvm/aarch64/arch_timer_edge_cases.c create mode 100644 tools/testing/selftests/kvm/aarch64/no-vgic-v3.c . Date: Sun, 15 Sep 2024 03:30:10 -0400 From: Paolo Bonzini To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [GIT PULL] KVM revert for Linux 6.11-rc8 (or final) Linus, The following changes since commit 59cbd4eea48fdbc68fc17a29ad71188fea74b28b: KVM: Remove HIGH_RES_TIMERS dependency (2024-09-05 12:04:54 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus-6.11 for you to fetch changes up to 9d70f3fec14421e793ffbc0ec2f739b24e534900: Revert "KVM: VMX: Always honor guest PAT on CPUs that support self-snoop" (2024-09-15 02:49:33 -0400) ---------------------------------------------------------------- Do not always honor guest PAT on CPUs that support self-snoop. This triggers an issue in the bochsdrm driver, which used ioremap() instead of ioremap_wc() to map the video RAM. The revert lets video RAM use the WB memory type instead of the slower UC memory type. ---------------------------------------------------------------- Paolo Bonzini (1): Revert "KVM: VMX: Always honor guest PAT on CPUs that support self-snoop" arch/x86/kvm/mmu/mmu.c | 8 +++----- arch/x86/kvm/vmx/vmx.c | 10 ++++------ 2 files changed, 7 insertions(+), 11 deletions(-) . Date: Sun, 15 Sep 2024 12:53:44 +0200 From: Miquel Raynal To: Linus Torvalds Cc: linux-mtd@lists.infradead.org, Richard Weinberger , Tudor Ambarus , Vignesh Raghavendra , Frieder Schrempf , Michael Walle , Pratyush Yadav , linux-kernel@vger.kernel.org Subject: [GIT PULL] mtd: Changes for 6.12-rc1 Hello Linus, This is the MTD PR for v6.12-rc1. Thanks, Miqu=C3=A8l The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git tags/mtd/for-= 6.12 for you to fetch changes up to 869acb874f2b61c34063b677c2bd29595bf446a1: Merge tag 'nand/for-6.12' into mtd/next (2024-09-15 12:38:22 +0200) ---------------------------------------------------------------- * MTD changes No particularly important patchset this cycle, but we have a few usual improvements: like using a better/more recent helper or checking a return value. * Raw NAND changes The use of for_each_child_of_node_scoped() has been spread into the subsystem drivers. Aside from that, a couple of exit path have been fixed (mtk, denali), the TI GPMC bindings have been enhanced to comply with up-to-date partition descriptions and as always there is a load of small and misc fixes. * SPI-NAND changes The most impacting series this cycle is bringing support for continuous reads in the SPI-NAND subsystem. This is a feature already merged in the raw NAND subsystem which allows optimizing the internal fetch times in the chip while reading sequential pages within an eraseblock. For now only Macronix NANDs benefit from this feature. While we are talking about Macronix, some of their chip need an explicit action for selecting a different plane, and support for it has also been brought. The bitflip threshold has also been set to the same arbitrary level as in the raw NAND subsystem to optimize wear leveling decisions, and finally support for a new Winbond chip has been added. * SPI NOR changes Notable changes: - Add Write Protect support for N25Q064A. - New flash support for Zetta ZD25Q128C and Spansion S28HS256T. - Fix a NULL dereference in probe path for flashes without a name. The probe path tries to access the name without checking its existence first. S28HS256T is the first flash to define its entry without a name, uncovering this issue. ---------------------------------------------------------------- Alexander Dahl (1): mtd: rawnand: atmel: Add message on DMA usage Bartosz Golaszewski (1): mtd: rawnand: davinci: make platform_data private Brian Norris (1): mtd: spi-nor: micron-st: Add n25q064a WP support Charles Han (1): mtd: powernv: Add check devm_kasprintf() returned value Chen Ridong (1): mtd: rawnand: denali: Fix missing pci_release_regions in probe and re= move Cheng Ming Lin (2): mtd: spinand: Add support for setting plane select bits mtd: spinand: macronix: Flag parts needing explicit plane select Colin Ian King (1): mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes = static const Cs=C3=B3k=C3=A1s, Bence (1): mtd: spi-nor: sst: Factor out common write operation to `sst_nor_writ= e_data()` Daniel Golle (1): mtd: spinand: set bitflip_threshold to 75% of ECC strength Jinjie Ruan (11): mtd: rawnand: denali: Use the devm_clk_get_enabled() helper function mtd: rawnand: arasan: Use for_each_child_of_node_scoped() mtd: rawnand: cadence: Use for_each_child_of_node_scoped() mtd: rawnand: pl353: Use for_each_child_of_node_scoped() mtd: rawnand: marvell: drm/rockchip: Use for_each_child_of_node_scope= d() mtd: rawnand: rockchip: Use for_each_child_of_node_scoped() mtd: rawnand: meson: Use for_each_child_of_node_scoped() mtd: rawnand: mtk: Use for_each_child_of_node_scoped() mtd: rawnand: renesas: Use for_each_child_of_node_scoped() mtd: rawnand: stm32_fmc2: Use for_each_child_of_node_scoped() mtd: rawnand: sunxi: Use for_each_child_of_node_scoped() Michael Walle (2): mtd: spi-nor: winbond: add Zetta ZD25Q128C support mtd: spi-nor: fix flash probing Miquel Raynal (14): mtd: nand: Rename the NAND IO iteration helper mtd: nand: Introduce a block iterator mtd: spi-nand: Isolate the MTD read logic in a helper mtd: spi-nand: Add continuous read support mtd: spi-nand: Expose spinand_write_reg_op() mtd: spi-nand: macronix: Fix helper name mtd: spi-nand: macronix: Extract the bitflip retrieval logic mtd: spi-nand: macronix: Add a possible bitflip status flag mtd: spi-nand: macronix: Continuous read support mtd: rawnand: meson: Fix typo in function name mtd: rawnand: mtk: Factorize out the logic cleaning mtk chips mtd: rawnand: mtk: Fix init error path Merge tag 'spi-nor/for-6.12' into mtd/next Merge tag 'nand/for-6.12' into mtd/next Mirsad Todorovac (1): mtd: slram: insert break after errors in parsing the map Rob Herring (Arm) (1): mtd: Use of_property_read_bool() Robert Marko (1): mtd: spinand: winbond: add support for W25N01KV Roger Quadros (1): dt-bindings: mtd: ti, gpmc-nand: support partitions node Takahiro Kuwano (1): mtd: spi-nor: spansion: Add support for S28HS256T Yan Zhen (1): mtd: concat: Use kmemdup_array instead of kmemdup for multiple alloca= tion Documentation/devicetree/bindings/mtd/ti,gpmc-nand.yaml | 5 +- drivers/mtd/devices/powernv_flash.c | 3 + drivers/mtd/devices/slram.c | 2 + drivers/mtd/mtdconcat.c | 2 +- drivers/mtd/nand/raw/arasan-nand-controller.c | 5 +- drivers/mtd/nand/raw/atmel/nand-controller.c | 5 +- drivers/mtd/nand/raw/cadence-nand-controller.c | 4 +- drivers/mtd/nand/raw/davinci_nand.c | 70 ++++++++++- drivers/mtd/nand/raw/denali_dt.c | 29 +---- drivers/mtd/nand/raw/denali_pci.c | 11 +- drivers/mtd/nand/raw/marvell_nand.c | 12 +- drivers/mtd/nand/raw/meson_nand.c | 10 +- drivers/mtd/nand/raw/mtk_nand.c | 36 +++--- drivers/mtd/nand/raw/pl35x-nand-controller.c | 5 +- drivers/mtd/nand/raw/renesas-nand-controller.c | 12 +- drivers/mtd/nand/raw/rockchip-nand-controller.c | 5 +- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 7 +- drivers/mtd/nand/raw/sunxi_nand.c | 4 +- drivers/mtd/nand/spi/core.c | 223 ++++++++++++= ++++++++++++++++++++---- drivers/mtd/nand/spi/macronix.c | 146 ++++++++++++= +++++------ drivers/mtd/nand/spi/winbond.c | 26 +++++ drivers/mtd/parsers/bcm47xxpart.c | 2 +- drivers/mtd/parsers/ofpart_core.c | 4 +- drivers/mtd/spi-nor/core.c | 3 +- drivers/mtd/spi-nor/micron-st.c | 2 + drivers/mtd/spi-nor/spansion.c | 4 + drivers/mtd/spi-nor/sst.c | 39 +++---- drivers/mtd/spi-nor/winbond.c | 26 +++++ include/linux/mtd/nand.h | 90 ++++++++++++= +-- include/linux/mtd/spinand.h | 19 +++ include/linux/platform_data/mtd-davinci-aemif.h | 36 ------ include/linux/platform_data/mtd-davinci.h | 88 ------------= -- 32 files changed, 621 insertions(+), 314 deletions(-) delete mode 100644 include/linux/platform_data/mtd-davinci-aemif.h delete mode 100644 include/linux/platform_data/mtd-davinci.h . Date: Sun, 15 Sep 2024 22:40:57 +0200 From: Sebastian Reichel To: Linus Torvalds Cc: linux-kernel@vger.kernel.org Subject: [GIT PULL] hsi changes for 6.12 --nbhs5k7cbkf77ryp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Linus, The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git tags/hsi-for-6.12 for you to fetch changes up to c3eddf5e8c30adb6f43fc0b149e88b9feb76f381: HSI: omap-ssi: Remove unnecessary debugfs_create_dir() error check (2024-08-27 15:28:56 +0200) ---------------------------------------------------------------- HSI changes for the 6.12 series * omap-ssi: remove unnecessary debugfs_create_dir() error check ---------------------------------------------------------------- Yang Ruibin (1): HSI: omap-ssi: Remove unnecessary debugfs_create_dir() error check drivers/hsi/controllers/omap_ssi_core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) --nbhs5k7cbkf77ryp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmbnRlYACgkQ2O7X88g7 +prU9xAAi9WJgTUZ9Eutpsre5R77CoF71zVRF2my1jH+ciMfhVUV7r3BBcJmoWot uZehebzG75QOvlGQLi/y1bE05Z2idB6GSChIt2aj5+SL31qUhSyDbTZGrArEDlyt F5425J1+hp5a/MkkrA7Ao2Ulj29M+ULL3mG4ICLYLKnkG4GfvHJn7M58PvUePg6a +RzeRcIveu12J6hHvyuDPq4QdSusOMIO3eUSexzcSlgZg7lKPWG/VTJz/3iYRhNK FaENzea12z21tvZ5WurjWq5ew8yD4K1DCJsc5ZtexePYKo5wptytoUoGou0OvpwT TKeJgxQ8LkdpMYMX3kgN1UZDvrF/8i+5ATMkjt+2cAiAT05qRMLc8e/ix5BwNip/ AE1LxiFI91zdR6LE5Yn1SQVHs5lHBbmiCirhSKz7gnblCokA4LeQ2fc14OEhl4KW 1DLAjgi24xn3jgKfBnRGjLwhnMK2boEAUgCg8P8aCA6Dp+LfvHFGgsa+e6Rrdmsl kAb+Ivafgi0qviraOdgCWOs89Dhi4h5Yt+/0PCIqM0/0BG7/EoSv6wSGDrV8UWF/ Q6a9xuIPJG1hO7NhD/VlG6Nw1E/oEMHBio2fG1pvxfkuUTX96KaNIcjCW2PBhHZ7 eYEtbxUiHSsb/RN1Lk9BTDPVE+NQ7veG0Nj2VcVFO9YroeF6cGM= =2ULi -----END PGP SIGNATURE----- --nbhs5k7cbkf77ryp-- . Date: Sun, 15 Sep 2024 22:41:02 +0200 From: Sebastian Reichel To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [GIT PULL] power-supply changes for 6.12 --v5iyho5naygwzboo Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Linus, Lot's of small things this time. The pull contains two merges of immutable branches, one for the AXP717 support, which is shared with MFD and one for the usb_types change, which is shared with extcon to fix up a newly introduced driver using usb_types (also touching a couple of other subsystems). Everything but the last two commits have been in linux-next for at least 10 days. I only pushed the last two commits some minutes ago. Those two are fixes originally intended for 6.11. I received them a few days ago and gave them some testing while travelling to Vienna. I independently received a second patch fixing the issue, so it should be fixed soon and I will be on vacation with limited network access for 3 weeks after LPC. Thus I think its better to have them included now even though they received limited testing. Greetings, -- Sebastian The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.gi= t tags/for-v6.12 for you to fetch changes up to e50a57d16f897e45de1112eb6478577b197fab52: power: supply: hwmon: Fix missing temp1_max_alarm attribute (2024-09-14 1= 1:06:07 +0200) ---------------------------------------------------------------- power supply and reset changes for the 6.12 series * power-supply core - introduce power_supply_show_enum_with_available() helper - change usb_types from an array into a bitmask - fix early usage of power_supply_property_is_writeable() resulting in sysfs files not being writable - fix missing temp1_max_alarm attribute in power-supply's hwmon devices * drivers - max1720x: expose nvmem device - brcmstb: cleanup driver to use latest APIs - max77693: expose input and charging current limit - max17042_battery: fix state of charge reading for devices without current sensing - axp20x_battery: add AXP717 support - axp20x_battery: fix min/max voltage properties - axp20x_usb_power: add AXP717 support - axp20x_usb_power: add DT based input current limit * Documentation updates * misc. minor cleanups and fixes ---------------------------------------------------------------- Andres Salomon (1): ABI: testing: sysfs-class-power: clarify charge_type documentation Andrew Davis (5): power: reset: brcmstb: Use normal driver register function power: reset: brcmstb: Use device_get_match_data() for matching power: reset: brcmstb: Use syscon_regmap_lookup_by_phandle_args() hel= per power: reset: brcmstb: Use devm_register_sys_off_handler() power: reset: brcmstb: Do not go into infinite loop if reset fails Artur Weber (2): power: supply: max17042_battery: Fix SOC threshold calc w/ no current= sense power: supply: max77693: Expose input current limit and CC current pr= operties Asmaa Mnebhi (1): power: reset: pwr-mlxbf: support graceful shutdown Chen Ni (1): power: supply: cpcap-charger: Convert comma to semicolon Chris Morgan (11): power: supply: axp20x_battery: Remove design from min and max voltage power: supply: axp20x_battery: Make iio and battery config per device power: supply: axp20x_usb_power: Make VBUS and IIO config per device dt-bindings: power: supply: axp20x: Add input-current-limit-microamp power: supply: axp20x_usb_power: add input-current-limit-microamp dt-bindings: power: supply: axp20x-battery: Add monitored-battery mfd: axp20x: Add ADC, BAT, and USB cells for AXP717 dt-bindings: power: supply: axp20x: Add AXP717 compatible dt-bindings: power: supply: axp20x: Add AXP717 compatible power: supply: axp20x_usb_power: Add support for AXP717 power: supply: axp20x_battery: add support for AXP717 Colin Ian King (1): power: supply: axp20x_usb_power: Fix spelling mistake "reqested" -> "= requested" Dan Carpenter (1): power: supply: max1720x: fix a double free on error in probe() Dimitri Fedrau (1): power: supply: max1720x: add read support for nvmem Hans de Goede (8): power: supply: "usb_type" property may be written to power: supply: ucs1002: Adjust ucs1002_set_usb_type() to accept strin= g values power: supply: rt9467-charger: Remove "usb_type" property write suppo= rt power: supply: sysfs: Add power_supply_show_enum_with_available() hel= per power: supply: sysfs: Move power_supply_show_enum_with_available() up power: supply: Change usb_types from an array into a bitmask power: supply: Drop use_cnt check from power_supply_property_is_write= able() power: supply: hwmon: Fix missing temp1_max_alarm attribute Hongbo Li (1): power: supply: ab8500: Constify struct kobj_type Jinjie Ruan (1): power: supply: max8998_charger: Fix module autoloading Krzysztof Kozlowski (2): power: supply: core: simplify with cleanup.h power: supply: twl4030_charger: correct comparision with old current Sebastian Reichel (2): Merge tag 'ib-psy-usb-types-signed' into psy-next Merge tag 'tags/ib-mfd-for-iio-power-v6.12' into psy-next Stanislav Jakubek (1): dt-bindings: power: supply: sc27xx-fg: add low voltage alarm IRQ Thomas Wei=DFschuh (1): power: supply: core: constify psy_tzd_ops Documentation/ABI/testing/sysfs-class-power | 45 +- .../bindings/power/supply/sc27xx-fg.yaml | 6 + .../x-powers,axp20x-battery-power-supply.yaml | 7 + .../supply/x-powers,axp20x-usb-power-supply.yaml | 72 ++- drivers/extcon/extcon-intel-cht-wc.c | 15 +- drivers/mfd/axp20x.c | 25 +- drivers/phy/ti/phy-tusb1210.c | 11 +- drivers/power/reset/brcmstb-reboot.c | 59 +- drivers/power/reset/pwr-mlxbf.c | 16 +- drivers/power/supply/ab8500_fg.c | 2 +- drivers/power/supply/axp20x_battery.c | 591 +++++++++++++++++= ++-- drivers/power/supply/axp20x_usb_power.c | 368 +++++++++++-- drivers/power/supply/bq256xx_charger.c | 15 +- drivers/power/supply/cpcap-charger.c | 2 +- drivers/power/supply/cros_usbpd-charger.c | 22 +- drivers/power/supply/lenovo_yoga_c630_battery.c | 7 +- drivers/power/supply/max17042_battery.c | 5 +- drivers/power/supply/max1720x_battery.c | 209 +++++++- drivers/power/supply/max77693_charger.c | 52 ++ drivers/power/supply/max8998_charger.c | 1 + drivers/power/supply/mp2629_charger.c | 15 +- drivers/power/supply/mt6360_charger.c | 13 +- drivers/power/supply/mt6370-charger.c | 13 +- drivers/power/supply/power_supply_core.c | 19 +- drivers/power/supply/power_supply_hwmon.c | 3 +- drivers/power/supply/power_supply_sysfs.c | 66 +-- drivers/power/supply/qcom_battmgr.c | 37 +- drivers/power/supply/qcom_pmi8998_charger.c | 13 +- drivers/power/supply/rk817_charger.c | 9 +- drivers/power/supply/rn5t618_power.c | 13 +- drivers/power/supply/rt9467-charger.c | 16 +- drivers/power/supply/rt9471.c | 15 +- drivers/power/supply/twl4030_charger.c | 2 +- drivers/power/supply/ucs1002_power.c | 26 +- drivers/usb/typec/anx7411.c | 11 +- drivers/usb/typec/rt1719.c | 11 +- drivers/usb/typec/tcpm/tcpm.c | 11 +- drivers/usb/typec/tipd/core.c | 9 +- drivers/usb/typec/ucsi/psy.c | 11 +- include/linux/mfd/axp20x.h | 26 + include/linux/mfd/max77693-private.h | 5 + include/linux/power_supply.h | 3 +- 42 files changed, 1435 insertions(+), 442 deletions(-) --v5iyho5naygwzboo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmbnRl4ACgkQ2O7X88g7 +powXg//Vf3fVIDf/G1bKemg7VNryDRxdlWp4Wv4He/odZESQvm71eedHrNTfHjH ySIVAPJbCIYcfpJVrNpJ08hGYkmO4MYAsG0faRtW9tL2dhnyQrcan1A9TS9RDvJl zaltwAOs118aNpZSNEWqT2iC8FJ/Sh/UK7NQORKn/tNx7/BkrA+w/LIY1iOj3LCq 3jjowsy4U0Ha2K/az6MfrBFQlOuX3McrTpDSljb2zitlNTRhh3pAmdCwc4ts0jp3 XFaIoZLv+dVBkEvCmkAcPG1gTTMpVe9hzZw4Wj2ZeRy+Yt7T0gQeD7ii7zkwcMbz fTe03KIRzlehdSj2qpzfml4wkwb9mOJiKqvgNTx5fs9vqXybY3Jk13T1uvCVwVwR 5lTZpCZQXIS0xnz3EVLUs2lJWPesjKtjk88mbLkUDa3Xms8Z0S1f26dto6bGo35M 6Sxj+RZ3ZHHVkvWdd05bed29seaTaJ8r1qp0Wu9K1JTZll+w+yq0jvIo0K1B5he8 5fvruXT7M609a7Emb7n5HafxmN8pJJ47EtZlYGXgmbHNVzOlxz8e6Z09MG14dOof FlBoq4K1CoM5cECdqoDKFSxFH/2DFYJHg0Qnk4s09ESVveeSKv3ddCQKvEqKgqdU 0nuoaljyc2y51A1NI7oflR+1caiCTaycV2eQo+Vlz3pudae/+RI= =QAp9 -----END PGP SIGNATURE----- --v5iyho5naygwzboo-- . Date: Mon, 16 Sep 2024 00:26:11 +0100 From: Mark Brown To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Mark Brown Subject: [GIT PULL] regmap updates for v6.12 The following changes since commit 7c626ce4bae1ac14f60076d00eafe71af30450ba: Linux 6.11-rc3 (2024-08-11 14:27:14 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-v6.12 for you to fetch changes up to c7edb7ac8472a57e0c56a3a95796db3af98b2383: regmap: kunit: Add coverage of spinlocked regmaps (2024-09-02 12:56:16 +0100) ---------------------------------------------------------------- regmap: Updates for v6.12 The main update here is Matti's work allowing regmap irqdomains to be given custom names (allowing multiple interrupt controllers associatd with a single struct device), this pulls in some commits from Thomas' tree which it depends on. Otherwise there's a bit of work on improving handling of regmaps protected with spinlocks when used with complex cache types, fixing some valid but harmless lockdep reports seen with some new driver work. ---------------------------------------------------------------- Marek Szyprowski (1): regcache: use map->alloc_flags also for allocating cache Mark Brown (4): regmap IRQ support for devices with multiple IRQs regmap: Hold the regmap lock when allocating and freeing the cache regmap: Use locking during kunit tests regmap: kunit: Add coverage of spinlocked regmaps Matti Vaittinen (3): irqdomain: Simplify simple and legacy domain creation irqdomain: Allow giving name suffix for domain regmap: Allow setting IRQ domain name suffix Thomas Gleixner (1): irqdomain: Cleanup domain name allocation drivers/base/regmap/regcache-flat.c | 2 +- drivers/base/regmap/regcache-maple.c | 2 +- drivers/base/regmap/regcache-rbtree.c | 2 +- drivers/base/regmap/regcache.c | 4 + drivers/base/regmap/regmap-irq.c | 37 +++++-- drivers/base/regmap/regmap-kunit.c | 19 +++- drivers/base/regmap/regmap.c | 1 + include/linux/irqdomain.h | 8 ++ include/linux/regmap.h | 4 + kernel/irq/irqdomain.c | 198 +++++++++++++++++++--------------- 10 files changed, 175 insertions(+), 102 deletions(-) . Date: Mon, 16 Sep 2024 00:26:27 +0100 From: Mark Brown To: Linus Torvalds Cc: Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown Subject: [GIT PULL] regulator updates for v6.12 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git tags/regulator-v6.12 for you to fetch changes up to 4591a2271f2e4c320eaa63c348169e4e6e6f2852: regulator: sm5703: Remove because it is unused and fails to build (2024-09-13 19:08:14 +0100) ---------------------------------------------------------------- regulator: Updates for v6.12 This release is almost all cleanup work of various kinds, while the diffstat for the core is quite large this is almost all cleanups and documentation improvments with some small fixes rather than any new feature work. We do have support for a couple of new devices but these are small additions to existing drivers rather than new drivers. - Removal of the SM5703 driver which does not have it's dependencies available. - Support for Allwinner AXP717, and Qualcomm WCN6855. The Allwinner support shares some commits with the MFD tree. ---------------------------------------------------------------- Andre Przywara (3): dt-bindings: mfd: x-powers,axp152: add boost regulator mfd: axp20x: AXP717: Add support for boost regulator regulator: axp20x: AXP717: Add boost regulator Andrei Simion (2): regulator: mcp16502: Add supplier for regulators regulator: dt-bindings: microchip,mcp16502: Add voltage input supply documentation André Draszik (1): regulator: update some comments ([gs]et_voltage_vsel vs [gs]et_voltage_sel) Andy Shevchenko (1): regulator: of: Refactor of_get_*regulator() to decrease indentation Bartosz Golaszewski (3): regulator: dt-bindings: qcom,qca6390-pmu: fix the description for bt-enable-gpios regulator: dt-bindings: qcom,qca6390-pmu: document WCN6855 regulator: dt-bindings: qcom,qca6390-pmu: document the swctrl-gpios property Chen Ni (2): regulator: wm831x-isink: Convert comma to semicolon regulator: rt5120: Convert comma to semicolon Chen-Yu Tsai (15): regulator: Clarify error message for "id == NULL" in _regulator_get() regulator: Return actual error in of_regulator_bulk_get_all() regulator: Fully clean up on error in of_regulator_bulk_get_all() regulator: core: Fix short description for _regulator_check_status_enabled() regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value regulator: core: Fix incorrectly formatted kerneldoc "Return" sections regulator: core: Add missing kerneldoc "Return" sections regulator: of: Fix incorrectly formatted kerneldoc "Return" sections regulator: fixed: Fix incorrectly formatted kerneldoc "Return" section regulator: fixed-helper: Add missing "Return" kerneldoc section regulator: irq_helpers: Fix regulator_irq_map_event_simple() kerneldoc regulator: of: Fix kerneldoc format for of_regulator_bulk_get_all() regulator: Unify "negative error number" terminology in comments regulator: Move OF-specific regulator lookup code to of_regulator.c regulator: Split up _regulator_get() Christophe JAILLET (6): regulator: bd9576: Constify struct linear_range regulator: mp5416: Constify struct regulator_desc regulator: da9211: Constify struct regulator_desc regulator: wm8400: Constify struct regulator_desc regulator: tps6287x: Constify struct regulator_desc regulator: sm5703: Remove because it is unused and fails to build Dan Carpenter (1): regulator: bd96801: Delete unnecessary check in probe() Jinjie Ruan (1): regulator: max8973: Use irq_get_trigger_type() helper Krzysztof Kozlowski (24): regulator: bd718x7: Use scoped device node handling to simplify error paths regulator: bd96801: Use scoped device node handling to simplify error paths regulator: max8997: Use scoped device node handling to simplify error paths regulator: s5m8767: Use scoped device node handling to simplify error paths regulator: qcom-rpmh: Simplify with scoped for each OF child loop regulator: qcom-smd: Simplify with scoped for each OF child loop regulator: scmi: Simplify with scoped for each OF child loop regulator: s2mps11: use scoped memory allocation to simplify probe regulator: da9052: Constify static data regulator: da9055: Constify static data regulator: da9063: Constify static data regulator: da9121: Constify static data regulator: hi6421: Constify static data regulator: hi6421v600: Constify static data regulator: tps65023: Constify static data regulator: max77826: Drop unused 'rdesc' in 'struct max77826_regulator_info' regulator: max77826: Constify static data regulator: mtk-dvfsrc: Constify static data regulator: pcap: Constify static data regulator: pfuze100: Constify static data regulator: qcom-refgen: Constify static data regulator: hi6421v530: Drop unused 'eco_microamp' regulator: hi6421v530: Use container_of and constify static data regulator: max77650: Use container_of and constify static data Macpaul Lin (1): regulator: dt-bindings: mediatek,mt6397-regulator: convert to YAML Mark Brown (5): Add input voltage suppliers for PMIC MCP16502 regulator: Use scoped device node handling to simplify regulator: Minor cleanups regulator: Add AXP717 boost support regulator: Few constifications of static data Rob Herring (Arm) (3): regulator: Use of_property_read_bool() regulator: qcom_spmi: Drop unnecessary of_find_property() call regulator: qcom_spmi: Use of_property_read_bool() Wei Fang (1): regulator: core: fix the broken behavior of regulator_dev_lookup() Yu Jiaoliang (1): regulator: Fix typos in the comment Yue Haibing (1): regulator: max77857: Make max77857_id static .../devicetree/bindings/mfd/x-powers,axp152.yaml | 2 +- .../regulator/mediatek,mt6397-regulator.yaml | 238 ++++++++++++++++ .../bindings/regulator/microchip,mcp16502.yaml | 20 ++ .../bindings/regulator/mt6397-regulator.txt | 220 --------------- .../bindings/regulator/qcom,qca6390-pmu.yaml | 22 +- drivers/mfd/axp20x.c | 2 + drivers/regulator/Kconfig | 7 - drivers/regulator/Makefile | 1 - drivers/regulator/act8865-regulator.c | 4 +- drivers/regulator/axp20x-regulator.c | 4 + drivers/regulator/bd718x7-regulator.c | 19 +- drivers/regulator/bd9576-regulator.c | 8 +- drivers/regulator/bd96801-regulator.c | 19 +- drivers/regulator/core.c | 310 +++++++++++---------- drivers/regulator/da903x-regulator.c | 2 +- drivers/regulator/da9052-regulator.c | 22 +- drivers/regulator/da9055-regulator.c | 28 +- drivers/regulator/da9063-regulator.c | 4 +- drivers/regulator/da9121-regulator.c | 20 +- drivers/regulator/da9211-regulator.c | 2 +- drivers/regulator/devres.c | 18 +- drivers/regulator/fan53555.c | 2 +- drivers/regulator/fixed-helper.c | 2 + drivers/regulator/fixed.c | 8 +- drivers/regulator/helpers.c | 8 +- drivers/regulator/hi6421-regulator.c | 14 +- drivers/regulator/hi6421v530-regulator.c | 27 +- drivers/regulator/hi6421v600-regulator.c | 10 +- drivers/regulator/internal.h | 13 +- drivers/regulator/irq_helpers.c | 17 +- drivers/regulator/max5970-regulator.c | 2 +- drivers/regulator/max77650-regulator.c | 31 +-- drivers/regulator/max77802-regulator.c | 4 +- drivers/regulator/max77826-regulator.c | 4 +- drivers/regulator/max77857-regulator.c | 2 +- drivers/regulator/max8973-regulator.c | 7 +- drivers/regulator/max8997-regulator.c | 16 +- drivers/regulator/mcp16502.c | 17 +- drivers/regulator/mp5416.c | 4 +- drivers/regulator/mt6357-regulator.c | 2 +- drivers/regulator/mtk-dvfsrc-regulator.c | 10 +- drivers/regulator/of_regulator.c | 150 ++++++++-- drivers/regulator/pcap-regulator.c | 12 +- drivers/regulator/pfuze100-regulator.c | 10 +- drivers/regulator/qcom-refgen-regulator.c | 4 +- drivers/regulator/qcom-rpmh-regulator.c | 17 +- drivers/regulator/qcom_smd-regulator.c | 13 +- drivers/regulator/qcom_spmi-regulator.c | 12 +- drivers/regulator/rt5120-regulator.c | 4 +- drivers/regulator/s2mps11.c | 17 +- drivers/regulator/s5m8767.c | 17 +- drivers/regulator/scmi-regulator.c | 8 +- drivers/regulator/sm5703-regulator.c | 170 ----------- drivers/regulator/tps6287x-regulator.c | 2 +- drivers/regulator/tps65023-regulator.c | 6 +- drivers/regulator/wm831x-isink.c | 8 +- drivers/regulator/wm8400-regulator.c | 2 +- include/linux/mfd/axp20x.h | 3 + 58 files changed, 809 insertions(+), 818 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6397-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6397-regulator.txt delete mode 100644 drivers/regulator/sm5703-regulator.c . Date: Mon, 16 Sep 2024 00:26:43 +0100 From: Mark Brown To: Linus Torvalds Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown Subject: [GIT PULL] SPI updates for v6.12 The following changes since commit b787a33864121a565aeb0e88561bf6062a19f99c: spi: geni-qcom: Fix incorrect free_irq() sequence (2024-09-09 12:57:33 +0100) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.12 for you to fetch changes up to 07f1eb718db281c3e0cdb068ea7d73c30921a81c: spi: geni-qcom: Use devm functions to simplify code (2024-09-12 12:39:04 +0100) ---------------------------------------------------------------- spi: Updates for v6.12 This is quite a quiet release for sPI. The one new core feature here is support for configuring the state of the MOSI pin when the bus is idle, there are some devices which are very fragile in this regard even when the chip select signal is not asserted. Otherwise we have some new driver support, a bunch of small fixes and some general cleanup work. - Support for configuring the state of the MOSI pin when the the bus is idle. - Add the Elgin JG0309-01 in spidev. - Support for Marvell xSPI, Mediatek MTK7981, Microchip PIC64GX, NXP i.MX8ULP, and Rockchip RK3576 controllers. I also accidentally pulled in an IIO DT bindings update due to a typo when applying the MOSI idle state patches. ---------------------------------------------------------------- Andy Shevchenko (3): spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ spi: ppc4xx: Revert "handle irq_of_parse_and_map() errors" spi: ppc4xx: Sort headers AngeloGioacchino Del Regno (1): spi: spi-mt65xx: Use threaded interrupt for non-SPIMEM transfer Bastien Curutchet (1): spi: davinci: Adapt transfer's timeout to transfer's length Biju Das (1): spi: rpc-if: Add missing MODULE_DEVICE_TABLE Chen Ni (1): spi: meson-spicc: convert comma to semicolon David Lechner (1): spi: axi-spi-engine: don't emit XFER_BITS for empty xfer Detlev Casanova (1): spi: dt-bindings: Add rockchip,rk3576-spi compatible Fabio Estevam (3): dt-bindings: trivial-devices: Document elgin,jg10309-01 spi: spidev: Add an entry for elgin,jg10309-01 spi: mxs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS() Frank Li (1): spi: dt-bindings: convert spi-sc18is602.txt to yaml format Haibo Chen (3): dt-bindings: spi: nxp-fspi: add imx8ulp support spi: fspi: involve lut_num for struct nxp_fspi_devtype_data spi: fspi: add support for imx8ulp Hongbo Li (1): spi: spi-ppc4xx: Remove duplicate included header file linux/platform_device.h Jinjie Ruan (16): spi: cadence: Make cdns_mrvl_xspi_clk_div_list static spi: s3c64xx: Fix module autoloading spi: bcm63xx: Fix module autoloading spi: bcm63xx: Fix missing pm_runtime_disable() spi: wpcm-fiu: Use devm_platform_ioremap_resource_byname() spi: atmel-quadspi: Simpify resource lookup spi: bcmbca-hsspi: Simpify resource lookup spi: bcmbca-hsspi: Fix missing pm_runtime_disable() spi: bcmbca-hsspi: Use devm_spi_alloc_host() spi: atmel-quadspi: Fix uninitialized res spi: atmel-quadspi: Simplify with dev_err_probe() spi: wpcm-fiu: Fix uninitialized res spi: wpcm-fiu: Simplify with dev_err_probe() spi: zynqmp-gqspi: Use devm_spi_alloc_host() spi: zynqmp-gqspi: Simplify with dev_err_probe() spi: geni-qcom: Use devm functions to simplify code Krzysztof Kozlowski (1): spi: cadence-quadspi: Simplify with scoped for each OF child loop Kuan-Wei Chiu (1): spi: zynq-qspi: Replace kzalloc with kmalloc for buffer allocation Ma Ke (2): spi: ppc4xx: handle irq_of_parse_and_map() errors spi: ppc4xx: handle irq_of_parse_and_map() errors Marcelo Schmitt (5): spi: Enable controllers to extend the SPI protocol with MOSI idle configuration spi: bitbang: Implement support for MOSI idle state configuration spi: spi-gpio: Add support for MOSI idle state configuration spi: spi-axi-spi-engine: Add support for MOSI idle configuration dt-bindings: iio: adc: Add AD4000 Mark Brown (9): Add support for AD4000 series of ADCs Marvell HW overlay support for Cadence xSPI spi: Add dummy definitions for ACPI lookup functions spi: bcm63xx: Fix two bugs spi: wpcm-fiu: Fix uninitialized res spi: bcmbca-hsspi: Fix missing pm_runtime_disable() spi: atmel-quadspi: Fix uninitialized res Add device tree for ArmSoM Sige 5 board spi: Merge up fixes Nathan Chancellor (1): spi: Revert "spi: Insert the missing pci_dev_put()before return" Pierre-Henry Moussay (1): dt-bindings: spi: add PIC64GX SPI/QSPI compatibility to MPFS SPI/QSPI bindings Rafał Miłecki (1): spi: dt-bindings: mediatek,spi-mt65xx: add compatible for MT7981 Witold Sadowski (10): spi: dt-bindings: cadence: Add Marvell overlay bindings documentation for Cadence XSPI spi: cadence: Add static PHY configuration in Marvell overlay spi: cadence: Add clock configuration for Marvell xSPI overlay spi: cadence: Add Marvell SDMA operations spi: cadence: Add Marvell xSPI interrupt changes spi: cadence: Add Marvell xfer operation support spi: cadence: Change resource mapping spi: cadence: Change cs property reading. spi: cadence: Try to read spi-tx/rx-bus width property using ACPI spi: cadence: Add 64BIT Kconfig dependency Yan Zhen (1): spi: nxp-fspi: Use max macro Yang Ruibin (1): spi: Insert the missing pci_dev_put()before return Yang Yingliang (7): spi: switch to use spi_controller_is_target() spi: slave-time: switch to use spi_target_abort() spi: slave-system-control: switch to use spi_target_abort() spi: spidev: switch to use spi_target_abort() spi: slave-mt27xx: switch to use target_abort platform/olpc: olpc-xo175-ec: switch to use spi_target_abort(). spi: remove spi_controller_is_slave() and spi_slave_abort() zhang jiao (1): spi: spidev_fdx: Fix the wrong format specifier .../devicetree/bindings/iio/adc/adi,ad4000.yaml | 197 ++++++ .../devicetree/bindings/spi/cdns,xspi.yaml | 32 +- .../bindings/spi/mediatek,spi-mt65xx.yaml | 1 + .../bindings/spi/microchip,mpfs-spi.yaml | 7 +- .../devicetree/bindings/spi/nxp,sc18is.yaml | 51 ++ .../devicetree/bindings/spi/spi-nxp-fspi.yaml | 1 + .../devicetree/bindings/spi/spi-rockchip.yaml | 1 + .../devicetree/bindings/spi/spi-sc18is602.txt | 23 - .../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/spi/spi-summary.rst | 83 +++ MAINTAINERS | 7 + drivers/platform/olpc/olpc-xo175-ec.c | 4 +- drivers/spi/Kconfig | 2 +- drivers/spi/atmel-quadspi.c | 31 +- drivers/spi/spi-axi-spi-engine.c | 17 +- drivers/spi/spi-bcm63xx.c | 9 +- drivers/spi/spi-bcmbca-hsspi.c | 25 +- drivers/spi/spi-bitbang.c | 24 + drivers/spi/spi-cadence-quadspi.c | 9 +- drivers/spi/spi-cadence-xspi.c | 692 ++++++++++++++++++++- drivers/spi/spi-davinci.c | 8 +- drivers/spi/spi-geni-qcom.c | 63 +- drivers/spi/spi-gpio.c | 12 +- drivers/spi/spi-meson-spicc.c | 22 +- drivers/spi/spi-mt65xx.c | 40 +- drivers/spi/spi-mxs.c | 11 +- drivers/spi/spi-nxp-fspi.c | 57 +- drivers/spi/spi-ppc4xx.c | 22 +- drivers/spi/spi-rpc-if.c | 7 + drivers/spi/spi-s3c64xx.c | 1 + drivers/spi/spi-slave-mt27xx.c | 12 +- drivers/spi/spi-slave-system-control.c | 2 +- drivers/spi/spi-slave-time.c | 2 +- drivers/spi/spi-wpcm-fiu.c | 17 +- drivers/spi/spi-zynq-qspi.c | 2 +- drivers/spi/spi-zynqmp-gqspi.c | 32 +- drivers/spi/spi.c | 27 +- drivers/spi/spidev.c | 2 +- include/linux/spi/spi.h | 12 +- include/linux/spi/spi_bitbang.h | 1 + include/uapi/linux/spi/spi.h | 5 +- tools/spi/spidev_fdx.c | 2 +- 42 files changed, 1305 insertions(+), 272 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4000.yaml create mode 100644 Documentation/devicetree/bindings/spi/nxp,sc18is.yaml delete mode 100644 Documentation/devicetree/bindings/spi/spi-sc18is602.txt . Date: Mon, 16 Sep 2024 01:24:35 -0700 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, "Guilherme G. Piccoli" , Kees Cook , linux-hardening@vger.kernel.org, Mike Rapoport , Steven Rostedt , Tony Luck , Wen Yang Subject: [GIT PULL] pstore updates for v6.12-rc1 Hi Linus, Please pull these pstore updates for v6.12-rc1. Thanks! -Kees The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/pstore-v6.12-rc1 for you to fetch changes up to 1bf8012fc6997f2117f6919369cde16659db60e0: pstore: replace spinlock_t by raw_spinlock_t (2024-08-26 13:33:50 -0700) ---------------------------------------------------------------- pstore updates for v6.12-rc1 - ramoops: Fix .rst typo (Steven Rostedt) - pstore: replace spinlock_t by raw_spinlock_t (Wen Yang) ---------------------------------------------------------------- Steven Rostedt (1): pstore/ramoops: Fix typo as there is no "reserver" Wen Yang (1): pstore: replace spinlock_t by raw_spinlock_t Documentation/admin-guide/ramoops.rst | 2 +- fs/pstore/platform.c | 8 ++++---- include/linux/pstore.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) -- Kees Cook . Date: Mon, 16 Sep 2024 10:38:34 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] core/debugobjects for v6.12-rc1 Linus, please pull the latest core/debugobjects branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-debugobject= s-2024-09-16 up to: 63a4a9b52c3c: debugobjects: Remove redundant checks in fill_pool() A set of updates for debugobjects: - Use the threshold to check for the pool refill condition and not the run time recorded all time low fill value, which is lower than the threshold and therefore causes refills to be delayed. - KCSAN annotation updates and simplification of the fill_pool() code. Thanks, tglx ------------------> Zhen Lei (3): debugobjects: Fix the compilation attributes of some global variables debugobjects: Fix conditions in fill_pool() debugobjects: Remove redundant checks in fill_pool() lib/debugobjects.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 7cea91e193a8..5ce473ad499b 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -70,10 +70,10 @@ static HLIST_HEAD(obj_to_free); * made at debug_stats_show(). Both obj_pool_min_free and obj_pool_max_used * can be off. */ -static int obj_pool_min_free =3D ODEBUG_POOL_SIZE; -static int obj_pool_free =3D ODEBUG_POOL_SIZE; +static int __data_racy obj_pool_min_free =3D ODEBUG_POOL_SIZE; +static int __data_racy obj_pool_free =3D ODEBUG_POOL_SIZE; static int obj_pool_used; -static int obj_pool_max_used; +static int __data_racy obj_pool_max_used; static bool obj_freeing; /* The number of objs on the global free list */ static int obj_nr_tofree; @@ -84,9 +84,9 @@ static int __data_racy debug_objects_fixups __read_mostly; static int __data_racy debug_objects_warnings __read_mostly; static int __data_racy debug_objects_enabled __read_mostly =3D CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT; -static int __data_racy debug_objects_pool_size __read_mostly +static int debug_objects_pool_size __ro_after_init =3D ODEBUG_POOL_SIZE; -static int __data_racy debug_objects_pool_min_level __read_mostly +static int debug_objects_pool_min_level __ro_after_init =3D ODEBUG_POOL_MIN_LEVEL; =20 static const struct debug_obj_descr *descr_test __read_mostly; @@ -95,8 +95,8 @@ static struct kmem_cache *obj_cache __ro_after_init; /* * Track numbers of kmem_cache_alloc()/free() calls done. */ -static int debug_objects_allocated; -static int debug_objects_freed; +static int __data_racy debug_objects_allocated; +static int __data_racy debug_objects_freed; =20 static void free_obj_work(struct work_struct *work); static DECLARE_DELAYED_WORK(debug_obj_work, free_obj_work); @@ -135,20 +135,19 @@ static void fill_pool(void) return; =20 /* - * Reuse objs from the global free list; they will be reinitialized - * when allocating. + * Reuse objs from the global obj_to_free list; they will be + * reinitialized when allocating. * - * Both obj_nr_tofree and obj_pool_free are checked locklessly; the - * READ_ONCE()s pair with the WRITE_ONCE()s in pool_lock critical - * sections. + * obj_nr_tofree is checked locklessly; the READ_ONCE() pairs with + * the WRITE_ONCE() in pool_lock critical sections. */ - while (READ_ONCE(obj_nr_tofree) && (READ_ONCE(obj_pool_free) < obj_pool_min= _free)) { + if (READ_ONCE(obj_nr_tofree)) { raw_spin_lock_irqsave(&pool_lock, flags); /* * Recheck with the lock held as the worker thread might have * won the race and freed the global free list already. */ - while (obj_nr_tofree && (obj_pool_free < obj_pool_min_free)) { + while (obj_nr_tofree && (obj_pool_free < debug_objects_pool_min_level)) { obj =3D hlist_entry(obj_to_free.first, typeof(*obj), node); hlist_del(&obj->node); WRITE_ONCE(obj_nr_tofree, obj_nr_tofree - 1); . Date: Mon, 16 Sep 2024 10:38:37 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] smp/core for v6.12-rc1 Linus, please pull the latest smp/core branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-core-2024-09= -16 up to: 1d07085402d1: smp: Mark smp_prepare_boot_cpu() __init A set of updates for CPU hotplug: - Prepare the core for supporting parallel hotplug on loongarch - A small set of cleanups and enhancements Thanks, tglx ------------------> Bibo Mao (1): smp: Mark smp_prepare_boot_cpu() __init Jiaxun Yang (2): cpu/hotplug: Make HOTPLUG_PARALLEL independent of HOTPLUG_SMT cpu/hotplug: Provide weak fallback for arch_cpuhp_init_parallel_bringup= () Thorsten Blum (1): cpu: Fix W=3D1 build kernel-doc warning arch/loongarch/kernel/smp.c | 2 +- arch/mips/kernel/smp.c | 2 +- arch/powerpc/kernel/smp.c | 2 +- include/linux/smp.h | 2 +- kernel/cpu.c | 20 +++++++++++++++++--- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c index ca405ab86aae..be2655c4c414 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -476,7 +476,7 @@ core_initcall(ipi_pm_init); #endif =20 /* Preload SMP state for boot cpu */ -void smp_prepare_boot_cpu(void) +void __init smp_prepare_boot_cpu(void) { unsigned int cpu, node, rr_node; =20 diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 0362fc5df7b0..39e193cad2b9 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -439,7 +439,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) } =20 /* preload SMP state for boot cpu */ -void smp_prepare_boot_cpu(void) +void __init smp_prepare_boot_cpu(void) { if (mp_ops->prepare_boot_cpu) mp_ops->prepare_boot_cpu(); diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 46e6d2cd7a2d..4ab9b8cee77a 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -1166,7 +1166,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) cpu_smt_set_num_threads(num_threads, threads_per_core); } =20 -void smp_prepare_boot_cpu(void) +void __init smp_prepare_boot_cpu(void) { BUG_ON(smp_processor_id() !=3D boot_cpuid); #ifdef CONFIG_PPC64 diff --git a/include/linux/smp.h b/include/linux/smp.h index fcd61dfe2af3..6a0813c905d0 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -109,7 +109,7 @@ static inline void on_each_cpu_cond(smp_cond_func_t cond_= func, * Architecture specific boot CPU setup. Defined as empty weak function in * init/main.c. Architectures can override it. */ -void smp_prepare_boot_cpu(void); +void __init smp_prepare_boot_cpu(void); =20 #ifdef CONFIG_SMP =20 diff --git a/kernel/cpu.c b/kernel/cpu.c index b1fd2a3db91a..0c9c5dfc8ddd 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1808,6 +1808,7 @@ static int __init parallel_bringup_parse_param(char *ar= g) } early_param("cpuhp.parallel", parallel_bringup_parse_param); =20 +#ifdef CONFIG_HOTPLUG_SMT static inline bool cpuhp_smt_aware(void) { return cpu_smt_max_threads > 1; @@ -1817,6 +1818,21 @@ static inline const struct cpumask *cpuhp_get_primary_= thread_mask(void) { return cpu_primary_thread_mask; } +#else +static inline bool cpuhp_smt_aware(void) +{ + return false; +} +static inline const struct cpumask *cpuhp_get_primary_thread_mask(void) +{ + return cpu_none_mask; +} +#endif + +bool __weak arch_cpuhp_init_parallel_bringup(void) +{ + return true; +} =20 /* * On architectures which have enabled parallel bringup this invokes all BP @@ -2689,9 +2705,7 @@ int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) return ret; } =20 -/** - * Check if the core a CPU belongs to is online - */ +/* Check if the core a CPU belongs to is online */ #if !defined(topology_is_core_online) static inline bool topology_is_core_online(unsigned int cpu) { . Date: Mon, 16 Sep 2024 10:38:39 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] timers/clocksource for v6.12-rc1 Linus, please pull the latest timers/clocksource branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-clocksour= ce-2024-09-16 up to: 4ac1dd3245b9: clocksource: Set cs_watchdog_read() checks based on .un= certainty_margin Updates for the clocksource watchdog: - Make the uncertainty margin handling more robust to prevent false positives - Clarify comments Thanks, tglx ------------------> Borislav Petkov (1): clocksource: Improve comments for watchdog skew bounds Paul E. McKenney (2): clocksource: Fix comments on WATCHDOG_THRESHOLD & WATCHDOG_MAX_SKEW clocksource: Set cs_watchdog_read() checks based on .uncertainty_margin kernel/time/clocksource.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index d0538a75f4c6..23336eecb4f4 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -113,7 +113,6 @@ static u64 suspend_start; =20 /* * Threshold: 0.0312s, when doubled: 0.0625s. - * Also a default for cs->uncertainty_margin when registering clocks. */ #define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 5) =20 @@ -125,6 +124,13 @@ static u64 suspend_start; * * The default of 500 parts per million is based on NTP's limits. * If a clocksource is good enough for NTP, it is good enough for us! + * + * In other words, by default, even if a clocksource is extremely + * precise (for example, with a sub-nanosecond period), the maximum + * permissible skew between the clocksource watchdog and the clocksource + * under test is not permitted to go below the 500ppm minimum defined + * by MAX_SKEW_USEC. This 500ppm minimum may be overridden using the + * CLOCKSOURCE_WATCHDOG_MAX_SKEW_US Kconfig option. */ #ifdef CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US #define MAX_SKEW_USEC CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US @@ -132,6 +138,13 @@ static u64 suspend_start; #define MAX_SKEW_USEC (125 * WATCHDOG_INTERVAL / HZ) #endif =20 +/* + * Default for maximum permissible skew when cs->uncertainty_margin is + * not specified, and the lower bound even when cs->uncertainty_margin + * is specified. This is also the default that is used when registering + * clocks with unspecifed cs->uncertainty_margin, so this macro is used + * even in CONFIG_CLOCKSOURCE_WATCHDOG=3Dn kernels. + */ #define WATCHDOG_MAX_SKEW (MAX_SKEW_USEC * NSEC_PER_USEC) =20 #ifdef CONFIG_CLOCKSOURCE_WATCHDOG @@ -231,6 +244,7 @@ enum wd_read_status { =20 static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csn= ow, u64 *wdnow) { + int64_t md =3D 2 * watchdog->uncertainty_margin; unsigned int nretries, max_retries; int64_t wd_delay, wd_seq_delay; u64 wd_end, wd_end2; @@ -245,7 +259,7 @@ static enum wd_read_status cs_watchdog_read(struct clocks= ource *cs, u64 *csnow, local_irq_enable(); =20 wd_delay =3D cycles_to_nsec_safe(watchdog, *wdnow, wd_end); - if (wd_delay <=3D WATCHDOG_MAX_SKEW) { + if (wd_delay <=3D md + cs->uncertainty_margin) { if (nretries > 1 && nretries >=3D max_retries) { pr_warn("timekeeping watchdog on CPU%d: %s retried %d times before succe= ss\n", smp_processor_id(), watchdog->name, nretries); @@ -258,12 +272,12 @@ static enum wd_read_status cs_watchdog_read(struct cloc= ksource *cs, u64 *csnow, * there is too much external interferences that cause * significant delay in reading both clocksource and watchdog. * - * If consecutive WD read-back delay > WATCHDOG_MAX_SKEW/2, - * report system busy, reinit the watchdog and skip the current + * If consecutive WD read-back delay > md, report + * system busy, reinit the watchdog and skip the current * watchdog test. */ wd_seq_delay =3D cycles_to_nsec_safe(watchdog, wd_end, wd_end2); - if (wd_seq_delay > WATCHDOG_MAX_SKEW/2) + if (wd_seq_delay > md) goto skip_test; } =20 @@ -1146,14 +1160,19 @@ void __clocksource_update_freq_scale(struct clocksour= ce *cs, u32 scale, u32 freq } =20 /* - * If the uncertainty margin is not specified, calculate it. - * If both scale and freq are non-zero, calculate the clock - * period, but bound below at 2*WATCHDOG_MAX_SKEW. However, - * if either of scale or freq is zero, be very conservative and - * take the tens-of-milliseconds WATCHDOG_THRESHOLD value for the - * uncertainty margin. Allow stupidly small uncertainty margins - * to be specified by the caller for testing purposes, but warn - * to discourage production use of this capability. + * If the uncertainty margin is not specified, calculate it. If + * both scale and freq are non-zero, calculate the clock period, but + * bound below at 2*WATCHDOG_MAX_SKEW, that is, 500ppm by default. + * However, if either of scale or freq is zero, be very conservative + * and take the tens-of-milliseconds WATCHDOG_THRESHOLD value + * for the uncertainty margin. Allow stupidly small uncertainty + * margins to be specified by the caller for testing purposes, + * but warn to discourage production use of this capability. + * + * Bottom line: The sum of the uncertainty margins of the + * watchdog clocksource and the clocksource under test will be at + * least 500ppm by default. For more information, please see the + * comment preceding CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US above. */ if (scale && freq && !cs->uncertainty_margin) { cs->uncertainty_margin =3D NSEC_PER_SEC / (scale * freq); . Date: Mon, 16 Sep 2024 10:38:41 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] timers/core for v6.12-rc1 Linus, please pull the latest timers/core branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-core-2024= -09-16 up to: 35b603f8a78b: ntp: Make sure RTC is synchronized when time goes backw= ards Updates for timers and timekeeping: - Core: - Overhaul of posix-timers in preparation of removing the workaround for periodic timers which have signal delivery ignored. - Remove the historical extra jiffie in msleep() msleep() adds an extra jiffie to the timeout value to ensure minimal sleep time. The timer wheel ensures minimal sleep time since the large rewrite to a non-cascading wheel, but the extra jiffie in msleep() remained unnoticed. Remove it. - Make the timer slack handling correct for realtime tasks. The procfs interface is inconsistent and does neither reflect reality nor conforms to the man page. Show the correct 0 slack for real time tasks and enforce it at the core level instead of having inconsistent individual checks in various timer setup functions. - The usual set of updates and enhancements all over the place. - Drivers: - Allow the ACPI PM timer to be turned off during suspend =09 - No new drivers - The usual updates and enhancements in various drivers Thanks, tglx ------------------> Ankit Agrawal (1): clocksource/drivers/qcom: Add missing iounmap() on errors in msm_dt_tim= er_init() Anna-Maria Behnsen (5): timers: Remove historical extra jiffie for timeout in msleep() timers: Annotate possible non critical data race of next_expiry timers: Rename next_expiry_recalc() to be unique cpu: Use already existing usleep_range() treewide: Fix wrong singular form of jiffies in comments Benjamin ROBIN (1): ntp: Make sure RTC is synchronized when time goes backwards Detlev Casanova (1): dt-bindings: timer: rockchip: Add rk3576 compatible Felix Moessbauer (1): hrtimer: Use and report correct timerslack values for realtime tasks Gaosheng Cui (2): clocksource/drivers/asm9260: Add missing clk_disable_unprepare in asm92= 60_timer_init clocksource/drivers/cadence-ttc: Add missing clk_disable_unprepare in t= tc_setup_clockevent Huan Yang (1): clocksource/drivers/ingenic: Use devm_clk_get_enabled() helpers Marek Maslanka (3): clocksource: acpi_pm: Add external callback for suspend/resume platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when = suspended platform/x86:intel/pmc: Fix comment for the pmc_core_acpi_pm_timer_susp= end_resume function Sebastian Andrzej Siewior (2): timers: Add sparse annotation for timer_sync_wait_running(). hrtimer: Annotate hrtimer_cpu_base_.*_expiry() for sparse. Thomas Gleixner (24): selftests/timers/posix_timers: Simplify error handling selftests/timers/posix_timers: Add SIG_IGN test selftests/timers/posix_timers: Validate signal rules selftests/timers/posix-timers: Validate SIGEV_NONE selftests/timers/posix-timers: Validate timer_gettime() selftests/timers/posix-timers: Validate overrun after unblock posix-cpu-timers: Split up posix_cpu_timer_get() posix-cpu-timers: Save interval only for armed timers posix-cpu-timers: Handle interval timers correctly in timer_get() posix-cpu-timers: Handle SIGEV_NONE timers correctly in timer_get() posix-cpu-timers: Handle SIGEV_NONE timers correctly in timer_set() posix-cpu-timers: Replace old expiry retrieval in posix_cpu_timer_set() posix-cpu-timers: Do not arm SIGEV_NONE timers posix-cpu-timers: Use @now instead of @val for clarity posix-cpu-timers: Remove incorrect comment in posix_cpu_timer_set() posix-cpu-timers: Simplify posix_cpu_timer_set() posix-timers: Retrieve interval in common timer_settime() code posix-timers: Clear overrun in common_timer_set() posix-timers: Convert timer list to hlist posix-timers: Consolidate timer setup posix-cpu-timers: Make k_itimer::it_active consistent posix-timers: Consolidate signal queueing signal: Remove task argument from dequeue_signal() signal: Replace BUG_ON()s Uros Bizjak (1): clocksource/drivers/jcore: Use request_percpu_irq() Zhang Zekun (1): clocksource/drivers/arm_arch_timer: Using for_each_available_child_of_n= ode_scoped() Documentation/admin-guide/media/vivid.rst | 2 +- .../bindings/timer/rockchip,rk-timer.yaml | 1 + Documentation/timers/timers-howto.rst | 2 +- .../sp_SP/scheduler/sched-design-CFS.rst | 2 +- arch/arm/mach-versatile/spc.c | 2 +- arch/m68k/q40/q40ints.c | 2 +- arch/x86/kernel/cpu/mce/dev-mcelog.c | 2 +- drivers/char/ipmi/ipmi_ssif.c | 2 +- drivers/clocksource/acpi_pm.c | 32 ++ drivers/clocksource/arm_arch_timer.c | 11 +- drivers/clocksource/asm9260_timer.c | 1 + drivers/clocksource/ingenic-ost.c | 7 +- drivers/clocksource/jcore-pit.c | 7 +- drivers/clocksource/timer-cadence-ttc.c | 6 +- drivers/clocksource/timer-qcom.c | 7 +- drivers/dma-buf/st-dma-fence.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 2 +- drivers/gpu/drm/i915/gt/selftest_execlists.c | 4 +- drivers/gpu/drm/i915/i915_utils.c | 2 +- drivers/gpu/drm/v3d/v3d_bo.c | 2 +- drivers/isdn/mISDN/dsp_cmx.c | 2 +- drivers/net/ethernet/marvell/mvmdio.c | 2 +- drivers/platform/x86/intel/pmc/adl.c | 2 + drivers/platform/x86/intel/pmc/cnp.c | 2 + drivers/platform/x86/intel/pmc/core.c | 45 ++ drivers/platform/x86/intel/pmc/core.h | 8 + drivers/platform/x86/intel/pmc/icl.c | 2 + drivers/platform/x86/intel/pmc/mtl.c | 2 + drivers/platform/x86/intel/pmc/spt.c | 2 + drivers/platform/x86/intel/pmc/tgl.c | 2 + fs/proc/base.c | 15 +- fs/select.c | 11 +- fs/signalfd.c | 4 +- fs/xfs/xfs_buf.h | 2 +- include/linux/acpi_pmtmr.h | 13 + include/linux/jiffies.h | 2 +- include/linux/posix-timers.h | 2 +- include/linux/sched/signal.h | 7 +- include/linux/timekeeper_internal.h | 2 +- init/init_task.c | 2 +- kernel/cpu.c | 2 +- kernel/fork.c | 2 +- kernel/sched/syscalls.c | 8 + kernel/signal.c | 34 +- kernel/sys.c | 2 + kernel/time/alarmtimer.c | 9 +- kernel/time/clockevents.c | 2 +- kernel/time/hrtimer.c | 22 +- kernel/time/ntp.c | 10 +- kernel/time/ntp_internal.h | 4 +- kernel/time/posix-cpu-timers.c | 207 ++++---- kernel/time/posix-timers.c | 73 +-- kernel/time/posix-timers.h | 3 +- kernel/time/timekeeping.c | 4 +- kernel/time/timer.c | 62 ++- lib/Kconfig.debug | 2 +- net/batman-adv/types.h | 2 +- tools/testing/selftests/timers/posix_timers.c | 550 +++++++++++++++++--= -- 58 files changed, 848 insertions(+), 377 deletions(-) diff --git a/Documentation/admin-guide/media/vivid.rst b/Documentation/admin-= guide/media/vivid.rst index 1306f19ecb5a..c9d301ab46a3 100644 --- a/Documentation/admin-guide/media/vivid.rst +++ b/Documentation/admin-guide/media/vivid.rst @@ -328,7 +328,7 @@ and an HDMI input, one input for each input type. Those a= re described in more detail below. =20 Special attention has been given to the rate at which new frames become -available. The jitter will be around 1 jiffie (that depends on the HZ +available. The jitter will be around 1 jiffy (that depends on the HZ configuration of your kernel, so usually 1/100, 1/250 or 1/1000 of a second), but the long-term behavior is exactly following the framerate. So a framerate of 59.94 Hz is really different from 60 Hz. If the framerate diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b= /Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml index 19e56b7577a0..6d0eb0014eee 100644 --- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml +++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml @@ -24,6 +24,7 @@ properties: - rockchip,rk3228-timer - rockchip,rk3229-timer - rockchip,rk3368-timer + - rockchip,rk3576-timer - rockchip,rk3588-timer - rockchip,px30-timer - const: rockchip,rk3288-timer diff --git a/Documentation/timers/timers-howto.rst b/Documentation/timers/tim= ers-howto.rst index 5c169e3d29a8..ef7a4652ccc9 100644 --- a/Documentation/timers/timers-howto.rst +++ b/Documentation/timers/timers-howto.rst @@ -19,7 +19,7 @@ it really need to delay in atomic context?" If so... =20 ATOMIC CONTEXT: You must use the `*delay` family of functions. These - functions use the jiffie estimation of clock speed + functions use the jiffy estimation of clock speed and will busy wait for enough loop cycles to achieve the desired delay: =20 diff --git a/Documentation/translations/sp_SP/scheduler/sched-design-CFS.rst = b/Documentation/translations/sp_SP/scheduler/sched-design-CFS.rst index 90a153cad4e8..731c266beb1a 100644 --- a/Documentation/translations/sp_SP/scheduler/sched-design-CFS.rst +++ b/Documentation/translations/sp_SP/scheduler/sched-design-CFS.rst @@ -109,7 +109,7 @@ para que se ejecute, y la tarea en ejecuci=C3=B3n es inte= rrumpida. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D =20 CFS usa una granularidad de nanosegundos y no depende de ning=C3=BAn -jiffie o detalles como HZ. De este modo, el gestor de tareas CFS no tiene +jiffy o detalles como HZ. De este modo, el gestor de tareas CFS no tiene noci=C3=B3n de "ventanas de tiempo" de la forma en que ten=C3=ADa el gestor = de tareas previo, y tampoco tiene heur=C3=ADsticos. =C3=9Anicamente hay un par= =C3=A1metro central ajustable (se ha de cambiar en CONFIG_SCHED_DEBUG): diff --git a/arch/arm/mach-versatile/spc.c b/arch/arm/mach-versatile/spc.c index 5e44170e1a9a..790092734cf6 100644 --- a/arch/arm/mach-versatile/spc.c +++ b/arch/arm/mach-versatile/spc.c @@ -73,7 +73,7 @@ =20 /* * Even though the SPC takes max 3-5 ms to complete any OPP/COMMS - * operation, the operation could start just before jiffie is about + * operation, the operation could start just before jiffy is about * to be incremented. So setting timeout value of 20ms =3D 2jiffies@100Hz */ #define TIMEOUT_US 20000 diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 10f1f294e91f..14b774b9d308 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c @@ -106,7 +106,7 @@ void __init q40_init_IRQ(void) * this stuff doesn't really belong here.. */ =20 -int ql_ticks; /* 200Hz ticks since last jiffie */ +int ql_ticks; /* 200Hz ticks since last jiffy */ static int sound_ticks; =20 #define SVOL 45 diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/d= ev-mcelog.c index a05ac0716ecf..a3aa0199222e 100644 --- a/arch/x86/kernel/cpu/mce/dev-mcelog.c +++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c @@ -314,7 +314,7 @@ static ssize_t mce_chrdev_write(struct file *filp, const = char __user *ubuf, =20 /* * Need to give user space some time to set everything up, - * so do it a jiffie or two later everywhere. + * so do it a jiffy or two later everywhere. */ schedule_timeout(2); =20 diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 96ad571d041a..e093028391af 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -980,7 +980,7 @@ static void msg_written_handler(struct ssif_info *ssif_in= fo, int result, ipmi_ssif_unlock_cond(ssif_info, flags); start_get(ssif_info); } else { - /* Wait a jiffie then request the next message */ + /* Wait a jiffy then request the next message */ ssif_info->waiting_alert =3D true; ssif_info->retries_left =3D SSIF_RECV_RETRIES; if (!ssif_info->stopping) diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 82338773602c..b4330a01a566 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -25,6 +25,10 @@ #include #include =20 +static void *suspend_resume_cb_data; + +static void (*suspend_resume_callback)(void *data, bool suspend); + /* * The I/O port the PMTMR resides at. * The location is detected during setup_arch(), @@ -58,6 +62,32 @@ u32 acpi_pm_read_verified(void) return v2; } =20 +void acpi_pmtmr_register_suspend_resume_callback(void (*cb)(void *data, bool= suspend), void *data) +{ + suspend_resume_callback =3D cb; + suspend_resume_cb_data =3D data; +} +EXPORT_SYMBOL_GPL(acpi_pmtmr_register_suspend_resume_callback); + +void acpi_pmtmr_unregister_suspend_resume_callback(void) +{ + suspend_resume_callback =3D NULL; + suspend_resume_cb_data =3D NULL; +} +EXPORT_SYMBOL_GPL(acpi_pmtmr_unregister_suspend_resume_callback); + +static void acpi_pm_suspend(struct clocksource *cs) +{ + if (suspend_resume_callback) + suspend_resume_callback(suspend_resume_cb_data, true); +} + +static void acpi_pm_resume(struct clocksource *cs) +{ + if (suspend_resume_callback) + suspend_resume_callback(suspend_resume_cb_data, false); +} + static u64 acpi_pm_read(struct clocksource *cs) { return (u64)read_pmtmr(); @@ -69,6 +99,8 @@ static struct clocksource clocksource_acpi_pm =3D { .read =3D acpi_pm_read, .mask =3D (u64)ACPI_PM_MASK, .flags =3D CLOCK_SOURCE_IS_CONTINUOUS, + .suspend =3D acpi_pm_suspend, + .resume =3D acpi_pm_resume, }; =20 =20 diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_a= rch_timer.c index aeafc74181f0..03733101e231 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -1594,7 +1594,6 @@ static int __init arch_timer_mem_of_init(struct device_= node *np) { struct arch_timer_mem *timer_mem; struct arch_timer_mem_frame *frame; - struct device_node *frame_node; struct resource res; int ret =3D -EINVAL; u32 rate; @@ -1608,33 +1607,29 @@ static int __init arch_timer_mem_of_init(struct devic= e_node *np) timer_mem->cntctlbase =3D res.start; timer_mem->size =3D resource_size(&res); =20 - for_each_available_child_of_node(np, frame_node) { + for_each_available_child_of_node_scoped(np, frame_node) { u32 n; struct arch_timer_mem_frame *frame; =20 if (of_property_read_u32(frame_node, "frame-number", &n)) { pr_err(FW_BUG "Missing frame-number.\n"); - of_node_put(frame_node); goto out; } if (n >=3D ARCH_TIMER_MEM_MAX_FRAMES) { pr_err(FW_BUG "Wrong frame-number, only 0-%u are permitted.\n", ARCH_TIMER_MEM_MAX_FRAMES - 1); - of_node_put(frame_node); goto out; } frame =3D &timer_mem->frame[n]; =20 if (frame->valid) { pr_err(FW_BUG "Duplicated frame-number.\n"); - of_node_put(frame_node); goto out; } =20 - if (of_address_to_resource(frame_node, 0, &res)) { - of_node_put(frame_node); + if (of_address_to_resource(frame_node, 0, &res)) goto out; - } + frame->cntbase =3D res.start; frame->size =3D resource_size(&res); =20 diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm926= 0_timer.c index 5b39d3701fa3..8f97ab0b01ec 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c @@ -210,6 +210,7 @@ static int __init asm9260_timer_init(struct device_node *= np) DRIVER_NAME, &event_dev); if (ret) { pr_err("Failed to setup irq!\n"); + clk_disable_unprepare(clk); return ret; } =20 diff --git a/drivers/clocksource/ingenic-ost.c b/drivers/clocksource/ingenic-= ost.c index 9f7c280a1336..e0ec33307c84 100644 --- a/drivers/clocksource/ingenic-ost.c +++ b/drivers/clocksource/ingenic-ost.c @@ -93,14 +93,10 @@ static int __init ingenic_ost_probe(struct platform_devic= e *pdev) return PTR_ERR(map); } =20 - ost->clk =3D devm_clk_get(dev, "ost"); + ost->clk =3D devm_clk_get_enabled(dev, "ost"); if (IS_ERR(ost->clk)) return PTR_ERR(ost->clk); =20 - err =3D clk_prepare_enable(ost->clk); - if (err) - return err; - /* Clear counter high/low registers */ if (soc_info->is64bit) regmap_write(map, TCU_REG_OST_CNTL, 0); @@ -129,7 +125,6 @@ static int __init ingenic_ost_probe(struct platform_devic= e *pdev) err =3D clocksource_register_hz(cs, rate); if (err) { dev_err(dev, "clocksource registration failed"); - clk_disable_unprepare(ost->clk); return err; } =20 diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c index a4a991101fa3..a3fe98cd3838 100644 --- a/drivers/clocksource/jcore-pit.c +++ b/drivers/clocksource/jcore-pit.c @@ -120,7 +120,7 @@ static int jcore_pit_local_init(unsigned cpu) =20 static irqreturn_t jcore_timer_interrupt(int irq, void *dev_id) { - struct jcore_pit *pit =3D this_cpu_ptr(dev_id); + struct jcore_pit *pit =3D dev_id; =20 if (clockevent_state_oneshot(&pit->ced)) jcore_pit_disable(pit); @@ -168,9 +168,8 @@ static int __init jcore_pit_init(struct device_node *node) return -ENOMEM; } =20 - err =3D request_irq(pit_irq, jcore_timer_interrupt, - IRQF_TIMER | IRQF_PERCPU, - "jcore_pit", jcore_pit_percpu); + err =3D request_percpu_irq(pit_irq, jcore_timer_interrupt, + "jcore_pit", jcore_pit_percpu); if (err) { pr_err("pit irq request failed: %d\n", err); free_percpu(jcore_pit_percpu); diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/ti= mer-cadence-ttc.c index ca7a06489c40..b8a1cf59b9d6 100644 --- a/drivers/clocksource/timer-cadence-ttc.c +++ b/drivers/clocksource/timer-cadence-ttc.c @@ -435,7 +435,7 @@ static int __init ttc_setup_clockevent(struct clk *clk, &ttcce->ttc.clk_rate_change_nb); if (err) { pr_warn("Unable to register clock notifier.\n"); - goto out_kfree; + goto out_clk_unprepare; } =20 ttcce->ttc.freq =3D clk_get_rate(ttcce->ttc.clk); @@ -465,13 +465,15 @@ static int __init ttc_setup_clockevent(struct clk *clk, err =3D request_irq(irq, ttc_clock_event_interrupt, IRQF_TIMER, ttcce->ce.name, ttcce); if (err) - goto out_kfree; + goto out_clk_unprepare; =20 clockevents_config_and_register(&ttcce->ce, ttcce->ttc.freq / PRESCALE, 1, 0xfffe); =20 return 0; =20 +out_clk_unprepare: + clk_disable_unprepare(ttcce->ttc.clk); out_kfree: kfree(ttcce); return err; diff --git a/drivers/clocksource/timer-qcom.c b/drivers/clocksource/timer-qco= m.c index b4afe3a67583..eac4c95c6127 100644 --- a/drivers/clocksource/timer-qcom.c +++ b/drivers/clocksource/timer-qcom.c @@ -233,6 +233,7 @@ static int __init msm_dt_timer_init(struct device_node *n= p) } =20 if (of_property_read_u32(np, "clock-frequency", &freq)) { + iounmap(cpu0_base); pr_err("Unknown frequency\n"); return -EINVAL; } @@ -243,7 +244,11 @@ static int __init msm_dt_timer_init(struct device_node *= np) freq /=3D 4; writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL); =20 - return msm_timer_init(freq, 32, irq, !!percpu_offset); + ret =3D msm_timer_init(freq, 32, irq, !!percpu_offset); + if (ret) + iounmap(cpu0_base); + + return ret; } TIMER_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init); TIMER_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init); diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c index 6a1bfcd0cc21..cf2ce3744ce6 100644 --- a/drivers/dma-buf/st-dma-fence.c +++ b/drivers/dma-buf/st-dma-fence.c @@ -402,7 +402,7 @@ static int test_wait_timeout(void *arg) =20 if (dma_fence_wait_timeout(wt.f, false, 2) =3D=3D -ETIME) { if (timer_pending(&wt.timer)) { - pr_notice("Timer did not fire within the jiffie!\n"); + pr_notice("Timer did not fire within the jiffy!\n"); err =3D 0; /* not our fault! */ } else { pr_err("Wait reported incomplete after timeout\n"); diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/= gem/i915_gem_wait.c index d4b918fb11ce..1f55e62044a4 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c @@ -266,7 +266,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, s= truct drm_file *file) if (ret =3D=3D -ETIME && !nsecs_to_jiffies(args->timeout_ns)) args->timeout_ns =3D 0; =20 - /* Asked to wait beyond the jiffie/scheduler precision? */ + /* Asked to wait beyond the jiffy/scheduler precision? */ if (ret =3D=3D -ETIME && args->timeout_ns) ret =3D -EAGAIN; } diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i= 915/gt/selftest_execlists.c index 4202df5b8c12..222ca7c44951 100644 --- a/drivers/gpu/drm/i915/gt/selftest_execlists.c +++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c @@ -93,7 +93,7 @@ static int wait_for_reset(struct intel_engine_cs *engine, return -EINVAL; } =20 - /* Give the request a jiffie to complete after flushing the worker */ + /* Give the request a jiffy to complete after flushing the worker */ if (i915_request_wait(rq, 0, max(0l, (long)(timeout - jiffies)) + 1) < 0) { pr_err("%s: hanging request %llx:%lld did not complete\n", @@ -3426,7 +3426,7 @@ static int live_preempt_timeout(void *arg) cpu_relax(); =20 saved_timeout =3D engine->props.preempt_timeout_ms; - engine->props.preempt_timeout_ms =3D 1; /* in ms, -> 1 jiffie */ + engine->props.preempt_timeout_ms =3D 1; /* in ms, -> 1 jiffy */ =20 i915_request_get(rq); i915_request_add(rq); diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_ut= ils.c index 6f9e7b354b54..f2ba51c20e97 100644 --- a/drivers/gpu/drm/i915/i915_utils.c +++ b/drivers/gpu/drm/i915/i915_utils.c @@ -110,7 +110,7 @@ void set_timer_ms(struct timer_list *t, unsigned long tim= eout) * Paranoia to make sure the compiler computes the timeout before * loading 'jiffies' as jiffies is volatile and may be updated in * the background by a timer tick. All to reduce the complexity - * of the addition and reduce the risk of losing a jiffie. + * of the addition and reduce the risk of losing a jiffy. */ barrier(); =20 diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c index a165cbcdd27b..9eafe53a8f41 100644 --- a/drivers/gpu/drm/v3d/v3d_bo.c +++ b/drivers/gpu/drm/v3d/v3d_bo.c @@ -279,7 +279,7 @@ v3d_wait_bo_ioctl(struct drm_device *dev, void *data, else args->timeout_ns =3D 0; =20 - /* Asked to wait beyond the jiffie/scheduler precision? */ + /* Asked to wait beyond the jiffy/scheduler precision? */ if (ret =3D=3D -ETIME && args->timeout_ns) ret =3D -EAGAIN; =20 diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index 61cb45c5d0d8..53fad9487574 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c @@ -82,7 +82,7 @@ * - has multiple clocks. * - has no usable clock due to jitter or packet loss (VoIP). * In this case the system's clock is used. The clock resolution depends on - * the jiffie resolution. + * the jiffy resolution. * * If a member joins a conference: * diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/mar= vell/mvmdio.c index 9190eff6c0bb..e1d003fdbc2e 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -104,7 +104,7 @@ static int orion_mdio_wait_ready(const struct orion_mdio_= ops *ops, return 0; } else { /* wait_event_timeout does not guarantee a delay of at - * least one whole jiffie, so timeout must be no less + * least one whole jiffy, so timeout must be no less * than two. */ timeout =3D max(usecs_to_jiffies(MVMDIO_SMI_TIMEOUT), 2); diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/inte= l/pmc/adl.c index e7878558fd90..9d9c07f44ff6 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -295,6 +295,8 @@ const struct pmc_reg_map adl_reg_map =3D { .ppfear_buckets =3D CNP_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D CNP_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D CNP_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .ltr_ignore_max =3D ADL_NUM_IP_IGN_ALLOWED, .lpm_num_modes =3D ADL_LPM_NUM_MODES, .lpm_num_maps =3D ADL_LPM_NUM_MAPS, diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/inte= l/pmc/cnp.c index dd72974bf71e..513c02670c5a 100644 --- a/drivers/platform/x86/intel/pmc/cnp.c +++ b/drivers/platform/x86/intel/pmc/cnp.c @@ -200,6 +200,8 @@ const struct pmc_reg_map cnp_reg_map =3D { .ppfear_buckets =3D CNP_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D CNP_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D CNP_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .ltr_ignore_max =3D CNP_NUM_IP_IGN_ALLOWED, .etr3_offset =3D ETR3_OFFSET, }; diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/int= el/pmc/core.c index 01ae71c6df59..e2b4c74ce7f6 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -11,6 +11,7 @@ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 +#include #include #include #include @@ -1208,6 +1209,38 @@ static bool pmc_core_is_pson_residency_enabled(struct = pmc_dev *pmcdev) return val =3D=3D 1; } =20 +/* + * Enable or disable ACPI PM Timer + * + * This function is intended to be a callback for ACPI PM suspend/resume eve= nt. + * The ACPI PM Timer is enabled on resume only if it was enabled during susp= end. + */ +static void pmc_core_acpi_pm_timer_suspend_resume(void *data, bool suspend) +{ + struct pmc_dev *pmcdev =3D data; + struct pmc *pmc =3D pmcdev->pmcs[PMC_IDX_MAIN]; + const struct pmc_reg_map *map =3D pmc->map; + bool enabled; + u32 reg; + + if (!map->acpi_pm_tmr_ctl_offset) + return; + + guard(mutex)(&pmcdev->lock); + + if (!suspend && !pmcdev->enable_acpi_pm_timer_on_resume) + return; + + reg =3D pmc_core_reg_read(pmc, map->acpi_pm_tmr_ctl_offset); + enabled =3D !(reg & map->acpi_pm_tmr_disable_bit); + if (suspend) + reg |=3D map->acpi_pm_tmr_disable_bit; + else + reg &=3D ~map->acpi_pm_tmr_disable_bit; + pmc_core_reg_write(pmc, map->acpi_pm_tmr_ctl_offset, reg); + + pmcdev->enable_acpi_pm_timer_on_resume =3D suspend && enabled; +} =20 static void pmc_core_dbgfs_unregister(struct pmc_dev *pmcdev) { @@ -1404,6 +1437,7 @@ static int pmc_core_probe(struct platform_device *pdev) struct pmc_dev *pmcdev; const struct x86_cpu_id *cpu_id; int (*core_init)(struct pmc_dev *pmcdev); + const struct pmc_reg_map *map; struct pmc *primary_pmc; int ret; =20 @@ -1462,6 +1496,11 @@ static int pmc_core_probe(struct platform_device *pdev) pm_report_max_hw_sleep(FIELD_MAX(SLP_S0_RES_COUNTER_MASK) * pmc_core_adjust_slp_s0_step(primary_pmc, 1)); =20 + map =3D primary_pmc->map; + if (map->acpi_pm_tmr_ctl_offset) + acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend= _resume, + pmcdev); + device_initialized =3D true; dev_info(&pdev->dev, " initialized\n"); =20 @@ -1471,6 +1510,12 @@ static int pmc_core_probe(struct platform_device *pdev) static void pmc_core_remove(struct platform_device *pdev) { struct pmc_dev *pmcdev =3D platform_get_drvdata(pdev); + const struct pmc *pmc =3D pmcdev->pmcs[PMC_IDX_MAIN]; + const struct pmc_reg_map *map =3D pmc->map; + + if (map->acpi_pm_tmr_ctl_offset) + acpi_pmtmr_unregister_suspend_resume_callback(); + pmc_core_dbgfs_unregister(pmcdev); pmc_core_clean_structure(pdev); } diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/int= el/pmc/core.h index ea04de7eb9e8..4d37ef7113d7 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -68,6 +68,8 @@ struct telem_endpoint; #define SPT_PMC_LTR_SCC 0x3A0 #define SPT_PMC_LTR_ISH 0x3A4 =20 +#define SPT_PMC_ACPI_PM_TMR_CTL_OFFSET 0x18FC + /* Sunrise Point: PGD PFET Enable Ack Status Registers */ enum ppfear_regs { SPT_PMC_XRAM_PPFEAR0A =3D 0x590, @@ -148,6 +150,8 @@ enum ppfear_regs { #define SPT_PMC_VRIC1_SLPS0LVEN BIT(13) #define SPT_PMC_VRIC1_XTALSDQDIS BIT(22) =20 +#define SPT_PMC_BIT_ACPI_PM_TMR_DISABLE BIT(1) + /* Cannonlake Power Management Controller register offsets */ #define CNP_PMC_SLPS0_DBG_OFFSET 0x10B4 #define CNP_PMC_PM_CFG_OFFSET 0x1818 @@ -351,6 +355,8 @@ struct pmc_reg_map { const u8 *lpm_reg_index; const u32 pson_residency_offset; const u32 pson_residency_counter_step; + const u32 acpi_pm_tmr_ctl_offset; + const u32 acpi_pm_tmr_disable_bit; }; =20 /** @@ -424,6 +430,8 @@ struct pmc_dev { u32 die_c6_offset; struct telem_endpoint *punit_ep; struct pmc_info *regmap_list; + + bool enable_acpi_pm_timer_on_resume; }; =20 enum pmc_index { diff --git a/drivers/platform/x86/intel/pmc/icl.c b/drivers/platform/x86/inte= l/pmc/icl.c index 71b0fd6cb7d8..cbbd44054468 100644 --- a/drivers/platform/x86/intel/pmc/icl.c +++ b/drivers/platform/x86/intel/pmc/icl.c @@ -46,6 +46,8 @@ const struct pmc_reg_map icl_reg_map =3D { .ppfear_buckets =3D ICL_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D CNP_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D CNP_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .ltr_ignore_max =3D ICL_NUM_IP_IGN_ALLOWED, .etr3_offset =3D ETR3_OFFSET, }; diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/inte= l/pmc/mtl.c index c7d15d864039..91f2fa728f5c 100644 --- a/drivers/platform/x86/intel/pmc/mtl.c +++ b/drivers/platform/x86/intel/pmc/mtl.c @@ -462,6 +462,8 @@ const struct pmc_reg_map mtl_socm_reg_map =3D { .ppfear_buckets =3D MTL_SOCM_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D CNP_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D CNP_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .lpm_num_maps =3D ADL_LPM_NUM_MAPS, .ltr_ignore_max =3D MTL_SOCM_NUM_IP_IGN_ALLOWED, .lpm_res_counter_step_x2 =3D TGL_PMC_LPM_RES_COUNTER_STEP_X2, diff --git a/drivers/platform/x86/intel/pmc/spt.c b/drivers/platform/x86/inte= l/pmc/spt.c index ab993a69e33e..2cd2b3c68e46 100644 --- a/drivers/platform/x86/intel/pmc/spt.c +++ b/drivers/platform/x86/intel/pmc/spt.c @@ -130,6 +130,8 @@ const struct pmc_reg_map spt_reg_map =3D { .ppfear_buckets =3D SPT_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D SPT_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D SPT_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .ltr_ignore_max =3D SPT_NUM_IP_IGN_ALLOWED, .pm_vric1_offset =3D SPT_PMC_VRIC1_OFFSET, }; diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/inte= l/pmc/tgl.c index e0580de18077..371b4e30f142 100644 --- a/drivers/platform/x86/intel/pmc/tgl.c +++ b/drivers/platform/x86/intel/pmc/tgl.c @@ -197,6 +197,8 @@ const struct pmc_reg_map tgl_reg_map =3D { .ppfear_buckets =3D ICL_PPFEAR_NUM_ENTRIES, .pm_cfg_offset =3D CNP_PMC_PM_CFG_OFFSET, .pm_read_disable_bit =3D CNP_PMC_READ_DISABLE_BIT, + .acpi_pm_tmr_ctl_offset =3D SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, + .acpi_pm_tmr_disable_bit =3D SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, .ltr_ignore_max =3D TGL_NUM_IP_IGN_ALLOWED, .lpm_num_maps =3D TGL_LPM_NUM_MAPS, .lpm_res_counter_step_x2 =3D TGL_PMC_LPM_RES_COUNTER_STEP_X2, diff --git a/fs/proc/base.c b/fs/proc/base.c index 72a1acd03675..afe573e8d8f1 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2456,13 +2456,13 @@ static void *timers_start(struct seq_file *m, loff_t = *pos) if (!tp->sighand) return ERR_PTR(-ESRCH); =20 - return seq_list_start(&tp->task->signal->posix_timers, *pos); + return seq_hlist_start(&tp->task->signal->posix_timers, *pos); } =20 static void *timers_next(struct seq_file *m, void *v, loff_t *pos) { struct timers_private *tp =3D m->private; - return seq_list_next(v, &tp->task->signal->posix_timers, pos); + return seq_hlist_next(v, &tp->task->signal->posix_timers, pos); } =20 static void timers_stop(struct seq_file *m, void *v) @@ -2491,7 +2491,7 @@ static int show_timer(struct seq_file *m, void *v) [SIGEV_THREAD] =3D "thread", }; =20 - timer =3D list_entry((struct list_head *)v, struct k_itimer, list); + timer =3D hlist_entry((struct hlist_node *)v, struct k_itimer, list); notify =3D timer->it_sigev_notify; =20 seq_printf(m, "ID: %d\n", timer->it_id); @@ -2569,10 +2569,11 @@ static ssize_t timerslack_ns_write(struct file *file,= const char __user *buf, } =20 task_lock(p); - if (slack_ns =3D=3D 0) - p->timer_slack_ns =3D p->default_timer_slack_ns; - else - p->timer_slack_ns =3D slack_ns; + if (task_is_realtime(p)) + slack_ns =3D 0; + else if (slack_ns =3D=3D 0) + slack_ns =3D p->default_timer_slack_ns; + p->timer_slack_ns =3D slack_ns; task_unlock(p); =20 out: diff --git a/fs/select.c b/fs/select.c index 9515c3fa1a03..ad171b7a5c11 100644 --- a/fs/select.c +++ b/fs/select.c @@ -77,19 +77,16 @@ u64 select_estimate_accuracy(struct timespec64 *tv) { u64 ret; struct timespec64 now; + u64 slack =3D current->timer_slack_ns; =20 - /* - * Realtime tasks get a slack of 0 for obvious reasons. - */ - - if (rt_task(current)) + if (slack =3D=3D 0) return 0; =20 ktime_get_ts64(&now); now =3D timespec64_sub(*tv, now); ret =3D __estimate_accuracy(&now); - if (ret < current->timer_slack_ns) - return current->timer_slack_ns; + if (ret < slack) + return slack; return ret; } =20 diff --git a/fs/signalfd.c b/fs/signalfd.c index ec7b2da2477a..d0333bce015e 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -159,7 +159,7 @@ static ssize_t signalfd_dequeue(struct signalfd_ctx *ctx,= kernel_siginfo_t *info DECLARE_WAITQUEUE(wait, current); =20 spin_lock_irq(¤t->sighand->siglock); - ret =3D dequeue_signal(current, &ctx->sigmask, info, &type); + ret =3D dequeue_signal(&ctx->sigmask, info, &type); switch (ret) { case 0: if (!nonblock) @@ -174,7 +174,7 @@ static ssize_t signalfd_dequeue(struct signalfd_ctx *ctx,= kernel_siginfo_t *info add_wait_queue(¤t->sighand->signalfd_wqh, &wait); for (;;) { set_current_state(TASK_INTERRUPTIBLE); - ret =3D dequeue_signal(current, &ctx->sigmask, info, &type); + ret =3D dequeue_signal(&ctx->sigmask, info, &type); if (ret !=3D 0) break; if (signal_pending(current)) { diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index b1580644501f..209a389f2abc 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -210,7 +210,7 @@ struct xfs_buf { * success the write is considered to be failed permanently and the * iodone handler will take appropriate action. * - * For retry timeouts, we record the jiffie of the first failure. This + * For retry timeouts, we record the jiffy of the first failure. This * means that we can change the retry timeout for buffers already under * I/O and thus avoid getting stuck in a retry loop with a long timeout. * diff --git a/include/linux/acpi_pmtmr.h b/include/linux/acpi_pmtmr.h index 50d88bf1498d..0ded9220d379 100644 --- a/include/linux/acpi_pmtmr.h +++ b/include/linux/acpi_pmtmr.h @@ -26,6 +26,19 @@ static inline u32 acpi_pm_read_early(void) return acpi_pm_read_verified() & ACPI_PM_MASK; } =20 +/** + * Register callback for suspend and resume event + * + * @cb Callback triggered on suspend and resume + * @data Data passed with the callback + */ +void acpi_pmtmr_register_suspend_resume_callback(void (*cb)(void *data, bool= suspend), void *data); + +/** + * Remove registered callback for suspend and resume event + */ +void acpi_pmtmr_unregister_suspend_resume_callback(void); + #else =20 static inline u32 acpi_pm_read_early(void) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index d9f1435a5a13..1220f0fbe5bf 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -418,7 +418,7 @@ extern unsigned long preset_lpj; #define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) +\ TICK_NSEC -1) / (u64)TICK_NSEC)) /* - * The maximum jiffie value is (MAX_INT >> 1). Here we translate that + * The maximum jiffy value is (MAX_INT >> 1). Here we translate that * into seconds. The 64-bit case will overflow if we are not careful, * so use the messy SH_DIV macro to do it. Still all constants. */ diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index dc7b738de299..453691710839 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -158,7 +158,7 @@ static inline void posix_cputimers_init_work(void) { } * @rcu: RCU head for freeing the timer. */ struct k_itimer { - struct list_head list; + struct hlist_node list; struct hlist_node t_hash; spinlock_t it_lock; const struct k_clock *kclock; diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 0a0e23c45406..c8ed09ac29ac 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -137,7 +137,7 @@ struct signal_struct { =20 /* POSIX.1b Interval Timers */ unsigned int next_posix_timer_id; - struct list_head posix_timers; + struct hlist_head posix_timers; =20 /* ITIMER_REAL timer for the process */ struct hrtimer real_timer; @@ -276,8 +276,7 @@ static inline void signal_set_stop_flags(struct signal_st= ruct *sig, extern void flush_signals(struct task_struct *); extern void ignore_signals(struct task_struct *); extern void flush_signal_handlers(struct task_struct *, int force_default); -extern int dequeue_signal(struct task_struct *task, sigset_t *mask, - kernel_siginfo_t *info, enum pid_type *type); +extern int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_t= ype *type); =20 static inline int kernel_dequeue_signal(void) { @@ -287,7 +286,7 @@ static inline int kernel_dequeue_signal(void) int ret; =20 spin_lock_irq(&task->sighand->siglock); - ret =3D dequeue_signal(task, &task->blocked, &__info, &__type); + ret =3D dequeue_signal(&task->blocked, &__info, &__type); spin_unlock_irq(&task->sighand->siglock); =20 return ret; diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_i= nternal.h index 84ff2844df2a..902c20ef495a 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h @@ -73,7 +73,7 @@ struct tk_read_base { * @overflow_seen: Overflow warning flag (DEBUG_TIMEKEEPING) * * Note: For timespec(64) based interfaces wall_to_monotonic is what - * we need to add to xtime (or xtime corrected for sub jiffie times) + * we need to add to xtime (or xtime corrected for sub jiffy times) * to get to monotonic time. Monotonic is pegged at zero at system * boot time, so wall_to_monotonic will be negative, however, we will * ALWAYS keep the tv_nsec part positive so we can use the usual diff --git a/init/init_task.c b/init/init_task.c index eeb110c65fe2..5d0399bc8d2f 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -29,7 +29,7 @@ static struct signal_struct init_signals =3D { .cred_guard_mutex =3D __MUTEX_INITIALIZER(init_signals.cred_guard_mutex), .exec_update_lock =3D __RWSEM_INITIALIZER(init_signals.exec_update_lock), #ifdef CONFIG_POSIX_TIMERS - .posix_timers =3D LIST_HEAD_INIT(init_signals.posix_timers), + .posix_timers =3D HLIST_HEAD_INIT, .cputimer =3D { .cputime_atomic =3D INIT_CPUTIME_ATOMIC, }, diff --git a/kernel/cpu.c b/kernel/cpu.c index b1fd2a3db91a..5bfc2fdd7da0 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -330,7 +330,7 @@ static bool cpuhp_wait_for_sync_state(unsigned int cpu, e= num cpuhp_sync_state st /* Poll for one millisecond */ arch_cpuhp_sync_state_poll(); } else { - usleep_range_state(USEC_PER_MSEC, 2 * USEC_PER_MSEC, TASK_UNINTERRUPTIBLE= ); + usleep_range(USEC_PER_MSEC, 2 * USEC_PER_MSEC); } sync =3D atomic_read(st); } diff --git a/kernel/fork.c b/kernel/fork.c index cc760491f201..c1b343cba560 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1861,7 +1861,7 @@ static int copy_signal(unsigned long clone_flags, struc= t task_struct *tsk) prev_cputime_init(&sig->prev_cputime); =20 #ifdef CONFIG_POSIX_TIMERS - INIT_LIST_HEAD(&sig->posix_timers); + INIT_HLIST_HEAD(&sig->posix_timers); hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); sig->real_timer.function =3D it_real_fn; #endif diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c index ae1b42775ef9..195d2f2834a9 100644 --- a/kernel/sched/syscalls.c +++ b/kernel/sched/syscalls.c @@ -406,6 +406,14 @@ static void __setscheduler_params(struct task_struct *p, else if (fair_policy(policy)) p->static_prio =3D NICE_TO_PRIO(attr->sched_nice); =20 + /* rt-policy tasks do not have a timerslack */ + if (task_is_realtime(p)) { + p->timer_slack_ns =3D 0; + } else if (p->timer_slack_ns =3D=3D 0) { + /* when switching back to non-rt policy, restore timerslack */ + p->timer_slack_ns =3D p->default_timer_slack_ns; + } + /* * __sched_setscheduler() ensures attr->sched_priority =3D=3D 0 when * !rt_policy. Always setting this ensures that things like diff --git a/kernel/signal.c b/kernel/signal.c index 60c737e423a1..6f3a5aa39b09 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -618,20 +618,18 @@ static int __dequeue_signal(struct sigpending *pending,= sigset_t *mask, } =20 /* - * Dequeue a signal and return the element to the caller, which is - * expected to free it. - * - * All callers have to hold the siglock. + * Try to dequeue a signal. If a deliverable signal is found fill in the + * caller provided siginfo and return the signal number. Otherwise return + * 0. */ -int dequeue_signal(struct task_struct *tsk, sigset_t *mask, - kernel_siginfo_t *info, enum pid_type *type) +int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *ty= pe) { + struct task_struct *tsk =3D current; bool resched_timer =3D false; int signr; =20 - /* We only dequeue private signals from ourselves, we don't let - * signalfd steal them - */ + lockdep_assert_held(&tsk->sighand->siglock); + *type =3D PIDTYPE_PID; signr =3D __dequeue_signal(&tsk->pending, mask, info, &resched_timer); if (!signr) { @@ -1940,10 +1938,11 @@ struct sigqueue *sigqueue_alloc(void) =20 void sigqueue_free(struct sigqueue *q) { - unsigned long flags; spinlock_t *lock =3D ¤t->sighand->siglock; + unsigned long flags; =20 - BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); + if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC))) + return; /* * We must hold ->siglock while testing q->list * to serialize with collect_signal() or with @@ -1971,7 +1970,10 @@ int send_sigqueue(struct sigqueue *q, struct pid *pid,= enum pid_type type) unsigned long flags; int ret, result; =20 - BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); + if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC))) + return 0; + if (WARN_ON_ONCE(q->info.si_code !=3D SI_TIMER)) + return 0; =20 ret =3D -1; rcu_read_lock(); @@ -2006,7 +2008,6 @@ int send_sigqueue(struct sigqueue *q, struct pid *pid, = enum pid_type type) * If an SI_TIMER entry is already queue just increment * the overrun count. */ - BUG_ON(q->info.si_code !=3D SI_TIMER); q->info.si_overrun++; result =3D TRACE_SIGNAL_ALREADY_PENDING; goto out; @@ -2793,8 +2794,7 @@ bool get_signal(struct ksignal *ksig) type =3D PIDTYPE_PID; signr =3D dequeue_synchronous_signal(&ksig->info); if (!signr) - signr =3D dequeue_signal(current, ¤t->blocked, - &ksig->info, &type); + signr =3D dequeue_signal(¤t->blocked, &ksig->info, &type); =20 if (!signr) break; /* will return 0 */ @@ -3648,7 +3648,7 @@ static int do_sigtimedwait(const sigset_t *which, kerne= l_siginfo_t *info, signotset(&mask); =20 spin_lock_irq(&tsk->sighand->siglock); - sig =3D dequeue_signal(tsk, &mask, info, &type); + sig =3D dequeue_signal(&mask, info, &type); if (!sig && timeout) { /* * None ready, temporarily unblock those we're interested @@ -3667,7 +3667,7 @@ static int do_sigtimedwait(const sigset_t *which, kerne= l_siginfo_t *info, spin_lock_irq(&tsk->sighand->siglock); __set_task_blocked(tsk, &tsk->real_blocked); sigemptyset(&tsk->real_blocked); - sig =3D dequeue_signal(tsk, &mask, info, &type); + sig =3D dequeue_signal(&mask, info, &type); } spin_unlock_irq(&tsk->sighand->siglock); =20 diff --git a/kernel/sys.c b/kernel/sys.c index 3a2df1bd9f64..e3c4cffb520c 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -2557,6 +2557,8 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2= , unsigned long, arg3, error =3D current->timer_slack_ns; break; case PR_SET_TIMERSLACK: + if (task_is_realtime(current)) + break; if (arg2 <=3D 0) current->timer_slack_ns =3D current->default_timer_slack_ns; diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 5abfa4390673..8bf888641694 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -493,7 +493,7 @@ static u64 __alarm_forward_now(struct alarm *alarm, ktime= _t interval, bool throt * promised in the context of posix_timer_fn() never * materialized, but someone should really work on it. * - * To prevent DOS fake @now to be 1 jiffie out which keeps + * To prevent DOS fake @now to be 1 jiffy out which keeps * the overrun accounting correct but creates an * inconsistency vs. timer_gettime(2). */ @@ -574,15 +574,10 @@ static enum alarmtimer_restart alarm_handle_timer(struc= t alarm *alarm, it.alarm.alarmtimer); enum alarmtimer_restart result =3D ALARMTIMER_NORESTART; unsigned long flags; - int si_private =3D 0; =20 spin_lock_irqsave(&ptr->it_lock, flags); =20 - ptr->it_active =3D 0; - if (ptr->it_interval) - si_private =3D ++ptr->it_requeue_pending; - - if (posix_timer_event(ptr, si_private) && ptr->it_interval) { + if (posix_timer_queue_signal(ptr) && ptr->it_interval) { /* * Handle ignored signals and rearm the timer. This will go * away once we handle ignored signals proper. Ensure that diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 60a6484831b1..78c7bd64d0dd 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -190,7 +190,7 @@ int clockevents_tick_resume(struct clock_event_device *de= v) =20 #ifdef CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST =20 -/* Limit min_delta to a jiffie */ +/* Limit min_delta to a jiffy */ #define MIN_DELTA_LIMIT (NSEC_PER_SEC / HZ) =20 /** diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index b8ee320208d4..e834b2bd83df 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1177,7 +1177,7 @@ static inline ktime_t hrtimer_update_lowres(struct hrti= mer *timer, ktime_t tim, /* * CONFIG_TIME_LOW_RES indicates that the system has no way to return * granular time values. For relative timers we add hrtimer_resolution - * (i.e. one jiffie) to prevent short timeouts. + * (i.e. one jiffy) to prevent short timeouts. */ timer->is_rel =3D mode & HRTIMER_MODE_REL; if (timer->is_rel) @@ -1351,11 +1351,13 @@ static void hrtimer_cpu_base_init_expiry_lock(struct = hrtimer_cpu_base *base) } =20 static void hrtimer_cpu_base_lock_expiry(struct hrtimer_cpu_base *base) + __acquires(&base->softirq_expiry_lock) { spin_lock(&base->softirq_expiry_lock); } =20 static void hrtimer_cpu_base_unlock_expiry(struct hrtimer_cpu_base *base) + __releases(&base->softirq_expiry_lock) { spin_unlock(&base->softirq_expiry_lock); } @@ -2072,14 +2074,9 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtime= r_mode mode, struct restart_block *restart; struct hrtimer_sleeper t; int ret =3D 0; - u64 slack; - - slack =3D current->timer_slack_ns; - if (rt_task(current)) - slack =3D 0; =20 hrtimer_init_sleeper_on_stack(&t, clockid, mode); - hrtimer_set_expires_range_ns(&t.timer, rqtp, slack); + hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns); ret =3D do_nanosleep(&t, mode); if (ret !=3D -ERESTART_RESTARTBLOCK) goto out; @@ -2249,7 +2246,7 @@ void __init hrtimers_init(void) /** * schedule_hrtimeout_range_clock - sleep until timeout * @expires: timeout value (ktime_t) - * @delta: slack in expires timeout (ktime_t) for SCHED_OTHER tasks + * @delta: slack in expires timeout (ktime_t) * @mode: timer mode * @clock_id: timer clock to be used */ @@ -2276,13 +2273,6 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 d= elta, return -EINTR; } =20 - /* - * Override any slack passed by the user if under - * rt contraints. - */ - if (rt_task(current)) - delta =3D 0; - hrtimer_init_sleeper_on_stack(&t, clock_id, mode); hrtimer_set_expires_range_ns(&t.timer, *expires, delta); hrtimer_sleeper_start_expires(&t, mode); @@ -2302,7 +2292,7 @@ EXPORT_SYMBOL_GPL(schedule_hrtimeout_range_clock); /** * schedule_hrtimeout_range - sleep until timeout * @expires: timeout value (ktime_t) - * @delta: slack in expires timeout (ktime_t) for SCHED_OTHER tasks + * @delta: slack in expires timeout (ktime_t) * @mode: timer mode * * Make the current task sleep until the given expiry time has diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 8d2dd214ec68..802b336f4b8c 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -660,8 +660,16 @@ static void sync_hw_clock(struct work_struct *work) sched_sync_hw_clock(offset_nsec, res !=3D 0); } =20 -void ntp_notify_cmos_timer(void) +void ntp_notify_cmos_timer(bool offset_set) { + /* + * If the time jumped (using ADJ_SETOFFSET) cancels sync timer, + * which may have been running if the time was synchronized + * prior to the ADJ_SETOFFSET call. + */ + if (offset_set) + hrtimer_cancel(&sync_hrtimer); + /* * When the work is currently executed but has not yet the timer * rearmed this queues the work immediately again. No big issue, diff --git a/kernel/time/ntp_internal.h b/kernel/time/ntp_internal.h index 23d1b74c3065..5a633dce9057 100644 --- a/kernel/time/ntp_internal.h +++ b/kernel/time/ntp_internal.h @@ -14,9 +14,9 @@ extern int __do_adjtimex(struct __kernel_timex *txc, extern void __hardpps(const struct timespec64 *phase_ts, const struct timesp= ec64 *raw_ts); =20 #if defined(CONFIG_GENERIC_CMOS_UPDATE) || defined(CONFIG_RTC_SYSTOHC) -extern void ntp_notify_cmos_timer(void); +extern void ntp_notify_cmos_timer(bool offset_set); #else -static inline void ntp_notify_cmos_timer(void) { } +static inline void ntp_notify_cmos_timer(bool offset_set) { } #endif =20 #endif /* _LINUX_NTP_INTERNAL_H */ diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index e9c6f9d0e42c..6bcee4704059 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -453,6 +453,7 @@ static void disarm_timer(struct k_itimer *timer, struct t= ask_struct *p) struct cpu_timer *ctmr =3D &timer->it.cpu; struct posix_cputimer_base *base; =20 + timer->it_active =3D 0; if (!cpu_timer_dequeue(ctmr)) return; =20 @@ -559,6 +560,7 @@ static void arm_timer(struct k_itimer *timer, struct task= _struct *p) struct cpu_timer *ctmr =3D &timer->it.cpu; u64 newexp =3D cpu_timer_getexpires(ctmr); =20 + timer->it_active =3D 1; if (!cpu_timer_enqueue(&base->tqhead, ctmr)) return; =20 @@ -584,12 +586,8 @@ static void cpu_timer_fire(struct k_itimer *timer) { struct cpu_timer *ctmr =3D &timer->it.cpu; =20 - if ((timer->it_sigev_notify & ~SIGEV_THREAD_ID) =3D=3D SIGEV_NONE) { - /* - * User don't want any signal. - */ - cpu_timer_setexpires(ctmr, 0); - } else if (unlikely(timer->sigq =3D=3D NULL)) { + timer->it_active =3D 0; + if (unlikely(timer->sigq =3D=3D NULL)) { /* * This a special case for clock_nanosleep, * not a normal timer from sys_timer_create. @@ -600,9 +598,9 @@ static void cpu_timer_fire(struct k_itimer *timer) /* * One-shot timer. Clear it as soon as it's fired. */ - posix_timer_event(timer, 0); + posix_timer_queue_signal(timer); cpu_timer_setexpires(ctmr, 0); - } else if (posix_timer_event(timer, ++timer->it_requeue_pending)) { + } else if (posix_timer_queue_signal(timer)) { /* * The signal did not get queued because the signal * was ignored, so we won't get any callback to @@ -614,6 +612,8 @@ static void cpu_timer_fire(struct k_itimer *timer) } } =20 +static void __posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec6= 4 *itp, u64 now); + /* * Guts of sys_timer_settime for CPU timers. * This is called with the timer locked and interrupts disabled. @@ -623,9 +623,10 @@ static void cpu_timer_fire(struct k_itimer *timer) static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags, struct itimerspec64 *new, struct itimerspec64 *old) { + bool sigev_none =3D timer->it_sigev_notify =3D=3D SIGEV_NONE; clockid_t clkid =3D CPUCLOCK_WHICH(timer->it_clock); - u64 old_expires, new_expires, old_incr, val; struct cpu_timer *ctmr =3D &timer->it.cpu; + u64 old_expires, new_expires, now; struct sighand_struct *sighand; struct task_struct *p; unsigned long flags; @@ -662,10 +663,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, i= nt timer_flags, return -ESRCH; } =20 - /* - * Disarm any old timer after extracting its expiry time. - */ - old_incr =3D timer->it_interval; + /* Retrieve the current expiry time before disarming the timer */ old_expires =3D cpu_timer_getexpires(ctmr); =20 if (unlikely(timer->it.cpu.firing)) { @@ -673,157 +671,122 @@ static int posix_cpu_timer_set(struct k_itimer *timer= , int timer_flags, ret =3D TIMER_RETRY; } else { cpu_timer_dequeue(ctmr); + timer->it_active =3D 0; } =20 /* - * We need to sample the current value to convert the new - * value from to relative and absolute, and to convert the - * old value from absolute to relative. To set a process - * timer, we need a sample to balance the thread expiry - * times (in arm_timer). With an absolute time, we must - * check if it's already passed. In short, we need a sample. + * Sample the current clock for saving the previous setting + * and for rearming the timer. */ if (CPUCLOCK_PERTHREAD(timer->it_clock)) - val =3D cpu_clock_sample(clkid, p); + now =3D cpu_clock_sample(clkid, p); else - val =3D cpu_clock_sample_group(clkid, p, true); + now =3D cpu_clock_sample_group(clkid, p, !sigev_none); =20 + /* Retrieve the previous expiry value if requested. */ if (old) { - if (old_expires =3D=3D 0) { - old->it_value.tv_sec =3D 0; - old->it_value.tv_nsec =3D 0; - } else { - /* - * Update the timer in case it has overrun already. - * If it has, we'll report it as having overrun and - * with the next reloaded timer already ticking, - * though we are swallowing that pending - * notification here to install the new setting. - */ - u64 exp =3D bump_cpu_timer(timer, val); - - if (val < exp) { - old_expires =3D exp - val; - old->it_value =3D ns_to_timespec64(old_expires); - } else { - old->it_value.tv_nsec =3D 1; - old->it_value.tv_sec =3D 0; - } - } + old->it_value =3D (struct timespec64){ }; + if (old_expires) + __posix_cpu_timer_get(timer, old, now); } =20 + /* Retry if the timer expiry is running concurrently */ if (unlikely(ret)) { - /* - * We are colliding with the timer actually firing. - * Punt after filling in the timer's old value, and - * disable this firing since we are already reporting - * it as an overrun (thanks to bump_cpu_timer above). - */ unlock_task_sighand(p, &flags); goto out; } =20 - if (new_expires !=3D 0 && !(timer_flags & TIMER_ABSTIME)) { - new_expires +=3D val; - } + /* Convert relative expiry time to absolute */ + if (new_expires && !(timer_flags & TIMER_ABSTIME)) + new_expires +=3D now; + + /* Set the new expiry time (might be 0) */ + cpu_timer_setexpires(ctmr, new_expires); =20 /* - * Install the new expiry time (or zero). - * For a timer with no notification action, we don't actually - * arm the timer (we'll just fake it for timer_gettime). + * Arm the timer if it is not disabled, the new expiry value has + * not yet expired and the timer requires signal delivery. + * SIGEV_NONE timers are never armed. In case the timer is not + * armed, enforce the reevaluation of the timer base so that the + * process wide cputime counter can be disabled eventually. */ - cpu_timer_setexpires(ctmr, new_expires); - if (new_expires !=3D 0 && val < new_expires) { - arm_timer(timer, p); + if (likely(!sigev_none)) { + if (new_expires && now < new_expires) + arm_timer(timer, p); + else + trigger_base_recalc_expires(timer, p); } =20 unlock_task_sighand(p, &flags); + + posix_timer_set_common(timer, new); + /* - * Install the new reload setting, and - * set up the signal and overrun bookkeeping. + * If the new expiry time was already in the past the timer was not + * queued. Fire it immediately even if the thread never runs to + * accumulate more time on this clock. */ - timer->it_interval =3D timespec64_to_ktime(new->it_interval); + if (!sigev_none && new_expires && now >=3D new_expires) + cpu_timer_fire(timer); +out: + rcu_read_unlock(); + return ret; +} + +static void __posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec6= 4 *itp, u64 now) +{ + bool sigev_none =3D timer->it_sigev_notify =3D=3D SIGEV_NONE; + u64 expires, iv =3D timer->it_interval; =20 /* - * This acts as a modification timestamp for the timer, - * so any automatic reload attempt will punt on seeing - * that we have reset the timer manually. + * Make sure that interval timers are moved forward for the + * following cases: + * - SIGEV_NONE timers which are never armed + * - Timers which expired, but the signal has not yet been + * delivered */ - timer->it_requeue_pending =3D (timer->it_requeue_pending + 2) & - ~REQUEUE_PENDING; - timer->it_overrun_last =3D 0; - timer->it_overrun =3D -1; - - if (val >=3D new_expires) { - if (new_expires !=3D 0) { - /* - * The designated time already passed, so we notify - * immediately, even if the thread never runs to - * accumulate more time on this clock. - */ - cpu_timer_fire(timer); - } + if (iv && ((timer->it_requeue_pending & REQUEUE_PENDING) || sigev_none)) + expires =3D bump_cpu_timer(timer, now); + else + expires =3D cpu_timer_getexpires(&timer->it.cpu); =20 + /* + * Expired interval timers cannot have a remaining time <=3D 0. + * The kernel has to move them forward so that the next + * timer expiry is > @now. + */ + if (now < expires) { + itp->it_value =3D ns_to_timespec64(expires - now); + } else { /* - * Make sure we don't keep around the process wide cputime - * counter or the tick dependency if they are not necessary. + * A single shot SIGEV_NONE timer must return 0, when it is + * expired! Timers which have a real signal delivery mode + * must return a remaining time greater than 0 because the + * signal has not yet been delivered. */ - sighand =3D lock_task_sighand(p, &flags); - if (!sighand) - goto out; - - if (!cpu_timer_queued(ctmr)) - trigger_base_recalc_expires(timer, p); - - unlock_task_sighand(p, &flags); + if (!sigev_none) + itp->it_value.tv_nsec =3D 1; } - out: - rcu_read_unlock(); - if (old) - old->it_interval =3D ns_to_timespec64(old_incr); - - return ret; } =20 static void posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec64 = *itp) { clockid_t clkid =3D CPUCLOCK_WHICH(timer->it_clock); - struct cpu_timer *ctmr =3D &timer->it.cpu; - u64 now, expires =3D cpu_timer_getexpires(ctmr); struct task_struct *p; + u64 now; =20 rcu_read_lock(); p =3D cpu_timer_task_rcu(timer); - if (!p) - goto out; + if (p && cpu_timer_getexpires(&timer->it.cpu)) { + itp->it_interval =3D ktime_to_timespec64(timer->it_interval); =20 - /* - * Easy part: convert the reload time. - */ - itp->it_interval =3D ktime_to_timespec64(timer->it_interval); - - if (!expires) - goto out; - - /* - * Sample the clock to take the difference with the expiry time. - */ - if (CPUCLOCK_PERTHREAD(timer->it_clock)) - now =3D cpu_clock_sample(clkid, p); - else - now =3D cpu_clock_sample_group(clkid, p, false); + if (CPUCLOCK_PERTHREAD(timer->it_clock)) + now =3D cpu_clock_sample(clkid, p); + else + now =3D cpu_clock_sample_group(clkid, p, false); =20 - if (now < expires) { - itp->it_value =3D ns_to_timespec64(expires - now); - } else { - /* - * The timer should have expired already, but the firing - * hasn't taken place yet. Say it's just about to expire. - */ - itp->it_value.tv_nsec =3D 1; - itp->it_value.tv_sec =3D 0; + __posix_cpu_timer_get(timer, itp, now); } -out: rcu_read_unlock(); } =20 diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index b924f0f096fa..4576aaed13b2 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -277,10 +277,17 @@ void posixtimer_rearm(struct kernel_siginfo *info) unlock_timer(timr, flags); } =20 -int posix_timer_event(struct k_itimer *timr, int si_private) +int posix_timer_queue_signal(struct k_itimer *timr) { + int ret, si_private =3D 0; enum pid_type type; - int ret; + + lockdep_assert_held(&timr->it_lock); + + timr->it_active =3D 0; + if (timr->it_interval) + si_private =3D ++timr->it_requeue_pending; + /* * FIXME: if ->sigq is queued we can race with * dequeue_signal()->posixtimer_rearm(). @@ -309,19 +316,13 @@ int posix_timer_event(struct k_itimer *timr, int si_pri= vate) */ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) { + struct k_itimer *timr =3D container_of(timer, struct k_itimer, it.real.time= r); enum hrtimer_restart ret =3D HRTIMER_NORESTART; - struct k_itimer *timr; unsigned long flags; - int si_private =3D 0; =20 - timr =3D container_of(timer, struct k_itimer, it.real.timer); spin_lock_irqsave(&timr->it_lock, flags); =20 - timr->it_active =3D 0; - if (timr->it_interval !=3D 0) - si_private =3D ++timr->it_requeue_pending; - - if (posix_timer_event(timr, si_private)) { + if (posix_timer_queue_signal(timr)) { /* * The signal was not queued due to SIG_IGN. As a * consequence the timer is not going to be rearmed from @@ -338,14 +339,14 @@ static enum hrtimer_restart posix_timer_fn(struct hrtim= er *timer) * change to the signal handling code. * * For now let timers with an interval less than a - * jiffie expire every jiffie and recheck for a + * jiffy expire every jiffy and recheck for a * valid signal handler. * * This avoids interrupt starvation in case of a * very small interval, which would expire the * timer immediately again. * - * Moving now ahead of time by one jiffie tricks + * Moving now ahead of time by one jiffy tricks * hrtimer_forward() to expire the timer later, * while it still maintains the overrun accuracy * for the price of a slight inconsistency in the @@ -515,7 +516,7 @@ static int do_timer_create(clockid_t which_clock, struct = sigevent *event, spin_lock_irq(¤t->sighand->siglock); /* This makes the timer valid in the hash table */ WRITE_ONCE(new_timer->it_signal, current->signal); - list_add(&new_timer->list, ¤t->signal->posix_timers); + hlist_add_head(&new_timer->list, ¤t->signal->posix_timers); spin_unlock_irq(¤t->sighand->siglock); /* * After unlocking sighand::siglock @new_timer is subject to @@ -856,6 +857,23 @@ static struct k_itimer *timer_wait_running(struct k_itim= er *timer, return lock_timer(timer_id, flags); } =20 +/* + * Set up the new interval and reset the signal delivery data + */ +void posix_timer_set_common(struct k_itimer *timer, struct itimerspec64 *new= _setting) +{ + if (new_setting->it_value.tv_sec || new_setting->it_value.tv_nsec) + timer->it_interval =3D timespec64_to_ktime(new_setting->it_interval); + else + timer->it_interval =3D 0; + + /* Prevent reloading in case there is a signal pending */ + timer->it_requeue_pending =3D (timer->it_requeue_pending + 2) & ~REQUEUE_PE= NDING; + /* Reset overrun accounting */ + timer->it_overrun_last =3D 0; + timer->it_overrun =3D -1LL; +} + /* Set a POSIX.1b interval timer. */ int common_timer_set(struct k_itimer *timr, int flags, struct itimerspec64 *new_setting, @@ -878,15 +896,12 @@ int common_timer_set(struct k_itimer *timr, int flags, return TIMER_RETRY; =20 timr->it_active =3D 0; - timr->it_requeue_pending =3D (timr->it_requeue_pending + 2) & - ~REQUEUE_PENDING; - timr->it_overrun_last =3D 0; + posix_timer_set_common(timr, new_setting); =20 - /* Switch off the timer when it_value is zero */ + /* Keep timer disarmed when it_value is zero */ if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec) return 0; =20 - timr->it_interval =3D timespec64_to_ktime(new_setting->it_interval); expires =3D timespec64_to_ktime(new_setting->it_value); if (flags & TIMER_ABSTIME) expires =3D timens_ktime_to_host(timr->it_clock, expires); @@ -904,7 +919,7 @@ static int do_timer_settime(timer_t timer_id, int tmr_fla= gs, const struct k_clock *kc; struct k_itimer *timr; unsigned long flags; - int error =3D 0; + int error; =20 if (!timespec64_valid(&new_spec64->it_interval) || !timespec64_valid(&new_spec64->it_value)) @@ -918,6 +933,9 @@ static int do_timer_settime(timer_t timer_id, int tmr_fla= gs, if (!timr) return -EINVAL; =20 + if (old_spec64) + old_spec64->it_interval =3D ktime_to_timespec64(timr->it_interval); + kc =3D timr->kclock; if (WARN_ON_ONCE(!kc || !kc->timer_set)) error =3D -EINVAL; @@ -1021,7 +1039,7 @@ SYSCALL_DEFINE1(timer_delete, timer_t, timer_id) } =20 spin_lock(¤t->sighand->siglock); - list_del(&timer->list); + hlist_del(&timer->list); spin_unlock(¤t->sighand->siglock); /* * A concurrent lookup could check timer::it_signal lockless. It @@ -1071,7 +1089,7 @@ static void itimer_delete(struct k_itimer *timer) =20 goto retry_delete; } - list_del(&timer->list); + hlist_del(&timer->list); =20 /* * Setting timer::it_signal to NULL is technically not required @@ -1092,22 +1110,19 @@ static void itimer_delete(struct k_itimer *timer) */ void exit_itimers(struct task_struct *tsk) { - struct list_head timers; - struct k_itimer *tmr; + struct hlist_head timers; =20 - if (list_empty(&tsk->signal->posix_timers)) + if (hlist_empty(&tsk->signal->posix_timers)) return; =20 /* Protect against concurrent read via /proc/$PID/timers */ spin_lock_irq(&tsk->sighand->siglock); - list_replace_init(&tsk->signal->posix_timers, &timers); + hlist_move_list(&tsk->signal->posix_timers, &timers); spin_unlock_irq(&tsk->sighand->siglock); =20 /* The timers are not longer accessible via tsk::signal */ - while (!list_empty(&timers)) { - tmr =3D list_first_entry(&timers, struct k_itimer, list); - itimer_delete(tmr); - } + while (!hlist_empty(&timers)) + itimer_delete(hlist_entry(timers.first, struct k_itimer, list)); } =20 SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock, diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h index f32a2ebba9b8..4784ea65f685 100644 --- a/kernel/time/posix-timers.h +++ b/kernel/time/posix-timers.h @@ -36,10 +36,11 @@ extern const struct k_clock clock_process; extern const struct k_clock clock_thread; extern const struct k_clock alarm_clock; =20 -int posix_timer_event(struct k_itimer *timr, int si_private); +int posix_timer_queue_signal(struct k_itimer *timr); =20 void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_settin= g); int common_timer_set(struct k_itimer *timr, int flags, struct itimerspec64 *new_setting, struct itimerspec64 *old_setting); +void posix_timer_set_common(struct k_itimer *timer, struct itimerspec64 *new= _setting); int common_timer_del(struct k_itimer *timer); diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 5391e4167d60..7e6f409bf311 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2553,6 +2553,7 @@ int do_adjtimex(struct __kernel_timex *txc) { struct timekeeper *tk =3D &tk_core.timekeeper; struct audit_ntp_data ad; + bool offset_set =3D false; bool clock_set =3D false; struct timespec64 ts; unsigned long flags; @@ -2575,6 +2576,7 @@ int do_adjtimex(struct __kernel_timex *txc) if (ret) return ret; =20 + offset_set =3D delta.tv_sec !=3D 0; audit_tk_injoffset(delta); } =20 @@ -2608,7 +2610,7 @@ int do_adjtimex(struct __kernel_timex *txc) if (clock_set) clock_was_set(CLOCK_SET_WALL); =20 - ntp_notify_cmos_timer(); + ntp_notify_cmos_timer(offset_set); =20 return ret; } diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 64b0d8a0aa0f..2b38f3035a3e 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -365,7 +365,7 @@ static unsigned long round_jiffies_common(unsigned long j= , int cpu, rem =3D j % HZ; =20 /* - * If the target jiffie is just after a whole second (which can happen + * If the target jiffy is just after a whole second (which can happen * due to delays of the timer irq, long irq off times etc etc) then * we should round down to the whole second, not up. Use 1/4th second * as cutoff for this rounding as an extreme upper bound for this. @@ -672,7 +672,7 @@ static void enqueue_timer(struct timer_base *base, struct= timer_list *timer, * Set the next expiry time and kick the CPU so it * can reevaluate the wheel: */ - base->next_expiry =3D bucket_expiry; + WRITE_ONCE(base->next_expiry, bucket_expiry); base->timers_pending =3D true; base->next_expiry_recalc =3D false; trigger_dyntick_cpu(base, timer); @@ -1561,6 +1561,8 @@ static inline void timer_base_unlock_expiry(struct time= r_base *base) * the waiter to acquire the lock and make progress. */ static void timer_sync_wait_running(struct timer_base *base) + __releases(&base->lock) __releases(&base->expiry_lock) + __acquires(&base->expiry_lock) __acquires(&base->lock) { if (atomic_read(&base->timer_waiters)) { raw_spin_unlock_irq(&base->lock); @@ -1898,7 +1900,7 @@ static int next_pending_bucket(struct timer_base *base,= unsigned offset, * * Store next expiry time in base->next_expiry. */ -static void next_expiry_recalc(struct timer_base *base) +static void timer_recalc_next_expiry(struct timer_base *base) { unsigned long clk, next, adj; unsigned lvl, offset =3D 0; @@ -1928,7 +1930,7 @@ static void next_expiry_recalc(struct timer_base *base) * bits are zero, we look at the next level as is. If not we * need to advance it by one because that's going to be the * next expiring bucket in that level. base->clk is the next - * expiring jiffie. So in case of: + * expiring jiffy. So in case of: * * LVL5 LVL4 LVL3 LVL2 LVL1 LVL0 * 0 0 0 0 0 0 @@ -1964,7 +1966,7 @@ static void next_expiry_recalc(struct timer_base *base) clk +=3D adj; } =20 - base->next_expiry =3D next; + WRITE_ONCE(base->next_expiry, next); base->next_expiry_recalc =3D false; base->timers_pending =3D !(next =3D=3D base->clk + NEXT_TIMER_MAX_DELTA); } @@ -1993,7 +1995,7 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expire= s) return basem; =20 /* - * Round up to the next jiffie. High resolution timers are + * Round up to the next jiffy. High resolution timers are * off, so the hrtimers are expired in the tick and we need to * make sure that this tick really expires the timer to avoid * a ping pong of the nohz stop code. @@ -2007,7 +2009,7 @@ static unsigned long next_timer_interrupt(struct timer_= base *base, unsigned long basej) { if (base->next_expiry_recalc) - next_expiry_recalc(base); + timer_recalc_next_expiry(base); =20 /* * Move next_expiry for the empty base into the future to prevent an @@ -2018,7 +2020,7 @@ static unsigned long next_timer_interrupt(struct timer_= base *base, * easy comparable to find out which base holds the first pending timer. */ if (!base->timers_pending) - base->next_expiry =3D basej + NEXT_TIMER_MAX_DELTA; + WRITE_ONCE(base->next_expiry, basej + NEXT_TIMER_MAX_DELTA); =20 return base->next_expiry; } @@ -2252,7 +2254,7 @@ static inline u64 __get_next_timer_interrupt(unsigned l= ong basej, u64 basem, base_global, &tevt); =20 /* - * If the next event is only one jiffie ahead there is no need to call + * If the next event is only one jiffy ahead there is no need to call * timer migration hierarchy related functions. The value for the next * global timer in @tevt struct equals then KTIME_MAX. This is also * true, when the timer base is idle. @@ -2411,7 +2413,7 @@ static inline void __run_timers(struct timer_base *base) * jiffies to avoid endless requeuing to current jiffies. */ base->clk++; - next_expiry_recalc(base); + timer_recalc_next_expiry(base); =20 while (levels--) expire_timers(base, heads + levels); @@ -2462,8 +2464,40 @@ static void run_local_timers(void) hrtimer_run_queues(); =20 for (int i =3D 0; i < NR_BASES; i++, base++) { - /* Raise the softirq only if required. */ - if (time_after_eq(jiffies, base->next_expiry) || + /* + * Raise the softirq only if required. + * + * timer_base::next_expiry can be written by a remote CPU while + * holding the lock. If this write happens at the same time than + * the lockless local read, sanity checker could complain about + * data corruption. + * + * There are two possible situations where + * timer_base::next_expiry is written by a remote CPU: + * + * 1. Remote CPU expires global timers of this CPU and updates + * timer_base::next_expiry of BASE_GLOBAL afterwards in + * next_timer_interrupt() or timer_recalc_next_expiry(). The + * worst outcome is a superfluous raise of the timer softirq + * when the not yet updated value is read. + * + * 2. A new first pinned timer is enqueued by a remote CPU + * and therefore timer_base::next_expiry of BASE_LOCAL is + * updated. When this update is missed, this isn't a + * problem, as an IPI is executed nevertheless when the CPU + * was idle before. When the CPU wasn't idle but the update + * is missed, then the timer would expire one jiffy late - + * bad luck. + * + * Those unlikely corner cases where the worst outcome is only a + * one jiffy delay or a superfluous raise of the softirq are + * not that expensive as doing the check always while holding + * the lock. + * + * Possible remote writers are using WRITE_ONCE(). Local reader + * uses therefore READ_ONCE(). + */ + if (time_after_eq(jiffies, READ_ONCE(base->next_expiry)) || (i =3D=3D BASE_DEF && tmigr_requires_handle_remote())) { raise_softirq(TIMER_SOFTIRQ); return; @@ -2730,7 +2764,7 @@ void __init init_timers(void) */ void msleep(unsigned int msecs) { - unsigned long timeout =3D msecs_to_jiffies(msecs) + 1; + unsigned long timeout =3D msecs_to_jiffies(msecs); =20 while (timeout) timeout =3D schedule_timeout_uninterruptible(timeout); @@ -2744,7 +2778,7 @@ EXPORT_SYMBOL(msleep); */ unsigned long msleep_interruptible(unsigned int msecs) { - unsigned long timeout =3D msecs_to_jiffies(msecs) + 1; + unsigned long timeout =3D msecs_to_jiffies(msecs); =20 while (timeout && !signal_pending(current)) timeout =3D schedule_timeout_interruptible(timeout); diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a30c03a66172..a40aa606cd04 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -97,7 +97,7 @@ config BOOT_PRINTK_DELAY using "boot_delay=3DN". =20 It is likely that you would also need to use "lpj=3DM" to preset - the "loops per jiffie" value. + the "loops per jiffy" value. See a previous boot log for the "lpj" value to use for your system, and then set "lpj=3DM" before setting "boot_delay=3DN". NOTE: Using this option may adversely affect SMP systems. diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 00840d5784fe..04f6398b3a40 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -287,7 +287,7 @@ struct batadv_frag_table_entry { /** @lock: lock to protect the list of fragments */ spinlock_t lock; =20 - /** @timestamp: time (jiffie) of last received fragment */ + /** @timestamp: time (jiffy) of last received fragment */ unsigned long timestamp; =20 /** @seqno: sequence number of the fragments in the list */ diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/se= lftests/timers/posix_timers.c index 07c81c0093c0..16bd49492efa 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -6,10 +6,13 @@ * * Kernel loop code stolen from Steven Rostedt */ - +#define _GNU_SOURCE #include +#include #include #include +#include +#include #include #include #include @@ -18,6 +21,21 @@ =20 #define DELAY 2 #define USECS_PER_SEC 1000000 +#define NSECS_PER_SEC 1000000000 + +static void __fatal_error(const char *test, const char *name, const char *wh= at) +{ + char buf[64]; + + strerror_r(errno, buf, sizeof(buf)); + + if (name && strlen(name)) + ksft_exit_fail_msg("%s %s %s %s\n", test, name, what, buf); + else + ksft_exit_fail_msg("%s %s %s\n", test, what, buf); +} + +#define fatal_error(name, what) __fatal_error(__func__, name, what) =20 static volatile int done; =20 @@ -74,24 +92,13 @@ static int check_diff(struct timeval start, struct timeva= l end) return 0; } =20 -static int check_itimer(int which) +static void check_itimer(int which, const char *name) { - const char *name; - int err; struct timeval start, end; struct itimerval val =3D { .it_value.tv_sec =3D DELAY, }; =20 - if (which =3D=3D ITIMER_VIRTUAL) - name =3D "ITIMER_VIRTUAL"; - else if (which =3D=3D ITIMER_PROF) - name =3D "ITIMER_PROF"; - else if (which =3D=3D ITIMER_REAL) - name =3D "ITIMER_REAL"; - else - return -1; - done =3D 0; =20 if (which =3D=3D ITIMER_VIRTUAL) @@ -101,17 +108,11 @@ static int check_itimer(int which) else if (which =3D=3D ITIMER_REAL) signal(SIGALRM, sig_handler); =20 - err =3D gettimeofday(&start, NULL); - if (err < 0) { - ksft_perror("Can't call gettimeofday()"); - return -1; - } + if (gettimeofday(&start, NULL) < 0) + fatal_error(name, "gettimeofday()"); =20 - err =3D setitimer(which, &val, NULL); - if (err < 0) { - ksft_perror("Can't set timer"); - return -1; - } + if (setitimer(which, &val, NULL) < 0) + fatal_error(name, "setitimer()"); =20 if (which =3D=3D ITIMER_VIRTUAL) user_loop(); @@ -120,68 +121,41 @@ static int check_itimer(int which) else if (which =3D=3D ITIMER_REAL) idle_loop(); =20 - err =3D gettimeofday(&end, NULL); - if (err < 0) { - ksft_perror("Can't call gettimeofday()"); - return -1; - } + if (gettimeofday(&end, NULL) < 0) + fatal_error(name, "gettimeofday()"); =20 ksft_test_result(check_diff(start, end) =3D=3D 0, "%s\n", name); - - return 0; } =20 -static int check_timer_create(int which) +static void check_timer_create(int which, const char *name) { - const char *type; - int err; - timer_t id; struct timeval start, end; struct itimerspec val =3D { .it_value.tv_sec =3D DELAY, }; - - if (which =3D=3D CLOCK_THREAD_CPUTIME_ID) { - type =3D "thread"; - } else if (which =3D=3D CLOCK_PROCESS_CPUTIME_ID) { - type =3D "process"; - } else { - ksft_print_msg("Unknown timer_create() type %d\n", which); - return -1; - } + timer_t id; =20 done =3D 0; - err =3D timer_create(which, NULL, &id); - if (err < 0) { - ksft_perror("Can't create timer"); - return -1; - } - signal(SIGALRM, sig_handler); =20 - err =3D gettimeofday(&start, NULL); - if (err < 0) { - ksft_perror("Can't call gettimeofday()"); - return -1; - } + if (timer_create(which, NULL, &id) < 0) + fatal_error(name, "timer_create()"); =20 - err =3D timer_settime(id, 0, &val, NULL); - if (err < 0) { - ksft_perror("Can't set timer"); - return -1; - } + if (signal(SIGALRM, sig_handler) =3D=3D SIG_ERR) + fatal_error(name, "signal()"); + + if (gettimeofday(&start, NULL) < 0) + fatal_error(name, "gettimeofday()"); + + if (timer_settime(id, 0, &val, NULL) < 0) + fatal_error(name, "timer_settime()"); =20 user_loop(); =20 - err =3D gettimeofday(&end, NULL); - if (err < 0) { - ksft_perror("Can't call gettimeofday()"); - return -1; - } + if (gettimeofday(&end, NULL) < 0) + fatal_error(name, "gettimeofday()"); =20 ksft_test_result(check_diff(start, end) =3D=3D 0, - "timer_create() per %s\n", type); - - return 0; + "timer_create() per %s\n", name); } =20 static pthread_t ctd_thread; @@ -209,15 +183,14 @@ static void *ctd_thread_func(void *arg) =20 ctd_count =3D 100; if (timer_create(CLOCK_PROCESS_CPUTIME_ID, NULL, &id)) - return "Can't create timer\n"; + fatal_error(NULL, "timer_create()"); if (timer_settime(id, 0, &val, NULL)) - return "Can't set timer\n"; - + fatal_error(NULL, "timer_settime()"); while (ctd_count > 0 && !ctd_failed) ; =20 if (timer_delete(id)) - return "Can't delete timer\n"; + fatal_error(NULL, "timer_delete()"); =20 return NULL; } @@ -225,19 +198,16 @@ static void *ctd_thread_func(void *arg) /* * Test that only the running thread receives the timer signal. */ -static int check_timer_distribution(void) +static void check_timer_distribution(void) { - const char *errmsg; + if (signal(SIGALRM, ctd_sighandler) =3D=3D SIG_ERR) + fatal_error(NULL, "signal()"); =20 - signal(SIGALRM, ctd_sighandler); - - errmsg =3D "Can't create thread\n"; if (pthread_create(&ctd_thread, NULL, ctd_thread_func, NULL)) - goto err; + fatal_error(NULL, "pthread_create()"); =20 - errmsg =3D "Can't join thread\n"; - if (pthread_join(ctd_thread, (void **)&errmsg) || errmsg) - goto err; + if (pthread_join(ctd_thread, NULL)) + fatal_error(NULL, "pthread_join()"); =20 if (!ctd_failed) ksft_test_result_pass("check signal distribution\n"); @@ -245,31 +215,399 @@ static int check_timer_distribution(void) ksft_test_result_fail("check signal distribution\n"); else ksft_test_result_skip("check signal distribution (old kernel)\n"); - return 0; -err: - ksft_print_msg("%s", errmsg); - return -1; +} + +struct tmrsig { + int signals; + int overruns; +}; + +static void siginfo_handler(int sig, siginfo_t *si, void *uc) +{ + struct tmrsig *tsig =3D si ? si->si_ptr : NULL; + + if (tsig) { + tsig->signals++; + tsig->overruns +=3D si->si_overrun; + } +} + +static void *ignore_thread(void *arg) +{ + unsigned int *tid =3D arg; + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_BLOCK)"); + + *tid =3D gettid(); + sleep(100); + + if (sigprocmask(SIG_UNBLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_UNBLOCK)"); + return NULL; +} + +static void check_sig_ign(int thread) +{ + struct tmrsig tsig =3D { }; + struct itimerspec its; + unsigned int tid =3D 0; + struct sigaction sa; + struct sigevent sev; + pthread_t pthread; + timer_t timerid; + sigset_t set; + + if (thread) { + if (pthread_create(&pthread, NULL, ignore_thread, &tid)) + fatal_error(NULL, "pthread_create()"); + sleep(1); + } + + sa.sa_flags =3D SA_SIGINFO; + sa.sa_sigaction =3D siginfo_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGUSR1, &sa, NULL)) + fatal_error(NULL, "sigaction()"); + + /* Block the signal */ + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_BLOCK)"); + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_SIGNAL; + sev.sigev_signo =3D SIGUSR1; + sev.sigev_value.sival_ptr =3D &tsig; + if (thread) { + sev.sigev_notify =3D SIGEV_THREAD_ID; + sev._sigev_un._tid =3D tid; + } + + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid)) + fatal_error(NULL, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + timer_settime(timerid, 0, &its, NULL); + + sleep(1); + + /* Set the signal to be ignored */ + if (signal(SIGUSR1, SIG_IGN) =3D=3D SIG_ERR) + fatal_error(NULL, "signal(SIG_IGN)"); + + sleep(1); + + if (thread) { + /* Stop the thread first. No signal should be delivered to it */ + if (pthread_cancel(pthread)) + fatal_error(NULL, "pthread_cancel()"); + if (pthread_join(pthread, NULL)) + fatal_error(NULL, "pthread_join()"); + } + + /* Restore the handler */ + if (sigaction(SIGUSR1, &sa, NULL)) + fatal_error(NULL, "sigaction()"); + + sleep(1); + + /* Unblock it, which should deliver the signal in the !thread case*/ + if (sigprocmask(SIG_UNBLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_UNBLOCK)"); + + if (timer_delete(timerid)) + fatal_error(NULL, "timer_delete()"); + + if (!thread) { + ksft_test_result(tsig.signals =3D=3D 1 && tsig.overruns =3D=3D 29, + "check_sig_ign SIGEV_SIGNAL\n"); + } else { + ksft_test_result(tsig.signals =3D=3D 0 && tsig.overruns =3D=3D 0, + "check_sig_ign SIGEV_THREAD_ID\n"); + } +} + +static void check_rearm(void) +{ + struct tmrsig tsig =3D { }; + struct itimerspec its; + struct sigaction sa; + struct sigevent sev; + timer_t timerid; + sigset_t set; + + sa.sa_flags =3D SA_SIGINFO; + sa.sa_sigaction =3D siginfo_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGUSR1, &sa, NULL)) + fatal_error(NULL, "sigaction()"); + + /* Block the signal */ + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_BLOCK)"); + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_SIGNAL; + sev.sigev_signo =3D SIGUSR1; + sev.sigev_value.sival_ptr =3D &tsig; + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid)) + fatal_error(NULL, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + if (timer_settime(timerid, 0, &its, NULL)) + fatal_error(NULL, "timer_settime()"); + + sleep(1); + + /* Reprogram the timer to single shot */ + its.it_value.tv_sec =3D 10; + its.it_value.tv_nsec =3D 0; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 0; + if (timer_settime(timerid, 0, &its, NULL)) + fatal_error(NULL, "timer_settime()"); + + /* Unblock it, which should not deliver a signal */ + if (sigprocmask(SIG_UNBLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_UNBLOCK)"); + + if (timer_delete(timerid)) + fatal_error(NULL, "timer_delete()"); + + ksft_test_result(!tsig.signals, "check_rearm\n"); +} + +static void check_delete(void) +{ + struct tmrsig tsig =3D { }; + struct itimerspec its; + struct sigaction sa; + struct sigevent sev; + timer_t timerid; + sigset_t set; + + sa.sa_flags =3D SA_SIGINFO; + sa.sa_sigaction =3D siginfo_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGUSR1, &sa, NULL)) + fatal_error(NULL, "sigaction()"); + + /* Block the signal */ + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_BLOCK)"); + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_SIGNAL; + sev.sigev_signo =3D SIGUSR1; + sev.sigev_value.sival_ptr =3D &tsig; + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid)) + fatal_error(NULL, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + if (timer_settime(timerid, 0, &its, NULL)) + fatal_error(NULL, "timer_settime()"); + + sleep(1); + + if (timer_delete(timerid)) + fatal_error(NULL, "timer_delete()"); + + /* Unblock it, which should not deliver a signal */ + if (sigprocmask(SIG_UNBLOCK, &set, NULL)) + fatal_error(NULL, "sigprocmask(SIG_UNBLOCK)"); + + ksft_test_result(!tsig.signals, "check_delete\n"); +} + +static inline int64_t calcdiff_ns(struct timespec t1, struct timespec t2) +{ + int64_t diff; + + diff =3D NSECS_PER_SEC * (int64_t)((int) t1.tv_sec - (int) t2.tv_sec); + diff +=3D ((int) t1.tv_nsec - (int) t2.tv_nsec); + return diff; +} + +static void check_sigev_none(int which, const char *name) +{ + struct timespec start, now; + struct itimerspec its; + struct sigevent sev; + timer_t timerid; + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_NONE; + + if (timer_create(which, &sev, &timerid)) + fatal_error(name, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + timer_settime(timerid, 0, &its, NULL); + + if (clock_gettime(which, &start)) + fatal_error(name, "clock_gettime()"); + + do { + if (clock_gettime(which, &now)) + fatal_error(name, "clock_gettime()"); + } while (calcdiff_ns(now, start) < NSECS_PER_SEC); + + if (timer_gettime(timerid, &its)) + fatal_error(name, "timer_gettime()"); + + if (timer_delete(timerid)) + fatal_error(name, "timer_delete()"); + + ksft_test_result(its.it_value.tv_sec || its.it_value.tv_nsec, + "check_sigev_none %s\n", name); +} + +static void check_gettime(int which, const char *name) +{ + struct itimerspec its, prev; + struct timespec start, now; + struct sigevent sev; + timer_t timerid; + int wraps =3D 0; + sigset_t set; + + /* Block the signal */ + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(name, "sigprocmask(SIG_BLOCK)"); + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_SIGNAL; + sev.sigev_signo =3D SIGUSR1; + + if (timer_create(which, &sev, &timerid)) + fatal_error(name, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + if (timer_settime(timerid, 0, &its, NULL)) + fatal_error(name, "timer_settime()"); + + if (timer_gettime(timerid, &prev)) + fatal_error(name, "timer_gettime()"); + + if (clock_gettime(which, &start)) + fatal_error(name, "clock_gettime()"); + + do { + if (clock_gettime(which, &now)) + fatal_error(name, "clock_gettime()"); + if (timer_gettime(timerid, &its)) + fatal_error(name, "timer_gettime()"); + if (its.it_value.tv_nsec > prev.it_value.tv_nsec) + wraps++; + prev =3D its; + + } while (calcdiff_ns(now, start) < NSECS_PER_SEC); + + if (timer_delete(timerid)) + fatal_error(name, "timer_delete()"); + + ksft_test_result(wraps > 1, "check_gettime %s\n", name); +} + +static void check_overrun(int which, const char *name) +{ + struct timespec start, now; + struct tmrsig tsig =3D { }; + struct itimerspec its; + struct sigaction sa; + struct sigevent sev; + timer_t timerid; + sigset_t set; + + sa.sa_flags =3D SA_SIGINFO; + sa.sa_sigaction =3D siginfo_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGUSR1, &sa, NULL)) + fatal_error(name, "sigaction()"); + + /* Block the signal */ + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &set, NULL)) + fatal_error(name, "sigprocmask(SIG_BLOCK)"); + + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify =3D SIGEV_SIGNAL; + sev.sigev_signo =3D SIGUSR1; + sev.sigev_value.sival_ptr =3D &tsig; + if (timer_create(which, &sev, &timerid)) + fatal_error(name, "timer_create()"); + + /* Start the timer to expire in 100ms and 100ms intervals */ + its.it_value.tv_sec =3D 0; + its.it_value.tv_nsec =3D 100000000; + its.it_interval.tv_sec =3D 0; + its.it_interval.tv_nsec =3D 100000000; + if (timer_settime(timerid, 0, &its, NULL)) + fatal_error(name, "timer_settime()"); + + if (clock_gettime(which, &start)) + fatal_error(name, "clock_gettime()"); + + do { + if (clock_gettime(which, &now)) + fatal_error(name, "clock_gettime()"); + } while (calcdiff_ns(now, start) < NSECS_PER_SEC); + + /* Unblock it, which should deliver a signal */ + if (sigprocmask(SIG_UNBLOCK, &set, NULL)) + fatal_error(name, "sigprocmask(SIG_UNBLOCK)"); + + if (timer_delete(timerid)) + fatal_error(name, "timer_delete()"); + + ksft_test_result(tsig.signals =3D=3D 1 && tsig.overruns =3D=3D 9, + "check_overrun %s\n", name); } =20 int main(int argc, char **argv) { ksft_print_header(); - ksft_set_plan(6); + ksft_set_plan(18); =20 ksft_print_msg("Testing posix timers. False negative may happen on CPU exec= ution \n"); ksft_print_msg("based timers if other threads run on the CPU...\n"); =20 - if (check_itimer(ITIMER_VIRTUAL) < 0) - ksft_exit_fail(); - - if (check_itimer(ITIMER_PROF) < 0) - ksft_exit_fail(); - - if (check_itimer(ITIMER_REAL) < 0) - ksft_exit_fail(); - - if (check_timer_create(CLOCK_THREAD_CPUTIME_ID) < 0) - ksft_exit_fail(); + check_itimer(ITIMER_VIRTUAL, "ITIMER_VIRTUAL"); + check_itimer(ITIMER_PROF, "ITIMER_PROF"); + check_itimer(ITIMER_REAL, "ITIMER_REAL"); + check_timer_create(CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID"); =20 /* * It's unfortunately hard to reliably test a timer expiration @@ -280,11 +618,21 @@ int main(int argc, char **argv) * to ensure true parallelism. So test only one thread until we * find a better solution. */ - if (check_timer_create(CLOCK_PROCESS_CPUTIME_ID) < 0) - ksft_exit_fail(); - - if (check_timer_distribution() < 0) - ksft_exit_fail(); + check_timer_create(CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID"); + check_timer_distribution(); + + check_sig_ign(0); + check_sig_ign(1); + check_rearm(); + check_delete(); + check_sigev_none(CLOCK_MONOTONIC, "CLOCK_MONOTONIC"); + check_sigev_none(CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID"); + check_gettime(CLOCK_MONOTONIC, "CLOCK_MONOTONIC"); + check_gettime(CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID"); + check_gettime(CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID"); + check_overrun(CLOCK_MONOTONIC, "CLOCK_MONOTONIC"); + check_overrun(CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID"); + check_overrun(CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID"); =20 ksft_finished(); } . Date: Mon, 16 Sep 2024 10:38:36 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] irq/core for v6.12-rc1 Linus, please pull the latest irq/core branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-core-2024-09= -16 up to: a6fe30d1e365: genirq: Use cpumask_intersects() Updates for the interrupt subsystem: - Core: - Remove a global lock in the affinity setting code The lock protects a cpumask for intermediate results and the lock causes a bottleneck on simultaneous start of multiple virtual machines. Replace the lock and the static cpumask with a per CPU cpumask which is nicely serialized by raw spinlock held when executing this code. - Provide support for giving a suffix to interrupt domain names. That's required to support devices with subfunctions so that the domain names are distinct even if they originate from the same device node. - The usual set of cleanups and enhancements all over the place - Drivers: - Support for longarch AVEC interrupt chip - Refurbishment of the Armada driver so it can be extended for new variants. - The usual set of cleanups and enhancements all over the place Thanks, tglx ------------------> Andy Shevchenko (2): irqdomain: Clarify checks for bus_token irqdomain: Remove stray '-' in the domain name Anshuman Khandual (1): irqchip/gic-v4.1: Replace bare number with ID_AA64PFR0_EL1_GIC_V4P1 Caleb Sander Mateos (1): softirq: Remove unused 'action' parameter from action callback Costa Shulyupin (3): genirq: Fix typo in struct comment genirq/cpuhotplug: Use cpumask_intersects() genirq: Use cpumask_intersects() Hongbo Li (1): irqdomain: Use IS_ERR_OR_NULL() in irq_domain_trim_hierarchy() Huacai Chen (4): irqchip/loongson-pch-msi: Switch to MSI parent domains LoongArch: Move irqchip function prototypes to irq-loongson.h LoongArch: Architectural preparation for AVEC irqchip irqchip/loongson-eiointc: Rename CPUHP_AP_IRQ_LOONGARCH_STARTING Jeff Xie (2): genirq/proc: Correctly set file permissions for affinity control files genirq/proc: Change the return value for set affinity permission error Jinjie Ruan (3): irqchip: Remove asmlinkage for handlers registered with set_handle_irq() genirq/proc: Use irq_move_pending() in show_irq_affinity() genirq/msi: Use kmemdup_array() instead of kmemdup() Jiri Slaby (SUSE) (3): genirq/irq_sim: Remove unused irq_sim_work_ctx:: Irq_base genirq: Remove unused irq_chip_generic:: {type,polarity}_cache genirq: Remove irq_chip_regs:: Polarity Konrad Dybcio (1): irqchip/apple-aic: Only access system registers on SoCs which provide t= hem Marc Zyngier (1): genirq: Get rid of global lock in irq_do_set_affinity() Marek Beh=C3=BAn (41): irqchip/armada-370-xp: Drop _OFFS suffix from some register constants irqchip/armada-370-xp: Change register constant suffix from _MSK to _MA= SK irqchip/armada-370-xp: Change spaces to tabs irqchip/armada-370-xp: Use BIT() and GENMASK() macros irqchip/armada-370-xp: Cosmetic fix parentheses in register constant de= finitions irqchip/armada-370-xp: Change register constants prefix to MPIC_ irqchip/armada-370-xp: Use correct type for cpu variable irqchip/armada-370-xp: Simplify is_percpu_irq() code irqchip/armada-370-xp: Change to SPDX license identifier irqchip/armada-370-xp: Declare iterators in for loop irqchip/armada-370-xp: Rename variable for consistency irqchip/armada-370-xp: Use unsigned int type for virqs irqchip/armada-370-xp: Use !virq instead of virq =3D=3D 0 in condition irqchip/armada-370-xp: Simplify ipi_resume() code irqchip/armada-370-xp: Improve indentation irqchip/armada-370-xp: Change symbol prefixes to mpic irqchip/armada-370-xp: Don't read number of supported interrupts multip= le times irqchip/armada-370-xp: Use FIELD_GET() and named register constant irqchip/armada-370-xp: Refactor mpic_handle_msi_irq() code irqchip/armada-370-xp: Refactor handling IPI interrupts irqchip/armada-370-xp: Use consistent variable names for hwirqs irqchip/armada-370-xp: Use consistent types when iterating interrupts irqchip/armada-370-xp: Use consistent name for struct irq_data variables irqchip/armada-370-xp: Simplify mpic_reenable_percpu() and mpic_resume() irqchip/armada-370-xp: Drop redundant continue irqchip/armada-370-xp: Rename variable for consistency irqchip/armada-370-xp: Use u32 type instead of unsigned long where poss= ieble irqchip/armada-370-xp: Refactor initial memory regions mapping irqchip/armada-370-xp: Print error and return error code on initializat= ion failure irqchip/armada-370-xp: Drop IPI_DOORBELL_START and rename IPI_DOORBELL_= END irqchip/armada-370-xp: Drop msi_doorbell_end() irqchip/armada-370-xp: Add the __init attribute to mpic_msi_init() irqchip/armada-370-xp: Put __init attribute after return type in mpic_i= pi_init() irqchip/armada-370-xp: Put static variables into driver private structu= re irqchip/armada-370-xp: Put MSI doorbell limits into the mpic structure irqchip/armada-370-xp: Pass around the driver private structure irqchip/armada-370-xp: Dynamically allocate the driver private structure irqchip/armada-370-xp: Fix reenabling last per-CPU interrupt irqchip/armada-370-xp: Iterate only valid bits of the per-CPU interrupt= cause register irqchip/armada-370-xp: Allow mapping only per-CPU interrupts irqchip/armada-370-xp: Use mpic_is_ipi_available() in mpic_of_init() Matti Vaittinen (3): irqdomain: Simplify simple and legacy domain creation irqdomain: Allow giving name suffix for domain irqdomain: Always associate interrupts for legacy domains Nick Chan (3): dt-bindings: apple,aic: Document A7-A11 compatibles irqchip/apple-aic: Skip unnecessary enabling of use_fast_ipi irqchip/apple-aic: Add a new "Global fast IPIs only" feature level Thomas Gleixner (1): irqdomain: Cleanup domain name allocation Tianyang Zhang (2): irqchip/loongson-pch-msi: Prepare get_pch_msi_handle() for AVECINTC irqchip/loongarch-avec: Add AVEC irqchip support Zhang Zekun (1): irqchip/mbigen: Simplify code logic with for_each_child_of_node_scoped() .../bindings/interrupt-controller/apple,aic.yaml | 14 +- arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/cpu-features.h | 1 + arch/loongarch/include/asm/cpu.h | 2 + arch/loongarch/include/asm/hardirq.h | 3 +- arch/loongarch/include/asm/irq.h | 31 +- arch/loongarch/include/asm/loongarch.h | 18 +- arch/loongarch/include/asm/smp.h | 2 + arch/loongarch/kernel/cpu-probe.c | 3 +- arch/loongarch/kernel/irq.c | 12 + arch/loongarch/kernel/paravirt.c | 5 + arch/loongarch/kernel/smp.c | 6 + block/blk-mq.c | 2 +- drivers/irqchip/Kconfig | 1 + drivers/irqchip/Makefile | 2 +- drivers/irqchip/irq-apple-aic.c | 59 +- drivers/irqchip/irq-armada-370-xp.c | 861 +++++++++++--------= -- drivers/irqchip/irq-atmel-aic.c | 3 +- drivers/irqchip/irq-atmel-aic5.c | 3 +- drivers/irqchip/irq-clps711x.c | 2 +- drivers/irqchip/irq-davinci-cp-intc.c | 3 +- drivers/irqchip/irq-ftintc010.c | 2 +- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic-v4.c | 2 +- drivers/irqchip/irq-ixp4xx.c | 3 +- drivers/irqchip/irq-loongarch-avec.c | 425 ++++++++++ drivers/irqchip/irq-loongarch-cpu.c | 7 +- drivers/irqchip/irq-loongson-eiointc.c | 9 +- drivers/irqchip/irq-loongson-htvec.c | 2 + drivers/irqchip/irq-loongson-liointc.c | 2 + drivers/irqchip/irq-loongson-pch-lpc.c | 2 + drivers/irqchip/irq-loongson-pch-msi.c | 83 +- drivers/irqchip/irq-loongson-pch-pic.c | 2 + drivers/irqchip/irq-loongson.h | 27 + drivers/irqchip/irq-mbigen.c | 24 +- drivers/irqchip/irq-omap-intc.c | 3 +- drivers/irqchip/irq-sa11x0.c | 3 +- drivers/irqchip/irq-versatile-fpga.c | 2 +- include/linux/cpuhotplug.h | 3 +- include/linux/interrupt.h | 6 +- include/linux/irq.h | 6 - include/linux/irqdomain.h | 8 + kernel/irq/chip.c | 2 +- kernel/irq/cpuhotplug.c | 4 +- kernel/irq/irq_sim.c | 1 - kernel/irq/irqdomain.c | 210 +++-- kernel/irq/manage.c | 21 +- kernel/irq/migration.c | 4 +- kernel/irq/msi.c | 2 +- kernel/irq/proc.c | 17 +- kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 2 +- kernel/sched/fair.c | 2 +- kernel/softirq.c | 15 +- kernel/time/hrtimer.c | 2 +- kernel/time/timer.c | 2 +- lib/irq_poll.c | 2 +- net/core/dev.c | 4 +- 58 files changed, 1267 insertions(+), 682 deletions(-) create mode 100644 drivers/irqchip/irq-loongarch-avec.c create mode 100644 drivers/irqchip/irq-loongson.h diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic= .yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml index 698588e9aa86..4be9b596a790 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml @@ -31,13 +31,25 @@ description: | This device also represents the FIQ interrupt sources on platforms using A= IC, which do not go through a discrete interrupt controller. =20 + IPIs may be performed via MMIO registers on all variants of AIC. Starting + from A11, system registers may also be used for "fast" IPIs. Starting from + M1, even faster IPIs within the same cluster may be achieved by writing to + a "local" fast IPI register as opposed to using the "global" fast IPI + register. + allOf: - $ref: /schemas/interrupt-controller.yaml# =20 properties: compatible: items: - - const: apple,t8103-aic + - enum: + - apple,s5l8960x-aic + - apple,t7000-aic + - apple,s8000-aic + - apple,t8010-aic + - apple,t8015-aic + - apple,t8103-aic - const: apple,aic =20 interrupt-controller: true diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 70f169210b52..0e3abf7b0bd3 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -85,6 +85,7 @@ config LOONGARCH select GENERIC_ENTRY select GENERIC_GETTIMEOFDAY select GENERIC_IOREMAP if !ARCH_IOREMAP + select GENERIC_IRQ_MATRIX_ALLOCATOR select GENERIC_IRQ_MULTI_HANDLER select GENERIC_IRQ_PROBE select GENERIC_IRQ_SHOW diff --git a/arch/loongarch/include/asm/cpu-features.h b/arch/loongarch/inclu= de/asm/cpu-features.h index 2eafe6a6aca8..16a716f88a5c 100644 --- a/arch/loongarch/include/asm/cpu-features.h +++ b/arch/loongarch/include/asm/cpu-features.h @@ -65,5 +65,6 @@ #define cpu_has_guestid cpu_opt(LOONGARCH_CPU_GUESTID) #define cpu_has_hypervisor cpu_opt(LOONGARCH_CPU_HYPERVISOR) #define cpu_has_ptw cpu_opt(LOONGARCH_CPU_PTW) +#define cpu_has_avecint cpu_opt(LOONGARCH_CPU_AVECINT) =20 #endif /* __ASM_CPU_FEATURES_H */ diff --git a/arch/loongarch/include/asm/cpu.h b/arch/loongarch/include/asm/cp= u.h index 48b9f7168bcc..843f9c4ec980 100644 --- a/arch/loongarch/include/asm/cpu.h +++ b/arch/loongarch/include/asm/cpu.h @@ -99,6 +99,7 @@ enum cpu_type_enum { #define CPU_FEATURE_GUESTID 24 /* CPU has GuestID feature */ #define CPU_FEATURE_HYPERVISOR 25 /* CPU has hypervisor (running in VM) */ #define CPU_FEATURE_PTW 26 /* CPU has hardware page table walker */ +#define CPU_FEATURE_AVECINT 27 /* CPU has avec interrupt */ =20 #define LOONGARCH_CPU_CPUCFG BIT_ULL(CPU_FEATURE_CPUCFG) #define LOONGARCH_CPU_LAM BIT_ULL(CPU_FEATURE_LAM) @@ -127,5 +128,6 @@ enum cpu_type_enum { #define LOONGARCH_CPU_GUESTID BIT_ULL(CPU_FEATURE_GUESTID) #define LOONGARCH_CPU_HYPERVISOR BIT_ULL(CPU_FEATURE_HYPERVISOR) #define LOONGARCH_CPU_PTW BIT_ULL(CPU_FEATURE_PTW) +#define LOONGARCH_CPU_AVECINT BIT_ULL(CPU_FEATURE_AVECINT) =20 #endif /* _ASM_CPU_H */ diff --git a/arch/loongarch/include/asm/hardirq.h b/arch/loongarch/include/as= m/hardirq.h index 1d7feb719515..10da8d6961cb 100644 --- a/arch/loongarch/include/asm/hardirq.h +++ b/arch/loongarch/include/asm/hardirq.h @@ -12,12 +12,13 @@ extern void ack_bad_irq(unsigned int irq); #define ack_bad_irq ack_bad_irq =20 -#define NR_IPI 3 +#define NR_IPI 4 =20 enum ipi_msg_type { IPI_RESCHEDULE, IPI_CALL_FUNCTION, IPI_IRQ_WORK, + IPI_CLEAR_VECTOR, }; =20 typedef struct { diff --git a/arch/loongarch/include/asm/irq.h b/arch/loongarch/include/asm/ir= q.h index 480418bc5071..9c2ca785faa9 100644 --- a/arch/loongarch/include/asm/irq.h +++ b/arch/loongarch/include/asm/irq.h @@ -39,11 +39,22 @@ void spurious_interrupt(void); =20 #define NR_IRQS_LEGACY 16 =20 +/* + * 256 Vectors Mapping for AVECINTC: + * + * 0 - 15: Mapping classic IPs, e.g. IP0-12. + * 16 - 255: Mapping vectors for external IRQ. + * + */ +#define NR_VECTORS 256 +#define NR_LEGACY_VECTORS 16 +#define IRQ_MATRIX_BITS NR_VECTORS + #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace void arch_trigger_cpumask_backtrace(const struct cpumask *mask, int exclude_= cpu); =20 #define MAX_IO_PICS 2 -#define NR_IRQS (64 + (256 * MAX_IO_PICS)) +#define NR_IRQS (64 + NR_VECTORS * (NR_CPUS + MAX_IO_PICS)) =20 struct acpi_vector_group { int node; @@ -65,7 +76,7 @@ extern struct acpi_vector_group msi_group[MAX_IO_PICS]; #define LOONGSON_LPC_LAST_IRQ (LOONGSON_LPC_IRQ_BASE + 15) =20 #define LOONGSON_CPU_IRQ_BASE 16 -#define LOONGSON_CPU_LAST_IRQ (LOONGSON_CPU_IRQ_BASE + 14) +#define LOONGSON_CPU_LAST_IRQ (LOONGSON_CPU_IRQ_BASE + 15) =20 #define LOONGSON_PCH_IRQ_BASE 64 #define LOONGSON_PCH_ACPI_IRQ (LOONGSON_PCH_IRQ_BASE + 47) @@ -88,20 +99,8 @@ struct acpi_madt_bio_pic; struct acpi_madt_msi_pic; struct acpi_madt_lpc_pic; =20 -int liointc_acpi_init(struct irq_domain *parent, - struct acpi_madt_lio_pic *acpi_liointc); -int eiointc_acpi_init(struct irq_domain *parent, - struct acpi_madt_eio_pic *acpi_eiointc); - -int htvec_acpi_init(struct irq_domain *parent, - struct acpi_madt_ht_pic *acpi_htvec); -int pch_lpc_acpi_init(struct irq_domain *parent, - struct acpi_madt_lpc_pic *acpi_pchlpc); -int pch_msi_acpi_init(struct irq_domain *parent, - struct acpi_madt_msi_pic *acpi_pchmsi); -int pch_pic_acpi_init(struct irq_domain *parent, - struct acpi_madt_bio_pic *acpi_pchpic); -int find_pch_pic(u32 gsi); +void complete_irq_moving(void); + struct fwnode_handle *get_pch_msi_handle(int pci_segment); =20 extern struct acpi_madt_lio_pic *acpi_liointc; diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/= asm/loongarch.h index 04a78010fc72..631d249b3ef2 100644 --- a/arch/loongarch/include/asm/loongarch.h +++ b/arch/loongarch/include/asm/loongarch.h @@ -253,8 +253,8 @@ #define CSR_ESTAT_EXC_WIDTH 6 #define CSR_ESTAT_EXC (_ULCAST_(0x3f) << CSR_ESTAT_EXC_SHIFT) #define CSR_ESTAT_IS_SHIFT 0 -#define CSR_ESTAT_IS_WIDTH 14 -#define CSR_ESTAT_IS (_ULCAST_(0x3fff) << CSR_ESTAT_IS_SHIFT) +#define CSR_ESTAT_IS_WIDTH 15 +#define CSR_ESTAT_IS (_ULCAST_(0x7fff) << CSR_ESTAT_IS_SHIFT) =20 #define LOONGARCH_CSR_ERA 0x6 /* ERA */ =20 @@ -649,6 +649,13 @@ =20 #define LOONGARCH_CSR_CTAG 0x98 /* TagLo + TagHi */ =20 +#define LOONGARCH_CSR_ISR0 0xa0 +#define LOONGARCH_CSR_ISR1 0xa1 +#define LOONGARCH_CSR_ISR2 0xa2 +#define LOONGARCH_CSR_ISR3 0xa3 + +#define LOONGARCH_CSR_IRR 0xa4 + #define LOONGARCH_CSR_PRID 0xc0 =20 /* Shadow MCSR : 0xc0 ~ 0xff */ @@ -1011,7 +1018,7 @@ /* * CSR_ECFG IM */ -#define ECFG0_IM 0x00001fff +#define ECFG0_IM 0x00005fff #define ECFGB_SIP0 0 #define ECFGF_SIP0 (_ULCAST_(1) << ECFGB_SIP0) #define ECFGB_SIP1 1 @@ -1054,6 +1061,7 @@ #define IOCSRF_EIODECODE BIT_ULL(9) #define IOCSRF_FLATMODE BIT_ULL(10) #define IOCSRF_VM BIT_ULL(11) +#define IOCSRF_AVEC BIT_ULL(15) =20 #define LOONGARCH_IOCSR_VENDOR 0x10 =20 @@ -1065,6 +1073,7 @@ #define IOCSR_MISC_FUNC_SOFT_INT BIT_ULL(10) #define IOCSR_MISC_FUNC_TIMER_RESET BIT_ULL(21) #define IOCSR_MISC_FUNC_EXT_IOI_EN BIT_ULL(48) +#define IOCSR_MISC_FUNC_AVEC_EN BIT_ULL(51) =20 #define LOONGARCH_IOCSR_CPUTEMP 0x428 =20 @@ -1387,9 +1396,10 @@ __BUILD_CSR_OP(tlbidx) #define INT_TI 11 /* Timer */ #define INT_IPI 12 #define INT_NMI 13 +#define INT_AVEC 14 =20 /* ExcCodes corresponding to interrupts */ -#define EXCCODE_INT_NUM (INT_NMI + 1) +#define EXCCODE_INT_NUM (INT_AVEC + 1) #define EXCCODE_INT_START 64 #define EXCCODE_INT_END (EXCCODE_INT_START + EXCCODE_INT_NUM - 1) =20 diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch/include/asm/sm= p.h index 50db503f44e3..3383c9d24e94 100644 --- a/arch/loongarch/include/asm/smp.h +++ b/arch/loongarch/include/asm/smp.h @@ -70,10 +70,12 @@ extern int __cpu_logical_map[NR_CPUS]; #define ACTION_RESCHEDULE 1 #define ACTION_CALL_FUNCTION 2 #define ACTION_IRQ_WORK 3 +#define ACTION_CLEAR_VECTOR 4 #define SMP_BOOT_CPU BIT(ACTION_BOOT_CPU) #define SMP_RESCHEDULE BIT(ACTION_RESCHEDULE) #define SMP_CALL_FUNCTION BIT(ACTION_CALL_FUNCTION) #define SMP_IRQ_WORK BIT(ACTION_IRQ_WORK) +#define SMP_CLEAR_VECTOR BIT(ACTION_CLEAR_VECTOR) =20 struct secondary_data { unsigned long stack; diff --git a/arch/loongarch/kernel/cpu-probe.c b/arch/loongarch/kernel/cpu-pr= obe.c index 55320813ee08..14f0449f5452 100644 --- a/arch/loongarch/kernel/cpu-probe.c +++ b/arch/loongarch/kernel/cpu-probe.c @@ -106,7 +106,6 @@ static void cpu_probe_common(struct cpuinfo_loongarch *c) elf_hwcap |=3D HWCAP_LOONGARCH_CRC32; } =20 - config =3D read_cpucfg(LOONGARCH_CPUCFG2); if (config & CPUCFG2_LAM) { c->options |=3D LOONGARCH_CPU_LAM; @@ -174,6 +173,8 @@ static void cpu_probe_common(struct cpuinfo_loongarch *c) c->options |=3D LOONGARCH_CPU_FLATMODE; if (config & IOCSRF_EIODECODE) c->options |=3D LOONGARCH_CPU_EIODECODE; + if (config & IOCSRF_AVEC) + c->options |=3D LOONGARCH_CPU_AVECINT; if (config & IOCSRF_VM) c->options |=3D LOONGARCH_CPU_HYPERVISOR; =20 diff --git a/arch/loongarch/kernel/irq.c b/arch/loongarch/kernel/irq.c index f4991c03514f..414f5249d70a 100644 --- a/arch/loongarch/kernel/irq.c +++ b/arch/loongarch/kernel/irq.c @@ -87,6 +87,18 @@ static void __init init_vec_parent_group(void) acpi_table_parse(ACPI_SIG_MCFG, early_pci_mcfg_parse); } =20 +int __init arch_probe_nr_irqs(void) +{ + int nr_io_pics =3D bitmap_weight(loongson_sysconf.cores_io_master, NR_CPUS); + + if (!cpu_has_avecint) + nr_irqs =3D (64 + NR_VECTORS * nr_io_pics); + else + nr_irqs =3D (64 + NR_VECTORS * (nr_cpu_ids + nr_io_pics)); + + return NR_IRQS_LEGACY; +} + void __init init_IRQ(void) { int i; diff --git a/arch/loongarch/kernel/paravirt.c b/arch/loongarch/kernel/paravir= t.c index 9c9b75b76f62..4d736a4e488d 100644 --- a/arch/loongarch/kernel/paravirt.c +++ b/arch/loongarch/kernel/paravirt.c @@ -134,6 +134,11 @@ static irqreturn_t pv_ipi_interrupt(int irq, void *dev) info->ipi_irqs[IPI_IRQ_WORK]++; } =20 + if (action & SMP_CLEAR_VECTOR) { + complete_irq_moving(); + info->ipi_irqs[IPI_CLEAR_VECTOR]++; + } + return IRQ_HANDLED; } =20 diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c index ca405ab86aae..4adbbef3450a 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -72,6 +72,7 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = =3D { [IPI_RESCHEDULE] =3D "Rescheduling interrupts", [IPI_CALL_FUNCTION] =3D "Function call interrupts", [IPI_IRQ_WORK] =3D "IRQ work interrupts", + [IPI_CLEAR_VECTOR] =3D "Clear vector interrupts", }; =20 void show_ipi_list(struct seq_file *p, int prec) @@ -248,6 +249,11 @@ static irqreturn_t loongson_ipi_interrupt(int irq, void = *dev) per_cpu(irq_stat, cpu).ipi_irqs[IPI_IRQ_WORK]++; } =20 + if (action & SMP_CLEAR_VECTOR) { + complete_irq_moving(); + per_cpu(irq_stat, cpu).ipi_irqs[IPI_CLEAR_VECTOR]++; + } + return IRQ_HANDLED; } =20 diff --git a/block/blk-mq.c b/block/blk-mq.c index e3c3c0c21b55..aa28157b1aaf 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1128,7 +1128,7 @@ static void blk_complete_reqs(struct llist_head *list) rq->q->mq_ops->complete(rq); } =20 -static __latent_entropy void blk_done_softirq(struct softirq_action *h) +static __latent_entropy void blk_done_softirq(void) { blk_complete_reqs(this_cpu_ptr(&blk_cpu_done)); } diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index d078bdc48c38..341cd9ca5a05 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -685,6 +685,7 @@ config LOONGSON_PCH_MSI depends on PCI default MACH_LOONGSON64 select IRQ_DOMAIN_HIERARCHY + select IRQ_MSI_LIB select PCI_MSI help Support for the Loongson PCH MSI Controller. diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 15635812b2d6..e3679ec2b9f7 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -110,7 +110,7 @@ obj-$(CONFIG_LS1X_IRQ) +=3D irq-ls1x.o obj-$(CONFIG_TI_SCI_INTR_IRQCHIP) +=3D irq-ti-sci-intr.o obj-$(CONFIG_TI_SCI_INTA_IRQCHIP) +=3D irq-ti-sci-inta.o obj-$(CONFIG_TI_PRUSS_INTC) +=3D irq-pruss-intc.o -obj-$(CONFIG_IRQ_LOONGARCH_CPU) +=3D irq-loongarch-cpu.o +obj-$(CONFIG_IRQ_LOONGARCH_CPU) +=3D irq-loongarch-cpu.o irq-loongarch-avec= .o obj-$(CONFIG_LOONGSON_LIOINTC) +=3D irq-loongson-liointc.o obj-$(CONFIG_LOONGSON_EIOINTC) +=3D irq-loongson-eiointc.o obj-$(CONFIG_LOONGSON_HTPIC) +=3D irq-loongson-htpic.o diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c index 5c534d9fd2b0..da5250f0155c 100644 --- a/drivers/irqchip/irq-apple-aic.c +++ b/drivers/irqchip/irq-apple-aic.c @@ -234,7 +234,10 @@ enum fiq_hwirq { AIC_NR_FIQ }; =20 +/* True if UNCORE/UNCORE2 and Sn_... IPI registers are present and used (A11= +) */ static DEFINE_STATIC_KEY_TRUE(use_fast_ipi); +/* True if SYS_IMP_APL_IPI_RR_LOCAL_EL1 exists for local fast IPIs (M1+) */ +static DEFINE_STATIC_KEY_TRUE(use_local_fast_ipi); =20 struct aic_info { int version; @@ -252,6 +255,7 @@ struct aic_info { =20 /* Features */ bool fast_ipi; + bool local_fast_ipi; }; =20 static const struct aic_info aic1_info __initconst =3D { @@ -270,17 +274,32 @@ static const struct aic_info aic1_fipi_info __initconst= =3D { .fast_ipi =3D true, }; =20 +static const struct aic_info aic1_local_fipi_info __initconst =3D { + .version =3D 1, + + .event =3D AIC_EVENT, + .target_cpu =3D AIC_TARGET_CPU, + + .fast_ipi =3D true, + .local_fast_ipi =3D true, +}; + static const struct aic_info aic2_info __initconst =3D { .version =3D 2, =20 .irq_cfg =3D AIC2_IRQ_CFG, =20 .fast_ipi =3D true, + .local_fast_ipi =3D true, }; =20 static const struct of_device_id aic_info_match[] =3D { { .compatible =3D "apple,t8103-aic", + .data =3D &aic1_local_fipi_info, + }, + { + .compatible =3D "apple,t8015-aic", .data =3D &aic1_fipi_info, }, { @@ -532,14 +551,9 @@ static void __exception_irq_entry aic_handle_fiq(struct = pt_regs *regs) * we check for everything here, even things we don't support yet. */ =20 - if (read_sysreg_s(SYS_IMP_APL_IPI_SR_EL1) & IPI_SR_PENDING) { - if (static_branch_likely(&use_fast_ipi)) { - aic_handle_ipi(regs); - } else { - pr_err_ratelimited("Fast IPI fired. Acking.\n"); - write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1); - } - } + if (static_branch_likely(&use_fast_ipi) && + (read_sysreg_s(SYS_IMP_APL_IPI_SR_EL1) & IPI_SR_PENDING)) + aic_handle_ipi(regs); =20 if (TIMER_FIRING(read_sysreg(cntp_ctl_el0))) generic_handle_domain_irq(aic_irqc->hw_domain, @@ -574,8 +588,9 @@ static void __exception_irq_entry aic_handle_fiq(struct p= t_regs *regs) AIC_FIQ_HWIRQ(irq)); } =20 - if (FIELD_GET(UPMCR0_IMODE, read_sysreg_s(SYS_IMP_APL_UPMCR0_EL1)) =3D=3D U= PMCR0_IMODE_FIQ && - (read_sysreg_s(SYS_IMP_APL_UPMSR_EL1) & UPMSR_IACT)) { + if (static_branch_likely(&use_fast_ipi) && + (FIELD_GET(UPMCR0_IMODE, read_sysreg_s(SYS_IMP_APL_UPMCR0_EL1)) =3D=3D = UPMCR0_IMODE_FIQ) && + (read_sysreg_s(SYS_IMP_APL_UPMSR_EL1) & UPMSR_IACT)) { /* Same story with uncore PMCs */ pr_err_ratelimited("Uncore PMC FIQ fired. Masking.\n"); sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE, @@ -750,12 +765,12 @@ static void aic_ipi_send_fast(int cpu) u64 cluster =3D MPIDR_CLUSTER(mpidr); u64 idx =3D MPIDR_CPU(mpidr); =20 - if (MPIDR_CLUSTER(my_mpidr) =3D=3D cluster) - write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx), - SYS_IMP_APL_IPI_RR_LOCAL_EL1); - else + if (static_branch_likely(&use_local_fast_ipi) && MPIDR_CLUSTER(my_mpidr) = =3D=3D cluster) { + write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx), SYS_IMP_APL_IPI_RR_LOCAL_EL1); + } else { write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx) | FIELD_PREP(IPI_RR_CLUSTER, cl= uster), SYS_IMP_APL_IPI_RR_GLOBAL_EL1); + } isb(); } =20 @@ -811,7 +826,8 @@ static int aic_init_cpu(unsigned int cpu) /* Mask all hard-wired per-CPU IRQ/FIQ sources */ =20 /* Pending Fast IPI FIQs */ - write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1); + if (static_branch_likely(&use_fast_ipi)) + write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1); =20 /* Timer FIQs */ sysreg_clear_set(cntp_ctl_el0, 0, ARCH_TIMER_CTRL_IT_MASK); @@ -832,8 +848,10 @@ static int aic_init_cpu(unsigned int cpu) FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_OFF)); =20 /* Uncore PMC FIQ */ - sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE, - FIELD_PREP(UPMCR0_IMODE, UPMCR0_IMODE_OFF)); + if (static_branch_likely(&use_fast_ipi)) { + sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE, + FIELD_PREP(UPMCR0_IMODE, UPMCR0_IMODE_OFF)); + } =20 /* Commit all of the above */ isb(); @@ -987,11 +1005,12 @@ static int __init aic_of_ic_init(struct device_node *n= ode, struct device_node *p off +=3D sizeof(u32) * (irqc->max_irq >> 5); /* MASK_CLR */ off +=3D sizeof(u32) * (irqc->max_irq >> 5); /* HW_STATE */ =20 - if (irqc->info.fast_ipi) - static_branch_enable(&use_fast_ipi); - else + if (!irqc->info.fast_ipi) static_branch_disable(&use_fast_ipi); =20 + if (!irqc->info.local_fast_ipi) + static_branch_disable(&use_local_fast_ipi); + irqc->info.die_stride =3D off - start_off; =20 irqc->hw_domain =3D irq_domain_create_tree(of_node_to_fwnode(node), diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada= -370-xp.c index dce2b80bf439..d7c5ef248474 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Armada 370 and Armada XP SoC IRQ handling * @@ -7,13 +8,11 @@ * Gregory CLEMENT * Thomas Petazzoni * Ben Dooks - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. */ =20 +#include #include +#include #include #include #include @@ -66,19 +65,17 @@ * device * * The "global interrupt mask/unmask" is modified using the - * ARMADA_370_XP_INT_SET_ENABLE_OFFS and - * ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS registers, which are relative - * to "main_int_base". + * MPIC_INT_SET_ENABLE and MPIC_INT_CLEAR_ENABLE + * registers, which are relative to "mpic->base". * - * The "per-CPU mask/unmask" is modified using the - * ARMADA_370_XP_INT_SET_MASK_OFFS and - * ARMADA_370_XP_INT_CLEAR_MASK_OFFS registers, which are relative to - * "per_cpu_int_base". This base address points to a special address, + * The "per-CPU mask/unmask" is modified using the MPIC_INT_SET_MASK + * and MPIC_INT_CLEAR_MASK registers, which are relative to + * "mpic->per_cpu". This base address points to a special address, * which automatically accesses the registers of the current CPU. * * The per-CPU mask/unmask can also be adjusted using the global - * per-interrupt ARMADA_370_XP_INT_SOURCE_CTL register, which we use - * to configure interrupt affinity. + * per-interrupt MPIC_INT_SOURCE_CTL register, which we use to + * configure interrupt affinity. * * Due to this model, all interrupts need to be mask/unmasked at two * different levels: at the global level and at the per-CPU level. @@ -92,9 +89,8 @@ * the current CPU, running the ->map() code. This allows to have * the interrupt unmasked at this level in non-SMP * configurations. In SMP configurations, the ->set_affinity() - * callback is called, which using the - * ARMADA_370_XP_INT_SOURCE_CTL() readjusts the per-CPU mask/unmask - * for the interrupt. + * callback is called, which using the MPIC_INT_SOURCE_CTL() + * readjusts the per-CPU mask/unmask for the interrupt. * * The ->mask() and ->unmask() operations only mask/unmask the * interrupt at the "global" level. @@ -116,58 +112,84 @@ * at the per-CPU level. */ =20 -/* Registers relative to main_int_base */ -#define ARMADA_370_XP_INT_CONTROL (0x00) -#define ARMADA_370_XP_SW_TRIG_INT_OFFS (0x04) -#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30) -#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) -#define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4) -#define ARMADA_370_XP_INT_SOURCE_CPU_MASK 0xF -#define ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid) ((BIT(0) | BIT(8)) << cpuid) - -/* Registers relative to per_cpu_int_base */ -#define ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS (0x08) -#define ARMADA_370_XP_IN_DRBEL_MSK_OFFS (0x0c) -#define ARMADA_375_PPI_CAUSE (0x10) -#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) -#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48) -#define ARMADA_370_XP_INT_CLEAR_MASK_OFFS (0x4C) -#define ARMADA_370_XP_INT_FABRIC_MASK_OFFS (0x54) -#define ARMADA_370_XP_INT_CAUSE_PERF(cpu) (1 << cpu) - -#define ARMADA_370_XP_MAX_PER_CPU_IRQS (28) +/* Registers relative to mpic->base */ +#define MPIC_INT_CONTROL 0x00 +#define MPIC_INT_CONTROL_NUMINT_MASK GENMASK(12, 2) +#define MPIC_SW_TRIG_INT 0x04 +#define MPIC_INT_SET_ENABLE 0x30 +#define MPIC_INT_CLEAR_ENABLE 0x34 +#define MPIC_INT_SOURCE_CTL(hwirq) (0x100 + (hwirq) * 4) +#define MPIC_INT_SOURCE_CPU_MASK GENMASK(3, 0) +#define MPIC_INT_IRQ_FIQ_MASK(cpuid) ((BIT(0) | BIT(8)) << (cpuid)) + +/* Registers relative to mpic->per_cpu */ +#define MPIC_IN_DRBEL_CAUSE 0x08 +#define MPIC_IN_DRBEL_MASK 0x0c +#define MPIC_PPI_CAUSE 0x10 +#define MPIC_CPU_INTACK 0x44 +#define MPIC_CPU_INTACK_IID_MASK GENMASK(9, 0) +#define MPIC_INT_SET_MASK 0x48 +#define MPIC_INT_CLEAR_MASK 0x4C +#define MPIC_INT_FABRIC_MASK 0x54 +#define MPIC_INT_CAUSE_PERF(cpu) BIT(cpu) + +#define MPIC_PER_CPU_IRQS_NR 29 =20 /* IPI and MSI interrupt definitions for IPI platforms */ -#define IPI_DOORBELL_START (0) -#define IPI_DOORBELL_END (8) -#define IPI_DOORBELL_MASK 0xFF -#define PCI_MSI_DOORBELL_START (16) -#define PCI_MSI_DOORBELL_NR (16) -#define PCI_MSI_DOORBELL_END (32) -#define PCI_MSI_DOORBELL_MASK 0xFFFF0000 +#define IPI_DOORBELL_NR 8 +#define IPI_DOORBELL_MASK GENMASK(7, 0) +#define PCI_MSI_DOORBELL_START 16 +#define PCI_MSI_DOORBELL_NR 16 +#define PCI_MSI_DOORBELL_MASK GENMASK(31, 16) =20 /* MSI interrupt definitions for non-IPI platforms */ #define PCI_MSI_FULL_DOORBELL_START 0 #define PCI_MSI_FULL_DOORBELL_NR 32 -#define PCI_MSI_FULL_DOORBELL_END 32 #define PCI_MSI_FULL_DOORBELL_MASK GENMASK(31, 0) #define PCI_MSI_FULL_DOORBELL_SRC0_MASK GENMASK(15, 0) #define PCI_MSI_FULL_DOORBELL_SRC1_MASK GENMASK(31, 16) =20 -static void __iomem *per_cpu_int_base; -static void __iomem *main_int_base; -static struct irq_domain *armada_370_xp_mpic_domain; -static u32 doorbell_mask_reg; -static int parent_irq; +/** + * struct mpic - MPIC private data structure + * @base: MPIC registers base address + * @per_cpu: per-CPU registers base address + * @parent_irq: parent IRQ if MPIC is not top-level interrupt controller + * @domain: MPIC main interrupt domain + * @ipi_domain: IPI domain + * @msi_domain: MSI domain + * @msi_inner_domain: MSI inner domain + * @msi_used: bitmap of used MSI numbers + * @msi_lock: mutex serializing access to @msi_used + * @msi_doorbell_addr: physical address of MSI doorbell register + * @msi_doorbell_mask: mask of available doorbell bits for MSIs (either PCI_= MSI_DOORBELL_MASK or + * PCI_MSI_FULL_DOORBELL_MASK) + * @msi_doorbell_start: first set bit in @msi_doorbell_mask + * @msi_doorbell_size: number of set bits in @msi_doorbell_mask + * @doorbell_mask: doorbell mask of MSIs and IPIs, stored on suspend, restor= ed on resume + */ +struct mpic { + void __iomem *base; + void __iomem *per_cpu; + int parent_irq; + struct irq_domain *domain; +#ifdef CONFIG_SMP + struct irq_domain *ipi_domain; +#endif #ifdef CONFIG_PCI_MSI -static struct irq_domain *armada_370_xp_msi_domain; -static struct irq_domain *armada_370_xp_msi_inner_domain; -static DECLARE_BITMAP(msi_used, PCI_MSI_FULL_DOORBELL_NR); -static DEFINE_MUTEX(msi_used_lock); -static phys_addr_t msi_doorbell_addr; + struct irq_domain *msi_domain; + struct irq_domain *msi_inner_domain; + DECLARE_BITMAP(msi_used, PCI_MSI_FULL_DOORBELL_NR); + struct mutex msi_lock; + phys_addr_t msi_doorbell_addr; + u32 msi_doorbell_mask; + unsigned int msi_doorbell_start, msi_doorbell_size; #endif + u32 doorbell_mask; +}; + +static struct mpic *mpic_data __ro_after_init; =20 -static inline bool is_ipi_available(void) +static inline bool mpic_is_ipi_available(struct mpic *mpic) { /* * We distinguish IPI availability in the IC by the IC not having a @@ -175,39 +197,12 @@ static inline bool is_ipi_available(void) * interrupt controller (e.g. GIC) that takes care of inter-processor * interrupts. */ - return parent_irq <=3D 0; -} - -static inline u32 msi_doorbell_mask(void) -{ - return is_ipi_available() ? PCI_MSI_DOORBELL_MASK : - PCI_MSI_FULL_DOORBELL_MASK; -} - -static inline unsigned int msi_doorbell_start(void) -{ - return is_ipi_available() ? PCI_MSI_DOORBELL_START : - PCI_MSI_FULL_DOORBELL_START; + return mpic->parent_irq <=3D 0; } =20 -static inline unsigned int msi_doorbell_size(void) +static inline bool mpic_is_percpu_irq(irq_hw_number_t hwirq) { - return is_ipi_available() ? PCI_MSI_DOORBELL_NR : - PCI_MSI_FULL_DOORBELL_NR; -} - -static inline unsigned int msi_doorbell_end(void) -{ - return is_ipi_available() ? PCI_MSI_DOORBELL_END : - PCI_MSI_FULL_DOORBELL_END; -} - -static inline bool is_percpu_irq(irq_hw_number_t irq) -{ - if (irq <=3D ARMADA_370_XP_MAX_PER_CPU_IRQS) - return true; - - return false; + return hwirq < MPIC_PER_CPU_IRQS_NR; } =20 /* @@ -215,55 +210,53 @@ static inline bool is_percpu_irq(irq_hw_number_t irq) * For shared global interrupts, mask/unmask global enable bit * For CPU interrupts, mask/unmask the calling CPU's bit */ -static void armada_370_xp_irq_mask(struct irq_data *d) +static void mpic_irq_mask(struct irq_data *d) { + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); irq_hw_number_t hwirq =3D irqd_to_hwirq(d); =20 - if (!is_percpu_irq(hwirq)) - writel(hwirq, main_int_base + - ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS); + if (!mpic_is_percpu_irq(hwirq)) + writel(hwirq, mpic->base + MPIC_INT_CLEAR_ENABLE); else - writel(hwirq, per_cpu_int_base + - ARMADA_370_XP_INT_SET_MASK_OFFS); + writel(hwirq, mpic->per_cpu + MPIC_INT_SET_MASK); } =20 -static void armada_370_xp_irq_unmask(struct irq_data *d) +static void mpic_irq_unmask(struct irq_data *d) { + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); irq_hw_number_t hwirq =3D irqd_to_hwirq(d); =20 - if (!is_percpu_irq(hwirq)) - writel(hwirq, main_int_base + - ARMADA_370_XP_INT_SET_ENABLE_OFFS); + if (!mpic_is_percpu_irq(hwirq)) + writel(hwirq, mpic->base + MPIC_INT_SET_ENABLE); else - writel(hwirq, per_cpu_int_base + - ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + writel(hwirq, mpic->per_cpu + MPIC_INT_CLEAR_MASK); } =20 #ifdef CONFIG_PCI_MSI =20 -static struct irq_chip armada_370_xp_msi_irq_chip =3D { - .name =3D "MPIC MSI", - .irq_mask =3D pci_msi_mask_irq, - .irq_unmask =3D pci_msi_unmask_irq, +static struct irq_chip mpic_msi_irq_chip =3D { + .name =3D "MPIC MSI", + .irq_mask =3D pci_msi_mask_irq, + .irq_unmask =3D pci_msi_unmask_irq, }; =20 -static struct msi_domain_info armada_370_xp_msi_domain_info =3D { +static struct msi_domain_info mpic_msi_domain_info =3D { .flags =3D (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX), - .chip =3D &armada_370_xp_msi_irq_chip, + .chip =3D &mpic_msi_irq_chip, }; =20 -static void armada_370_xp_compose_msi_msg(struct irq_data *data, struct msi_= msg *msg) +static void mpic_compose_msi_msg(struct irq_data *d, struct msi_msg *msg) { - unsigned int cpu =3D cpumask_first(irq_data_get_effective_affinity_mask(dat= a)); + unsigned int cpu =3D cpumask_first(irq_data_get_effective_affinity_mask(d)); + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); =20 - msg->address_lo =3D lower_32_bits(msi_doorbell_addr); - msg->address_hi =3D upper_32_bits(msi_doorbell_addr); - msg->data =3D BIT(cpu + 8) | (data->hwirq + msi_doorbell_start()); + msg->address_lo =3D lower_32_bits(mpic->msi_doorbell_addr); + msg->address_hi =3D upper_32_bits(mpic->msi_doorbell_addr); + msg->data =3D BIT(cpu + 8) | (d->hwirq + mpic->msi_doorbell_start); } =20 -static int armada_370_xp_msi_set_affinity(struct irq_data *irq_data, - const struct cpumask *mask, bool force) +static int mpic_msi_set_affinity(struct irq_data *d, const struct cpumask *m= ask, bool force) { unsigned int cpu; =20 @@ -275,33 +268,34 @@ static int armada_370_xp_msi_set_affinity(struct irq_da= ta *irq_data, if (cpu >=3D nr_cpu_ids) return -EINVAL; =20 - irq_data_update_effective_affinity(irq_data, cpumask_of(cpu)); + irq_data_update_effective_affinity(d, cpumask_of(cpu)); =20 return IRQ_SET_MASK_OK; } =20 -static struct irq_chip armada_370_xp_msi_bottom_irq_chip =3D { +static struct irq_chip mpic_msi_bottom_irq_chip =3D { .name =3D "MPIC MSI", - .irq_compose_msi_msg =3D armada_370_xp_compose_msi_msg, - .irq_set_affinity =3D armada_370_xp_msi_set_affinity, + .irq_compose_msi_msg =3D mpic_compose_msi_msg, + .irq_set_affinity =3D mpic_msi_set_affinity, }; =20 -static int armada_370_xp_msi_alloc(struct irq_domain *domain, unsigned int v= irq, - unsigned int nr_irqs, void *args) +static int mpic_msi_alloc(struct irq_domain *domain, unsigned int virq, unsi= gned int nr_irqs, + void *args) { - int hwirq, i; + struct mpic *mpic =3D domain->host_data; + int hwirq; =20 - mutex_lock(&msi_used_lock); - hwirq =3D bitmap_find_free_region(msi_used, msi_doorbell_size(), + mutex_lock(&mpic->msi_lock); + hwirq =3D bitmap_find_free_region(mpic->msi_used, mpic->msi_doorbell_size, order_base_2(nr_irqs)); - mutex_unlock(&msi_used_lock); + mutex_unlock(&mpic->msi_lock); =20 if (hwirq < 0) return -ENOSPC; =20 - for (i =3D 0; i < nr_irqs; i++) { + for (unsigned int i =3D 0; i < nr_irqs; i++) { irq_domain_set_info(domain, virq + i, hwirq + i, - &armada_370_xp_msi_bottom_irq_chip, + &mpic_msi_bottom_irq_chip, domain->host_data, handle_simple_irq, NULL, NULL); } @@ -309,76 +303,84 @@ static int armada_370_xp_msi_alloc(struct irq_domain *d= omain, unsigned int virq, return 0; } =20 -static void armada_370_xp_msi_free(struct irq_domain *domain, - unsigned int virq, unsigned int nr_irqs) +static void mpic_msi_free(struct irq_domain *domain, unsigned int virq, unsi= gned int nr_irqs) { struct irq_data *d =3D irq_domain_get_irq_data(domain, virq); + struct mpic *mpic =3D domain->host_data; =20 - mutex_lock(&msi_used_lock); - bitmap_release_region(msi_used, d->hwirq, order_base_2(nr_irqs)); - mutex_unlock(&msi_used_lock); + mutex_lock(&mpic->msi_lock); + bitmap_release_region(mpic->msi_used, d->hwirq, order_base_2(nr_irqs)); + mutex_unlock(&mpic->msi_lock); } =20 -static const struct irq_domain_ops armada_370_xp_msi_domain_ops =3D { - .alloc =3D armada_370_xp_msi_alloc, - .free =3D armada_370_xp_msi_free, +static const struct irq_domain_ops mpic_msi_domain_ops =3D { + .alloc =3D mpic_msi_alloc, + .free =3D mpic_msi_free, }; =20 -static void armada_370_xp_msi_reenable_percpu(void) +static void mpic_msi_reenable_percpu(struct mpic *mpic) { u32 reg; =20 /* Enable MSI doorbell mask and combined cpu local interrupt */ - reg =3D readl(per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); - reg |=3D msi_doorbell_mask(); - writel(reg, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + reg =3D readl(mpic->per_cpu + MPIC_IN_DRBEL_MASK); + reg |=3D mpic->msi_doorbell_mask; + writel(reg, mpic->per_cpu + MPIC_IN_DRBEL_MASK); =20 /* Unmask local doorbell interrupt */ - writel(1, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + writel(1, mpic->per_cpu + MPIC_INT_CLEAR_MASK); } =20 -static int armada_370_xp_msi_init(struct device_node *node, - phys_addr_t main_int_phys_base) +static int __init mpic_msi_init(struct mpic *mpic, struct device_node *node, + phys_addr_t main_int_phys_base) { - msi_doorbell_addr =3D main_int_phys_base + - ARMADA_370_XP_SW_TRIG_INT_OFFS; + mpic->msi_doorbell_addr =3D main_int_phys_base + MPIC_SW_TRIG_INT; + + mutex_init(&mpic->msi_lock); + + if (mpic_is_ipi_available(mpic)) { + mpic->msi_doorbell_start =3D PCI_MSI_DOORBELL_START; + mpic->msi_doorbell_size =3D PCI_MSI_DOORBELL_NR; + mpic->msi_doorbell_mask =3D PCI_MSI_DOORBELL_MASK; + } else { + mpic->msi_doorbell_start =3D PCI_MSI_FULL_DOORBELL_START; + mpic->msi_doorbell_size =3D PCI_MSI_FULL_DOORBELL_NR; + mpic->msi_doorbell_mask =3D PCI_MSI_FULL_DOORBELL_MASK; + } =20 - armada_370_xp_msi_inner_domain =3D - irq_domain_add_linear(NULL, msi_doorbell_size(), - &armada_370_xp_msi_domain_ops, NULL); - if (!armada_370_xp_msi_inner_domain) + mpic->msi_inner_domain =3D irq_domain_add_linear(NULL, mpic->msi_doorbell_s= ize, + &mpic_msi_domain_ops, mpic); + if (!mpic->msi_inner_domain) return -ENOMEM; =20 - armada_370_xp_msi_domain =3D - pci_msi_create_irq_domain(of_node_to_fwnode(node), - &armada_370_xp_msi_domain_info, - armada_370_xp_msi_inner_domain); - if (!armada_370_xp_msi_domain) { - irq_domain_remove(armada_370_xp_msi_inner_domain); + mpic->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(node), &mp= ic_msi_domain_info, + mpic->msi_inner_domain); + if (!mpic->msi_domain) { + irq_domain_remove(mpic->msi_inner_domain); return -ENOMEM; } =20 - armada_370_xp_msi_reenable_percpu(); + mpic_msi_reenable_percpu(mpic); =20 /* Unmask low 16 MSI irqs on non-IPI platforms */ - if (!is_ipi_available()) - writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + if (!mpic_is_ipi_available(mpic)) + writel(0, mpic->per_cpu + MPIC_INT_CLEAR_MASK); =20 return 0; } #else -static __maybe_unused void armada_370_xp_msi_reenable_percpu(void) {} +static __maybe_unused void mpic_msi_reenable_percpu(struct mpic *mpic) {} =20 -static inline int armada_370_xp_msi_init(struct device_node *node, - phys_addr_t main_int_phys_base) +static inline int mpic_msi_init(struct mpic *mpic, struct device_node *node, + phys_addr_t main_int_phys_base) { return 0; } #endif =20 -static void armada_xp_mpic_perf_init(void) +static void mpic_perf_init(struct mpic *mpic) { - unsigned long cpuid; + u32 cpuid; =20 /* * This Performance Counter Overflow interrupt is specific for @@ -390,38 +392,39 @@ static void armada_xp_mpic_perf_init(void) cpuid =3D cpu_logical_map(smp_processor_id()); =20 /* Enable Performance Counter Overflow interrupts */ - writel(ARMADA_370_XP_INT_CAUSE_PERF(cpuid), - per_cpu_int_base + ARMADA_370_XP_INT_FABRIC_MASK_OFFS); + writel(MPIC_INT_CAUSE_PERF(cpuid), mpic->per_cpu + MPIC_INT_FABRIC_MASK); } =20 #ifdef CONFIG_SMP -static struct irq_domain *ipi_domain; - -static void armada_370_xp_ipi_mask(struct irq_data *d) +static void mpic_ipi_mask(struct irq_data *d) { + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); u32 reg; - reg =3D readl(per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + + reg =3D readl(mpic->per_cpu + MPIC_IN_DRBEL_MASK); reg &=3D ~BIT(d->hwirq); - writel(reg, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + writel(reg, mpic->per_cpu + MPIC_IN_DRBEL_MASK); } =20 -static void armada_370_xp_ipi_unmask(struct irq_data *d) +static void mpic_ipi_unmask(struct irq_data *d) { + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); u32 reg; - reg =3D readl(per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + + reg =3D readl(mpic->per_cpu + MPIC_IN_DRBEL_MASK); reg |=3D BIT(d->hwirq); - writel(reg, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + writel(reg, mpic->per_cpu + MPIC_IN_DRBEL_MASK); } =20 -static void armada_370_xp_ipi_send_mask(struct irq_data *d, - const struct cpumask *mask) +static void mpic_ipi_send_mask(struct irq_data *d, const struct cpumask *mas= k) { - unsigned long map =3D 0; - int cpu; + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); + unsigned int cpu; + u32 map =3D 0; =20 /* Convert our logical CPU mask into a physical one. */ for_each_cpu(cpu, mask) - map |=3D 1 << cpu_logical_map(cpu); + map |=3D BIT(cpu_logical_map(cpu)); =20 /* * Ensure that stores to Normal memory are visible to the @@ -430,451 +433,465 @@ static void armada_370_xp_ipi_send_mask(struct irq_da= ta *d, dsb(); =20 /* submit softirq */ - writel((map << 8) | d->hwirq, main_int_base + - ARMADA_370_XP_SW_TRIG_INT_OFFS); + writel((map << 8) | d->hwirq, mpic->base + MPIC_SW_TRIG_INT); } =20 -static void armada_370_xp_ipi_ack(struct irq_data *d) +static void mpic_ipi_ack(struct irq_data *d) { - writel(~BIT(d->hwirq), per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS= ); + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); + + writel(~BIT(d->hwirq), mpic->per_cpu + MPIC_IN_DRBEL_CAUSE); } =20 -static struct irq_chip ipi_irqchip =3D { +static struct irq_chip mpic_ipi_irqchip =3D { .name =3D "IPI", - .irq_ack =3D armada_370_xp_ipi_ack, - .irq_mask =3D armada_370_xp_ipi_mask, - .irq_unmask =3D armada_370_xp_ipi_unmask, - .ipi_send_mask =3D armada_370_xp_ipi_send_mask, + .irq_ack =3D mpic_ipi_ack, + .irq_mask =3D mpic_ipi_mask, + .irq_unmask =3D mpic_ipi_unmask, + .ipi_send_mask =3D mpic_ipi_send_mask, }; =20 -static int armada_370_xp_ipi_alloc(struct irq_domain *d, - unsigned int virq, - unsigned int nr_irqs, void *args) +static int mpic_ipi_alloc(struct irq_domain *d, unsigned int virq, + unsigned int nr_irqs, void *args) { - int i; - - for (i =3D 0; i < nr_irqs; i++) { + for (unsigned int i =3D 0; i < nr_irqs; i++) { irq_set_percpu_devid(virq + i); - irq_domain_set_info(d, virq + i, i, &ipi_irqchip, - d->host_data, - handle_percpu_devid_irq, - NULL, NULL); + irq_domain_set_info(d, virq + i, i, &mpic_ipi_irqchip, d->host_data, + handle_percpu_devid_irq, NULL, NULL); } =20 return 0; } =20 -static void armada_370_xp_ipi_free(struct irq_domain *d, - unsigned int virq, - unsigned int nr_irqs) +static void mpic_ipi_free(struct irq_domain *d, unsigned int virq, + unsigned int nr_irqs) { /* Not freeing IPIs */ } =20 -static const struct irq_domain_ops ipi_domain_ops =3D { - .alloc =3D armada_370_xp_ipi_alloc, - .free =3D armada_370_xp_ipi_free, +static const struct irq_domain_ops mpic_ipi_domain_ops =3D { + .alloc =3D mpic_ipi_alloc, + .free =3D mpic_ipi_free, }; =20 -static void ipi_resume(void) +static void mpic_ipi_resume(struct mpic *mpic) { - int i; - - for (i =3D 0; i < IPI_DOORBELL_END; i++) { - int irq; + for (irq_hw_number_t i =3D 0; i < IPI_DOORBELL_NR; i++) { + unsigned int virq =3D irq_find_mapping(mpic->ipi_domain, i); + struct irq_data *d; =20 - irq =3D irq_find_mapping(ipi_domain, i); - if (irq <=3D 0) + if (!virq || !irq_percpu_is_enabled(virq)) continue; - if (irq_percpu_is_enabled(irq)) { - struct irq_data *d; - d =3D irq_domain_get_irq_data(ipi_domain, irq); - armada_370_xp_ipi_unmask(d); - } + + d =3D irq_domain_get_irq_data(mpic->ipi_domain, virq); + mpic_ipi_unmask(d); } } =20 -static __init void armada_xp_ipi_init(struct device_node *node) +static int __init mpic_ipi_init(struct mpic *mpic, struct device_node *node) { int base_ipi; =20 - ipi_domain =3D irq_domain_create_linear(of_node_to_fwnode(node), - IPI_DOORBELL_END, - &ipi_domain_ops, NULL); - if (WARN_ON(!ipi_domain)) - return; + mpic->ipi_domain =3D irq_domain_create_linear(of_node_to_fwnode(node), IPI_= DOORBELL_NR, + &mpic_ipi_domain_ops, mpic); + if (WARN_ON(!mpic->ipi_domain)) + return -ENOMEM; =20 - irq_domain_update_bus_token(ipi_domain, DOMAIN_BUS_IPI); - base_ipi =3D irq_domain_alloc_irqs(ipi_domain, IPI_DOORBELL_END, NUMA_NO_NO= DE, NULL); + irq_domain_update_bus_token(mpic->ipi_domain, DOMAIN_BUS_IPI); + base_ipi =3D irq_domain_alloc_irqs(mpic->ipi_domain, IPI_DOORBELL_NR, NUMA_= NO_NODE, NULL); if (WARN_ON(!base_ipi)) - return; + return -ENOMEM; + + set_smp_ipi_range(base_ipi, IPI_DOORBELL_NR); =20 - set_smp_ipi_range(base_ipi, IPI_DOORBELL_END); + return 0; } =20 -static int armada_xp_set_affinity(struct irq_data *d, - const struct cpumask *mask_val, bool force) +static int mpic_set_affinity(struct irq_data *d, const struct cpumask *mask_= val, bool force) { + struct mpic *mpic =3D irq_data_get_irq_chip_data(d); irq_hw_number_t hwirq =3D irqd_to_hwirq(d); - int cpu; + unsigned int cpu; =20 /* Select a single core from the affinity mask which is online */ cpu =3D cpumask_any_and(mask_val, cpu_online_mask); =20 - atomic_io_modify(main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq), - ARMADA_370_XP_INT_SOURCE_CPU_MASK, - BIT(cpu_logical_map(cpu))); + atomic_io_modify(mpic->base + MPIC_INT_SOURCE_CTL(hwirq), + MPIC_INT_SOURCE_CPU_MASK, BIT(cpu_logical_map(cpu))); =20 irq_data_update_effective_affinity(d, cpumask_of(cpu)); =20 return IRQ_SET_MASK_OK; } =20 -static void armada_xp_mpic_smp_cpu_init(void) +static void mpic_smp_cpu_init(struct mpic *mpic) { - u32 control; - int nr_irqs, i; - - control =3D readl(main_int_base + ARMADA_370_XP_INT_CONTROL); - nr_irqs =3D (control >> 2) & 0x3ff; + for (irq_hw_number_t i =3D 0; i < mpic->domain->hwirq_max; i++) + writel(i, mpic->per_cpu + MPIC_INT_SET_MASK); =20 - for (i =3D 0; i < nr_irqs; i++) - writel(i, per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS); - - if (!is_ipi_available()) + if (!mpic_is_ipi_available(mpic)) return; =20 /* Disable all IPIs */ - writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + writel(0, mpic->per_cpu + MPIC_IN_DRBEL_MASK); =20 /* Clear pending IPIs */ - writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); + writel(0, mpic->per_cpu + MPIC_IN_DRBEL_CAUSE); =20 /* Unmask IPI interrupt */ - writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + writel(0, mpic->per_cpu + MPIC_INT_CLEAR_MASK); } =20 -static void armada_xp_mpic_reenable_percpu(void) +static void mpic_reenable_percpu(struct mpic *mpic) { - unsigned int irq; - /* Re-enable per-CPU interrupts that were enabled before suspend */ - for (irq =3D 0; irq < ARMADA_370_XP_MAX_PER_CPU_IRQS; irq++) { - struct irq_data *data; - int virq; - - virq =3D irq_linear_revmap(armada_370_xp_mpic_domain, irq); - if (virq =3D=3D 0) - continue; - - data =3D irq_get_irq_data(virq); + for (irq_hw_number_t i =3D 0; i < MPIC_PER_CPU_IRQS_NR; i++) { + unsigned int virq =3D irq_linear_revmap(mpic->domain, i); + struct irq_data *d; =20 - if (!irq_percpu_is_enabled(virq)) + if (!virq || !irq_percpu_is_enabled(virq)) continue; =20 - armada_370_xp_irq_unmask(data); + d =3D irq_get_irq_data(virq); + mpic_irq_unmask(d); } =20 - if (is_ipi_available()) - ipi_resume(); + if (mpic_is_ipi_available(mpic)) + mpic_ipi_resume(mpic); =20 - armada_370_xp_msi_reenable_percpu(); + mpic_msi_reenable_percpu(mpic); } =20 -static int armada_xp_mpic_starting_cpu(unsigned int cpu) +static int mpic_starting_cpu(unsigned int cpu) { - armada_xp_mpic_perf_init(); - armada_xp_mpic_smp_cpu_init(); - armada_xp_mpic_reenable_percpu(); + struct mpic *mpic =3D irq_get_default_host()->host_data; + + mpic_perf_init(mpic); + mpic_smp_cpu_init(mpic); + mpic_reenable_percpu(mpic); + return 0; } =20 static int mpic_cascaded_starting_cpu(unsigned int cpu) { - armada_xp_mpic_perf_init(); - armada_xp_mpic_reenable_percpu(); - enable_percpu_irq(parent_irq, IRQ_TYPE_NONE); + struct mpic *mpic =3D mpic_data; + + mpic_perf_init(mpic); + mpic_reenable_percpu(mpic); + enable_percpu_irq(mpic->parent_irq, IRQ_TYPE_NONE); + return 0; } #else -static void armada_xp_mpic_smp_cpu_init(void) {} -static void ipi_resume(void) {} +static void mpic_smp_cpu_init(struct mpic *mpic) {} +static void mpic_ipi_resume(struct mpic *mpic) {} #endif =20 -static struct irq_chip armada_370_xp_irq_chip =3D { +static struct irq_chip mpic_irq_chip =3D { .name =3D "MPIC", - .irq_mask =3D armada_370_xp_irq_mask, - .irq_mask_ack =3D armada_370_xp_irq_mask, - .irq_unmask =3D armada_370_xp_irq_unmask, + .irq_mask =3D mpic_irq_mask, + .irq_mask_ack =3D mpic_irq_mask, + .irq_unmask =3D mpic_irq_unmask, #ifdef CONFIG_SMP - .irq_set_affinity =3D armada_xp_set_affinity, + .irq_set_affinity =3D mpic_set_affinity, #endif .flags =3D IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND, }; =20 -static int armada_370_xp_mpic_irq_map(struct irq_domain *h, - unsigned int virq, irq_hw_number_t hw) +static int mpic_irq_map(struct irq_domain *domain, unsigned int virq, irq_hw= _number_t hwirq) { + struct mpic *mpic =3D domain->host_data; + /* IRQs 0 and 1 cannot be mapped, they are handled internally */ - if (hw <=3D 1) + if (hwirq <=3D 1) return -EINVAL; =20 - armada_370_xp_irq_mask(irq_get_irq_data(virq)); - if (!is_percpu_irq(hw)) - writel(hw, per_cpu_int_base + - ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + irq_set_chip_data(virq, mpic); + + mpic_irq_mask(irq_get_irq_data(virq)); + if (!mpic_is_percpu_irq(hwirq)) + writel(hwirq, mpic->per_cpu + MPIC_INT_CLEAR_MASK); else - writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); + writel(hwirq, mpic->base + MPIC_INT_SET_ENABLE); irq_set_status_flags(virq, IRQ_LEVEL); =20 - if (is_percpu_irq(hw)) { + if (mpic_is_percpu_irq(hwirq)) { irq_set_percpu_devid(virq); - irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, - handle_percpu_devid_irq); + irq_set_chip_and_handler(virq, &mpic_irq_chip, handle_percpu_devid_irq); } else { - irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, - handle_level_irq); + irq_set_chip_and_handler(virq, &mpic_irq_chip, handle_level_irq); irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq))); } irq_set_probe(virq); - return 0; } =20 -static const struct irq_domain_ops armada_370_xp_mpic_irq_ops =3D { - .map =3D armada_370_xp_mpic_irq_map, - .xlate =3D irq_domain_xlate_onecell, +static const struct irq_domain_ops mpic_irq_ops =3D { + .map =3D mpic_irq_map, + .xlate =3D irq_domain_xlate_onecell, }; =20 #ifdef CONFIG_PCI_MSI -static void armada_370_xp_handle_msi_irq(struct pt_regs *regs, bool is_chain= ed) +static void mpic_handle_msi_irq(struct mpic *mpic) { - u32 msimask, msinr; - - msimask =3D readl_relaxed(per_cpu_int_base + - ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); - msimask &=3D msi_doorbell_mask(); + unsigned long cause; + unsigned int i; =20 - writel(~msimask, per_cpu_int_base + - ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); + cause =3D readl_relaxed(mpic->per_cpu + MPIC_IN_DRBEL_CAUSE); + cause &=3D mpic->msi_doorbell_mask; + writel(~cause, mpic->per_cpu + MPIC_IN_DRBEL_CAUSE); =20 - for (msinr =3D msi_doorbell_start(); - msinr < msi_doorbell_end(); msinr++) { - unsigned int irq; + for_each_set_bit(i, &cause, BITS_PER_LONG) + generic_handle_domain_irq(mpic->msi_inner_domain, i - mpic->msi_doorbell_s= tart); +} +#else +static void mpic_handle_msi_irq(struct mpic *mpic) {} +#endif =20 - if (!(msimask & BIT(msinr))) - continue; +#ifdef CONFIG_SMP +static void mpic_handle_ipi_irq(struct mpic *mpic) +{ + unsigned long cause; + irq_hw_number_t i; =20 - irq =3D msinr - msi_doorbell_start(); + cause =3D readl_relaxed(mpic->per_cpu + MPIC_IN_DRBEL_CAUSE); + cause &=3D IPI_DOORBELL_MASK; =20 - generic_handle_domain_irq(armada_370_xp_msi_inner_domain, irq); - } + for_each_set_bit(i, &cause, IPI_DOORBELL_NR) + generic_handle_domain_irq(mpic->ipi_domain, i); } #else -static void armada_370_xp_handle_msi_irq(struct pt_regs *r, bool b) {} +static inline void mpic_handle_ipi_irq(struct mpic *mpic) {} #endif =20 -static void armada_370_xp_mpic_handle_cascade_irq(struct irq_desc *desc) +static void mpic_handle_cascade_irq(struct irq_desc *desc) { + struct mpic *mpic =3D irq_desc_get_handler_data(desc); struct irq_chip *chip =3D irq_desc_get_chip(desc); - unsigned long irqmap, irqn, irqsrc, cpuid; + unsigned long cause; + u32 irqsrc, cpuid; + irq_hw_number_t i; =20 chained_irq_enter(chip, desc); =20 - irqmap =3D readl_relaxed(per_cpu_int_base + ARMADA_375_PPI_CAUSE); + cause =3D readl_relaxed(mpic->per_cpu + MPIC_PPI_CAUSE); cpuid =3D cpu_logical_map(smp_processor_id()); =20 - for_each_set_bit(irqn, &irqmap, BITS_PER_LONG) { - irqsrc =3D readl_relaxed(main_int_base + - ARMADA_370_XP_INT_SOURCE_CTL(irqn)); + for_each_set_bit(i, &cause, MPIC_PER_CPU_IRQS_NR) { + irqsrc =3D readl_relaxed(mpic->base + MPIC_INT_SOURCE_CTL(i)); =20 /* Check if the interrupt is not masked on current CPU. * Test IRQ (0-1) and FIQ (8-9) mask bits. */ - if (!(irqsrc & ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid))) + if (!(irqsrc & MPIC_INT_IRQ_FIQ_MASK(cpuid))) continue; =20 - if (irqn =3D=3D 0 || irqn =3D=3D 1) { - armada_370_xp_handle_msi_irq(NULL, true); + if (i =3D=3D 0 || i =3D=3D 1) { + mpic_handle_msi_irq(mpic); continue; } =20 - generic_handle_domain_irq(armada_370_xp_mpic_domain, irqn); + generic_handle_domain_irq(mpic->domain, i); } =20 chained_irq_exit(chip, desc); } =20 -static void __exception_irq_entry -armada_370_xp_handle_irq(struct pt_regs *regs) +static void __exception_irq_entry mpic_handle_irq(struct pt_regs *regs) { - u32 irqstat, irqnr; + struct mpic *mpic =3D irq_get_default_host()->host_data; + irq_hw_number_t i; + u32 irqstat; =20 do { - irqstat =3D readl_relaxed(per_cpu_int_base + - ARMADA_370_XP_CPU_INTACK_OFFS); - irqnr =3D irqstat & 0x3FF; + irqstat =3D readl_relaxed(mpic->per_cpu + MPIC_CPU_INTACK); + i =3D FIELD_GET(MPIC_CPU_INTACK_IID_MASK, irqstat); =20 - if (irqnr > 1022) + if (i > 1022) break; =20 - if (irqnr > 1) { - generic_handle_domain_irq(armada_370_xp_mpic_domain, - irqnr); - continue; - } + if (i > 1) + generic_handle_domain_irq(mpic->domain, i); =20 /* MSI handling */ - if (irqnr =3D=3D 1) - armada_370_xp_handle_msi_irq(regs, false); + if (i =3D=3D 1) + mpic_handle_msi_irq(mpic); =20 -#ifdef CONFIG_SMP /* IPI Handling */ - if (irqnr =3D=3D 0) { - unsigned long ipimask; - int ipi; - - ipimask =3D readl_relaxed(per_cpu_int_base + - ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS) - & IPI_DOORBELL_MASK; - - for_each_set_bit(ipi, &ipimask, IPI_DOORBELL_END) - generic_handle_domain_irq(ipi_domain, ipi); - } -#endif - + if (i =3D=3D 0) + mpic_handle_ipi_irq(mpic); } while (1); } =20 -static int armada_370_xp_mpic_suspend(void) +static int mpic_suspend(void) { - doorbell_mask_reg =3D readl(per_cpu_int_base + - ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + struct mpic *mpic =3D mpic_data; + + mpic->doorbell_mask =3D readl(mpic->per_cpu + MPIC_IN_DRBEL_MASK); + return 0; } =20 -static void armada_370_xp_mpic_resume(void) +static void mpic_resume(void) { + struct mpic *mpic =3D mpic_data; bool src0, src1; - int nirqs; - irq_hw_number_t irq; =20 /* Re-enable interrupts */ - nirqs =3D (readl(main_int_base + ARMADA_370_XP_INT_CONTROL) >> 2) & 0x3ff; - for (irq =3D 0; irq < nirqs; irq++) { - struct irq_data *data; - int virq; + for (irq_hw_number_t i =3D 0; i < mpic->domain->hwirq_max; i++) { + unsigned int virq =3D irq_linear_revmap(mpic->domain, i); + struct irq_data *d; =20 - virq =3D irq_linear_revmap(armada_370_xp_mpic_domain, irq); - if (virq =3D=3D 0) + if (!virq) continue; =20 - data =3D irq_get_irq_data(virq); + d =3D irq_get_irq_data(virq); =20 - if (!is_percpu_irq(irq)) { + if (!mpic_is_percpu_irq(i)) { /* Non per-CPU interrupts */ - writel(irq, per_cpu_int_base + - ARMADA_370_XP_INT_CLEAR_MASK_OFFS); - if (!irqd_irq_disabled(data)) - armada_370_xp_irq_unmask(data); + writel(i, mpic->per_cpu + MPIC_INT_CLEAR_MASK); + if (!irqd_irq_disabled(d)) + mpic_irq_unmask(d); } else { /* Per-CPU interrupts */ - writel(irq, main_int_base + - ARMADA_370_XP_INT_SET_ENABLE_OFFS); + writel(i, mpic->base + MPIC_INT_SET_ENABLE); =20 /* - * Re-enable on the current CPU, - * armada_xp_mpic_reenable_percpu() will take - * care of secondary CPUs when they come up. + * Re-enable on the current CPU, mpic_reenable_percpu() + * will take care of secondary CPUs when they come up. */ if (irq_percpu_is_enabled(virq)) - armada_370_xp_irq_unmask(data); + mpic_irq_unmask(d); } } =20 /* Reconfigure doorbells for IPIs and MSIs */ - writel(doorbell_mask_reg, - per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS); + writel(mpic->doorbell_mask, mpic->per_cpu + MPIC_IN_DRBEL_MASK); =20 - if (is_ipi_available()) { - src0 =3D doorbell_mask_reg & IPI_DOORBELL_MASK; - src1 =3D doorbell_mask_reg & PCI_MSI_DOORBELL_MASK; + if (mpic_is_ipi_available(mpic)) { + src0 =3D mpic->doorbell_mask & IPI_DOORBELL_MASK; + src1 =3D mpic->doorbell_mask & PCI_MSI_DOORBELL_MASK; } else { - src0 =3D doorbell_mask_reg & PCI_MSI_FULL_DOORBELL_SRC0_MASK; - src1 =3D doorbell_mask_reg & PCI_MSI_FULL_DOORBELL_SRC1_MASK; + src0 =3D mpic->doorbell_mask & PCI_MSI_FULL_DOORBELL_SRC0_MASK; + src1 =3D mpic->doorbell_mask & PCI_MSI_FULL_DOORBELL_SRC1_MASK; } =20 if (src0) - writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + writel(0, mpic->per_cpu + MPIC_INT_CLEAR_MASK); if (src1) - writel(1, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); + writel(1, mpic->per_cpu + MPIC_INT_CLEAR_MASK); =20 - if (is_ipi_available()) - ipi_resume(); + if (mpic_is_ipi_available(mpic)) + mpic_ipi_resume(mpic); } =20 -static struct syscore_ops armada_370_xp_mpic_syscore_ops =3D { - .suspend =3D armada_370_xp_mpic_suspend, - .resume =3D armada_370_xp_mpic_resume, +static struct syscore_ops mpic_syscore_ops =3D { + .suspend =3D mpic_suspend, + .resume =3D mpic_resume, }; =20 -static int __init armada_370_xp_mpic_of_init(struct device_node *node, - struct device_node *parent) +static int __init mpic_map_region(struct device_node *np, int index, + void __iomem **base, phys_addr_t *phys_base) { - struct resource main_int_res, per_cpu_int_res; - int nr_irqs, i; - u32 control; + struct resource res; + int err; + + err =3D of_address_to_resource(np, index, &res); + if (WARN_ON(err)) + goto fail; + + if (WARN_ON(!request_mem_region(res.start, resource_size(&res), np->full_na= me))) { + err =3D -EBUSY; + goto fail; + } + + *base =3D ioremap(res.start, resource_size(&res)); + if (WARN_ON(!*base)) { + err =3D -ENOMEM; + goto fail; + } =20 - BUG_ON(of_address_to_resource(node, 0, &main_int_res)); - BUG_ON(of_address_to_resource(node, 1, &per_cpu_int_res)); + if (phys_base) + *phys_base =3D res.start; =20 - BUG_ON(!request_mem_region(main_int_res.start, - resource_size(&main_int_res), - node->full_name)); - BUG_ON(!request_mem_region(per_cpu_int_res.start, - resource_size(&per_cpu_int_res), - node->full_name)); + return 0; + +fail: + pr_err("%pOF: Unable to map resource %d: %pE\n", np, index, ERR_PTR(err)); + return err; +} =20 - main_int_base =3D ioremap(main_int_res.start, - resource_size(&main_int_res)); - BUG_ON(!main_int_base); +static int __init mpic_of_init(struct device_node *node, struct device_node = *parent) +{ + phys_addr_t phys_base; + unsigned int nr_irqs; + struct mpic *mpic; + int err; + + mpic =3D kzalloc(sizeof(*mpic), GFP_KERNEL); + if (WARN_ON(!mpic)) + return -ENOMEM; =20 - per_cpu_int_base =3D ioremap(per_cpu_int_res.start, - resource_size(&per_cpu_int_res)); - BUG_ON(!per_cpu_int_base); + mpic_data =3D mpic; =20 - control =3D readl(main_int_base + ARMADA_370_XP_INT_CONTROL); - nr_irqs =3D (control >> 2) & 0x3ff; + err =3D mpic_map_region(node, 0, &mpic->base, &phys_base); + if (err) + return err; =20 - for (i =3D 0; i < nr_irqs; i++) - writel(i, main_int_base + ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS); + err =3D mpic_map_region(node, 1, &mpic->per_cpu, NULL); + if (err) + return err; =20 - armada_370_xp_mpic_domain =3D - irq_domain_add_linear(node, nr_irqs, - &armada_370_xp_mpic_irq_ops, NULL); - BUG_ON(!armada_370_xp_mpic_domain); - irq_domain_update_bus_token(armada_370_xp_mpic_domain, DOMAIN_BUS_WIRED); + nr_irqs =3D FIELD_GET(MPIC_INT_CONTROL_NUMINT_MASK, readl(mpic->base + MPIC= _INT_CONTROL)); + + for (irq_hw_number_t i =3D 0; i < nr_irqs; i++) + writel(i, mpic->base + MPIC_INT_CLEAR_ENABLE); + + /* + * Initialize mpic->parent_irq before calling any other functions, since + * it is used to distinguish between IPI and non-IPI platforms. + */ + mpic->parent_irq =3D irq_of_parse_and_map(node, 0); =20 /* - * Initialize parent_irq before calling any other functions, since it is - * used to distinguish between IPI and non-IPI platforms. + * On non-IPI platforms the driver currently supports only the per-CPU + * interrupts (the first 29 interrupts). See mpic_handle_cascade_irq(). */ - parent_irq =3D irq_of_parse_and_map(node, 0); + if (!mpic_is_ipi_available(mpic)) + nr_irqs =3D MPIC_PER_CPU_IRQS_NR; + + mpic->domain =3D irq_domain_add_linear(node, nr_irqs, &mpic_irq_ops, mpic); + if (!mpic->domain) { + pr_err("%pOF: Unable to add IRQ domain\n", node); + return -ENOMEM; + } + + irq_domain_update_bus_token(mpic->domain, DOMAIN_BUS_WIRED); =20 /* Setup for the boot CPU */ - armada_xp_mpic_perf_init(); - armada_xp_mpic_smp_cpu_init(); + mpic_perf_init(mpic); + mpic_smp_cpu_init(mpic); =20 - armada_370_xp_msi_init(node, main_int_res.start); + err =3D mpic_msi_init(mpic, node, phys_base); + if (err) { + pr_err("%pOF: Unable to initialize MSI domain\n", node); + return err; + } =20 - if (parent_irq <=3D 0) { - irq_set_default_host(armada_370_xp_mpic_domain); - set_handle_irq(armada_370_xp_handle_irq); + if (mpic_is_ipi_available(mpic)) { + irq_set_default_host(mpic->domain); + set_handle_irq(mpic_handle_irq); #ifdef CONFIG_SMP - armada_xp_ipi_init(node); + err =3D mpic_ipi_init(mpic, node); + if (err) { + pr_err("%pOF: Unable to initialize IPI domain\n", node); + return err; + } + cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_ARMADA_XP_STARTING, "irqchip/armada/ipi:starting", - armada_xp_mpic_starting_cpu, NULL); + mpic_starting_cpu, NULL); #endif } else { #ifdef CONFIG_SMP @@ -882,13 +899,13 @@ static int __init armada_370_xp_mpic_of_init(struct dev= ice_node *node, "irqchip/armada/cascade:starting", mpic_cascaded_starting_cpu, NULL); #endif - irq_set_chained_handler(parent_irq, - armada_370_xp_mpic_handle_cascade_irq); + irq_set_chained_handler_and_data(mpic->parent_irq, + mpic_handle_cascade_irq, mpic); } =20 - register_syscore_ops(&armada_370_xp_mpic_syscore_ops); + register_syscore_ops(&mpic_syscore_ops); =20 return 0; } =20 -IRQCHIP_DECLARE(armada_370_xp_mpic, "marvell,mpic", armada_370_xp_mpic_of_in= it); +IRQCHIP_DECLARE(marvell_mpic, "marvell,mpic", mpic_of_init); diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c index 4631f6847953..3839ad79ad31 100644 --- a/drivers/irqchip/irq-atmel-aic.c +++ b/drivers/irqchip/irq-atmel-aic.c @@ -57,8 +57,7 @@ =20 static struct irq_domain *aic_domain; =20 -static asmlinkage void __exception_irq_entry -aic_handle(struct pt_regs *regs) +static void __exception_irq_entry aic_handle(struct pt_regs *regs) { struct irq_domain_chip_generic *dgc =3D aic_domain->gc; struct irq_chip_generic *gc =3D dgc->gc[0]; diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic= 5.c index 145535bd7560..c0f55dc7b050 100644 --- a/drivers/irqchip/irq-atmel-aic5.c +++ b/drivers/irqchip/irq-atmel-aic5.c @@ -67,8 +67,7 @@ =20 static struct irq_domain *aic5_domain; =20 -static asmlinkage void __exception_irq_entry -aic5_handle(struct pt_regs *regs) +static void __exception_irq_entry aic5_handle(struct pt_regs *regs) { struct irq_chip_generic *bgc =3D irq_get_domain_generic_chip(aic5_domain, 0= ); u32 irqnr; diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c index e731e0784f7e..806ebb1de201 100644 --- a/drivers/irqchip/irq-clps711x.c +++ b/drivers/irqchip/irq-clps711x.c @@ -69,7 +69,7 @@ static struct { struct irq_domain_ops ops; } *clps711x_intc; =20 -static asmlinkage void __exception_irq_entry clps711x_irqh(struct pt_regs *r= egs) +static void __exception_irq_entry clps711x_irqh(struct pt_regs *regs) { u32 irqstat; =20 diff --git a/drivers/irqchip/irq-davinci-cp-intc.c b/drivers/irqchip/irq-davi= nci-cp-intc.c index 7482c8ed34b2..f4f8e9fadbbf 100644 --- a/drivers/irqchip/irq-davinci-cp-intc.c +++ b/drivers/irqchip/irq-davinci-cp-intc.c @@ -116,8 +116,7 @@ static struct irq_chip davinci_cp_intc_irq_chip =3D { .flags =3D IRQCHIP_SKIP_SET_WAKE, }; =20 -static asmlinkage void __exception_irq_entry -davinci_cp_intc_handle_irq(struct pt_regs *regs) +static void __exception_irq_entry davinci_cp_intc_handle_irq(struct pt_regs = *regs) { int gpir, irqnr, none; =20 diff --git a/drivers/irqchip/irq-ftintc010.c b/drivers/irqchip/irq-ftintc010.c index 359efc1d1be7..b91c358ea6db 100644 --- a/drivers/irqchip/irq-ftintc010.c +++ b/drivers/irqchip/irq-ftintc010.c @@ -125,7 +125,7 @@ static struct irq_chip ft010_irq_chip =3D { /* Local static for the IRQ entry call */ static struct ft010_irq_data firq; =20 -static asmlinkage void __exception_irq_entry ft010_irqchip_handle_irq(struct= pt_regs *regs) +static void __exception_irq_entry ft010_irqchip_handle_irq(struct pt_regs *r= egs) { struct ft010_irq_data *f =3D &firq; int irq; diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index c19083bfb943..0efa3443c323 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -930,7 +930,7 @@ static void __gic_handle_irq_from_irqsoff(struct pt_regs = *regs) __gic_handle_nmi(irqnr, regs); } =20 -static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *= regs) +static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) { if (unlikely(gic_supports_nmi() && !interrupts_enabled(regs))) __gic_handle_irq_from_irqsoff(regs); diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c index ca32ac19d284..58c28895f8c4 100644 --- a/drivers/irqchip/irq-gic-v4.c +++ b/drivers/irqchip/irq-gic-v4.c @@ -97,7 +97,7 @@ bool gic_cpuif_has_vsgi(void) =20 fld =3D cpuid_feature_extract_unsigned_field(reg, ID_AA64PFR0_EL1_GIC_SHIFT= ); =20 - return fld >=3D 0x3; + return fld >=3D ID_AA64PFR0_EL1_GIC_V4P1; } #else bool gic_cpuif_has_vsgi(void) diff --git a/drivers/irqchip/irq-ixp4xx.c b/drivers/irqchip/irq-ixp4xx.c index 5fba907b9052..f23b02f62a5c 100644 --- a/drivers/irqchip/irq-ixp4xx.c +++ b/drivers/irqchip/irq-ixp4xx.c @@ -105,8 +105,7 @@ static void ixp4xx_irq_unmask(struct irq_data *d) } } =20 -static asmlinkage void __exception_irq_entry -ixp4xx_handle_irq(struct pt_regs *regs) +static void __exception_irq_entry ixp4xx_handle_irq(struct pt_regs *regs) { struct ixp4xx_irq *ixi =3D &ixirq; unsigned long status; diff --git a/drivers/irqchip/irq-loongarch-avec.c b/drivers/irqchip/irq-loong= arch-avec.c new file mode 100644 index 000000000000..0f6e465dd309 --- /dev/null +++ b/drivers/irqchip/irq-loongarch-avec.c @@ -0,0 +1,425 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020-2024 Loongson Technologies, Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "irq-msi-lib.h" +#include "irq-loongson.h" + +#define VECTORS_PER_REG 64 +#define IRR_VECTOR_MASK 0xffUL +#define IRR_INVALID_MASK 0x80000000UL +#define AVEC_MSG_OFFSET 0x100000 + +#ifdef CONFIG_SMP +struct pending_list { + struct list_head head; +}; + +static struct cpumask intersect_mask; +static DEFINE_PER_CPU(struct pending_list, pending_list); +#endif + +static DEFINE_PER_CPU(struct irq_desc * [NR_VECTORS], irq_map); + +struct avecintc_chip { + raw_spinlock_t lock; + struct fwnode_handle *fwnode; + struct irq_domain *domain; + struct irq_matrix *vector_matrix; + phys_addr_t msi_base_addr; +}; + +static struct avecintc_chip loongarch_avec; + +struct avecintc_data { + struct list_head entry; + unsigned int cpu; + unsigned int vec; + unsigned int prev_cpu; + unsigned int prev_vec; + unsigned int moving; +}; + +static inline void avecintc_ack_irq(struct irq_data *d) +{ +} + +static inline void avecintc_mask_irq(struct irq_data *d) +{ +} + +static inline void avecintc_unmask_irq(struct irq_data *d) +{ +} + +#ifdef CONFIG_SMP +static inline void pending_list_init(int cpu) +{ + struct pending_list *plist =3D per_cpu_ptr(&pending_list, cpu); + + INIT_LIST_HEAD(&plist->head); +} + +static void avecintc_sync(struct avecintc_data *adata) +{ + struct pending_list *plist; + + if (cpu_online(adata->prev_cpu)) { + plist =3D per_cpu_ptr(&pending_list, adata->prev_cpu); + list_add_tail(&adata->entry, &plist->head); + adata->moving =3D 1; + mp_ops.send_ipi_single(adata->prev_cpu, ACTION_CLEAR_VECTOR); + } +} + +static int avecintc_set_affinity(struct irq_data *data, const struct cpumask= *dest, bool force) +{ + int cpu, ret, vector; + struct avecintc_data *adata; + + scoped_guard(raw_spinlock, &loongarch_avec.lock) { + adata =3D irq_data_get_irq_chip_data(data); + + if (adata->moving) + return -EBUSY; + + if (cpu_online(adata->cpu) && cpumask_test_cpu(adata->cpu, dest)) + return 0; + + cpumask_and(&intersect_mask, dest, cpu_online_mask); + + ret =3D irq_matrix_alloc(loongarch_avec.vector_matrix, &intersect_mask, fa= lse, &cpu); + if (ret < 0) + return ret; + + vector =3D ret; + adata->cpu =3D cpu; + adata->vec =3D vector; + per_cpu_ptr(irq_map, adata->cpu)[adata->vec] =3D irq_data_to_desc(data); + avecintc_sync(adata); + } + + irq_data_update_effective_affinity(data, cpumask_of(cpu)); + + return IRQ_SET_MASK_OK; +} + +static int avecintc_cpu_online(unsigned int cpu) +{ + if (!loongarch_avec.vector_matrix) + return 0; + + guard(raw_spinlock)(&loongarch_avec.lock); + + irq_matrix_online(loongarch_avec.vector_matrix); + + pending_list_init(cpu); + + return 0; +} + +static int avecintc_cpu_offline(unsigned int cpu) +{ + struct pending_list *plist =3D per_cpu_ptr(&pending_list, cpu); + + if (!loongarch_avec.vector_matrix) + return 0; + + guard(raw_spinlock)(&loongarch_avec.lock); + + if (!list_empty(&plist->head)) + pr_warn("CPU#%d vector is busy\n", cpu); + + irq_matrix_offline(loongarch_avec.vector_matrix); + + return 0; +} + +void complete_irq_moving(void) +{ + struct pending_list *plist =3D this_cpu_ptr(&pending_list); + struct avecintc_data *adata, *tdata; + int cpu, vector, bias; + uint64_t isr; + + guard(raw_spinlock)(&loongarch_avec.lock); + + list_for_each_entry_safe(adata, tdata, &plist->head, entry) { + cpu =3D adata->prev_cpu; + vector =3D adata->prev_vec; + bias =3D vector / VECTORS_PER_REG; + switch (bias) { + case 0: + isr =3D csr_read64(LOONGARCH_CSR_ISR0); + break; + case 1: + isr =3D csr_read64(LOONGARCH_CSR_ISR1); + break; + case 2: + isr =3D csr_read64(LOONGARCH_CSR_ISR2); + break; + case 3: + isr =3D csr_read64(LOONGARCH_CSR_ISR3); + break; + } + + if (isr & (1UL << (vector % VECTORS_PER_REG))) { + mp_ops.send_ipi_single(cpu, ACTION_CLEAR_VECTOR); + continue; + } + list_del(&adata->entry); + irq_matrix_free(loongarch_avec.vector_matrix, cpu, vector, false); + this_cpu_write(irq_map[vector], NULL); + adata->moving =3D 0; + adata->prev_cpu =3D adata->cpu; + adata->prev_vec =3D adata->vec; + } +} +#endif + +static void avecintc_compose_msi_msg(struct irq_data *d, struct msi_msg *msg) +{ + struct avecintc_data *adata =3D irq_data_get_irq_chip_data(d); + + msg->address_hi =3D 0x0; + msg->address_lo =3D (loongarch_avec.msi_base_addr | (adata->vec & 0xff) << = 4) + | ((cpu_logical_map(adata->cpu & 0xffff)) << 12); + msg->data =3D 0x0; +} + +static struct irq_chip avec_irq_controller =3D { + .name =3D "AVECINTC", + .irq_ack =3D avecintc_ack_irq, + .irq_mask =3D avecintc_mask_irq, + .irq_unmask =3D avecintc_unmask_irq, +#ifdef CONFIG_SMP + .irq_set_affinity =3D avecintc_set_affinity, +#endif + .irq_compose_msi_msg =3D avecintc_compose_msi_msg, +}; + +static void avecintc_irq_dispatch(struct irq_desc *desc) +{ + struct irq_chip *chip =3D irq_desc_get_chip(desc); + struct irq_desc *d; + + chained_irq_enter(chip, desc); + + while (true) { + unsigned long vector =3D csr_read64(LOONGARCH_CSR_IRR); + if (vector & IRR_INVALID_MASK) + break; + + vector &=3D IRR_VECTOR_MASK; + + d =3D this_cpu_read(irq_map[vector]); + if (d) { + generic_handle_irq_desc(d); + } else { + spurious_interrupt(); + pr_warn("Unexpected IRQ occurs on CPU#%d [vector %ld]\n", smp_processor_i= d(), vector); + } + } + + chained_irq_exit(chip, desc); +} + +static int avecintc_alloc_vector(struct irq_data *irqd, struct avecintc_data= *adata) +{ + int cpu, ret; + + guard(raw_spinlock_irqsave)(&loongarch_avec.lock); + + ret =3D irq_matrix_alloc(loongarch_avec.vector_matrix, cpu_online_mask, fal= se, &cpu); + if (ret < 0) + return ret; + + adata->prev_cpu =3D adata->cpu =3D cpu; + adata->prev_vec =3D adata->vec =3D ret; + per_cpu_ptr(irq_map, adata->cpu)[adata->vec] =3D irq_data_to_desc(irqd); + + return 0; +} + +static int avecintc_domain_alloc(struct irq_domain *domain, unsigned int vir= q, + unsigned int nr_irqs, void *arg) +{ + for (unsigned int i =3D 0; i < nr_irqs; i++) { + struct irq_data *irqd =3D irq_domain_get_irq_data(domain, virq + i); + struct avecintc_data *adata =3D kzalloc(sizeof(*adata), GFP_KERNEL); + int ret; + + if (!adata) + return -ENOMEM; + + ret =3D avecintc_alloc_vector(irqd, adata); + if (ret < 0) { + kfree(adata); + return ret; + } + + irq_domain_set_info(domain, virq + i, virq + i, &avec_irq_controller, + adata, handle_edge_irq, NULL, NULL); + irqd_set_single_target(irqd); + irqd_set_affinity_on_activate(irqd); + } + + return 0; +} + +static void avecintc_free_vector(struct irq_data *irqd, struct avecintc_data= *adata) +{ + guard(raw_spinlock_irqsave)(&loongarch_avec.lock); + + per_cpu(irq_map, adata->cpu)[adata->vec] =3D NULL; + irq_matrix_free(loongarch_avec.vector_matrix, adata->cpu, adata->vec, false= ); + +#ifdef CONFIG_SMP + if (!adata->moving) + return; + + per_cpu(irq_map, adata->prev_cpu)[adata->prev_vec] =3D NULL; + irq_matrix_free(loongarch_avec.vector_matrix, adata->prev_cpu, adata->prev_= vec, false); + list_del_init(&adata->entry); +#endif +} + +static void avecintc_domain_free(struct irq_domain *domain, unsigned int vir= q, + unsigned int nr_irqs) +{ + for (unsigned int i =3D 0; i < nr_irqs; i++) { + struct irq_data *d =3D irq_domain_get_irq_data(domain, virq + i); + + if (d) { + struct avecintc_data *adata =3D irq_data_get_irq_chip_data(d); + + avecintc_free_vector(d, adata); + irq_domain_reset_irq_data(d); + kfree(adata); + } + } +} + +static const struct irq_domain_ops avecintc_domain_ops =3D { + .alloc =3D avecintc_domain_alloc, + .free =3D avecintc_domain_free, + .select =3D msi_lib_irq_domain_select, +}; + +static int __init irq_matrix_init(void) +{ + loongarch_avec.vector_matrix =3D irq_alloc_matrix(NR_VECTORS, 0, NR_VECTORS= ); + if (!loongarch_avec.vector_matrix) + return -ENOMEM; + + for (int i =3D 0; i < NR_LEGACY_VECTORS; i++) + irq_matrix_assign_system(loongarch_avec.vector_matrix, i, false); + + irq_matrix_online(loongarch_avec.vector_matrix); + + return 0; +} + +static int __init avecintc_init(struct irq_domain *parent) +{ + int ret, parent_irq; + unsigned long value; + + raw_spin_lock_init(&loongarch_avec.lock); + + loongarch_avec.fwnode =3D irq_domain_alloc_named_fwnode("AVECINTC"); + if (!loongarch_avec.fwnode) { + pr_err("Unable to allocate domain handle\n"); + ret =3D -ENOMEM; + goto out; + } + + loongarch_avec.domain =3D irq_domain_create_tree(loongarch_avec.fwnode, + &avecintc_domain_ops, NULL); + if (!loongarch_avec.domain) { + pr_err("Unable to create IRQ domain\n"); + ret =3D -ENOMEM; + goto out_free_handle; + } + + parent_irq =3D irq_create_mapping(parent, INT_AVEC); + if (!parent_irq) { + pr_err("Failed to mapping hwirq\n"); + ret =3D -EINVAL; + goto out_remove_domain; + } + + ret =3D irq_matrix_init(); + if (ret < 0) { + pr_err("Failed to init irq matrix\n"); + goto out_remove_domain; + } + irq_set_chained_handler_and_data(parent_irq, avecintc_irq_dispatch, NULL); + +#ifdef CONFIG_SMP + pending_list_init(0); + cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_AVECINTC_STARTING, + "irqchip/loongarch/avecintc:starting", + avecintc_cpu_online, avecintc_cpu_offline); +#endif + value =3D iocsr_read64(LOONGARCH_IOCSR_MISC_FUNC); + value |=3D IOCSR_MISC_FUNC_AVEC_EN; + iocsr_write64(value, LOONGARCH_IOCSR_MISC_FUNC); + + return ret; + +out_remove_domain: + irq_domain_remove(loongarch_avec.domain); +out_free_handle: + irq_domain_free_fwnode(loongarch_avec.fwnode); +out: + return ret; +} + +static int __init pch_msi_parse_madt(union acpi_subtable_headers *header, + const unsigned long end) +{ + struct acpi_madt_msi_pic *pchmsi_entry =3D (struct acpi_madt_msi_pic *)head= er; + + loongarch_avec.msi_base_addr =3D pchmsi_entry->msg_address - AVEC_MSG_OFFSE= T; + + return pch_msi_acpi_init_avec(loongarch_avec.domain); +} + +static inline int __init acpi_cascade_irqdomain_init(void) +{ + return acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1); +} + +int __init avecintc_acpi_init(struct irq_domain *parent) +{ + int ret =3D avecintc_init(parent); + if (ret < 0) { + pr_err("Failed to init IRQ domain\n"); + return ret; + } + + ret =3D acpi_cascade_irqdomain_init(); + if (ret < 0) { + pr_err("Failed to init cascade IRQ domain\n"); + return ret; + } + + return ret; +} diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loonga= rch-cpu.c index 9d8f2c406043..bcbd7fd33178 100644 --- a/drivers/irqchip/irq-loongarch-cpu.c +++ b/drivers/irqchip/irq-loongarch-cpu.c @@ -13,6 +13,8 @@ #include #include =20 +#include "irq-loongson.h" + static struct irq_domain *irq_domain; struct fwnode_handle *cpuintc_handle; =20 @@ -138,7 +140,10 @@ static int __init acpi_cascade_irqdomain_init(void) if (r < 0) return r; =20 - return 0; + if (cpu_has_avecint) + r =3D avecintc_acpi_init(irq_domain); + + return r; } =20 static int __init cpuintc_acpi_init(union acpi_subtable_headers *header, diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loo= ngson-eiointc.c index b1f2080be2be..e24db71a8783 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -17,6 +17,8 @@ #include #include =20 +#include "irq-loongson.h" + #define EIOINTC_REG_NODEMAP 0x14a0 #define EIOINTC_REG_IPMAP 0x14c0 #define EIOINTC_REG_ENABLE 0x1600 @@ -360,6 +362,9 @@ static int __init acpi_cascade_irqdomain_init(void) if (r < 0) return r; =20 + if (cpu_has_avecint) + return 0; + r =3D acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1); if (r < 0) return r; @@ -396,8 +401,8 @@ static int __init eiointc_init(struct eiointc_priv *priv,= int parent_irq, =20 if (nr_pics =3D=3D 1) { register_syscore_ops(&eiointc_syscore_ops); - cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING, - "irqchip/loongarch/intc:starting", + cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_EIOINTC_STARTING, + "irqchip/loongarch/eiointc:starting", eiointc_router_init, NULL); } =20 diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip/irq-loong= son-htvec.c index 0bff728b25e3..5da02c7ad0b3 100644 --- a/drivers/irqchip/irq-loongson-htvec.c +++ b/drivers/irqchip/irq-loongson-htvec.c @@ -17,6 +17,8 @@ #include #include =20 +#include "irq-loongson.h" + /* Registers */ #define HTVEC_EN_OFF 0x20 #define HTVEC_MAX_PARENT_IRQ 8 diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loo= ngson-liointc.c index 7c4fe7ab4b83..2b1bd4a96665 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -22,6 +22,8 @@ #include #endif =20 +#include "irq-loongson.h" + #define LIOINTC_CHIP_IRQ 32 #define LIOINTC_NUM_PARENT 4 #define LIOINTC_NUM_CORES 4 diff --git a/drivers/irqchip/irq-loongson-pch-lpc.c b/drivers/irqchip/irq-loo= ngson-pch-lpc.c index 9b35492fb6be..2d4c3ec128b8 100644 --- a/drivers/irqchip/irq-loongson-pch-lpc.c +++ b/drivers/irqchip/irq-loongson-pch-lpc.c @@ -15,6 +15,8 @@ #include #include =20 +#include "irq-loongson.h" + /* Registers */ #define LPC_INT_CTL 0x00 #define LPC_INT_ENA 0x04 diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loo= ngson-pch-msi.c index dd4d699170f4..bd337ecddb40 100644 --- a/drivers/irqchip/irq-loongson-pch-msi.c +++ b/drivers/irqchip/irq-loongson-pch-msi.c @@ -15,6 +15,9 @@ #include #include =20 +#include "irq-msi-lib.h" +#include "irq-loongson.h" + static int nr_pics; =20 struct pch_msi_data { @@ -27,26 +30,6 @@ struct pch_msi_data { =20 static struct fwnode_handle *pch_msi_handle[MAX_IO_PICS]; =20 -static void pch_msi_mask_msi_irq(struct irq_data *d) -{ - pci_msi_mask_irq(d); - irq_chip_mask_parent(d); -} - -static void pch_msi_unmask_msi_irq(struct irq_data *d) -{ - irq_chip_unmask_parent(d); - pci_msi_unmask_irq(d); -} - -static struct irq_chip pch_msi_irq_chip =3D { - .name =3D "PCH PCI MSI", - .irq_mask =3D pch_msi_mask_msi_irq, - .irq_unmask =3D pch_msi_unmask_msi_irq, - .irq_ack =3D irq_chip_ack_parent, - .irq_set_affinity =3D irq_chip_set_affinity_parent, -}; - static int pch_msi_allocate_hwirq(struct pch_msi_data *priv, int num_req) { int first; @@ -85,12 +68,6 @@ static void pch_msi_compose_msi_msg(struct irq_data *data, msg->data =3D data->hwirq; } =20 -static struct msi_domain_info pch_msi_domain_info =3D { - .flags =3D MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX, - .chip =3D &pch_msi_irq_chip, -}; - static struct irq_chip middle_irq_chip =3D { .name =3D "PCH MSI", .irq_mask =3D irq_chip_mask_parent, @@ -155,13 +132,31 @@ static void pch_msi_middle_domain_free(struct irq_domai= n *domain, static const struct irq_domain_ops pch_msi_middle_domain_ops =3D { .alloc =3D pch_msi_middle_domain_alloc, .free =3D pch_msi_middle_domain_free, + .select =3D msi_lib_irq_domain_select, +}; + +#define PCH_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS | \ + MSI_FLAG_USE_DEF_CHIP_OPS | \ + MSI_FLAG_PCI_MSI_MASK_PARENT) + +#define PCH_MSI_FLAGS_SUPPORTED (MSI_GENERIC_FLAGS_MASK | \ + MSI_FLAG_PCI_MSIX | \ + MSI_FLAG_MULTI_PCI_MSI) + +static struct msi_parent_ops pch_msi_parent_ops =3D { + .required_flags =3D PCH_MSI_FLAGS_REQUIRED, + .supported_flags =3D PCH_MSI_FLAGS_SUPPORTED, + .bus_select_mask =3D MATCH_PCI_MSI, + .bus_select_token =3D DOMAIN_BUS_NEXUS, + .prefix =3D "PCH-", + .init_dev_msi_info =3D msi_lib_init_dev_msi_info, }; =20 static int pch_msi_init_domains(struct pch_msi_data *priv, struct irq_domain *parent, struct fwnode_handle *domain_handle) { - struct irq_domain *middle_domain, *msi_domain; + struct irq_domain *middle_domain; =20 middle_domain =3D irq_domain_create_hierarchy(parent, 0, priv->num_irqs, domain_handle, @@ -174,14 +169,8 @@ static int pch_msi_init_domains(struct pch_msi_data *pri= v, =20 irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS); =20 - msi_domain =3D pci_msi_create_irq_domain(domain_handle, - &pch_msi_domain_info, - middle_domain); - if (!msi_domain) { - pr_err("Failed to create PCI MSI domain\n"); - irq_domain_remove(middle_domain); - return -ENOMEM; - } + middle_domain->flags |=3D IRQ_DOMAIN_FLAG_MSI_PARENT; + middle_domain->msi_parent_ops =3D &pch_msi_parent_ops; =20 return 0; } @@ -266,17 +255,17 @@ IRQCHIP_DECLARE(pch_msi, "loongson,pch-msi-1.0", pch_ms= i_of_init); #ifdef CONFIG_ACPI struct fwnode_handle *get_pch_msi_handle(int pci_segment) { - int i; + if (cpu_has_avecint) + return pch_msi_handle[0]; =20 - for (i =3D 0; i < MAX_IO_PICS; i++) { + for (int i =3D 0; i < MAX_IO_PICS; i++) { if (msi_group[i].pci_segment =3D=3D pci_segment) return pch_msi_handle[i]; } - return NULL; + return pch_msi_handle[0]; } =20 -int __init pch_msi_acpi_init(struct irq_domain *parent, - struct acpi_madt_msi_pic *acpi_pchmsi) +int __init pch_msi_acpi_init(struct irq_domain *parent, struct acpi_madt_msi= _pic *acpi_pchmsi) { int ret; struct fwnode_handle *domain_handle; @@ -289,4 +278,18 @@ int __init pch_msi_acpi_init(struct irq_domain *parent, =20 return ret; } + +int __init pch_msi_acpi_init_avec(struct irq_domain *parent) +{ + if (pch_msi_handle[0]) + return 0; + + pch_msi_handle[0] =3D parent->fwnode; + irq_domain_update_bus_token(parent, DOMAIN_BUS_NEXUS); + + parent->flags |=3D IRQ_DOMAIN_FLAG_MSI_PARENT; + parent->msi_parent_ops =3D &pch_msi_parent_ops; + + return 0; +} #endif diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loo= ngson-pch-pic.c index cbaef65e804c..69efda35a8e7 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -17,6 +17,8 @@ #include #include =20 +#include "irq-loongson.h" + /* Registers */ #define PCH_PIC_MASK 0x20 #define PCH_PIC_HTMSI_EN 0x40 diff --git a/drivers/irqchip/irq-loongson.h b/drivers/irqchip/irq-loongson.h new file mode 100644 index 000000000000..11fa138d1f44 --- /dev/null +++ b/drivers/irqchip/irq-loongson.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2024 Loongson Technology Corporation Limited + */ + +#ifndef _DRIVERS_IRQCHIP_IRQ_LOONGSON_H +#define _DRIVERS_IRQCHIP_IRQ_LOONGSON_H + +int find_pch_pic(u32 gsi); + +int liointc_acpi_init(struct irq_domain *parent, + struct acpi_madt_lio_pic *acpi_liointc); +int eiointc_acpi_init(struct irq_domain *parent, + struct acpi_madt_eio_pic *acpi_eiointc); +int avecintc_acpi_init(struct irq_domain *parent); + +int htvec_acpi_init(struct irq_domain *parent, + struct acpi_madt_ht_pic *acpi_htvec); +int pch_lpc_acpi_init(struct irq_domain *parent, + struct acpi_madt_lpc_pic *acpi_pchlpc); +int pch_pic_acpi_init(struct irq_domain *parent, + struct acpi_madt_bio_pic *acpi_pchpic); +int pch_msi_acpi_init(struct irq_domain *parent, + struct acpi_madt_msi_pic *acpi_pchmsi); +int pch_msi_acpi_init_avec(struct irq_domain *parent); + +#endif /* _DRIVERS_IRQCHIP_IRQ_LOONGSON_H */ diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index 093fd42893a7..12919836dadb 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -222,37 +222,27 @@ static int mbigen_of_create_domain(struct platform_devi= ce *pdev, struct mbigen_device *mgn_chip) { struct platform_device *child; - struct device_node *np; u32 num_pins; - int ret =3D 0; =20 - for_each_child_of_node(pdev->dev.of_node, np) { + for_each_child_of_node_scoped(pdev->dev.of_node, np) { if (!of_property_read_bool(np, "interrupt-controller")) continue; =20 child =3D of_platform_device_create(np, NULL, NULL); - if (!child) { - ret =3D -ENOMEM; - break; - } + if (!child) + return -ENOMEM; =20 if (of_property_read_u32(child->dev.of_node, "num-pins", &num_pins) < 0) { dev_err(&pdev->dev, "No num-pins property\n"); - ret =3D -EINVAL; - break; + return -EINVAL; } =20 - if (!mbigen_create_device_domain(&child->dev, num_pins, mgn_chip)) { - ret =3D -ENOMEM; - break; - } + if (!mbigen_create_device_domain(&child->dev, num_pins, mgn_chip)) + return -ENOMEM; } =20 - if (ret) - of_node_put(np); - - return ret; + return 0; } =20 #ifdef CONFIG_ACPI diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index dc82162ba763..ad84a2f03368 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -325,8 +325,7 @@ static int __init omap_init_irq(u32 base, struct device_n= ode *node) return ret; } =20 -static asmlinkage void __exception_irq_entry -omap_intc_handle_irq(struct pt_regs *regs) +static void __exception_irq_entry omap_intc_handle_irq(struct pt_regs *regs) { extern unsigned long irq_err_count; u32 irqnr; diff --git a/drivers/irqchip/irq-sa11x0.c b/drivers/irqchip/irq-sa11x0.c index 31c202a1ae62..9d0b80271949 100644 --- a/drivers/irqchip/irq-sa11x0.c +++ b/drivers/irqchip/irq-sa11x0.c @@ -127,8 +127,7 @@ static int __init sa1100irq_init_devicefs(void) =20 device_initcall(sa1100irq_init_devicefs); =20 -static asmlinkage void __exception_irq_entry -sa1100_handle_irq(struct pt_regs *regs) +static void __exception_irq_entry sa1100_handle_irq(struct pt_regs *regs) { uint32_t icip, icmr, mask; =20 diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versa= tile-fpga.c index 5018a06060e6..ca471c6fee99 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -128,7 +128,7 @@ static int handle_one_fpga(struct fpga_irq_data *f, struc= t pt_regs *regs) * Keep iterating over all registered FPGA IRQ controllers until there are * no pending interrupts. */ -static asmlinkage void __exception_irq_entry fpga_handle_irq(struct pt_regs = *regs) +static void __exception_irq_entry fpga_handle_irq(struct pt_regs *regs) { int i, handled; =20 diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 51ba681b915a..55a726d317d4 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -145,7 +145,8 @@ enum cpuhp_state { CPUHP_AP_IRQ_ARMADA_XP_STARTING, CPUHP_AP_IRQ_BCM2836_STARTING, CPUHP_AP_IRQ_MIPS_GIC_STARTING, - CPUHP_AP_IRQ_LOONGARCH_STARTING, + CPUHP_AP_IRQ_EIOINTC_STARTING, + CPUHP_AP_IRQ_AVECINTC_STARTING, CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING, CPUHP_AP_IRQ_RISCV_IMSIC_STARTING, CPUHP_AP_ARM_MVEBU_COHERENCY, diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 3f30c88e0b4c..457151f9f263 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -276,7 +276,7 @@ struct irq_affinity_notify { #define IRQ_AFFINITY_MAX_SETS 4 =20 /** - * struct irq_affinity - Description for automatic irq affinity assignements + * struct irq_affinity - Description for automatic irq affinity assignments * @pre_vectors: Don't apply affinity to @pre_vectors at beginning of * the MSI(-X) vector space * @post_vectors: Don't apply affinity to @post_vectors at end of @@ -594,7 +594,7 @@ extern const char * const softirq_to_name[NR_SOFTIRQS]; =20 struct softirq_action { - void (*action)(struct softirq_action *); + void (*action)(void); }; =20 asmlinkage void do_softirq(void); @@ -609,7 +609,7 @@ static inline void do_softirq_post_smp_call_flush(unsigne= d int unused) } #endif =20 -extern void open_softirq(int nr, void (*action)(struct softirq_action *)); +extern void open_softirq(int nr, void (*action)(void)); extern void softirq_init(void); extern void __raise_softirq_irqoff(unsigned int nr); =20 diff --git a/include/linux/irq.h b/include/linux/irq.h index 1f5dbf1f92c9..fa711f80957b 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -991,7 +991,6 @@ void irq_init_desc(unsigned int irq); * @ack: Ack register offset to reg_base * @eoi: Eoi register offset to reg_base * @type: Type configuration register offset to reg_base - * @polarity: Polarity configuration register offset to reg_base */ struct irq_chip_regs { unsigned long enable; @@ -1000,7 +999,6 @@ struct irq_chip_regs { unsigned long ack; unsigned long eoi; unsigned long type; - unsigned long polarity; }; =20 /** @@ -1040,8 +1038,6 @@ struct irq_chip_type { * @irq_base: Interrupt base nr for this chip * @irq_cnt: Number of interrupts handled by this chip * @mask_cache: Cached mask register shared between all chip types - * @type_cache: Cached type register - * @polarity_cache: Cached polarity register * @wake_enabled: Interrupt can wakeup from suspend * @wake_active: Interrupt is marked as an wakeup from suspend source * @num_ct: Number of available irq_chip_type instances (usually 1) @@ -1068,8 +1064,6 @@ struct irq_chip_generic { unsigned int irq_base; unsigned int irq_cnt; u32 mask_cache; - u32 type_cache; - u32 polarity_cache; u32 wake_enabled; u32 wake_active; unsigned int num_ct; diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index de6105f68fec..e432b6a12a32 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -291,7 +291,12 @@ struct irq_domain_chip_generic_info; * @hwirq_max: Maximum number of interrupts supported by controller * @direct_max: Maximum value of direct maps; * Use ~0 for no limit; 0 for no direct mapping + * @hwirq_base: The first hardware interrupt number (legacy domains only) + * @virq_base: The first Linux interrupt number for legacy domains to + * immediately associate the interrupts after domain creation * @bus_token: Domain bus token + * @name_suffix: Optional name suffix to avoid collisions when multiple + * domains are added using same fwnode * @ops: Domain operation callbacks * @host_data: Controller private data pointer * @dgc_info: Geneneric chip information structure pointer used to @@ -307,7 +312,10 @@ struct irq_domain_info { unsigned int size; irq_hw_number_t hwirq_max; int direct_max; + unsigned int hwirq_base; + unsigned int virq_base; enum irq_domain_bus_token bus_token; + const char *name_suffix; const struct irq_domain_ops *ops; void *host_data; #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index dc94e0bf2c94..271e9139de77 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -198,7 +198,7 @@ __irq_startup_managed(struct irq_desc *desc, const struct= cpumask *aff, =20 irqd_clr_managed_shutdown(d); =20 - if (cpumask_any_and(aff, cpu_online_mask) >=3D nr_cpu_ids) { + if (!cpumask_intersects(aff, cpu_online_mask)) { /* * Catch code which fiddles with enable_irq() on a managed * and potentially shutdown IRQ. Chained interrupt diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c index eb8628390156..15a7654eff68 100644 --- a/kernel/irq/cpuhotplug.c +++ b/kernel/irq/cpuhotplug.c @@ -37,7 +37,7 @@ static inline bool irq_needs_fixup(struct irq_data *d) * has been removed from the online mask already. */ if (cpumask_any_but(m, cpu) < nr_cpu_ids && - cpumask_any_and(m, cpu_online_mask) >=3D nr_cpu_ids) { + !cpumask_intersects(m, cpu_online_mask)) { /* * If this happens then there was a missed IRQ fixup at some * point. Warn about it and enforce fixup. @@ -110,7 +110,7 @@ static bool migrate_one_irq(struct irq_desc *desc) if (maskchip && chip->irq_mask) chip->irq_mask(d); =20 - if (cpumask_any_and(affinity, cpu_online_mask) >=3D nr_cpu_ids) { + if (!cpumask_intersects(affinity, cpu_online_mask)) { /* * If the interrupt is managed, then shut it down and leave * the affinity untouched. diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c index 3d4036db15ac..1a3d483548e2 100644 --- a/kernel/irq/irq_sim.c +++ b/kernel/irq/irq_sim.c @@ -13,7 +13,6 @@ =20 struct irq_sim_work_ctx { struct irq_work work; - int irq_base; unsigned int irq_count; unsigned long *pending; struct irq_domain *domain; diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index cea8f6874b1f..e0bff21f30e0 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -128,72 +128,98 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnod= e) } EXPORT_SYMBOL_GPL(irq_domain_free_fwnode); =20 -static int irq_domain_set_name(struct irq_domain *domain, - const struct fwnode_handle *fwnode, - enum irq_domain_bus_token bus_token) +static int alloc_name(struct irq_domain *domain, char *base, enum irq_domain= _bus_token bus_token) +{ + if (bus_token =3D=3D DOMAIN_BUS_ANY) + domain->name =3D kasprintf(GFP_KERNEL, "%s", base); + else + domain->name =3D kasprintf(GFP_KERNEL, "%s-%d", base, bus_token); + if (!domain->name) + return -ENOMEM; + + domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; + return 0; +} + +static int alloc_fwnode_name(struct irq_domain *domain, const struct fwnode_= handle *fwnode, + enum irq_domain_bus_token bus_token, const char *suffix) +{ + const char *sep =3D suffix ? "-" : ""; + const char *suf =3D suffix ? : ""; + char *name; + + if (bus_token =3D=3D DOMAIN_BUS_ANY) + name =3D kasprintf(GFP_KERNEL, "%pfw%s%s", fwnode, sep, suf); + else + name =3D kasprintf(GFP_KERNEL, "%pfw%s%s-%d", fwnode, sep, suf, bus_token); + if (!name) + return -ENOMEM; + + /* + * fwnode paths contain '/', which debugfs is legitimately unhappy + * about. Replace them with ':', which does the trick and is not as + * offensive as '\'... + */ + domain->name =3D strreplace(name, '/', ':'); + domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; + return 0; +} + +static int alloc_unknown_name(struct irq_domain *domain, enum irq_domain_bus= _token bus_token) { static atomic_t unknown_domains; - struct irqchip_fwid *fwid; + int id =3D atomic_inc_return(&unknown_domains); + + if (bus_token =3D=3D DOMAIN_BUS_ANY) + domain->name =3D kasprintf(GFP_KERNEL, "unknown-%d", id); + else + domain->name =3D kasprintf(GFP_KERNEL, "unknown-%d-%d", id, bus_token); + if (!domain->name) + return -ENOMEM; + + domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; + return 0; +} + +static int irq_domain_set_name(struct irq_domain *domain, const struct irq_d= omain_info *info) +{ + enum irq_domain_bus_token bus_token =3D info->bus_token; + const struct fwnode_handle *fwnode =3D info->fwnode; =20 if (is_fwnode_irqchip(fwnode)) { - fwid =3D container_of(fwnode, struct irqchip_fwid, fwnode); + struct irqchip_fwid *fwid =3D container_of(fwnode, struct irqchip_fwid, fw= node); + + /* + * The name_suffix is only intended to be used to avoid a name + * collision when multiple domains are created for a single + * device and the name is picked using a real device node. + * (Typical use-case is regmap-IRQ controllers for devices + * providing more than one physical IRQ.) There should be no + * need to use name_suffix with irqchip-fwnode. + */ + if (info->name_suffix) + return -EINVAL; =20 switch (fwid->type) { case IRQCHIP_FWNODE_NAMED: case IRQCHIP_FWNODE_NAMED_ID: - domain->name =3D bus_token ? - kasprintf(GFP_KERNEL, "%s-%d", - fwid->name, bus_token) : - kstrdup(fwid->name, GFP_KERNEL); - if (!domain->name) - return -ENOMEM; - domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; - break; + return alloc_name(domain, fwid->name, bus_token); default: domain->name =3D fwid->name; - if (bus_token) { - domain->name =3D kasprintf(GFP_KERNEL, "%s-%d", - fwid->name, bus_token); - if (!domain->name) - return -ENOMEM; - domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; - } - break; + if (bus_token !=3D DOMAIN_BUS_ANY) + return alloc_name(domain, fwid->name, bus_token); } - } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || - is_software_node(fwnode)) { - char *name; - - /* - * fwnode paths contain '/', which debugfs is legitimately - * unhappy about. Replace them with ':', which does - * the trick and is not as offensive as '\'... - */ - name =3D bus_token ? - kasprintf(GFP_KERNEL, "%pfw-%d", fwnode, bus_token) : - kasprintf(GFP_KERNEL, "%pfw", fwnode); - if (!name) - return -ENOMEM; =20 - domain->name =3D strreplace(name, '/', ':'); - domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; + } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || is_software= _node(fwnode)) { + return alloc_fwnode_name(domain, fwnode, bus_token, info->name_suffix); } =20 - if (!domain->name) { - if (fwnode) - pr_err("Invalid fwnode type for irqdomain\n"); - domain->name =3D bus_token ? - kasprintf(GFP_KERNEL, "unknown-%d-%d", - atomic_inc_return(&unknown_domains), - bus_token) : - kasprintf(GFP_KERNEL, "unknown-%d", - atomic_inc_return(&unknown_domains)); - if (!domain->name) - return -ENOMEM; - domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; - } + if (domain->name) + return 0; =20 - return 0; + if (fwnode) + pr_err("Invalid fwnode type for irqdomain\n"); + return alloc_unknown_name(domain, bus_token); } =20 static struct irq_domain *__irq_domain_create(const struct irq_domain_info *= info) @@ -211,7 +237,7 @@ static struct irq_domain *__irq_domain_create(const struc= t irq_domain_info *info if (!domain) return ERR_PTR(-ENOMEM); =20 - err =3D irq_domain_set_name(domain, info->fwnode, info->bus_token); + err =3D irq_domain_set_name(domain, info); if (err) { kfree(domain); return ERR_PTR(err); @@ -267,13 +293,20 @@ static void irq_domain_free(struct irq_domain *domain) kfree(domain); } =20 -/** - * irq_domain_instantiate() - Instantiate a new irq domain data structure - * @info: Domain information pointer pointing to the information for this do= main - * - * Return: A pointer to the instantiated irq domain or an ERR_PTR value. - */ -struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info) +static void irq_domain_instantiate_descs(const struct irq_domain_info *info) +{ + if (!IS_ENABLED(CONFIG_SPARSE_IRQ)) + return; + + if (irq_alloc_descs(info->virq_base, info->virq_base, info->size, + of_node_to_nid(to_of_node(info->fwnode))) < 0) { + pr_info("Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n", + info->virq_base); + } +} + +static struct irq_domain *__irq_domain_instantiate(const struct irq_domain_i= nfo *info, + bool cond_alloc_descs, bool force_associate) { struct irq_domain *domain; int err; @@ -306,6 +339,19 @@ struct irq_domain *irq_domain_instantiate(const struct i= rq_domain_info *info) =20 __irq_domain_publish(domain); =20 + if (cond_alloc_descs && info->virq_base > 0) + irq_domain_instantiate_descs(info); + + /* + * Legacy interrupt domains have a fixed Linux interrupt number + * associated. Other interrupt domains can request association by + * providing a Linux interrupt number > 0. + */ + if (force_associate || info->virq_base > 0) { + irq_domain_associate_many(domain, info->virq_base, info->hwirq_base, + info->size - info->hwirq_base); + } + return domain; =20 err_domain_gc_remove: @@ -315,6 +361,17 @@ struct irq_domain *irq_domain_instantiate(const struct i= rq_domain_info *info) irq_domain_free(domain); return ERR_PTR(err); } + +/** + * irq_domain_instantiate() - Instantiate a new irq domain data structure + * @info: Domain information pointer pointing to the information for this do= main + * + * Return: A pointer to the instantiated irq domain or an ERR_PTR value. + */ +struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info) +{ + return __irq_domain_instantiate(info, false, false); +} EXPORT_SYMBOL_GPL(irq_domain_instantiate); =20 /** @@ -413,28 +470,13 @@ struct irq_domain *irq_domain_create_simple(struct fwno= de_handle *fwnode, .fwnode =3D fwnode, .size =3D size, .hwirq_max =3D size, + .virq_base =3D first_irq, .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *domain; - - domain =3D irq_domain_instantiate(&info); - if (IS_ERR(domain)) - return NULL; + struct irq_domain *domain =3D __irq_domain_instantiate(&info, true, false); =20 - if (first_irq > 0) { - if (IS_ENABLED(CONFIG_SPARSE_IRQ)) { - /* attempt to allocated irq_descs */ - int rc =3D irq_alloc_descs(first_irq, first_irq, size, - of_node_to_nid(to_of_node(fwnode))); - if (rc < 0) - pr_info("Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n", - first_irq); - } - irq_domain_associate_many(domain, first_irq, 0, size); - } - - return domain; + return IS_ERR(domain) ? NULL : domain; } EXPORT_SYMBOL_GPL(irq_domain_create_simple); =20 @@ -476,18 +518,14 @@ struct irq_domain *irq_domain_create_legacy(struct fwno= de_handle *fwnode, .fwnode =3D fwnode, .size =3D first_hwirq + size, .hwirq_max =3D first_hwirq + size, + .hwirq_base =3D first_hwirq, + .virq_base =3D first_irq, .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *domain; + struct irq_domain *domain =3D __irq_domain_instantiate(&info, false, true); =20 - domain =3D irq_domain_instantiate(&info); - if (IS_ERR(domain)) - return NULL; - - irq_domain_associate_many(domain, first_irq, first_hwirq, size); - - return domain; + return IS_ERR(domain) ? NULL : domain; } EXPORT_SYMBOL_GPL(irq_domain_create_legacy); =20 @@ -1365,7 +1403,7 @@ static int irq_domain_trim_hierarchy(unsigned int virq) tail =3D NULL; =20 /* The first entry must have a valid irqchip */ - if (!irq_data->chip || IS_ERR(irq_data->chip)) + if (IS_ERR_OR_NULL(irq_data->chip)) return -EINVAL; =20 /* diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index dd53298ef1a5..f0803d6bd296 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -218,21 +218,20 @@ static void irq_validate_effective_affinity(struct irq_= data *data) static inline void irq_validate_effective_affinity(struct irq_data *data) { } #endif =20 +static DEFINE_PER_CPU(struct cpumask, __tmp_mask); + int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) { + struct cpumask *tmp_mask =3D this_cpu_ptr(&__tmp_mask); struct irq_desc *desc =3D irq_data_to_desc(data); struct irq_chip *chip =3D irq_data_get_irq_chip(data); const struct cpumask *prog_mask; int ret; =20 - static DEFINE_RAW_SPINLOCK(tmp_mask_lock); - static struct cpumask tmp_mask; - if (!chip || !chip->irq_set_affinity) return -EINVAL; =20 - raw_spin_lock(&tmp_mask_lock); /* * If this is a managed interrupt and housekeeping is enabled on * it check whether the requested affinity mask intersects with @@ -258,11 +257,11 @@ int irq_do_set_affinity(struct irq_data *data, const st= ruct cpumask *mask, =20 hk_mask =3D housekeeping_cpumask(HK_TYPE_MANAGED_IRQ); =20 - cpumask_and(&tmp_mask, mask, hk_mask); - if (!cpumask_intersects(&tmp_mask, cpu_online_mask)) + cpumask_and(tmp_mask, mask, hk_mask); + if (!cpumask_intersects(tmp_mask, cpu_online_mask)) prog_mask =3D mask; else - prog_mask =3D &tmp_mask; + prog_mask =3D tmp_mask; } else { prog_mask =3D mask; } @@ -272,16 +271,14 @@ int irq_do_set_affinity(struct irq_data *data, const st= ruct cpumask *mask, * unless we are being asked to force the affinity (in which * case we do as we are told). */ - cpumask_and(&tmp_mask, prog_mask, cpu_online_mask); - if (!force && !cpumask_empty(&tmp_mask)) - ret =3D chip->irq_set_affinity(data, &tmp_mask, force); + cpumask_and(tmp_mask, prog_mask, cpu_online_mask); + if (!force && !cpumask_empty(tmp_mask)) + ret =3D chip->irq_set_affinity(data, tmp_mask, force); else if (force) ret =3D chip->irq_set_affinity(data, mask, force); else ret =3D -EINVAL; =20 - raw_spin_unlock(&tmp_mask_lock); - switch (ret) { case IRQ_SET_MASK_OK: case IRQ_SET_MASK_OK_DONE: diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index 61ca924ef4b4..eb150afd671f 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c @@ -26,7 +26,7 @@ bool irq_fixup_move_pending(struct irq_desc *desc, bool for= ce_clear) * The outgoing CPU might be the last online target in a pending * interrupt move. If that's the case clear the pending move bit. */ - if (cpumask_any_and(desc->pending_mask, cpu_online_mask) >=3D nr_cpu_ids) { + if (!cpumask_intersects(desc->pending_mask, cpu_online_mask)) { irqd_clr_move_pending(data); return false; } @@ -74,7 +74,7 @@ void irq_move_masked_irq(struct irq_data *idata) * For correct operation this depends on the caller * masking the irqs. */ - if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids) { + if (cpumask_intersects(desc->pending_mask, cpu_online_mask)) { int ret; =20 ret =3D irq_do_set_affinity(data, desc->pending_mask, false); diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 5fa0547ece0c..1c7e5159064c 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -82,7 +82,7 @@ static struct msi_desc *msi_alloc_desc(struct device *dev, = int nvec, desc->dev =3D dev; desc->nvec_used =3D nvec; if (affinity) { - desc->affinity =3D kmemdup(affinity, nvec * sizeof(*desc->affinity), GFP_K= ERNEL); + desc->affinity =3D kmemdup_array(affinity, nvec, sizeof(*desc->affinity), = GFP_KERNEL); if (!desc->affinity) { kfree(desc); return NULL; diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 8cccdf40725a..9081ada81c3d 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -52,10 +52,8 @@ static int show_irq_affinity(int type, struct seq_file *m) case AFFINITY: case AFFINITY_LIST: mask =3D desc->irq_common_data.affinity; -#ifdef CONFIG_GENERIC_PENDING_IRQ - if (irqd_is_setaffinity_pending(&desc->irq_data)) - mask =3D desc->pending_mask; -#endif + if (irq_move_pending(&desc->irq_data)) + mask =3D irq_desc_get_pending_mask(desc); break; case EFFECTIVE: case EFFECTIVE_LIST: @@ -142,7 +140,7 @@ static ssize_t write_irq_affinity(int type, struct file *= file, int err; =20 if (!irq_can_set_affinity_usr(irq) || no_irq_affinity) - return -EIO; + return -EPERM; =20 if (!zalloc_cpumask_var(&new_value, GFP_KERNEL)) return -ENOMEM; @@ -362,8 +360,13 @@ void register_irq_proc(unsigned int irq, struct irq_desc= *desc) goto out_unlock; =20 #ifdef CONFIG_SMP + umode_t umode =3D S_IRUGO; + + if (irq_can_set_affinity_usr(desc->irq_data.irq)) + umode |=3D S_IWUSR; + /* create /proc/irq//smp_affinity */ - proc_create_data("smp_affinity", 0644, desc->dir, + proc_create_data("smp_affinity", umode, desc->dir, &irq_affinity_proc_ops, irqp); =20 /* create /proc/irq//affinity_hint */ @@ -371,7 +374,7 @@ void register_irq_proc(unsigned int irq, struct irq_desc = *desc) irq_affinity_hint_proc_show, irqp); =20 /* create /proc/irq//smp_affinity_list */ - proc_create_data("smp_affinity_list", 0644, desc->dir, + proc_create_data("smp_affinity_list", umode, desc->dir, &irq_affinity_list_proc_ops, irqp); =20 proc_create_single_data("node", 0444, desc->dir, irq_node_proc_show, diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index 4402d6f5f857..b3b3ce34df63 100644 --- a/kernel/rcu/tiny.c +++ b/kernel/rcu/tiny.c @@ -105,7 +105,7 @@ static inline bool rcu_reclaim_tiny(struct rcu_head *head) } =20 /* Invoke the RCU callbacks whose grace period has elapsed. */ -static __latent_entropy void rcu_process_callbacks(struct softirq_action *un= used) +static __latent_entropy void rcu_process_callbacks(void) { struct rcu_head *next, *list; unsigned long flags; diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index e641cc681901..93bd665637c0 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2855,7 +2855,7 @@ static __latent_entropy void rcu_core(void) queue_work_on(rdp->cpu, rcu_gp_wq, &rdp->strict_work); } =20 -static void rcu_core_si(struct softirq_action *h) +static void rcu_core_si(void) { rcu_core(); } diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9057584ec06d..8dc9385f6da4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12483,7 +12483,7 @@ static int sched_balance_newidle(struct rq *this_rq, = struct rq_flags *rf) * - indirectly from a remote scheduler_tick() for NOHZ idle balancing * through the SMP cross-call nohz_csd_func() */ -static __latent_entropy void sched_balance_softirq(struct softirq_action *h) +static __latent_entropy void sched_balance_softirq(void) { struct rq *this_rq =3D this_rq(); enum cpu_idle_type idle =3D this_rq->idle_balance; diff --git a/kernel/softirq.c b/kernel/softirq.c index 02582017759a..d082e7840f88 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -551,7 +551,7 @@ static void handle_softirqs(bool ksirqd) kstat_incr_softirqs_this_cpu(vec_nr); =20 trace_softirq_entry(vec_nr); - h->action(h); + h->action(); trace_softirq_exit(vec_nr); if (unlikely(prev_count !=3D preempt_count())) { pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited wit= h %08x?\n", @@ -700,7 +700,7 @@ void __raise_softirq_irqoff(unsigned int nr) or_softirq_pending(1UL << nr); } =20 -void open_softirq(int nr, void (*action)(struct softirq_action *)) +void open_softirq(int nr, void (*action)(void)) { softirq_vec[nr].action =3D action; } @@ -760,8 +760,7 @@ static bool tasklet_clear_sched(struct tasklet_struct *t) return false; } =20 -static void tasklet_action_common(struct softirq_action *a, - struct tasklet_head *tl_head, +static void tasklet_action_common(struct tasklet_head *tl_head, unsigned int softirq_nr) { struct tasklet_struct *list; @@ -805,16 +804,16 @@ static void tasklet_action_common(struct softirq_action= *a, } } =20 -static __latent_entropy void tasklet_action(struct softirq_action *a) +static __latent_entropy void tasklet_action(void) { workqueue_softirq_action(false); - tasklet_action_common(a, this_cpu_ptr(&tasklet_vec), TASKLET_SOFTIRQ); + tasklet_action_common(this_cpu_ptr(&tasklet_vec), TASKLET_SOFTIRQ); } =20 -static __latent_entropy void tasklet_hi_action(struct softirq_action *a) +static __latent_entropy void tasklet_hi_action(void) { workqueue_softirq_action(true); - tasklet_action_common(a, this_cpu_ptr(&tasklet_hi_vec), HI_SOFTIRQ); + tasklet_action_common(this_cpu_ptr(&tasklet_hi_vec), HI_SOFTIRQ); } =20 void tasklet_setup(struct tasklet_struct *t, diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index b8ee320208d4..836157e09e25 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1757,7 +1757,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_bas= e *cpu_base, ktime_t now, } } =20 -static __latent_entropy void hrtimer_run_softirq(struct softirq_action *h) +static __latent_entropy void hrtimer_run_softirq(void) { struct hrtimer_cpu_base *cpu_base =3D this_cpu_ptr(&hrtimer_bases); unsigned long flags; diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 64b0d8a0aa0f..760bbeb1f331 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -2440,7 +2440,7 @@ static void run_timer_base(int index) /* * This function runs timers and the timer-tq in bottom half context. */ -static __latent_entropy void run_timer_softirq(struct softirq_action *h) +static __latent_entropy void run_timer_softirq(void) { run_timer_base(BASE_LOCAL); if (IS_ENABLED(CONFIG_NO_HZ_COMMON)) { diff --git a/lib/irq_poll.c b/lib/irq_poll.c index 2d5329a42105..08b242bbdbdf 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -75,7 +75,7 @@ void irq_poll_complete(struct irq_poll *iop) } EXPORT_SYMBOL(irq_poll_complete); =20 -static void __latent_entropy irq_poll_softirq(struct softirq_action *h) +static void __latent_entropy irq_poll_softirq(void) { struct list_head *list =3D this_cpu_ptr(&blk_cpu_iopoll); int rearm =3D 0, budget =3D irq_poll_budget; diff --git a/net/core/dev.c b/net/core/dev.c index 6ea1d20676fb..e24a3bcb496d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5247,7 +5247,7 @@ int netif_rx(struct sk_buff *skb) } EXPORT_SYMBOL(netif_rx); =20 -static __latent_entropy void net_tx_action(struct softirq_action *h) +static __latent_entropy void net_tx_action(void) { struct softnet_data *sd =3D this_cpu_ptr(&softnet_data); =20 @@ -6920,7 +6920,7 @@ static int napi_threaded_poll(void *data) return 0; } =20 -static __latent_entropy void net_rx_action(struct softirq_action *h) +static __latent_entropy void net_rx_action(void) { struct softnet_data *sd =3D this_cpu_ptr(&softnet_data); unsigned long time_limit =3D jiffies + . Date: Mon, 16 Sep 2024 01:39:39 -0700 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Allen Pais , Brian Mak , "Eric W. Biederman" , Jeff Xu , Kees Cook , Roman Kisel Subject: [GIT PULL] execve updates for v6.12-rc1 Hi Linus, Please pull these execve updates for v6.12-rc1. Note there is a trivial merge conflict between this and mm, which was resolved in -next with: https://lore.kernel.org/linux-next/20240909171843.78c294da@canb.auug.org.au/ Thanks! -Kees The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/execve-v6.12-rc1 for you to fetch changes up to 44f65d900698278a8451988abe0d5ca37fd46882: binfmt_elf: mseal address zero (2024-08-14 09:56:48 -0700) ---------------------------------------------------------------- execve updates for v6.12-rc1 - binfmt_elf: Dump smaller VMAs first in ELF cores (Brian Mak) - binfmt_elf: mseal address zero (Jeff Xu) - binfmt_elf, coredump: Log the reason of the failed core dumps (Roman Kisel) ---------------------------------------------------------------- Brian Mak (1): binfmt_elf: Dump smaller VMAs first in ELF cores Jeff Xu (1): binfmt_elf: mseal address zero Roman Kisel (2): coredump: Standartize and fix logging binfmt_elf, coredump: Log the reason of the failed core dumps fs/binfmt_elf.c | 53 +++++++++++---- fs/coredump.c | 166 ++++++++++++++++++++++++++++++++++------------- include/linux/coredump.h | 30 ++++++++- include/linux/mm.h | 10 +++ kernel/signal.c | 21 +++++- mm/mseal.c | 2 +- 6 files changed, 220 insertions(+), 62 deletions(-) -- Kees Cook . Date: Mon, 16 Sep 2024 10:44:05 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] core/debugobjects for v6.12-rc1 Linus, please pull the latest core/debugobjects branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-debugobject= s-2024-09-16 up to: 63a4a9b52c3c: debugobjects: Remove redundant checks in fill_pool() A set of updates for debugobjects: - Use the threshold to check for the pool refill condition and not the run time recorded all time low fill value, which is lower than the threshold and therefore causes refills to be delayed. - KCSAN annotation updates and simplification of the fill_pool() code. Thanks, tglx ------------------> Zhen Lei (3): debugobjects: Fix the compilation attributes of some global variables debugobjects: Fix conditions in fill_pool() debugobjects: Remove redundant checks in fill_pool() lib/debugobjects.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 7cea91e193a8..5ce473ad499b 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -70,10 +70,10 @@ static HLIST_HEAD(obj_to_free); * made at debug_stats_show(). Both obj_pool_min_free and obj_pool_max_used * can be off. */ -static int obj_pool_min_free =3D ODEBUG_POOL_SIZE; -static int obj_pool_free =3D ODEBUG_POOL_SIZE; +static int __data_racy obj_pool_min_free =3D ODEBUG_POOL_SIZE; +static int __data_racy obj_pool_free =3D ODEBUG_POOL_SIZE; static int obj_pool_used; -static int obj_pool_max_used; +static int __data_racy obj_pool_max_used; static bool obj_freeing; /* The number of objs on the global free list */ static int obj_nr_tofree; @@ -84,9 +84,9 @@ static int __data_racy debug_objects_fixups __read_mostly; static int __data_racy debug_objects_warnings __read_mostly; static int __data_racy debug_objects_enabled __read_mostly =3D CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT; -static int __data_racy debug_objects_pool_size __read_mostly +static int debug_objects_pool_size __ro_after_init =3D ODEBUG_POOL_SIZE; -static int __data_racy debug_objects_pool_min_level __read_mostly +static int debug_objects_pool_min_level __ro_after_init =3D ODEBUG_POOL_MIN_LEVEL; =20 static const struct debug_obj_descr *descr_test __read_mostly; @@ -95,8 +95,8 @@ static struct kmem_cache *obj_cache __ro_after_init; /* * Track numbers of kmem_cache_alloc()/free() calls done. */ -static int debug_objects_allocated; -static int debug_objects_freed; +static int __data_racy debug_objects_allocated; +static int __data_racy debug_objects_freed; =20 static void free_obj_work(struct work_struct *work); static DECLARE_DELAYED_WORK(debug_obj_work, free_obj_work); @@ -135,20 +135,19 @@ static void fill_pool(void) return; =20 /* - * Reuse objs from the global free list; they will be reinitialized - * when allocating. + * Reuse objs from the global obj_to_free list; they will be + * reinitialized when allocating. * - * Both obj_nr_tofree and obj_pool_free are checked locklessly; the - * READ_ONCE()s pair with the WRITE_ONCE()s in pool_lock critical - * sections. + * obj_nr_tofree is checked locklessly; the READ_ONCE() pairs with + * the WRITE_ONCE() in pool_lock critical sections. */ - while (READ_ONCE(obj_nr_tofree) && (READ_ONCE(obj_pool_free) < obj_pool_min= _free)) { + if (READ_ONCE(obj_nr_tofree)) { raw_spin_lock_irqsave(&pool_lock, flags); /* * Recheck with the lock held as the worker thread might have * won the race and freed the global free list already. */ - while (obj_nr_tofree && (obj_pool_free < obj_pool_min_free)) { + while (obj_nr_tofree && (obj_pool_free < debug_objects_pool_min_level)) { obj =3D hlist_entry(obj_to_free.first, typeof(*obj), node); hlist_del(&obj->node); WRITE_ONCE(obj_nr_tofree, obj_nr_tofree - 1); . Date: Mon, 16 Sep 2024 02:39:12 -0700 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Andy Shevchenko , Andy Shevchenko , Bryan O'Donoghue , Dikshita Agarwal , "Gustavo A. R. Silva" , Hongbo Li , Justin Stitt , Kees Cook , Laurent Pinchart , Masahiro Yamada , Michal Wajdeczko , Miguel Ojeda , Vikash Garodia Subject: [GIT PULL] hardening updates for v6.12-rc1 Hi Linus, Please pull these hardening updates for v6.12-rc1. Most of this is string_choice additions, with some more straggling flexible array fixes, selftest build improvements, and a new check for nonstring arguments. A notable conflict is that str_up_down() got defined in drm too. So it needs to be removed during the merge, which is rather awkward. It was solved in linux-next with this: https://lore.kernel.org/linux-next/20240909195939.067c1c13@canb.auug.org.au/ Thanks! -Kees The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v6.12-rc1 for you to fetch changes up to c121d5cc3a993cdbfab46a152bdd50227a4d5e8c: lib/string_choices: Add some comments to make more clear for string choices helpers. (2024-09-05 09:50:16 -0700) ---------------------------------------------------------------- hardening updates for v6.12-rc1 - lib/string_choices: Add str_up_down() helper (Michal Wajdeczko) - lib/string_choices: Add str_true_false()/str_false_true() helper (Hongbo Li) - lib/string_choices: Introduce several opposite string choice helpers (Hongbo Li) - lib/string_helpers: rework overflow-dependent code (Justin Stitt) - fortify: refactor test_fortify Makefile to fix some build problems (Masahiro Yamada) - string: Check for "nonstring" attribute on strscpy() arguments - virt: vbox: Replace 1-element arrays with flexible arrays - media: venus: hfi_cmds: Replace 1-element arrays with flexible arrays ---------------------------------------------------------------- Hongbo Li (3): lib/string_choices: Add str_true_false()/str_false_true() helper lib/string_choices: Introduce several opposite string choice helpers lib/string_choices: Add some comments to make more clear for string choices helpers. Justin Stitt (1): lib/string_helpers: rework overflow-dependent code Kees Cook (6): string_choices: Add wrapper for str_down_up() coccinelle: Add rules to find str_down_up() replacements virt: vbox: struct vmmdev_hgcm_pagelist: Replace 1-element array with flexible array media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Replace 1-element array with flexible array media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __counted_by annotation string: Check for "nonstring" attribute on strscpy() arguments Masahiro Yamada (3): fortify: refactor test_fortify Makefile to fix some build problems fortify: move test_fortify.sh to lib/test_fortify/ fortify: use if_changed_dep to record header dependency in *.cmd files Michal Wajdeczko (2): lib/string_choices: Add str_up_down() helper coccinelle: Add rules to find str_up_down() replacements MAINTAINERS | 1 - drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- include/linux/compiler.h | 3 ++ include/linux/compiler_types.h | 7 ++++ include/linux/string.h | 12 ++++--- include/linux/string_choices.h | 29 +++++++++++++++++ include/uapi/linux/vbox_vmmdev_types.h | 5 ++- lib/.gitignore | 2 -- lib/Makefile | 38 +--------------------- lib/string_helpers.c | 3 ++ lib/test_fortify/.gitignore | 2 ++ lib/test_fortify/Makefile | 28 ++++++++++++++++ {scripts => lib/test_fortify}/test_fortify.sh | 0 scripts/coccinelle/api/string_choices.cocci | 46 +++++++++++++++++++++++++++ scripts/remove-stale-files | 2 ++ 15 files changed, 134 insertions(+), 46 deletions(-) create mode 100644 lib/test_fortify/.gitignore create mode 100644 lib/test_fortify/Makefile rename {scripts => lib/test_fortify}/test_fortify.sh (100%) -- Kees Cook . Date: Mon, 16 Sep 2024 11:45:42 +0200 From: Vlastimil Babka To: Linus Torvalds Cc: David Rientjes , Christoph Lameter , Andrew Morton , "linux-mm@kvack.org" , LKML , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Christian Brauner , RCU , Shakeel Butt , "Uladzislau Rezki (Sony)" Subject: [GIT PULL] slab updates for 6.11 Hi Linus, please pull the latest slab updates from: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.12 There's a small conflict with the rcu tree: https://lore.kernel.org/lkml/20240812124748.3725011b@canb.auug.org.au/ For Christian's kmem_cache_create refactoring series, a commit in the vfs.file tree was merged as a prerequisity, and you have already merged vfs.file. Due to vfs.tree based on 6.11-rc4 and slab on v6.11-rc5, the git pull-rq generated diffstat below now however seems to contain also changes from rc5 commits. The shortlog is accurate. Thanks, Vlastimil ====================================== This time it's mostly refactoring and improving APIs for slab users in the kernel, along with some debugging improvements. * kmem_cache_create() refactoring (Christian Brauner) Over the years have been growing new parameters to kmem_cache_create() where most of them are needed only for a small number of caches - most recently the rcu_freeptr_offset parameter. To avoid adding new parameters to kmem_cache_create() and adjusting all its callers, or creating new wrappers such as kmem_cache_create_rcu(), we can now pass extra parameters using the new struct kmem_cache_args. Not explicitly initialized fields default to values interpreted as unused. kmem_cache_create() is for now a wrapper that works both with the new form: kmem_cache_create(name, object_size, args, flags) and the legacy form: kmem_cache_create(name, object_size, align, flags, ctor) * kmem_cache_destroy() waits for kfree_rcu()'s in flight (Vlastimil Babka, Uladislau Rezki) Since SLOB removal, kfree() is allowed for freeing objects allocated by kmem_cache_create(). By extension kfree_rcu() as allowed as well, which can allow converting simple call_rcu() callbacks that only do kmem_cache_free(), as there was never a kmem_cache_free_rcu() variant. However, for caches that can be destroyed e.g. on module removal, the cache owners knew to issue rcu_barrier() first to wait for the pending call_rcu()'s, and this is not sufficient for pending kfree_rcu()'s due to its internal batching optimizations. Ulad has provided a new kvfree_rcu_barrier() and to make the usage less error-prone, kmem_cache_destroy() calls it. Additionally, destroying SLAB_TYPESAFE_BY_RCU caches now again issues rcu_barrier() synchronously instead of using an async work, because the past motivation for async work no longer applies. Users of custom call_rcu() callbacks should however keep calling rcu_barrier() before cache destruction. * Debugging use-after-free in SLAB_TYPESAFE_BY_RCU caches (Jann Horn) Currently, KASAN cannot catch UAFs in such caches as it is legal to access them within a grace period, and we only track the grace period when trying to free the underlying slab page. The new CONFIG_SLUB_RCU_DEBUG option changes the freeing of individual object to be RCU-delayed, after which KASAN can poison them. * Delayed memcg charging (Shakeel Butt) In some cases, the memcg is uknown at allocation time, such as receiving network packets in softirq context. With kmem_cache_charge() these may be now charged later when the user and its memcg is known. * Misc fixes and improvements (Pedro Falcato, Axel Rasmussen, Christoph Lameter, Yan Zhen, Peng Fan, Xavier). ---------------------------------------------------------------- Axel Rasmussen (1): mm, slub: print CPU id (and its node) on slab OOM Christian Brauner (17): slab: s/__kmem_cache_create/do_kmem_cache_create/g slab: add struct kmem_cache_args slab: port kmem_cache_create() to struct kmem_cache_args slab: port kmem_cache_create_rcu() to struct kmem_cache_args slab: port kmem_cache_create_usercopy() to struct kmem_cache_args slab: pass struct kmem_cache_args to create_cache() slab: pull kmem_cache_open() into do_kmem_cache_create() slab: pass struct kmem_cache_args to do_kmem_cache_create() slab: remove rcu_freeptr_offset from struct kmem_cache slab: port KMEM_CACHE() to struct kmem_cache_args slab: port KMEM_CACHE_USERCOPY() to struct kmem_cache_args slab: create kmem_cache_create() compatibility layer file: port to struct kmem_cache_args slab: remove kmem_cache_create_rcu() slab: make kmem_cache_create_usercopy() static inline slab: make __kmem_cache_create() static inline io_uring: port to struct kmem_cache_args Christoph Lameter (1): Reenable NUMA policy support in the slab allocator Jann Horn (2): kasan: catch invalid free before SLUB reinitializes the object slub: Introduce CONFIG_SLUB_RCU_DEBUG Pedro Falcato (1): slab: Warn on duplicate cache names when DEBUG_VM=y Peng Fan (1): mm, slub: avoid zeroing kmalloc redzone Shakeel Butt (1): memcg: add charging of already allocated slab objects Uladzislau Rezki (Sony) (1): rcu/kvfree: Add kvfree_rcu_barrier() API Vlastimil Babka (10): mm, slab: dissolve shutdown_cache() into its caller mm, slab: unlink slabinfo, sysfs and debugfs immediately mm, slab: move kfence_shutdown_cache() outside slab_mutex mm, slab: reintroduce rcu_barrier() into kmem_cache_destroy() mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy() kunit, slub: add test_kfree_rcu() and test_leak_destroy() Merge branch 'vfs.file' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs into slab/for-6.12/kmem_cache_args mm, slab: restore kerneldoc for kmem_cache_create() Merge branch 'slab/for-6.12/rcu_barriers' into slab/for-next Merge branch 'slab/for-6.12/kmem_cache_args' into slab/for-next Xavier (1): mm/slab: Optimize the code logic in find_mergeable() Yan Zhen (1): mm, slab: use kmem_cache_free() to free from kmem_buckets_cache Documentation/core-api/workqueue.rst | 2 +- .../bindings/input/touchscreen/edt-ft5x06.yaml | 1 + Documentation/filesystems/erofs.rst | 2 +- Documentation/filesystems/smb/ksmbd.rst | 26 +- Documentation/kbuild/llvm.rst | 2 +- MAINTAINERS | 36 +- Makefile | 4 +- arch/arm64/kvm/mmu.c | 9 +- arch/arm64/kvm/sys_regs.c | 6 + arch/arm64/kvm/vgic/vgic-debug.c | 2 +- arch/arm64/kvm/vgic/vgic-init.c | 9 +- arch/arm64/kvm/vgic/vgic.c | 5 + arch/arm64/kvm/vgic/vgic.h | 7 + arch/mips/kernel/cevt-r4k.c | 15 +- arch/mips/kernel/cpu-probe.c | 4 + arch/s390/Kconfig | 13 + arch/s390/boot/startup.c | 58 +-- arch/s390/boot/vmem.c | 14 +- arch/s390/boot/vmlinux.lds.S | 7 +- arch/s390/include/asm/page.h | 3 +- arch/s390/kernel/setup.c | 19 +- arch/s390/kernel/vmlinux.lds.S | 2 +- arch/s390/tools/relocs.c | 2 +- block/blk-lib.c | 25 +- drivers/accessibility/speakup/genmap.c | 1 - drivers/accessibility/speakup/makemapdata.c | 1 - drivers/acpi/video_detect.c | 22 ++ drivers/ata/pata_macio.c | 30 +- drivers/bluetooth/btintel.c | 10 - drivers/bluetooth/btintel_pcie.c | 3 - drivers/bluetooth/btmtksdio.c | 3 - drivers/bluetooth/btrtl.c | 1 - drivers/bluetooth/btusb.c | 4 +- drivers/bluetooth/hci_qca.c | 4 +- drivers/bluetooth/hci_vhci.c | 2 - drivers/cxl/core/pci.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 3 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 18 +- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 4 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 14 +- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 20 +- drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 + drivers/gpu/drm/msm/dp/dp_panel.c | 19 +- drivers/gpu/drm/msm/msm_mdss.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 9 +- drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 6 + drivers/gpu/drm/xe/Makefile | 2 + drivers/gpu/drm/xe/display/xe_display.c | 28 +- drivers/gpu/drm/xe/display/xe_dsb_buffer.c | 8 + drivers/gpu/drm/xe/display/xe_fb_pin.c | 3 + drivers/gpu/drm/xe/regs/xe_gt_regs.h | 9 + drivers/gpu/drm/xe/xe_bo.c | 6 +- drivers/gpu/drm/xe/xe_device.c | 32 ++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_exec_queue.c | 24 +- drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 - drivers/gpu/drm/xe/xe_gsc.c | 8 +- drivers/gpu/drm/xe/xe_gt.c | 55 +++ drivers/gpu/drm/xe/xe_gt_pagefault.c | 18 +- drivers/gpu/drm/xe/xe_gt_types.h | 6 + drivers/gpu/drm/xe/xe_guc_submit.c | 4 +- drivers/gpu/drm/xe/xe_hw_fence.c | 9 +- drivers/gpu/drm/xe/xe_hw_fence_types.h | 7 +- drivers/gpu/drm/xe/xe_mmio.c | 28 +- drivers/gpu/drm/xe/xe_observation.c | 1 - drivers/gpu/drm/xe/xe_pat.c | 11 +- drivers/gpu/drm/xe/xe_pm.c | 11 +- drivers/gpu/drm/xe/xe_preempt_fence.c | 3 +- drivers/gpu/drm/xe/xe_preempt_fence_types.h | 2 + drivers/gpu/drm/xe/xe_sched_job.c | 3 +- drivers/gpu/drm/xe/xe_trace.h | 2 +- drivers/gpu/drm/xe/xe_wa.c | 18 + drivers/gpu/drm/xe/xe_wa_oob.rules | 1 + drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 4 +- drivers/hid/hid-asus.c | 3 + drivers/hid/hid-cougar.c | 2 +- drivers/hid/hid-ids.h | 3 + drivers/hid/hid-multitouch.c | 33 ++ drivers/hid/wacom_wac.c | 4 +- drivers/input/joystick/adc-joystick.c | 7 +- drivers/input/misc/uinput.c | 14 + drivers/input/mouse/synaptics.c | 1 + drivers/input/serio/i8042-acpipnpio.h | 29 +- drivers/input/serio/i8042.c | 10 +- drivers/input/touchscreen/ads7846.c | 2 +- drivers/input/touchscreen/edt-ft5x06.c | 6 + drivers/input/touchscreen/himax_hx83112b.c | 14 +- drivers/iommu/iommufd/device.c | 2 +- drivers/iommu/iommufd/selftest.c | 2 +- drivers/mmc/core/mmc_test.c | 9 +- drivers/mmc/host/dw_mmc.c | 8 + drivers/mmc/host/mtk-sd.c | 8 +- drivers/net/bonding/bond_main.c | 21 +- drivers/net/bonding/bond_options.c | 2 +- drivers/net/dsa/microchip/ksz_ptp.c | 5 +- drivers/net/dsa/mv88e6xxx/global1_atu.c | 3 +- drivers/net/dsa/ocelot/felix.c | 126 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 - drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 - drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 5 - drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 +- .../net/ethernet/freescale/dpaa2/dpaa2-switch.c | 7 +- .../net/ethernet/intel/ice/devlink/devlink_port.c | 4 +- drivers/net/ethernet/intel/ice/ice_base.c | 21 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 47 +-- drivers/net/ethernet/intel/igb/igb_main.c | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 23 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 26 +- .../mellanox/mlx5/core/lib/ipsec_fs_roce.c | 6 +- drivers/net/ethernet/mscc/ocelot.c | 279 ++++++++++++- drivers/net/ethernet/mscc/ocelot_fdma.c | 3 +- drivers/net/ethernet/mscc/ocelot_vcap.c | 1 + drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 + drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c | 8 +- drivers/net/ethernet/xilinx/xilinx_axienet.h | 1 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 25 +- drivers/net/phy/realtek.c | 3 +- drivers/net/virtio_net.c | 2 +- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/nvme.h | 1 - drivers/platform/surface/aggregator/controller.c | 3 +- .../platform/surface/surface_aggregator_registry.c | 58 ++- drivers/platform/x86/asus-wmi.c | 16 +- drivers/platform/x86/dell/Kconfig | 1 + drivers/platform/x86/dell/dell-uart-backlight.c | 8 + .../x86/intel/speed_select_if/isst_tpmi_core.c | 3 +- drivers/pmdomain/imx/imx93-pd.c | 5 +- drivers/pmdomain/imx/scu-pd.c | 5 - drivers/power/sequencing/pwrseq-qcom-wcn.c | 2 +- drivers/s390/crypto/ap_bus.c | 7 +- drivers/scsi/sd.c | 3 + drivers/spi/spi-cadence-quadspi.c | 14 +- drivers/spi/spi-fsl-lpspi.c | 31 +- drivers/spi/spi-pxa2xx-pci.c | 15 +- drivers/spi/spi-pxa2xx-platform.c | 26 +- drivers/spi/spi-pxa2xx.c | 20 +- drivers/spi/spi-pxa2xx.h | 3 +- drivers/spi/spi-zynqmp-gqspi.c | 30 +- .../staging/media/atomisp/include/linux/atomisp.h | 1 - drivers/thermal/thermal_debugfs.c | 6 +- drivers/thermal/thermal_of.c | 23 +- drivers/ufs/core/ufshcd.c | 6 +- drivers/ufs/host/ufs-qcom.c | 6 +- fs/bcachefs/alloc_background.c | 66 ++-- fs/bcachefs/alloc_background_format.h | 1 + fs/bcachefs/bcachefs_format.h | 3 +- fs/bcachefs/btree_cache.c | 25 ++ fs/bcachefs/btree_cache.h | 2 + fs/bcachefs/btree_iter.h | 9 + fs/bcachefs/btree_key_cache.c | 31 +- fs/bcachefs/btree_update_interior.c | 46 ++- fs/bcachefs/buckets.c | 74 ++-- fs/bcachefs/buckets_waiting_for_journal.c | 4 +- fs/bcachefs/data_update.c | 209 +++++----- fs/bcachefs/extents.c | 41 ++ fs/bcachefs/extents.h | 1 + fs/bcachefs/fs-io-buffered.c | 2 +- fs/bcachefs/fs-ioctl.c | 3 +- fs/bcachefs/fsck.c | 6 +- fs/bcachefs/journal.c | 2 +- fs/bcachefs/journal_sb.c | 15 + fs/bcachefs/movinggc.c | 2 +- fs/bcachefs/recovery.c | 9 +- fs/bcachefs/replicas.c | 3 +- fs/bcachefs/sb-downgrade.c | 8 +- fs/bcachefs/util.c | 1 - fs/bcachefs/xattr.c | 12 +- fs/erofs/dir.c | 35 +- fs/erofs/inode.c | 18 +- fs/erofs/internal.h | 2 +- fs/erofs/super.c | 26 +- fs/erofs/zutil.c | 3 +- fs/file_table.c | 11 +- fs/nfs/callback_xdr.c | 6 +- fs/nfs/delegation.c | 15 +- fs/nfs/nfs4proc.c | 12 +- fs/nfs/pnfs.c | 5 +- fs/nfs/super.c | 2 + fs/smb/client/cifsfs.c | 6 +- fs/smb/client/cifsglob.h | 6 +- fs/smb/client/connect.c | 3 + fs/smb/client/file.c | 4 +- fs/smb/client/ioctl.c | 2 + fs/smb/client/link.c | 1 + fs/smb/client/reparse.c | 11 +- fs/smb/server/connection.c | 34 +- fs/smb/server/connection.h | 3 +- fs/smb/server/mgmt/user_session.c | 9 + fs/smb/server/oplock.c | 2 +- fs/smb/server/smb2pdu.c | 31 +- fs/smb/server/smb_common.h | 4 +- fs/super.c | 4 +- include/acpi/video.h | 1 + include/linux/blkdev.h | 7 +- include/linux/dsa/ocelot.h | 47 +++ include/linux/kasan.h | 63 ++- include/linux/panic.h | 1 + include/linux/rcutiny.h | 5 + include/linux/rcutree.h | 1 + include/linux/slab.h | 228 ++++++++++- include/net/bluetooth/hci.h | 17 +- include/net/bluetooth/hci_core.h | 2 +- include/net/dsa.h | 16 +- include/net/kcm.h | 1 + include/scsi/scsi_cmnd.h | 2 +- include/soc/mscc/ocelot.h | 12 +- include/soc/mscc/ocelot_vcap.h | 2 + include/trace/events/rpcrdma.h | 36 ++ include/uapi/drm/xe_drm.h | 8 +- include/ufs/ufshcd.h | 8 + io_uring/io_uring.c | 14 +- io_uring/kbuf.c | 9 +- kernel/cgroup/cpuset.c | 38 +- kernel/panic.c | 8 +- kernel/printk/printk.c | 2 +- kernel/rcu/tree.c | 109 +++++- kernel/workqueue.c | 50 +-- lib/slub_kunit.c | 31 ++ mm/Kconfig.debug | 32 ++ mm/kasan/common.c | 62 +-- mm/kasan/kasan_test.c | 46 +++ mm/slab.h | 13 +- mm/slab_common.c | 354 ++++++----------- mm/slub.c | 412 +++++++++++++------- net/bluetooth/hci_core.c | 19 +- net/bluetooth/hci_event.c | 2 +- net/bluetooth/mgmt.c | 4 + net/bluetooth/smp.c | 144 +++---- net/core/netpoll.c | 2 - net/dsa/tag.c | 5 +- net/dsa/tag.h | 135 +++++-- net/dsa/tag_ocelot.c | 37 +- net/ipv4/inet_connection_sock.c | 5 +- net/ipv4/tcp_ipv4.c | 14 + net/ipv4/udp_offload.c | 3 +- net/ipv6/ip6_output.c | 10 + net/ipv6/ip6_tunnel.c | 12 +- net/iucv/iucv.c | 4 +- net/kcm/kcmsock.c | 4 + net/mctp/test/route-test.c | 2 +- net/mptcp/pm.c | 13 - net/mptcp/pm_netlink.c | 142 ++++--- net/mptcp/protocol.h | 3 - net/netfilter/nf_flow_table_inet.c | 3 + net/netfilter/nf_flow_table_ip.c | 3 + net/netfilter/nft_counter.c | 9 +- net/openvswitch/datapath.c | 2 +- net/sched/sch_netem.c | 47 ++- net/sunrpc/xprtrdma/ib_client.c | 6 +- samples/trace_events/trace_custom_sched.c | 1 - scripts/Makefile.build | 2 +- scripts/Makefile.lib | 28 +- scripts/Makefile.modfinal | 2 +- scripts/Makefile.vmlinux | 2 +- scripts/Makefile.vmlinux_o | 2 +- scripts/kconfig/merge_config.sh | 2 + scripts/link-vmlinux.sh | 3 +- sound/soc/codecs/cs42l42.c | 1 - tools/testing/cxl/Kbuild | 1 + tools/testing/cxl/test/mock.c | 12 + .../selftests/drivers/net/mlxsw/ethtool_lanes.sh | 3 +- .../selftests/net/forwarding/bridge_vlan_aware.sh | 54 ++- tools/testing/selftests/net/forwarding/lib.sh | 57 +++ .../selftests/net/forwarding/local_termination.sh | 431 +++++++++++++++++---- tools/testing/selftests/net/mptcp/mptcp_join.sh | 76 +++- tools/testing/selftests/net/udpgro.sh | 53 +-- tools/testing/selftests/tc-testing/tdc.py | 1 - 275 files changed, 4049 insertions(+), 1673 deletions(-) . Date: Mon, 16 Sep 2024 12:07:47 +0200 From: Joerg Roedel To: Linus Torvalds Cc: Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux.dev Subject: [git pull] IOMMU Updates for Linux v6.12 Hi Linus, The following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63: Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git tags/iommu-updates-v6.12 for you to fetch changes up to 97162f6093d263aa1c2c7e883912f922ea633512: Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next (2024-09-13 12:53:05 +0200) ---------------------------------------------------------------- IOMMU Updates for Linux v6.12 Including: - Core changes: - Allow ATS on VF when parent device is identity mapped. - Optimize unmap path on ARM io-pagetable implementation. - Use of_property_present(). - ARM-SMMU changes: - SMMUv2: - Devicetree binding updates for Qualcomm MMU-500 implementations. - Extend workarounds for broken Qualcomm hypervisor to avoid touching features that are not available (e.g. 16KiB page support, reserved context banks). - SMMUv3: - Support for NVIDIA's custom virtual command queue hardware. - Fix Stage-2 stall configuration and extend tests to cover this area. - A bunch of driver cleanups, including simplification of the master rbtree code. - Plus minor cleanups and fixes across both drivers. - Intel VT-d changes: - Retire si_domain and convert to use static identity domain. - Batched IOTLB/dev-IOTLB invalidation. - Small code refactoring and cleanups. - AMD-Vi changes: - Cleanup and refactoring of io-pagetable code. - Add parameter to limit the used io-pagesizes. - Other cleanups and fixes. ---------------------------------------------------------------- Ashish Mhetre (1): iommu/io-pgtable-arm: Optimise non-coherent unmap Dan Carpenter (2): iommu/arm-smmu-v3: Fix a NULL vs IS_ERR() check iommu/tegra241-cmdqv: Fix ioremap() error handling in probe() Dmitry Baryshkov (1): iommu/arm-smmu-qcom: apply num_context_bank fixes for SDM630 / SDM660 Eliav Bar-ilan (1): iommu/amd: Fix argument order in amd_iommu_dev_flush_pasid_all() Jason Gunthorpe (26): iommu: Allow ATS to work on VFs when the PF uses IDENTITY iommu/arm-smmu-v3: Add struct arm_smmu_impl_ops iommu/amd: Move allocation of the top table into v1_alloc_pgtable iommu/amd: Allocate the page table root using GFP_KERNEL iommu/amd: Set the pgsize_bitmap correctly iommu/amd: Remove amd_iommu_domain_update() from page table freeing iommu/amd: Remove the amd_iommu_domain_set_pt_root() and related iommu/amd: Rename struct amd_io_pgtable iopt to pgtbl iommu/amd: Remove amd_io_pgtable::pgtbl_cfg iommu/amd: Store the nid in io_pgtable_cfg instead of the domain iommu/amd: Narrow the use of struct protection_domain to invalidation iommu/amd: Remove conditions from domain free paths iommu/amd: Fix typo of , instead of ; iommu/amd: Remove the confusing dummy iommu_flush_ops tlb ops iommu/amd: Correct the reported page sizes from the V1 table iommu/amd: Do not set the D bit on AMD v2 table entries iommu/arm-smmu-v3: Use the new rb tree helpers iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx() iommu/arm-smmu-v3: Add types for each level of the 2 level stream table iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg iommu/arm-smmu-v3: Remove strtab_base/cfg iommu/arm-smmu-v3: Do not use devm for the cd table allocations iommu/arm-smmu-v3: Shrink the cdtab l1_desc array iommu/arm-smmu-v3: Add types for each level of the CD table iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg iommu/amd: Test for PAGING domains before freeing a domain Joerg Roedel (2): iommu/amd: Add kernel parameters to limit V1 page-sizes Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next Konrad Dybcio (1): iommu/arm-smmu-qcom: Work around SDM845 Adreno SMMU w/ 16K pages Lu Baolu (10): iommu/vt-d: Require DMA domain if hardware not support passthrough iommu/vt-d: Remove identity mappings from si_domain iommu/vt-d: Always reserve a domain ID for identity setup iommu/vt-d: Remove has_iotlb_device flag iommu/vt-d: Factor out helpers from domain_context_mapping_one() iommu/vt-d: Add support for static identity domain iommu/vt-d: Cleanup si_domain iommu/vt-d: Move PCI PASID enablement to probe path iommu/vt-d: Unconditionally flush device TLB for pasid table updates iommu/vt-d: Add qi_batch for dmar_domain Marc Gonzalez (1): iommu/arm-smmu-qcom: hide last LPASS SMMU context bank from linux Mostafa Saleh (2): iommu/arm-smmu-v3: Match Stall behaviour for S2 iommu/arm-smmu-v3-test: Test masters with stall enabled Nate Watterson (1): iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV Nicolin Chen (11): iommu/arm-smmu-v3: Issue a batch of commands to the same cmdq iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_build_sync_cmd iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_init iommu/arm-smmu-v3: Make symbols public for CONFIG_TEGRA241_CMDQV iommu/arm-smmu-v3: Add ARM_SMMU_OPT_TEGRA241_CMDQV iommu/arm-smmu-v3: Add acpi_smmu_iort_probe_model for impl iommu/arm-smmu-v3: Start a new batch if new command is not supported iommu/tegra241-cmdqv: Limit CMDs for VCMDQs of a guest owned VINTF iommu/tegra241-cmdqv: Fix -Wformat-truncation warnings in lvcmdq_error_header iommu/tegra241-cmdqv: Drop static at local variable iommu/tegra241-cmdqv: Do not allocate vcmdq until dma_set_mask_and_coherent Nikunj Kela (1): dt-bindings: arm-smmu: document the support on SA8255p Rob Clark (1): iommu/arm-smmu: Un-demote unhandled-fault msg Rob Herring (Arm) (1): iommu: Use of_property_present() Sanjay K Kumar (1): iommu/vt-d: Fix potential lockup if qi_submit_sync called with 0 count Suravee Suthikulpanit (1): iommu/amd: Update PASID, GATS, GLX, SNPAVICSUP feature related macros Tina Zhang (3): iommu/vt-d: Factor out invalidation descriptor composition iommu/vt-d: Refactor IOTLB and Dev-IOTLB flush for batching iommu/vt-d: Introduce batched cache invalidation Vasant Hegde (9): iommu/amd: Add blocked domain support iommu/amd: Update event log pointer as soon as processing is complete iommu/amd: Make amd_iommu_is_attach_deferred() static iommu/amd: Remove unused DTE_GCR3_INDEX_* macros iommu/amd: Handle error path in amd_iommu_probe_device() iommu/amd: Make amd_iommu_dev_flush_pasid_all() static iommu/amd: Make amd_iommu_domain_flush_complete() static iommu/amd: Rework amd_iommu_update_and_flush_device_table() iommu/amd: Make amd_iommu_dev_update_dte() static Will Deacon (1): Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates Zhang Zekun (1): iommu/arm-smmu-v3: Remove the unused empty definition Zhenhua Huang (1): dt-bindings: arm-smmu: Add compatible for QCS8300 SoC Documentation/admin-guide/kernel-parameters.txt | 17 +- .../devicetree/bindings/iommu/arm,smmu.yaml | 5 + MAINTAINERS | 1 + drivers/iommu/Kconfig | 11 + drivers/iommu/amd/amd_iommu.h | 26 +- drivers/iommu/amd/amd_iommu_types.h | 35 +- drivers/iommu/amd/init.c | 16 +- drivers/iommu/amd/io_pgtable.c | 105 +-- drivers/iommu/amd/io_pgtable_v2.c | 56 +- drivers/iommu/amd/iommu.c | 210 +++-- drivers/iommu/amd/pasid.c | 2 +- drivers/iommu/arm/arm-smmu-v3/Makefile | 1 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 83 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 578 +++++++------ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 135 ++- drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 909 +++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 28 + drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +- drivers/iommu/fsl_pamu_domain.c | 4 +- drivers/iommu/intel/cache.c | 239 ++++-- drivers/iommu/intel/dmar.c | 109 +-- drivers/iommu/intel/iommu.c | 504 +++++------- drivers/iommu/intel/iommu.h | 128 ++- drivers/iommu/intel/nested.c | 3 +- drivers/iommu/intel/pasid.c | 12 +- drivers/iommu/intel/svm.c | 7 +- drivers/iommu/io-pgtable-arm.c | 31 +- drivers/iommu/of_iommu.c | 2 +- drivers/pci/ats.c | 33 + include/linux/io-pgtable.h | 4 + include/linux/pci-ats.h | 3 + 31 files changed, 2259 insertions(+), 1040 deletions(-) create mode 100644 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c Please pull. Thanks, Joerg . Date: Mon, 16 Sep 2024 11:50:34 +0000 From: Tzung-Bi Shih To: torvalds@linux-foundation.org Cc: tzungbi@kernel.org, linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev Subject: [GIT PULL] chrome-platform changes for v6.12 --I1sVqA+P9SxrzZQb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Linus, Please pull chrome-platform changes for v6.12. Thanks, TzungBi ------ The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git tags/chrome-platform-for-6.12 for you to fetch changes up to d1b35e6d34e9b46fbf98444dd7aa114c032e9ac0: platform/chrome: chromeos_laptop: Use kmemdup_array (2024-08-23 21:48:43 +0800) ---------------------------------------------------------------- chrome platform changes for 6.12 * Improvements - Adjust DMI match table for Framework Laptop for improving maintainabilities for both legacy and new models. - Add .remove driver callback for cros_ec_typec for allowing the driver to be rebound. - Use kmemdup_array() for taking care possible overflows. ---------------------------------------------------------------- Dustin L. Howett (1): platform/chrome: cros_ec_lpc: switch primary DMI data for Framework Laptop Thadeu Lima de Souza Cascardo (1): platform/chrome: cros_ec_typec: add remove driver hook Yu Jiaoliang (1): platform/chrome: chromeos_laptop: Use kmemdup_array drivers/platform/chrome/chromeos_laptop.c | 7 +++--- drivers/platform/chrome/cros_ec_lpc.c | 36 +++++++++++++++++++++++-------- drivers/platform/chrome/cros_ec_typec.c | 10 +++++++++ 3 files changed, 40 insertions(+), 13 deletions(-) --I1sVqA+P9SxrzZQb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQS0yQeDP3cjLyifNRUrxTEGBto89AUCZugbigAKCRArxTEGBto8 9JbqAP4gSmeGYr+Wpp/WDYLezcR8Ag9Yg2oA6EDvttljrACQVwEA8KDshHAl52lt VpLGWmcf5q8+WZ7M3t8GBRmvY1LGigI= =E9hl -----END PGP SIGNATURE----- --I1sVqA+P9SxrzZQb-- . Date: Mon, 16 Sep 2024 14:13:58 +0200 From: "Jason A. Donenfeld" To: Linus Torvalds Cc: linux-kernel@vger.kernel.org Subject: [GIT PULL] random number generator updates for 6.12-rc1 Hi Linus, Originally I'd planned on sending each of the vDSO getrandom() architecture ports to their respective arch trees. But as we started to work on this, we found lots of interesting issues in the shared code and infrastructure, the fixes for which the various archs needed to base their work. So in the end, this turned into a nice collaborative effort fixing up issues and porting to 5 new architectures -- arm64, powerpc64, powerpc32, s390x, and loongarch64 -- with everybody pitching in and commenting on each other's code. It was a fun development cycle. This pull request contains: - Numerous fixups to the vDSO selftest infrastructure, getting it running successfully on more platforms, and fixing bugs in it. - Additions to the vDSO getrandom & chacha selftests. Basically every time manual review unearthed a bug in a revision of an arch patch, or an ambiguity, the tests were augmented. By the time the last arch was submitted for review, s390x, v1 of the series was essentially fine right out of the gate. - Fixes to the the generic C implementation of vDSO getrandom, to build and run successfully on all archs, decoupling it from assumptions we had (unintentionally) made on x86_64 that didn't carry through to the other architectures. - Port of vDSO getrandom to LoongArch64, from Xi Ruoyao and acked by Huacai Chen. - Port of vDSO getrandom to ARM64, from Adhemerval Zanella and acked by Will Deacon. - Port of vDSO getrandom to PowerPC, in both 32-bit and 64-bit varieties, from Christophe Leroy and acked by Michael Ellerman. - Port of vDSO getrandom to S390X from Heiko Carstens, the arch maintainer. While it'd be natural for there to be things to fix up over the course of the 6.12 cycle, these patches got a decent amount of review from a fairly diverse crew of folks on the mailing lists, and, for the most part, they've been cooking in linux-next, which has been helpful for ironing out build issues. In terms of architectures, I think that mostly takes care of the important 64-bit archs with hardware still being produced and running production loads in settings where vDSO getrandom is likely to help. Arguably there's still RISC-V left, and we'll see for 6.13 whether they find it useful and submit a port. I haven't seen any merge conflicts from Stephen with linux-next. But this pull does touch lots of different archs, so I was thinking it'd probably make sense to merge this early in the cycle, before merging the architectures pulls from the various archs. But you know best there, of course. On a more personal note, sorry I'm unable to make it to Vienna this year; it would have been nice to talk about things face to face. We'll see about next year. Please pull! Thanks, Jason The following changes since commit d5d547aa7b51467b15d9caa86b116f8c2507c72a: Merge tag 'random-6.11-rc6-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random (2024-08-29 13:59:18 +1200) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-6.12-rc1-for-linus for you to fetch changes up to 210860e7f7337e47e77577fa5bb168767e2d8a1e: selftests: vDSO: check cpu caps before running chacha test (2024-09-16 13:22:04 +0200) ---------------------------------------------------------------- Random number generator updates for Linux 6.12-rc1. ---------------------------------------------------------------- Adhemerval Zanella (1): arm64: vDSO: Wire up getrandom() vDSO implementation Christophe Leroy (21): selftests: vDSO: don't hard-code location of vDSO sources selftests: vDSO: fix include order in build of test_vdso_chacha selftests: vDSO: look for arch-specific function name in getrandom test selftests: vDSO: fix vDSO name for powerpc selftests: vDSO: fix vdso_config for powerpc selftests: vDSO: fix vDSO symbols lookup for powerpc64 selftests: vDSO: fix the way vDSO functions are called for powerpc selftests: vDSO: use parse_vdso.h in vdso_test_abi random: vDSO: don't use 64-bit atomics on 32-bit architectures random: vDSO: add __arch_get_k_vdso_rng_data() helper for data page access random: vDSO: add missing c-getrandom-y in Makefile random: vDSO: avoid call to out of line memset() random: vDSO: minimize and simplify header includes selftests: vDSO: build tests with O2 optimization selftests: vDSO: also test counter in vdso_test_chacha powerpc/vdso: Fix VDSO data access when running in a non-root time namespace mm: Define VM_DROPPABLE for powerpc/32 powerpc/vdso32: Add crtsavres powerpc/vdso: Refactor CFLAGS for CVDSO build powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32 powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO64 Heiko Carstens (8): selftests: vDSO: fix vdso_config for s390 s390/facility: Disable compile time optimization for decompressor code s390/alternatives: Remove ALT_FACILITY_EARLY s390/facility: Let test_facility() generate static branch if possible s390/module: Provide find_section() helper s390/vdso: Allow alternatives in vdso code s390/vdso: Move vdso symbol handling to separate header file s390/vdso: Wire up getrandom() vdso implementation Jason A. Donenfeld (11): selftests: vDSO: simplify getrandom thread local storage and structs selftests: vDSO: separate LDLIBS from CFLAGS for libsodium selftests: vDSO: remove unnecessary command line defs from chacha test selftests: vDSO: skip getrandom test if architecture is unsupported selftests: vDSO: quash clang omitted parameter warning in getrandom test selftests: vDSO: ensure vgetrandom works in a time namespace random: vDSO: move prototype of arch chacha function to vdso/getrandom.h selftests: vDSO: open code basic chacha instead of linking to libsodium selftests: vDSO: fix cross build for getrandom and chacha tests selftests: vDSO: don't include generated headers for chacha test selftests: vDSO: check cpu caps before running chacha test Jens Remus (1): selftests: vDSO: fix ELF hash table entry size for s390x Mark Rutland (1): arm64: alternative: make alternative_has_cap_likely() VDSO compatible Xi Ruoyao (4): selftests: vDSO: add --cflags for pkg-config command querying libsodium selftests: vDSO: use KHDR_INCLUDES for UAPI headers for getrandom test random: vDSO: add a __vdso_getrandom prototype for all architectures LoongArch: vDSO: Wire up getrandom() vDSO implementation Documentation/ABI/stable/vdso | 8 +- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/alternative-macros.h | 4 + arch/arm64/include/asm/mman.h | 6 +- arch/arm64/include/asm/vdso/getrandom.h | 50 +++ arch/arm64/include/asm/vdso/vsyscall.h | 15 + arch/arm64/kernel/vdso.c | 6 - arch/arm64/kernel/vdso/Makefile | 25 +- arch/arm64/kernel/vdso/vdso.lds.S | 4 + arch/arm64/kernel/vdso/vgetrandom-chacha.S | 172 ++++++++++ arch/arm64/kernel/vdso/vgetrandom.c | 15 + arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/vdso/getrandom.h | 39 +++ arch/loongarch/include/asm/vdso/vdso.h | 6 + arch/loongarch/include/asm/vdso/vsyscall.h | 8 + arch/loongarch/kernel/vdso.c | 1 + arch/loongarch/vdso/Makefile | 7 +- arch/loongarch/vdso/vdso.lds.S | 1 + arch/loongarch/vdso/vgetrandom-chacha.S | 242 ++++++++++++++ arch/loongarch/vdso/vgetrandom.c | 10 + arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/mman.h | 2 +- arch/powerpc/include/asm/vdso/getrandom.h | 54 +++ arch/powerpc/include/asm/vdso/vsyscall.h | 6 + arch/powerpc/include/asm/vdso_datapage.h | 17 + arch/powerpc/kernel/asm-offsets.c | 3 + arch/powerpc/kernel/vdso/Makefile | 57 ++-- arch/powerpc/kernel/vdso/cacheflush.S | 2 +- arch/powerpc/kernel/vdso/datapage.S | 4 +- arch/powerpc/kernel/vdso/getrandom.S | 58 ++++ arch/powerpc/kernel/vdso/gettimeofday.S | 13 - arch/powerpc/kernel/vdso/vdso32.lds.S | 1 + arch/powerpc/kernel/vdso/vdso64.lds.S | 1 + arch/powerpc/kernel/vdso/vgetrandom-chacha.S | 365 +++++++++++++++++++++ arch/powerpc/kernel/vdso/vgetrandom.c | 14 + arch/s390/Kconfig | 1 + arch/s390/include/asm/alternative.h | 6 +- arch/s390/include/asm/facility.h | 37 ++- arch/s390/include/asm/fpu-insn-asm.h | 22 ++ arch/s390/include/asm/module.h | 14 + arch/s390/include/asm/vdso-symbols.h | 17 + arch/s390/include/asm/vdso.h | 12 - arch/s390/include/asm/vdso/getrandom.h | 40 +++ arch/s390/include/asm/vdso/vsyscall.h | 15 + arch/s390/kernel/compat_signal.c | 2 +- arch/s390/kernel/entry.S | 2 +- arch/s390/kernel/signal.c | 2 +- arch/s390/kernel/vdso.c | 26 +- arch/s390/kernel/vdso64/Makefile | 9 +- arch/s390/kernel/vdso64/vdso.h | 1 + arch/s390/kernel/vdso64/vdso64.lds.S | 7 + arch/s390/kernel/vdso64/vgetrandom-chacha.S | 185 +++++++++++ arch/s390/kernel/vdso64/vgetrandom.c | 14 + arch/x86/entry/vdso/vgetrandom.c | 2 - arch/x86/entry/vdso/vma.c | 3 + arch/x86/include/asm/pvclock.h | 1 + arch/x86/include/asm/vdso/getrandom.h | 13 - arch/x86/include/asm/vdso/vsyscall.h | 10 +- drivers/char/random.c | 12 +- fs/proc/task_mmu.c | 4 +- include/asm-generic/unaligned.h | 11 +- include/linux/mm.h | 4 +- include/trace/events/mmflags.h | 4 +- include/vdso/getrandom.h | 28 ++ include/vdso/helpers.h | 1 + include/vdso/unaligned.h | 15 + lib/vdso/Makefile | 1 + lib/vdso/getrandom.c | 27 +- tools/arch/arm64/vdso | 1 + tools/arch/loongarch/vdso | 1 + tools/arch/powerpc/vdso | 1 + tools/arch/s390/vdso | 1 + tools/arch/x86/vdso | 1 + tools/include/asm/alternative.h | 10 + tools/include/generated/asm-offsets.h | 0 tools/include/generated/asm/cpucap-defs.h | 0 tools/include/generated/asm/sysreg-defs.h | 0 tools/include/linux/compiler.h | 4 + tools/include/linux/linkage.h | 4 + tools/testing/selftests/vDSO/Makefile | 21 +- tools/testing/selftests/vDSO/parse_vdso.c | 17 +- tools/testing/selftests/vDSO/vdso_call.h | 70 ++++ tools/testing/selftests/vDSO/vdso_config.h | 18 +- tools/testing/selftests/vDSO/vdso_test_abi.c | 14 +- tools/testing/selftests/vDSO/vdso_test_chacha.c | 103 +++++- .../testing/selftests/vDSO/vdso_test_correctness.c | 21 +- tools/testing/selftests/vDSO/vdso_test_getcpu.c | 3 +- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 128 +++++--- .../selftests/vDSO/vdso_test_gettimeofday.c | 3 +- 89 files changed, 1949 insertions(+), 239 deletions(-) create mode 100644 arch/arm64/include/asm/vdso/getrandom.h create mode 100644 arch/arm64/kernel/vdso/vgetrandom-chacha.S create mode 100644 arch/arm64/kernel/vdso/vgetrandom.c create mode 100644 arch/loongarch/include/asm/vdso/getrandom.h create mode 100644 arch/loongarch/vdso/vgetrandom-chacha.S create mode 100644 arch/loongarch/vdso/vgetrandom.c create mode 100644 arch/powerpc/include/asm/vdso/getrandom.h create mode 100644 arch/powerpc/kernel/vdso/getrandom.S create mode 100644 arch/powerpc/kernel/vdso/vgetrandom-chacha.S create mode 100644 arch/powerpc/kernel/vdso/vgetrandom.c create mode 100644 arch/s390/include/asm/vdso-symbols.h create mode 100644 arch/s390/include/asm/vdso/getrandom.h create mode 100644 arch/s390/kernel/vdso64/vgetrandom-chacha.S create mode 100644 arch/s390/kernel/vdso64/vgetrandom.c create mode 100644 include/vdso/unaligned.h create mode 120000 tools/arch/arm64/vdso create mode 120000 tools/arch/loongarch/vdso create mode 120000 tools/arch/powerpc/vdso create mode 120000 tools/arch/s390/vdso create mode 120000 tools/arch/x86/vdso create mode 100644 tools/include/generated/asm-offsets.h create mode 100644 tools/include/generated/asm/cpucap-defs.h create mode 100644 tools/include/generated/asm/sysreg-defs.h create mode 100644 tools/testing/selftests/vDSO/vdso_call.h . Date: Mon, 16 Sep 2024 07:35:05 -0600 From: Jonathan Corbet To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [GIT PULL] Documentation for 6.12 The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) are available in the Git repository at: git://git.lwn.net/linux.git tags/docs-6.12 for you to fetch changes up to 4f77c3462308c62ffe7129cc18b9ac937f44b5a5: Remove duplicate "and" in 'Linux NVMe docs. (2024-09-10 15:44:20 -0600) ---------------------------------------------------------------- Another relatively mundane cycle for docs: - The beginning of an EEVDF scheduler document - More Chinese translations - A rethrashing of our bisection documentation ...plus the usual array of smaller fixes, and more than the usual number of typo fixes. ---------------------------------------------------------------- Abdul Rahim (1): Documentation: PCI: fix typo in pci.rst Akira Yokosawa (1): docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal bl= ocks Alyssa Ross (1): Documentation: ioctl: document 0x07 ioctl code Amit Vadhavana (1): Documentation: Fix spelling mistakes Andrew Kreimer (2): accel/qaic: Fix a typo docs/process: fix typos Aryabhatta Dey (3): docs: process: fix typos in Documentation/process/backporting.rst docs: leds: fix typo in Documentation/leds/leds-mlxcpld.rst Documentation/gpu: Fix typo in Documentation/gpu/komeda-kms.rst Benjamin Poirier (1): Documentation: Add detailed explanation for 'N' taint flag Bibo Mao (1): Loongarch: KVM: Add KVM hypercalls documentation for LoongArch Breno Leitao (1): docs: fault-injection: document cache-filter feature for failslab Carlos Bilbao (1): docs: scheduler: Start documenting the EEVDF scheduler Dave Martin (1): docs/core-api: memory-allocation: GFP_NOWAIT doesn't need __GFP_NOWARN David Hunter (1): Documentation: Capitalize Fahrenheit in watchdog-api.rst Dennis Lam (4): docs:mm: fix spelling mistakes in heterogeneous memory management page docs:mm: fixed spelling and grammar mistakes on vmalloc kernel stack = page docs:filesystem: fix mispelled words on autofs page docs:filesystems: fix spelling and grammar mistakes Dongliang Mu (6): docs/zh_CN: add the translation of kbuild/headers_install.rst scripts: fix all issues reported by pylint doc-guide: add help documentation checktransupdate.rst docs/zh_CN: fix a broken reference docs/zh_CN: update the translation of security-bugs docs/zh_CN: add the translation of kbuild/gcc-plugins.rst Dr. David Alan Gilbert (1): Documentation/fs/9p: Expand goo.gl link Gianfranco Trad (1): Fix typo "allocateed" to allocated Guilherme G. Piccoli (1): Documentation: Document the kernel flag bdev_allow_write_mounted Haoyang Liu (2): docs/zh_CN: Add dev-tools/kcsan Chinese translation docs: update dev-tools/kcsan.rst url about KTSAN I Hsin Cheng (1): docs: scheduler: completion: Update member of struct completion Jakub Kicinski (1): MAINTAINERS: add Documentation/dev-tools/ to workflows@ Jani Nikula (2): get_maintainer: add --bug option to print bug reporting info Documentation: admin-guide: direct people to bug trackers, if specifi= ed Jiamu Sun (1): docs: improve comment consistency in .muttrc example configuration Jonathan Corbet (1): Merge tag 'v6.11-rc6' into docs-mw Karol Przybylski (1): docs: block: Fix grammar and spelling mistakes in bfq-iosched.rst Mark Brown (1): docs: submitting-patches: Advertise b4 Ming Lei (1): Documentation: add ublk driver ioctl numbers Philipp Stanner (1): Documentation: devres: fix error about PCI devres Sebastian Muxel (1): scripts: sphinx-pre-install: remove unnecessary double check for $cur= _version SeongJae Park (2): Docs/translations/ko_KR: link howto.rst with other language versions Docs/translations/ko_KR: link memory-barriers wrapper with other lang= uage versions Sergio Gonz=C3=A1lez Collado (1): docs/sp_Sp: Add translation to spanish of the documentation related t= o EEVDF Shibu Kumar (1): docs: dm-crypt: Removal of unexpected indentation error Shivam Chaudhary (1): Remove duplicate "and" in 'Linux NVMe docs. Thorsten Leemhuis (1): docs: bug-bisect: rewrite to better match the other bisecting text Thorsten Scherer (1): doc: iio: Fix sysfs paths ganjie (1): Documentation: dontdiff: remove 'utf8data.h' Documentation/PCI/pci.rst | 2 +- Documentation/accel/qaic/qaic.rst | 2 +- Documentation/admin-guide/bug-bisect.rst | 208 +++++++++----- Documentation/admin-guide/bug-hunting.rst | 17 +- .../admin-guide/device-mapper/dm-crypt.rst | 11 +- Documentation/admin-guide/kernel-parameters.txt | 12 + Documentation/admin-guide/tainted-kernels.rst | 2 + .../arch/arm/stm32/stm32-dma-mdma-chaining.rst | 4 +- Documentation/arch/arm64/cpu-hotplug.rst | 2 +- Documentation/arch/powerpc/ultravisor.rst | 2 +- Documentation/arch/riscv/vector.rst | 2 +- Documentation/arch/x86/mds.rst | 2 +- Documentation/arch/x86/x86_64/fsgs.rst | 4 +- Documentation/block/bfq-iosched.rst | 22 +- Documentation/core-api/memory-allocation.rst | 5 +- Documentation/dev-tools/kcsan.rst | 3 +- Documentation/doc-guide/checktransupdate.rst | 54 ++++ Documentation/doc-guide/index.rst | 1 + Documentation/dontdiff | 2 +- Documentation/driver-api/driver-model/devres.rst | 2 +- Documentation/driver-api/iio/buffers.rst | 8 +- Documentation/driver-api/iio/core.rst | 14 +- Documentation/fault-injection/fault-injection.rst | 22 +- Documentation/filesystems/9p.rst | 2 +- Documentation/filesystems/autofs.rst | 4 +- Documentation/filesystems/journalling.rst | 6 +- Documentation/gpu/komeda-kms.rst | 2 +- Documentation/leds/leds-mlxcpld.rst | 2 +- Documentation/mm/hmm.rst | 10 +- Documentation/mm/vmalloced-kernel-stacks.rst | 8 +- Documentation/nvme/feature-and-quirk-policy.rst | 6 +- Documentation/process/backporting.rst | 6 +- Documentation/process/coding-style.rst | 2 +- Documentation/process/email-clients.rst | 2 +- Documentation/process/maintainer-tip.rst | 2 +- Documentation/process/submitting-patches.rst | 8 + Documentation/scheduler/completion.rst | 2 +- Documentation/scheduler/index.rst | 1 + Documentation/scheduler/sched-design-CFS.rst | 10 +- Documentation/scheduler/sched-eevdf.rst | 43 +++ Documentation/sphinx/kerneldoc-preamble.sty | 2 + .../ko_KR/core-api/wrappers/memory-barriers.rst | 18 ++ Documentation/translations/ko_KR/index.rst | 16 +- .../translations/ko_KR/{ =3D> process}/howto.rst | 0 .../translations/sp_SP/scheduler/index.rst | 1 + .../sp_SP/scheduler/sched-design-CFS.rst | 8 +- .../translations/sp_SP/scheduler/sched-eevdf.rst | 58 ++++ .../translations/zh_CN/admin-guide/index.rst | 1 - .../zh_CN/admin-guide/reporting-issues.rst | 4 +- .../translations/zh_CN/dev-tools/index.rst | 2 +- .../translations/zh_CN/dev-tools/kcsan.rst | 320 +++++++++++++++++= ++++ .../zh_CN/doc-guide/checktransupdate.rst | 55 ++++ .../translations/zh_CN/doc-guide/index.rst | 1 + Documentation/translations/zh_CN/index.rst | 2 +- .../translations/zh_CN/kbuild/gcc-plugins.rst | 126 ++++++++ .../translations/zh_CN/kbuild/headers_install.rst | 39 +++ Documentation/translations/zh_CN/kbuild/index.rst | 35 +++ Documentation/translations/zh_CN/process/index.rst | 3 +- .../{admin-guide =3D> process}/security-bugs.rst | 42 +-- .../zh_CN/process/submitting-patches.rst | 2 +- .../zh_TW/admin-guide/reporting-issues.rst | 4 +- .../zh_TW/process/submitting-patches.rst | 2 +- Documentation/userspace-api/ioctl/ioctl-number.rst | 2 + Documentation/virt/kvm/index.rst | 1 + Documentation/virt/kvm/loongarch/hypercalls.rst | 89 ++++++ Documentation/virt/kvm/loongarch/index.rst | 10 + Documentation/watchdog/watchdog-api.rst | 2 +- MAINTAINERS | 3 + scripts/checktransupdate.py | 214 +++++++++----- scripts/get_maintainer.pl | 17 +- scripts/sphinx-pre-install | 2 - 71 files changed, 1329 insertions(+), 271 deletions(-) create mode 100644 Documentation/doc-guide/checktransupdate.rst create mode 100644 Documentation/scheduler/sched-eevdf.rst create mode 100644 Documentation/translations/ko_KR/core-api/wrappers/memo= ry-barriers.rst rename Documentation/translations/ko_KR/{ =3D> process}/howto.rst (100%) create mode 100644 Documentation/translations/sp_SP/scheduler/sched-eevdf.= rst create mode 100644 Documentation/translations/zh_CN/dev-tools/kcsan.rst create mode 100644 Documentation/translations/zh_CN/doc-guide/checktransup= date.rst create mode 100644 Documentation/translations/zh_CN/kbuild/gcc-plugins.rst create mode 100644 Documentation/translations/zh_CN/kbuild/headers_install= .rst create mode 100644 Documentation/translations/zh_CN/kbuild/index.rst rename Documentation/translations/zh_CN/{admin-guide =3D> process}/securit= y-bugs.rst (57%) create mode 100644 Documentation/virt/kvm/loongarch/hypercalls.rst create mode 100644 Documentation/virt/kvm/loongarch/index.rst . Date: Mon, 16 Sep 2024 15:54:44 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Lee Jones , Linus Walleij , Bartosz Golaszewski Subject: [GIT PULL] pwm: Changes for 6.12-rc1 --adbwfppeizvdptnh Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Linus, the following changes since commit 10c48e9a8fd5e524d37559cf4a06039b4c25db48: pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable() (2024-09-05 11:= 12:01 +0200) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git tags/p= wm/for-6.12-rc1 for you to fetch changes up to d242feaf81d63b25d8c1fb1a68738dc33966a376: pwm: stm32: Fix a typo (2024-09-16 15:24:59 +0200) This is mostly what is in next for a while, I just found a broken commit hash in a Fixes line during my last-minute-pre-PR checks, so I rewrote 00576dc859b82267e65b600dedc762d258f35e43 to a550d6ae4d73dc4b9f1a2b3ad3d8d9e355b396be. The commits above changed their IDs accordingly and the top commit is relatively new (but an obvious spelling fix in a code comment, so should be harmless). Please pull for v6.12-rc1. Greetings to Vienna, Uwe ---------------------------------------------------------------- pwm: Changes for v6.12-rc1 This pull request contains some cleanups to the core and some mostly minor updates to a bunch of drivers and device tree bindings. One thing worth pointing out is that it contains an immutable branch containing support for a new mfd chip (Analog Devices ADP5585) with several sub drivers. So expect to get the four affected commits also from my fellow MFD and GPIO maintainers. Thanks go to Andrew Kreimer, Clark Wang, Conor Dooley, David Lechner, Dmitry Rokosov, Frank Li, Geert Uytterhoeven, George Stark, Jiapeng Chong, Krzysztof Kozlowski, Laurent Pinchart, Liao Chen, Liu Ying, Rob Herring and Wolfram Sang for code contributions and reviews and to Lee Jones for preparing the above mentioned immutable branch. ---------------------------------------------------------------- Andrew Kreimer (1): pwm: stm32: Fix a typo Clark Wang (1): pwm: adp5585: Add Analog Devices ADP5585 support David Lechner (1): pwm: axi-pwmgen: use shared macro for version reg George Stark (2): dt-bindings: pwm: amlogic: Add optional power-domains dt-bindings: pwm: amlogic: Add new bindings for meson A1 PWM Haibo Chen (2): mfd: adp5585: Add Analog Devices ADP5585 core support gpio: adp5585: Add Analog Devices ADP5585 support Jiapeng Chong (1): pwm: lp3943: Fix an incorrect type in lp3943_pwm_parse_dt() Krzysztof Kozlowski (1): dt-bindings: pwm: allwinner,sun4i-a10-pwm: add top-level constraints Laurent Pinchart (1): dt-bindings: mfd: Add Analog Devices ADP5585 Liao Chen (2): pwm: atmel-hlcdc: Enable module autoloading pwm: atmel-hlcdc: Drop trailing comma Liu Ying (1): pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled Rob Herring (Arm) (2): pwm: lp3943: Use of_property_count_u32_elems() to get property length pwm: omap-dmtimer: Use of_property_read_bool() Uwe Kleine-K=F6nig (5): pwm: Make info in traces about affected pwm more useful pwm: Don't export pwm_capture() pwm: Simplify pwm_capture() Merge tag 'ib-mfd-gpio-pwm-v6.12' of https://git.kernel.org/pub/scm/l= inux/kernel/git/lee/mfd pwm: Switch back to struct platform_driver::remove() Wolfram Sang (2): dt-bindings: pwm: renesas,pwm-rcar: Add r8a779h0 support dt-bindings: pwm: renesas,tpu: Add r8a779h0 support .../devicetree/bindings/mfd/adi,adp5585.yaml | 92 +++++++++ .../bindings/pwm/allwinner,sun4i-a10-pwm.yaml | 9 +- .../devicetree/bindings/pwm/pwm-amlogic.yaml | 17 ++ .../devicetree/bindings/pwm/renesas,pwm-rcar.yaml | 1 + .../devicetree/bindings/pwm/renesas,tpu-pwm.yaml | 1 + .../devicetree/bindings/trivial-devices.yaml | 4 - MAINTAINERS | 11 + drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-adp5585.c | 229 +++++++++++++++++= ++++ drivers/mfd/Kconfig | 12 ++ drivers/mfd/Makefile | 1 + drivers/mfd/adp5585.c | 205 ++++++++++++++++++ drivers/pwm/Kconfig | 7 + drivers/pwm/Makefile | 1 + drivers/pwm/core.c | 13 +- drivers/pwm/pwm-adp5585.c | 188 +++++++++++++++++ drivers/pwm/pwm-atmel-hlcdc.c | 7 +- drivers/pwm/pwm-atmel-tcb.c | 2 +- drivers/pwm/pwm-axi-pwmgen.c | 3 +- drivers/pwm/pwm-clk.c | 2 +- drivers/pwm/pwm-hibvt.c | 2 +- drivers/pwm/pwm-img.c | 2 +- drivers/pwm/pwm-lp3943.c | 10 +- drivers/pwm/pwm-lpc18xx-sct.c | 2 +- drivers/pwm/pwm-omap-dmtimer.c | 4 +- drivers/pwm/pwm-rcar.c | 2 +- drivers/pwm/pwm-rockchip.c | 2 +- drivers/pwm/pwm-sifive.c | 2 +- drivers/pwm/pwm-stm32.c | 2 +- drivers/pwm/pwm-sun4i.c | 2 +- drivers/pwm/pwm-tegra.c | 2 +- drivers/pwm/pwm-tiecap.c | 2 +- drivers/pwm/pwm-tiehrpwm.c | 2 +- include/linux/mfd/adp5585.h | 126 ++++++++++++ include/linux/pwm.h | 10 - include/trace/events/pwm.h | 10 +- 37 files changed, 939 insertions(+), 56 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/adi,adp5585.yaml create mode 100644 drivers/gpio/gpio-adp5585.c create mode 100644 drivers/mfd/adp5585.c create mode 100644 drivers/pwm/pwm-adp5585.c create mode 100644 include/linux/mfd/adp5585.h --adbwfppeizvdptnh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmboOJ0ACgkQj4D7WH0S /k65/AgAoyg7UCCQCzgF67GIarTypBoLD8MqPL5gyZ5+BB55wChr/gMSfVcfDGDJ VOo0H0U0ZNQk5FXfwvcYd4YKjEAs3fGxR+laNTs/QNCPZgyVQ+oqV+I/AEmYml/+ x/FJOVmbXNBmgFw4NlYirZK7uhayhRdVOtxu9Y67sp/z3FgqrMR0IScf/fBvkBLk sqPeAB2HqyfxUtBkUSC0hOweYzTBmiVxD8Sc6q5g1Gm9+cNz7pgVuxB7dMmvDPqe SE5R6uCi9ZarMH77a+IUce53UMCPgNBcL90iI+LSFRvtEqVNtocDn/WaHIaIHg57 ovIG3PqKLe1f/BpC9OyitzdKQ3BZbQ== =24vQ -----END PGP SIGNATURE----- --adbwfppeizvdptnh-- . Date: Mon, 16 Sep 2024 16:32:07 +0200 From: Geert Uytterhoeven To: Linus Torvalds Cc: Andrew Morton , Greg Ungerer , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [GIT PULL] m68k updates for v6.12 Hi Linus, The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git tags/m68k-for-v6.12-tag1 for you to fetch changes up to b90fae5df91744e45e683c17bb1a38e466770df3: m68k: defconfig: Update defconfigs for v6.11-rc1 (2024-08-26 10:25:02 +0200) ---------------------------------------------------------------- m68k updates for v6.12 - Use swap() helper for __arch_xchg(), - Fix kernel_clone_args.flags in m68k_clone(), - Defconfig updates. Thanks for pulling! ---------------------------------------------------------------- Finn Thain (1): m68k: Fix kernel_clone_args.flags in m68k_clone() Geert Uytterhoeven (1): m68k: defconfig: Update defconfigs for v6.11-rc1 Thorsten Blum (1): m68k: cmpxchg: Use swap() to improve code arch/m68k/configs/amiga_defconfig | 2 -- arch/m68k/configs/apollo_defconfig | 2 -- arch/m68k/configs/atari_defconfig | 2 -- arch/m68k/configs/bvme6000_defconfig | 2 -- arch/m68k/configs/hp300_defconfig | 2 -- arch/m68k/configs/mac_defconfig | 2 -- arch/m68k/configs/multi_defconfig | 2 -- arch/m68k/configs/mvme147_defconfig | 2 -- arch/m68k/configs/mvme16x_defconfig | 2 -- arch/m68k/configs/q40_defconfig | 2 -- arch/m68k/configs/sun3_defconfig | 2 -- arch/m68k/configs/sun3x_defconfig | 2 -- arch/m68k/include/asm/cmpxchg.h | 15 +++++---------- arch/m68k/kernel/process.c | 2 +- 14 files changed, 6 insertions(+), 35 deletions(-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds . Date: Mon, 16 Sep 2024 16:43:55 +0200 From: Petr Mladek To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: [GIT PULL] livepatching for 6.12 Hi Linus, please pull the latest changes for the kernel livepatching from git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git tags/livepatching-for-6.12 ======================================= - Small documentation improvement. ---------------------------------------------------------------- Bagas Sanjaya (1): Documentation: livepatch: Correct release locks antonym Documentation/livepatch/livepatch.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) . Date: Mon, 16 Sep 2024 16:53:52 +0200 From: Ulf Hansson To: Linus , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ulf Hansson Subject: [GIT PULL] MMC updates for v6.12 Hi Linus, Here's the pull-request for MMC v6.12. Please note, this pull-request also introduces a new subsystem for so called Replay Protected Memory Block (RPMB) in drivers/misc/. The first provider that implements RPMB support is the MMC subsystem for eMMC cards, while the consumer is the tee/optee subsystem. More details are available in the commit message that introduces the RPMB subsystem along with the usual highlights for MMC in the signed tag. Please pull this in! Kind regards Ulf Hansson The following changes since commit aea62c744a9ae2a8247c54ec42138405216414da: mmc: cqhci: Fix checking of CQHCI_HALT state (2024-09-03 14:20:51 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git tags/mmc-v6.12 for you to fetch changes up to cd3689b6772fbc1a4513934a5204fd2fa5b4426b: mmc: core: Use dev_err_probe for deferred regulators (2024-09-13 14:09:29 +0200) ---------------------------------------------------------------- MMC core: - Add documentation for the mmc-test driver - Register the eMMC RPMB partition with the RPMB subsystem - Some various cleanups MMC host: - dw_mmc-rockchip: Add support for the RK3576 variant - renesas_sdhi: Add support for the RZ/V2H(P) variant - sdhci_am654: Add a retry mechanism for tuning - sdhci-atmel: Convert DT bindings to json schema - sdhci-of-dwcmshc: Add eMMC HW reset support for BlueField-3 SoC - sdhci-of-dwcmshc: Add support for the RK3576 variant - sdhci-of-dwcmshc: Add support for the Sophgo SG2042 variant - sdhci-of-ma35d1: Add new driver for the Nuvoton MA35D1 SDHCI Misc/Tee: - Add Replay Protected Memory Block (RPMB) subsystem - Let optee probe RPMB device using RPMB subsystem ---------------------------------------------------------------- Alexander Stein (1): mmc: core: Use dev_err_probe for deferred regulators Avri Altman (2): mmc: core Convert UNSTUFF_BITS macro to inline function Documentation: mmc: Add mmc-test doc Chanwoo Lee (1): mmc: core: Replace the argument of mmc_sd_switch() with defines Chen Wang (7): mmc: sdhci-of-dwcmshc: add common bulk optional clocks support mmc: sdhci-of-dwcmshc: move two rk35xx functions mmc: sdhci-of-dwcmshc: factor out code for th1520_init() mmc: sdhci-of-dwcmshc: factor out code into dwcmshc_rk35xx_init mmc: sdhci-of-dwcmshc: add dwcmshc_pltfm_data dt-bindings: mmc: sdhci-of-dwcmhsc: Add Sophgo SG2042 support mmc: sdhci-of-dwcmshc: Add support for Sophgo SG2042 Christophe JAILLET (1): mmc: core: Remove struct mmc_context_info Dan Carpenter (1): optee: Fix a NULL vs IS_ERR() check Detlev Casanova (3): dt-bindings: mmc: Add support for rk3576 dw-mshc mmc: dw_mmc-rockchip: Add support for rk3576 SoCs dt-bindings: mmc: Add support for rk3576 eMMC Dharma Balasubiramani (1): dt-bindings: mmc: sdhci-atmel: Convert to json schema Doug Brown (1): mmc: sdhci-pxav2: Remove unnecessary null pointer check Jens Wiklander (7): rpmb: add Replay Protected Memory Block (RPMB) subsystem mmc: block: register RPMB partition with the RPMB subsystem tee: add tee_device_set_dev_groups() optee: probe RPMB device using RPMB subsystem mmc: block: add RPMB dependency optee: add RPMB dependency rpmb: fix error path in rpmb_dev_register() Judith Mendez (2): mmc: sdhci_am654: Add retry tuning mmc: sdhci_am654: Add prints to tuning algorithm Krzysztof Kozlowski (1): dt-bindings: mmc: renesas,sdhi: add top-level constraints Lad Prabhakar (4): dt-bindings: mmc: renesas,sdhi: Document RZ/V2H(P) support mmc: tmio: Use MMC core APIs to control the vqmmc regulator mmc: renesas_sdhi: Add RZ/V2H(P) compatible string dt-bindings: mmc: renesas,sdhi: Remove duplicate compatible and add clock checks Liming Sun (1): mmc: sdhci-of-dwcmshc: Add hw_reset() support for BlueField-3 SoC Riyan Dhiman (2): mmc: core: Calculate size from pointer mmc: core: Convert simple_stroul to kstroul Seunghwan Baek (1): mmc: cqhci: Make use of cqhci_halted() routine Shan-Chun Hung (2): dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver Shawn Lin (1): mmc: dw_mmc-rockchip: Add internal phase support Thorsten Blum (1): mmc: mtk-sd: Improve data type in msdc_timeout_cal() Ulf Hansson (3): mmc: Merge branch fixes into next mmc: Merge branch fixes into next mmc: Merge branch fixes into next Vladimir Zapolskiy (1): mmc: core: remove left-over data structure declarations Documentation/ABI/testing/sysfs-class-tee | 15 + .../bindings/mmc/atmel,sama5d2-sdhci.yaml | 92 ++++ .../bindings/mmc/nuvoton,ma35d1-sdhci.yaml | 87 ++++ .../devicetree/bindings/mmc/renesas,sdhi.yaml | 13 +- .../devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 2 + .../devicetree/bindings/mmc/sdhci-atmel.txt | 35 -- .../bindings/mmc/snps,dwcmshc-sdhci.yaml | 95 ++-- Documentation/driver-api/mmc/index.rst | 1 + Documentation/driver-api/mmc/mmc-test.rst | 299 +++++++++++++ MAINTAINERS | 8 + drivers/misc/Kconfig | 10 + drivers/misc/Makefile | 1 + drivers/misc/rpmb-core.c | 231 ++++++++++ drivers/mmc/core/Kconfig | 1 + drivers/mmc/core/block.c | 250 ++++++++++- drivers/mmc/core/mmc.c | 106 ++--- drivers/mmc/core/mmc_ops.h | 14 + drivers/mmc/core/regulator.c | 8 +- drivers/mmc/core/sd.c | 133 +++--- drivers/mmc/core/sd_ops.c | 3 +- drivers/mmc/host/Kconfig | 12 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/cqhci-core.c | 14 +- drivers/mmc/host/dw_mmc-rockchip.c | 217 +++++++++- drivers/mmc/host/mtk-sd.c | 11 +- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 + drivers/mmc/host/sdhci-of-dwcmshc.c | 478 ++++++++++++++------- drivers/mmc/host/sdhci-of-ma35d1.c | 314 ++++++++++++++ drivers/mmc/host/sdhci-pxav2.c | 2 +- drivers/mmc/host/sdhci_am654.c | 54 ++- drivers/mmc/host/tmio_mmc_core.c | 7 +- drivers/tee/optee/Kconfig | 1 + drivers/tee/optee/core.c | 96 ++++- drivers/tee/optee/device.c | 7 + drivers/tee/optee/ffa_abi.c | 14 + drivers/tee/optee/optee_ffa.h | 2 + drivers/tee/optee/optee_private.h | 26 +- drivers/tee/optee/optee_rpc_cmd.h | 35 ++ drivers/tee/optee/optee_smc.h | 2 + drivers/tee/optee/rpc.c | 177 ++++++++ drivers/tee/optee/smc_abi.c | 14 + drivers/tee/tee_core.c | 19 +- include/linux/mmc/core.h | 12 - include/linux/mmc/host.h | 27 +- include/linux/rpmb.h | 123 ++++++ include/linux/tee_core.h | 12 + 46 files changed, 2633 insertions(+), 449 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-tee create mode 100644 Documentation/devicetree/bindings/mmc/atmel,sama5d2-sdhci.yaml create mode 100644 Documentation/devicetree/bindings/mmc/nuvoton,ma35d1-sdhci.yaml delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-atmel.txt create mode 100644 Documentation/driver-api/mmc/mmc-test.rst create mode 100644 drivers/misc/rpmb-core.c create mode 100644 drivers/mmc/host/sdhci-of-ma35d1.c create mode 100644 include/linux/rpmb.h . Date: Mon, 16 Sep 2024 16:29:47 +0000 From: "Arnd Bergmann" To: "Linus Torvalds" Cc: soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [GIT PULL 0/4] Hi Linus, These are the usual four branches from the SoC tree, with around 900 non-merge changesets from 220 individual authors. I hope to send one more pull request later for the conversion of ep93xx to devicetree, but I still applied regression fixes to that one today so I'm giving it some more time to make sure it won't cause other stuff to fail. There are four platforms that make up most of the changes by size and number of patches: - NXP gets a lot of minor DT improvements as well as a good chunk of the driver updates, but only three new machines. - Rockchips and Aspeed have the largest size overall, mainly from new board additions, so there are fewer patches. - Qualcomm as usual has a lot of everything including several new Snapdragon X1E laptops. Another small but notable addition is initial support for the Raspberry Pi 5, which has taken a while to get into shape. The driver changes are somewhat larger than normal, but are still dwarfed by the devicetree updates. The most active contributers by number of patches are: 62 Krzysztof Kozlowski 43 Frank Li 37 Herve Codina 35 Nikita Shubin 22 Heiko Stuebner 18 Yang Chen 16 Marek Beh=C3=BAn 16 Geert Uytterhoeven 15 Peng Fan 14 Markus Niebel 14 Lad Prabhakar 14 Beleswar Padhi 12 Xianwei Zhao 12 Rayyan Ansari 11 Svyatoslav Ryhel 11 Peter Yin 11 Konrad Dybcio 11 Fabio Estevam 11 Dang Huynh 11 Cristian Marussi 11 Alexander Stein 10 Sudeep Holla 10 Marek Vasut 10 Diogo Ivo Dirstat: 0.4% Documentation/devicetree/bindings/arm/ 0.7% Documentation/devicetree/bindings/clock/ 0.6% Documentation/devicetree/bindings/pinctrl/ 0.7% Documentation/devicetree/bindings/soc/fsl/cpm_qe/ 0.3% Documentation/devicetree/bindings/soc/ 0.6% Documentation/devicetree/bindings/ 11.3% arch/arm/boot/dts/aspeed/ 1.6% arch/arm/boot/dts/broadcom/ 0.3% arch/arm/boot/dts/microchip/ 2.6% arch/arm/boot/dts/nvidia/ 2.1% arch/arm/boot/dts/nxp/imx/ 1.3% arch/arm/boot/dts/qcom/ 0.6% arch/arm/boot/dts/rockchip/ 1.9% arch/arm/boot/dts/st/ 0.3% arch/arm/boot/dts/ 0.4% arch/arm/ 2.1% arch/arm64/boot/dts/amlogic/ 0.5% arch/arm64/boot/dts/broadcom/ 9.8% arch/arm64/boot/dts/freescale/ 1.7% arch/arm64/boot/dts/mediatek/ 0.3% arch/arm64/boot/dts/nuvoton/ 1.6% arch/arm64/boot/dts/nvidia/ 9.5% arch/arm64/boot/dts/qcom/ 4.1% arch/arm64/boot/dts/renesas/ 20.2% arch/arm64/boot/dts/rockchip/ 2.8% arch/arm64/boot/dts/ti/ 0.6% arch/arm64/boot/dts/ 0.3% arch/riscv/boot/dts/sophgo/ 0.4% drivers/firmware/arm_ffa/ 1.0% drivers/firmware/arm_scmi/transports/ 4.5% drivers/firmware/arm_scmi/vendors/imx/ 1.6% drivers/firmware/arm_scmi/ 0.2% drivers/firmware/imx/ 0.8% drivers/firmware/ 0.3% drivers/input/keyboard/ 0.2% drivers/memory/samsung/ 0.8% drivers/memory/tegra/ 0.5% drivers/memory/ 1.1% drivers/reset/ 0.2% drivers/rtc/ 2.9% drivers/soc/fsl/qe/ 0.3% drivers/soc/mediatek/ 0.6% drivers/soc/qcom/ 0.5% drivers/soc/ti/ 0.3% drivers/soc/ 1.5% include/dt-bindings/clock/ 0.2% include/linux/ . Date: Mon, 16 Sep 2024 09:45:26 -0700 From: Guenter Roeck To: Linus Torvalds Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] hwmon updates for v6.12 Hi Linus, Please pull hwmon updates for Linux v6.12 from signed tag: git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-for-v6.12 Thanks, Guenter ------ The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git tags/hwmon-for-v6.12 for you to fetch changes up to 2cb4acf2140be8a4f299c0b887cc314845ef6ec8: hwmon: Remove devm_hwmon_device_unregister() API function (2024-09-13 07:27:36 -0700) ---------------------------------------------------------------- hwmon updates for v6.12 * New drivers - Driver for Sophgo SG2042 external hardware monitor - Thermal sensor driver for Surface Aggregator Module * Added support to existing drivers - oxp-sensors: Support for multiple new devices. - nct6775: Added G15CF to ASUS WMI monitoring list * Modernizations - ina2xx: Driver cleanup and update to use with_info API - lm92: Driver cleanup and update to use regmap and with_info API - lm95234: Driver cleanup and update to use regmap and with_info API - max1619: Driver cleanup and update to use regmap and with_info API - max1668: Driver cleanup and update to use regmap and with_info API - max6697: Driver cleanup and update to use regmap and with_info API * API updates - Removed unused devm_hwmon_device_unregister() API function * Other notable changes - Implement and use generic bus access delay for pmbus drivers - Use with scoped for each OF child loop in several drivers - Module unloading fixes for gsc-hwmon and ntc_thermistor drivers - Converted various drivers to use multi-byte regmap operations - adt7475: Improved devicetree based configuration - ltc2947: Move to firmware agnostic API - ltc2978: Converted devicetree description to yaml - max16065: Addressed overflows when writing limit attributes * Various other minor cleanups, fixes and improvements ---------------------------------------------------------------- Andy Shevchenko (2): hwmon: (sht21) Use %*ph to print small buffer hwmon: (sch5636) Print unknown ID in error string via %*pE Armin Wolf (1): hwmon: (dell-smm) Add Dell Latitude 7320 to fan control whitelist Chanh Nguyen (1): dt-bindings: hwmon: Add maxim max31790 Chris Packham (3): dt-bindings: hwmon: Add adt7475 fan/pwm properties dt-bindings: hwmon: adt7475: Deprecate adi,pwm-active-state hwmon: (adt7475) Add support for configuring initial PWM state Christophe JAILLET (1): hwmon: (pmbus/mpq7932) Constify struct regulator_desc Cryolitia PukNgae (1): hwmon: (oxp-sensors) Fix typo in driver documentation Denis Pauk (1): hwmon: (nct6775) add G15CF to ASUS WMI monitoring list Derek J. Clark (1): hwmon: (oxp-sensors) Add support for multiple new devices. Frank Li (1): dt-bindings: hwmon: Convert ltc2978.txt to yaml Guenter Roeck (56): hwmon: (adt7470) Use multi-byte regmap operations hwmon: (tmp401) Use multi-byte regmap operations hwmon: (lm95245) Use multi-byte regmap operations hwmon: (nct7802) Use multi-byte regmap operations hwmon: (adt7x10) Use multi-byte regmap operations hwmon: (tmp464) Use multi-byte regmap operations hwmon: (max6639) Use multi-byte regmap operations hwmon: (amc6821) Use multi-byte regmap operations hwmon: (lm95234) Reorder include files to be in alphabetic order hwmon: (lm95234) Use find_closest to find matching update interval hwmon: (lm95234) Convert to use regmap hwmon: (lm95234) Convert to with_info hwmon API hwmon: (lm95234) Add support for tempX_enable attribute hwmon: (lm95234) Use multi-byte regmap operations hwmon: (max16065) Fix overflows seen when writing limits hwmon: (max16065) Fix alarm attributes hwmon: (max6697) Reorder include files hwmon: (max6697) Drop platform data support hwmon: (max6697) Use bit operations where possible hwmon: (max6697) Convert to use regmap hwmon: (max6697) Convert to with_info hwmon API hwmon: (max6697) Add support for tempX_min and tempX_min_alarm hwmon: (max1668) Reorder include files to alphabetic order hwmon: (max1668) Use BIT macro hwmon: (max1668) Convert to use regmap hwmon: (max1668) Replace chip type with number of channels hwmon: (max1668) Convert to use with_info hwmon API hwmon: (max6697) Document discrepancy in overtemperature status bit values hwmon: (max1619) Clamp temperature range when writing limits hwmon: (max1619) Reorder include files to alphabetic order hwmon: (max1619) Mask valid alarm bits hwmon: (max1619) Convert to use regmap hwmon: (max1619) Convert to with_info API hwmon: (max1619) Add support for update_interval attribute hwmon: (max1619) Improve chip detection code hwmon: (lm92) Improve auto-detection accuracy hwmon: (lm92) Reorder include files to alphabetic order hwmon: (lm92) Replace chip IDs with limit register resolution hwmon: (lm92) Convert to use regmap hwmon: (lm92) Convert to with_info hwmon API hwmon: (lm92) Update documentation hwmon: (ina2xx) Reorder include files to alphabetic order hwmon: (ina2xx) Replace platform data with device properties hwmon: (ina2xx) Use bit operations hwmon: (ina2xx) Mark regmap_config as const hwmon: (ina2xx) Use local regmap pointer if used more than once hwmon: (ina2xx) Re-initialize chip using regmap functions hwmon: (ina2xx) Fix various overflow issues hwmon: (ina2xx) Consolidate chip initialization code hwmon: (ina2xx) Set alert latch hwmon: (ina2xx) Move ina2xx_get_value() hwmon: (ina2xx) Convert to use with_info hwmon API hwmon: (ina2xx) Pass register to alert limit write functions hwmon: (ina2xx) Add support for current limits hwmon: (ina2xx) Use shunt voltage to calculate current hwmon: Remove devm_hwmon_device_unregister() API function Inochi Amaoto (2): dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support hwmon: Add sophgo SG2042 external hardware monitor support Javier Carrasco (2): hwmon: (ltc2992) use device_for_each_child_node_scoped() to access child nodes hwmon: (chipcap2) Drop cc2_disable() in the probe and return dev_err_probe() Jinjie Ruan (8): hwmon: (aspeed-g6-pwm-tacho): Simplify with scoped for each OF child loop hwmon: (aspeed-pwm-tacho): Simplify with scoped for each OF child loop hwmon: (ina3221): Simplify with scoped for each OF child loop hwmon: (lm90): Simplify with scoped for each OF child loop hwmon: (nct7802): Simplify with scoped for each OF child loop hwmon: (npcm750-pwm-fan): Simplify with scoped for each OF child loop hwmon: (tmp421): Simplify with scoped for each OF child loop hwmon: (tmp464): Simplify with scoped for each OF child loop Johannes Kirchmair (1): hwmon: (pwmfan) Do not force disable pwm controller Liao Chen (1): hwmon: (gsc-hwmon) fix module autoloading Mario Limonciello (1): hwmon: (k10temp): Use cpu_feature_enabled() for detecting zen Maximilian Luz (1): hwmon: Add thermal sensor driver for Surface Aggregator Module Nathan Chancellor (1): hwmon: (oxp-sensors) Add missing breaks to fix -Wimplicit-fallthrough with clang Nuno Sa (1): hwmon: (ltc2947) Move to firmware agnostic API Patrick Rudolph (5): hwmon: pmbus: Implement generic bus access delay hwmon: pmbus: max15301: Use generic code hwmon: pmbus: ucd9000: Use generic code hwmon: pmbus: zl6100: Use generic code hwmon: pmbus: pli12096bc: Add write delay Rob Herring (Arm) (2): hwmon: (vexpress) Use of_property_present() hwmon: (stts751) Add "st" vendor prefix to "stts751" compatible string Shen Lichuan (1): hwmon: (pc87360) Use min() macro Yue Haibing (1): hwmon: (sch5627) Remove unused declaration sch56xx_watchdog_unregister() Yuntao Liu (1): hwmon: (ntc_thermistor) fix module autoloading .../devicetree/bindings/hwmon/adt7475.yaml | 37 +- .../devicetree/bindings/hwmon/lltc,ltc2978.yaml | 94 +++ .../devicetree/bindings/hwmon/ltc2978.txt | 62 -- .../devicetree/bindings/hwmon/maxim,max31790.yaml | 70 ++ .../bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml | 43 + Documentation/hwmon/hwmon-kernel-api.rst | 7 - Documentation/hwmon/ina2xx.rst | 4 + Documentation/hwmon/index.rst | 1 + Documentation/hwmon/lm92.rst | 26 +- Documentation/hwmon/max1619.rst | 4 - Documentation/hwmon/oxp-sensors.rst | 56 +- Documentation/hwmon/sg2042-mcu.rst | 78 ++ MAINTAINERS | 6 + drivers/hwmon/Kconfig | 26 +- drivers/hwmon/Makefile | 2 + drivers/hwmon/adt7470.c | 22 +- drivers/hwmon/adt7475.c | 130 +++ drivers/hwmon/adt7x10.c | 18 +- drivers/hwmon/amc6821.c | 30 +- drivers/hwmon/aspeed-g6-pwm-tach.c | 4 +- drivers/hwmon/aspeed-pwm-tacho.c | 8 +- drivers/hwmon/chipcap2.c | 33 +- drivers/hwmon/dell-smm-hwmon.c | 8 + drivers/hwmon/gsc-hwmon.c | 1 + drivers/hwmon/hwmon.c | 18 - drivers/hwmon/ina2xx.c | 895 +++++++++++--------- drivers/hwmon/ina3221.c | 7 +- drivers/hwmon/k10temp.c | 26 +- drivers/hwmon/lm90.c | 7 +- drivers/hwmon/lm92.c | 457 +++++++---- drivers/hwmon/lm95234.c | 869 ++++++++------------ drivers/hwmon/lm95245.c | 110 +-- drivers/hwmon/ltc2947-core.c | 20 +- drivers/hwmon/ltc2992.c | 19 +- drivers/hwmon/max16065.c | 17 +- drivers/hwmon/max1619.c | 495 ++++++----- drivers/hwmon/max1668.c | 487 ++++------- drivers/hwmon/max6639.c | 40 +- drivers/hwmon/max6697.c | 907 +++++++++------------ drivers/hwmon/nct6775-platform.c | 1 + drivers/hwmon/nct7802.c | 69 +- drivers/hwmon/npcm750-pwm-fan.c | 5 +- drivers/hwmon/ntc_thermistor.c | 1 + drivers/hwmon/oxp-sensors.c | 301 ++++++- drivers/hwmon/pc87360.c | 2 +- drivers/hwmon/pmbus/max15301.c | 92 +-- drivers/hwmon/pmbus/mpq7932.c | 2 +- drivers/hwmon/pmbus/pli1209bc.c | 26 +- drivers/hwmon/pmbus/pmbus.h | 10 + drivers/hwmon/pmbus/pmbus_core.c | 92 ++- drivers/hwmon/pmbus/ucd9000.c | 64 +- drivers/hwmon/pmbus/zl6100.c | 66 +- drivers/hwmon/pwm-fan.c | 11 +- drivers/hwmon/sch5636.c | 3 +- drivers/hwmon/sch56xx-common.h | 1 - drivers/hwmon/sg2042-mcu.c | 388 +++++++++ drivers/hwmon/sht21.c | 5 +- drivers/hwmon/stts751.c | 2 +- drivers/hwmon/surface_temp.c | 235 ++++++ drivers/hwmon/tmp401.c | 17 +- drivers/hwmon/tmp421.c | 7 +- drivers/hwmon/tmp464.c | 40 +- drivers/hwmon/vexpress-hwmon.c | 2 +- include/linux/hwmon.h | 1 - include/linux/platform_data/max6697.h | 33 - 65 files changed, 3740 insertions(+), 2880 deletions(-) create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml delete mode 100644 Documentation/devicetree/bindings/hwmon/ltc2978.txt create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml create mode 100644 Documentation/hwmon/sg2042-mcu.rst create mode 100644 drivers/hwmon/sg2042-mcu.c create mode 100644 drivers/hwmon/surface_temp.c delete mode 100644 include/linux/platform_data/max6697.h . Date: Mon, 16 Sep 2024 20:26:08 +0200 From: Amir Goldstein To: Linus Torvalds Cc: Miklos Szeredi , Christian Brauner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: [GIT PULL] overlayfs updates for 6.12 Hi Linus, Please pull overlayfs updates for 6.12. This branch has been sitting in linux-next for over a week and it has gone through the usual overlayfs test routines. The branch merges cleanly with master branch of the moment. Thanks, Amir. ---------------------------------------------------------------- The following changes since commit 3e9bff3bbe1355805de919f688bef4baefbfd436: Merge tag 'vfs-6.11-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs (2024-08-27 16:57:35 +1200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git ovl-update-6.12 for you to fetch changes up to 6c4a5f96450415735c31ed70ff354f0ee5cbf67b: ovl: fail if trusted xattrs are needed but caller lacks permission (2024-09-08 15:36:59 +0200) ---------------------------------------------------------------- overlayfs updates for 6.12 - Increase robustness of overlayfs to crashes in the case of underlying filesystems that to not guarantee metadata ordering to persistent storage (problem was reported with ubifs). - Deny mount inside container with features that require root privileges to work properly, instead of failing operations later. - Some clarifications to overlayfs documentation. ---------------------------------------------------------------- Amir Goldstein (1): ovl: fsync after metadata copy-up Haifeng Xu (1): ovl: don't set the superblock's errseq_t manually Mike Baynton (1): ovl: fail if trusted xattrs are needed but caller lacks permission Yuriy Belikov (1): overlayfs.rst: update metacopy section in overlayfs documentation Documentation/filesystems/overlayfs.rst | 7 ++++-- fs/overlayfs/copy_up.c | 43 ++++++++++++++++++++++++++++++--- fs/overlayfs/params.c | 38 +++++++++++++++++++++++++---- fs/overlayfs/super.c | 10 ++------ 4 files changed, 79 insertions(+), 19 deletions(-) . Date: Mon, 16 Sep 2024 14:45:35 -0500 From: Dave Kleikamp To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, "jfs-discussion@lists.sourceforge.net" Subject: [GIT PULL] jfs updates for v6.12 The following changes since commit 3d5f968a177d468cd13568ef901c5be84d83d32b: Merge tag 'pwrseq-fixes-for-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux (2024-08-23 17:48:27 +0800) are available in the Git repository at: git@github.com:kleikamp/linux-shaggy.git tags/jfs-6.12 for you to fetch changes up to 2b59ffad47db1c46af25ccad157bb3b25147c35c: jfs: Fix uninit-value access of new_ea in ea_buffer (2024-09-04 10:28:08 -0500) ---------------------------------------------------------------- A few fixes for jfs ---------------------------------------------------------------- Edward Adam Davis (2): jfs: Fix uaf in dbFreeBits jfs: check if leafidx greater than num leaves per dmap tree Jeongjun Park (1): jfs: fix out-of-bounds in dbNextAG() and diAlloc() Remington Brasga (1): jfs: UBSAN: shift-out-of-bounds in dbFindBits Zhao Mengmeng (1): jfs: Fix uninit-value access of new_ea in ea_buffer fs/jfs/jfs_discard.c | 11 +++++++++-- fs/jfs/jfs_dmap.c | 11 +++++++---- fs/jfs/jfs_imap.c | 2 +- fs/jfs/xattr.c | 2 ++ 4 files changed, 19 insertions(+), 7 deletions(-) . Date: Mon, 16 Sep 2024 17:37:52 -0600 From: Shuah Khan To: Linus Torvalds Cc: shuah , Shuah Khan , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E. McKenney" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] nolibc for 6.12-rc1 This is a multi-part message in MIME format. --------------ZQ3Vjn9X99yKUfzxIDogQqJT Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Linus, Please pull the following nolibc update for Linux 6.12-rc1. This nolibc update for Linux 6.12-rc1 consists of: Highlights ---------- * Clang support (including LTO) Other Changes ------------- * stdbool.h support * argc/argv/envp arguments for constructors * Small #include ordering fix Test Results: Passed: tools/testing/selftests/nolibc/run-tests.sh tools/testing/selftests/nolibc/run-tests.sh -m user diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-nolibc-6.12-rc1 for you to fetch changes up to 248f6b935bbd8f7bc211cce2b6fd76be4c449848: Merge tag 'nolibc-20240824-for-6.12-1' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc into nolibc (2024-08-27 06:43:34 -0600) ---------------------------------------------------------------- linux_kselftest-nolibc-6.12-rc1 This nolibc update for Linux 6.12-rc1 consists of: Highlights ---------- * Clang support (including LTO) Other Changes ------------- * stdbool.h support * argc/argv/envp arguments for constructors * Small #include ordering fix ---------------------------------------------------------------- Shuah Khan (1): Merge tag 'nolibc-20240824-for-6.12-1' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc into nolibc Thomas Weißschuh (21): tools/nolibc: include arch.h from string.h tools/nolibc: add stdbool.h header tools/nolibc: pass argc, argv and envp to constructors tools/nolibc: arm: use clang-compatible asm syntax tools/nolibc: mips: load current function to $t9 tools/nolibc: powerpc: limit stack-protector workaround to GCC tools/nolibc: compiler: introduce __nolibc_has_attribute() tools/nolibc: move entrypoint specifics to compiler.h tools/nolibc: compiler: use attribute((naked)) if available selftests/nolibc: report failure if no testcase passed selftests/nolibc: avoid passing NULL to printf("%s") selftests/nolibc: determine $(srctree) first selftests/nolibc: add support for LLVM= parameter selftests/nolibc: add cc-option compatible with clang cross builds selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA selftests/nolibc: don't use libgcc when building with clang selftests/nolibc: use correct clang target for s390/systemz selftests/nolibc: run-tests.sh: allow building through LLVM tools/nolibc: crt: mark _start_c() as used tools/nolibc: stackprotector: mark implicitly used symbols as used tools/nolibc: x86_64: use local label in memcpy/memmove tools/include/nolibc/Makefile | 1 + tools/include/nolibc/arch-aarch64.h | 4 +-- tools/include/nolibc/arch-arm.h | 8 +++--- tools/include/nolibc/arch-i386.h | 4 +-- tools/include/nolibc/arch-loongarch.h | 4 +-- tools/include/nolibc/arch-mips.h | 8 ++++-- tools/include/nolibc/arch-powerpc.h | 6 ++-- tools/include/nolibc/arch-riscv.h | 4 +-- tools/include/nolibc/arch-s390.h | 4 +-- tools/include/nolibc/arch-x86_64.h | 8 +++--- tools/include/nolibc/compiler.h | 24 +++++++++++----- tools/include/nolibc/crt.h | 25 +++++++++-------- tools/include/nolibc/nolibc.h | 3 +- tools/include/nolibc/stackprotector.h | 4 +-- tools/include/nolibc/stdbool.h | 16 +++++++++++ tools/include/nolibc/string.h | 1 + tools/testing/selftests/nolibc/Makefile | 41 +++++++++++++++++++--------- tools/testing/selftests/nolibc/nolibc-test.c | 9 +++--- tools/testing/selftests/nolibc/run-tests.sh | 16 ++++++++--- 19 files changed, 123 insertions(+), 67 deletions(-) create mode 100644 tools/include/nolibc/stdbool.h ---------------------------------------------------------------- --------------ZQ3Vjn9X99yKUfzxIDogQqJT Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-nolibc-6.12-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-nolibc-6.12-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL01ha2VmaWxlIGIvdG9vbHMvaW5j bHVkZS9ub2xpYmMvTWFrZWZpbGUKaW5kZXggZTY5YzI2YWJlMWVhLi5hMWY1NWZiMjRiYjMg MTAwNjQ0Ci0tLSBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL01ha2VmaWxlCisrKyBiL3Rvb2xz L2luY2x1ZGUvbm9saWJjL01ha2Vm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u dGVyIikpKSBfX25vX3N0YWNrX3Byb3RlY3RvciBfc3RhcnQodm9pZCkKK3ZvaWQgX19hdHRy aWJ1dGVfXygod2Vhaywgbm9yZXR1cm4pKSBfX25vbGliY19lbnRyeXBvaW50IF9fbm9fc3Rh Y2tfcHJvdGVjdG9yIF9zdGFydCh2b2lkKQogewogCV9fYXNtX18gdm9sYXRpbGUgKAogCQki bW92ZSAgICAgICAgICAkYTAsICRzcFxuIiAgICAgICAgIC8qIHNhdmUgc3RhY2sgcG9pbnRl ciB0byAkYTAsIGFzIGFyZzEgb2YgX3N0YXJ0X2MgKi8KIAkJTE9OR19CU1RSSU5TICIgJHNw LCAkemVybywgMywgMFxuIiAvKiAkc3AgbXVzdCBiZSAxNi1ieXRlIGFsaWduZWQgICAgICAg ICAgICAgICAgICAgICovCiAJCSJibCAgICAgICAgICAgIF9zdGFydF9jXG4iICAgICAgICAg LyogdHJhbnNmZXIgdG8gYyBydW50aW1lICAgICAgICAgICAgICAgICAgICAgICAgICAqLwog CSk7Ci0JX19idWlsdGluX3VucmVhY2hhYmxlKCk7CisJX19ub2xpYmNfZW50cnlwb2ludF9l cGlsb2d1ZSgpOwogfQogCiAjZW5kaWYgLyogX05PTElCQ19BUkNIX0xPT05HQVJDSF9IICov CmRpZmYgLS1naXQgYS90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLW1pcHMuaCBiL3Rvb2xz L2luY2x1ZGUvbm9saWJjL2FyY2gtbWlwcy5oCmluZGV4IDYyY2M1MGVmMzI4OC4uMTc5MWE4 Y2U1OGRhIDEwMDY0NAotLS0gYS90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLW1pcHMuaAor KysgYi90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLW1pcHMuaApAQCAtMTc5LDcgKzE3OSw3 IEBACiB9KQogCiAvKiBzdGFydHVwIGNvZGUsIG5vdGUgdGhhdCBpdCdzIGNhbGxlZCBfX3N0 YXJ0IG9uIE1JUFMgKi8KLXZvaWQgX19h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C8qIGRlbGF5ZWQgc2xvdCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIAkJIi5zZXQgcG9wXG4iCiAJ KTsKLQlfX2J1aWx0aW5fdW5yZWFjaGFibGUoKTsKKwlfX25vbGliY19lbnRyeXBvaW50X2Vw aWxvZ3VlKCk7CiB9CiAKICNlbmRpZiAvKiBfTk9MSUJDX0FSQ0hfTUlQU19IICovCmRpZmYg LS1naXQgYS90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLXBvd2VycGMuaCBiL3Rvb2xzL2lu Y2x1ZGUvbm9saWJjL2FyY2gtcG93ZXJwYy5oCmluZGV4IGFjMjEyZTYxODViMi4uZWUyZmRi OGQ2MDFkIDEwMDY0NAotLS0gYS90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLXBvd2VycGMu aAorKysgYi90b29scy9pbmNsdWRlL25vbGliYy9hcmNoLXBvd2VycGMuaApAQCAtMTcyLDcg KzE3Miw3IEBACiAJX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogfSkKIAotI2lmbmRlZiBfX3Bvd2VycGM2 NF9fCisjaWYgIWRlZmluZWQoX19wb3dlcnBjNjRfXykgJiYgIWRlZmluZWQoX19jbGFuZ19f KQogLyogRklYTUU6IEZvciAzMi1iaXQgUG93ZXJQQywgd2l0aCBuZXdlciBnY2MgY29tcGls ZXJzIChlLmcuIGdjYyAxMy4xLjApLAogICogIm9taXQtZnJhbWUtcG9pbnRlciIgZmFpbHMg d2l0aCBfX2F0dHJpYnV0ZV9fKChub19zdGFja19wcm90ZWN0b3IpKSBidXQKICAqIHdvcmtz IHdpdGggX19hdHRyaWJ1dGVfXygoX19vcHRpbWl6ZV9fKCItZm5vLXN0YWNrLXByb3RlY3Rv ciIpKSkKQEAgLTE4NCw3ICsxODQsNyBAQAogI2VuZGlmIC8qICFfX3Bvd2VycGM2NF9fICov CiAKIC8qIHN0YXJ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UtFPShtYWtlIC1qIiR7bnByb2N9IiBYQVJDSD0iJHthcmNofSIgQ1JP U1NfQ09NUElMRT0iJHtjcm9zc19jb21waWxlfSIgTExWTT0iJHtsbHZtfSIgTz0iJHtidWls ZF9kaXJ9IikKIAogCW1rZGlyIC1wICIkYnVpbGRfZGlyIgogCWlmIFsgIiR0ZXN0X21vZGUi ID0gInN5c3RlbSIgXSAmJiBbICEgLWYgIiR7YnVpbGRfZGlyfS8uY29uZmlnIiBdOyB0aGVu Cg== --------------ZQ3Vjn9X99yKUfzxIDogQqJT-- . Date: Mon, 16 Sep 2024 18:13:16 -0600 From: Shuah Khan To: Linus Torvalds Cc: shuah , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] Kselftest update for Linux 6.12-rc1 This is a multi-part message in MIME format. --------------CreUzoFYiIuW8Ze14BFG3Ot7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Linus, Please pull the following kselftest next update for Linux 6.12-rc1. This kselftest update for Linux 6.12-rc1 consists of: -- test coverage for dup_fd() failure handling in unshare_fd() -- new selftest for the acct() syscall -- basic uprobe testcase -- several small fixes and cleanups to existing tests -- user and strscpy removal as they became kunit tests -- fixes to build failures and warnings diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-next-6.12-rc1 for you to fetch changes up to a0474b8d5974e142461ac7584c996feea167bcc1: selftests: kselftest: Use strerror() on nolibc (2024-09-11 09:52:33 -0600) ---------------------------------------------------------------- linux_kselftest-next-6.12-rc1 This kselftest update for Linux 6.12-rc1 consists of: -- test coverage for dup_fd() failure handling in unshare_fd() -- new selftest for the acct() syscall -- basic uprobe testcase -- several small fixes and cleanups to existing tests -- user and strscpy removal as they became kunit tests -- fixes to build failures and warnings ---------------------------------------------------------------- Abdulrasaq Lawani (1): selftest: acct: Add selftest for the acct() syscall Abhinav Jain (1): selftests: filesystems: fix warn_unused_result build warnings Al Viro (1): selftests:core: test coverage for dup_fd() failure handling in unshare_fd() Anders Roxell (2): selftests: rust: config: add trailing newline selftests: rust: config: disable GCC_PLUGINS Chang Yu (1): selftests/exec: Fix grammar in an error message. Masahiro Yamada (2): selftests: harness: remove unneeded __constructor_order_last() selftests: harness: rename __constructor_order for clarification Masami Hiramatsu (Google) (3): selftests/uprobes: Add a basic uprobe testcase selftests/ftrace: Add required dependency for kprobe tests selftests/ftrace: Fix eventfs ownership testcase to find mount point Muhammad Usama Anjum (3): selftests: tpm2: redirect python unittest logs to stdout selftests: user: remove user suite selftests: lib: remove strscpy test Piotr Zalewski (1): kselftest: timers: Fix const correctness Shreeya Patel (1): kselftest: cpufreq: Add RTC wakeup alarm Shuah Khan (1): selftests:resctrl: Fix build failure on archs without __cpuid_count() Steven Rostedt (Google) (2): tracing/selftests: Run the ownership test twice selftests/ftrace: Fix test to handle both old and new kernels zhang jiao (2): selftests/timers: Remove unused NSEC_PER_SEC macro selftests: kselftest: Use strerror() on nolibc tools/testing/selftests/Makefile | 2 +- tools/testing/selftests/acct/.gitignore | 3 + tools/testing/selftests/acct/Makefile | 5 ++ tools/testing/selftests/acct/acct_syscall.c | 78 ++++++++++++++++++ tools/testing/selftests/core/Makefile | 2 +- tools/testing/selftests/core/unshare_test.c | 94 ++++++++++++++++++++++ tools/testing/selftests/cpufreq/cpufreq.sh | 15 ++++ tools/testing/selftests/cpufreq/main.sh | 13 ++- .../drivers/s390x/uvdevice/test_uvdevice.c | 6 -- tools/testing/selftests/exec/execveat.c | 2 +- .../filesystems/statmount/statmount_test_ns.c | 7 +- .../ftrace/test.d/00basic/test_ownership.tc | 46 +++++++---- .../ftrace/test.d/dynevent/add_remove_uprobe.tc | 26 ++++++ .../ftrace/test.d/ftrace/func_set_ftrace_file.tc | 9 ++- .../ftrace/test.d/kprobe/kprobe_args_char.tc | 2 +- .../ftrace/test.d/kprobe/kprobe_args_string.tc | 2 +- tools/testing/selftests/hid/hid_bpf.c | 6 -- tools/testing/selftests/kselftest.h | 10 +-- tools/testing/selftests/kselftest_harness.h | 18 +---- tools/testing/selftests/lib/Makefile | 3 +- tools/testing/selftests/lib/config | 1 - tools/testing/selftests/lib/strscpy.sh | 3 - tools/testing/selftests/resctrl/cat_test.c | 7 +- tools/testing/selftests/rtc/rtctest.c | 7 -- tools/testing/selftests/rust/config | 3 +- tools/testing/selftests/timers/change_skew.c | 3 - tools/testing/selftests/timers/skew_consistency.c | 2 - tools/testing/selftests/timers/threadtest.c | 4 +- tools/testing/selftests/tpm2/test_async.sh | 2 +- tools/testing/selftests/tpm2/test_smoke.sh | 2 +- tools/testing/selftests/tpm2/test_space.sh | 2 +- tools/testing/selftests/user/Makefile | 9 --- tools/testing/selftests/user/config | 1 - tools/testing/selftests/user/test_user_copy.sh | 18 ----- 34 files changed, 302 insertions(+), 111 deletions(-) create mode 100644 tools/testing/selftests/acct/.gitignore create mode 100644 tools/testing/selftests/acct/Makefile create mode 100644 tools/testing/selftests/acct/acct_syscall.c create mode 100644 tools/testing/selftests/core/unshare_test.c create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc delete mode 100755 tools/testing/selftests/lib/strscpy.sh delete mode 100644 tools/testing/selftests/user/Makefile delete mode 100644 tools/testing/selftests/user/config delete mode 100755 tools/testing/selftests/user/test_user_copy.sh ---------------------------------------------------------------- --------------CreUzoFYiIuW8Ze14BFG3Ot7 Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-next-6.12-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-next-6.12-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3RzL01ha2VmaWxlIGIvdG9vbHMv dGVzdGluZy9zZWxmdGVzdHMvTWFrZWZpb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i1rc2Z0X3NraXA9NAotCi1p ZiAhIC9zYmluL21vZHByb2JlIC1xIC1uIHRlc3RfdXNlcl9jb3B5OyB0aGVuCi0JZWNobyAi dXNlcjogbW9kdWxlIHRlc3RfdXNlcl9jb3B5IGlzIG5vdCBmb3VuZCBbU0tJUF0iCi0JZXhp dCAka3NmdF9za2lwCi1maQotaWYgL3NiaW4vbW9kcHJvYmUgLXEgdGVzdF91c2VyX2NvcHk7 IHRoZW4KLQkvc2Jpbi9tb2Rwcm9iZSAtcSAtciB0ZXN0X3VzZXJfY29weQotCWVjaG8gInVz ZXJfY29weTogb2siCi1lbHNlCi0JZWNobyAidXNlcl9jb3B5OiBbRkFJTF0iCi0JZXhpdCAx Ci1maQo= --------------CreUzoFYiIuW8Ze14BFG3Ot7-- . Date: Tue, 17 Sep 2024 00:38:37 +0000 From: Wei Liu To: Linus Torvalds Cc: Wei Liu , Linux on Hyper-V List , Linux Kernel List , kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com Subject: [GIT PULL] Hyper-V next for v6.12 Hi Linus, The following changes since commit 47ac09b91befbb6a235ab620c32af719f8208399: Linux 6.11-rc4 (2024-08-18 13:17:27 -0700) are available in the Git repository at: ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-next-signed-20240916 for you to fetch changes up to 94e86b174d103d941b4afc4f016af8af9e5352fa: tools/hv: Add memory allocation check in hv_fcopy_start (2024-09-09 01:09:27 +0000) ---------------------------------------------------------------- hyperv-next for v6.12 - Optimize boot time by concurrent execution of hv_synic_init() (Saurabh Sengar) - Use helpers to read control registers in hv_snp_boot_ap() (Yosry Ahmed) - Add memory allocation check in hv_fcopy_start (Zhu Jun) ---------------------------------------------------------------- Saurabh Sengar (1): Drivers: hv: vmbus: Optimize boot time by concurrent execution of hv_synic_init() Yosry Ahmed (1): x86/hyperv: use helpers to read control registers in hv_snp_boot_ap() Zhu Jun (1): tools/hv: Add memory allocation check in hv_fcopy_start arch/x86/hyperv/ivm.c | 6 +++--- drivers/hv/vmbus_drv.c | 34 +++++++++++++++++++++++++++++++--- tools/hv/hv_fcopy_uio_daemon.c | 7 +++++++ 3 files changed, 41 insertions(+), 6 deletions(-) . Date: Mon, 16 Sep 2024 19:43:05 -0600 From: Shuah Khan To: Linus Torvalds Cc: shuah , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, David Gow , Brendan Higgins Subject: [GIT PULL] KUnit update for Linux 6.12-rc1 This is a multi-part message in MIME format. --------------lDmTx2uXH530aimSr6U5KQT6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Linus, Please pull the following kunit update for Linux 6.12-rc1. This kunit update for Linux 6.12-rc1 consists of: -- a new int_pow test suite -- documentation update to clarify filename best practices -- kernel-doc fix for EXPORT_SYMBOL_IF_KUNIT -- change to build compile_commands.json automatically instead of requiring a manual build. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.12-rc1 for you to fetch changes up to 7fcc9b53216cd87f73cc6dbb404220350ddc93b8: lib/math: Add int_pow test suite (2024-09-12 10:03:00 -0600) ---------------------------------------------------------------- linux_kselftest-kunit-6.12-rc1 This kunit update for Linux 6.12-rc1 consists of: -- a new int_pow test suite -- documentation update to clarify filename best practices -- kernel-doc fix for EXPORT_SYMBOL_IF_KUNIT -- change to build compile_commands.json automatically instead of requiring a manual build. ---------------------------------------------------------------- Brendan Jackman (1): kunit: tool: Build compile_commands.json Kees Cook (1): Documentation: KUnit: Update filename best practices Luis Felipe Hernandez (1): lib/math: Add int_pow test suite Michal Wajdeczko (1): kunit: Fix kernel-doc for EXPORT_SYMBOL_IF_KUNIT Documentation/dev-tools/kunit/style.rst | 29 ++++++++++++------ include/kunit/visibility.h | 1 + lib/Kconfig.debug | 16 ++++++++++ lib/math/Makefile | 1 + lib/math/tests/Makefile | 3 ++ lib/math/tests/int_pow_kunit.c | 52 +++++++++++++++++++++++++++++++++ tools/testing/kunit/kunit_kernel.py | 3 +- 7 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 lib/math/tests/Makefile create mode 100644 lib/math/tests/int_pow_kunit.c ---------------------------------------------------------------- --------------lDmTx2uXH530aimSr6U5KQT6 Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-kunit-6.12-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-kunit-6.12-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0L3N0eWxlLnJzdCBi L0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0L3N0eWxlLnJzdAppbmRleCBiNmQwZDcz NTlmMDAuLmVhYzgxYTcxNGEyOSAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlvbi9kZXYtdG9v bHMva3VuaXQvc3R5bGUucnN0CisrKyBiL0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0 L3N0eWxlLnJzdApAQCAtMTg4LDE1ICsxODgsMjYgQEAgRm9yIGV4YW1wbGUsIGEgS2NvbmZp ZyBlbnRyeSBtaWdodCBsb29rIGxpa2U6CiBUZXN0IEZpbGUgYW5kIE1vZHVsZSBOYW1lcwog PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotS1VuaXQgdGVzdHMgY2FuIG9mdGVuIGJl IGNvbXBpbGVkIGFzIGEgbW9kdWxlLiBUaGVzZSBtb2R1bGVzIHNob3VsZCBiZSBuYW1lZAot YWZ0ZXIgdGhlIHRlc3Qgc3VpdGUsIGZvbGxvd2VkIGJ5IGBgX3Rlc3RgYC4gSWYgdGhpcyBp cyBsaWtlbHkgdG8gY29uZmxpY3Qgd2l0aAotbm9uLUtVbml0IHRlc3RzLCB0aGUgc3V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PiBOb25lOgotCQljb21tYW5kID0gWydtYWtlJywgJ0FSQ0g9JyAr IHNlbGYuX2xpbnV4X2FyY2gsICdPPScgKyBidWlsZF9kaXIsICctLWpvYnM9JyArIHN0cihq b2JzKV0KKwkJY29tbWFuZCA9IFsnbWFrZScsICdhbGwnLCAnY29tcGlsZV9jb21tYW5kcy5q c29uJywgJ0FSQ0g9JyArIHNlbGYuX2xpbnV4X2FyY2gsCisJCQkgICAnTz0nICsgYnVpbGRf ZGlyLCAnLS1qb2JzPScgKyBzdHIoam9icyldCiAJCWlmIG1ha2Vfb3B0aW9uczoKIAkJCWNv bW1hbmQuZXh0ZW5kKG1ha2Vfb3B0aW9ucykKIAkJaWYgc2VsZi5fY3Jvc3NfY29tcGlsZToK --------------lDmTx2uXH530aimSr6U5KQT6-- . Date: Tue, 17 Sep 2024 01:23:30 -0500 From: Steve French To: Linus Torvalds Cc: LKML , CIFS , Namjae Jeon Subject: [GIT PULL] ksmbd server fixes Please pull the following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63: Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: git://git.samba.org/ksmbd.git tags/6.12-rc-ksmbd-server-fixes-part1 for you to fetch changes up to c5a709f08d40b1a082e44ffcde1aea4d2822ddd5: ksmbd: handle caseless file creation (2024-09-14 00:03:15 -0500) ---------------------------------------------------------------- Four ksmbd server fixes, three for stable - Fix the issue where the directory can't be deleted if the share is on a file system that does not provide dot and dotdot entries. - Fix file creation failure if the parent name of pathname is case sensitive. - Fix write failure with FILE_APPEND_DATA flags. - Add reference count to connection struct to protect UAF of oplocks on multichannel. ---------------------------------------------------------------- Hobin Woo (1): ksmbd: make __dir_empty() compatible with POSIX Namjae Jeon (3): ksmbd: allow write with FILE_APPEND_DATA ksmbd: add refcnt to ksmbd_conn struct ksmbd: handle caseless file creation fs/smb/server/connection.c | 4 +++- fs/smb/server/connection.h | 1 + fs/smb/server/oplock.c | 55 ++++++++++++++++--------------------------------------- fs/smb/server/vfs.c | 19 ++++++++----------- fs/smb/server/vfs_cache.c | 3 +++ 5 files changed, 31 insertions(+), 51 deletions(-) -- Thanks, Steve . Date: Tue, 17 Sep 2024 08:46:53 +0200 From: Ulf Hansson To: Linus , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Viresh Kumar , Ulf Hansson , linux-arm-kernel@lists.infradead.org Subject: [GIT PULL] pmdomain/cpuidle-psci updates for v6.12 Hi Linus, Here's the PR with pmdomain and cpuidle-psci updates for v6.12. Details about the highlights are as usual found in the signed tag. Please pull this in! Kind regards Ulf Hansson The following changes since commit 9ec87c5957ea9bf68d36f5e098605b585b2571e4: OPP: Fix support for required OPPs for multiple PM domains (2024-08-23 11:57:44 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git tags/pmdomain-v6.12 for you to fetch changes up to c6ccb691d484544636bc4a097574c5c135ccccda: pmdomain: core: Reduce debug summary table width (2024-09-13 13:41:33 +0200) ---------------------------------------------------------------- pmdomain core: - Add support for s2idle for CPU PM domains on PREEMPT_RT - Add device managed version of dev_pm_domain_attach|detach_list() - Improve layout of the debugfs summary table pmdomain providers: - amlogic: Remove obsolete vpu domain driver - bcm: raspberrypi: Add support for devices used as wakeup-sources - imx: Fixup clock handling for imx93 at driver remove - rockchip: Add gating support for RK3576 - rockchip: Add support for RK3576 SoC - Some OF parsing simplifications - Some simplifications by using dev_err_probe() and guard() pmdomain consumers: - qcom/media/venus: Convert to the device managed APIs for PM domains cpuidle-psci: - Add support for s2idle/s2ram for the hierarchical topology on PREEMPT_RT - Some OF parsing simplifications ---------------------------------------------------------------- Dario Binacchi (3): pmdomain: imx93-pd: replace dev_err() with dev_err_probe() pmdomain: imx93-pd: don't unprepare clocks on driver remove pmdomain: imx93-pd: drop the context variable "init_off" Detlev Casanova (2): pmdomain: rockchip: Add gating support pmdomain: rockchip: Add gating masks for rk3576 Dikshita Agarwal (2): PM: domains: add device managed version of dev_pm_domain_attach|detach_list() media: venus: use device managed APIs for power domains Finley Xiao (2): dt-bindings: power: Add support for RK3576 SoC pmdomain: rockchip: Add support for RK3576 SoC Geert Uytterhoeven (4): pmdomain: core: Harden inter-column space in debug summary pmdomain: core: Fix "managed by" alignment in debug summary pmdomain: core: Move mode_status_str() pmdomain: core: Reduce debug summary table width Hongbo Li (1): pmdomain: mediatek: make use of dev_err_cast_probe() Jerome Brunet (1): pmdomain: amlogic: remove obsolete vpu domain driver Jinjie Ruan (1): pmdomain: apple: Make apple_pmgr_reset_ops static Krzysztof Kozlowski (11): cpuidle: psci: Simplify with scoped for each OF child loop cpuidle: dt_idle_genpd: Simplify with scoped for each OF child loop pmdomain: rockchip: Simplify with scoped for each OF child loop pmdomain: rockchip: Simplify locking with guard() pmdomain: imx: gpc: Simplify with scoped for each OF child loop pmdomain: imx: gpcv2: Simplify with scoped for each OF child loop pmdomain: qcom: cpr: Simplify with dev_err_probe() pmdomain: qcom: cpr: Simplify locking with guard() pmdomain: qcom: rpmhpd: Simplify locking with guard() pmdomain: qcom: rpmpd: Simplify locking with guard() pmdomain: rockchip: Simplify dropping OF node reference Stefan Wahren (3): pmdomain: raspberrypi-power: Adjust packet definition pmdomain: raspberrypi-power: Add logging to rpi_firmware_set_power pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP Ulf Hansson (11): pmdomain: core: Enable s2idle for CPU PM domains on PREEMPT_RT pmdomain: core: Don't hold the genpd-lock when calling dev_pm_domain_set() pmdomain: core: Use dev_name() instead of kobject_get_path() in debugfs cpuidle: psci-domain: Enable system-wide suspend on PREEMPT_RT cpuidle: psci: Drop redundant assignment of CPUIDLE_FLAG_RCU_IDLE cpuidle: psci: Enable the hierarchical topology for s2ram on PREEMPT_RT cpuidle: psci: Enable the hierarchical topology for s2idle on PREEMPT_RT pmdomain: Merge branch fixes into next pmdomain: Merge branch fixes into next pmdomain: Merge branch dt into next pmdomain: Merge branch fixes into next Zhang Zekun (2): pmdomain: qcom-cpr: Use helper function for_each_available_child_of_node() pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code. .../bindings/power/rockchip,power-controller.yaml | 1 + drivers/base/power/common.c | 45 +++ drivers/cpuidle/cpuidle-psci-domain.c | 17 +- drivers/cpuidle/cpuidle-psci.c | 26 +- drivers/cpuidle/dt_idle_genpd.c | 14 +- drivers/media/platform/qcom/venus/pm_helpers.c | 5 +- drivers/pmdomain/amlogic/Kconfig | 11 - drivers/pmdomain/amlogic/Makefile | 1 - drivers/pmdomain/amlogic/meson-gx-pwrc-vpu.c | 380 --------------------- drivers/pmdomain/apple/pmgr-pwrstate.c | 2 +- drivers/pmdomain/bcm/raspberrypi-power.c | 43 ++- drivers/pmdomain/core.c | 94 +++-- drivers/pmdomain/imx/gpc.c | 14 +- drivers/pmdomain/imx/gpcv2.c | 8 +- drivers/pmdomain/imx/imx93-pd.c | 22 +- drivers/pmdomain/mediatek/mtk-pm-domains.c | 6 +- drivers/pmdomain/qcom/cpr.c | 92 ++--- drivers/pmdomain/qcom/rpmhpd.c | 11 +- drivers/pmdomain/qcom/rpmpd.c | 20 +- drivers/pmdomain/rockchip/pm-domains.c | 118 +++++-- include/dt-bindings/power/rockchip,rk3576-power.h | 30 ++ include/linux/pm_domain.h | 16 +- 22 files changed, 373 insertions(+), 603 deletions(-) delete mode 100644 drivers/pmdomain/amlogic/meson-gx-pwrc-vpu.c create mode 100644 include/dt-bindings/power/rockchip,rk3576-power.h . Date: Tue, 17 Sep 2024 03:22:17 -0500 From: Steve French To: Linus Torvalds Cc: LKML , CIFS Subject: [GIT PULL] smb3 client fixes Please pull the following changes since commit 98f7e32f20d28ec452afb208f9cffc08448a2652: Linux 6.11 (2024-09-15 16:57:56 +0200) are available in the Git repository at: git://git.samba.org/sfrench/cifs-2.6.git tags/v6.12-rc-smb3-client-fixes-= part1 for you to fetch changes up to 5ac1f99fdd09d80223e8f47dffaea41a6563aace: smb: client: fix compression heuristic functions (2024-09-16 20:10:39 -05= 00) ---------------------------------------------------------------- SMB3 client fixes 11 cleanup changesets (moving duplicated code, removing unused code etc.) 7 fixes relating to "sfu" mount options (for better handling special file types) 6 SMB3.1.1 compression fixes/improvements ---------------------------------------------------------------- ChenXiaoSong (7): smb/client: rename cifs_ntsd to smb_ntsd smb/client: rename cifs_sid to smb_sid smb/client: rename cifs_acl to smb_acl smb/client: rename cifs_ace to smb_ace smb: move some duplicate definitions to common/smbacl.h smb: move SMB2 Status code to common header file smb: add comment to STATUS_MCA_OCCURED Enzo Matsumiya (3): smb: client: insert compression check/call on write requests smb: client: compress: LZ77 code improvements cleanup smb: client: fix compression heuristic functions Gaosheng Cui (1): cifs: Remove obsoleted declaration for cifs_dir_open Hongbo Li (1): smb: use LIST_HEAD() to simplify code Pali Roh=C3=A1r (7): cifs: Fix recognizing SFU symlinks cifs: Add support for reading SFU symlink location cifs: Put explicit zero byte into SFU block/char types cifs: Show debug message when SFU Fifo type was detected cifs: Recognize SFU socket type cifs: Add support for creating SFU symlinks cifs: Update SFU comments about fifos and sockets Qianqiang Liu (2): smb: client: compress: fix a potential issue of freeing an invalid po= inter smb: client: compress: fix an "illegal accesses" issue Shen Lichuan (1): smb: client: Use min() macro Steve French (1): smb3: mark compression as CONFIG_EXPERIMENTAL and fix missing compression operation Yuesong Li (1): cifs: convert to use ERR_CAST() fs/smb/client/Kconfig | 14 + fs/smb/client/Makefile | 2 + fs/smb/client/cifs_debug.c | 7 +- fs/smb/client/cifsacl.c | 226 +++--- fs/smb/client/cifsacl.h | 99 +-- fs/smb/client/cifsfs.h | 1 - fs/smb/client/cifsglob.h | 25 +- fs/smb/client/cifspdu.h | 6 - fs/smb/client/cifsproto.h | 28 +- fs/smb/client/cifssmb.c | 14 +- fs/smb/client/compress.c | 390 ++++++++++ fs/smb/client/compress.h | 90 +++ fs/smb/client/compress/lz77.c | 235 ++++++ fs/smb/client/compress/lz77.h | 15 + fs/smb/client/connect.c | 5 +- fs/smb/client/file.c | 7 +- fs/smb/client/fs_context.c | 20 +- fs/smb/client/inode.c | 42 +- fs/smb/client/link.c | 3 + fs/smb/client/misc.c | 9 +- fs/smb/client/smb1ops.c | 2 +- fs/smb/client/smb2file.c | 6 +- fs/smb/client/smb2inode.c | 6 +- fs/smb/client/smb2maperror.c | 2 +- fs/smb/client/smb2misc.c | 2 +- fs/smb/client/smb2ops.c | 98 ++- fs/smb/client/smb2pdu.c | 19 +- fs/smb/client/smb2pdu.h | 8 +- fs/smb/client/smb2proto.h | 2 +- fs/smb/client/smb2transport.c | 2 +- fs/smb/client/smbdirect.c | 6 +- fs/smb/client/transport.c | 4 + fs/smb/client/xattr.c | 4 +- fs/smb/{client =3D> common}/smb2status.h | 6 + fs/smb/common/smbacl.h | 121 ++++ fs/smb/server/oplock.c | 2 +- fs/smb/server/server.c | 2 +- fs/smb/server/smb2misc.c | 2 +- fs/smb/server/smb2pdu.c | 2 +- fs/smb/server/smb_common.c | 2 +- fs/smb/server/smbacl.h | 111 +-- fs/smb/server/smbstatus.h | 1822 ----------------------------------------------- fs/smb/server/transport_rdma.c | 2 +- 43 files changed, 1206 insertions(+), 2265 deletions(-) create mode 100644 fs/smb/client/compress.c create mode 100644 fs/smb/client/compress.h create mode 100644 fs/smb/client/compress/lz77.c create mode 100644 fs/smb/client/compress/lz77.h rename fs/smb/{client =3D> common}/smb2status.h (99%) create mode 100644 fs/smb/common/smbacl.h delete mode 100644 fs/smb/server/smbstatus.h -- Thanks, Steve . Date: Tue, 17 Sep 2024 10:54:10 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/fpu for v6.12-rc1 Linus, please pull the latest x86/fpu branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-fpu-2024-09-= 17 up to: ba386777a30b: x86/elf: Add a new FPU buffer layout info to x86 core f= iles Provide FPU buffer layout in core dumps: Debuggers have guess the FPU buffer layout in core dumps, which is error prone. This is because AMD and Intel layouts differ. To avoid buggy heuristics add a ELF section which describes the buffer layout which can be retrieved by tools. Thanks, tglx ------------------> Vignesh Balasubramanian (1): x86/elf: Add a new FPU buffer layout info to x86 core files arch/x86/Kconfig | 1 + arch/x86/include/uapi/asm/elf.h | 16 ++++++++ arch/x86/kernel/fpu/xstate.c | 89 +++++++++++++++++++++++++++++++++++++++= ++ fs/binfmt_elf.c | 4 +- include/uapi/linux/elf.h | 1 + 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/uapi/asm/elf.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 007bab9f2a0e..c15b4b3fb328 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -107,6 +107,7 @@ config X86 select ARCH_HAS_DEBUG_WX select ARCH_HAS_ZONE_DMA_SET if EXPERT select ARCH_HAVE_NMI_SAFE_CMPXCHG + select ARCH_HAVE_EXTRA_ELF_NOTES select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_MIGHT_HAVE_PC_PARPORT diff --git a/arch/x86/include/uapi/asm/elf.h b/arch/x86/include/uapi/asm/elf.h new file mode 100644 index 000000000000..468e135fa285 --- /dev/null +++ b/arch/x86/include/uapi/asm/elf.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI_ASM_X86_ELF_H +#define _UAPI_ASM_X86_ELF_H + +#include + +struct x86_xfeat_component { + __u32 type; + __u32 size; + __u32 offset; + __u32 flags; +} __packed; + +_Static_assert(sizeof(struct x86_xfeat_component) % 4 =3D=3D 0, "x86_xfeat_c= omponent is not aligned"); + +#endif /* _UAPI_ASM_X86_ELF_H */ diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index c5a026fee5e0..f3a2e59a28e7 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -13,6 +13,7 @@ #include #include #include +#include =20 #include #include @@ -23,6 +24,8 @@ #include #include =20 +#include + #include "context.h" #include "internal.h" #include "legacy.h" @@ -1838,3 +1841,89 @@ int proc_pid_arch_status(struct seq_file *m, struct pi= d_namespace *ns, return 0; } #endif /* CONFIG_PROC_PID_ARCH_STATUS */ + +#ifdef CONFIG_COREDUMP +static const char owner_name[] =3D "LINUX"; + +/* + * Dump type, size, offset and flag values for every xfeature that is presen= t. + */ +static int dump_xsave_layout_desc(struct coredump_params *cprm) +{ + int num_records =3D 0; + int i; + + for_each_extended_xfeature(i, fpu_user_cfg.max_features) { + struct x86_xfeat_component xc =3D { + .type =3D i, + .size =3D xstate_sizes[i], + .offset =3D xstate_offsets[i], + /* reserved for future use */ + .flags =3D 0, + }; + + if (!dump_emit(cprm, &xc, sizeof(xc))) + return 0; + + num_records++; + } + return num_records; +} + +static u32 get_xsave_desc_size(void) +{ + u32 cnt =3D 0; + u32 i; + + for_each_extended_xfeature(i, fpu_user_cfg.max_features) + cnt++; + + return cnt * (sizeof(struct x86_xfeat_component)); +} + +int elf_coredump_extra_notes_write(struct coredump_params *cprm) +{ + int num_records =3D 0; + struct elf_note en; + + if (!fpu_user_cfg.max_features) + return 0; + + en.n_namesz =3D sizeof(owner_name); + en.n_descsz =3D get_xsave_desc_size(); + en.n_type =3D NT_X86_XSAVE_LAYOUT; + + if (!dump_emit(cprm, &en, sizeof(en))) + return 1; + if (!dump_emit(cprm, owner_name, en.n_namesz)) + return 1; + if (!dump_align(cprm, 4)) + return 1; + + num_records =3D dump_xsave_layout_desc(cprm); + if (!num_records) + return 1; + + /* Total size should be equal to the number of records */ + if ((sizeof(struct x86_xfeat_component) * num_records) !=3D en.n_descsz) + return 1; + + return 0; +} + +int elf_coredump_extra_notes_size(void) +{ + int size; + + if (!fpu_user_cfg.max_features) + return 0; + + /* .note header */ + size =3D sizeof(struct elf_note); + /* Name plus alignment to 4 bytes */ + size +=3D roundup(sizeof(owner_name), 4); + size +=3D get_xsave_desc_size(); + + return size; +} +#endif /* CONFIG_COREDUMP */ diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 19fa49cd9907..01bcbe7fdebd 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -2039,7 +2039,7 @@ static int elf_core_dump(struct coredump_params *cprm) { size_t sz =3D info.size; =20 - /* For cell spufs */ + /* For cell spufs and x86 xstate */ sz +=3D elf_coredump_extra_notes_size(); =20 phdr4note =3D kmalloc(sizeof(*phdr4note), GFP_KERNEL); @@ -2103,7 +2103,7 @@ static int elf_core_dump(struct coredump_params *cprm) if (!write_note_info(&info, cprm)) goto end_coredump; =20 - /* For cell spufs */ + /* For cell spufs and x86 xstate */ if (elf_coredump_extra_notes_write(cprm)) goto end_coredump; =20 diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index b54b313bcf07..e30a9b47dc87 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h @@ -411,6 +411,7 @@ typedef struct elf64_shdr { #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ /* Old binutils treats 0x203 as a CET state */ #define NT_X86_SHSTK 0x204 /* x86 SHSTK state */ +#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description */ #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ #define NT_S390_TIMER 0x301 /* s390 timer register */ #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ . Date: Tue, 17 Sep 2024 10:54:05 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/build for v6.12-rc1 Linus, please pull the latest x86/build branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-build-2024-0= 9-17 up to: ae94b263f5f6: x86: Ignore stack unwinding in KCOV Updates for KCOV instrumentation on x86: - Prevent spurious KCOV coverage in common_interrupt() - Fixup the KCOV Makefile directive which got stale due to a source file rename - Exclude stack unwinding from KCOV as it creates large amounts of uninteresting coverage - Provide a self test to validate that KCOV coverage of the interrupt handling code starts not before preempt count got updated. Thanks, tglx ------------------> Dmitry Vyukov (4): x86/entry: Remove unwanted instrumentation in common_interrupt() kcov: Add interrupt handling self test module: Fix KCOV-ignored file name x86: Ignore stack unwinding in KCOV arch/x86/include/asm/hardirq.h | 8 ++++++-- arch/x86/include/asm/idtentry.h | 6 +++--- arch/x86/kernel/Makefile | 8 ++++++++ kernel/kcov.c | 31 +++++++++++++++++++++++++++++++ kernel/module/Makefile | 2 +- lib/Kconfig.debug | 8 ++++++++ 6 files changed, 57 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index c67fa6ad098a..6ffa8b75f4cd 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -69,7 +69,11 @@ extern u64 arch_irq_stat(void); #define local_softirq_pending_ref pcpu_hot.softirq_pending =20 #if IS_ENABLED(CONFIG_KVM_INTEL) -static inline void kvm_set_cpu_l1tf_flush_l1d(void) +/* + * This function is called from noinstr interrupt contexts + * and must be inlined to not get instrumentation. + */ +static __always_inline void kvm_set_cpu_l1tf_flush_l1d(void) { __this_cpu_write(irq_stat.kvm_cpu_l1tf_flush_l1d, 1); } @@ -84,7 +88,7 @@ static __always_inline bool kvm_get_cpu_l1tf_flush_l1d(void) return __this_cpu_read(irq_stat.kvm_cpu_l1tf_flush_l1d); } #else /* !IS_ENABLED(CONFIG_KVM_INTEL) */ -static inline void kvm_set_cpu_l1tf_flush_l1d(void) { } +static __always_inline void kvm_set_cpu_l1tf_flush_l1d(void) { } #endif /* IS_ENABLED(CONFIG_KVM_INTEL) */ =20 #endif /* _ASM_X86_HARDIRQ_H */ diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index d4f24499b256..ad5c68f0509d 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -212,8 +212,8 @@ __visible noinstr void func(struct pt_regs *regs, \ irqentry_state_t state =3D irqentry_enter(regs); \ u32 vector =3D (u32)(u8)error_code; \ \ + kvm_set_cpu_l1tf_flush_l1d(); \ instrumentation_begin(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ run_irq_on_irqstack_cond(__##func, regs, vector); \ instrumentation_end(); \ irqentry_exit(regs, state); \ @@ -250,7 +250,6 @@ static void __##func(struct pt_regs *regs); \ \ static __always_inline void instr_##func(struct pt_regs *regs) \ { \ - kvm_set_cpu_l1tf_flush_l1d(); \ run_sysvec_on_irqstack_cond(__##func, regs); \ } \ \ @@ -258,6 +257,7 @@ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state =3D irqentry_enter(regs); \ \ + kvm_set_cpu_l1tf_flush_l1d(); \ instrumentation_begin(); \ instr_##func (regs); \ instrumentation_end(); \ @@ -288,7 +288,6 @@ static __always_inline void __##func(struct pt_regs *regs= ); \ static __always_inline void instr_##func(struct pt_regs *regs) \ { \ __irq_enter_raw(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs); \ __irq_exit_raw(); \ } \ @@ -297,6 +296,7 @@ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state =3D irqentry_enter(regs); \ \ + kvm_set_cpu_l1tf_flush_l1d(); \ instrumentation_begin(); \ instr_##func (regs); \ instrumentation_end(); \ diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index a847180836e4..f7918980667a 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -35,6 +35,14 @@ KMSAN_SANITIZE_nmi.o :=3D n # If instrumentation of the following files is enabled, boot hangs during # first second. KCOV_INSTRUMENT_head$(BITS).o :=3D n +# These are called from save_stack_trace() on debug paths, +# and produce large amounts of uninteresting coverage. +KCOV_INSTRUMENT_stacktrace.o :=3D n +KCOV_INSTRUMENT_dumpstack.o :=3D n +KCOV_INSTRUMENT_dumpstack_$(BITS).o :=3D n +KCOV_INSTRUMENT_unwind_orc.o :=3D n +KCOV_INSTRUMENT_unwind_frame.o :=3D n +KCOV_INSTRUMENT_unwind_guess.o :=3D n =20 CFLAGS_irq.o :=3D -I $(src)/../include/asm/trace =20 diff --git a/kernel/kcov.c b/kernel/kcov.c index f0a69d402066..d9d4a0c04185 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -1058,6 +1059,32 @@ u64 kcov_common_handle(void) } EXPORT_SYMBOL(kcov_common_handle); =20 +#ifdef CONFIG_KCOV_SELFTEST +static void __init selftest(void) +{ + unsigned long start; + + pr_err("running self test\n"); + /* + * Test that interrupts don't produce spurious coverage. + * The coverage callback filters out interrupt code, but only + * after the handler updates preempt count. Some code periodically + * leaks out of that section and leads to spurious coverage. + * It's hard to call the actual interrupt handler directly, + * so we just loop here for a bit waiting for a timer interrupt. + * We set kcov_mode to enable tracing, but don't setup the area, + * so any attempt to trace will crash. Note: we must not call any + * potentially traced functions in this region. + */ + start =3D jiffies; + current->kcov_mode =3D KCOV_MODE_TRACE_PC; + while ((jiffies - start) * MSEC_PER_SEC / HZ < 300) + ; + current->kcov_mode =3D 0; + pr_err("done running self test\n"); +} +#endif + static int __init kcov_init(void) { int cpu; @@ -1077,6 +1104,10 @@ static int __init kcov_init(void) */ debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops); =20 +#ifdef CONFIG_KCOV_SELFTEST + selftest(); +#endif + return 0; } =20 diff --git a/kernel/module/Makefile b/kernel/module/Makefile index a10b2b9a6fdf..50ffcc413b54 100644 --- a/kernel/module/Makefile +++ b/kernel/module/Makefile @@ -5,7 +5,7 @@ =20 # These are called from save_stack_trace() on slub debug path, # and produce insane amounts of uninteresting coverage. -KCOV_INSTRUMENT_module.o :=3D n +KCOV_INSTRUMENT_main.o :=3D n =20 obj-y +=3D main.o obj-y +=3D strict_rwx.o diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a30c03a66172..270e367b3e6f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2173,6 +2173,14 @@ config KCOV_IRQ_AREA_SIZE soft interrupts. This specifies the size of those areas in the number of unsigned long words. =20 +config KCOV_SELFTEST + bool "Perform short selftests on boot" + depends on KCOV + help + Run short KCOV coverage collection selftests on boot. + On test failure, causes the kernel to panic. Recommended to be + enabled, ensuring critical functionality works as intended. + menuconfig RUNTIME_TESTING_MENU bool "Runtime Testing" default y . Date: Tue, 17 Sep 2024 10:54:09 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/core for v6.12-rc1 Linus, please pull the latest x86/core branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-core-2024-09= -17 up to: 7424fc6b86c8: x86/traps: Enable UBSAN traps on x86 Enable UBSAN traps for x86, which provides better reporting through metadata encodeded into UD1. Thanks, tglx ------------------> Gatlin Newhouse (1): x86/traps: Enable UBSAN traps on x86 arch/x86/include/asm/bug.h | 12 ++++++++++ arch/x86/kernel/traps.c | 59 ++++++++++++++++++++++++++++++++++++++++++--= -- include/linux/ubsan.h | 5 ++++ lib/Kconfig.ubsan | 4 ++-- 4 files changed, 73 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index a3ec87d198ac..806649c7f23d 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -13,6 +13,18 @@ #define INSN_UD2 0x0b0f #define LEN_UD2 2 =20 +/* + * In clang we have UD1s reporting UBSAN failures on X86, 64 and 32bit. + */ +#define INSN_ASOP 0x67 +#define OPCODE_ESCAPE 0x0f +#define SECOND_BYTE_OPCODE_UD1 0xb9 +#define SECOND_BYTE_OPCODE_UD2 0x0b + +#define BUG_NONE 0xffff +#define BUG_UD1 0xfffe +#define BUG_UD2 0xfffd + #ifdef CONFIG_GENERIC_BUG =20 #ifdef CONFIG_X86_32 diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 4fa0b17e5043..415881607c5d 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -42,6 +42,7 @@ #include #include #include +#include =20 #include #include @@ -91,6 +92,47 @@ __always_inline int is_valid_bugaddr(unsigned long addr) return *(unsigned short *)addr =3D=3D INSN_UD2; } =20 +/* + * Check for UD1 or UD2, accounting for Address Size Override Prefixes. + * If it's a UD1, get the ModRM byte to pass along to UBSan. + */ +__always_inline int decode_bug(unsigned long addr, u32 *imm) +{ + u8 v; + + if (addr < TASK_SIZE_MAX) + return BUG_NONE; + + v =3D *(u8 *)(addr++); + if (v =3D=3D INSN_ASOP) + v =3D *(u8 *)(addr++); + if (v !=3D OPCODE_ESCAPE) + return BUG_NONE; + + v =3D *(u8 *)(addr++); + if (v =3D=3D SECOND_BYTE_OPCODE_UD2) + return BUG_UD2; + + if (!IS_ENABLED(CONFIG_UBSAN_TRAP) || v !=3D SECOND_BYTE_OPCODE_UD1) + return BUG_NONE; + + /* Retrieve the immediate (type value) for the UBSAN UD1 */ + v =3D *(u8 *)(addr++); + if (X86_MODRM_RM(v) =3D=3D 4) + addr++; + + *imm =3D 0; + if (X86_MODRM_MOD(v) =3D=3D 1) + *imm =3D *(u8 *)addr; + else if (X86_MODRM_MOD(v) =3D=3D 2) + *imm =3D *(u32 *)addr; + else + WARN_ONCE(1, "Unexpected MODRM_MOD: %u\n", X86_MODRM_MOD(v)); + + return BUG_UD1; +} + + static nokprobe_inline int do_trap_no_signal(struct task_struct *tsk, int trapnr, const char *str, struct pt_regs *regs, long error_code) @@ -216,6 +258,8 @@ static inline void handle_invalid_op(struct pt_regs *regs) static noinstr bool handle_bug(struct pt_regs *regs) { bool handled =3D false; + int ud_type; + u32 imm; =20 /* * Normally @regs are unpoisoned by irqentry_enter(), but handle_bug() @@ -223,7 +267,8 @@ static noinstr bool handle_bug(struct pt_regs *regs) * irqentry_enter(). */ kmsan_unpoison_entry_regs(regs); - if (!is_valid_bugaddr(regs->ip)) + ud_type =3D decode_bug(regs->ip, &imm); + if (ud_type =3D=3D BUG_NONE) return handled; =20 /* @@ -236,10 +281,14 @@ static noinstr bool handle_bug(struct pt_regs *regs) */ if (regs->flags & X86_EFLAGS_IF) raw_local_irq_enable(); - if (report_bug(regs->ip, regs) =3D=3D BUG_TRAP_TYPE_WARN || - handle_cfi_failure(regs) =3D=3D BUG_TRAP_TYPE_WARN) { - regs->ip +=3D LEN_UD2; - handled =3D true; + if (ud_type =3D=3D BUG_UD2) { + if (report_bug(regs->ip, regs) =3D=3D BUG_TRAP_TYPE_WARN || + handle_cfi_failure(regs) =3D=3D BUG_TRAP_TYPE_WARN) { + regs->ip +=3D LEN_UD2; + handled =3D true; + } + } else if (IS_ENABLED(CONFIG_UBSAN_TRAP)) { + pr_crit("%s at %pS\n", report_ubsan_failure(regs, imm), (void *)regs->ip); } if (regs->flags & X86_EFLAGS_IF) raw_local_irq_disable(); diff --git a/include/linux/ubsan.h b/include/linux/ubsan.h index bff7445498de..d8219cbe09ff 100644 --- a/include/linux/ubsan.h +++ b/include/linux/ubsan.h @@ -4,6 +4,11 @@ =20 #ifdef CONFIG_UBSAN_TRAP const char *report_ubsan_failure(struct pt_regs *regs, u32 check_type); +#else +static inline const char *report_ubsan_failure(struct pt_regs *regs, u32 che= ck_type) +{ + return NULL; +} #endif =20 #endif diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index bdda600f8dfb..1d4aa7a83b3a 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan @@ -29,8 +29,8 @@ config UBSAN_TRAP =20 Also note that selecting Y will cause your kernel to Oops with an "illegal instruction" error with no further details - when a UBSAN violation occurs. (Except on arm64, which will - report which Sanitizer failed.) This may make it hard to + when a UBSAN violation occurs. (Except on arm64 and x86, which + will report which Sanitizer failed.) This may make it hard to determine whether an Oops was caused by UBSAN or to figure out the details of a UBSAN violation. It makes the kernel log output less useful for bug reports. . Date: Tue, 17 Sep 2024 10:54:07 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/cleanups for v6.12-rc1 Linus, please pull the latest x86/cleanups branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cleanups-202= 4-09-17 up to: a678164aadbf: x86/EISA: Dereference memory directly instead of using = readl() A set of cleanups across x86: - Use memremap() for the EISA probe instrad of ioremap(). EISA is strictly memory and not MMIO - Cleanups and enhancement all over the place Thanks, tglx ------------------> Gaosheng Cui (1): x86/mtrr: Remove obsolete declaration for mtrr_bp_restore() Kai Huang (3): x86/sgx: Fix a W=3D1 build warning in function comment x86/kexec: Fix a comment of swap_pages() assembly x86/kexec: Add comments around swap_pages() assembly to improve readabi= lity Maciej W. Rozycki (2): x86/EISA: Use memremap() to probe for the EISA BIOS signature x86/EISA: Dereference memory directly instead of using readl() Nathan Chancellor (1): x86/cpu_entry_area: Annotate percpu_setup_exception_stacks() as __init Uros Bizjak (1): x86/boot/64: Strip percpu address space when setting up GDT descriptors WangYuli (1): x86/cpu: Clarify the error message when BIOS does not support SGX Yue Haibing (1): x86/extable: Remove unused declaration fixup_bug() arch/x86/include/asm/extable.h | 1 - arch/x86/include/asm/mtrr.h | 2 -- arch/x86/kernel/cpu/feat_ctl.c | 2 +- arch/x86/kernel/cpu/sgx/main.c | 2 +- arch/x86/kernel/eisa.c | 8 ++++---- arch/x86/kernel/head64.c | 3 ++- arch/x86/kernel/relocate_kernel_64.S | 10 +++++++--- arch/x86/mm/cpu_entry_area.c | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h index eeed395c3177..a0e0c6b50155 100644 --- a/arch/x86/include/asm/extable.h +++ b/arch/x86/include/asm/extable.h @@ -37,7 +37,6 @@ struct pt_regs; =20 extern int fixup_exception(struct pt_regs *regs, int trapnr, unsigned long error_code, unsigned long fault_addr); -extern int fixup_bug(struct pt_regs *regs, int trapnr); extern int ex_get_fixup_type(unsigned long ip); extern void early_fixup_exception(struct pt_regs *regs, int trapnr); =20 diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h index 090d658a85a6..4218248083d9 100644 --- a/arch/x86/include/asm/mtrr.h +++ b/arch/x86/include/asm/mtrr.h @@ -69,7 +69,6 @@ extern int mtrr_add_page(unsigned long base, unsigned long = size, unsigned int type, bool increment); extern int mtrr_del(int reg, unsigned long base, unsigned long size); extern int mtrr_del_page(int reg, unsigned long base, unsigned long size); -extern void mtrr_bp_restore(void); extern int mtrr_trim_uncached_memory(unsigned long end_pfn); extern int amd_special_default_mtrr(void); void mtrr_disable(void); @@ -117,7 +116,6 @@ static inline int mtrr_trim_uncached_memory(unsigned long= end_pfn) return 0; } #define mtrr_bp_init() do {} while (0) -#define mtrr_bp_restore() do {} while (0) #define mtrr_disable() do {} while (0) #define mtrr_enable() do {} while (0) #define mtrr_generic_set_state() do {} while (0) diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c index 1640ae76548f..4a4118784c13 100644 --- a/arch/x86/kernel/cpu/feat_ctl.c +++ b/arch/x86/kernel/cpu/feat_ctl.c @@ -188,7 +188,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c) update_sgx: if (!(msr & FEAT_CTL_SGX_ENABLED)) { if (enable_sgx_kvm || enable_sgx_driver) - pr_err_once("SGX disabled by BIOS.\n"); + pr_err_once("SGX disabled or unsupported by BIOS.\n"); clear_cpu_cap(c, X86_FEATURE_SGX); return; } diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c index 27892e57c4ef..1a000acd933a 100644 --- a/arch/x86/kernel/cpu/sgx/main.c +++ b/arch/x86/kernel/cpu/sgx/main.c @@ -732,7 +732,7 @@ int arch_memory_failure(unsigned long pfn, int flags) return 0; } =20 -/** +/* * A section metric is concatenated in a way that @low bits 12-31 define the * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the * metric. diff --git a/arch/x86/kernel/eisa.c b/arch/x86/kernel/eisa.c index 53935b4d62e3..9535a6507db7 100644 --- a/arch/x86/kernel/eisa.c +++ b/arch/x86/kernel/eisa.c @@ -11,15 +11,15 @@ =20 static __init int eisa_bus_probe(void) { - void __iomem *p; + u32 *p; =20 if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_G= UEST_SEV_SNP)) return 0; =20 - p =3D ioremap(0x0FFFD9, 4); - if (p && readl(p) =3D=3D 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24)) + p =3D memremap(0x0FFFD9, 4, MEMREMAP_WB); + if (p && *p =3D=3D 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24)) EISA_bus =3D 1; - iounmap(p); + memunmap(p); return 0; } subsys_initcall(eisa_bus_probe); diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index a817ed0724d1..4b9d4557fc94 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -559,10 +559,11 @@ void early_setup_idt(void) */ void __head startup_64_setup_gdt_idt(void) { + struct desc_struct *gdt =3D (void *)(__force unsigned long)init_per_cpu_var= (gdt_page.gdt); void *handler =3D NULL; =20 struct desc_ptr startup_gdt_descr =3D { - .address =3D (unsigned long)&RIP_REL_REF(init_per_cpu_var(gdt_page.gdt)), + .address =3D (unsigned long)&RIP_REL_REF(*gdt), .size =3D GDT_SIZE - 1, }; =20 diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_= kernel_64.S index 042c9a0334e9..e9e88c342f75 100644 --- a/arch/x86/kernel/relocate_kernel_64.S +++ b/arch/x86/kernel/relocate_kernel_64.S @@ -170,6 +170,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) wbinvd .Lsme_off: =20 + /* Save the preserve_context to %r11 as swap_pages clobbers %rcx. */ movq %rcx, %r11 call swap_pages =20 @@ -258,7 +259,7 @@ SYM_CODE_END(virtual_mapped) /* Do the copies */ SYM_CODE_START_LOCAL_NOALIGN(swap_pages) UNWIND_HINT_END_OF_STACK - movq %rdi, %rcx /* Put the page_list in %rcx */ + movq %rdi, %rcx /* Put the indirection_page in %rcx */ xorl %edi, %edi xorl %esi, %esi jmp 1f @@ -289,18 +290,21 @@ SYM_CODE_START_LOCAL_NOALIGN(swap_pages) movq %rcx, %rsi /* For ever source page do a copy */ andq $0xfffffffffffff000, %rsi =20 - movq %rdi, %rdx - movq %rsi, %rax + movq %rdi, %rdx /* Save destination page to %rdx */ + movq %rsi, %rax /* Save source page to %rax */ =20 + /* copy source page to swap page */ movq %r10, %rdi movl $512, %ecx rep ; movsq =20 + /* copy destination page to source page */ movq %rax, %rdi movq %rdx, %rsi movl $512, %ecx rep ; movsq =20 + /* copy swap page to destination page */ movq %rdx, %rdi movq %r10, %rsi movl $512, %ecx diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c index e91500a80963..575f863f3c75 100644 --- a/arch/x86/mm/cpu_entry_area.c +++ b/arch/x86/mm/cpu_entry_area.c @@ -164,7 +164,7 @@ static void __init percpu_setup_exception_stacks(unsigned= int cpu) } } #else -static inline void percpu_setup_exception_stacks(unsigned int cpu) +static void __init percpu_setup_exception_stacks(unsigned int cpu) { struct cpu_entry_area *cea =3D get_cpu_entry_area(cpu); =20 . Date: Tue, 17 Sep 2024 10:54:17 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/platform for v6.12-rc1 Linus, please pull the latest x86/platform branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-platform-202= 4-09-17 up to: 22f426972655: x86/platform/uv: Remove unused declaration uv_irq_2_mmr= _info() Remove a stale declaration from the UV platform code Thanks, tglx ------------------> Yue Haibing (1): x86/platform/uv: Remove unused declaration uv_irq_2_mmr_info() arch/x86/include/asm/uv/uv_irq.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/asm/uv/uv_irq.h b/arch/x86/include/asm/uv/uv_ir= q.h index d6b17c760622..1876b5edd142 100644 --- a/arch/x86/include/asm/uv/uv_irq.h +++ b/arch/x86/include/asm/uv/uv_irq.h @@ -31,7 +31,6 @@ enum { UV_AFFINITY_CPU }; =20 -extern int uv_irq_2_mmr_info(int, unsigned long *, int *); extern int uv_setup_irq(char *, int, int, unsigned long, int); extern void uv_teardown_irq(unsigned int); =20 . Date: Tue, 17 Sep 2024 10:54:12 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/fred for v6.12-rc1 Linus, please pull the latest x86/fred branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-fred-2024-09= -17 up to: fe85ee391966: x86/entry: Set FRED RSP0 on return to userspace instead= of context switch Updates for x86 FRED: - Enable FRED right after init_mem_mapping() because at that point the early IDT fault handler is replaced by the real fault handler. The real fault handler retrieves the faulting address from the stack frame and not from CR2 when the FRED feature is set. But that obviously only works when FRED is enabled in the CPU as well. - Set SS to __KERNEL_DS when enabling FRED to prevent a corner case where ERETS can observe a SS mismatch and raises a #GP. Thanks, tglx ------------------> Andrew Cooper (1): x86/msr: Switch between WRMSRNS and WRMSR with the alternatives mechani= sm Xin Li (Intel) (6): x86/fred: Parse cmdline param "fred=3D" in cpu_parse_early_param() x86/fred: Move FRED RSP initialization into a separate function x86/fred: Enable FRED right after init_mem_mapping() x86/fred: Set SS to __KERNEL_DS when enabling FRED x86/entry: Test ti_work for zero before processing individual bits x86/entry: Set FRED RSP0 on return to userspace instead of context swit= ch arch/x86/include/asm/entry-common.h | 13 +++++++++-- arch/x86/include/asm/fred.h | 23 ++++++++++++++++++- arch/x86/include/asm/msr.h | 25 +++++++++------------ arch/x86/include/asm/processor.h | 3 ++- arch/x86/include/asm/switch_to.h | 6 +---- arch/x86/kernel/cpu/common.c | 22 ++++++++++++++++-- arch/x86/kernel/cpu/cpuid-deps.c | 1 - arch/x86/kernel/fred.c | 45 +++++++++++++++++++++++++++++------= -- arch/x86/kernel/setup.c | 7 +++++- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/traps.c | 28 +---------------------- 11 files changed, 111 insertions(+), 64 deletions(-) diff --git a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry= -common.h index fb2809b20b0a..77d20555e04d 100644 --- a/arch/x86/include/asm/entry-common.h +++ b/arch/x86/include/asm/entry-common.h @@ -8,6 +8,7 @@ #include #include #include +#include =20 /* Check that the stack and regs on entry from user mode are sane. */ static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) @@ -44,8 +45,7 @@ static __always_inline void arch_enter_from_user_mode(struc= t pt_regs *regs) } #define arch_enter_from_user_mode arch_enter_from_user_mode =20 -static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, - unsigned long ti_work) +static inline void arch_exit_work(unsigned long ti_work) { if (ti_work & _TIF_USER_RETURN_NOTIFY) fire_user_return_notifiers(); @@ -56,6 +56,15 @@ static inline void arch_exit_to_user_mode_prepare(struct p= t_regs *regs, fpregs_assert_state_consistent(); if (unlikely(ti_work & _TIF_NEED_FPU_LOAD)) switch_fpu_return(); +} + +static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, + unsigned long ti_work) +{ + if (IS_ENABLED(CONFIG_X86_DEBUG_FPU) || unlikely(ti_work)) + arch_exit_work(ti_work); + + fred_update_rsp0(); =20 #ifdef CONFIG_COMPAT /* diff --git a/arch/x86/include/asm/fred.h b/arch/x86/include/asm/fred.h index e86c7ba32435..25ca00bd70e8 100644 --- a/arch/x86/include/asm/fred.h +++ b/arch/x86/include/asm/fred.h @@ -36,6 +36,7 @@ =20 #ifdef CONFIG_X86_FRED #include +#include =20 #include =20 @@ -84,13 +85,33 @@ static __always_inline void fred_entry_from_kvm(unsigned = int type, unsigned int } =20 void cpu_init_fred_exceptions(void); +void cpu_init_fred_rsps(void); void fred_complete_exception_setup(void); =20 +DECLARE_PER_CPU(unsigned long, fred_rsp0); + +static __always_inline void fred_sync_rsp0(unsigned long rsp0) +{ + __this_cpu_write(fred_rsp0, rsp0); +} + +static __always_inline void fred_update_rsp0(void) +{ + unsigned long rsp0 =3D (unsigned long) task_stack_page(current) + THREAD_SI= ZE; + + if (cpu_feature_enabled(X86_FEATURE_FRED) && (__this_cpu_read(fred_rsp0) != =3D rsp0)) { + wrmsrns(MSR_IA32_FRED_RSP0, rsp0); + __this_cpu_write(fred_rsp0, rsp0); + } +} #else /* CONFIG_X86_FRED */ static __always_inline unsigned long fred_event_data(struct pt_regs *regs) {= return 0; } static inline void cpu_init_fred_exceptions(void) { } +static inline void cpu_init_fred_rsps(void) { } static inline void fred_complete_exception_setup(void) { } -static __always_inline void fred_entry_from_kvm(unsigned int type, unsigned = int vector) { } +static inline void fred_entry_from_kvm(unsigned int type, unsigned int vecto= r) { } +static inline void fred_sync_rsp0(unsigned long rsp0) { } +static inline void fred_update_rsp0(void) { } #endif /* CONFIG_X86_FRED */ #endif /* !__ASSEMBLY__ */ =20 diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index d642037f9ed5..001853541f1e 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -99,19 +99,6 @@ static __always_inline void __wrmsr(unsigned int msr, u32 = low, u32 high) : : "c" (msr), "a"(low), "d" (high) : "memory"); } =20 -/* - * WRMSRNS behaves exactly like WRMSR with the only difference being - * that it is not a serializing instruction by default. - */ -static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) -{ - /* Instruction opcode for WRMSRNS; supported in binutils >=3D 2.40. */ - asm volatile("1: .byte 0x0f,0x01,0xc6\n" - "2:\n" - _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR) - : : "c" (msr), "a"(low), "d" (high)); -} - #define native_rdmsr(msr, val1, val2) \ do { \ u64 __val =3D __rdmsr((msr)); \ @@ -312,9 +299,19 @@ do { \ =20 #endif /* !CONFIG_PARAVIRT_XXL */ =20 +/* Instruction opcode for WRMSRNS supported in binutils >=3D 2.40 */ +#define WRMSRNS _ASM_BYTES(0x0f,0x01,0xc6) + +/* Non-serializing WRMSR, when available. Falls back to a serializing WRMSR= . */ static __always_inline void wrmsrns(u32 msr, u64 val) { - __wrmsrns(msr, val, val >> 32); + /* + * WRMSR is 2 bytes. WRMSRNS is 3 bytes. Pad WRMSR with a redundant + * DS prefix to avoid a trailing NOP. + */ + asm volatile("1: " ALTERNATIVE("ds wrmsr", WRMSRNS, X86_FEATURE_WRMSRNS) + "2: " _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR) + : : "c" (msr), "a" ((u32)val), "d" ((u32)(val >> 32))); } =20 /* diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processo= r.h index a75a07f4931f..399f7d1c4c61 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -582,7 +582,8 @@ extern void switch_gdt_and_percpu_base(int); extern void load_direct_gdt(int); extern void load_fixmap_gdt(int); extern void cpu_init(void); -extern void cpu_init_exception_handling(void); +extern void cpu_init_exception_handling(bool boot_cpu); +extern void cpu_init_replace_early_idt(void); extern void cr4_init(void); =20 extern void set_task_blockstep(struct task_struct *task, bool on); diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm/switch_t= o.h index c3bd0c0758c9..75248546403d 100644 --- a/arch/x86/include/asm/switch_to.h +++ b/arch/x86/include/asm/switch_to.h @@ -70,13 +70,9 @@ static inline void update_task_stack(struct task_struct *t= ask) #ifdef CONFIG_X86_32 this_cpu_write(cpu_tss_rw.x86_tss.sp1, task->thread.sp0); #else - if (cpu_feature_enabled(X86_FEATURE_FRED)) { - /* WRMSRNS is a baseline feature for FRED. */ - wrmsrns(MSR_IA32_FRED_RSP0, (unsigned long)task_stack_page(task) + THREAD_= SIZE); - } else if (cpu_feature_enabled(X86_FEATURE_XENPV)) { + if (!cpu_feature_enabled(X86_FEATURE_FRED) && cpu_feature_enabled(X86_FEATU= RE_XENPV)) /* Xen PV enters the kernel on the thread stack. */ load_sp0(task_top_of_stack(task)); - } #endif } =20 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index d4e539d4e158..a4735d9b5a1d 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1510,6 +1510,11 @@ static void __init cpu_parse_early_param(void) if (cmdline_find_option_bool(boot_command_line, "nousershstk")) setup_clear_cpu_cap(X86_FEATURE_USER_SHSTK); =20 + /* Minimize the gap between FRED is available and available but disabled. */ + arglen =3D cmdline_find_option(boot_command_line, "fred", arg, sizeof(arg)); + if (arglen !=3D 2 || strncmp(arg, "on", 2)) + setup_clear_cpu_cap(X86_FEATURE_FRED); + arglen =3D cmdline_find_option(boot_command_line, "clearcpuid", arg, sizeof= (arg)); if (arglen <=3D 0) return; @@ -2171,7 +2176,7 @@ static inline void tss_setup_io_bitmap(struct tss_struc= t *tss) * Setup everything needed to handle exceptions from the IDT, including the = IST * exceptions which use paranoid_entry(). */ -void cpu_init_exception_handling(void) +void cpu_init_exception_handling(bool boot_cpu) { struct tss_struct *tss =3D this_cpu_ptr(&cpu_tss_rw); int cpu =3D raw_smp_processor_id(); @@ -2190,10 +2195,23 @@ void cpu_init_exception_handling(void) /* GHCB needs to be setup to handle #VC. */ setup_ghcb(); =20 + if (cpu_feature_enabled(X86_FEATURE_FRED)) { + /* The boot CPU has enabled FRED during early boot */ + if (!boot_cpu) + cpu_init_fred_exceptions(); + + cpu_init_fred_rsps(); + } else { + load_current_idt(); + } +} + +void __init cpu_init_replace_early_idt(void) +{ if (cpu_feature_enabled(X86_FEATURE_FRED)) cpu_init_fred_exceptions(); else - load_current_idt(); + idt_setup_early_pf(); } =20 /* diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-dep= s.c index b7d9f530ae16..8bd84114c2d9 100644 --- a/arch/x86/kernel/cpu/cpuid-deps.c +++ b/arch/x86/kernel/cpu/cpuid-deps.c @@ -83,7 +83,6 @@ static const struct cpuid_dep cpuid_deps[] =3D { { X86_FEATURE_AMX_TILE, X86_FEATURE_XFD }, { X86_FEATURE_SHSTK, X86_FEATURE_XSAVES }, { X86_FEATURE_FRED, X86_FEATURE_LKGS }, - { X86_FEATURE_FRED, X86_FEATURE_WRMSRNS }, {} }; =20 diff --git a/arch/x86/kernel/fred.c b/arch/x86/kernel/fred.c index 4bcd8791ad96..8d32c3f48abc 100644 --- a/arch/x86/kernel/fred.c +++ b/arch/x86/kernel/fred.c @@ -21,17 +21,53 @@ =20 #define FRED_STKLVL(vector, lvl) ((lvl) << (2 * (vector))) =20 +DEFINE_PER_CPU(unsigned long, fred_rsp0); +EXPORT_PER_CPU_SYMBOL(fred_rsp0); + void cpu_init_fred_exceptions(void) { /* When FRED is enabled by default, remove this log message */ pr_info("Initialize FRED on CPU%d\n", smp_processor_id()); =20 + /* + * If a kernel event is delivered before a CPU goes to user level for + * the first time, its SS is NULL thus NULL is pushed into the SS field + * of the FRED stack frame. But before ERETS is executed, the CPU may + * context switch to another task and go to user level. Then when the + * CPU comes back to kernel mode, SS is changed to __KERNEL_DS. Later + * when ERETS is executed to return from the kernel event handler, a #GP + * fault is generated because SS doesn't match the SS saved in the FRED + * stack frame. + * + * Initialize SS to __KERNEL_DS when enabling FRED to avoid such #GPs. + */ + loadsegment(ss, __KERNEL_DS); + wrmsrl(MSR_IA32_FRED_CONFIG, /* Reserve for CALL emulation */ FRED_CONFIG_REDZONE | FRED_CONFIG_INT_STKLVL(0) | FRED_CONFIG_ENTRYPOINT(asm_fred_entrypoint_user)); =20 + wrmsrl(MSR_IA32_FRED_STKLVLS, 0); + wrmsrl(MSR_IA32_FRED_RSP0, 0); + wrmsrl(MSR_IA32_FRED_RSP1, 0); + wrmsrl(MSR_IA32_FRED_RSP2, 0); + wrmsrl(MSR_IA32_FRED_RSP3, 0); + + /* Enable FRED */ + cr4_set_bits(X86_CR4_FRED); + /* Any further IDT use is a bug */ + idt_invalidate(); + + /* Use int $0x80 for 32-bit system calls in FRED mode */ + setup_clear_cpu_cap(X86_FEATURE_SYSENTER32); + setup_clear_cpu_cap(X86_FEATURE_SYSCALL32); +} + +/* Must be called after setup_cpu_entry_areas() */ +void cpu_init_fred_rsps(void) +{ /* * The purpose of separate stacks for NMI, #DB and #MC *in the kernel* * (remember that user space faults are always taken on stack level 0) @@ -47,13 +83,4 @@ void cpu_init_fred_exceptions(void) wrmsrl(MSR_IA32_FRED_RSP1, __this_cpu_ist_top_va(DB)); wrmsrl(MSR_IA32_FRED_RSP2, __this_cpu_ist_top_va(NMI)); wrmsrl(MSR_IA32_FRED_RSP3, __this_cpu_ist_top_va(DF)); - - /* Enable FRED */ - cr4_set_bits(X86_CR4_FRED); - /* Any further IDT use is a bug */ - idt_invalidate(); - - /* Use int $0x80 for 32-bit system calls in FRED mode */ - setup_clear_cpu_cap(X86_FEATURE_SYSENTER32); - setup_clear_cpu_cap(X86_FEATURE_SYSCALL32); } diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 6129dc2ba784..f1fea506e20f 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1039,7 +1039,12 @@ void __init setup_arch(char **cmdline_p) =20 init_mem_mapping(); =20 - idt_setup_early_pf(); + /* + * init_mem_mapping() relies on the early IDT page fault handling. + * Now either enable FRED or install the real page fault handler + * for 64-bit in the IDT. + */ + cpu_init_replace_early_idt(); =20 /* * Update mmu_cr4_features (and, indirectly, trampoline_cr4_features) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 0c35207320cb..dc4fff8fccce 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -246,7 +246,7 @@ static void notrace start_secondary(void *unused) __flush_tlb_all(); } =20 - cpu_init_exception_handling(); + cpu_init_exception_handling(false); =20 /* * Load the microcode before reaching the AP alive synchronization diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 4fa0b17e5043..197d5888b0e2 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -1402,34 +1402,8 @@ DEFINE_IDTENTRY_SW(iret_error) } #endif =20 -/* Do not enable FRED by default yet. */ -static bool enable_fred __ro_after_init =3D false; - -#ifdef CONFIG_X86_FRED -static int __init fred_setup(char *str) -{ - if (!str) - return -EINVAL; - - if (!cpu_feature_enabled(X86_FEATURE_FRED)) - return 0; - - if (!strcmp(str, "on")) - enable_fred =3D true; - else if (!strcmp(str, "off")) - enable_fred =3D false; - else - pr_warn("invalid FRED option: 'fred=3D%s'\n", str); - return 0; -} -early_param("fred", fred_setup); -#endif - void __init trap_init(void) { - if (cpu_feature_enabled(X86_FEATURE_FRED) && !enable_fred) - setup_clear_cpu_cap(X86_FEATURE_FRED); - /* Init cpu_entry_area before IST entries are set up */ setup_cpu_entry_areas(); =20 @@ -1437,7 +1411,7 @@ void __init trap_init(void) sev_es_init_vc_handling(); =20 /* Initialize TSS before setting up traps so ISTs work */ - cpu_init_exception_handling(); + cpu_init_exception_handling(true); =20 /* Setup traps as cpu_init() might #GP */ if (!cpu_feature_enabled(X86_FEATURE_FRED)) . Date: Tue, 17 Sep 2024 10:54:19 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/timers for v6.12-rc1 Linus, please pull the latest x86/timers branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-timers-2024-= 09-17 up to: e7ff4ebffe3b: x86/tsc: Check for sockets instead of CPUs to make code= match comment Updates for x86 timers: - Use the topology information of number of packages for making the decision about TSC trust instead of using the number of online nodes which is not reflecting the real topology. - Stop the PIT timer 0 when its not in use as to stop pointless emulation in the VMM. - Fix the PIT timer stop sequence for timer 0 so it truly stops both real hardware and buggy VMM emulations. Thanks, tglx ------------------> David Woodhouse (2): x86/i8253: Disable PIT timer 0 when not in use clockevents/drivers/i8253: Fix stop sequence for timer 0 Feng Tang (1): x86/tsc: Use topology_max_packages() to get package number Paul E. McKenney (1): x86/tsc: Check for sockets instead of CPUs to make code match comment arch/x86/kernel/cpu/mshyperv.c | 11 ---------- arch/x86/kernel/i8253.c | 11 ++++++++-- arch/x86/kernel/tsc.c | 10 ++++----- drivers/clocksource/i8253.c | 49 +++++++++++++++++++++++++++++-----------= -- include/linux/i8253.h | 2 +- 5 files changed, 48 insertions(+), 35 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index e0fd57a8ba84..3d4237f27569 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -522,16 +521,6 @@ static void __init ms_hyperv_init_platform(void) if (efi_enabled(EFI_BOOT)) x86_platform.get_nmi_reason =3D hv_get_nmi_reason; =20 - /* - * Hyper-V VMs have a PIT emulation quirk such that zeroing the - * counter register during PIT shutdown restarts the PIT. So it - * continues to interrupt @18.2 HZ. Setting i8253_clear_counter - * to false tells pit_shutdown() not to zero the counter so that - * the PIT really is shutdown. Generation 2 VMs don't have a PIT, - * and setting this value has no effect. - */ - i8253_clear_counter_on_shutdown =3D false; - #if IS_ENABLED(CONFIG_HYPERV) if ((hv_get_isolation_type() =3D=3D HV_ISOLATION_TYPE_VBS) || ms_hyperv.paravisor_present) diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index 2b7999a1a50a..80e262bb627f 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c @@ -8,6 +8,7 @@ #include #include =20 +#include #include #include #include @@ -39,9 +40,15 @@ static bool __init use_pit(void) =20 bool __init pit_timer_init(void) { - if (!use_pit()) + if (!use_pit()) { + /* + * Don't just ignore the PIT. Ensure it's stopped, because + * VMMs otherwise steal CPU time just to pointlessly waggle + * the (masked) IRQ. + */ + clockevent_i8253_disable(); return false; - + } clockevent_i8253_init(true); global_clock_event =3D &i8253_clockevent; return true; diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index d4462fb26299..dfe6847fd99e 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include =20 unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */ @@ -1253,15 +1254,12 @@ static void __init check_system_tsc_reliable(void) * - TSC which does not stop in C-States * - the TSC_ADJUST register which allows to detect even minimal * modifications - * - not more than two sockets. As the number of sockets cannot be - * evaluated at the early boot stage where this has to be - * invoked, check the number of online memory nodes as a - * fallback solution which is an reasonable estimate. + * - not more than four packages */ if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && boot_cpu_has(X86_FEATURE_NONSTOP_TSC) && boot_cpu_has(X86_FEATURE_TSC_ADJUST) && - nr_online_nodes <=3D 4) + topology_max_packages() <=3D 4) tsc_disable_clocksource_watchdog(); } =20 @@ -1290,7 +1288,7 @@ int unsynchronized_tsc(void) */ if (boot_cpu_data.x86_vendor !=3D X86_VENDOR_INTEL) { /* assume multi socket systems are not synchronized: */ - if (num_possible_cpus() > 1) + if (topology_max_packages() > 1) return 1; } =20 diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c index d4350bb10b83..39f7c2d736d1 100644 --- a/drivers/clocksource/i8253.c +++ b/drivers/clocksource/i8253.c @@ -20,13 +20,6 @@ DEFINE_RAW_SPINLOCK(i8253_lock); EXPORT_SYMBOL(i8253_lock); =20 -/* - * Handle PIT quirk in pit_shutdown() where zeroing the counter register - * restarts the PIT, negating the shutdown. On platforms with the quirk, - * platform specific code can set this to false. - */ -bool i8253_clear_counter_on_shutdown __ro_after_init =3D true; - #ifdef CONFIG_CLKSRC_I8253 /* * Since the PIT overflows every tick, its not very useful @@ -108,21 +101,47 @@ int __init clocksource_i8253_init(void) #endif =20 #ifdef CONFIG_CLKEVT_I8253 -static int pit_shutdown(struct clock_event_device *evt) +void clockevent_i8253_disable(void) { - if (!clockevent_state_oneshot(evt) && !clockevent_state_periodic(evt)) - return 0; - raw_spin_lock(&i8253_lock); =20 + /* + * Writing the MODE register should stop the counter, according to + * the datasheet. This appears to work on real hardware (well, on + * modern Intel and AMD boxes; I didn't dig the Pegasos out of the + * shed). + * + * However, some virtual implementations differ, and the MODE change + * doesn't have any effect until either the counter is written (KVM + * in-kernel PIT) or the next interrupt (QEMU). And in those cases, + * it may not stop the *count*, only the interrupts. Although in + * the virt case, that probably doesn't matter, as the value of the + * counter will only be calculated on demand if the guest reads it; + * it's the interrupts which cause steal time. + * + * Hyper-V apparently has a bug where even in mode 0, the IRQ keeps + * firing repeatedly if the counter is running. But it *does* do the + * right thing when the MODE register is written. + * + * So: write the MODE and then load the counter, which ensures that + * the IRQ is stopped on those buggy virt implementations. And then + * write the MODE again, which is the right way to stop it. + */ outb_p(0x30, PIT_MODE); + outb_p(0, PIT_CH0); + outb_p(0, PIT_CH0); =20 - if (i8253_clear_counter_on_shutdown) { - outb_p(0, PIT_CH0); - outb_p(0, PIT_CH0); - } + outb_p(0x30, PIT_MODE); =20 raw_spin_unlock(&i8253_lock); +} + +static int pit_shutdown(struct clock_event_device *evt) +{ + if (!clockevent_state_oneshot(evt) && !clockevent_state_periodic(evt)) + return 0; + + clockevent_i8253_disable(); return 0; } =20 diff --git a/include/linux/i8253.h b/include/linux/i8253.h index 8336b2f6f834..56c280eb2d4f 100644 --- a/include/linux/i8253.h +++ b/include/linux/i8253.h @@ -21,9 +21,9 @@ #define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) =20 extern raw_spinlock_t i8253_lock; -extern bool i8253_clear_counter_on_shutdown; extern struct clock_event_device i8253_clockevent; extern void clockevent_i8253_init(bool oneshot); +extern void clockevent_i8253_disable(void); =20 extern void setup_pit_timer(void); =20 . Date: Tue, 17 Sep 2024 10:54:15 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/mm for v6.12-rc1 Linus, please pull the latest x86/mm branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-mm-2024-09-17 up to: 50c6dbdfd16e: x86/ioremap: Improve iounmap() address range checks Updates for x86 memory management: - Make LAM enablement safe vs. kernel threads using a process mm temporarily as switching back to the process would not update CR3 and therefore not enable LAM causing faults in user space when using tagged pointers. Cure it by synchronizing LAM enablement via IPIs to all CPUs which use the related mm. - Cure a LAM harmless inconsistency between CR3 and the state during context switch. It's both confusing and prone to lead to real bugs - Handle alt stack handling for threads which run with a non-zero protection key. The non-zero key prevents the kernel to access the alternate stack. Cure it by temporarily enabling all protection keys for the alternate stack setup/restore operations. - Provide a EFI config table identity mapping for kexec kernel to prevent kexec fails because the new kernel cannot access the config table array - Use GB pages only when a full GB is mapped in the identity map as otherwise the CPU can speculate into reserved areas after the end of memory which causes malfunction on UV systems. - Remove the noisy and pointless SRAT table dump during boot - Use is_ioremap_addr() for iounmap() address range checks instead of high_memory. is_ioremap_addr() is more precise. Thanks, tglx ------------------> Aruna Ramakrishna (4): x86/pkeys: Add PKRU as a parameter in signal handling functions x86/pkeys: Add helper functions to update PKRU on the sigframe x86/pkeys: Update PKRU to enable all pkeys before XSAVE x86/pkeys: Restore altstack access in sigreturn() Keith Lucas (1): selftests/mm: Add new testcases for pkeys Li RongQing (1): x86/mm: Don't print out SRAT table information Max Ramanouski (1): x86/ioremap: Improve iounmap() address range checks Steve Wahl (1): x86/mm/ident_map: Use gbpages only where full GB page should be mapped. Tao Liu (1): x86/kexec: Add EFI config table identity mapping for kexec kernel Yosry Ahmed (4): x86/mm: Use IPIs to synchronize LAM enablement x86/mm: Fix LAM inconsistency during context switch x86/mm: Cleanup prctl_enable_tagged_addr() nr_bits error checking x86/mm: Remove unused CR3_HW_ASID_BITS Yue Haibing (1): x86/mm: Remove unused NX related declarations Yuntao Wang (1): x86/mm: Remove duplicate check from build_cr3() arch/x86/include/asm/fpu/signal.h | 2 +- arch/x86/include/asm/mmu_context.h | 8 +- arch/x86/include/asm/pgtable_types.h | 2 - arch/x86/include/asm/tlbflush.h | 9 +- arch/x86/kernel/fpu/signal.c | 27 +- arch/x86/kernel/fpu/xstate.c | 13 + arch/x86/kernel/fpu/xstate.h | 2 + arch/x86/kernel/machine_kexec_64.c | 27 ++ arch/x86/kernel/process_64.c | 42 +- arch/x86/kernel/signal.c | 29 +- arch/x86/kernel/signal_64.c | 6 +- arch/x86/mm/ident_map.c | 23 +- arch/x86/mm/ioremap.c | 3 +- arch/x86/mm/srat.c | 6 +- arch/x86/mm/tlb.c | 19 +- include/linux/ioremap.h | 1 + tools/testing/selftests/mm/Makefile | 1 + tools/testing/selftests/mm/pkey-helpers.h | 13 +- tools/testing/selftests/mm/pkey_sighandler_tests.c | 481 +++++++++++++++++++= ++ tools/testing/selftests/mm/protection_keys.c | 10 - 20 files changed, 664 insertions(+), 60 deletions(-) create mode 100644 tools/testing/selftests/mm/pkey_sighandler_tests.c diff --git a/arch/x86/include/asm/fpu/signal.h b/arch/x86/include/asm/fpu/sig= nal.h index 611fa41711af..eccc75bc9c4f 100644 --- a/arch/x86/include/asm/fpu/signal.h +++ b/arch/x86/include/asm/fpu/signal.h @@ -29,7 +29,7 @@ fpu__alloc_mathframe(unsigned long sp, int ia32_frame, =20 unsigned long fpu__get_fpstate_size(void); =20 -extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int = size); +extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int = size, u32 pkru); extern void fpu__clear_user_states(struct fpu *fpu); extern bool fpu__restore_sig(void __user *buf, int ia32_frame); =20 diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_co= ntext.h index 8dac45a2c7fc..19091ebb8633 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -88,7 +88,13 @@ static inline void switch_ldt(struct mm_struct *prev, stru= ct mm_struct *next) #ifdef CONFIG_ADDRESS_MASKING static inline unsigned long mm_lam_cr3_mask(struct mm_struct *mm) { - return mm->context.lam_cr3_mask; + /* + * When switch_mm_irqs_off() is called for a kthread, it may race with + * LAM enablement. switch_mm_irqs_off() uses the LAM mask to do two + * things: populate CR3 and populate 'cpu_tlbstate.lam'. Make sure it + * reads a single value for both. + */ + return READ_ONCE(mm->context.lam_cr3_mask); } =20 static inline void dup_lam(struct mm_struct *oldmm, struct mm_struct *mm) diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgta= ble_types.h index 2f321137736c..6f82e75b6149 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -517,8 +517,6 @@ typedef struct page *pgtable_t; =20 extern pteval_t __supported_pte_mask; extern pteval_t __default_kernel_pte_mask; -extern void set_nx(void); -extern int nx_enabled; =20 #define pgprot_writecombine pgprot_writecombine extern pgprot_t pgprot_writecombine(pgprot_t prot); diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index 25726893c6f4..69e79fff41b8 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -399,11 +399,10 @@ static inline u64 tlbstate_lam_cr3_mask(void) return lam << X86_CR3_LAM_U57_BIT; } =20 -static inline void set_tlbstate_lam_mode(struct mm_struct *mm) +static inline void cpu_tlbstate_update_lam(unsigned long lam, u64 untag_mask) { - this_cpu_write(cpu_tlbstate.lam, - mm->context.lam_cr3_mask >> X86_CR3_LAM_U57_BIT); - this_cpu_write(tlbstate_untag_mask, mm->context.untag_mask); + this_cpu_write(cpu_tlbstate.lam, lam >> X86_CR3_LAM_U57_BIT); + this_cpu_write(tlbstate_untag_mask, untag_mask); } =20 #else @@ -413,7 +412,7 @@ static inline u64 tlbstate_lam_cr3_mask(void) return 0; } =20 -static inline void set_tlbstate_lam_mode(struct mm_struct *mm) +static inline void cpu_tlbstate_update_lam(unsigned long lam, u64 untag_mask) { } #endif diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c index 247f2225aa9f..1065ab995305 100644 --- a/arch/x86/kernel/fpu/signal.c +++ b/arch/x86/kernel/fpu/signal.c @@ -63,6 +63,16 @@ static inline bool check_xstate_in_sigframe(struct fxregs_= state __user *fxbuf, return true; } =20 +/* + * Update the value of PKRU register that was already pushed onto the signal= frame. + */ +static inline int update_pkru_in_sigframe(struct xregs_state __user *buf, u3= 2 pkru) +{ + if (unlikely(!cpu_feature_enabled(X86_FEATURE_OSPKE))) + return 0; + return __put_user(pkru, (unsigned int __user *)get_xsave_addr_user(buf, XFE= ATURE_PKRU)); +} + /* * Signal frame handlers. */ @@ -156,10 +166,17 @@ static inline bool save_xstate_epilog(void __user *buf,= int ia32_frame, return !err; } =20 -static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf) +static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf, u3= 2 pkru) { - if (use_xsave()) - return xsave_to_user_sigframe(buf); + int err =3D 0; + + if (use_xsave()) { + err =3D xsave_to_user_sigframe(buf); + if (!err) + err =3D update_pkru_in_sigframe(buf, pkru); + return err; + } + if (use_fxsr()) return fxsave_to_user_sigframe((struct fxregs_state __user *) buf); else @@ -185,7 +202,7 @@ static inline int copy_fpregs_to_sigframe(struct xregs_st= ate __user *buf) * For [f]xsave state, update the SW reserved fields in the [f]xsave frame * indicating the absence/presence of the extended state to the user. */ -bool copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int siz= e) +bool copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int siz= e, u32 pkru) { struct task_struct *tsk =3D current; struct fpstate *fpstate =3D tsk->thread.fpu.fpstate; @@ -228,7 +245,7 @@ bool copy_fpstate_to_sigframe(void __user *buf, void __us= er *buf_fx, int size) fpregs_restore_userregs(); =20 pagefault_disable(); - ret =3D copy_fpregs_to_sigframe(buf_fx); + ret =3D copy_fpregs_to_sigframe(buf_fx, pkru); pagefault_enable(); fpregs_unlock(); =20 diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index c5a026fee5e0..fa7628bb541b 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -993,6 +993,19 @@ void *get_xsave_addr(struct xregs_state *xsave, int xfea= ture_nr) } EXPORT_SYMBOL_GPL(get_xsave_addr); =20 +/* + * Given an xstate feature nr, calculate where in the xsave buffer the state= is. + * The xsave buffer should be in standard format, not compacted (e.g. user m= ode + * signal frames). + */ +void __user *get_xsave_addr_user(struct xregs_state __user *xsave, int xfeat= ure_nr) +{ + if (WARN_ON_ONCE(!xfeature_enabled(xfeature_nr))) + return NULL; + + return (void __user *)xsave + xstate_offsets[xfeature_nr]; +} + #ifdef CONFIG_ARCH_HAS_PKEYS =20 /* diff --git a/arch/x86/kernel/fpu/xstate.h b/arch/x86/kernel/fpu/xstate.h index 2ee0b9c53dcc..5f057e50df81 100644 --- a/arch/x86/kernel/fpu/xstate.h +++ b/arch/x86/kernel/fpu/xstate.h @@ -54,6 +54,8 @@ extern int copy_sigframe_from_user_to_xstate(struct task_st= ruct *tsk, const void extern void fpu__init_cpu_xstate(void); extern void fpu__init_system_xstate(unsigned int legacy_size); =20 +extern void __user *get_xsave_addr_user(struct xregs_state __user *xsave, in= t xfeature_nr); + static inline u64 xfeatures_mask_supervisor(void) { return fpu_kernel_cfg.max_features & XFEATURE_MASK_SUPERVISOR_SUPPORTED; diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kex= ec_64.c index cc0f7f70b17b..9c9ac606893e 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c @@ -28,6 +28,7 @@ #include #include #include +#include =20 #ifdef CONFIG_ACPI /* @@ -87,6 +88,8 @@ map_efi_systab(struct x86_mapping_info *info, pgd_t *level4= p) { #ifdef CONFIG_EFI unsigned long mstart, mend; + void *kaddr; + int ret; =20 if (!efi_enabled(EFI_BOOT)) return 0; @@ -102,6 +105,30 @@ map_efi_systab(struct x86_mapping_info *info, pgd_t *lev= el4p) if (!mstart) return 0; =20 + ret =3D kernel_ident_mapping_init(info, level4p, mstart, mend); + if (ret) + return ret; + + kaddr =3D memremap(mstart, mend - mstart, MEMREMAP_WB); + if (!kaddr) { + pr_err("Could not map UEFI system table\n"); + return -ENOMEM; + } + + mstart =3D efi_config_table; + + if (efi_enabled(EFI_64BIT)) { + efi_system_table_64_t *stbl =3D (efi_system_table_64_t *)kaddr; + + mend =3D mstart + sizeof(efi_config_table_64_t) * stbl->nr_tables; + } else { + efi_system_table_32_t *stbl =3D (efi_system_table_32_t *)kaddr; + + mend =3D mstart + sizeof(efi_config_table_32_t) * stbl->nr_tables; + } + + memunmap(kaddr); + return kernel_ident_mapping_init(info, level4p, mstart, mend); #endif return 0; diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 6d3d20e3e43a..226472332a70 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -798,6 +798,32 @@ static long prctl_map_vdso(const struct vdso_image *imag= e, unsigned long addr) =20 #define LAM_U57_BITS 6 =20 +static void enable_lam_func(void *__mm) +{ + struct mm_struct *mm =3D __mm; + unsigned long lam; + + if (this_cpu_read(cpu_tlbstate.loaded_mm) =3D=3D mm) { + lam =3D mm_lam_cr3_mask(mm); + write_cr3(__read_cr3() | lam); + cpu_tlbstate_update_lam(lam, mm_untag_mask(mm)); + } +} + +static void mm_enable_lam(struct mm_struct *mm) +{ + mm->context.lam_cr3_mask =3D X86_CR3_LAM_U57; + mm->context.untag_mask =3D ~GENMASK(62, 57); + + /* + * Even though the process must still be single-threaded at this + * point, kernel threads may be using the mm. IPI those kernel + * threads if they exist. + */ + on_each_cpu_mask(mm_cpumask(mm), enable_lam_func, mm, true); + set_bit(MM_CONTEXT_LOCK_LAM, &mm->context.flags); +} + static int prctl_enable_tagged_addr(struct mm_struct *mm, unsigned long nr_b= its) { if (!cpu_feature_enabled(X86_FEATURE_LAM)) @@ -814,25 +840,21 @@ static int prctl_enable_tagged_addr(struct mm_struct *m= m, unsigned long nr_bits) if (mmap_write_lock_killable(mm)) return -EINTR; =20 + /* + * MM_CONTEXT_LOCK_LAM is set on clone. Prevent LAM from + * being enabled unless the process is single threaded: + */ if (test_bit(MM_CONTEXT_LOCK_LAM, &mm->context.flags)) { mmap_write_unlock(mm); return -EBUSY; } =20 - if (!nr_bits) { - mmap_write_unlock(mm); - return -EINVAL; - } else if (nr_bits <=3D LAM_U57_BITS) { - mm->context.lam_cr3_mask =3D X86_CR3_LAM_U57; - mm->context.untag_mask =3D ~GENMASK(62, 57); - } else { + if (!nr_bits || nr_bits > LAM_U57_BITS) { mmap_write_unlock(mm); return -EINVAL; } =20 - write_cr3(__read_cr3() | mm->context.lam_cr3_mask); - set_tlbstate_lam_mode(mm); - set_bit(MM_CONTEXT_LOCK_LAM, &mm->context.flags); + mm_enable_lam(mm); =20 mmap_write_unlock(mm); =20 diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 31b6f5dddfc2..5f441039b572 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -60,6 +60,24 @@ static inline int is_x32_frame(struct ksignal *ksig) ksig->ka.sa.sa_flags & SA_X32_ABI; } =20 +/* + * Enable all pkeys temporarily, so as to ensure that both the current + * execution stack as well as the alternate signal stack are writeable. + * The application can use any of the available pkeys to protect the + * alternate signal stack, and we don't know which one it is, so enable + * all. The PKRU register will be reset to init_pkru later in the flow, + * in fpu__clear_user_states(), and it is the application's responsibility + * to enable the appropriate pkey as the first step in the signal handler + * so that the handler does not segfault. + */ +static inline u32 sig_prepare_pkru(void) +{ + u32 orig_pkru =3D read_pkru(); + + write_pkru(0); + return orig_pkru; +} + /* * Set up a signal frame. */ @@ -84,6 +102,7 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs, s= ize_t frame_size, unsigned long math_size =3D 0; unsigned long sp =3D regs->sp; unsigned long buf_fx =3D 0; + u32 pkru; =20 /* redzone */ if (!ia32_frame) @@ -138,9 +157,17 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs,= size_t frame_size, return (void __user *)-1L; } =20 + /* Update PKRU to enable access to the alternate signal stack. */ + pkru =3D sig_prepare_pkru(); /* save i387 and extended state */ - if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size)) + if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size, p= kru)) { + /* + * Restore PKRU to the original, user-defined value; disable + * extra pkeys enabled for the alternate signal stack, if any. + */ + write_pkru(pkru); return (void __user *)-1L; + } =20 return (void __user *)sp; } diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 8a94053c5444..ee9453891901 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c @@ -260,13 +260,13 @@ SYSCALL_DEFINE0(rt_sigreturn) =20 set_current_blocked(&set); =20 - if (!restore_sigcontext(regs, &frame->uc.uc_mcontext, uc_flags)) + if (restore_altstack(&frame->uc.uc_stack)) goto badframe; =20 - if (restore_signal_shadow_stack()) + if (!restore_sigcontext(regs, &frame->uc.uc_mcontext, uc_flags)) goto badframe; =20 - if (restore_altstack(&frame->uc.uc_stack)) + if (restore_signal_shadow_stack()) goto badframe; =20 return regs->ax; diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c index c45127265f2f..437e96fb4977 100644 --- a/arch/x86/mm/ident_map.c +++ b/arch/x86/mm/ident_map.c @@ -99,18 +99,31 @@ static int ident_pud_init(struct x86_mapping_info *info, = pud_t *pud_page, for (; addr < end; addr =3D next) { pud_t *pud =3D pud_page + pud_index(addr); pmd_t *pmd; + bool use_gbpage; =20 next =3D (addr & PUD_MASK) + PUD_SIZE; if (next > end) next =3D end; =20 - if (info->direct_gbpages) { - pud_t pudval; + /* if this is already a gbpage, this portion is already mapped */ + if (pud_leaf(*pud)) + continue; + + /* Is using a gbpage allowed? */ + use_gbpage =3D info->direct_gbpages; =20 - if (pud_present(*pud)) - continue; + /* Don't use gbpage if it maps more than the requested region. */ + /* at the begining: */ + use_gbpage &=3D ((addr & ~PUD_MASK) =3D=3D 0); + /* ... or at the end: */ + use_gbpage &=3D ((next & ~PUD_MASK) =3D=3D 0); + + /* Never overwrite existing mappings */ + use_gbpage &=3D !pud_present(*pud); + + if (use_gbpage) { + pud_t pudval; =20 - addr &=3D PUD_MASK; pudval =3D __pud((addr - info->offset) | info->page_flag); set_pud(pud, pudval); continue; diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index aa7d279321ea..70b02fc61d93 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -457,7 +458,7 @@ void iounmap(volatile void __iomem *addr) { struct vm_struct *p, *o; =20 - if ((void __force *)addr <=3D high_memory) + if (WARN_ON_ONCE(!is_ioremap_addr((void __force *)addr))) return; =20 /* diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 9c52a95937ad..6f8e0f21c710 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c @@ -57,8 +57,7 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_= affinity *pa) } set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); - printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u\n", - pxm, apic_id, node); + pr_debug("SRAT: PXM %u -> APIC 0x%04x -> Node %u\n", pxm, apic_id, node); } =20 /* Callback for Proximity Domain -> LAPIC mapping */ @@ -98,8 +97,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affi= nity *pa) =20 set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); - printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%02x -> Node %u\n", - pxm, apic_id, node); + pr_debug("SRAT: PXM %u -> APIC 0x%02x -> Node %u\n", pxm, apic_id, node); } =20 int __init x86_acpi_numa_init(void) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 44ac64f3a047..86593d1b787d 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -11,6 +11,7 @@ #include #include #include +#include =20 #include #include @@ -85,9 +86,6 @@ * */ =20 -/* There are 12 bits of space for ASIDS in CR3 */ -#define CR3_HW_ASID_BITS 12 - /* * When enabled, MITIGATION_PAGE_TABLE_ISOLATION consumes a single bit for * user/kernel switches @@ -160,7 +158,6 @@ static inline unsigned long build_cr3(pgd_t *pgd, u16 asi= d, unsigned long lam) unsigned long cr3 =3D __sme_pa(pgd) | lam; =20 if (static_cpu_has(X86_FEATURE_PCID)) { - VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE); cr3 |=3D kern_pcid(asid); } else { VM_WARN_ON_ONCE(asid !=3D 0); @@ -503,9 +500,9 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct = mm_struct *next, { struct mm_struct *prev =3D this_cpu_read(cpu_tlbstate.loaded_mm); u16 prev_asid =3D this_cpu_read(cpu_tlbstate.loaded_mm_asid); - unsigned long new_lam =3D mm_lam_cr3_mask(next); bool was_lazy =3D this_cpu_read(cpu_tlbstate_shared.is_lazy); unsigned cpu =3D smp_processor_id(); + unsigned long new_lam; u64 next_tlb_gen; bool need_flush; u16 new_asid; @@ -619,9 +616,7 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct = mm_struct *next, cpumask_clear_cpu(cpu, mm_cpumask(prev)); } =20 - /* - * Start remote flushes and then read tlb_gen. - */ + /* Start receiving IPIs and then read tlb_gen (and LAM below) */ if (next !=3D &init_mm) cpumask_set_cpu(cpu, mm_cpumask(next)); next_tlb_gen =3D atomic64_read(&next->context.tlb_gen); @@ -633,7 +628,7 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct = mm_struct *next, barrier(); } =20 - set_tlbstate_lam_mode(next); + new_lam =3D mm_lam_cr3_mask(next); if (need_flush) { this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id); this_cpu_write(cpu_tlbstate.ctxs[new_asid].tlb_gen, next_tlb_gen); @@ -652,6 +647,7 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct = mm_struct *next, =20 this_cpu_write(cpu_tlbstate.loaded_mm, next); this_cpu_write(cpu_tlbstate.loaded_mm_asid, new_asid); + cpu_tlbstate_update_lam(new_lam, mm_untag_mask(next)); =20 if (next !=3D prev) { cr4_update_pce_mm(next); @@ -698,6 +694,7 @@ void initialize_tlbstate_and_flush(void) int i; struct mm_struct *mm =3D this_cpu_read(cpu_tlbstate.loaded_mm); u64 tlb_gen =3D atomic64_read(&init_mm.context.tlb_gen); + unsigned long lam =3D mm_lam_cr3_mask(mm); unsigned long cr3 =3D __read_cr3(); =20 /* Assert that CR3 already references the right mm. */ @@ -705,7 +702,7 @@ void initialize_tlbstate_and_flush(void) =20 /* LAM expected to be disabled */ WARN_ON(cr3 & (X86_CR3_LAM_U48 | X86_CR3_LAM_U57)); - WARN_ON(mm_lam_cr3_mask(mm)); + WARN_ON(lam); =20 /* * Assert that CR4.PCIDE is set if needed. (CR4.PCIDE initialization @@ -724,7 +721,7 @@ void initialize_tlbstate_and_flush(void) this_cpu_write(cpu_tlbstate.next_asid, 1); this_cpu_write(cpu_tlbstate.ctxs[0].ctx_id, mm->context.ctx_id); this_cpu_write(cpu_tlbstate.ctxs[0].tlb_gen, tlb_gen); - set_tlbstate_lam_mode(mm); + cpu_tlbstate_update_lam(lam, mm_untag_mask(mm)); =20 for (i =3D 1; i < TLB_NR_DYN_ASIDS; i++) this_cpu_write(cpu_tlbstate.ctxs[i].ctx_id, 0); diff --git a/include/linux/ioremap.h b/include/linux/ioremap.h index f0e99fc7dd8b..2bd1661fe9ad 100644 --- a/include/linux/ioremap.h +++ b/include/linux/ioremap.h @@ -4,6 +4,7 @@ =20 #include #include +#include =20 #if defined(CONFIG_HAS_IOMEM) || defined(CONFIG_GENERIC_IOREMAP) /* diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm= /Makefile index 901e0d07765b..1f176fff7054 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -88,6 +88,7 @@ CAN_BUILD_X86_64 :=3D $(shell ./../x86/check_cc.sh "$(CC)" = ../x86/trivial_64bit_pr CAN_BUILD_WITH_NOPIE :=3D $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivia= l_program.c -no-pie) =20 VMTARGETS :=3D protection_keys +VMTARGETS +=3D pkey_sighandler_tests BINARIES_32 :=3D $(VMTARGETS:%=3D%_32) BINARIES_64 :=3D $(VMTARGETS:%=3D%_64) =20 diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selfte= sts/mm/pkey-helpers.h index 1af3156a9db8..4d31a309a46b 100644 --- a/tools/testing/selftests/mm/pkey-helpers.h +++ b/tools/testing/selftests/mm/pkey-helpers.h @@ -79,7 +79,18 @@ extern void abort_hooks(void); } \ } while (0) =20 -__attribute__((noinline)) int read_ptr(int *ptr); +#define barrier() __asm__ __volatile__("": : :"memory") +#ifndef noinline +# define noinline __attribute__((noinline)) +#endif + +noinline int read_ptr(int *ptr) +{ + /* Keep GCC from optimizing this away somehow */ + barrier(); + return *ptr; +} + void expected_pkey_fault(int pkey); int sys_pkey_alloc(unsigned long flags, unsigned long init_val); int sys_pkey_free(unsigned long pkey); diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testi= ng/selftests/mm/pkey_sighandler_tests.c new file mode 100644 index 000000000000..a8088b645ad6 --- /dev/null +++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c @@ -0,0 +1,481 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Tests Memory Protection Keys (see Documentation/core-api/protection-keys.= rst) + * + * The testcases in this file exercise various flows related to signal handl= ing, + * using an alternate signal stack, with the default pkey (pkey 0) disabled. + * + * Compile with: + * gcc -mxsave -o pkey_sighandler_tests -O2 -g -std=3Dgnu99 -pthread -W= all pkey_sighandler_tests.c -I../../../../tools/include -lrt -ldl -lm + * gcc -mxsave -m32 -o pkey_sighandler_tests -O2 -g -std=3Dgnu99 -pthread -W= all pkey_sighandler_tests.c -I../../../../tools/include -lrt -ldl -lm + */ +#define _GNU_SOURCE +#define __SANE_USERSPACE_TYPES__ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pkey-helpers.h" + +#define STACK_SIZE PTHREAD_STACK_MIN + +void expected_pkey_fault(int pkey) {} + +pthread_mutex_t mutex =3D PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t cond =3D PTHREAD_COND_INITIALIZER; +siginfo_t siginfo =3D {0}; + +/* + * We need to use inline assembly instead of glibc's syscall because glibc's + * syscall will attempt to access the PLT in order to call a library function + * which is protected by MPK 0 which we don't have access to. + */ +static inline __always_inline +long syscall_raw(long n, long a1, long a2, long a3, long a4, long a5, long a= 6) +{ + unsigned long ret; +#ifdef __x86_64__ + register long r10 asm("r10") =3D a4; + register long r8 asm("r8") =3D a5; + register long r9 asm("r9") =3D a6; + asm volatile ("syscall" + : "=3Da"(ret) + : "a"(n), "D"(a1), "S"(a2), "d"(a3), "r"(r10), "r"(r8), "r"(r9) + : "rcx", "r11", "memory"); +#elif defined __i386__ + asm volatile ("int $0x80" + : "=3Da"(ret) + : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5) + : "memory"); +#else +# error syscall_raw() not implemented +#endif + return ret; +} + +static void sigsegv_handler(int signo, siginfo_t *info, void *ucontext) +{ + pthread_mutex_lock(&mutex); + + memcpy(&siginfo, info, sizeof(siginfo_t)); + + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mutex); + + syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); +} + +static void sigusr1_handler(int signo, siginfo_t *info, void *ucontext) +{ + pthread_mutex_lock(&mutex); + + memcpy(&siginfo, info, sizeof(siginfo_t)); + + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mutex); +} + +static void sigusr2_handler(int signo, siginfo_t *info, void *ucontext) +{ + /* + * pkru should be the init_pkru value which enabled MPK 0 so + * we can use library functions. + */ + printf("%s invoked.\n", __func__); +} + +static void raise_sigusr2(void) +{ + pid_t tid =3D 0; + + tid =3D syscall_raw(SYS_gettid, 0, 0, 0, 0, 0, 0); + + syscall_raw(SYS_tkill, tid, SIGUSR2, 0, 0, 0, 0); + + /* + * We should return from the signal handler here and be able to + * return to the interrupted thread. + */ +} + +static void *thread_segv_with_pkey0_disabled(void *ptr) +{ + /* Disable MPK 0 (and all others too) */ + __write_pkey_reg(0x55555555); + + /* Segfault (with SEGV_MAPERR) */ + *(int *) (0x1) =3D 1; + return NULL; +} + +static void *thread_segv_pkuerr_stack(void *ptr) +{ + /* Disable MPK 0 (and all others too) */ + __write_pkey_reg(0x55555555); + + /* After we disable MPK 0, we can't access the stack to return */ + return NULL; +} + +static void *thread_segv_maperr_ptr(void *ptr) +{ + stack_t *stack =3D ptr; + int *bad =3D (int *)1; + + /* + * Setup alternate signal stack, which should be pkey_mprotect()ed by + * MPK 0. The thread's stack cannot be used for signals because it is + * not accessible by the default init_pkru value of 0x55555554. + */ + syscall_raw(SYS_sigaltstack, (long)stack, 0, 0, 0, 0, 0); + + /* Disable MPK 0. Only MPK 1 is enabled. */ + __write_pkey_reg(0x55555551); + + /* Segfault */ + *bad =3D 1; + syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); + return NULL; +} + +/* + * Verify that the sigsegv handler is invoked when pkey 0 is disabled. + * Note that the new thread stack and the alternate signal stack is + * protected by MPK 0. + */ +static void test_sigsegv_handler_with_pkey0_disabled(void) +{ + struct sigaction sa; + pthread_attr_t attr; + pthread_t thr; + + sa.sa_flags =3D SA_SIGINFO; + + sa.sa_sigaction =3D sigsegv_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGSEGV, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + memset(&siginfo, 0, sizeof(siginfo)); + + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + + pthread_create(&thr, &attr, thread_segv_with_pkey0_disabled, NULL); + + pthread_mutex_lock(&mutex); + while (siginfo.si_signo =3D=3D 0) + pthread_cond_wait(&cond, &mutex); + pthread_mutex_unlock(&mutex); + + ksft_test_result(siginfo.si_signo =3D=3D SIGSEGV && + siginfo.si_code =3D=3D SEGV_MAPERR && + siginfo.si_addr =3D=3D (void *)1, + "%s\n", __func__); +} + +/* + * Verify that the sigsegv handler is invoked when pkey 0 is disabled. + * Note that the new thread stack and the alternate signal stack is + * protected by MPK 0, which renders them inaccessible when MPK 0 + * is disabled. So just the return from the thread should cause a + * segfault with SEGV_PKUERR. + */ +static void test_sigsegv_handler_cannot_access_stack(void) +{ + struct sigaction sa; + pthread_attr_t attr; + pthread_t thr; + + sa.sa_flags =3D SA_SIGINFO; + + sa.sa_sigaction =3D sigsegv_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGSEGV, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + memset(&siginfo, 0, sizeof(siginfo)); + + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + + pthread_create(&thr, &attr, thread_segv_pkuerr_stack, NULL); + + pthread_mutex_lock(&mutex); + while (siginfo.si_signo =3D=3D 0) + pthread_cond_wait(&cond, &mutex); + pthread_mutex_unlock(&mutex); + + ksft_test_result(siginfo.si_signo =3D=3D SIGSEGV && + siginfo.si_code =3D=3D SEGV_PKUERR, + "%s\n", __func__); +} + +/* + * Verify that the sigsegv handler that uses an alternate signal stack + * is correctly invoked for a thread which uses a non-zero MPK to protect + * its own stack, and disables all other MPKs (including 0). + */ +static void test_sigsegv_handler_with_different_pkey_for_stack(void) +{ + struct sigaction sa; + static stack_t sigstack; + void *stack; + int pkey; + int parent_pid =3D 0; + int child_pid =3D 0; + + sa.sa_flags =3D SA_SIGINFO | SA_ONSTACK; + + sa.sa_sigaction =3D sigsegv_handler; + + sigemptyset(&sa.sa_mask); + if (sigaction(SIGSEGV, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + stack =3D mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + + assert(stack !=3D MAP_FAILED); + + /* Allow access to MPK 0 and MPK 1 */ + __write_pkey_reg(0x55555550); + + /* Protect the new stack with MPK 1 */ + pkey =3D pkey_alloc(0, 0); + pkey_mprotect(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey); + + /* Set up alternate signal stack that will use the default MPK */ + sigstack.ss_sp =3D mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + sigstack.ss_flags =3D 0; + sigstack.ss_size =3D STACK_SIZE; + + memset(&siginfo, 0, sizeof(siginfo)); + + /* Use clone to avoid newer glibcs using rseq on new threads */ + long ret =3D syscall_raw(SYS_clone, + CLONE_VM | CLONE_FS | CLONE_FILES | + CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM | + CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | + CLONE_DETACHED, + (long) ((char *)(stack) + STACK_SIZE), + (long) &parent_pid, + (long) &child_pid, 0, 0); + + if (ret < 0) { + errno =3D -ret; + perror("clone"); + } else if (ret =3D=3D 0) { + thread_segv_maperr_ptr(&sigstack); + syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); + } + + pthread_mutex_lock(&mutex); + while (siginfo.si_signo =3D=3D 0) + pthread_cond_wait(&cond, &mutex); + pthread_mutex_unlock(&mutex); + + ksft_test_result(siginfo.si_signo =3D=3D SIGSEGV && + siginfo.si_code =3D=3D SEGV_MAPERR && + siginfo.si_addr =3D=3D (void *)1, + "%s\n", __func__); +} + +/* + * Verify that the PKRU value set by the application is correctly + * restored upon return from signal handling. + */ +static void test_pkru_preserved_after_sigusr1(void) +{ + struct sigaction sa; + unsigned long pkru =3D 0x45454544; + + sa.sa_flags =3D SA_SIGINFO; + + sa.sa_sigaction =3D sigusr1_handler; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGUSR1, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + memset(&siginfo, 0, sizeof(siginfo)); + + __write_pkey_reg(pkru); + + raise(SIGUSR1); + + pthread_mutex_lock(&mutex); + while (siginfo.si_signo =3D=3D 0) + pthread_cond_wait(&cond, &mutex); + pthread_mutex_unlock(&mutex); + + /* Ensure the pkru value is the same after returning from signal. */ + ksft_test_result(pkru =3D=3D __read_pkey_reg() && + siginfo.si_signo =3D=3D SIGUSR1, + "%s\n", __func__); +} + +static noinline void *thread_sigusr2_self(void *ptr) +{ + /* + * A const char array like "Resuming after SIGUSR2" won't be stored on + * the stack and the code could access it via an offset from the program + * counter. This makes sure it's on the function's stack frame. + */ + char str[] =3D {'R', 'e', 's', 'u', 'm', 'i', 'n', 'g', ' ', + 'a', 'f', 't', 'e', 'r', ' ', + 'S', 'I', 'G', 'U', 'S', 'R', '2', + '.', '.', '.', '\n', '\0'}; + stack_t *stack =3D ptr; + + /* + * Setup alternate signal stack, which should be pkey_mprotect()ed by + * MPK 0. The thread's stack cannot be used for signals because it is + * not accessible by the default init_pkru value of 0x55555554. + */ + syscall(SYS_sigaltstack, (long)stack, 0, 0, 0, 0, 0); + + /* Disable MPK 0. Only MPK 2 is enabled. */ + __write_pkey_reg(0x55555545); + + raise_sigusr2(); + + /* Do something, to show the thread resumed execution after the signal */ + syscall_raw(SYS_write, 1, (long) str, sizeof(str) - 1, 0, 0, 0); + + /* + * We can't return to test_pkru_sigreturn because it + * will attempt to use a %rbp value which is on the stack + * of the main thread. + */ + syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); + return NULL; +} + +/* + * Verify that sigreturn is able to restore altstack even if the thread had + * disabled pkey 0. + */ +static void test_pkru_sigreturn(void) +{ + struct sigaction sa =3D {0}; + static stack_t sigstack; + void *stack; + int pkey; + int parent_pid =3D 0; + int child_pid =3D 0; + + sa.sa_handler =3D SIG_DFL; + sa.sa_flags =3D 0; + sigemptyset(&sa.sa_mask); + + /* + * For this testcase, we do not want to handle SIGSEGV. Reset handler + * to default so that the application can crash if it receives SIGSEGV. + */ + if (sigaction(SIGSEGV, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + sa.sa_flags =3D SA_SIGINFO | SA_ONSTACK; + sa.sa_sigaction =3D sigusr2_handler; + sigemptyset(&sa.sa_mask); + + if (sigaction(SIGUSR2, &sa, NULL) =3D=3D -1) { + perror("sigaction"); + exit(EXIT_FAILURE); + } + + stack =3D mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + + assert(stack !=3D MAP_FAILED); + + /* + * Allow access to MPK 0 and MPK 2. The child thread (to be created + * later in this flow) will have its stack protected by MPK 2, whereas + * the current thread's stack is protected by the default MPK 0. Hence + * both need to be enabled. + */ + __write_pkey_reg(0x55555544); + + /* Protect the stack with MPK 2 */ + pkey =3D pkey_alloc(0, 0); + pkey_mprotect(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey); + + /* Set up alternate signal stack that will use the default MPK */ + sigstack.ss_sp =3D mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + sigstack.ss_flags =3D 0; + sigstack.ss_size =3D STACK_SIZE; + + /* Use clone to avoid newer glibcs using rseq on new threads */ + long ret =3D syscall_raw(SYS_clone, + CLONE_VM | CLONE_FS | CLONE_FILES | + CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM | + CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | + CLONE_DETACHED, + (long) ((char *)(stack) + STACK_SIZE), + (long) &parent_pid, + (long) &child_pid, 0, 0); + + if (ret < 0) { + errno =3D -ret; + perror("clone"); + } else if (ret =3D=3D 0) { + thread_sigusr2_self(&sigstack); + syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); + } + + child_pid =3D ret; + /* Check that thread exited */ + do { + sched_yield(); + ret =3D syscall_raw(SYS_tkill, child_pid, 0, 0, 0, 0, 0); + } while (ret !=3D -ESRCH && ret !=3D -EINVAL); + + ksft_test_result_pass("%s\n", __func__); +} + +static void (*pkey_tests[])(void) =3D { + test_sigsegv_handler_with_pkey0_disabled, + test_sigsegv_handler_cannot_access_stack, + test_sigsegv_handler_with_different_pkey_for_stack, + test_pkru_preserved_after_sigusr1, + test_pkru_sigreturn +}; + +int main(int argc, char *argv[]) +{ + int i; + + ksft_print_header(); + ksft_set_plan(ARRAY_SIZE(pkey_tests)); + + for (i =3D 0; i < ARRAY_SIZE(pkey_tests); i++) + (*pkey_tests[i])(); + + ksft_finished(); + return 0; +} diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/sel= ftests/mm/protection_keys.c index eaa6d1fc5328..cc6de1644360 100644 --- a/tools/testing/selftests/mm/protection_keys.c +++ b/tools/testing/selftests/mm/protection_keys.c @@ -950,16 +950,6 @@ void close_test_fds(void) nr_test_fds =3D 0; } =20 -#define barrier() __asm__ __volatile__("": : :"memory") -__attribute__((noinline)) int read_ptr(int *ptr) -{ - /* - * Keep GCC from optimizing this away somehow - */ - barrier(); - return *ptr; -} - void test_pkey_alloc_free_attach_pkey0(int *ptr, u16 pkey) { int i, err; . Date: Tue, 17 Sep 2024 10:54:04 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/apic for v6.12-rc1 Linus, please pull the latest x86/apic branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-apic-2024-09= -17 up to: a1fab3e69d9d: x86/irq: Fix comment on IRQ vector layout Updates for the x86 APIC code: - Handle an allocation failure in the IO/APIC code gracefully instead of crashing the machine. - Remove support for APIC local destination mode on 64bit Logical destination mode of the local APIC is used for systems with up to 8 CPUs. It has an advantage over physical destination mode as it allows to target multiple CPUs at once with IPIs. That advantage was definitely worth it when systems with up to 8 CPUs were state of the art for servers and workstations, but that's history. In the recent past there were quite some reports of new laptops failing to boot with logical destination mode, but they work fine with physical destination mode. That's not a suprise because physical destination mode is guaranteed to work as it's the only way to get a CPU up and running via the INIT/INIT/STARTUP sequence. Some of the affected systems were cured by BIOS updates, but not all OEMs provide them. As the number of CPUs keep increasing, logical destination mode becomes less used and the benefit for small systems, like laptops, is not really worth the trouble. So just remove logical destination mode support for 64bit and be done with it. - Code and comment cleanups in the APIC area. Thanks, tglx ------------------> Sohil Mehta (1): x86/irq: Fix comment on IRQ vector layout Thomas Gleixner (16): x86/ioapic: Handle allocation failures gracefully x86/ioapic: Mark mp_alloc_timer_irq() __init x86/ioapic: Cleanup structs x86/ioapic: Use guard() for locking where applicable x86/apic: Provide apic_printk() helpers x86/apic: Cleanup apic_printk()s x86/ioapic: Cleanup apic_printk()s x86/ioapic: Cleanup guarded debug printk()s x86/mpparse: Cleanup apic_printk()s iommu/vt-d: Cleanup apic_printk() x86/ioapic: Move replace_pin_at_irq_node() to the call site x86/ioapic: Cleanup comments x86/ioapic: Cleanup bracket usage x86/ioapic: Cleanup line breaks x86/ioapic: Cleanup remaining coding style issues x86/apic: Remove logical destination mode for 64-bit Yue Haibing (2): x86/apic: Remove unused inline function apic_set_eoi_cb() x86/apic: Remove unused extern declarations arch/x86/include/asm/apic.h | 48 +-- arch/x86/include/asm/irq_vectors.h | 4 +- arch/x86/kernel/apic/apic.c | 81 ++-- arch/x86/kernel/apic/apic_flat_64.c | 119 +----- arch/x86/kernel/apic/io_apic.c | 749 +++++++++++++++-------------------= -- arch/x86/kernel/mpparse.c | 13 +- drivers/iommu/intel/irq_remapping.c | 11 +- 7 files changed, 378 insertions(+), 647 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 9327eb00e96d..f21ff1932699 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -18,6 +18,11 @@ =20 #define ARCH_APICTIMER_STOPS_ON_C3 1 =20 +/* Macros for apic_extnmi which controls external NMI masking */ +#define APIC_EXTNMI_BSP 0 /* Default */ +#define APIC_EXTNMI_ALL 1 +#define APIC_EXTNMI_NONE 2 + /* * Debugging macros */ @@ -25,22 +30,22 @@ #define APIC_VERBOSE 1 #define APIC_DEBUG 2 =20 -/* Macros for apic_extnmi which controls external NMI masking */ -#define APIC_EXTNMI_BSP 0 /* Default */ -#define APIC_EXTNMI_ALL 1 -#define APIC_EXTNMI_NONE 2 - /* - * Define the default level of output to be very little - * This can be turned up by using apic=3Dverbose for more - * information and apic=3Ddebug for _lots_ of information. - * apic_verbosity is defined in apic.c + * Define the default level of output to be very little This can be turned + * up by using apic=3Dverbose for more information and apic=3Ddebug for _lot= s_ + * of information. apic_verbosity is defined in apic.c */ -#define apic_printk(v, s, a...) do { \ - if ((v) <=3D apic_verbosity) \ - printk(s, ##a); \ - } while (0) - +#define apic_printk(v, s, a...) \ +do { \ + if ((v) <=3D apic_verbosity) \ + printk(s, ##a); \ +} while (0) + +#define apic_pr_verbose(s, a...) apic_printk(APIC_VERBOSE, KERN_INFO s, ##a) +#define apic_pr_debug(s, a...) apic_printk(APIC_DEBUG, KERN_DEBUG s, ##a) +#define apic_pr_debug_cont(s, a...) apic_printk(APIC_DEBUG, KERN_CONT s, ##a) +/* Unconditional debug prints for code which is guarded by apic_verbosity al= ready */ +#define apic_dbg(s, a...) printk(KERN_DEBUG s, ##a) =20 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) extern void x86_32_probe_apic(void); @@ -122,8 +127,6 @@ static inline bool apic_is_x2apic_enabled(void) =20 extern void enable_IR_x2apic(void); =20 -extern int get_physical_broadcast(void); - extern int lapic_get_maxlvt(void); extern void clear_local_APIC(void); extern void disconnect_bsp_APIC(int virt_wire_setup); @@ -345,20 +348,12 @@ extern struct apic *apic; * APIC drivers are probed based on how they are listed in the .apicdrivers * section. So the order is important and enforced by the ordering * of different apic driver files in the Makefile. - * - * For the files having two apic drivers, we use apic_drivers() - * to enforce the order with in them. */ #define apic_driver(sym) \ static const struct apic *__apicdrivers_##sym __used \ __aligned(sizeof(struct apic *)) \ __section(".apicdrivers") =3D { &sym } =20 -#define apic_drivers(sym1, sym2) \ - static struct apic *__apicdrivers_##sym1##sym2[2] __used \ - __aligned(sizeof(struct apic *)) \ - __section(".apicdrivers") =3D { &sym1, &sym2 } - extern struct apic *__apicdrivers[], *__apicdrivers_end[]; =20 /* @@ -484,7 +479,6 @@ static inline u64 apic_icr_read(void) { return 0; } static inline void apic_icr_write(u32 low, u32 high) { } static inline void apic_wait_icr_idle(void) { } static inline u32 safe_apic_wait_icr_idle(void) { return 0; } -static inline void apic_set_eoi_cb(void (*eoi)(void)) {} static inline void apic_native_eoi(void) { WARN_ON_ONCE(1); } static inline void apic_setup_apic_calls(void) { } =20 @@ -512,8 +506,6 @@ static inline bool is_vector_pending(unsigned int vector) #define TRAMPOLINE_PHYS_LOW 0x467 #define TRAMPOLINE_PHYS_HIGH 0x469 =20 -extern void generic_bigsmp_probe(void); - #ifdef CONFIG_X86_LOCAL_APIC =20 #include @@ -536,8 +528,6 @@ static inline int default_acpi_madt_oem_check(char *a, ch= ar *b) { return 0; } static inline void x86_64_probe_apic(void) { } #endif =20 -extern int default_apic_id_valid(u32 apicid); - extern u32 apic_default_calc_apicid(unsigned int cpu); extern u32 apic_flat_calc_apicid(unsigned int cpu); =20 diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_ve= ctors.h index 13aea8fc3d45..47051871b436 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h @@ -18,8 +18,8 @@ * Vectors 0 ... 31 : system traps and exceptions - hardcoded events * Vectors 32 ... 127 : device interrupts * Vector 128 : legacy int80 syscall interface - * Vectors 129 ... LOCAL_TIMER_VECTOR-1 - * Vectors LOCAL_TIMER_VECTOR ... 255 : special interrupts + * Vectors 129 ... FIRST_SYSTEM_VECTOR-1 : device interrupts + * Vectors FIRST_SYSTEM_VECTOR ... 255 : special interrupts * * 64-bit x86 has per CPU IDT tables, 32-bit has one shared IDT table. * diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 66fd4b2a37a3..1838a73b0950 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -677,7 +677,7 @@ calibrate_by_pmtimer(u32 deltapm, long *delta, long *delt= atsc) return -1; #endif =20 - apic_printk(APIC_VERBOSE, "... PM-Timer delta =3D %u\n", deltapm); + apic_pr_verbose("... PM-Timer delta =3D %u\n", deltapm); =20 /* Check, if the PM timer is available */ if (!deltapm) @@ -687,14 +687,14 @@ calibrate_by_pmtimer(u32 deltapm, long *delta, long *de= ltatsc) =20 if (deltapm > (pm_100ms - pm_thresh) && deltapm < (pm_100ms + pm_thresh)) { - apic_printk(APIC_VERBOSE, "... PM-Timer result ok\n"); + apic_pr_verbose("... PM-Timer result ok\n"); return 0; } =20 res =3D (((u64)deltapm) * mult) >> 22; do_div(res, 1000000); - pr_warn("APIC calibration not consistent " - "with PM-Timer: %ldms instead of 100ms\n", (long)res); + pr_warn("APIC calibration not consistent with PM-Timer: %ldms instead of 10= 0ms\n", + (long)res); =20 /* Correct the lapic counter value */ res =3D (((u64)(*delta)) * pm_100ms); @@ -707,9 +707,8 @@ calibrate_by_pmtimer(u32 deltapm, long *delta, long *delt= atsc) if (boot_cpu_has(X86_FEATURE_TSC)) { res =3D (((u64)(*deltatsc)) * pm_100ms); do_div(res, deltapm); - apic_printk(APIC_VERBOSE, "TSC delta adjusted to " - "PM-Timer: %lu (%ld)\n", - (unsigned long)res, *deltatsc); + apic_pr_verbose("TSC delta adjusted to PM-Timer: %lu (%ld)\n", + (unsigned long)res, *deltatsc); *deltatsc =3D (long)res; } =20 @@ -792,8 +791,7 @@ static int __init calibrate_APIC_clock(void) * in the clockevent structure and return. */ if (!lapic_init_clockevent()) { - apic_printk(APIC_VERBOSE, "lapic timer already calibrated %d\n", - lapic_timer_period); + apic_pr_verbose("lapic timer already calibrated %d\n", lapic_timer_period); /* * Direct calibration methods must have an always running * local APIC timer, no need for broadcast timer. @@ -802,8 +800,7 @@ static int __init calibrate_APIC_clock(void) return 0; } =20 - apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n" - "calibrating APIC timer ...\n"); + apic_pr_verbose("Using local APIC timer interrupts. Calibrating APIC timer = ...\n"); =20 /* * There are platforms w/o global clockevent devices. Instead of @@ -866,7 +863,7 @@ static int __init calibrate_APIC_clock(void) =20 /* Build delta t1-t2 as apic timer counts down */ delta =3D lapic_cal_t1 - lapic_cal_t2; - apic_printk(APIC_VERBOSE, "... lapic delta =3D %ld\n", delta); + apic_pr_verbose("... lapic delta =3D %ld\n", delta); =20 deltatsc =3D (long)(lapic_cal_tsc2 - lapic_cal_tsc1); =20 @@ -877,22 +874,19 @@ static int __init calibrate_APIC_clock(void) lapic_timer_period =3D (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS; lapic_init_clockevent(); =20 - apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta); - apic_printk(APIC_VERBOSE, "..... mult: %u\n", lapic_clockevent.mult); - apic_printk(APIC_VERBOSE, "..... calibration result: %u\n", - lapic_timer_period); + apic_pr_verbose("..... delta %ld\n", delta); + apic_pr_verbose("..... mult: %u\n", lapic_clockevent.mult); + apic_pr_verbose("..... calibration result: %u\n", lapic_timer_period); =20 if (boot_cpu_has(X86_FEATURE_TSC)) { - apic_printk(APIC_VERBOSE, "..... CPU clock speed is " - "%ld.%04ld MHz.\n", - (deltatsc / LAPIC_CAL_LOOPS) / (1000000 / HZ), - (deltatsc / LAPIC_CAL_LOOPS) % (1000000 / HZ)); + apic_pr_verbose("..... CPU clock speed is %ld.%04ld MHz.\n", + (deltatsc / LAPIC_CAL_LOOPS) / (1000000 / HZ), + (deltatsc / LAPIC_CAL_LOOPS) % (1000000 / HZ)); } =20 - apic_printk(APIC_VERBOSE, "..... host bus clock speed is " - "%u.%04u MHz.\n", - lapic_timer_period / (1000000 / HZ), - lapic_timer_period % (1000000 / HZ)); + apic_pr_verbose("..... host bus clock speed is %u.%04u MHz.\n", + lapic_timer_period / (1000000 / HZ), + lapic_timer_period % (1000000 / HZ)); =20 /* * Do a sanity check on the APIC calibration result @@ -911,7 +905,7 @@ static int __init calibrate_APIC_clock(void) * available. */ if (!pm_referenced && global_clock_event) { - apic_printk(APIC_VERBOSE, "... verify APIC timer\n"); + apic_pr_verbose("... verify APIC timer\n"); =20 /* * Setup the apic timer manually @@ -932,11 +926,11 @@ static int __init calibrate_APIC_clock(void) =20 /* Jiffies delta */ deltaj =3D lapic_cal_j2 - lapic_cal_j1; - apic_printk(APIC_VERBOSE, "... jiffies delta =3D %lu\n", deltaj); + apic_pr_verbose("... jiffies delta =3D %lu\n", deltaj); =20 /* Check, if the jiffies result is consistent */ if (deltaj >=3D LAPIC_CAL_LOOPS-2 && deltaj <=3D LAPIC_CAL_LOOPS+2) - apic_printk(APIC_VERBOSE, "... jiffies result ok\n"); + apic_pr_verbose("... jiffies result ok\n"); else levt->features |=3D CLOCK_EVT_FEAT_DUMMY; } @@ -1221,9 +1215,8 @@ void __init sync_Arb_IDs(void) */ apic_wait_icr_idle(); =20 - apic_printk(APIC_DEBUG, "Synchronizing Arb IDs.\n"); - apic_write(APIC_ICR, APIC_DEST_ALLINC | - APIC_INT_LEVELTRIG | APIC_DM_INIT); + apic_pr_debug("Synchronizing Arb IDs.\n"); + apic_write(APIC_ICR, APIC_DEST_ALLINC | APIC_INT_LEVELTRIG | APIC_DM_INIT); } =20 enum apic_intr_mode_id apic_intr_mode __ro_after_init; @@ -1409,10 +1402,10 @@ static void lapic_setup_esr(void) if (maxlvt > 3) apic_write(APIC_ESR, 0); value =3D apic_read(APIC_ESR); - if (value !=3D oldvalue) - apic_printk(APIC_VERBOSE, "ESR value before enabling " - "vector: 0x%08x after: 0x%08x\n", - oldvalue, value); + if (value !=3D oldvalue) { + apic_pr_verbose("ESR value before enabling vector: 0x%08x after: 0x%08x\n= ", + oldvalue, value); + } } =20 #define APIC_IR_REGS APIC_ISR_NR @@ -1599,10 +1592,10 @@ static void setup_local_APIC(void) value =3D apic_read(APIC_LVT0) & APIC_LVT_MASKED; if (!cpu && (pic_mode || !value || ioapic_is_disabled)) { value =3D APIC_DM_EXTINT; - apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu); + apic_pr_verbose("Enabled ExtINT on CPU#%d\n", cpu); } else { value =3D APIC_DM_EXTINT | APIC_LVT_MASKED; - apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", cpu); + apic_pr_verbose("Masked ExtINT on CPU#%d\n", cpu); } apic_write(APIC_LVT0, value); =20 @@ -2066,8 +2059,7 @@ static __init void apic_set_fixmap(bool read_apic) { set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); apic_mmio_base =3D APIC_BASE; - apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n", - apic_mmio_base, mp_lapic_addr); + apic_pr_verbose("Mapped APIC to %16lx (%16lx)\n", apic_mmio_base, mp_lapic_= addr); if (read_apic) apic_read_boot_cpu_id(false); } @@ -2170,18 +2162,17 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_error_interrupt) apic_eoi(); atomic_inc(&irq_err_count); =20 - apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x", - smp_processor_id(), v); + apic_pr_debug("APIC error on CPU%d: %02x", smp_processor_id(), v); =20 v &=3D 0xff; while (v) { if (v & 0x1) - apic_printk(APIC_DEBUG, KERN_CONT " : %s", error_interrupt_reason[i]); + apic_pr_debug_cont(" : %s", error_interrupt_reason[i]); i++; v >>=3D 1; } =20 - apic_printk(APIC_DEBUG, KERN_CONT "\n"); + apic_pr_debug_cont("\n"); =20 trace_error_apic_exit(ERROR_APIC_VECTOR); } @@ -2201,8 +2192,7 @@ static void __init connect_bsp_APIC(void) * PIC mode, enable APIC mode in the IMCR, i.e. connect BSP's * local APIC to INT and NMI lines. */ - apic_printk(APIC_VERBOSE, "leaving PIC mode, " - "enabling APIC mode.\n"); + apic_pr_verbose("Leaving PIC mode, enabling APIC mode.\n"); imcr_pic_to_apic(); } #endif @@ -2227,8 +2217,7 @@ void disconnect_bsp_APIC(int virt_wire_setup) * IPIs, won't work beyond this point! The only exception are * INIT IPIs. */ - apic_printk(APIC_VERBOSE, "disabling APIC mode, " - "entering PIC mode.\n"); + apic_pr_verbose("Disabling APIC mode, entering PIC mode.\n"); imcr_apic_to_pic(); return; } diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_= flat_64.c index f37ad3392fec..e0308d8c4e6c 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c @@ -8,129 +8,25 @@ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and * James Cleverdon. */ -#include #include -#include =20 -#include #include =20 #include "local.h" =20 -static struct apic apic_physflat; -static struct apic apic_flat; - -struct apic *apic __ro_after_init =3D &apic_flat; -EXPORT_SYMBOL_GPL(apic); - -static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) -{ - return 1; -} - -static void _flat_send_IPI_mask(unsigned long mask, int vector) -{ - unsigned long flags; - - local_irq_save(flags); - __default_send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL); - local_irq_restore(flags); -} - -static void flat_send_IPI_mask(const struct cpumask *cpumask, int vector) -{ - unsigned long mask =3D cpumask_bits(cpumask)[0]; - - _flat_send_IPI_mask(mask, vector); -} - -static void -flat_send_IPI_mask_allbutself(const struct cpumask *cpumask, int vector) -{ - unsigned long mask =3D cpumask_bits(cpumask)[0]; - int cpu =3D smp_processor_id(); - - if (cpu < BITS_PER_LONG) - __clear_bit(cpu, &mask); - - _flat_send_IPI_mask(mask, vector); -} - -static u32 flat_get_apic_id(u32 x) +static u32 physflat_get_apic_id(u32 x) { return (x >> 24) & 0xFF; } =20 -static int flat_probe(void) +static int physflat_probe(void) { return 1; } =20 -static struct apic apic_flat __ro_after_init =3D { - .name =3D "flat", - .probe =3D flat_probe, - .acpi_madt_oem_check =3D flat_acpi_madt_oem_check, - - .dest_mode_logical =3D true, - - .disable_esr =3D 0, - - .init_apic_ldr =3D default_init_apic_ldr, - .cpu_present_to_apicid =3D default_cpu_present_to_apicid, - - .max_apic_id =3D 0xFE, - .get_apic_id =3D flat_get_apic_id, - - .calc_dest_apicid =3D apic_flat_calc_apicid, - - .send_IPI =3D default_send_IPI_single, - .send_IPI_mask =3D flat_send_IPI_mask, - .send_IPI_mask_allbutself =3D flat_send_IPI_mask_allbutself, - .send_IPI_allbutself =3D default_send_IPI_allbutself, - .send_IPI_all =3D default_send_IPI_all, - .send_IPI_self =3D default_send_IPI_self, - .nmi_to_offline_cpu =3D true, - - .read =3D native_apic_mem_read, - .write =3D native_apic_mem_write, - .eoi =3D native_apic_mem_eoi, - .icr_read =3D native_apic_icr_read, - .icr_write =3D native_apic_icr_write, - .wait_icr_idle =3D apic_mem_wait_icr_idle, - .safe_wait_icr_idle =3D apic_mem_wait_icr_idle_timeout, -}; - -/* - * Physflat mode is used when there are more than 8 CPUs on a system. - * We cannot use logical delivery in this case because the mask - * overflows, so use physical mode. - */ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) { -#ifdef CONFIG_ACPI - /* - * Quirk: some x86_64 machines can only use physical APIC mode - * regardless of how many processors are present (x86_64 ES7000 - * is an example). - */ - if (acpi_gbl_FADT.header.revision >=3D FADT2_REVISION_ID && - (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) { - printk(KERN_DEBUG "system APIC only can use physical flat"); - return 1; - } - - if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "EXA", 3)) { - printk(KERN_DEBUG "IBM Summit detected, will use apic physical"); - return 1; - } -#endif - - return 0; -} - -static int physflat_probe(void) -{ - return apic =3D=3D &apic_physflat || num_possible_cpus() > 8 || jailhouse_p= aravirt(); + return 1; } =20 static struct apic apic_physflat __ro_after_init =3D { @@ -146,7 +42,7 @@ static struct apic apic_physflat __ro_after_init =3D { .cpu_present_to_apicid =3D default_cpu_present_to_apicid, =20 .max_apic_id =3D 0xFE, - .get_apic_id =3D flat_get_apic_id, + .get_apic_id =3D physflat_get_apic_id, =20 .calc_dest_apicid =3D apic_default_calc_apicid, =20 @@ -166,8 +62,7 @@ static struct apic apic_physflat __ro_after_init =3D { .wait_icr_idle =3D apic_mem_wait_icr_idle, .safe_wait_icr_idle =3D apic_mem_wait_icr_idle_timeout, }; +apic_driver(apic_physflat); =20 -/* - * We need to check for physflat first, so this order is important. - */ -apic_drivers(apic_physflat, apic_flat); +struct apic *apic __ro_after_init =3D &apic_physflat; +EXPORT_SYMBOL_GPL(apic); diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 477b740b2f26..1029ea4ac8ba 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -86,8 +86,8 @@ static unsigned int ioapic_dynirq_base; static int ioapic_initialized; =20 struct irq_pin_list { - struct list_head list; - int apic, pin; + struct list_head list; + int apic, pin; }; =20 struct mp_chip_data { @@ -96,7 +96,7 @@ struct mp_chip_data { bool is_level; bool active_low; bool isa_irq; - u32 count; + u32 count; }; =20 struct mp_ioapic_gsi { @@ -105,21 +105,17 @@ struct mp_ioapic_gsi { }; =20 static struct ioapic { - /* - * # of IRQ routing registers - */ - int nr_registers; - /* - * Saved state during suspend/resume, or while enabling intr-remap. - */ - struct IO_APIC_route_entry *saved_registers; + /* # of IRQ routing registers */ + int nr_registers; + /* Saved state during suspend/resume, or while enabling intr-remap. */ + struct IO_APIC_route_entry *saved_registers; /* I/O APIC config */ - struct mpc_ioapic mp_config; + struct mpc_ioapic mp_config; /* IO APIC gsi routing info */ - struct mp_ioapic_gsi gsi_config; - struct ioapic_domain_cfg irqdomain_cfg; - struct irq_domain *irqdomain; - struct resource *iomem_res; + struct mp_ioapic_gsi gsi_config; + struct ioapic_domain_cfg irqdomain_cfg; + struct irq_domain *irqdomain; + struct resource *iomem_res; } ioapics[MAX_IO_APICS]; =20 #define mpc_ioapic_ver(ioapic_idx) ioapics[ioapic_idx].mp_config.apicver @@ -205,10 +201,9 @@ void mp_save_irq(struct mpc_intsrc *m) { int i; =20 - apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," - " IRQ %02x, APIC ID %x, APIC INT %02x\n", - m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus, - m->srcbusirq, m->dstapic, m->dstirq); + apic_pr_verbose("Int: type %d, pol %d, trig %d, bus %02x, IRQ %02x, APIC ID= %x, APIC INT %02x\n", + m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus, + m->srcbusirq, m->dstapic, m->dstirq); =20 for (i =3D 0; i < mp_irq_entries; i++) { if (!memcmp(&mp_irqs[i], m, sizeof(*m))) @@ -269,12 +264,14 @@ static __attribute_const__ struct io_apic __iomem *io_a= pic_base(int idx) static inline void io_apic_eoi(unsigned int apic, unsigned int vector) { struct io_apic __iomem *io_apic =3D io_apic_base(apic); + writel(vector, &io_apic->eoi); } =20 unsigned int native_io_apic_read(unsigned int apic, unsigned int reg) { struct io_apic __iomem *io_apic =3D io_apic_base(apic); + writel(reg, &io_apic->index); return readl(&io_apic->data); } @@ -300,14 +297,8 @@ static struct IO_APIC_route_entry __ioapic_read_entry(in= t apic, int pin) =20 static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) { - struct IO_APIC_route_entry entry; - unsigned long flags; - - raw_spin_lock_irqsave(&ioapic_lock, flags); - entry =3D __ioapic_read_entry(apic, pin); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); - - return entry; + guard(raw_spinlock_irqsave)(&ioapic_lock); + return __ioapic_read_entry(apic, pin); } =20 /* @@ -324,11 +315,8 @@ static void __ioapic_write_entry(int apic, int pin, stru= ct IO_APIC_route_entry e =20 static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry= e) { - unsigned long flags; - - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); __ioapic_write_entry(apic, pin, e); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 /* @@ -339,12 +327,10 @@ static void ioapic_write_entry(int apic, int pin, struc= t IO_APIC_route_entry e) static void ioapic_mask_entry(int apic, int pin) { struct IO_APIC_route_entry e =3D { .masked =3D true }; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); io_apic_write(apic, 0x10 + 2*pin, e.w1); io_apic_write(apic, 0x11 + 2*pin, e.w2); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 /* @@ -352,68 +338,39 @@ static void ioapic_mask_entry(int apic, int pin) * shared ISA-space IRQs, so we have to support them. We are super * fast in the common case, and fast for shared ISA-space IRQs. */ -static int __add_pin_to_irq_node(struct mp_chip_data *data, - int node, int apic, int pin) +static bool add_pin_to_irq_node(struct mp_chip_data *data, int node, int api= c, int pin) { struct irq_pin_list *entry; =20 - /* don't allow duplicates */ - for_each_irq_pin(entry, data->irq_2_pin) + /* Don't allow duplicates */ + for_each_irq_pin(entry, data->irq_2_pin) { if (entry->apic =3D=3D apic && entry->pin =3D=3D pin) - return 0; + return true; + } =20 entry =3D kzalloc_node(sizeof(struct irq_pin_list), GFP_ATOMIC, node); if (!entry) { - pr_err("can not alloc irq_pin_list (%d,%d,%d)\n", - node, apic, pin); - return -ENOMEM; + pr_err("Cannot allocate irq_pin_list (%d,%d,%d)\n", node, apic, pin); + return false; } + entry->apic =3D apic; entry->pin =3D pin; list_add_tail(&entry->list, &data->irq_2_pin); - - return 0; + return true; } =20 static void __remove_pin_from_irq(struct mp_chip_data *data, int apic, int p= in) { struct irq_pin_list *tmp, *entry; =20 - list_for_each_entry_safe(entry, tmp, &data->irq_2_pin, list) + list_for_each_entry_safe(entry, tmp, &data->irq_2_pin, list) { if (entry->apic =3D=3D apic && entry->pin =3D=3D pin) { list_del(&entry->list); kfree(entry); return; } -} - -static void add_pin_to_irq_node(struct mp_chip_data *data, - int node, int apic, int pin) -{ - if (__add_pin_to_irq_node(data, node, apic, pin)) - panic("IO-APIC: failed to add irq-pin. Can not proceed\n"); -} - -/* - * Reroute an IRQ to a different pin. - */ -static void __init replace_pin_at_irq_node(struct mp_chip_data *data, int no= de, - int oldapic, int oldpin, - int newapic, int newpin) -{ - struct irq_pin_list *entry; - - for_each_irq_pin(entry, data->irq_2_pin) { - if (entry->apic =3D=3D oldapic && entry->pin =3D=3D oldpin) { - entry->apic =3D newapic; - entry->pin =3D newpin; - /* every one is different, right? */ - return; - } } - - /* old apic/pin didn't exist, so just add new ones */ - add_pin_to_irq_node(data, node, newapic, newpin); } =20 static void io_apic_modify_irq(struct mp_chip_data *data, bool masked, @@ -430,12 +387,12 @@ static void io_apic_modify_irq(struct mp_chip_data *dat= a, bool masked, } } =20 +/* + * Synchronize the IO-APIC and the CPU by doing a dummy read from the + * IO-APIC + */ static void io_apic_sync(struct irq_pin_list *entry) { - /* - * Synchronize the IO-APIC and the CPU by doing - * a dummy read from the IO-APIC - */ struct io_apic __iomem *io_apic; =20 io_apic =3D io_apic_base(entry->apic); @@ -445,11 +402,9 @@ static void io_apic_sync(struct irq_pin_list *entry) static void mask_ioapic_irq(struct irq_data *irq_data) { struct mp_chip_data *data =3D irq_data->chip_data; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); io_apic_modify_irq(data, true, &io_apic_sync); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 static void __unmask_ioapic(struct mp_chip_data *data) @@ -460,11 +415,9 @@ static void __unmask_ioapic(struct mp_chip_data *data) static void unmask_ioapic_irq(struct irq_data *irq_data) { struct mp_chip_data *data =3D irq_data->chip_data; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); __unmask_ioapic(data); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 /* @@ -492,30 +445,24 @@ static void __eoi_ioapic_pin(int apic, int pin, int vec= tor) =20 entry =3D entry1 =3D __ioapic_read_entry(apic, pin); =20 - /* - * Mask the entry and change the trigger mode to edge. - */ + /* Mask the entry and change the trigger mode to edge. */ entry1.masked =3D true; entry1.is_level =3D false; =20 __ioapic_write_entry(apic, pin, entry1); =20 - /* - * Restore the previous level triggered entry. - */ + /* Restore the previous level triggered entry. */ __ioapic_write_entry(apic, pin, entry); } } =20 static void eoi_ioapic_pin(int vector, struct mp_chip_data *data) { - unsigned long flags; struct irq_pin_list *entry; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); for_each_irq_pin(entry, data->irq_2_pin) __eoi_ioapic_pin(entry->apic, entry->pin, vector); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) @@ -538,8 +485,6 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned= int pin) } =20 if (entry.irr) { - unsigned long flags; - /* * Make sure the trigger mode is set to level. Explicit EOI * doesn't clear the remote-IRR if the trigger mode is not @@ -549,9 +494,8 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned= int pin) entry.is_level =3D true; ioapic_write_entry(apic, pin, entry); } - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); __eoi_ioapic_pin(apic, pin, entry.vector); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 /* @@ -586,28 +530,23 @@ static int pirq_entries[MAX_PIRQS] =3D { =20 static int __init ioapic_pirq_setup(char *str) { - int i, max; - int ints[MAX_PIRQS+1]; + int i, max, ints[MAX_PIRQS+1]; =20 get_options(str, ARRAY_SIZE(ints), ints); =20 - apic_printk(APIC_VERBOSE, KERN_INFO - "PIRQ redirection, working around broken MP-BIOS.\n"); + apic_pr_verbose("PIRQ redirection, working around broken MP-BIOS.\n"); + max =3D MAX_PIRQS; if (ints[0] < MAX_PIRQS) max =3D ints[0]; =20 for (i =3D 0; i < max; i++) { - apic_printk(APIC_VERBOSE, KERN_DEBUG - "... PIRQ%d -> IRQ %d\n", i, ints[i+1]); - /* - * PIRQs are mapped upside down, usually. - */ + apic_pr_verbose("... PIRQ%d -> IRQ %d\n", i, ints[i + 1]); + /* PIRQs are mapped upside down, usually */ pirq_entries[MAX_PIRQS-i-1] =3D ints[i+1]; } return 1; } - __setup("pirq=3D", ioapic_pirq_setup); #endif /* CONFIG_X86_32 */ =20 @@ -626,8 +565,7 @@ int save_ioapic_entries(void) } =20 for_each_pin(apic, pin) - ioapics[apic].saved_registers[pin] =3D - ioapic_read_entry(apic, pin); + ioapics[apic].saved_registers[pin] =3D ioapic_read_entry(apic, pin); } =20 return err; @@ -668,8 +606,7 @@ int restore_ioapic_entries(void) continue; =20 for_each_pin(apic, pin) - ioapic_write_entry(apic, pin, - ioapics[apic].saved_registers[pin]); + ioapic_write_entry(apic, pin, ioapics[apic].saved_registers[pin]); } return 0; } @@ -681,12 +618,13 @@ static int find_irq_entry(int ioapic_idx, int pin, int = type) { int i; =20 - for (i =3D 0; i < mp_irq_entries; i++) + for (i =3D 0; i < mp_irq_entries; i++) { if (mp_irqs[i].irqtype =3D=3D type && (mp_irqs[i].dstapic =3D=3D mpc_ioapic_id(ioapic_idx) || mp_irqs[i].dstapic =3D=3D MP_APIC_ALL) && mp_irqs[i].dstirq =3D=3D pin) return i; + } =20 return -1; } @@ -701,10 +639,8 @@ static int __init find_isa_irq_pin(int irq, int type) for (i =3D 0; i < mp_irq_entries; i++) { int lbus =3D mp_irqs[i].srcbus; =20 - if (test_bit(lbus, mp_bus_not_pci) && - (mp_irqs[i].irqtype =3D=3D type) && + if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].irqtype =3D=3D type) && (mp_irqs[i].srcbusirq =3D=3D irq)) - return mp_irqs[i].dstirq; } return -1; @@ -717,8 +653,7 @@ static int __init find_isa_irq_apic(int irq, int type) for (i =3D 0; i < mp_irq_entries; i++) { int lbus =3D mp_irqs[i].srcbus; =20 - if (test_bit(lbus, mp_bus_not_pci) && - (mp_irqs[i].irqtype =3D=3D type) && + if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].irqtype =3D=3D type) && (mp_irqs[i].srcbusirq =3D=3D irq)) break; } @@ -726,9 +661,10 @@ static int __init find_isa_irq_apic(int irq, int type) if (i < mp_irq_entries) { int ioapic_idx; =20 - for_each_ioapic(ioapic_idx) + for_each_ioapic(ioapic_idx) { if (mpc_ioapic_id(ioapic_idx) =3D=3D mp_irqs[i].dstapic) return ioapic_idx; + } } =20 return -1; @@ -769,8 +705,7 @@ static bool EISA_ELCR(unsigned int irq) unsigned int port =3D PIC_ELCR1 + (irq >> 3); return (inb(port) >> (irq & 7)) & 1; } - apic_printk(APIC_VERBOSE, KERN_INFO - "Broken MPtable reports ISA irq %d\n", irq); + apic_pr_verbose("Broken MPtable reports ISA irq %d\n", irq); return false; } =20 @@ -947,9 +882,9 @@ static bool mp_check_pin_attr(int irq, struct irq_alloc_i= nfo *info) static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 = gsi, struct irq_alloc_info *info) { + int type =3D ioapics[ioapic].irqdomain_cfg.type; bool legacy =3D false; int irq =3D -1; - int type =3D ioapics[ioapic].irqdomain_cfg.type; =20 switch (type) { case IOAPIC_DOMAIN_LEGACY: @@ -971,8 +906,7 @@ static int alloc_irq_from_domain(struct irq_domain *domai= n, int ioapic, u32 gsi, return -1; } =20 - return __irq_domain_alloc_irqs(domain, irq, 1, - ioapic_alloc_attr_node(info), + return __irq_domain_alloc_irqs(domain, irq, 1, ioapic_alloc_attr_node(info), info, legacy, NULL); } =20 @@ -986,13 +920,12 @@ static int alloc_irq_from_domain(struct irq_domain *dom= ain, int ioapic, u32 gsi, * PIRQs instead of reprogramming the interrupt routing logic. Thus there ma= y be * multiple pins sharing the same legacy IRQ number when ACPI is disabled. */ -static int alloc_isa_irq_from_domain(struct irq_domain *domain, - int irq, int ioapic, int pin, +static int alloc_isa_irq_from_domain(struct irq_domain *domain, int irq, int= ioapic, int pin, struct irq_alloc_info *info) { - struct mp_chip_data *data; struct irq_data *irq_data =3D irq_get_irq_data(irq); int node =3D ioapic_alloc_attr_node(info); + struct mp_chip_data *data; =20 /* * Legacy ISA IRQ has already been allocated, just add pin to @@ -1002,13 +935,11 @@ static int alloc_isa_irq_from_domain(struct irq_domain= *domain, if (irq_data && irq_data->parent_data) { if (!mp_check_pin_attr(irq, info)) return -EBUSY; - if (__add_pin_to_irq_node(irq_data->chip_data, node, ioapic, - info->ioapic.pin)) + if (!add_pin_to_irq_node(irq_data->chip_data, node, ioapic, info->ioapic.p= in)) return -ENOMEM; } else { info->flags |=3D X86_IRQ_ALLOC_LEGACY; - irq =3D __irq_domain_alloc_irqs(domain, irq, 1, node, info, true, - NULL); + irq =3D __irq_domain_alloc_irqs(domain, irq, 1, node, info, true, NULL); if (irq >=3D 0) { irq_data =3D irq_domain_get_irq_data(domain, irq); data =3D irq_data->chip_data; @@ -1022,11 +953,11 @@ static int alloc_isa_irq_from_domain(struct irq_domain= *domain, static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin, unsigned int flags, struct irq_alloc_info *info) { - int irq; - bool legacy =3D false; + struct irq_domain *domain =3D mp_ioapic_irqdomain(ioapic); struct irq_alloc_info tmp; struct mp_chip_data *data; - struct irq_domain *domain =3D mp_ioapic_irqdomain(ioapic); + bool legacy =3D false; + int irq; =20 if (!domain) return -ENOSYS; @@ -1046,7 +977,7 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapi= c, int pin, return -EINVAL; } =20 - mutex_lock(&ioapic_mutex); + guard(mutex)(&ioapic_mutex); if (!(flags & IOAPIC_MAP_ALLOC)) { if (!legacy) { irq =3D irq_find_mapping(domain, pin); @@ -1067,8 +998,6 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapi= c, int pin, data->count++; } } - mutex_unlock(&ioapic_mutex); - return irq; } =20 @@ -1076,26 +1005,20 @@ static int pin_2_irq(int idx, int ioapic, int pin, un= signed int flags) { u32 gsi =3D mp_pin_to_gsi(ioapic, pin); =20 - /* - * Debugging check, we are in big trouble if this message pops up! - */ + /* Debugging check, we are in big trouble if this message pops up! */ if (mp_irqs[idx].dstirq !=3D pin) pr_err("broken BIOS or MPTABLE parser, ayiee!!\n"); =20 #ifdef CONFIG_X86_32 - /* - * PCI IRQ command line redirection. Yes, limits are hardcoded. - */ + /* PCI IRQ command line redirection. Yes, limits are hardcoded. */ if ((pin >=3D 16) && (pin <=3D 23)) { - if (pirq_entries[pin-16] !=3D -1) { - if (!pirq_entries[pin-16]) { - apic_printk(APIC_VERBOSE, KERN_DEBUG - "disabling PIRQ%d\n", pin-16); + if (pirq_entries[pin - 16] !=3D -1) { + if (!pirq_entries[pin - 16]) { + apic_pr_verbose("Disabling PIRQ%d\n", pin - 16); } else { int irq =3D pirq_entries[pin-16]; - apic_printk(APIC_VERBOSE, KERN_DEBUG - "using PIRQ%d -> IRQ %d\n", - pin-16, irq); + + apic_pr_verbose("Using PIRQ%d -> IRQ %d\n", pin - 16, irq); return irq; } } @@ -1133,10 +1056,9 @@ void mp_unmap_irq(int irq) if (!data || data->isa_irq) return; =20 - mutex_lock(&ioapic_mutex); + guard(mutex)(&ioapic_mutex); if (--data->count =3D=3D 0) irq_domain_free_irqs(irq, 1); - mutex_unlock(&ioapic_mutex); } =20 /* @@ -1147,12 +1069,10 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int= pin) { int irq, i, best_ioapic =3D -1, best_idx =3D -1; =20 - apic_printk(APIC_DEBUG, - "querying PCI -> IRQ mapping bus:%d, slot:%d, pin:%d.\n", - bus, slot, pin); + apic_pr_debug("Querying PCI -> IRQ mapping bus:%d, slot:%d, pin:%d.\n", + bus, slot, pin); if (test_bit(bus, mp_bus_not_pci)) { - apic_printk(APIC_VERBOSE, - "PCI BIOS passed nonexistent PCI bus %d!\n", bus); + apic_pr_verbose("PCI BIOS passed nonexistent PCI bus %d!\n", bus); return -1; } =20 @@ -1197,8 +1117,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int p= in) return -1; =20 out: - return pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq, - IOAPIC_MAP_ALLOC); + return pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq, IOAPIC_MA= P_ALLOC); } EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); =20 @@ -1209,17 +1128,16 @@ static void __init setup_IO_APIC_irqs(void) unsigned int ioapic, pin; int idx; =20 - apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); + apic_pr_verbose("Init IO_APIC IRQs\n"); =20 for_each_ioapic_pin(ioapic, pin) { idx =3D find_irq_entry(ioapic, pin, mp_INT); - if (idx < 0) - apic_printk(APIC_VERBOSE, - KERN_DEBUG " apic %d pin %d not connected\n", - mpc_ioapic_id(ioapic), pin); - else - pin_2_irq(idx, ioapic, pin, - ioapic ? 0 : IOAPIC_MAP_ALLOC); + if (idx < 0) { + apic_pr_verbose("apic %d pin %d not connected\n", + mpc_ioapic_id(ioapic), pin); + } else { + pin_2_irq(idx, ioapic, pin, ioapic ? 0 : IOAPIC_MAP_ALLOC); + } } } =20 @@ -1234,26 +1152,21 @@ static void io_apic_print_entries(unsigned int apic, = unsigned int nr_entries) char buf[256]; int i; =20 - printk(KERN_DEBUG "IOAPIC %d:\n", apic); + apic_dbg("IOAPIC %d:\n", apic); for (i =3D 0; i <=3D nr_entries; i++) { entry =3D ioapic_read_entry(apic, i); - snprintf(buf, sizeof(buf), - " pin%02x, %s, %s, %s, V(%02X), IRR(%1d), S(%1d)", - i, - entry.masked ? "disabled" : "enabled ", + snprintf(buf, sizeof(buf), " pin%02x, %s, %s, %s, V(%02X), IRR(%1d), S(%1d= )", + i, entry.masked ? "disabled" : "enabled ", entry.is_level ? "level" : "edge ", entry.active_low ? "low " : "high", entry.vector, entry.irr, entry.delivery_status); if (entry.ir_format) { - printk(KERN_DEBUG "%s, remapped, I(%04X), Z(%X)\n", - buf, - (entry.ir_index_15 << 15) | entry.ir_index_0_14, - entry.ir_zero); + apic_dbg("%s, remapped, I(%04X), Z(%X)\n", buf, + (entry.ir_index_15 << 15) | entry.ir_index_0_14, entry.ir_zero); } else { - printk(KERN_DEBUG "%s, %s, D(%02X%02X), M(%1d)\n", buf, - entry.dest_mode_logical ? "logical " : "physical", - entry.virt_destid_8_14, entry.destid_0_7, - entry.delivery_mode); + apic_dbg("%s, %s, D(%02X%02X), M(%1d)\n", buf, + entry.dest_mode_logical ? "logical " : "physic al", + entry.virt_destid_8_14, entry.destid_0_7, entry.delivery_mode); } } } @@ -1264,30 +1177,25 @@ static void __init print_IO_APIC(int ioapic_idx) union IO_APIC_reg_01 reg_01; union IO_APIC_reg_02 reg_02; union IO_APIC_reg_03 reg_03; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); - reg_00.raw =3D io_apic_read(ioapic_idx, 0); - reg_01.raw =3D io_apic_read(ioapic_idx, 1); - if (reg_01.bits.version >=3D 0x10) - reg_02.raw =3D io_apic_read(ioapic_idx, 2); - if (reg_01.bits.version >=3D 0x20) - reg_03.raw =3D io_apic_read(ioapic_idx, 3); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); - - printk(KERN_DEBUG "IO APIC #%d......\n", mpc_ioapic_id(ioapic_idx)); - printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw); - printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID); - printk(KERN_DEBUG "....... : Delivery Type: %X\n", reg_00.bits.delivery_= type); - printk(KERN_DEBUG "....... : LTS : %X\n", reg_00.bits.LTS); - - printk(KERN_DEBUG ".... register #01: %08X\n", *(int *)®_01); - printk(KERN_DEBUG "....... : max redirection entries: %02X\n", - reg_01.bits.entries); - - printk(KERN_DEBUG "....... : PRQ implemented: %X\n", reg_01.bits.PRQ); - printk(KERN_DEBUG "....... : IO APIC version: %02X\n", - reg_01.bits.version); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) { + reg_00.raw =3D io_apic_read(ioapic_idx, 0); + reg_01.raw =3D io_apic_read(ioapic_idx, 1); + if (reg_01.bits.version >=3D 0x10) + reg_02.raw =3D io_apic_read(ioapic_idx, 2); + if (reg_01.bits.version >=3D 0x20) + reg_03.raw =3D io_apic_read(ioapic_idx, 3); + } + + apic_dbg("IO APIC #%d......\n", mpc_ioapic_id(ioapic_idx)); + apic_dbg(".... register #00: %08X\n", reg_00.raw); + apic_dbg("....... : physical APIC id: %02X\n", reg_00.bits.ID); + apic_dbg("....... : Delivery Type: %X\n", reg_00.bits.delivery_type); + apic_dbg("....... : LTS : %X\n", reg_00.bits.LTS); + apic_dbg(".... register #01: %08X\n", *(int *)®_01); + apic_dbg("....... : max redirection entries: %02X\n", reg_01.bits.entri= es); + apic_dbg("....... : PRQ implemented: %X\n", reg_01.bits.PRQ); + apic_dbg("....... : IO APIC version: %02X\n", reg_01.bits.version); =20 /* * Some Intel chipsets with IO APIC VERSION of 0x1? don't have reg_02, @@ -1295,8 +1203,8 @@ static void __init print_IO_APIC(int ioapic_idx) * value, so ignore it if reg_02 =3D=3D reg_01. */ if (reg_01.bits.version >=3D 0x10 && reg_02.raw !=3D reg_01.raw) { - printk(KERN_DEBUG ".... register #02: %08X\n", reg_02.raw); - printk(KERN_DEBUG "....... : arbitration: %02X\n", reg_02.bits.arbitra= tion); + apic_dbg(".... register #02: %08X\n", reg_02.raw); + apic_dbg("....... : arbitration: %02X\n", reg_02.bits.arbitration); } =20 /* @@ -1306,11 +1214,11 @@ static void __init print_IO_APIC(int ioapic_idx) */ if (reg_01.bits.version >=3D 0x20 && reg_03.raw !=3D reg_02.raw && reg_03.raw !=3D reg_01.raw) { - printk(KERN_DEBUG ".... register #03: %08X\n", reg_03.raw); - printk(KERN_DEBUG "....... : Boot DT : %X\n", reg_03.bits.boot_DT); + apic_dbg(".... register #03: %08X\n", reg_03.raw); + apic_dbg("....... : Boot DT : %X\n", reg_03.bits.boot_DT); } =20 - printk(KERN_DEBUG ".... IRQ redirection table:\n"); + apic_dbg(".... IRQ redirection table:\n"); io_apic_print_entries(ioapic_idx, reg_01.bits.entries); } =20 @@ -1319,11 +1227,11 @@ void __init print_IO_APICs(void) int ioapic_idx; unsigned int irq; =20 - printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); - for_each_ioapic(ioapic_idx) - printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n", - mpc_ioapic_id(ioapic_idx), - ioapics[ioapic_idx].nr_registers); + apic_dbg("number of MP IRQ sources: %d.\n", mp_irq_entries); + for_each_ioapic(ioapic_idx) { + apic_dbg("number of IO-APIC #%d registers: %d.\n", + mpc_ioapic_id(ioapic_idx), ioapics[ioapic_idx].nr_registers); + } =20 /* * We are a bit conservative about what we expect. We have to @@ -1334,7 +1242,7 @@ void __init print_IO_APICs(void) for_each_ioapic(ioapic_idx) print_IO_APIC(ioapic_idx); =20 - printk(KERN_DEBUG "IRQ to pin mappings:\n"); + apic_dbg("IRQ to pin mappings:\n"); for_each_active_irq(irq) { struct irq_pin_list *entry; struct irq_chip *chip; @@ -1349,7 +1257,7 @@ void __init print_IO_APICs(void) if (list_empty(&data->irq_2_pin)) continue; =20 - printk(KERN_DEBUG "IRQ%d ", irq); + apic_dbg("IRQ%d ", irq); for_each_irq_pin(entry, data->irq_2_pin) pr_cont("-> %d:%d", entry->apic, entry->pin); pr_cont("\n"); @@ -1363,8 +1271,7 @@ static struct { int pin, apic; } ioapic_i8259 =3D { -1,= -1 }; =20 void __init enable_IO_APIC(void) { - int i8259_apic, i8259_pin; - int apic, pin; + int i8259_apic, i8259_pin, apic, pin; =20 if (ioapic_is_disabled) nr_ioapics =3D 0; @@ -1376,19 +1283,21 @@ void __init enable_IO_APIC(void) /* See if any of the pins is in ExtINT mode */ struct IO_APIC_route_entry entry =3D ioapic_read_entry(apic, pin); =20 - /* If the interrupt line is enabled and in ExtInt mode - * I have found the pin where the i8259 is connected. + /* + * If the interrupt line is enabled and in ExtInt mode I + * have found the pin where the i8259 is connected. */ - if (!entry.masked && - entry.delivery_mode =3D=3D APIC_DELIVERY_MODE_EXTINT) { + if (!entry.masked && entry.delivery_mode =3D=3D APIC_DELIVERY_MODE_EXTINT)= { ioapic_i8259.apic =3D apic; ioapic_i8259.pin =3D pin; - goto found_i8259; + break; } } - found_i8259: - /* Look to see what if the MP table has reported the ExtINT */ - /* If we could not find the appropriate pin by looking at the ioapic + + /* + * Look to see what if the MP table has reported the ExtINT + * + * If we could not find the appropriate pin by looking at the ioapic * the i8259 probably is not connected the ioapic but give the * mptable a chance anyway. */ @@ -1396,29 +1305,24 @@ void __init enable_IO_APIC(void) i8259_apic =3D find_isa_irq_apic(0, mp_ExtINT); /* Trust the MP table if nothing is setup in the hardware */ if ((ioapic_i8259.pin =3D=3D -1) && (i8259_pin >=3D 0)) { - printk(KERN_WARNING "ExtINT not setup in hardware but reported by MP table= \n"); + pr_warn("ExtINT not setup in hardware but reported by MP table\n"); ioapic_i8259.pin =3D i8259_pin; ioapic_i8259.apic =3D i8259_apic; } /* Complain if the MP table and the hardware disagree */ if (((ioapic_i8259.apic !=3D i8259_apic) || (ioapic_i8259.pin !=3D i8259_pi= n)) && - (i8259_pin >=3D 0) && (ioapic_i8259.pin >=3D 0)) - { - printk(KERN_WARNING "ExtINT in hardware and MP table differ\n"); - } + (i8259_pin >=3D 0) && (ioapic_i8259.pin >=3D 0)) + pr_warn("ExtINT in hardware and MP table differ\n"); =20 - /* - * Do not trust the IO-APIC being empty at bootup - */ + /* Do not trust the IO-APIC being empty at bootup */ clear_IO_APIC(); } =20 void native_restore_boot_irq_mode(void) { /* - * If the i8259 is routed through an IOAPIC - * Put that IOAPIC in virtual wire mode - * so legacy interrupts can be delivered. + * If the i8259 is routed through an IOAPIC Put that IOAPIC in + * virtual wire mode so legacy interrupts can be delivered. */ if (ioapic_i8259.pin !=3D -1) { struct IO_APIC_route_entry entry; @@ -1433,9 +1337,7 @@ void native_restore_boot_irq_mode(void) entry.destid_0_7 =3D apic_id & 0xFF; entry.virt_destid_8_14 =3D apic_id >> 8; =20 - /* - * Add it to the IO-APIC irq-routing table: - */ + /* Add it to the IO-APIC irq-routing table */ ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); } =20 @@ -1464,7 +1366,6 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(vo= id) const u32 broadcast_id =3D 0xF; union IO_APIC_reg_00 reg_00; unsigned char old_id; - unsigned long flags; int ioapic_idx, i; =20 /* @@ -1478,9 +1379,8 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(vo= id) */ for_each_ioapic(ioapic_idx) { /* Read the register 0 value */ - raw_spin_lock_irqsave(&ioapic_lock, flags); - reg_00.raw =3D io_apic_read(ioapic_idx, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) + reg_00.raw =3D io_apic_read(ioapic_idx, 0); =20 old_id =3D mpc_ioapic_id(ioapic_idx); =20 @@ -1508,47 +1408,42 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(= void) set_bit(i, phys_id_present_map); ioapics[ioapic_idx].mp_config.apicid =3D i; } else { - apic_printk(APIC_VERBOSE, "Setting %d in the phys_id_present_map\n", - mpc_ioapic_id(ioapic_idx)); + apic_pr_verbose("Setting %d in the phys_id_present_map\n", + mpc_ioapic_id(ioapic_idx)); set_bit(mpc_ioapic_id(ioapic_idx), phys_id_present_map); } =20 /* - * We need to adjust the IRQ routing table - * if the ID changed. + * We need to adjust the IRQ routing table if the ID + * changed. */ - if (old_id !=3D mpc_ioapic_id(ioapic_idx)) - for (i =3D 0; i < mp_irq_entries; i++) + if (old_id !=3D mpc_ioapic_id(ioapic_idx)) { + for (i =3D 0; i < mp_irq_entries; i++) { if (mp_irqs[i].dstapic =3D=3D old_id) - mp_irqs[i].dstapic - =3D mpc_ioapic_id(ioapic_idx); + mp_irqs[i].dstapic =3D mpc_ioapic_id(ioapic_idx); + } + } =20 /* - * Update the ID register according to the right value - * from the MPC table if they are different. + * Update the ID register according to the right value from + * the MPC table if they are different. */ if (mpc_ioapic_id(ioapic_idx) =3D=3D reg_00.bits.ID) continue; =20 - apic_printk(APIC_VERBOSE, KERN_INFO - "...changing IO-APIC physical APIC ID to %d ...", - mpc_ioapic_id(ioapic_idx)); + apic_pr_verbose("...changing IO-APIC physical APIC ID to %d ...", + mpc_ioapic_id(ioapic_idx)); =20 reg_00.bits.ID =3D mpc_ioapic_id(ioapic_idx); - raw_spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(ioapic_idx, 0, reg_00.raw); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); - - /* - * Sanity check - */ - raw_spin_lock_irqsave(&ioapic_lock, flags); - reg_00.raw =3D io_apic_read(ioapic_idx, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) { + io_apic_write(ioapic_idx, 0, reg_00.raw); + reg_00.raw =3D io_apic_read(ioapic_idx, 0); + } + /* Sanity check */ if (reg_00.bits.ID !=3D mpc_ioapic_id(ioapic_idx)) pr_cont("could not set ID!\n"); else - apic_printk(APIC_VERBOSE, " ok.\n"); + apic_pr_verbose(" ok.\n"); } } =20 @@ -1593,8 +1488,7 @@ static void __init delay_with_tsc(void) do { rep_nop(); now =3D rdtsc(); - } while ((now - start) < 40000000000ULL / HZ && - time_before_eq(jiffies, end)); + } while ((now - start) < 40000000000ULL / HZ && time_before_eq(jiffies, end= )); } =20 static void __init delay_without_tsc(void) @@ -1655,36 +1549,29 @@ static int __init timer_irq_works(void) * so we 'resend' these IRQs via IPIs, to the same CPU. It's much * better to do it this way as thus we do not have to be aware of * 'pending' interrupts in the IRQ path, except at this point. - */ -/* - * Edge triggered needs to resend any interrupt - * that was delayed but this is now handled in the device - * independent code. - */ - -/* - * Starting up a edge-triggered IO-APIC interrupt is - * nasty - we need to make sure that we get the edge. - * If it is already asserted for some reason, we need - * return 1 to indicate that is was pending. * - * This is not complete - we should be able to fake - * an edge even if it isn't on the 8259A... + * + * Edge triggered needs to resend any interrupt that was delayed but this + * is now handled in the device independent code. + * + * Starting up a edge-triggered IO-APIC interrupt is nasty - we need to + * make sure that we get the edge. If it is already asserted for some + * reason, we need return 1 to indicate that is was pending. + * + * This is not complete - we should be able to fake an edge even if it + * isn't on the 8259A... */ static unsigned int startup_ioapic_irq(struct irq_data *data) { int was_pending =3D 0, irq =3D data->irq; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); if (irq < nr_legacy_irqs()) { legacy_pic->mask(irq); if (legacy_pic->irq_pending(irq)) was_pending =3D 1; } __unmask_ioapic(data->chip_data); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); - return was_pending; } =20 @@ -1694,9 +1581,8 @@ atomic_t irq_mis_count; static bool io_apic_level_ack_pending(struct mp_chip_data *data) { struct irq_pin_list *entry; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); for_each_irq_pin(entry, data->irq_2_pin) { struct IO_APIC_route_entry e; int pin; @@ -1704,13 +1590,9 @@ static bool io_apic_level_ack_pending(struct mp_chip_d= ata *data) pin =3D entry->pin; e.w1 =3D io_apic_read(entry->apic, 0x10 + pin*2); /* Is the remote IRR bit set? */ - if (e.irr) { - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + if (e.irr) return true; - } } - raw_spin_unlock_irqrestore(&ioapic_lock, flags); - return false; } =20 @@ -1728,7 +1610,8 @@ static inline bool ioapic_prepare_move(struct irq_data = *data) static inline void ioapic_finish_move(struct irq_data *data, bool moveit) { if (unlikely(moveit)) { - /* Only migrate the irq if the ack has been received. + /* + * Only migrate the irq if the ack has been received. * * On rare occasions the broadcast level triggered ack gets * delayed going to ioapics, and if we reprogram the @@ -1911,18 +1794,16 @@ static void ioapic_configure_entry(struct irq_data *i= rqd) __ioapic_write_entry(entry->apic, entry->pin, mpd->entry); } =20 -static int ioapic_set_affinity(struct irq_data *irq_data, - const struct cpumask *mask, bool force) +static int ioapic_set_affinity(struct irq_data *irq_data, const struct cpuma= sk *mask, bool force) { struct irq_data *parent =3D irq_data->parent_data; - unsigned long flags; int ret; =20 ret =3D parent->chip->irq_set_affinity(parent, mask, force); - raw_spin_lock_irqsave(&ioapic_lock, flags); + + guard(raw_spinlock_irqsave)(&ioapic_lock); if (ret >=3D 0 && ret !=3D IRQ_SET_MASK_OK_DONE) ioapic_configure_entry(irq_data); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); =20 return ret; } @@ -1941,9 +1822,8 @@ static int ioapic_set_affinity(struct irq_data *irq_dat= a, * * Verify that the corresponding Remote-IRR bits are clear. */ -static int ioapic_irq_get_chip_state(struct irq_data *irqd, - enum irqchip_irq_state which, - bool *state) +static int ioapic_irq_get_chip_state(struct irq_data *irqd, enum irqchip_irq= _state which, + bool *state) { struct mp_chip_data *mcd =3D irqd->chip_data; struct IO_APIC_route_entry rentry; @@ -1953,7 +1833,8 @@ static int ioapic_irq_get_chip_state(struct irq_data *i= rqd, return -EINVAL; =20 *state =3D false; - raw_spin_lock(&ioapic_lock); + + guard(raw_spinlock)(&ioapic_lock); for_each_irq_pin(p, mcd->irq_2_pin) { rentry =3D __ioapic_read_entry(p->apic, p->pin); /* @@ -1967,7 +1848,6 @@ static int ioapic_irq_get_chip_state(struct irq_data *i= rqd, break; } } - raw_spin_unlock(&ioapic_lock); return 0; } =20 @@ -2008,14 +1888,13 @@ static inline void init_IO_APIC_traps(void) cfg =3D irq_cfg(irq); if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) { /* - * Hmm.. We don't have an entry for this, - * so default to an old-fashioned 8259 - * interrupt if we can.. + * Hmm.. We don't have an entry for this, so + * default to an old-fashioned 8259 interrupt if we + * can. Otherwise set the dummy interrupt chip. */ if (irq < nr_legacy_irqs()) legacy_pic->make_irq(irq); else - /* Strange. Oh, well.. */ irq_set_chip(irq, &no_irq_chip); } } @@ -2024,20 +1903,17 @@ static inline void init_IO_APIC_traps(void) /* * The local APIC irq-chip implementation: */ - static void mask_lapic_irq(struct irq_data *data) { - unsigned long v; + unsigned long v =3D apic_read(APIC_LVT0); =20 - v =3D apic_read(APIC_LVT0); apic_write(APIC_LVT0, v | APIC_LVT_MASKED); } =20 static void unmask_lapic_irq(struct irq_data *data) { - unsigned long v; + unsigned long v =3D apic_read(APIC_LVT0); =20 - v =3D apic_read(APIC_LVT0); apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED); } =20 @@ -2056,8 +1932,7 @@ static struct irq_chip lapic_chip __read_mostly =3D { static void lapic_register_intr(int irq) { irq_clear_status_flags(irq, IRQ_LEVEL); - irq_set_chip_and_handler_name(irq, &lapic_chip, handle_edge_irq, - "edge"); + irq_set_chip_and_handler_name(irq, &lapic_chip, handle_edge_irq, "edge"); } =20 /* @@ -2069,9 +1944,9 @@ static void lapic_register_intr(int irq) */ static inline void __init unlock_ExtINT_logic(void) { - int apic, pin, i; - struct IO_APIC_route_entry entry0, entry1; unsigned char save_control, save_freq_select; + struct IO_APIC_route_entry entry0, entry1; + int apic, pin, i; u32 apic_id; =20 pin =3D find_isa_irq_pin(8, mp_INT); @@ -2131,10 +2006,10 @@ static int __init disable_timer_pin_setup(char *arg) } early_param("disable_timer_pin_1", disable_timer_pin_setup); =20 -static int mp_alloc_timer_irq(int ioapic, int pin) +static int __init mp_alloc_timer_irq(int ioapic, int pin) { - int irq =3D -1; struct irq_domain *domain =3D mp_ioapic_irqdomain(ioapic); + int irq =3D -1; =20 if (domain) { struct irq_alloc_info info; @@ -2142,21 +2017,36 @@ static int mp_alloc_timer_irq(int ioapic, int pin) ioapic_set_alloc_attr(&info, NUMA_NO_NODE, 0, 0); info.devid =3D mpc_ioapic_id(ioapic); info.ioapic.pin =3D pin; - mutex_lock(&ioapic_mutex); + guard(mutex)(&ioapic_mutex); irq =3D alloc_isa_irq_from_domain(domain, 0, ioapic, pin, &info); - mutex_unlock(&ioapic_mutex); } =20 return irq; } =20 +static void __init replace_pin_at_irq_node(struct mp_chip_data *data, int no= de, + int oldapic, int oldpin, + int newapic, int newpin) +{ + struct irq_pin_list *entry; + + for_each_irq_pin(entry, data->irq_2_pin) { + if (entry->apic =3D=3D oldapic && entry->pin =3D=3D oldpin) { + entry->apic =3D newapic; + entry->pin =3D newpin; + return; + } + } + + /* Old apic/pin didn't exist, so just add a new one */ + add_pin_to_irq_node(data, node, newapic, newpin); +} + /* * This code may look a bit paranoid, but it's supposed to cooperate with * a wide range of boards and BIOS bugs. Fortunately only the timer IRQ * is so screwy. Thanks to Brian Perkins for testing/hacking this beast * fanatically on his truly buggy board. - * - * FIXME: really need to revamp this for all platforms. */ static inline void __init check_timer(void) { @@ -2194,9 +2084,8 @@ static inline void __init check_timer(void) pin2 =3D ioapic_i8259.pin; apic2 =3D ioapic_i8259.apic; =20 - apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=3D0x%02X " - "apic1=3D%d pin1=3D%d apic2=3D%d pin2=3D%d\n", - cfg->vector, apic1, pin1, apic2, pin2); + pr_info("..TIMER: vector=3D0x%02X apic1=3D%d pin1=3D%d apic2=3D%d pin2=3D%d= \n", + cfg->vector, apic1, pin1, apic2, pin2); =20 /* * Some BIOS writers are clueless and report the ExtINTA @@ -2240,13 +2129,10 @@ static inline void __init check_timer(void) panic_if_irq_remap("timer doesn't work through Interrupt-remapped IO-APIC"= ); clear_IO_APIC_pin(apic1, pin1); if (!no_pin1) - apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " - "8254 timer not connected to IO-APIC\n"); + pr_err("..MP-BIOS bug: 8254 timer not connected to IO-APIC\n"); =20 - apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer " - "(IRQ0) through the 8259A ...\n"); - apic_printk(APIC_QUIET, KERN_INFO - "..... (found apic %d pin %d) ...\n", apic2, pin2); + pr_info("...trying to set up timer (IRQ0) through the 8259A ...\n"); + pr_info("..... (found apic %d pin %d) ...\n", apic2, pin2); /* * legacy devices should be connected to IO APIC #0 */ @@ -2255,7 +2141,7 @@ static inline void __init check_timer(void) irq_domain_activate_irq(irq_data, false); legacy_pic->unmask(0); if (timer_irq_works()) { - apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); + pr_info("....... works.\n"); goto out; } /* @@ -2263,26 +2149,24 @@ static inline void __init check_timer(void) */ legacy_pic->mask(0); clear_IO_APIC_pin(apic2, pin2); - apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); + pr_info("....... failed.\n"); } =20 - apic_printk(APIC_QUIET, KERN_INFO - "...trying to set up timer as Virtual Wire IRQ...\n"); + pr_info("...trying to set up timer as Virtual Wire IRQ...\n"); =20 lapic_register_intr(0); apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */ legacy_pic->unmask(0); =20 if (timer_irq_works()) { - apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); + pr_info("..... works.\n"); goto out; } legacy_pic->mask(0); apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); - apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); + pr_info("..... failed.\n"); =20 - apic_printk(APIC_QUIET, KERN_INFO - "...trying to set up timer as ExtINT IRQ...\n"); + pr_info("...trying to set up timer as ExtINT IRQ...\n"); =20 legacy_pic->init(0); legacy_pic->make_irq(0); @@ -2292,14 +2176,15 @@ static inline void __init check_timer(void) unlock_ExtINT_logic(); =20 if (timer_irq_works()) { - apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); + pr_info("..... works.\n"); goto out; } - apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); - if (apic_is_x2apic_enabled()) - apic_printk(APIC_QUIET, KERN_INFO - "Perhaps problem with the pre-enabled x2apic mode\n" - "Try booting with x2apic and interrupt-remapping disabled in the bios= .\n"); + + pr_info("..... failed :\n"); + if (apic_is_x2apic_enabled()) { + pr_info("Perhaps problem with the pre-enabled x2apic mode\n" + "Try booting with x2apic and interrupt-remapping disabled in the bios.\n"= ); + } panic("IO-APIC + timer doesn't work! Boot with apic=3Ddebug and send a " "report. Then try booting with the 'noapic' option.\n"); out: @@ -2327,11 +2212,11 @@ static inline void __init check_timer(void) =20 static int mp_irqdomain_create(int ioapic) { - struct irq_domain *parent; + struct mp_ioapic_gsi *gsi_cfg =3D mp_ioapic_gsi_routing(ioapic); int hwirqs =3D mp_ioapic_pin_count(ioapic); struct ioapic *ip =3D &ioapics[ioapic]; struct ioapic_domain_cfg *cfg =3D &ip->irqdomain_cfg; - struct mp_ioapic_gsi *gsi_cfg =3D mp_ioapic_gsi_routing(ioapic); + struct irq_domain *parent; struct fwnode_handle *fn; struct irq_fwspec fwspec; =20 @@ -2367,10 +2252,8 @@ static int mp_irqdomain_create(int ioapic) return -ENOMEM; } =20 - if (cfg->type =3D=3D IOAPIC_DOMAIN_LEGACY || - cfg->type =3D=3D IOAPIC_DOMAIN_STRICT) - ioapic_dynirq_base =3D max(ioapic_dynirq_base, - gsi_cfg->gsi_end + 1); + if (cfg->type =3D=3D IOAPIC_DOMAIN_LEGACY || cfg->type =3D=3D IOAPIC_DOMAIN= _STRICT) + ioapic_dynirq_base =3D max(ioapic_dynirq_base, gsi_cfg->gsi_end + 1); =20 return 0; } @@ -2397,13 +2280,11 @@ void __init setup_IO_APIC(void) =20 io_apic_irqs =3D nr_legacy_irqs() ? ~PIC_IRQS : ~0UL; =20 - apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n"); + apic_pr_verbose("ENABLING IO-APIC IRQs\n"); for_each_ioapic(ioapic) BUG_ON(mp_irqdomain_create(ioapic)); =20 - /* - * Set up IO-APIC IRQ routing. - */ + /* Set up IO-APIC IRQ routing. */ x86_init.mpparse.setup_ioapic_ids(); =20 sync_Arb_IDs(); @@ -2417,16 +2298,14 @@ void __init setup_IO_APIC(void) =20 static void resume_ioapic_id(int ioapic_idx) { - unsigned long flags; union IO_APIC_reg_00 reg_00; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); reg_00.raw =3D io_apic_read(ioapic_idx, 0); if (reg_00.bits.ID !=3D mpc_ioapic_id(ioapic_idx)) { reg_00.bits.ID =3D mpc_ioapic_id(ioapic_idx); io_apic_write(ioapic_idx, 0, reg_00.raw); } - raw_spin_unlock_irqrestore(&ioapic_lock, flags); } =20 static void ioapic_resume(void) @@ -2440,8 +2319,8 @@ static void ioapic_resume(void) } =20 static struct syscore_ops ioapic_syscore_ops =3D { - .suspend =3D save_ioapic_entries, - .resume =3D ioapic_resume, + .suspend =3D save_ioapic_entries, + .resume =3D ioapic_resume, }; =20 static int __init ioapic_init_ops(void) @@ -2456,15 +2335,13 @@ device_initcall(ioapic_init_ops); static int io_apic_get_redir_entries(int ioapic) { union IO_APIC_reg_01 reg_01; - unsigned long flags; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); reg_01.raw =3D io_apic_read(ioapic, 1); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); =20 - /* The register returns the maximum index redir index - * supported, which is one less than the total number of redir - * entries. + /* + * The register returns the maximum index redir index supported, + * which is one less than the total number of redir entries. */ return reg_01.bits.entries + 1; } @@ -2494,16 +2371,14 @@ static int io_apic_get_unique_id(int ioapic, int apic= _id) static DECLARE_BITMAP(apic_id_map, MAX_LOCAL_APIC); const u32 broadcast_id =3D 0xF; union IO_APIC_reg_00 reg_00; - unsigned long flags; int i =3D 0; =20 /* Initialize the ID map */ if (bitmap_empty(apic_id_map, MAX_LOCAL_APIC)) copy_phys_cpu_present_map(apic_id_map); =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); - reg_00.raw =3D io_apic_read(ioapic, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) + reg_00.raw =3D io_apic_read(ioapic, 0); =20 if (apic_id >=3D broadcast_id) { pr_warn("IOAPIC[%d]: Invalid apic_id %d, trying %d\n", @@ -2530,21 +2405,19 @@ static int io_apic_get_unique_id(int ioapic, int apic= _id) if (reg_00.bits.ID !=3D apic_id) { reg_00.bits.ID =3D apic_id; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(ioapic, 0, reg_00.raw); - reg_00.raw =3D io_apic_read(ioapic, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) { + io_apic_write(ioapic, 0, reg_00.raw); + reg_00.raw =3D io_apic_read(ioapic, 0); + } =20 /* Sanity check */ if (reg_00.bits.ID !=3D apic_id) { - pr_err("IOAPIC[%d]: Unable to change apic_id!\n", - ioapic); + pr_err("IOAPIC[%d]: Unable to change apic_id!\n", ioapic); return -1; } } =20 - apic_printk(APIC_VERBOSE, KERN_INFO - "IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id); + apic_pr_verbose("IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id); =20 return apic_id; } @@ -2560,7 +2433,6 @@ static u8 io_apic_unique_id(int idx, u8 id) { union IO_APIC_reg_00 reg_00; DECLARE_BITMAP(used, 256); - unsigned long flags; u8 new_id; int i; =20 @@ -2576,26 +2448,23 @@ static u8 io_apic_unique_id(int idx, u8 id) * Read the current id from the ioapic and keep it if * available. */ - raw_spin_lock_irqsave(&ioapic_lock, flags); - reg_00.raw =3D io_apic_read(idx, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) + reg_00.raw =3D io_apic_read(idx, 0); + new_id =3D reg_00.bits.ID; if (!test_bit(new_id, used)) { - apic_printk(APIC_VERBOSE, KERN_INFO - "IOAPIC[%d]: Using reg apic_id %d instead of %d\n", - idx, new_id, id); + apic_pr_verbose("IOAPIC[%d]: Using reg apic_id %d instead of %d\n", + idx, new_id, id); return new_id; } =20 - /* - * Get the next free id and write it to the ioapic. - */ + /* Get the next free id and write it to the ioapic. */ new_id =3D find_first_zero_bit(used, 256); reg_00.bits.ID =3D new_id; - raw_spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(idx, 0, reg_00.raw); - reg_00.raw =3D io_apic_read(idx, 0); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); + scoped_guard (raw_spinlock_irqsave, &ioapic_lock) { + io_apic_write(idx, 0, reg_00.raw); + reg_00.raw =3D io_apic_read(idx, 0); + } /* Sanity check */ BUG_ON(reg_00.bits.ID !=3D new_id); =20 @@ -2605,12 +2474,10 @@ static u8 io_apic_unique_id(int idx, u8 id) =20 static int io_apic_get_version(int ioapic) { - union IO_APIC_reg_01 reg_01; - unsigned long flags; + union IO_APIC_reg_01 reg_01; =20 - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); reg_01.raw =3D io_apic_read(ioapic, 1); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); =20 return reg_01.bits.version; } @@ -2625,8 +2492,8 @@ static struct resource *ioapic_resources; =20 static struct resource * __init ioapic_setup_resources(void) { - unsigned long n; struct resource *res; + unsigned long n; char *mem; int i; =20 @@ -2686,9 +2553,7 @@ void __init io_apic_init_mappings(void) ioapic_phys =3D mpc_ioapic_addr(i); #ifdef CONFIG_X86_32 if (!ioapic_phys) { - printk(KERN_ERR - "WARNING: bogus zero IO-APIC " - "address found in MPTABLE, " + pr_err("WARNING: bogus zero IO-APIC address found in MPTABLE, " "disabling IO/APIC support!\n"); smp_found_config =3D 0; ioapic_is_disabled =3D true; @@ -2707,9 +2572,8 @@ void __init io_apic_init_mappings(void) ioapic_phys =3D __pa(ioapic_phys); } io_apic_set_fixmap(idx, ioapic_phys); - apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08lx (%08lx)\n", - __fix_to_virt(idx) + (ioapic_phys & ~PAGE_MASK), - ioapic_phys); + apic_pr_verbose("mapped IOAPIC to %08lx (%08lx)\n", + __fix_to_virt(idx) + (ioapic_phys & ~PAGE_MASK), ioapic_phys); idx++; =20 ioapic_res->start =3D ioapic_phys; @@ -2720,13 +2584,12 @@ void __init io_apic_init_mappings(void) =20 void __init ioapic_insert_resources(void) { - int i; struct resource *r =3D ioapic_resources; + int i; =20 if (!r) { if (nr_ioapics > 0) - printk(KERN_ERR - "IO APIC resources couldn't be allocated.\n"); + pr_err("IO APIC resources couldn't be allocated.\n"); return; } =20 @@ -2746,11 +2609,12 @@ int mp_find_ioapic(u32 gsi) /* Find the IOAPIC that manages this GSI. */ for_each_ioapic(i) { struct mp_ioapic_gsi *gsi_cfg =3D mp_ioapic_gsi_routing(i); + if (gsi >=3D gsi_cfg->gsi_base && gsi <=3D gsi_cfg->gsi_end) return i; } =20 - printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); + pr_err("ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); return -1; } =20 @@ -2789,12 +2653,10 @@ static int bad_ioapic_register(int idx) =20 static int find_free_ioapic_entry(void) { - int idx; - - for (idx =3D 0; idx < MAX_IO_APICS; idx++) + for (int idx =3D 0; idx < MAX_IO_APICS; idx++) { if (ioapics[idx].nr_registers =3D=3D 0) return idx; - + } return MAX_IO_APICS; } =20 @@ -2805,8 +2667,7 @@ static int find_free_ioapic_entry(void) * @gsi_base: base of GSI associated with the IOAPIC * @cfg: configuration information for the IOAPIC */ -int mp_register_ioapic(int id, u32 address, u32 gsi_base, - struct ioapic_domain_cfg *cfg) +int mp_register_ioapic(int id, u32 address, u32 gsi_base, struct ioapic_doma= in_cfg *cfg) { bool hotplug =3D !!ioapic_initialized; struct mp_ioapic_gsi *gsi_cfg; @@ -2817,12 +2678,13 @@ int mp_register_ioapic(int id, u32 address, u32 gsi_b= ase, pr_warn("Bogus (zero) I/O APIC address found, skipping!\n"); return -EINVAL; } - for_each_ioapic(ioapic) + + for_each_ioapic(ioapic) { if (ioapics[ioapic].mp_config.apicaddr =3D=3D address) { - pr_warn("address 0x%x conflicts with IOAPIC%d\n", - address, ioapic); + pr_warn("address 0x%x conflicts with IOAPIC%d\n", address, ioapic); return -EEXIST; } + } =20 idx =3D find_free_ioapic_entry(); if (idx >=3D MAX_IO_APICS) { @@ -2857,8 +2719,7 @@ int mp_register_ioapic(int id, u32 address, u32 gsi_bas= e, (gsi_end >=3D gsi_cfg->gsi_base && gsi_end <=3D gsi_cfg->gsi_end)) { pr_warn("GSI range [%u-%u] for new IOAPIC conflicts with GSI[%u-%u]\n", - gsi_base, gsi_end, - gsi_cfg->gsi_base, gsi_cfg->gsi_end); + gsi_base, gsi_end, gsi_cfg->gsi_base, gsi_cfg->gsi_end); clear_fixmap(FIX_IO_APIC_BASE_0 + idx); return -ENOSPC; } @@ -2892,8 +2753,7 @@ int mp_register_ioapic(int id, u32 address, u32 gsi_bas= e, ioapics[idx].nr_registers =3D entries; =20 pr_info("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, GSI %d-%d\n", - idx, mpc_ioapic_id(idx), - mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), + idx, mpc_ioapic_id(idx), mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), gsi_cfg->gsi_base, gsi_cfg->gsi_end); =20 return 0; @@ -2904,11 +2764,13 @@ int mp_unregister_ioapic(u32 gsi_base) int ioapic, pin; int found =3D 0; =20 - for_each_ioapic(ioapic) + for_each_ioapic(ioapic) { if (ioapics[ioapic].gsi_config.gsi_base =3D=3D gsi_base) { found =3D 1; break; } + } + if (!found) { pr_warn("can't find IOAPIC for GSI %d\n", gsi_base); return -ENODEV; @@ -2922,8 +2784,7 @@ int mp_unregister_ioapic(u32 gsi_base) if (irq >=3D 0) { data =3D irq_get_chip_data(irq); if (data && data->count) { - pr_warn("pin%d on IOAPIC%d is still in use.\n", - pin, ioapic); + pr_warn("pin%d on IOAPIC%d is still in use.\n", pin, ioapic); return -EBUSY; } } @@ -2958,8 +2819,7 @@ static void mp_irqdomain_get_attr(u32 gsi, struct mp_ch= ip_data *data, if (info && info->ioapic.valid) { data->is_level =3D info->ioapic.is_level; data->active_low =3D info->ioapic.active_low; - } else if (__acpi_get_override_irq(gsi, &data->is_level, - &data->active_low) < 0) { + } else if (__acpi_get_override_irq(gsi, &data->is_level, &data->active_low)= < 0) { /* PCI interrupts are always active low level triggered. */ data->is_level =3D true; data->active_low =3D true; @@ -3017,10 +2877,8 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsi= gned int virq, return -ENOMEM; =20 ret =3D irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, info); - if (ret < 0) { - kfree(data); - return ret; - } + if (ret < 0) + goto free_data; =20 INIT_LIST_HEAD(&data->irq_2_pin); irq_data->hwirq =3D info->ioapic.pin; @@ -3029,7 +2887,10 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsi= gned int virq, irq_data->chip_data =3D data; mp_irqdomain_get_attr(mp_pin_to_gsi(ioapic, pin), data, info); =20 - add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin); + if (!add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin)) { + ret =3D -ENOMEM; + goto free_irqs; + } =20 mp_preconfigure_entry(data); mp_register_handler(virq, data->is_level); @@ -3039,11 +2900,15 @@ int mp_irqdomain_alloc(struct irq_domain *domain, uns= igned int virq, legacy_pic->mask(virq); local_irq_restore(flags); =20 - apic_printk(APIC_VERBOSE, KERN_DEBUG - "IOAPIC[%d]: Preconfigured routing entry (%d-%d -> IRQ %d Level:%i Act= iveLow:%i)\n", - ioapic, mpc_ioapic_id(ioapic), pin, virq, - data->is_level, data->active_low); + apic_pr_verbose("IOAPIC[%d]: Preconfigured routing entry (%d-%d -> IRQ %d L= evel:%i ActiveLow:%i)\n", + ioapic, mpc_ioapic_id(ioapic), pin, virq, data->is_level, data->active_lo= w); return 0; + +free_irqs: + irq_domain_free_irqs_parent(domain, virq, nr_irqs); +free_data: + kfree(data); + return ret; } =20 void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq, @@ -3056,22 +2921,17 @@ void mp_irqdomain_free(struct irq_domain *domain, uns= igned int virq, irq_data =3D irq_domain_get_irq_data(domain, virq); if (irq_data && irq_data->chip_data) { data =3D irq_data->chip_data; - __remove_pin_from_irq(data, mp_irqdomain_ioapic_idx(domain), - (int)irq_data->hwirq); + __remove_pin_from_irq(data, mp_irqdomain_ioapic_idx(domain), (int)irq_data= ->hwirq); WARN_ON(!list_empty(&data->irq_2_pin)); kfree(irq_data->chip_data); } irq_domain_free_irqs_top(domain, virq, nr_irqs); } =20 -int mp_irqdomain_activate(struct irq_domain *domain, - struct irq_data *irq_data, bool reserve) +int mp_irqdomain_activate(struct irq_domain *domain, struct irq_data *irq_da= ta, bool reserve) { - unsigned long flags; - - raw_spin_lock_irqsave(&ioapic_lock, flags); + guard(raw_spinlock_irqsave)(&ioapic_lock); ioapic_configure_entry(irq_data); - raw_spin_unlock_irqrestore(&ioapic_lock, flags); return 0; } =20 @@ -3079,8 +2939,7 @@ void mp_irqdomain_deactivate(struct irq_domain *domain, struct irq_data *irq_data) { /* It won't be called for IRQ with multiple IOAPIC pins associated */ - ioapic_mask_entry(mp_irqdomain_ioapic_idx(domain), - (int)irq_data->hwirq); + ioapic_mask_entry(mp_irqdomain_ioapic_idx(domain), (int)irq_data->hwirq); } =20 int mp_irqdomain_ioapic_idx(struct irq_domain *domain) diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index e89171b0347a..4a1b1b28abf9 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -68,7 +68,7 @@ static void __init mpc_oem_bus_info(struct mpc_bus *m, char= *str) { memcpy(str, m->bustype, 6); str[6] =3D 0; - apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->busid, str); + apic_pr_verbose("Bus #%d is %s\n", m->busid, str); } =20 static void __init MP_bus_info(struct mpc_bus *m) @@ -417,7 +417,7 @@ static unsigned long __init get_mpc_size(unsigned long ph= ysptr) mpc =3D early_memremap(physptr, PAGE_SIZE); size =3D mpc->length; early_memunmap(mpc, PAGE_SIZE); - apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size); + apic_pr_verbose(" mpc: %lx-%lx\n", physptr, physptr + size); =20 return size; } @@ -560,8 +560,7 @@ static int __init smp_scan_config(unsigned long base, uns= igned long length) struct mpf_intel *mpf; int ret =3D 0; =20 - apic_printk(APIC_VERBOSE, "Scan for SMP in [mem %#010lx-%#010lx]\n", - base, base + length - 1); + apic_pr_verbose("Scan for SMP in [mem %#010lx-%#010lx]\n", base, base + len= gth - 1); BUILD_BUG_ON(sizeof(*mpf) !=3D 16); =20 while (length > 0) { @@ -683,13 +682,13 @@ static void __init check_irq_src(struct mpc_intsrc *m, = int *nr_m_spare) { int i; =20 - apic_printk(APIC_VERBOSE, "OLD "); + apic_pr_verbose("OLD "); print_mp_irq_info(m); =20 i =3D get_MP_intsrc_index(m); if (i > 0) { memcpy(m, &mp_irqs[i], sizeof(*m)); - apic_printk(APIC_VERBOSE, "NEW "); + apic_pr_verbose("NEW "); print_mp_irq_info(&mp_irqs[i]); return; } @@ -772,7 +771,7 @@ static int __init replace_intsrc_all(struct mpc_table *m= pc, continue; =20 if (nr_m_spare > 0) { - apic_printk(APIC_VERBOSE, "*NEW* found\n"); + apic_pr_verbose("*NEW* found\n"); nr_m_spare--; memcpy(m_spare[nr_m_spare], &mp_irqs[i], sizeof(mp_irqs[i])); m_spare[nr_m_spare] =3D NULL; diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_re= mapping.c index e090ca07364b..7a6d188e3bea 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -1352,12 +1352,11 @@ static void intel_irq_remapping_prepare_irte(struct i= ntel_ir_data *data, case X86_IRQ_ALLOC_TYPE_IOAPIC: /* Set source-id of interrupt request */ set_ioapic_sid(irte, info->devid); - apic_printk(APIC_VERBOSE, KERN_DEBUG "IOAPIC[%d]: Set IRTE entry (P:%d FPD= :%d Dst_Mode:%d Redir_hint:%d Trig_Mode:%d Dlvry_Mode:%X Avail:%X Vector:%02X= Dest:%08X SID:%04X SQ:%X SVT:%X)\n", - info->devid, irte->present, irte->fpd, - irte->dst_mode, irte->redir_hint, - irte->trigger_mode, irte->dlvry_mode, - irte->avail, irte->vector, irte->dest_id, - irte->sid, irte->sq, irte->svt); + apic_pr_verbose("IOAPIC[%d]: Set IRTE entry (P:%d FPD:%d Dst_Mode:%d Redir= _hint:%d Trig_Mode:%d Dlvry_Mode:%X Avail:%X Vector:%02X Dest:%08X SID:%04X S= Q:%X SVT:%X)\n", + info->devid, irte->present, irte->fpd, irte->dst_mode, + irte->redir_hint, irte->trigger_mode, irte->dlvry_mode, + irte->avail, irte->vector, irte->dest_id, irte->sid, + irte->sq, irte->svt); sub_handle =3D info->ioapic.pin; break; case X86_IRQ_ALLOC_TYPE_HPET: . Date: Tue, 17 Sep 2024 10:54:14 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] x86/misc for v6.12-rc1 Linus, please pull the latest x86/misc branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-misc-2024-09= -17 up to: 4460e8538ef1: MAINTAINERS: Add selftests/x86 entry Miscellaneous updates for x86: - Rework kcpuid to handle the the autogenerated CSV file correctly and update the CSV file to cover the whole zoo of CPUID. - Avoid memcpy() for ia32 syscall_get_arguments() and use direct assignments as fortified memcpy() is unhappy about writing/reading beyond the end of the addresses destination/source struct member - A few new PCI IDs for AMD - Update MAINTAINERS to cover x86 specific selftests Thanks, tglx ------------------> Ahmed S. Darwish (9): tools/x86/kcpuid: Remove unused variable tools/x86/kcpuid: Properly align long-description columns tools/x86/kcpuid: Set max possible subleaves count to 64 tools/x86/kcpuid: Protect against faulty "max subleaf" values tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace tools/x86/kcpuid: Recognize all leaves with subleaves tools/x86/kcpuid: Parse subleaf ranges if provided tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file MAINTAINERS: Add x86 cpuid database entry Kees Cook (1): x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments() Muhammad Usama Anjum (1): MAINTAINERS: Add selftests/x86 entry Richard Gong (1): x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h-70h Shyam Sundar S K (1): x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h MAINTAINERS | 11 + arch/x86/include/asm/syscall.h | 7 +- arch/x86/kernel/amd_nb.c | 7 + drivers/hwmon/k10temp.c | 1 + include/linux/pci_ids.h | 1 + tools/arch/x86/kcpuid/cpuid.csv | 1430 +++++++++++++++++++++++++++----------= -- tools/arch/x86/kcpuid/kcpuid.c | 109 +-- 7 files changed, 1100 insertions(+), 466 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 42decde38320..7715a806c255 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24772,6 +24772,17 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git= /tip/tip.git x86/core F: Documentation/arch/x86/ F: Documentation/devicetree/bindings/x86/ F: arch/x86/ +F: tools/testing/selftests/x86 + +X86 CPUID DATABASE +M: Borislav Petkov +M: Thomas Gleixner +M: x86@kernel.org +R: Ahmed S. Darwish +L: x86-cpuid@lists.linux.dev +S: Maintained +W: https://x86-cpuid.org +F: tools/arch/x86/kcpuid/cpuid.csv =20 X86 ENTRY CODE M: Andy Lutomirski diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index 2fc7bc3863ff..7c488ff0c764 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -82,7 +82,12 @@ static inline void syscall_get_arguments(struct task_struc= t *task, struct pt_regs *regs, unsigned long *args) { - memcpy(args, ®s->bx, 6 * sizeof(args[0])); + args[0] =3D regs->bx; + args[1] =3D regs->cx; + args[2] =3D regs->dx; + args[3] =3D regs->si; + args[4] =3D regs->di; + args[5] =3D regs->bp; } =20 static inline int syscall_get_arch(struct task_struct *task) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 059e5c16af05..dc5d3216af24 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -26,6 +26,7 @@ #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 #define PCI_DEVICE_ID_AMD_1AH_M00H_ROOT 0x153a #define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507 +#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122 #define PCI_DEVICE_ID_AMD_MI200_ROOT 0x14bb #define PCI_DEVICE_ID_AMD_MI300_ROOT 0x14f8 =20 @@ -43,6 +44,8 @@ #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4 0x12c4 +#define PCI_DEVICE_ID_AMD_1AH_M60H_DF_F4 0x124c +#define PCI_DEVICE_ID_AMD_1AH_M70H_DF_F4 0x12bc #define PCI_DEVICE_ID_AMD_MI200_DF_F4 0x14d4 #define PCI_DEVICE_ID_AMD_MI300_DF_F4 0x152c =20 @@ -63,6 +66,7 @@ static const struct pci_device_id amd_root_ids[] =3D { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI300_ROOT) }, {} @@ -95,6 +99,7 @@ static const struct pci_device_id amd_nb_misc_ids[] =3D { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI300_DF_F3) }, @@ -122,6 +127,8 @@ static const struct pci_device_id amd_nb_link_ids[] =3D { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_DF_F4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI300_DF_F4) }, {} diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 543526bac042..f96b91e43312 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -548,6 +548,7 @@ static const struct pci_device_id k10temp_id_table[] =3D { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M60H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e388c8b1cbc2..91182aa1d2ec 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -580,6 +580,7 @@ #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3 #define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb +#define PCI_DEVICE_ID_AMD_1AH_M60H_DF_F3 0x124b #define PCI_DEVICE_ID_AMD_1AH_M70H_DF_F3 0x12bb #define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3 #define PCI_DEVICE_ID_AMD_MI300_DF_F3 0x152b diff --git a/tools/arch/x86/kcpuid/cpuid.csv b/tools/arch/x86/kcpuid/cpuid.csv index e0c25b75327e..d751eb8585d0 100644 --- a/tools/arch/x86/kcpuid/cpuid.csv +++ b/tools/arch/x86/kcpuid/cpuid.csv @@ -1,451 +1,1053 @@ -# The basic row format is: -# LEAF, SUBLEAF, register_name, bits, short_name, long_description - -# Leaf 00H - 0, 0, EAX, 31:0, max_basic_leafs, Max input value for support= ed subleafs - -# Leaf 01H - 1, 0, EAX, 3:0, stepping, Stepping ID - 1, 0, EAX, 7:4, model, Model - 1, 0, EAX, 11:8, family, Family ID - 1, 0, EAX, 13:12, processor, Processor Type - 1, 0, EAX, 19:16, model_ext, Extended Model ID - 1, 0, EAX, 27:20, family_ext, Extended Family ID - - 1, 0, EBX, 7:0, brand, Brand Index - 1, 0, EBX, 15:8, clflush_size, CLFLUSH line size (value * 8) = in bytes - 1, 0, EBX, 23:16, max_cpu_id, Maxim number of addressable logi= c cpu in this package - 1, 0, EBX, 31:24, apic_id, Initial APIC ID - - 1, 0, ECX, 0, sse3, Streaming SIMD Extensions 3(SSE3) - 1, 0, ECX, 1, pclmulqdq, PCLMULQDQ instruction supported - 1, 0, ECX, 2, dtes64, DS area uses 64-bit layout - 1, 0, ECX, 3, mwait, MONITOR/MWAIT supported - 1, 0, ECX, 4, ds_cpl, CPL Qualified Debug Store which allo= ws for branch message storage qualified by CPL - 1, 0, ECX, 5, vmx, Virtual Machine Extensions supported - 1, 0, ECX, 6, smx, Safer Mode Extension supported - 1, 0, ECX, 7, eist, Enhanced Intel SpeedStep Technology - 1, 0, ECX, 8, tm2, Thermal Monitor 2 - 1, 0, ECX, 9, ssse3, Supplemental Streaming SIMD Extension= s 3 (SSSE3) - 1, 0, ECX, 10, l1_ctx_id, L1 data cache could be set to eit= her adaptive mode or shared mode (check IA32_MISC_ENABLE bit 24 definition) - 1, 0, ECX, 11, sdbg, IA32_DEBUG_INTERFACE MSR for silicon d= ebug supported - 1, 0, ECX, 12, fma, FMA extensions using YMM state supported - 1, 0, ECX, 13, cmpxchg16b, 'CMPXCHG16B - Compare and Exchan= ge Bytes' supported - 1, 0, ECX, 14, xtpr_update, xTPR Update Control supported - 1, 0, ECX, 15, pdcm, Perfmon and Debug Capability present - 1, 0, ECX, 17, pcid, Process-Context Identifiers feature pr= esent - 1, 0, ECX, 18, dca, Prefetching data from a memory mapped d= evice supported - 1, 0, ECX, 19, sse4_1, SSE4.1 feature present - 1, 0, ECX, 20, sse4_2, SSE4.2 feature present - 1, 0, ECX, 21, x2apic, x2APIC supported - 1, 0, ECX, 22, movbe, MOVBE instruction supported - 1, 0, ECX, 23, popcnt, POPCNT instruction supported - 1, 0, ECX, 24, tsc_deadline_timer, LAPIC supports one-shot = operation using a TSC deadline value - 1, 0, ECX, 25, aesni, AESNI instruction supported - 1, 0, ECX, 26, xsave, XSAVE/XRSTOR processor extended state= s (XSETBV/XGETBV/XCR0) - 1, 0, ECX, 27, osxsave, OS has set CR4.OSXSAVE bit to enabl= e XSETBV/XGETBV/XCR0 - 1, 0, ECX, 28, avx, AVX instruction supported - 1, 0, ECX, 29, f16c, 16-bit floating-point conversion instr= uction supported - 1, 0, ECX, 30, rdrand, RDRAND instruction supported - - 1, 0, EDX, 0, fpu, x87 FPU on chip - 1, 0, EDX, 1, vme, Virtual-8086 Mode Enhancement - 1, 0, EDX, 2, de, Debugging Extensions - 1, 0, EDX, 3, pse, Page Size Extensions - 1, 0, EDX, 4, tsc, Time Stamp Counter - 1, 0, EDX, 5, msr, RDMSR and WRMSR Support - 1, 0, EDX, 6, pae, Physical Address Extensions - 1, 0, EDX, 7, mce, Machine Check Exception - 1, 0, EDX, 8, cx8, CMPXCHG8B instr - 1, 0, EDX, 9, apic, APIC on Chip - 1, 0, EDX, 11, sep, SYSENTER and SYSEXIT instrs - 1, 0, EDX, 12, mtrr, Memory Type Range Registers - 1, 0, EDX, 13, pge, Page Global Bit - 1, 0, EDX, 14, mca, Machine Check Architecture - 1, 0, EDX, 15, cmov, Conditional Move Instrs - 1, 0, EDX, 16, pat, Page Attribute Table - 1, 0, EDX, 17, pse36, 36-Bit Page Size Extension - 1, 0, EDX, 18, psn, Processor Serial Number - 1, 0, EDX, 19, clflush, CLFLUSH instr -# 1, 0, EDX, 20, - 1, 0, EDX, 21, ds, Debug Store - 1, 0, EDX, 22, acpi, Thermal Monitor and Software Controlle= d Clock Facilities - 1, 0, EDX, 23, mmx, Intel MMX Technology - 1, 0, EDX, 24, fxsr, XSAVE and FXRSTOR Instrs - 1, 0, EDX, 25, sse, SSE - 1, 0, EDX, 26, sse2, SSE2 - 1, 0, EDX, 27, ss, Self Snoop - 1, 0, EDX, 28, hit, Max APIC IDs - 1, 0, EDX, 29, tm, Thermal Monitor -# 1, 0, EDX, 30, - 1, 0, EDX, 31, pbe, Pending Break Enable - -# Leaf 02H -# cache and TLB descriptor info - -# Leaf 03H -# Precessor Serial Number, introduced on Pentium III, not valid for -# latest models - -# Leaf 04H -# thread/core and cache topology - 4, 0, EAX, 4:0, cache_type, Cache type like instr/data or un= ified - 4, 0, EAX, 7:5, cache_level, Cache Level (starts at 1) - 4, 0, EAX, 8, cache_self_init, Cache Self Initialization - 4, 0, EAX, 9, fully_associate, Fully Associative cache -# 4, 0, EAX, 13:10, resvd, resvd - 4, 0, EAX, 25:14, max_logical_id, Max number of addressable ID= s for logical processors sharing the cache - 4, 0, EAX, 31:26, max_phy_id, Max number of addressable IDs fo= r processors in phy package - - 4, 0, EBX, 11:0, cache_linesize, Size of a cache line in bytes - 4, 0, EBX, 21:12, cache_partition, Physical Line partitions - 4, 0, EBX, 31:22, cache_ways, Ways of associativity - 4, 0, ECX, 31:0, cache_sets, Number of Sets - 1 - 4, 0, EDX, 0, c_wbinvd, 1 means WBINVD/INVD is not ganrant= eed to act upon lower level caches of non-originating threads sharing this ca= che - 4, 0, EDX, 1, c_incl, Whether cache is inclusive of lower = cache level - 4, 0, EDX, 2, c_comp_index, Complex Cache Indexing - -# Leaf 05H -# MONITOR/MWAIT - 5, 0, EAX, 15:0, min_mon_size, Smallest monitor line size in bytes - 5, 0, EBX, 15:0, max_mon_size, Largest monitor line size in bytes - 5, 0, ECX, 0, mwait_ext, Enum of Monitor-Mwait extensions support= ed - 5, 0, ECX, 1, mwait_irq_break, Largest monitor line size in bytes - 5, 0, EDX, 3:0, c0_sub_stats, Number of C0* sub C-states supported = using MWAIT - 5, 0, EDX, 7:4, c1_sub_stats, Number of C1* sub C-states supported = using MWAIT - 5, 0, EDX, 11:8, c2_sub_stats, Number of C2* sub C-states supported = using MWAIT - 5, 0, EDX, 15:12, c3_sub_stats, Number of C3* sub C-states supported = using MWAIT - 5, 0, EDX, 19:16, c4_sub_stats, Number of C4* sub C-states supported = using MWAIT - 5, 0, EDX, 23:20, c5_sub_stats, Number of C5* sub C-states supported = using MWAIT - 5, 0, EDX, 27:24, c6_sub_stats, Number of C6* sub C-states supported = using MWAIT - 5, 0, EDX, 31:28, c7_sub_stats, Number of C7* sub C-states supported = using MWAIT - -# Leaf 06H -# Thermal & Power Management - - 6, 0, EAX, 0, dig_temp, Digital temperature sensor supported - 6, 0, EAX, 1, turbo, Intel Turbo Boost - 6, 0, EAX, 2, arat, Always running APIC timer -# 6, 0, EAX, 3, resv, Reserved - 6, 0, EAX, 4, pln, Power limit notifications supported - 6, 0, EAX, 5, ecmd, Clock modulation duty cycle extension support= ed - 6, 0, EAX, 6, ptm, Package thermal management supported - 6, 0, EAX, 7, hwp, HWP base register - 6, 0, EAX, 8, hwp_notify, HWP notification - 6, 0, EAX, 9, hwp_act_window, HWP activity window - 6, 0, EAX, 10, hwp_energy, HWP energy performance preference - 6, 0, EAX, 11, hwp_pkg_req, HWP package level request -# 6, 0, EAX, 12, resv, Reserved - 6, 0, EAX, 13, hdc, HDC base registers supported - 6, 0, EAX, 14, turbo3, Turbo Boost Max 3.0 - 6, 0, EAX, 15, hwp_cap, Highest Performance change supported - 6, 0, EAX, 16, hwp_peci, HWP PECI override is supported - 6, 0, EAX, 17, hwp_flex, Flexible HWP is supported - 6, 0, EAX, 18, hwp_fast, Fast access mode for the IA32_HWP_REQUEST= MSR is supported -# 6, 0, EAX, 19, resv, Reserved - 6, 0, EAX, 20, hwp_ignr, Ignoring Idle Logical Processor HWP reque= st is supported - - 6, 0, EBX, 3:0, therm_irq_thresh, Number of Interrupt Thresholds in= Digital Thermal Sensor - 6, 0, ECX, 0, aperfmperf, Presence of IA32_MPERF and IA32_APERF - 6, 0, ECX, 3, energ_bias, Performance-energy bias preference supp= orted - -# Leaf 07H -# ECX =3D=3D 0 -# AVX512 refers to https://en.wikipedia.org/wiki/AVX-512 -# XXX: Do we really need to enumerate each and every AVX512 sub features - - 7, 0, EBX, 0, fsgsbase, RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE suppo= rted - 7, 0, EBX, 1, tsc_adjust, TSC_ADJUST MSR supported - 7, 0, EBX, 2, sgx, Software Guard Extensions - 7, 0, EBX, 3, bmi1, BMI1 - 7, 0, EBX, 4, hle, Hardware Lock Elision - 7, 0, EBX, 5, avx2, AVX2 -# 7, 0, EBX, 6, fdp_excp_only, x87 FPU Data Pointer updated only o= n x87 exceptions - 7, 0, EBX, 7, smep, Supervisor-Mode Execution Prevention - 7, 0, EBX, 8, bmi2, BMI2 - 7, 0, EBX, 9, rep_movsb, Enhanced REP MOVSB/STOSB - 7, 0, EBX, 10, invpcid, INVPCID instruction - 7, 0, EBX, 11, rtm, Restricted Transactional Memory - 7, 0, EBX, 12, rdt_m, Intel RDT Monitoring capability - 7, 0, EBX, 13, depc_fpu_cs_ds, Deprecates FPU CS and FPU DS - 7, 0, EBX, 14, mpx, Memory Protection Extensions - 7, 0, EBX, 15, rdt_a, Intel RDT Allocation capability - 7, 0, EBX, 16, avx512f, AVX512 Foundation instr - 7, 0, EBX, 17, avx512dq, AVX512 Double and Quadword AVX512 instr - 7, 0, EBX, 18, rdseed, RDSEED instr - 7, 0, EBX, 19, adx, ADX instr - 7, 0, EBX, 20, smap, Supervisor Mode Access Prevention - 7, 0, EBX, 21, avx512ifma, AVX512 Integer Fused Multiply Add -# 7, 0, EBX, 22, resvd, resvd - 7, 0, EBX, 23, clflushopt, CLFLUSHOPT instr - 7, 0, EBX, 24, clwb, CLWB instr - 7, 0, EBX, 25, intel_pt, Intel Processor Trace instr - 7, 0, EBX, 26, avx512pf, Prefetch - 7, 0, EBX, 27, avx512er, AVX512 Exponent Reciproca instr - 7, 0, EBX, 28, avx512cd, AVX512 Conflict Detection instr - 7, 0, EBX, 29, sha, Intel Secure Hash Algorithm Extensions instr - 7, 0, EBX, 30, avx512bw, AVX512 Byte & Word instr - 7, 0, EBX, 31, avx512vl, AVX512 Vector Length Extentions (VL) - 7, 0, ECX, 0, prefetchwt1, X - 7, 0, ECX, 1, avx512vbmi, AVX512 Vector Byte Manipulation Instruc= tions - 7, 0, ECX, 2, umip, User-mode Instruction Prevention - - 7, 0, ECX, 3, pku, Protection Keys for User-mode pages - 7, 0, ECX, 4, ospke, CR4 PKE set to enable protection keys -# 7, 0, ECX, 16:5, resvd, resvd - 7, 0, ECX, 21:17, mawau, The value of MAWAU used by the BNDLDX and BN= DSTX instructions in 64-bit mode - 7, 0, ECX, 22, rdpid, RDPID and IA32_TSC_AUX -# 7, 0, ECX, 29:23, resvd, resvd - 7, 0, ECX, 30, sgx_lc, SGX Launch Configuration -# 7, 0, ECX, 31, resvd, resvd - -# Leaf 08H -# - - -# Leaf 09H -# Direct Cache Access (DCA) information - 9, 0, ECX, 31:0, dca_cap, The value of IA32_PLATFORM_DCA_CAP +# SPDX-License-Identifier: CC0-1.0 +# Generator: x86-cpuid-db v1.0 =20 -# Leaf 0AH -# Architectural Performance Monitoring # -# Do we really need to print out the PMU related stuff? -# Does normal user really care about it? +# Auto-generated file. +# Please submit all updates and bugfixes to https://x86-cpuid.org # - 0xA, 0, EAX, 7:0, pmu_ver, Performance Monitoring Unit version - 0xA, 0, EAX, 15:8, pmu_gp_cnt_num, Numer of general-purose PMU = counters per logical CPU - 0xA, 0, EAX, 23:16, pmu_cnt_bits, Bit wideth of PMU counter - 0xA, 0, EAX, 31:24, pmu_ebx_bits, Length of EBX bit vector to en= umerate PMU events - - 0xA, 0, EBX, 0, pmu_no_core_cycle_evt, Core cycle event not = available - 0xA, 0, EBX, 1, pmu_no_instr_ret_evt, Instruction retired ev= ent not available - 0xA, 0, EBX, 2, pmu_no_ref_cycle_evt, Reference cycles event= not available - 0xA, 0, EBX, 3, pmu_no_llc_ref_evt, Last-level cache referen= ce event not available - 0xA, 0, EBX, 4, pmu_no_llc_mis_evt, Last-level cache misses = event not available - 0xA, 0, EBX, 5, pmu_no_br_instr_ret_evt, Branch instruction = retired event not available - 0xA, 0, EBX, 6, pmu_no_br_mispredict_evt, Branch mispredict = retired event not available - - 0xA, 0, ECX, 4:0, pmu_fixed_cnt_num, Performance Monitoring Un= it version - 0xA, 0, ECX, 12:5, pmu_fixed_cnt_bits, Numer of PMU counters pe= r logical CPU - -# Leaf 0BH -# Extended Topology Enumeration Leaf -# - - 0xB, 0, EAX, 4:0, id_shift, Number of bits to shift right on x= 2APIC ID to get a unique topology ID of the next level type - 0xB, 0, EBX, 15:0, cpu_nr, Number of logical processors at this= level type - 0xB, 0, ECX, 15:8, lvl_type, 0-Invalid 1-SMT 2-Core - 0xB, 0, EDX, 31:0, x2apic_id, x2APIC ID the current logical pro= cessor - - -# Leaf 0DH -# Processor Extended State =20 - 0xD, 0, EAX, 0, x87, X87 state - 0xD, 0, EAX, 1, sse, SSE state - 0xD, 0, EAX, 2, avx, AVX state - 0xD, 0, EAX, 4:3, mpx, MPX state - 0xD, 0, EAX, 7:5, avx512, AVX-512 state - 0xD, 0, EAX, 9, pkru, PKRU state - - 0xD, 0, EBX, 31:0, max_sz_xcr0, Maximum size (bytes) required b= y enabled features in XCR0 - 0xD, 0, ECX, 31:0, max_sz_xsave, Maximum size (bytes) of the XS= AVE/XRSTOR save area - - 0xD, 1, EAX, 0, xsaveopt, XSAVEOPT available - 0xD, 1, EAX, 1, xsavec, XSAVEC and compacted form supported - 0xD, 1, EAX, 2, xgetbv, XGETBV supported - 0xD, 1, EAX, 3, xsaves, XSAVES/XRSTORS and IA32_XSS supported - - 0xD, 1, EBX, 31:0, max_sz_xcr0, Maximum size (bytes) required b= y enabled features in XCR0 - 0xD, 1, ECX, 8, pt, PT state - 0xD, 1, ECX, 11, cet_usr, CET user state - 0xD, 1, ECX, 12, cet_supv, CET supervisor state - 0xD, 1, ECX, 13, hdc, HDC state - 0xD, 1, ECX, 16, hwp, HWP state - -# Leaf 0FH -# Intel RDT Monitoring - - 0xF, 0, EBX, 31:0, rmid_range, Maximum range (zero-based) of RM= ID within this physical processor of all types - 0xF, 0, EDX, 1, l3c_rdt_mon, L3 Cache RDT Monitoring support= ed - - 0xF, 1, ECX, 31:0, rmid_range, Maximum range (zero-based) of RM= ID of this types - 0xF, 1, EDX, 0, l3c_ocp_mon, L3 Cache occupancy Monitoring s= upported - 0xF, 1, EDX, 1, l3c_tbw_mon, L3 Cache Total Bandwidth Monito= ring supported - 0xF, 1, EDX, 2, l3c_lbw_mon, L3 Cache Local Bandwidth Monito= ring supported +# The basic row format is: +# LEAF, SUBLEAVES, reg, bits, short_name , long_descr= iption + +# Leaf 0H +# Maximum standard leaf number + CPU vendor string + + 0, 0, eax, 31:0, max_std_leaf , Highest cp= uid standard leaf supported + 0, 0, ebx, 31:0, cpu_vendorid_0 , CPU vendor= ID string bytes 0 - 3 + 0, 0, ecx, 31:0, cpu_vendorid_2 , CPU vendor= ID string bytes 8 - 11 + 0, 0, edx, 31:0, cpu_vendorid_1 , CPU vendor= ID string bytes 4 - 7 + +# Leaf 1H +# CPU FMS (Family/Model/Stepping) + standard feature flags + + 1, 0, eax, 3:0, stepping , Stepping ID + 1, 0, eax, 7:4, base_model , Base CPU m= odel ID + 1, 0, eax, 11:8, base_family_id , Base CPU f= amily ID + 1, 0, eax, 13:12, cpu_type , CPU type + 1, 0, eax, 19:16, ext_model , Extended C= PU model ID + 1, 0, eax, 27:20, ext_family , Extended C= PU family ID + 1, 0, ebx, 7:0, brand_id , Brand index + 1, 0, ebx, 15:8, clflush_size , CLFLUSH in= struction cache line size + 1, 0, ebx, 23:16, n_logical_cpu , Logical CP= U (HW threads) count + 1, 0, ebx, 31:24, local_apic_id , Initial lo= cal APIC physical ID + 1, 0, ecx, 0, pni , Streaming = SIMD Extensions 3 (SSE3) + 1, 0, ecx, 1, pclmulqdq , PCLMULQDQ = instruction support + 1, 0, ecx, 2, dtes64 , 64-bit DS = save area + 1, 0, ecx, 3, monitor , MONITOR/MW= AIT support + 1, 0, ecx, 4, ds_cpl , CPL Qualif= ied Debug Store + 1, 0, ecx, 5, vmx , Virtual Ma= chine Extensions + 1, 0, ecx, 6, smx , Safer Mode= Extensions + 1, 0, ecx, 7, est , Enhanced I= ntel SpeedStep + 1, 0, ecx, 8, tm2 , Thermal Mo= nitor 2 + 1, 0, ecx, 9, ssse3 , Supplement= al SSE3 + 1, 0, ecx, 10, cid , L1 Context= ID + 1, 0, ecx, 11, sdbg , Sillicon D= ebug + 1, 0, ecx, 12, fma , FMA extens= ions using YMM state + 1, 0, ecx, 13, cx16 , CMPXCHG16B= instruction support + 1, 0, ecx, 14, xtpr , xTPR Updat= e Control + 1, 0, ecx, 15, pdcm , Perfmon an= d Debug Capability + 1, 0, ecx, 17, pcid , Process-co= ntext identifiers + 1, 0, ecx, 18, dca , Direct Cac= he Access + 1, 0, ecx, 19, sse4_1 , SSE4.1 + 1, 0, ecx, 20, sse4_2 , SSE4.2 + 1, 0, ecx, 21, x2apic , X2APIC sup= port + 1, 0, ecx, 22, movbe , MOVBE inst= ruction support + 1, 0, ecx, 23, popcnt , POPCNT ins= truction support + 1, 0, ecx, 24, tsc_deadline_timer , APIC timer= one-shot operation + 1, 0, ecx, 25, aes , AES instru= ctions + 1, 0, ecx, 26, xsave , XSAVE (and= related instructions) support + 1, 0, ecx, 27, osxsave , XSAVE (and= related instructions) are enabled by OS + 1, 0, ecx, 28, avx , AVX instru= ctions support + 1, 0, ecx, 29, f16c , Half-preci= sion floating-point conversion support + 1, 0, ecx, 30, rdrand , RDRAND ins= truction support + 1, 0, ecx, 31, guest_status , System is = running as guest; (para-)virtualized system + 1, 0, edx, 0, fpu , Floating-P= oint Unit on-chip (x87) + 1, 0, edx, 1, vme , Virtual-80= 86 Mode Extensions + 1, 0, edx, 2, de , Debugging = Extensions + 1, 0, edx, 3, pse , Page Size = Extension + 1, 0, edx, 4, tsc , Time Stamp= Counter + 1, 0, edx, 5, msr , Model-Spec= ific Registers (RDMSR and WRMSR support) + 1, 0, edx, 6, pae , Physical A= ddress Extensions + 1, 0, edx, 7, mce , Machine Ch= eck Exception + 1, 0, edx, 8, cx8 , CMPXCHG8B = instruction + 1, 0, edx, 9, apic , APIC on-ch= ip + 1, 0, edx, 11, sep , SYSENTER, = SYSEXIT, and associated MSRs + 1, 0, edx, 12, mtrr , Memory Typ= e Range Registers + 1, 0, edx, 13, pge , Page Globa= l Extensions + 1, 0, edx, 14, mca , Machine Ch= eck Architecture + 1, 0, edx, 15, cmov , Conditiona= l Move Instruction + 1, 0, edx, 16, pat , Page Attri= bute Table + 1, 0, edx, 17, pse36 , Page Size = Extension (36-bit) + 1, 0, edx, 18, pn , Processor = Serial Number + 1, 0, edx, 19, clflush , CLFLUSH in= struction + 1, 0, edx, 21, dts , Debug Store + 1, 0, edx, 22, acpi , Thermal mo= nitor and clock control + 1, 0, edx, 23, mmx , MMX instru= ctions + 1, 0, edx, 24, fxsr , FXSAVE and= FXRSTOR instructions + 1, 0, edx, 25, sse , SSE instru= ctions + 1, 0, edx, 26, sse2 , SSE2 instr= uctions + 1, 0, edx, 27, ss , Self Snoop + 1, 0, edx, 28, ht , Hyper-thre= ading + 1, 0, edx, 29, tm , Thermal Mo= nitor + 1, 0, edx, 30, ia64 , Legacy IA-= 64 (Itanium) support bit, now resreved + 1, 0, edx, 31, pbe , Pending Br= eak Enable + +# Leaf 2H +# Intel cache and TLB information one-byte descriptors + + 2, 0, eax, 7:0, iteration_count , Number of = times this CPUD leaf must be queried + 2, 0, eax, 15:8, desc1 , Descriptor= #1 + 2, 0, eax, 23:16, desc2 , Descriptor= #2 + 2, 0, eax, 30:24, desc3 , Descriptor= #3 + 2, 0, eax, 31, eax_invalid , Descriptor= s 1-3 are invalid if set + 2, 0, ebx, 7:0, desc4 , Descriptor= #4 + 2, 0, ebx, 15:8, desc5 , Descriptor= #5 + 2, 0, ebx, 23:16, desc6 , Descriptor= #6 + 2, 0, ebx, 30:24, desc7 , Descriptor= #7 + 2, 0, ebx, 31, ebx_invalid , Descriptor= s 4-7 are invalid if set + 2, 0, ecx, 7:0, desc8 , Descriptor= #8 + 2, 0, ecx, 15:8, desc9 , Descriptor= #9 + 2, 0, ecx, 23:16, desc10 , Descriptor= #10 + 2, 0, ecx, 30:24, desc11 , Descriptor= #11 + 2, 0, ecx, 31, ecx_invalid , Descriptor= s 8-11 are invalid if set + 2, 0, edx, 7:0, desc12 , Descriptor= #12 + 2, 0, edx, 15:8, desc13 , Descriptor= #13 + 2, 0, edx, 23:16, desc14 , Descriptor= #14 + 2, 0, edx, 30:24, desc15 , Descriptor= #15 + 2, 0, edx, 31, edx_invalid , Descriptor= s 12-15 are invalid if set + +# Leaf 4H +# Intel deterministic cache parameters + + 4, 31:0, eax, 4:0, cache_type , Cache type= field + 4, 31:0, eax, 7:5, cache_level , Cache leve= l (1-based) + 4, 31:0, eax, 8, cache_self_init , Self-initi= alializing cache level + 4, 31:0, eax, 9, fully_associative , Fully-asso= ciative cache + 4, 31:0, eax, 25:14, num_threads_sharing , Number log= ical CPUs sharing this cache + 4, 31:0, eax, 31:26, num_cores_on_die , Number of = cores in the physical package + 4, 31:0, ebx, 11:0, cache_linesize , System coh= erency line size (0-based) + 4, 31:0, ebx, 21:12, cache_npartitions , Physical l= ine partitions (0-based) + 4, 31:0, ebx, 31:22, cache_nways , Ways of as= sociativity (0-based) + 4, 31:0, ecx, 30:0, cache_nsets , Cache numb= er of sets (0-based) + 4, 31:0, edx, 0, wbinvd_rll_no_guarantee, WBINVD/INV= D not guaranteed for Remote Lower-Level caches + 4, 31:0, edx, 1, ll_inclusive , Cache is i= nclusive of Lower-Level caches + 4, 31:0, edx, 2, complex_indexing , Not a dire= ct-mapped cache (complex function) + +# Leaf 5H +# MONITOR/MWAIT instructions enumeration + + 5, 0, eax, 15:0, min_mon_size , Smallest m= onitor-line size, in bytes + 5, 0, ebx, 15:0, max_mon_size , Largest mo= nitor-line size, in bytes + 5, 0, ecx, 0, mwait_ext , Enumeratio= n of MONITOR/MWAIT extensions is supported + 5, 0, ecx, 1, mwait_irq_break , Interrupts= as a break-event for MWAIT is supported + 5, 0, edx, 3:0, n_c0_substates , Number of = C0 sub C-states supported using MWAIT + 5, 0, edx, 7:4, n_c1_substates , Number of = C1 sub C-states supported using MWAIT + 5, 0, edx, 11:8, n_c2_substates , Number of = C2 sub C-states supported using MWAIT + 5, 0, edx, 15:12, n_c3_substates , Number of = C3 sub C-states supported using MWAIT + 5, 0, edx, 19:16, n_c4_substates , Number of = C4 sub C-states supported using MWAIT + 5, 0, edx, 23:20, n_c5_substates , Number of = C5 sub C-states supported using MWAIT + 5, 0, edx, 27:24, n_c6_substates , Number of = C6 sub C-states supported using MWAIT + 5, 0, edx, 31:28, n_c7_substates , Number of = C7 sub C-states supported using MWAIT + +# Leaf 6H +# Thermal and Power Management enumeration + + 6, 0, eax, 0, dtherm , Digital te= mprature sensor + 6, 0, eax, 1, turbo_boost , Intel Turb= o Boost + 6, 0, eax, 2, arat , Always-Run= ning APIC Timer (not affected by p-state) + 6, 0, eax, 4, pln , Power Limi= t Notification (PLN) event + 6, 0, eax, 5, ecmd , Clock modu= lation duty cycle extension + 6, 0, eax, 6, pts , Package th= ermal management + 6, 0, eax, 7, hwp , HWP (Hardw= are P-states) base registers are supported + 6, 0, eax, 8, hwp_notify , HWP notifi= cation (IA32_HWP_INTERRUPT MSR) + 6, 0, eax, 9, hwp_act_window , HWP activi= ty window (IA32_HWP_REQUEST[bits 41:32]) supported + 6, 0, eax, 10, hwp_epp , HWP Energy= Performance Preference + 6, 0, eax, 11, hwp_pkg_req , HWP Packag= e Level Request + 6, 0, eax, 13, hdc_base_regs , HDC base r= egisters are supported + 6, 0, eax, 14, turbo_boost_3_0 , Intel Turb= o Boost Max 3.0 + 6, 0, eax, 15, hwp_capabilities , HWP Highes= t Performance change + 6, 0, eax, 16, hwp_peci_override , HWP PECI o= verride + 6, 0, eax, 17, hwp_flexible , Flexible H= WP + 6, 0, eax, 18, hwp_fast , IA32_HWP_R= EQUEST MSR fast access mode + 6, 0, eax, 19, hfi , HW_FEEDBAC= K MSRs supported + 6, 0, eax, 20, hwp_ignore_idle , Ignoring i= dle logical CPU HWP req is supported + 6, 0, eax, 23, thread_director , Intel thre= ad director support + 6, 0, eax, 24, therm_interrupt_bit25 , IA32_THERM= _INTERRUPT MSR bit 25 is supported + 6, 0, ebx, 3:0, n_therm_thresholds , Digital th= ermometer thresholds + 6, 0, ecx, 0, aperfmperf , MPERF/APER= F MSRs (effective frequency interface) + 6, 0, ecx, 3, epb , IA32_ENERG= Y_PERF_BIAS MSR support + 6, 0, ecx, 15:8, thrd_director_nclasses , Number of = classes, Intel thread director + 6, 0, edx, 0, perfcap_reporting , Performanc= e capability reporting + 6, 0, edx, 1, encap_reporting , Energy eff= iciency capability reporting + 6, 0, edx, 11:8, feedback_sz , HW feedbac= k interface struct size, in 4K pages + 6, 0, edx, 31:16, this_lcpu_hwfdbk_idx , This logic= al CPU index @ HW feedback struct, 0-based + +# Leaf 7H +# Extended CPU features enumeration + + 7, 0, eax, 31:0, leaf7_n_subleaves , Number of = cpuid 0x7 subleaves + 7, 0, ebx, 0, fsgsbase , FSBASE/GSB= ASE read/write support + 7, 0, ebx, 1, tsc_adjust , IA32_TSC_A= DJUST MSR supported + 7, 0, ebx, 2, sgx , Intel SGX = (Software Guard Extensions) + 7, 0, ebx, 3, bmi1 , Bit manipu= lation extensions group 1 + 7, 0, ebx, 4, hle , Hardware L= ock Elision + 7, 0, ebx, 5, avx2 , AVX2 instr= uction set + 7, 0, ebx, 6, fdp_excptn_only , FPU Data P= ointer updated only on x87 exceptions + 7, 0, ebx, 7, smep , Supervisor= Mode Execution Protection + 7, 0, ebx, 8, bmi2 , Bit manipu= lation extensions group 2 + 7, 0, ebx, 9, erms , Enhanced R= EP MOVSB/STOSB + 7, 0, ebx, 10, invpcid , INVPCID in= struction (Invalidate Processor Context ID) + 7, 0, ebx, 11, rtm , Intel rest= ricted transactional memory + 7, 0, ebx, 12, cqm , Intel RDT-= CMT / AMD Platform-QoS cache monitoring + 7, 0, ebx, 13, zero_fcs_fds , Deprecated= FPU CS/DS (stored as zero) + 7, 0, ebx, 14, mpx , Intel memo= ry protection extensions + 7, 0, ebx, 15, rdt_a , Intel RDT = / AMD Platform-QoS Enforcemeent + 7, 0, ebx, 16, avx512f , AVX-512 fo= undation instructions + 7, 0, ebx, 17, avx512dq , AVX-512 do= uble/quadword instructions + 7, 0, ebx, 18, rdseed , RDSEED ins= truction + 7, 0, ebx, 19, adx , ADCX/ADOX = instructions + 7, 0, ebx, 20, smap , Supervisor= mode access prevention + 7, 0, ebx, 21, avx512ifma , AVX-512 in= teger fused multiply add + 7, 0, ebx, 23, clflushopt , CLFLUSHOPT= instruction + 7, 0, ebx, 24, clwb , CLWB instr= uction + 7, 0, ebx, 25, intel_pt , Intel proc= essor trace + 7, 0, ebx, 26, avx512pf , AVX-512 pr= efetch instructions + 7, 0, ebx, 27, avx512er , AVX-512 ex= ponent/reciprocal instrs + 7, 0, ebx, 28, avx512cd , AVX-512 co= nflict detection instrs + 7, 0, ebx, 29, sha_ni , SHA/SHA256= instructions + 7, 0, ebx, 30, avx512bw , AVX-512 BW= (byte/word granular) instructions + 7, 0, ebx, 31, avx512vl , AVX-512 VL= (128/256 vector length) extensions + 7, 0, ecx, 0, prefetchwt1 , PREFETCHWT= 1 (Intel Xeon Phi only) + 7, 0, ecx, 1, avx512vbmi , AVX-512 Ve= ctor byte manipulation instrs + 7, 0, ecx, 2, umip , User mode = instruction protection + 7, 0, ecx, 3, pku , Protection= keys for user-space + 7, 0, ecx, 4, ospke , OS protect= ion keys enable + 7, 0, ecx, 5, waitpkg , WAITPKG in= structions + 7, 0, ecx, 6, avx512_vbmi2 , AVX-512 ve= ctor byte manipulation instrs group 2 + 7, 0, ecx, 7, cet_ss , CET shadow= stack features + 7, 0, ecx, 8, gfni , Galois fie= ld new instructions + 7, 0, ecx, 9, vaes , Vector AES= instrs + 7, 0, ecx, 10, vpclmulqdq , VPCLMULQDQ= 256-bit instruction support + 7, 0, ecx, 11, avx512_vnni , Vector neu= ral network instructions + 7, 0, ecx, 12, avx512_bitalg , AVX-512 bi= t count/shiffle + 7, 0, ecx, 13, tme , Intel tota= l memory encryption + 7, 0, ecx, 14, avx512_vpopcntdq , AVX-512: P= OPCNT for vectors of DW/QW + 7, 0, ecx, 16, la57 , 57-bit lin= ear addreses (five-level paging) + 7, 0, ecx, 21:17, mawau_val_lm , BNDLDX/BND= STX MAWAU value in 64-bit mode + 7, 0, ecx, 22, rdpid , RDPID inst= ruction + 7, 0, ecx, 23, key_locker , Intel key = locker support + 7, 0, ecx, 24, bus_lock_detect , OS bus-loc= k detection + 7, 0, ecx, 25, cldemote , CLDEMOTE i= nstruction + 7, 0, ecx, 27, movdiri , MOVDIRI in= struction + 7, 0, ecx, 28, movdir64b , MOVDIR64B = instruction + 7, 0, ecx, 29, enqcmd , Enqueue st= ores supported (ENQCMD{,S}) + 7, 0, ecx, 30, sgx_lc , Intel SGX = launch configuration + 7, 0, ecx, 31, pks , Protection= keys for supervisor-mode pages + 7, 0, edx, 1, sgx_keys , Intel SGX = attestation services + 7, 0, edx, 2, avx512_4vnniw , AVX-512 ne= ural network instructions + 7, 0, edx, 3, avx512_4fmaps , AVX-512 mu= ltiply accumulation single precision + 7, 0, edx, 4, fsrm , Fast short= REP MOV + 7, 0, edx, 5, uintr , CPU suppor= ts user interrupts + 7, 0, edx, 8, avx512_vp2intersect , VP2INTERSE= CT{D,Q} instructions + 7, 0, edx, 9, srdbs_ctrl , SRBDS miti= gation MSR available + 7, 0, edx, 10, md_clear , VERW MD_CL= EAR microcode support + 7, 0, edx, 11, rtm_always_abort , XBEGIN (RT= M transaction) always aborts + 7, 0, edx, 13, tsx_force_abort , MSR TSX_FO= RCE_ABORT, RTM_ABORT bit, supported + 7, 0, edx, 14, serialize , SERIALIZE = instruction + 7, 0, edx, 15, hybrid_cpu , The CPU is= identified as a 'hybrid part' + 7, 0, edx, 16, tsxldtrk , TSX suspen= d/resume load address tracking + 7, 0, edx, 18, pconfig , PCONFIG in= struction + 7, 0, edx, 19, arch_lbr , Intel arch= itectural LBRs + 7, 0, edx, 20, ibt , CET indire= ct branch tracking + 7, 0, edx, 22, amx_bf16 , AMX-BF16: = tile bfloat16 support + 7, 0, edx, 23, avx512_fp16 , AVX-512 FP= 16 instructions + 7, 0, edx, 24, amx_tile , AMX-TILE: = tile architecture support + 7, 0, edx, 25, amx_int8 , AMX-INT8: = tile 8-bit integer support + 7, 0, edx, 26, spec_ctrl , Speculatio= n Control (IBRS/IBPB: indirect branch restrictions) + 7, 0, edx, 27, intel_stibp , Single thr= ead indirect branch predictors + 7, 0, edx, 28, flush_l1d , FLUSH L1D = cache: IA32_FLUSH_CMD MSR + 7, 0, edx, 29, arch_capabilities , Intel IA32= _ARCH_CAPABILITIES MSR + 7, 0, edx, 30, core_capabilities , IA32_CORE_= CAPABILITIES MSR + 7, 0, edx, 31, spec_ctrl_ssbd , Speculativ= e store bypass disable + 7, 1, eax, 4, avx_vnni , AVX-VNNI i= nstructions + 7, 1, eax, 5, avx512_bf16 , AVX-512 bF= loat16 instructions + 7, 1, eax, 6, lass , Linear add= ress space separation + 7, 1, eax, 7, cmpccxadd , CMPccXADD = instructions + 7, 1, eax, 8, arch_perfmon_ext , ArchPerfmo= nExt: CPUID leaf 0x23 is supported + 7, 1, eax, 10, fzrm , Fast zero-= length REP MOVSB + 7, 1, eax, 11, fsrs , Fast short= REP STOSB + 7, 1, eax, 12, fsrc , Fast Short= REP CMPSB/SCASB + 7, 1, eax, 17, fred , FRED: Flex= ible return and event delivery transitions + 7, 1, eax, 18, lkgs , LKGS: Load= 'kernel' (userspace) GS + 7, 1, eax, 19, wrmsrns , WRMSRNS in= str (WRMSR-non-serializing) + 7, 1, eax, 21, amx_fp16 , AMX-FP16: = FP16 tile operations + 7, 1, eax, 22, hreset , History re= set support + 7, 1, eax, 23, avx_ifma , Integer fu= sed multiply add + 7, 1, eax, 26, lam , Linear add= ress masking + 7, 1, eax, 27, rd_wr_msrlist , RDMSRLIST/= WRMSRLIST instructions + 7, 1, ebx, 0, intel_ppin , Protected = processor inventory number (PPIN{,_CTL} MSRs) + 7, 1, edx, 4, avx_vnni_int8 , AVX-VNNI-I= NT8 instructions + 7, 1, edx, 5, avx_ne_convert , AVX-NE-CON= VERT instructions + 7, 1, edx, 8, amx_complex , AMX-COMPLE= X instructions (starting from Granite Rapids) + 7, 1, edx, 14, prefetchit_0_1 , PREFETCHIT= 0/1 instructions + 7, 1, edx, 18, cet_sss , CET superv= isor shadow stacks safe to use + 7, 2, edx, 0, intel_psfd , Intel pred= ictive store forward disable + 7, 2, edx, 1, ipred_ctrl , MSR bits I= A32_SPEC_CTRL.IPRED_DIS_{U,S} + 7, 2, edx, 2, rrsba_ctrl , MSR bits I= A32_SPEC_CTRL.RRSBA_DIS_{U,S} + 7, 2, edx, 3, ddp_ctrl , MSR bit I= A32_SPEC_CTRL.DDPD_U + 7, 2, edx, 4, bhi_ctrl , MSR bit I= A32_SPEC_CTRL.BHI_DIS_S + 7, 2, edx, 5, mcdt_no , MCDT mitig= ation not needed + 7, 2, edx, 6, uclock_disable , UC-lock di= sable is supported + +# Leaf 9H +# Intel DCA (Direct Cache Access) enumeration + + 9, 0, eax, 0, dca_enabled_in_bios , DCA is ena= bled in BIOS + +# Leaf AH +# Intel PMU (Performance Monitoring Unit) enumeration + + 0xa, 0, eax, 7:0, pmu_version , Performanc= e monitoring unit version ID + 0xa, 0, eax, 15:8, pmu_n_gcounters , Number of = general PMU counters per logical CPU + 0xa, 0, eax, 23:16, pmu_gcounters_nbits , Bitwidth o= f PMU general counters + 0xa, 0, eax, 31:24, pmu_cpuid_ebx_bits , Length of = cpuid leaf 0xa EBX bit vector + 0xa, 0, ebx, 0, no_core_cycle_evt , Core cycle= event not available + 0xa, 0, ebx, 1, no_insn_retired_evt , Instructio= n retired event not available + 0xa, 0, ebx, 2, no_refcycle_evt , Reference = cycles event not available + 0xa, 0, ebx, 3, no_llc_ref_evt , LLC-refere= nce event not available + 0xa, 0, ebx, 4, no_llc_miss_evt , LLC-misses= event not available + 0xa, 0, ebx, 5, no_br_insn_ret_evt , Branch ins= truction retired event not available + 0xa, 0, ebx, 6, no_br_mispredict_evt , Branch mis= predict retired event not available + 0xa, 0, ebx, 7, no_td_slots_evt , Topdown sl= ots event not available + 0xa, 0, ecx, 31:0, pmu_fcounters_bitmap , Fixed-func= tion PMU counters support bitmap + 0xa, 0, edx, 4:0, pmu_n_fcounters , Number of = fixed PMU counters + 0xa, 0, edx, 12:5, pmu_fcounters_nbits , Bitwidth o= f PMU fixed counters + 0xa, 0, edx, 15, anythread_depr , AnyThread = deprecation + +# Leaf BH +# CPUs v1 extended topology enumeration + + 0xb, 1:0, eax, 4:0, x2apic_id_shift , Bit width = of this level (previous levels inclusive) + 0xb, 1:0, ebx, 15:0, domain_lcpus_count , Logical CP= Us count across all instances of this domain + 0xb, 1:0, ecx, 7:0, domain_nr , This domai= n level (subleaf ID) + 0xb, 1:0, ecx, 15:8, domain_type , This domai= n type + 0xb, 1:0, edx, 31:0, x2apic_id , x2APIC ID = of current logical CPU + +# Leaf DH +# Processor extended state enumeration + + 0xd, 0, eax, 0, xcr0_x87 , XCR0.X87 (= bit 0) supported + 0xd, 0, eax, 1, xcr0_sse , XCR0.SEE (= bit 1) supported + 0xd, 0, eax, 2, xcr0_avx , XCR0.AVX (= bit 2) supported + 0xd, 0, eax, 3, xcr0_mpx_bndregs , XCR0.BNDRE= GS (bit 3) supported (MPX BND0-BND3 regs) + 0xd, 0, eax, 4, xcr0_mpx_bndcsr , XCR0.BNDCS= R (bit 4) supported (MPX BNDCFGU/BNDSTATUS regs) + 0xd, 0, eax, 5, xcr0_avx512_opmask , XCR0.OPMAS= K (bit 5) supported (AVX-512 k0-k7 regs) + 0xd, 0, eax, 6, xcr0_avx512_zmm_hi256 , XCR0.ZMM_H= i256 (bit 6) supported (AVX-512 ZMM0->ZMM7/15 regs) + 0xd, 0, eax, 7, xcr0_avx512_hi16_zmm , XCR0.HI16_= ZMM (bit 7) supported (AVX-512 ZMM16->ZMM31 regs) + 0xd, 0, eax, 9, xcr0_pkru , XCR0.PKRU = (bit 9) supported (XSAVE PKRU reg) + 0xd, 0, eax, 11, xcr0_cet_u , AMD XCR0.C= ET_U (bit 11) supported (CET supervisor state) + 0xd, 0, eax, 12, xcr0_cet_s , AMD XCR0.C= ET_S (bit 12) support (CET user state) + 0xd, 0, eax, 17, xcr0_tileconfig , XCR0.TILEC= ONFIG (bit 17) supported (AMX can manage TILECONFIG) + 0xd, 0, eax, 18, xcr0_tiledata , XCR0.TILED= ATA (bit 18) supported (AMX can manage TILEDATA) + 0xd, 0, ebx, 31:0, xsave_sz_xcr0_enabled , XSAVE/XRST= R area byte size, for XCR0 enabled features + 0xd, 0, ecx, 31:0, xsave_sz_max , XSAVE/XRST= R area max byte size, all CPU features + 0xd, 0, edx, 30, xcr0_lwp , AMD XCR0.L= WP (bit 62) supported (Light-weight Profiling) + 0xd, 1, eax, 0, xsaveopt , XSAVEOPT i= nstruction + 0xd, 1, eax, 1, xsavec , XSAVEC ins= truction + 0xd, 1, eax, 2, xgetbv1 , XGETBV ins= truction with ECX =3D 1 + 0xd, 1, eax, 3, xsaves , XSAVES/XRS= TORS instructions (and XSS MSR) + 0xd, 1, eax, 4, xfd , Extended f= eature disable support + 0xd, 1, ebx, 31:0, xsave_sz_xcr0_xmms_enabled, XSAVE a= rea size, all XCR0 and XMMS features enabled + 0xd, 1, ecx, 8, xss_pt , PT state, = supported + 0xd, 1, ecx, 10, xss_pasid , PASID stat= e, supported + 0xd, 1, ecx, 11, xss_cet_u , CET user s= tate, supported + 0xd, 1, ecx, 12, xss_cet_p , CET superv= isor state, supported + 0xd, 1, ecx, 13, xss_hdc , HDC state,= supported + 0xd, 1, ecx, 14, xss_uintr , UINTR stat= e, supported + 0xd, 1, ecx, 15, xss_lbr , LBR state,= supported + 0xd, 1, ecx, 16, xss_hwp , HWP state,= supported + 0xd, 63:2, eax, 31:0, xsave_sz , Size of sa= ve area for subleaf-N feature, in bytes + 0xd, 63:2, ebx, 31:0, xsave_offset , Offset of = save area for subleaf-N feature, in bytes + 0xd, 63:2, ecx, 0, is_xss_bit , Subleaf N = describes an XSS bit, otherwise XCR0 bit + 0xd, 63:2, ecx, 1, compacted_xsave_64byte_aligned, Whe= n compacted, subleaf-N feature xsave area is 64-byte aligned + +# Leaf FH +# Intel RDT / AMD PQoS resource monitoring + + 0xf, 0, ebx, 31:0, core_rmid_max , RMID max, = within this core, all types (0-based) + 0xf, 0, edx, 1, cqm_llc , LLC QoS-mo= nitoring supported + 0xf, 1, eax, 7:0, l3c_qm_bitwidth , L3 QoS-mon= itoring counter bitwidth (24-based) + 0xf, 1, eax, 8, l3c_qm_overflow_bit , QM_CTR MSR= bit 61 is an overflow bit + 0xf, 1, ebx, 31:0, l3c_qm_conver_factor , QM_CTR MSR= conversion factor to bytes + 0xf, 1, ecx, 31:0, l3c_qm_rmid_max , L3 QoS-mon= itoring max RMID + 0xf, 1, edx, 0, cqm_occup_llc , L3 QoS occ= upancy monitoring supported + 0xf, 1, edx, 1, cqm_mbm_total , L3 QoS tot= al bandwidth monitoring supported + 0xf, 1, edx, 2, cqm_mbm_local , L3 QoS loc= al bandwidth monitoring supported =20 # Leaf 10H -# Intel RDT Allocation - - 0x10, 0, EBX, 1, l3c_rdt_alloc, L3 Cache Allocation supported - 0x10, 0, EBX, 2, l2c_rdt_alloc, L2 Cache Allocation supported - 0x10, 0, EBX, 3, mem_bw_alloc, Memory Bandwidth Allocation su= pported - +# Intel RDT / AMD PQoS allocation enumeration + + 0x10, 0, ebx, 1, cat_l3 , L3 Cache A= llocation Technology supported + 0x10, 0, ebx, 2, cat_l2 , L2 Cache A= llocation Technology supported + 0x10, 0, ebx, 3, mba , Memory Ban= dwidth Allocation supported + 0x10, 2:1, eax, 4:0, cat_cbm_len , L3/L2_CAT = capacity bitmask length, minus-one notation + 0x10, 2:1, ebx, 31:0, cat_units_bitmap , L3/L2_CAT = bitmap of allocation units + 0x10, 2:1, ecx, 1, l3_cat_cos_infreq_updates, L3_CAT C= OS updates should be infrequent + 0x10, 2:1, ecx, 2, cdp_l3 , L3/L2_CAT = CDP (Code and Data Prioritization) + 0x10, 2:1, ecx, 3, cat_sparse_1s , L3/L2_CAT = non-contiguous 1s value supported + 0x10, 2:1, edx, 15:0, cat_cos_max , L3/L2_CAT = max COS (Class of Service) supported + 0x10, 3, eax, 11:0, mba_max_delay , Max MBA th= rottling value; minus-one notation + 0x10, 3, ecx, 0, per_thread_mba , Per-thread= MBA controls are supported + 0x10, 3, ecx, 2, mba_delay_linear , Delay valu= es are linear + 0x10, 3, edx, 15:0, mba_cos_max , MBA max Cl= ass of Service supported =20 # Leaf 12H -# SGX Capability -# -# Some detailed SGX features not added yet - - 0x12, 0, EAX, 0, sgx1, L3 Cache Allocation supported - 0x12, 1, EAX, 0, sgx2, L3 Cache Allocation supported - +# Intel Software Guard Extensions (SGX) enumeration + + 0x12, 0, eax, 0, sgx1 , SGX1 leaf = functions supported + 0x12, 0, eax, 1, sgx2 , SGX2 leaf = functions supported + 0x12, 0, eax, 5, enclv_leaves , ENCLV leav= es (E{INC,DEC}VIRTCHILD, ESETCONTEXT) supported + 0x12, 0, eax, 6, encls_leaves , ENCLS leav= es (ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC) supported + 0x12, 0, eax, 7, enclu_everifyreport2 , ENCLU leaf= EVERIFYREPORT2 supported + 0x12, 0, eax, 10, encls_eupdatesvn , ENCLS leaf= EUPDATESVN supported + 0x12, 0, eax, 11, sgx_edeccssa , ENCLU leaf= EDECCSSA supported + 0x12, 0, ebx, 0, miscselect_exinfo , SSA.MISC f= rame: reporting #PF and #GP exceptions inside enclave supported + 0x12, 0, ebx, 1, miscselect_cpinfo , SSA.MISC f= rame: reporting #CP exceptions inside enclave supported + 0x12, 0, edx, 7:0, max_enclave_sz_not64 , Maximum en= clave size in non-64-bit mode (log2) + 0x12, 0, edx, 15:8, max_enclave_sz_64 , Maximum en= clave size in 64-bit mode (log2) + 0x12, 1, eax, 0, secs_attr_init , ATTRIBUTES= .INIT supported (enclave initialized by EINIT) + 0x12, 1, eax, 1, secs_attr_debug , ATTRIBUTES= .DEBUG supported (enclave permits debugger read/write) + 0x12, 1, eax, 2, secs_attr_mode64bit , ATTRIBUTES= .MODE64BIT supported (enclave runs in 64-bit mode) + 0x12, 1, eax, 4, secs_attr_provisionkey , ATTRIBUTES= .PROVISIONKEY supported (provisioning key available) + 0x12, 1, eax, 5, secs_attr_einittoken_key, ATTRIBUTE= S.EINITTOKEN_KEY supported (EINIT token key available) + 0x12, 1, eax, 6, secs_attr_cet , ATTRIBUTES= .CET supported (enable CET attributes) + 0x12, 1, eax, 7, secs_attr_kss , ATTRIBUTES= .KSS supported (Key Separation and Sharing enabled) + 0x12, 1, eax, 10, secs_attr_aexnotify , ATTRIBUTES= .AEXNOTIFY supported (enclave threads may get AEX notifications + 0x12, 1, ecx, 0, xfrm_x87 , Enclave XF= RM.X87 (bit 0) supported + 0x12, 1, ecx, 1, xfrm_sse , Enclave XF= RM.SEE (bit 1) supported + 0x12, 1, ecx, 2, xfrm_avx , Enclave XF= RM.AVX (bit 2) supported + 0x12, 1, ecx, 3, xfrm_mpx_bndregs , Enclave XF= RM.BNDREGS (bit 3) supported (MPX BND0-BND3 regs) + 0x12, 1, ecx, 4, xfrm_mpx_bndcsr , Enclave XF= RM.BNDCSR (bit 4) supported (MPX BNDCFGU/BNDSTATUS regs) + 0x12, 1, ecx, 5, xfrm_avx512_opmask , Enclave XF= RM.OPMASK (bit 5) supported (AVX-512 k0-k7 regs) + 0x12, 1, ecx, 6, xfrm_avx512_zmm_hi256 , Enclave XF= RM.ZMM_Hi256 (bit 6) supported (AVX-512 ZMM0->ZMM7/15 regs) + 0x12, 1, ecx, 7, xfrm_avx512_hi16_zmm , Enclave XF= RM.HI16_ZMM (bit 7) supported (AVX-512 ZMM16->ZMM31 regs) + 0x12, 1, ecx, 9, xfrm_pkru , Enclave XF= RM.PKRU (bit 9) supported (XSAVE PKRU reg) + 0x12, 1, ecx, 17, xfrm_tileconfig , Enclave XF= RM.TILECONFIG (bit 17) supported (AMX can manage TILECONFIG) + 0x12, 1, ecx, 18, xfrm_tiledata , Enclave XF= RM.TILEDATA (bit 18) supported (AMX can manage TILEDATA) + 0x12, 31:2, eax, 3:0, subleaf_type , Subleaf ty= pe (dictates output layout) + 0x12, 31:2, eax, 31:12, epc_sec_base_addr_0 , EPC sectio= n base addr, bits[12:31] + 0x12, 31:2, ebx, 19:0, epc_sec_base_addr_1 , EPC sectio= n base addr, bits[32:51] + 0x12, 31:2, ecx, 3:0, epc_sec_type , EPC sectio= n type / property encoding + 0x12, 31:2, ecx, 31:12, epc_sec_size_0 , EPC sectio= n size, bits[12:31] + 0x12, 31:2, edx, 19:0, epc_sec_size_1 , EPC sectio= n size, bits[32:51] =20 # Leaf 14H -# Intel Processor Tracer -# +# Intel Processor Trace enumeration + + 0x14, 0, eax, 31:0, pt_max_subleaf , Max cpuid = 0x14 subleaf + 0x14, 0, ebx, 0, cr3_filtering , IA32_RTIT_= CR3_MATCH is accessible + 0x14, 0, ebx, 1, psb_cyc , Configurab= le PSB and cycle-accurate mode + 0x14, 0, ebx, 2, ip_filtering , IP/TraceSt= op filtering; Warm-reset PT MSRs preservation + 0x14, 0, ebx, 3, mtc_timing , MTC timing= packet; COFI-based packets suppression + 0x14, 0, ebx, 4, ptwrite , PTWRITE su= pport + 0x14, 0, ebx, 5, power_event_trace , Power Even= t Trace support + 0x14, 0, ebx, 6, psb_pmi_preserve , PSB and PM= I preservation support + 0x14, 0, ebx, 7, event_trace , Event Trac= e packet generation through IA32_RTIT_CTL.EventEn + 0x14, 0, ebx, 8, tnt_disable , TNT packet= generation disable through IA32_RTIT_CTL.DisTNT + 0x14, 0, ecx, 0, topa_output , ToPA outpu= t scheme support + 0x14, 0, ecx, 1, topa_multiple_entries , ToPA table= s can hold multiple entries + 0x14, 0, ecx, 2, single_range_output , Single-ran= ge output scheme supported + 0x14, 0, ecx, 3, trance_transport_output, Trace Tran= sport subsystem output support + 0x14, 0, ecx, 31, ip_payloads_lip , IP payload= s have LIP values (CS base included) + 0x14, 1, eax, 2:0, num_address_ranges , Filtering = number of configurable Address Ranges + 0x14, 1, eax, 31:16, mtc_periods_bmp , Bitmap of = supported MTC period encodings + 0x14, 1, ebx, 15:0, cycle_thresholds_bmp , Bitmap of = supported Cycle Threshold encodings + 0x14, 1, ebx, 31:16, psb_periods_bmp , Bitmap of = supported Configurable PSB frequency encodings =20 # Leaf 15H -# Time Stamp Counter and Nominal Core Crystal Clock Information +# Intel TSC (Time Stamp Counter) enumeration =20 - 0x15, 0, EAX, 31:0, tsc_denominator, The denominator of the TSC/= =E2=80=9Dcore crystal clock=E2=80=9D ratio - 0x15, 0, EBX, 31:0, tsc_numerator, The numerator of the TSC/=E2= =80=9Dcore crystal clock=E2=80=9D ratio - 0x15, 0, ECX, 31:0, nom_freq, Nominal frequency of the core crys= tal clock in Hz + 0x15, 0, eax, 31:0, tsc_denominator , Denominato= r of the TSC/'core crystal clock' ratio + 0x15, 0, ebx, 31:0, tsc_numerator , Numerator = of the TSC/'core crystal clock' ratio + 0x15, 0, ecx, 31:0, cpu_crystal_hz , Core cryst= al clock nominal frequency, in Hz =20 # Leaf 16H -# Processor Frequency Information +# Intel processor fequency enumeration =20 - 0x16, 0, EAX, 15:0, cpu_base_freq, Processor Base Frequency in M= Hz - 0x16, 0, EBX, 15:0, cpu_max_freq, Maximum Frequency in MHz - 0x16, 0, ECX, 15:0, bus_freq, Bus (Reference) Frequency in MHz + 0x16, 0, eax, 15:0, cpu_base_mhz , Processor = base frequency, in MHz + 0x16, 0, ebx, 15:0, cpu_max_mhz , Processor = max frequency, in MHz + 0x16, 0, ecx, 15:0, bus_mhz , Bus refere= nce frequency, in MHz =20 # Leaf 17H -# System-On-Chip Vendor Attribute - - 0x17, 0, EAX, 31:0, max_socid, Maximum input value of supported = sub-leaf - 0x17, 0, EBX, 15:0, soc_vid, SOC Vendor ID - 0x17, 0, EBX, 16, std_vid, SOC Vendor ID is assigned via an in= dustry standard scheme - 0x17, 0, ECX, 31:0, soc_pid, SOC Project ID assigned by vendor - 0x17, 0, EDX, 31:0, soc_sid, SOC Stepping ID +# Intel SoC vendor attributes enumeration + + 0x17, 0, eax, 31:0, soc_max_subleaf , Max cpuid = leaf 0x17 subleaf + 0x17, 0, ebx, 15:0, soc_vendor_id , SoC vendor= ID + 0x17, 0, ebx, 16, is_vendor_scheme , Assigned b= y industry enumaeratoion scheme (not Intel) + 0x17, 0, ecx, 31:0, soc_proj_id , SoC projec= t ID, assigned by vendor + 0x17, 0, edx, 31:0, soc_stepping_id , Soc projec= t stepping ID, assigned by vendor + 0x17, 3:1, eax, 31:0, vendor_brand_a , Vendor Bra= nd ID string, bytes subleaf_nr * (0 -> 3) + 0x17, 3:1, ebx, 31:0, vendor_brand_b , Vendor Bra= nd ID string, bytes subleaf_nr * (4 -> 7) + 0x17, 3:1, ecx, 31:0, vendor_brand_c , Vendor Bra= nd ID string, bytes subleaf_nr * (8 -> 11) + 0x17, 3:1, edx, 31:0, vendor_brand_d , Vendor Bra= nd ID string, bytes subleaf_nr * (12 -> 15) =20 # Leaf 18H -# Deterministic Address Translation Parameters - +# Intel determenestic address translation (TLB) parameters + + 0x18, 31:0, eax, 31:0, tlb_max_subleaf , Max cpuid = 0x18 subleaf + 0x18, 31:0, ebx, 0, tlb_4k_page , TLB 4KB-pa= ge entries supported + 0x18, 31:0, ebx, 1, tlb_2m_page , TLB 2MB-pa= ge entries supported + 0x18, 31:0, ebx, 2, tlb_4m_page , TLB 4MB-pa= ge entries supported + 0x18, 31:0, ebx, 3, tlb_1g_page , TLB 1GB-pa= ge entries supported + 0x18, 31:0, ebx, 10:8, hard_partitioning , (Hard/Soft= ) partitioning between logical CPUs sharing this struct + 0x18, 31:0, ebx, 31:16, n_way_associative , Ways of as= sociativity + 0x18, 31:0, ecx, 31:0, n_sets , Number of = sets + 0x18, 31:0, edx, 4:0, tlb_type , Translatio= n cache type (TLB type) + 0x18, 31:0, edx, 7:5, tlb_cache_level , Translatio= n cache level (1-based) + 0x18, 31:0, edx, 8, is_fully_associative , Fully-asso= ciative structure + 0x18, 31:0, edx, 25:14, tlb_max_addressible_ids, Max num of= addressible IDs for logical CPUs sharing this TLB - 1 =20 # Leaf 19H -# Key Locker Leaf +# Intel Key Locker enumeration =20 + 0x19, 0, eax, 0, kl_cpl0_only , CPL0-only = key Locker restriction supported + 0x19, 0, eax, 1, kl_no_encrypt , No-encrypt= key locker restriction supported + 0x19, 0, eax, 2, kl_no_decrypt , No-decrypt= key locker restriction supported + 0x19, 0, ebx, 0, aes_keylocker , AES key lo= cker instructions supported + 0x19, 0, ebx, 2, aes_keylocker_wide , AES wide k= ey locker instructions supported + 0x19, 0, ebx, 4, kl_msr_iwkey , Key locker= MSRs and IWKEY backups supported + 0x19, 0, ecx, 0, loadiwkey_no_backup , LOADIWKEY = NoBackup parameter supported + 0x19, 0, ecx, 1, iwkey_rand , IWKEY rand= omization (KeySource encoding 1) supported =20 # Leaf 1AH -# Hybrid Information - - 0x1A, 0, EAX, 31:24, core_type, 20H-Intel_Atom 40H-Intel_Core - +# Intel hybrid CPUs identification (e.g. Atom, Core) + + 0x1a, 0, eax, 23:0, core_native_model , This core'= s native model ID + 0x1a, 0, eax, 31:24, core_type , This core'= s type + +# Leaf 1BH +# Intel PCONFIG (Platform configuration) enumeration + + 0x1b, 31:0, eax, 11:0, pconfig_subleaf_type , CPUID 0x1b= subleaf type + 0x1b, 31:0, ebx, 31:0, pconfig_target_id_x , A supporte= d PCONFIG target ID + 0x1b, 31:0, ecx, 31:0, pconfig_target_id_y , A supporte= d PCONFIG target ID + 0x1b, 31:0, edx, 31:0, pconfig_target_id_z , A supporte= d PCONFIG target ID + +# Leaf 1CH +# Intel LBR (Last Branch Record) enumeration + + 0x1c, 0, eax, 0, lbr_depth_8 , Max stack = depth (number of LBR entries) =3D 8 + 0x1c, 0, eax, 1, lbr_depth_16 , Max stack = depth (number of LBR entries) =3D 16 + 0x1c, 0, eax, 2, lbr_depth_24 , Max stack = depth (number of LBR entries) =3D 24 + 0x1c, 0, eax, 3, lbr_depth_32 , Max stack = depth (number of LBR entries) =3D 32 + 0x1c, 0, eax, 4, lbr_depth_40 , Max stack = depth (number of LBR entries) =3D 40 + 0x1c, 0, eax, 5, lbr_depth_48 , Max stack = depth (number of LBR entries) =3D 48 + 0x1c, 0, eax, 6, lbr_depth_56 , Max stack = depth (number of LBR entries) =3D 56 + 0x1c, 0, eax, 7, lbr_depth_64 , Max stack = depth (number of LBR entries) =3D 64 + 0x1c, 0, eax, 30, lbr_deep_c_reset , LBRs maybe= cleared on MWAIT C-state > C1 + 0x1c, 0, eax, 31, lbr_ip_is_lip , LBR IP con= tain Last IP, otherwise effective IP + 0x1c, 0, ebx, 0, lbr_cpl , CPL filter= ing (non-zero IA32_LBR_CTL[2:1]) supported + 0x1c, 0, ebx, 1, lbr_branch_filter , Branch fil= tering (non-zero IA32_LBR_CTL[22:16]) supported + 0x1c, 0, ebx, 2, lbr_call_stack , Call-stack= mode (IA32_LBR_CTL[3] =3D 1) supported + 0x1c, 0, ecx, 0, lbr_mispredict , Branch mis= prediction bit supported (IA32_LBR_x_INFO[63]) + 0x1c, 0, ecx, 1, lbr_timed_lbr , Timed LBRs= (CPU cycles since last LBR entry) supported + 0x1c, 0, ecx, 2, lbr_branch_type , Branch typ= e field (IA32_LBR_INFO_x[59:56]) supported + 0x1c, 0, ecx, 19:16, lbr_events_gpc_bmp , LBR PMU-ev= ents logging support; bitmap for first 4 GP (general-purpose) Counters + +# Leaf 1DH +# Intel AMX (Advanced Matrix Extensions) tile information + + 0x1d, 0, eax, 31:0, amx_max_palette , Highest pa= lette ID / subleaf ID + 0x1d, 1, eax, 15:0, amx_palette_size , AMX palett= e total tiles size, in bytes + 0x1d, 1, eax, 31:16, amx_tile_size , AMX single= tile's size, in bytes + 0x1d, 1, ebx, 15:0, amx_tile_row_size , AMX tile s= ingle row's size, in bytes + 0x1d, 1, ebx, 31:16, amx_palette_nr_tiles , AMX palett= e number of tiles + 0x1d, 1, ecx, 15:0, amx_tile_nr_rows , AMX tile m= ax number of rows + +# Leaf 1EH +# Intel AMX, TMUL (Tile-matrix MULtiply) accelerator unit enumeration + + 0x1e, 0, ebx, 7:0, tmul_maxk , TMUL unit = maximum height, K (rows or columns) + 0x1e, 0, ebx, 23:8, tmul_maxn , TMUL unit = maxiumum SIMD dimension, N (column bytes) =20 # Leaf 1FH -# V2 Extended Topology - A preferred superset to leaf 0BH - - -# According to SDM -# 40000000H - 4FFFFFFFH is invalid range +# Intel extended topology enumeration v2 + + 0x1f, 5:0, eax, 4:0, x2apic_id_shift , Bit width = of this level (previous levels inclusive) + 0x1f, 5:0, ebx, 15:0, domain_lcpus_count , Logical CP= Us count across all instances of this domain + 0x1f, 5:0, ecx, 7:0, domain_level , This domai= n level (subleaf ID) + 0x1f, 5:0, ecx, 15:8, domain_type , This domai= n type + 0x1f, 5:0, edx, 31:0, x2apic_id , x2APIC ID = of current logical CPU + +# Leaf 20H +# Intel HRESET (History Reset) enumeration + + 0x20, 0, eax, 31:0, hreset_nr_subleaves , CPUID 0x20= max subleaf + 1 + 0x20, 0, ebx, 0, hreset_thread_director , HRESET of = Intel thread director is supported + +# Leaf 21H +# Intel TD (Trust Domain) guest execution environment enumeration + + 0x21, 0, ebx, 31:0, tdx_vendorid_0 , TDX vendor= ID string bytes 0 - 3 + 0x21, 0, ecx, 31:0, tdx_vendorid_2 , CPU vendor= ID string bytes 8 - 11 + 0x21, 0, edx, 31:0, tdx_vendorid_1 , CPU vendor= ID string bytes 4 - 7 + +# Leaf 23H +# Intel Architectural Performance Monitoring Extended (ArchPerfmonExt) + + 0x23, 0, eax, 1, subleaf_1_counters , Subleaf 1,= PMU counters bitmaps, is valid + 0x23, 0, eax, 3, subleaf_3_events , Subleaf 3,= PMU events bitmaps, is valid + 0x23, 0, ebx, 0, unitmask2 , IA32_PERFE= VTSELx MSRs UnitMask2 is supported + 0x23, 0, ebx, 1, zbit , IA32_PERFE= VTSELx MSRs Z-bit is supported + 0x23, 1, eax, 31:0, pmu_gp_counters_bitmap , General-pu= rpose PMU counters bitmap + 0x23, 1, ebx, 31:0, pmu_f_counters_bitmap , Fixed PMU = counters bitmap + 0x23, 3, eax, 0, core_cycles_evt , Core cycle= s event supported + 0x23, 3, eax, 1, insn_retired_evt , Instructio= ns retired event supported + 0x23, 3, eax, 2, ref_cycles_evt , Reference = cycles event supported + 0x23, 3, eax, 3, llc_refs_evt , Last-level= cache references event supported + 0x23, 3, eax, 4, llc_misses_evt , Last-level= cache misses event supported + 0x23, 3, eax, 5, br_insn_ret_evt , Branch ins= truction retired event supported + 0x23, 3, eax, 6, br_mispr_evt , Branch mis= predict retired event supported + 0x23, 3, eax, 7, td_slots_evt , Topdown sl= ots event supported + 0x23, 3, eax, 8, td_backend_bound_evt , Topdown ba= ckend bound event supported + 0x23, 3, eax, 9, td_bad_spec_evt , Topdown ba= d speculation event supported + 0x23, 3, eax, 10, td_frontend_bound_evt , Topdown fr= ontend bound event supported + 0x23, 3, eax, 11, td_retiring_evt , Topdown re= tiring event support + +# Leaf 40000000H +# Maximum hypervisor standard leaf + hypervisor vendor string + +0x40000000, 0, eax, 31:0, max_hyp_leaf , Maximum hy= pervisor standard leaf number +0x40000000, 0, ebx, 31:0, hypervisor_id_0 , Hypervisor= ID string bytes 0 - 3 +0x40000000, 0, ecx, 31:0, hypervisor_id_1 , Hypervisor= ID string bytes 4 - 7 +0x40000000, 0, edx, 31:0, hypervisor_id_2 , Hypervisor= ID string bytes 8 - 11 + +# Leaf 80000000H +# Maximum extended leaf number + CPU vendor string (AMD) + +0x80000000, 0, eax, 31:0, max_ext_leaf , Maximum ex= tended cpuid leaf supported +0x80000000, 0, ebx, 31:0, cpu_vendorid_0 , Vendor ID = string bytes 0 - 3 +0x80000000, 0, ecx, 31:0, cpu_vendorid_2 , Vendor ID = string bytes 8 - 11 +0x80000000, 0, edx, 31:0, cpu_vendorid_1 , Vendor ID = string bytes 4 - 7 =20 # Leaf 80000001H -# Extended Processor Signature and Feature Bits - -0x80000001, 0, EAX, 27:20, extfamily, Extended family -0x80000001, 0, EAX, 19:16, extmodel, Extended model -0x80000001, 0, EAX, 11:8, basefamily, Description of Family -0x80000001, 0, EAX, 11:8, basemodel, Model numbers vary with product -0x80000001, 0, EAX, 3:0, stepping, Processor stepping (revision) for = a specific model - -0x80000001, 0, EBX, 31:28, pkgtype, Specifies the package type - -0x80000001, 0, ECX, 0, lahf_lm, LAHF/SAHF available in 64-bit mode -0x80000001, 0, ECX, 1, cmplegacy, Core multi-processing legacy mode -0x80000001, 0, ECX, 2, svm, Indicates support for: VMRUN, VMLOAD, V= MSAVE, CLGI, VMMCALL, and INVLPGA -0x80000001, 0, ECX, 3, extapicspace, Extended APIC register space -0x80000001, 0, ECX, 4, altmovecr8, Indicates support for LOCK MOV C= R0 means MOV CR8 -0x80000001, 0, ECX, 5, lzcnt, LZCNT -0x80000001, 0, ECX, 6, sse4a, EXTRQ, INSERTQ, MOVNTSS, and MOVNTSD = instruction support -0x80000001, 0, ECX, 7, misalignsse, Misaligned SSE Mode -0x80000001, 0, ECX, 8, prefetchw, PREFETCHW -0x80000001, 0, ECX, 9, osvw, OS Visible Work-around support -0x80000001, 0, ECX, 10, ibs, Instruction Based Sampling -0x80000001, 0, ECX, 11, xop, Extended operation support -0x80000001, 0, ECX, 12, skinit, SKINIT and STGI support -0x80000001, 0, ECX, 13, wdt, Watchdog timer support -0x80000001, 0, ECX, 15, lwp, Lightweight profiling support -0x80000001, 0, ECX, 16, fma4, Four-operand FMA instruction support -0x80000001, 0, ECX, 17, tce, Translation cache extension -0x80000001, 0, ECX, 22, TopologyExtensions, Indicates support for Co= re::X86::Cpuid::CachePropEax0 and Core::X86::Cpuid::ExtApicId -0x80000001, 0, ECX, 23, perfctrextcore, Indicates support for Core::= X86::Msr::PERF_CTL0 - 5 and Core::X86::Msr::PERF_CTR -0x80000001, 0, ECX, 24, perfctrextdf, Indicates support for Core::X8= 6::Msr::DF_PERF_CTL and Core::X86::Msr::DF_PERF_CTR -0x80000001, 0, ECX, 26, databreakpointextension, Indicates data brea= kpoint support for Core::X86::Msr::DR0_ADDR_MASK, Core::X86::Msr::DR1_ADDR_MA= SK, Core::X86::Msr::DR2_ADDR_MASK and Core::X86::Msr::DR3_ADDR_MASK -0x80000001, 0, ECX, 27, perftsc, Performance time-stamp counter supp= orted -0x80000001, 0, ECX, 28, perfctrextllc, Indicates support for L3 perf= ormance counter extensions -0x80000001, 0, ECX, 29, mwaitextended, MWAITX and MONITORX capabilit= y is supported -0x80000001, 0, ECX, 30, admskextn, Indicates support for address mas= k extension (to 32 bits and to all 4 DRs) for instruction breakpoints - -0x80000001, 0, EDX, 0, fpu, x87 floating point unit on-chip -0x80000001, 0, EDX, 1, vme, Virtual-mode enhancements -0x80000001, 0, EDX, 2, de, Debugging extensions, IO breakpoints, CR= 4.DE -0x80000001, 0, EDX, 3, pse, Page-size extensions (4 MB pages) -0x80000001, 0, EDX, 4, tsc, Time stamp counter, RDTSC/RDTSCP instru= ctions, CR4.TSD -0x80000001, 0, EDX, 5, msr, Model-specific registers (MSRs), with R= DMSR and WRMSR instructions -0x80000001, 0, EDX, 6, pae, Physical-address extensions (PAE) -0x80000001, 0, EDX, 7, mce, Machine Check Exception, CR4.MCE -0x80000001, 0, EDX, 8, cmpxchg8b, CMPXCHG8B instruction -0x80000001, 0, EDX, 9, apic, advanced programmable interrupt contro= ller (APIC) exists and is enabled -0x80000001, 0, EDX, 11, sysret, SYSCALL/SYSRET supported -0x80000001, 0, EDX, 12, mtrr, Memory-type range registers -0x80000001, 0, EDX, 13, pge, Page global extension, CR4.PGE -0x80000001, 0, EDX, 14, mca, Machine check architecture, MCG_CAP -0x80000001, 0, EDX, 15, cmov, Conditional move instructions, CMOV, F= COMI, FCMOV -0x80000001, 0, EDX, 16, pat, Page attribute table -0x80000001, 0, EDX, 17, pse36, Page-size extensions -0x80000001, 0, EDX, 20, exec_dis, Execute Disable Bit available -0x80000001, 0, EDX, 22, mmxext, AMD extensions to MMX instructions -0x80000001, 0, EDX, 23, mmx, MMX instructions -0x80000001, 0, EDX, 24, fxsr, FXSAVE and FXRSTOR instructions -0x80000001, 0, EDX, 25, ffxsr, FXSAVE and FXRSTOR instruction optimi= zations -0x80000001, 0, EDX, 26, 1gb_page, 1GB page supported -0x80000001, 0, EDX, 27, rdtscp, RDTSCP and IA32_TSC_AUX are available -0x80000001, 0, EDX, 29, lm, 64b Architecture supported -0x80000001, 0, EDX, 30, threednowext, AMD extensions to 3DNow! instr= uctions -0x80000001, 0, EDX, 31, threednow, 3DNow! instructions - -# Leaf 80000002H/80000003H/80000004H -# Processor Brand String +# Extended CPU feature identifiers + +0x80000001, 0, eax, 3:0, e_stepping_id , Stepping ID +0x80000001, 0, eax, 7:4, e_base_model , Base proce= ssor model +0x80000001, 0, eax, 11:8, e_base_family , Base proce= ssor family +0x80000001, 0, eax, 19:16, e_ext_model , Extended p= rocessor model +0x80000001, 0, eax, 27:20, e_ext_family , Extended p= rocessor family +0x80000001, 0, ebx, 15:0, brand_id , Brand ID +0x80000001, 0, ebx, 31:28, pkg_type , Package ty= pe +0x80000001, 0, ecx, 0, lahf_lm , LAHF and S= AHF in 64-bit mode +0x80000001, 0, ecx, 1, cmp_legacy , Multi-proc= essing legacy mode (No HT) +0x80000001, 0, ecx, 2, svm , Secure Vir= tual Machine +0x80000001, 0, ecx, 3, extapic , Extended A= PIC space +0x80000001, 0, ecx, 4, cr8_legacy , LOCK MOV C= R0 means MOV CR8 +0x80000001, 0, ecx, 5, abm , LZCNT adva= nced bit manipulation +0x80000001, 0, ecx, 6, sse4a , SSE4A supp= ort +0x80000001, 0, ecx, 7, misalignsse , Misaligned= SSE mode +0x80000001, 0, ecx, 8, 3dnowprefetch , 3DNow PREF= ETCH/PREFETCHW support +0x80000001, 0, ecx, 9, osvw , OS visible= workaround +0x80000001, 0, ecx, 10, ibs , Instructio= n based sampling +0x80000001, 0, ecx, 11, xop , XOP: exten= ded operation (AVX instructions) +0x80000001, 0, ecx, 12, skinit , SKINIT/STG= I support +0x80000001, 0, ecx, 13, wdt , Watchdog t= imer support +0x80000001, 0, ecx, 15, lwp , Lightweigh= t profiling +0x80000001, 0, ecx, 16, fma4 , 4-operand = FMA instruction +0x80000001, 0, ecx, 17, tce , Translatio= n cache extension +0x80000001, 0, ecx, 19, nodeid_msr , NodeId MSR= (0xc001100c) +0x80000001, 0, ecx, 21, tbm , Trailing b= it manipulations +0x80000001, 0, ecx, 22, topoext , Topology E= xtensions (cpuid leaf 0x8000001d) +0x80000001, 0, ecx, 23, perfctr_core , Core perfo= rmance counter extensions +0x80000001, 0, ecx, 24, perfctr_nb , NB/DF perf= ormance counter extensions +0x80000001, 0, ecx, 26, bpext , Data acces= s breakpoint extension +0x80000001, 0, ecx, 27, ptsc , Performanc= e time-stamp counter +0x80000001, 0, ecx, 28, perfctr_llc , LLC (L3) p= erformance counter extensions +0x80000001, 0, ecx, 29, mwaitx , MWAITX/MON= ITORX support +0x80000001, 0, ecx, 30, addr_mask_ext , Breakpoint= address mask extension (to bit 31) +0x80000001, 0, edx, 0, e_fpu , Floating-P= oint Unit on-chip (x87) +0x80000001, 0, edx, 1, e_vme , Virtual-80= 86 Mode Extensions +0x80000001, 0, edx, 2, e_de , Debugging = Extensions +0x80000001, 0, edx, 3, e_pse , Page Size = Extension +0x80000001, 0, edx, 4, e_tsc , Time Stamp= Counter +0x80000001, 0, edx, 5, e_msr , Model-Spec= ific Registers (RDMSR and WRMSR support) +0x80000001, 0, edx, 6, pae , Physical A= ddress Extensions +0x80000001, 0, edx, 7, mce , Machine Ch= eck Exception +0x80000001, 0, edx, 8, cx8 , CMPXCHG8B = instruction +0x80000001, 0, edx, 9, apic , APIC on-ch= ip +0x80000001, 0, edx, 11, syscall , SYSCALL an= d SYSRET instructions +0x80000001, 0, edx, 12, mtrr , Memory Typ= e Range Registers +0x80000001, 0, edx, 13, pge , Page Globa= l Extensions +0x80000001, 0, edx, 14, mca , Machine Ch= eck Architecture +0x80000001, 0, edx, 15, cmov , Conditiona= l Move Instruction +0x80000001, 0, edx, 16, pat , Page Attri= bute Table +0x80000001, 0, edx, 17, pse36 , Page Size = Extension (36-bit) +0x80000001, 0, edx, 19, mp , Out-of-spe= c AMD Multiprocessing bit +0x80000001, 0, edx, 20, nx , No-execute= page protection +0x80000001, 0, edx, 22, mmxext , AMD MMX ex= tensions +0x80000001, 0, edx, 24, e_fxsr , FXSAVE and= FXRSTOR instructions +0x80000001, 0, edx, 25, fxsr_opt , FXSAVE and= FXRSTOR optimizations +0x80000001, 0, edx, 26, pdpe1gb , 1-GB large= page support +0x80000001, 0, edx, 27, rdtscp , RDTSCP ins= truction +0x80000001, 0, edx, 29, lm , Long mode = (x86-64, 64-bit support) +0x80000001, 0, edx, 30, 3dnowext , AMD 3DNow = extensions +0x80000001, 0, edx, 31, 3dnow , 3DNow inst= ructions + +# Leaf 80000002H +# CPU brand ID string, bytes 0 - 15 + +0x80000002, 0, eax, 31:0, cpu_brandid_0 , CPU brand = ID string, bytes 0 - 3 +0x80000002, 0, ebx, 31:0, cpu_brandid_1 , CPU brand = ID string, bytes 4 - 7 +0x80000002, 0, ecx, 31:0, cpu_brandid_2 , CPU brand = ID string, bytes 8 - 11 +0x80000002, 0, edx, 31:0, cpu_brandid_3 , CPU brand = ID string, bytes 12 - 15 + +# Leaf 80000003H +# CPU brand ID string, bytes 16 - 31 + +0x80000003, 0, eax, 31:0, cpu_brandid_4 , CPU brand = ID string bytes, 16 - 19 +0x80000003, 0, ebx, 31:0, cpu_brandid_5 , CPU brand = ID string bytes, 20 - 23 +0x80000003, 0, ecx, 31:0, cpu_brandid_6 , CPU brand = ID string bytes, 24 - 27 +0x80000003, 0, edx, 31:0, cpu_brandid_7 , CPU brand = ID string bytes, 28 - 31 + +# Leaf 80000004H +# CPU brand ID string, bytes 32 - 47 + +0x80000004, 0, eax, 31:0, cpu_brandid_8 , CPU brand = ID string, bytes 32 - 35 +0x80000004, 0, ebx, 31:0, cpu_brandid_9 , CPU brand = ID string, bytes 36 - 39 +0x80000004, 0, ecx, 31:0, cpu_brandid_10 , CPU brand = ID string, bytes 40 - 43 +0x80000004, 0, edx, 31:0, cpu_brandid_11 , CPU brand = ID string, bytes 44 - 47 =20 # Leaf 80000005H -# Reserved +# AMD L1 cache and L1 TLB enumeration + +0x80000005, 0, eax, 7:0, l1_itlb_2m_4m_nentries , L1 ITLB #e= ntires, 2M and 4M pages +0x80000005, 0, eax, 15:8, l1_itlb_2m_4m_assoc , L1 ITLB as= sociativity, 2M and 4M pages +0x80000005, 0, eax, 23:16, l1_dtlb_2m_4m_nentries , L1 DTLB #e= ntires, 2M and 4M pages +0x80000005, 0, eax, 31:24, l1_dtlb_2m_4m_assoc , L1 DTLB as= sociativity, 2M and 4M pages +0x80000005, 0, ebx, 7:0, l1_itlb_4k_nentries , L1 ITLB #e= ntries, 4K pages +0x80000005, 0, ebx, 15:8, l1_itlb_4k_assoc , L1 ITLB as= sociativity, 4K pages +0x80000005, 0, ebx, 23:16, l1_dtlb_4k_nentries , L1 DTLB #e= ntries, 4K pages +0x80000005, 0, ebx, 31:24, l1_dtlb_4k_assoc , L1 DTLB as= sociativity, 4K pages +0x80000005, 0, ecx, 7:0, l1_dcache_line_size , L1 dcache = line size, in bytes +0x80000005, 0, ecx, 15:8, l1_dcache_nlines , L1 dcache = lines per tag +0x80000005, 0, ecx, 23:16, l1_dcache_assoc , L1 dcache = associativity +0x80000005, 0, ecx, 31:24, l1_dcache_size_kb , L1 dcache = size, in KB +0x80000005, 0, edx, 7:0, l1_icache_line_size , L1 icache = line size, in bytes +0x80000005, 0, edx, 15:8, l1_icache_nlines , L1 icache = lines per tag +0x80000005, 0, edx, 23:16, l1_icache_assoc , L1 icache = associativity +0x80000005, 0, edx, 31:24, l1_icache_size_kb , L1 icache = size, in KB =20 # Leaf 80000006H -# Extended L2 Cache Features - -0x80000006, 0, ECX, 7:0, clsize, Cache Line size in bytes -0x80000006, 0, ECX, 15:12, l2c_assoc, L2 Associativity -0x80000006, 0, ECX, 31:16, csize, Cache size in 1K units - +# (Mostly AMD) L2 TLB, L2 cache, and L3 cache enumeration + +0x80000006, 0, eax, 11:0, l2_itlb_2m_4m_nentries , L2 iTLB #e= ntries, 2M and 4M pages +0x80000006, 0, eax, 15:12, l2_itlb_2m_4m_assoc , L2 iTLB as= sociativity, 2M and 4M pages +0x80000006, 0, eax, 27:16, l2_dtlb_2m_4m_nentries , L2 dTLB #e= ntries, 2M and 4M pages +0x80000006, 0, eax, 31:28, l2_dtlb_2m_4m_assoc , L2 dTLB as= sociativity, 2M and 4M pages +0x80000006, 0, ebx, 11:0, l2_itlb_4k_nentries , L2 iTLB #e= ntries, 4K pages +0x80000006, 0, ebx, 15:12, l2_itlb_4k_assoc , L2 iTLB as= sociativity, 4K pages +0x80000006, 0, ebx, 27:16, l2_dtlb_4k_nentries , L2 dTLB #e= ntries, 4K pages +0x80000006, 0, ebx, 31:28, l2_dtlb_4k_assoc , L2 dTLB as= sociativity, 4K pages +0x80000006, 0, ecx, 7:0, l2_line_size , L2 cache l= ine size, in bytes +0x80000006, 0, ecx, 11:8, l2_nlines , L2 cache n= umber of lines per tag +0x80000006, 0, ecx, 15:12, l2_assoc , L2 cache a= ssociativity +0x80000006, 0, ecx, 31:16, l2_size_kb , L2 cache s= ize, in KB +0x80000006, 0, edx, 7:0, l3_line_size , L3 cache l= ine size, in bytes +0x80000006, 0, edx, 11:8, l3_nlines , L3 cache n= umber of lines per tag +0x80000006, 0, edx, 15:12, l3_assoc , L3 cache a= ssociativity +0x80000006, 0, edx, 31:18, l3_size_range , L3 cache s= ize range =20 # Leaf 80000007H - -0x80000007, 0, EDX, 8, nonstop_tsc, Invariant TSC available - +# CPU power management (mostly AMD) and AMD RAS enumeration + +0x80000007, 0, ebx, 0, overflow_recov , MCA overfl= ow conditions not fatal +0x80000007, 0, ebx, 1, succor , Software c= ontainment of UnCORRectable errors +0x80000007, 0, ebx, 2, hw_assert , Hardware a= ssert MSRs +0x80000007, 0, ebx, 3, smca , Scalable M= CA (MCAX MSRs) +0x80000007, 0, ecx, 31:0, cpu_pwr_sample_ratio , CPU power = sample time ratio +0x80000007, 0, edx, 0, digital_temp , Digital te= mprature sensor +0x80000007, 0, edx, 1, powernow_freq_id , PowerNOW! = frequency scaling +0x80000007, 0, edx, 2, powernow_volt_id , PowerNOW! = voltage scaling +0x80000007, 0, edx, 3, thermal_trip , THERMTRIP = (Thermal Trip) +0x80000007, 0, edx, 4, hw_thermal_control , Hardware t= hermal control +0x80000007, 0, edx, 5, sw_thermal_control , Software t= hermal control +0x80000007, 0, edx, 6, 100mhz_steps , 100 MHz mu= ltiplier control +0x80000007, 0, edx, 7, hw_pstate , Hardware P= -state control +0x80000007, 0, edx, 8, constant_tsc , TSC ticks = at constant rate across all P and C states +0x80000007, 0, edx, 9, cpb , Core perfo= rmance boost +0x80000007, 0, edx, 10, eff_freq_ro , Read-only = effective frequency interface +0x80000007, 0, edx, 11, proc_feedback , Processor = feedback interface (deprecated) +0x80000007, 0, edx, 12, acc_power , Processor = power reporting interface +0x80000007, 0, edx, 13, connected_standby , CPU Connec= ted Standby support +0x80000007, 0, edx, 14, rapl , Runtime Av= erage Power Limit interface =20 # Leaf 80000008H - -0x80000008, 0, EAX, 7:0, phy_adr_bits, Physical Address Bits -0x80000008, 0, EAX, 15:8, lnr_adr_bits, Linear Address Bits -0x80000007, 0, EBX, 9, wbnoinvd, WBNOINVD - -# 0x8000001E -# EAX: Extended APIC ID -0x8000001E, 0, EAX, 31:0, extended_apic_id, Extended APIC ID -# EBX: Core Identifiers -0x8000001E, 0, EBX, 7:0, core_id, Identifies the logical core ID -0x8000001E, 0, EBX, 15:8, threads_per_core, The number of threads per core= is threads_per_core + 1 -# ECX: Node Identifiers -0x8000001E, 0, ECX, 7:0, node_id, Node ID -0x8000001E, 0, ECX, 10:8, nodes_per_processor, Nodes per processor { 0: 1 = node, else reserved } - -# 8000001F: AMD Secure Encryption -0x8000001F, 0, EAX, 0, sme, Secure Memory Encryption -0x8000001F, 0, EAX, 1, sev, Secure Encrypted Virtualization -0x8000001F, 0, EAX, 2, vmpgflush, VM Page Flush MSR -0x8000001F, 0, EAX, 3, seves, SEV Encrypted State -0x8000001F, 0, EBX, 5:0, c-bit, Page table bit number used to enable memo= ry encryption -0x8000001F, 0, EBX, 11:6, mem_encrypt_physaddr_width, Reduction of physica= l address space in bits with SME enabled -0x8000001F, 0, ECX, 31:0, num_encrypted_guests, Maximum ASID value that ma= y be used for an SEV-enabled guest -0x8000001F, 0, EDX, 31:0, minimum_sev_asid, Minimum ASID value that must b= e used for an SEV-enabled, SEV-ES-disabled guest +# CPU capacity parameters and extended feature flags (mostly AMD) + +0x80000008, 0, eax, 7:0, phys_addr_bits , Max physic= al address bits +0x80000008, 0, eax, 15:8, virt_addr_bits , Max virtua= l address bits +0x80000008, 0, eax, 23:16, guest_phys_addr_bits , Max nested= -paging guest physical address bits +0x80000008, 0, ebx, 0, clzero , CLZERO sup= ported +0x80000008, 0, ebx, 1, irperf , Instructio= n retired counter MSR +0x80000008, 0, ebx, 2, xsaveerptr , XSAVE/XRST= OR always saves/restores FPU error pointers +0x80000008, 0, ebx, 3, invlpgb , INVLPGB br= oadcasts a TLB invalidate to all threads +0x80000008, 0, ebx, 4, rdpru , RDPRU (Rea= d Processor Register at User level) supported +0x80000008, 0, ebx, 6, mba , Memory Ban= dwidth Allocation (AMD bit) +0x80000008, 0, ebx, 8, mcommit , MCOMMIT (M= emory commit) supported +0x80000008, 0, ebx, 9, wbnoinvd , WBNOINVD s= upported +0x80000008, 0, ebx, 12, amd_ibpb , Indirect B= ranch Prediction Barrier +0x80000008, 0, ebx, 13, wbinvd_int , Interrupti= ble WBINVD/WBNOINVD +0x80000008, 0, ebx, 14, amd_ibrs , Indirect B= ranch Restricted Speculation +0x80000008, 0, ebx, 15, amd_stibp , Single Thr= ead Indirect Branch Prediction mode +0x80000008, 0, ebx, 16, ibrs_always_on , IBRS alway= s-on preferred +0x80000008, 0, ebx, 17, amd_stibp_always_on , STIBP alwa= ys-on preferred +0x80000008, 0, ebx, 18, ibrs_fast , IBRS is pr= eferred over software solution +0x80000008, 0, ebx, 19, ibrs_same_mode , IBRS provi= des same mode protection +0x80000008, 0, ebx, 20, no_efer_lmsle , EFER[LMSLE= ] bit (Long-Mode Segment Limit Enable) unsupported +0x80000008, 0, ebx, 21, tlb_flush_nested , INVLPGB RA= X[5] bit can be set (nested translations) +0x80000008, 0, ebx, 23, amd_ppin , Protected = Processor Inventory Number +0x80000008, 0, ebx, 24, amd_ssbd , Speculativ= e Store Bypass Disable +0x80000008, 0, ebx, 25, virt_ssbd , virtualize= d SSBD (Speculative Store Bypass Disable) +0x80000008, 0, ebx, 26, amd_ssb_no , SSBD not n= eeded (fixed in HW) +0x80000008, 0, ebx, 27, cppc , Collaborat= ive Processor Performance Control +0x80000008, 0, ebx, 28, amd_psfd , Predictive= Store Forward Disable +0x80000008, 0, ebx, 29, btc_no , CPU not af= fected by Branch Type Confusion +0x80000008, 0, ebx, 30, ibpb_ret , IBPB clear= s RSB/RAS too +0x80000008, 0, ebx, 31, brs , Branch Sam= pling supported +0x80000008, 0, ecx, 7:0, cpu_nthreads , Number of = physical threads - 1 +0x80000008, 0, ecx, 15:12, apicid_coreid_len , Number of = thread core ID bits (shift) in APIC ID +0x80000008, 0, ecx, 17:16, perf_tsc_len , Performanc= e time-stamp counter size +0x80000008, 0, edx, 15:0, invlpgb_max_pages , INVLPGB ma= ximum page count +0x80000008, 0, edx, 31:16, rdpru_max_reg_id , RDPRU max = register ID (ECX input) + +# Leaf 8000000AH +# AMD SVM (Secure Virtual Machine) enumeration + +0x8000000a, 0, eax, 7:0, svm_version , SVM revisi= on number +0x8000000a, 0, ebx, 31:0, svm_nasid , Number of = address space identifiers (ASID) +0x8000000a, 0, edx, 0, npt , Nested pag= ing +0x8000000a, 0, edx, 1, lbrv , LBR virtua= lization +0x8000000a, 0, edx, 2, svm_lock , SVM lock +0x8000000a, 0, edx, 3, nrip_save , NRIP save = support on #VMEXIT +0x8000000a, 0, edx, 4, tsc_scale , MSR based = TSC rate control +0x8000000a, 0, edx, 5, vmcb_clean , VMCB clean= bits support +0x8000000a, 0, edx, 6, flushbyasid , Flush by A= SID + Extended VMCB TLB_Control +0x8000000a, 0, edx, 7, decodeassists , Decode Ass= ists support +0x8000000a, 0, edx, 10, pausefilter , Pause inte= rcept filter +0x8000000a, 0, edx, 12, pfthreshold , Pause filt= er threshold +0x8000000a, 0, edx, 13, avic , Advanced v= irtual interrupt controller +0x8000000a, 0, edx, 15, v_vmsave_vmload , Virtual VM= SAVE/VMLOAD (nested virt) +0x8000000a, 0, edx, 16, vgif , Virtualize= the Global Interrupt Flag +0x8000000a, 0, edx, 17, gmet , Guest mode= execution trap +0x8000000a, 0, edx, 18, x2avic , Virtual x2= APIC +0x8000000a, 0, edx, 19, sss_check , Supervisor= Shadow Stack restrictions +0x8000000a, 0, edx, 20, v_spec_ctrl , Virtual SP= EC_CTRL +0x8000000a, 0, edx, 21, ro_gpt , Read-Only = guest page table support +0x8000000a, 0, edx, 23, h_mce_override , Host MCE o= verride +0x8000000a, 0, edx, 24, tlbsync_int , TLBSYNC in= tercept + INVLPGB/TLBSYNC in VMCB +0x8000000a, 0, edx, 25, vnmi , NMI virtua= lization +0x8000000a, 0, edx, 26, ibs_virt , IBS Virtua= lization +0x8000000a, 0, edx, 27, ext_lvt_off_chg , Extended L= VT offset fault change +0x8000000a, 0, edx, 28, svme_addr_chk , Guest SVME= addr check + +# Leaf 80000019H +# AMD TLB 1G-pages enumeration + +0x80000019, 0, eax, 11:0, l1_itlb_1g_nentries , L1 iTLB #e= ntries, 1G pages +0x80000019, 0, eax, 15:12, l1_itlb_1g_assoc , L1 iTLB as= sociativity, 1G pages +0x80000019, 0, eax, 27:16, l1_dtlb_1g_nentries , L1 dTLB #e= ntries, 1G pages +0x80000019, 0, eax, 31:28, l1_dtlb_1g_assoc , L1 dTLB as= sociativity, 1G pages +0x80000019, 0, ebx, 11:0, l2_itlb_1g_nentries , L2 iTLB #e= ntries, 1G pages +0x80000019, 0, ebx, 15:12, l2_itlb_1g_assoc , L2 iTLB as= sociativity, 1G pages +0x80000019, 0, ebx, 27:16, l2_dtlb_1g_nentries , L2 dTLB #e= ntries, 1G pages +0x80000019, 0, ebx, 31:28, l2_dtlb_1g_assoc , L2 dTLB as= sociativity, 1G pages + +# Leaf 8000001AH +# AMD instruction optimizations enumeration + +0x8000001a, 0, eax, 0, fp_128 , Internal F= P/SIMD exec data path is 128-bits wide +0x8000001a, 0, eax, 1, movu_preferred , SSE: MOVU*= better than MOVL*/MOVH* +0x8000001a, 0, eax, 2, fp_256 , internal F= P/SSE exec data path is 256-bits wide + +# Leaf 8000001BH +# AMD IBS (Instruction-Based Sampling) enumeration + +0x8000001b, 0, eax, 0, ibs_flags_valid , IBS featur= e flags valid +0x8000001b, 0, eax, 1, ibs_fetch_sampling , IBS fetch = sampling supported +0x8000001b, 0, eax, 2, ibs_op_sampling , IBS execut= ion sampling supported +0x8000001b, 0, eax, 3, ibs_rdwr_op_counter , IBS read/w= rite of op counter supported +0x8000001b, 0, eax, 4, ibs_op_count , IBS OP cou= nting mode supported +0x8000001b, 0, eax, 5, ibs_branch_target , IBS branch= target address reporting supported +0x8000001b, 0, eax, 6, ibs_op_counters_ext , IBS IbsOpC= urCnt/IbsOpMaxCnt extend by 7 bits +0x8000001b, 0, eax, 7, ibs_rip_invalid_chk , IBS invali= d RIP indication supported +0x8000001b, 0, eax, 8, ibs_op_branch_fuse , IBS fused = branch micro-op indication supported +0x8000001b, 0, eax, 9, ibs_fetch_ctl_ext , IBS Fetch = Control Extended MSR (0xc001103c) supported +0x8000001b, 0, eax, 10, ibs_op_data_4 , IBS op dat= a 4 MSR supported +0x8000001b, 0, eax, 11, ibs_l3_miss_filter , IBS L3-mis= s filtering supported (Zen4+) + +# Leaf 8000001CH +# AMD LWP (Lightweight Profiling) + +0x8000001c, 0, eax, 0, os_lwp_avail , LWP is ava= ilable to application programs (supported by OS) +0x8000001c, 0, eax, 1, os_lpwval , LWPVAL ins= truction (EventId=3D1) is supported by OS +0x8000001c, 0, eax, 2, os_lwp_ire , Instructio= ns Retired Event (EventId=3D2) is supported by OS +0x8000001c, 0, eax, 3, os_lwp_bre , Branch Ret= ired Event (EventId=3D3) is supported by OS +0x8000001c, 0, eax, 4, os_lwp_dme , DCache Mis= s Event (EventId=3D4) is supported by OS +0x8000001c, 0, eax, 5, os_lwp_cnh , CPU Clocks= Not Halted event (EventId=3D5) is supported by OS +0x8000001c, 0, eax, 6, os_lwp_rnh , CPU Refere= nce clocks Not Halted event (EventId=3D6) is supported by OS +0x8000001c, 0, eax, 29, os_lwp_cont , LWP sampli= ng in continuous mode is supported by OS +0x8000001c, 0, eax, 30, os_lwp_ptsc , Performanc= e Time Stamp Counter in event records is supported by OS +0x8000001c, 0, eax, 31, os_lwp_int , Interrupt = on threshold overflow is supported by OS +0x8000001c, 0, ebx, 7:0, lwp_lwpcb_sz , LWP Contro= l Block size, in quadwords +0x8000001c, 0, ebx, 15:8, lwp_event_sz , LWP event = record size, in bytes +0x8000001c, 0, ebx, 23:16, lwp_max_events , LWP max su= pported EventId value (EventID 255 not included) +0x8000001c, 0, ebx, 31:24, lwp_event_offset , LWP events= area offset in the LWP Control Block +0x8000001c, 0, ecx, 4:0, lwp_latency_max , Num of bit= s in cache latency counters (10 to 31) +0x8000001c, 0, ecx, 5, lwp_data_adddr , Cache miss= events report the data address of the reference +0x8000001c, 0, ecx, 8:6, lwp_latency_rnd , Amount by = which cache latency is rounded +0x8000001c, 0, ecx, 15:9, lwp_version , LWP implem= entation version +0x8000001c, 0, ecx, 23:16, lwp_buf_min_sz , LWP event = ring buffer min size, in units of 32 event records +0x8000001c, 0, ecx, 28, lwp_branch_predict , Branches R= etired events can be filtered +0x8000001c, 0, ecx, 29, lwp_ip_filtering , IP filteri= ng (IPI, IPF, BaseIP, and LimitIP @ LWPCP) supported +0x8000001c, 0, ecx, 30, lwp_cache_levels , Cache-rela= ted events can be filtered by cache level +0x8000001c, 0, ecx, 31, lwp_cache_latency , Cache-rela= ted events can be filtered by latency +0x8000001c, 0, edx, 0, hw_lwp_avail , LWP is ava= ilable in Hardware +0x8000001c, 0, edx, 1, hw_lpwval , LWPVAL ins= truction (EventId=3D1) is available in HW +0x8000001c, 0, edx, 2, hw_lwp_ire , Instructio= ns Retired Event (EventId=3D2) is available in HW +0x8000001c, 0, edx, 3, hw_lwp_bre , Branch Ret= ired Event (EventId=3D3) is available in HW +0x8000001c, 0, edx, 4, hw_lwp_dme , DCache Mis= s Event (EventId=3D4) is available in HW +0x8000001c, 0, edx, 5, hw_lwp_cnh , CPU Clocks= Not Halted event (EventId=3D5) is available in HW +0x8000001c, 0, edx, 6, hw_lwp_rnh , CPU Refere= nce clocks Not Halted event (EventId=3D6) is available in HW +0x8000001c, 0, edx, 29, hw_lwp_cont , LWP sampli= ng in continuous mode is available in HW +0x8000001c, 0, edx, 30, hw_lwp_ptsc , Performanc= e Time Stamp Counter in event records is available in HW +0x8000001c, 0, edx, 31, hw_lwp_int , Interrupt = on threshold overflow is available in HW + +# Leaf 8000001DH +# AMD deterministic cache parameters + +0x8000001d, 31:0, eax, 4:0, cache_type , Cache type= field +0x8000001d, 31:0, eax, 7:5, cache_level , Cache leve= l (1-based) +0x8000001d, 31:0, eax, 8, cache_self_init , Self-initi= alizing cache level +0x8000001d, 31:0, eax, 9, fully_associative , Fully-asso= ciative cache +0x8000001d, 31:0, eax, 25:14, num_threads_sharing , Number of = logical CPUs sharing cache +0x8000001d, 31:0, ebx, 11:0, cache_linesize , System coh= erency line size (0-based) +0x8000001d, 31:0, ebx, 21:12, cache_npartitions , Physical l= ine partitions (0-based) +0x8000001d, 31:0, ebx, 31:22, cache_nways , Ways of as= sociativity (0-based) +0x8000001d, 31:0, ecx, 30:0, cache_nsets , Cache numb= er of sets (0-based) +0x8000001d, 31:0, edx, 0, wbinvd_rll_no_guarantee, WBINVD/INV= D not guaranteed for Remote Lower-Level caches +0x8000001d, 31:0, edx, 1, ll_inclusive , Cache is i= nclusive of Lower-Level caches + +# Leaf 8000001EH +# AMD CPU topology enumeration + +0x8000001e, 0, eax, 31:0, ext_apic_id , Extended A= PIC ID +0x8000001e, 0, ebx, 7:0, core_id , Unique per= -socket logical core unit ID +0x8000001e, 0, ebx, 15:8, core_nthreas , #Threads p= er core (zero-based) +0x8000001e, 0, ecx, 7:0, node_id , Node (die)= ID of invoking logical CPU +0x8000001e, 0, ecx, 10:8, nnodes_per_socket , #nodes in = invoking logical CPU's package/socket + +# Leaf 8000001FH +# AMD encrypted memory capabilities enumeration (SME/SEV) + +0x8000001f, 0, eax, 0, sme , Secure Mem= ory Encryption supported +0x8000001f, 0, eax, 1, sev , Secure Enc= rypted Virtualization supported +0x8000001f, 0, eax, 2, vm_page_flush , VM Page Fl= ush MSR (0xc001011e) available +0x8000001f, 0, eax, 3, sev_es , SEV Encryp= ted State supported +0x8000001f, 0, eax, 4, sev_nested_paging , SEV secure= nested paging supported +0x8000001f, 0, eax, 5, vm_permission_levels , VMPL suppo= rted +0x8000001f, 0, eax, 6, rpmquery , RPMQUERY i= nstruction supported +0x8000001f, 0, eax, 7, vmpl_sss , VMPL super= visor shadwo stack supported +0x8000001f, 0, eax, 8, secure_tsc , Secure TSC= supported +0x8000001f, 0, eax, 9, v_tsc_aux , Hardware v= irtualizes TSC_AUX +0x8000001f, 0, eax, 10, sme_coherent , HW enforce= s cache coherency across encryption domains +0x8000001f, 0, eax, 11, req_64bit_hypervisor , SEV guest = mandates 64-bit hypervisor +0x8000001f, 0, eax, 12, restricted_injection , Restricted= Injection supported +0x8000001f, 0, eax, 13, alternate_injection , Alternate = Injection supported +0x8000001f, 0, eax, 14, debug_swap , SEV-ES: fu= ll debug state swap is supported +0x8000001f, 0, eax, 15, disallow_host_ibs , SEV-ES: Di= sallowing IBS use by the host is supported +0x8000001f, 0, eax, 16, virt_transparent_enc , Virtual Tr= ansparent Encryption +0x8000001f, 0, eax, 17, vmgexit_paremeter , VmgexitPar= ameter is supported in SEV_FEATURES +0x8000001f, 0, eax, 18, virt_tom_msr , Virtual TO= M MSR is supported +0x8000001f, 0, eax, 19, virt_ibs , IBS state = virtualization is supported for SEV-ES guests +0x8000001f, 0, eax, 24, vmsa_reg_protection , VMSA regis= ter protection is supported +0x8000001f, 0, eax, 25, smt_protection , SMT protec= tion is supported +0x8000001f, 0, eax, 28, svsm_page_msr , SVSM commu= nication page MSR (0xc001f000h) is supported +0x8000001f, 0, eax, 29, nested_virt_snp_msr , VIRT_RMPUP= DATE/VIRT_PSMASH MSRs are supported +0x8000001f, 0, ebx, 5:0, pte_cbit_pos , PTE bit nu= mber used to enable memory encryption +0x8000001f, 0, ebx, 11:6, phys_addr_reduction_nbits, Reductio= n of phys address space when encryption is enabled, in bits +0x8000001f, 0, ebx, 15:12, vmpl_count , Number of = VM permission levels (VMPL) supported +0x8000001f, 0, ecx, 31:0, enc_guests_max , Max suppor= ted number of simultaneous encrypted guests +0x8000001f, 0, edx, 31:0, min_sev_asid_no_sev_es , Mininum AS= ID for SEV-enabled SEV-ES-disabled guest + +# Leaf 80000020H +# AMD Platform QoS extended feature IDs + +0x80000020, 0, ebx, 1, mba , Memory Ban= dwidth Allocation support +0x80000020, 0, ebx, 2, smba , Slow Memor= y Bandwidth Allocation support +0x80000020, 0, ebx, 3, bmec , Bandwidth = Monitoring Event Configuration support +0x80000020, 0, ebx, 4, l3rr , L3 Range R= eservation support +0x80000020, 1, eax, 31:0, mba_limit_len , MBA enforc= ement limit size +0x80000020, 1, edx, 31:0, mba_cos_max , MBA max Cl= ass of Service number (zero-based) +0x80000020, 2, eax, 31:0, smba_limit_len , SMBA enfor= cement limit size +0x80000020, 2, edx, 31:0, smba_cos_max , SMBA max C= lass of Service number (zero-based) +0x80000020, 3, ebx, 7:0, bmec_num_events , BMEC numbe= r of bandwidth events available +0x80000020, 3, ecx, 0, bmec_local_reads , Local NUMA= reads can be tracked +0x80000020, 3, ecx, 1, bmec_remote_reads , Remote NUM= A reads can be tracked +0x80000020, 3, ecx, 2, bmec_local_nontemp_wr , Local NUMA= non-temporal writes can be tracked +0x80000020, 3, ecx, 3, bmec_remote_nontemp_wr , Remote NUM= A non-temporal writes can be tracked +0x80000020, 3, ecx, 4, bmec_local_slow_mem_rd , Local NUMA= slow-memory reads can be tracked +0x80000020, 3, ecx, 5, bmec_remote_slow_mem_rd, Remote NUM= A slow-memory reads can be tracked +0x80000020, 3, ecx, 6, bmec_all_dirty_victims , Dirty QoS = victims to all types of memory can be tracked + +# Leaf 80000021H +# AMD extended features enumeration 2 + +0x80000021, 0, eax, 0, no_nested_data_bp , No nested = data breakpoints +0x80000021, 0, eax, 1, fsgs_non_serializing , WRMSR to {= FS,GS,KERNEL_GS}_BASE is non-serializing +0x80000021, 0, eax, 2, lfence_rdtsc , LFENCE alw= ays serializing / synchronizes RDTSC +0x80000021, 0, eax, 3, smm_page_cfg_lock , SMM paging= configuration lock is supported +0x80000021, 0, eax, 6, null_sel_clr_base , Null selec= tor clears base +0x80000021, 0, eax, 7, upper_addr_ignore , EFER MSR U= pper Address Ignore Enable bit supported +0x80000021, 0, eax, 8, autoibrs , EFER MSR A= utomatic IBRS enable bit supported +0x80000021, 0, eax, 9, no_smm_ctl_msr , SMM_CTL MS= R (0xc0010116) is not present +0x80000021, 0, eax, 10, fsrs_supported , Fast Short= Rep Stosb (FSRS) is supported +0x80000021, 0, eax, 11, fsrc_supported , Fast Short= Repe Cmpsb (FSRC) is supported +0x80000021, 0, eax, 13, prefetch_ctl_msr , Prefetch c= ontrol MSR is supported +0x80000021, 0, eax, 17, user_cpuid_disable , #GP when e= xecuting CPUID at CPL > 0 is supported +0x80000021, 0, eax, 18, epsf_supported , Enhanced P= redictive Store Forwarding (EPSF) is supported +0x80000021, 0, ebx, 11:0, microcode_patch_size , Size of mi= crocode patch, in 16-byte units + +# Leaf 80000022H +# AMD Performance Monitoring v2 enumeration + +0x80000022, 0, eax, 0, perfmon_v2 , Performanc= e monitoring v2 supported +0x80000022, 0, eax, 1, lbr_v2 , Last Branc= h Record v2 extensions (LBR Stack) +0x80000022, 0, eax, 2, lbr_pmc_freeze , Freezing c= ore performance counters / LBR Stack supported +0x80000022, 0, ebx, 3:0, n_pmc_core , Number of = core perfomance counters +0x80000022, 0, ebx, 9:4, lbr_v2_stack_size , Number of = available LBR stack entries +0x80000022, 0, ebx, 15:10, n_pmc_northbridge , Number of = available northbridge (data fabric) performance counters +0x80000022, 0, ebx, 21:16, n_pmc_umc , Number of = available UMC performance counters +0x80000022, 0, ecx, 31:0, active_umc_bitmask , Active UMC= s bitmask + +# Leaf 80000023H +# AMD Secure Multi-key Encryption enumeration + +0x80000023, 0, eax, 0, mem_hmk_mode , MEM-HMK en= cryption mode is supported +0x80000023, 0, ebx, 15:0, mem_hmk_avail_keys , MEM-HMK mo= de: total num of available encryption keys + +# Leaf 80000026H +# AMD extended topology enumeration v2 + +0x80000026, 3:0, eax, 4:0, x2apic_id_shift , Bit width = of this level (previous levels inclusive) +0x80000026, 3:0, eax, 29, core_has_pwreff_ranking, This core = has a power efficiency ranking +0x80000026, 3:0, eax, 30, domain_has_hybrid_cores, This domai= n level has hybrid (E, P) cores +0x80000026, 3:0, eax, 31, domain_core_count_asymm, The 'Core'= domain has asymmetric cores count +0x80000026, 3:0, ebx, 15:0, domain_lcpus_count , Number of = logical CPUs at this domain instance +0x80000026, 3:0, ebx, 23:16, core_pwreff_ranking , This core'= s static power efficiency ranking +0x80000026, 3:0, ebx, 27:24, core_native_model_id , This core'= s native model ID +0x80000026, 3:0, ebx, 31:28, core_type , This core'= s type +0x80000026, 3:0, ecx, 7:0, domain_level , This domai= n level (subleaf ID) +0x80000026, 3:0, ecx, 15:8, domain_type , This domai= n type +0x80000026, 3:0, edx, 31:0, x2apic_id , x2APIC ID = of current logical CPU diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c index 24b7d017ec2c..1b25c0a95d3f 100644 --- a/tools/arch/x86/kcpuid/kcpuid.c +++ b/tools/arch/x86/kcpuid/kcpuid.c @@ -7,7 +7,8 @@ #include #include =20 -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define min(a, b) (((a) < (b)) ? (a) : (b)) =20 typedef unsigned int u32; typedef unsigned long long u64; @@ -76,7 +77,6 @@ struct cpuid_range { */ struct cpuid_range *leafs_basic, *leafs_ext; =20 -static int num_leafs; static bool is_amd; static bool show_details; static bool show_raw; @@ -98,27 +98,17 @@ static inline void cpuid(u32 *eax, u32 *ebx, u32 *ecx, u3= 2 *edx) =20 static inline bool has_subleafs(u32 f) { - if (f =3D=3D 0x7 || f =3D=3D 0xd) - return true; - - if (is_amd) { - if (f =3D=3D 0x8000001d) + u32 with_subleaves[] =3D { + 0x4, 0x7, 0xb, 0xd, 0xf, 0x10, 0x12, + 0x14, 0x17, 0x18, 0x1b, 0x1d, 0x1f, 0x23, + 0x8000001d, 0x80000020, 0x80000026, + }; + + for (unsigned i =3D 0; i < ARRAY_SIZE(with_subleaves); i++) + if (f =3D=3D with_subleaves[i]) return true; - return false; - } =20 - switch (f) { - case 0x4: - case 0xb: - case 0xf: - case 0x10: - case 0x14: - case 0x18: - case 0x1f: - return true; - default: - return false; - } + return false; } =20 static void leaf_print_raw(struct subleaf *leaf) @@ -204,15 +194,12 @@ static void raw_dump_range(struct cpuid_range *range) } } =20 -#define MAX_SUBLEAF_NUM 32 +#define MAX_SUBLEAF_NUM 64 struct cpuid_range *setup_cpuid_range(u32 input_eax) { - u32 max_func, idx_func; - int subleaf; + u32 max_func, idx_func, subleaf, max_subleaf; + u32 eax, ebx, ecx, edx, f =3D input_eax; struct cpuid_range *range; - u32 eax, ebx, ecx, edx; - u32 f =3D input_eax; - int max_subleaf; bool allzero; =20 eax =3D input_eax; @@ -246,7 +233,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax) allzero =3D cpuid_store(range, f, subleaf, eax, ebx, ecx, edx); if (allzero) continue; - num_leafs++; =20 if (!has_subleafs(f)) continue; @@ -257,11 +243,18 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax) * Some can provide the exact number of subleafs, * others have to be tried (0xf) */ - if (f =3D=3D 0x7 || f =3D=3D 0x14 || f =3D=3D 0x17 || f =3D=3D 0x18) - max_subleaf =3D (eax & 0xff) + 1; - + if (f =3D=3D 0x7 || f =3D=3D 0x14 || f =3D=3D 0x17 || f =3D=3D 0x18 || f = =3D=3D 0x1d) + max_subleaf =3D min((eax & 0xff) + 1, max_subleaf); if (f =3D=3D 0xb) max_subleaf =3D 2; + if (f =3D=3D 0x1f) + max_subleaf =3D 6; + if (f =3D=3D 0x23) + max_subleaf =3D 4; + if (f =3D=3D 0x80000020) + max_subleaf =3D 4; + if (f =3D=3D 0x80000026) + max_subleaf =3D 5; =20 for (subleaf =3D 1; subleaf < max_subleaf; subleaf++) { eax =3D f; @@ -272,7 +265,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax) eax, ebx, ecx, edx); if (allzero) continue; - num_leafs++; } =20 } @@ -313,6 +305,8 @@ static int parse_line(char *line) struct bits_desc *bdesc; int reg_index; char *start, *end; + u32 subleaf_start, subleaf_end; + unsigned bit_start, bit_end; =20 /* Skip comments and NULL line */ if (line[0] =3D=3D '#' || line[0] =3D=3D '\n') @@ -351,13 +345,25 @@ static int parse_line(char *line) return 0; =20 /* subleaf */ - sub =3D strtoul(tokens[1], NULL, 0); - if ((int)sub > func->nr) - return -1; + buf =3D tokens[1]; + end =3D strtok(buf, ":"); + start =3D strtok(NULL, ":"); + subleaf_end =3D strtoul(end, NULL, 0); + + /* A subleaf range is given? */ + if (start) { + subleaf_start =3D strtoul(start, NULL, 0); + subleaf_end =3D min(subleaf_end, (u32)(func->nr - 1)); + if (subleaf_start > subleaf_end) + return 0; + } else { + subleaf_start =3D subleaf_end; + if (subleaf_start > (u32)(func->nr - 1)) + return 0; + } =20 - leaf =3D &func->leafs[sub]; + /* register */ buf =3D tokens[2]; - if (strcasestr(buf, "EAX")) reg_index =3D R_EAX; else if (strcasestr(buf, "EBX")) @@ -369,23 +375,23 @@ static int parse_line(char *line) else goto err_exit; =20 - reg =3D &leaf->info[reg_index]; - bdesc =3D ®->descs[reg->nr++]; - /* bit flag or bits field */ buf =3D tokens[3]; - end =3D strtok(buf, ":"); - bdesc->end =3D strtoul(end, NULL, 0); - bdesc->start =3D bdesc->end; - - /* start !=3D NULL means it is bit fields */ start =3D strtok(NULL, ":"); - if (start) - bdesc->start =3D strtoul(start, NULL, 0); - - strcpy(bdesc->simp, tokens[4]); - strcpy(bdesc->detail, tokens[5]); + bit_end =3D strtoul(end, NULL, 0); + bit_start =3D (start) ? strtoul(start, NULL, 0) : bit_end; + + for (sub =3D subleaf_start; sub <=3D subleaf_end; sub++) { + leaf =3D &func->leafs[sub]; + reg =3D &leaf->info[reg_index]; + bdesc =3D ®->descs[reg->nr++]; + + bdesc->end =3D bit_end; + bdesc->start =3D bit_start; + strcpy(bdesc->simp, strtok(tokens[4], " \t")); + strcpy(bdesc->detail, tokens[5]); + } return 0; =20 err_exit: @@ -452,8 +458,9 @@ static void decode_bits(u32 value, struct reg_desc *rdesc= , enum cpuid_reg reg) if (start =3D=3D end) { /* single bit flag */ if (value & (1 << start)) - printf("\t%-20s %s%s\n", + printf("\t%-20s %s%s%s\n", bdesc->simp, + show_flags_only ? "" : "\t\t\t", show_details ? "-" : "", show_details ? bdesc->detail : "" ); . Date: Tue, 17 Sep 2024 11:01:09 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [GIT pull] irq/domain for v6.12-rc1 Linus, please pull the latest irq/domain branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-domain-2024-= 09-17 up to: 74c60a96ef6a: irqdomain: Remove stray '-' in the domain name Two small updates for interrupt domains: - Remove a stray '-' in the domain name - Consolidate and clarify the bus token checks so they explicitely check for DOMAIN_BUS_ANY instead of unspecified checks for zero. Thanks, tglx ------------------> Andy Shevchenko (2): irqdomain: Clarify checks for bus_token irqdomain: Remove stray '-' in the domain name kernel/irq/irqdomain.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 01001eb615ec..1acc5308fcb7 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -130,8 +130,10 @@ EXPORT_SYMBOL_GPL(irq_domain_free_fwnode); =20 static int alloc_name(struct irq_domain *domain, char *base, enum irq_domain= _bus_token bus_token) { - domain->name =3D bus_token ? kasprintf(GFP_KERNEL, "%s-%d", base, bus_token= ) : - kasprintf(GFP_KERNEL, "%s", base); + if (bus_token =3D=3D DOMAIN_BUS_ANY) + domain->name =3D kasprintf(GFP_KERNEL, "%s", base); + else + domain->name =3D kasprintf(GFP_KERNEL, "%s-%d", base, bus_token); if (!domain->name) return -ENOMEM; =20 @@ -146,8 +148,10 @@ static int alloc_fwnode_name(struct irq_domain *domain, = const struct fwnode_hand const char *suf =3D suffix ? : ""; char *name; =20 - name =3D bus_token ? kasprintf(GFP_KERNEL, "%pfw-%s%s%d", fwnode, suf, sep,= bus_token) : - kasprintf(GFP_KERNEL, "%pfw-%s", fwnode, suf); + if (bus_token =3D=3D DOMAIN_BUS_ANY) + name =3D kasprintf(GFP_KERNEL, "%pfw%s%s", fwnode, sep, suf); + else + name =3D kasprintf(GFP_KERNEL, "%pfw%s%s-%d", fwnode, sep, suf, bus_token); if (!name) return -ENOMEM; =20 @@ -166,11 +170,13 @@ static int alloc_unknown_name(struct irq_domain *domain= , enum irq_domain_bus_tok static atomic_t unknown_domains; int id =3D atomic_inc_return(&unknown_domains); =20 - domain->name =3D bus_token ? kasprintf(GFP_KERNEL, "unknown-%d-%d", id, bus= _token) : - kasprintf(GFP_KERNEL, "unknown-%d", id); - + if (bus_token =3D=3D DOMAIN_BUS_ANY) + domain->name =3D kasprintf(GFP_KERNEL, "unknown-%d", id); + else + domain->name =3D kasprintf(GFP_KERNEL, "unknown-%d-%d", id, bus_token); if (!domain->name) return -ENOMEM; + domain->flags |=3D IRQ_DOMAIN_NAME_ALLOCATED; return 0; } @@ -200,7 +206,7 @@ static int irq_domain_set_name(struct irq_domain *domain,= const struct irq_domai return alloc_name(domain, fwid->name, bus_token); default: domain->name =3D fwid->name; - if (bus_token) + if (bus_token !=3D DOMAIN_BUS_ANY) return alloc_name(domain, fwid->name, bus_token); } =20 . Date: Tue, 17 Sep 2024 11:39:56 +0200 From: Bartosz Golaszewski To: Linus Torvalds Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [GIT PULL] gpio updates for v6.12-rc1 From: Bartosz Golaszewski Linus, Here are the updates from the GPIO tree for the next release. We have one new driver, some improvements to core GPIO code, various changes in drivers and their DT bindings as well fixes to kerneldocs. Overall it has been a slow cycle, most likely due to the summertime vacation period and the changelog reflects it. The merge from the MFD tree is there to pull dependencies for the new driver. There is a trivial conflict with the SoC tree (just drop arch/arm/mach-ep93xx/vision_ep9307.c). Details are in the signed tag. Please pull. Bartosz Golaszewski The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-updates-for-v6.12-rc1 for you to fetch changes up to 6b5e97c020060c2b8ad286002415106ab7034435: gpio: mpc8xxx: switch to using DEFINE_RUNTIME_DEV_PM_OPS() (2024-09-06 08:50:48 +0200) ---------------------------------------------------------------- gpio updates for v6.12-rc1 Core GPIOLIB: - provide and add users for a macro allowing to iterate over accepted GPIO property names of consumer device nodes - remove legacy definitions that are no longer used - put legacy GPIO devres helpers together with the rest of the deprecated code - implement and use swnode_gpio_get_reference(): a wrapper simplifying the underlying calls to fwnode_property_get_reference_args() - use IS_ERR_OR_NULL() where it makes sense - replace of_find_property() with of_property_present() - simplify code with the scoped variant of OF-node children iterator Documentation: - update GPIO kerneldocs with Return sections - fix "Excess struct member description" warnings now being triggered with W=1 New drivers: - add support for Analog Devices ADP5585 Driver improvements: - add support for wake-on-GPIO to gpio-mpc8xxx - use GPIO_LOOKUP_IDX() in gpio-virtuser - use devm_clk_get_[optional_]enabled() where applicable in several drivers - replace OF-specific functions with provider-agnostic alternatives where possible - drop support for legacy platform data from gpio-ath79 and gpio-davinci - refactor gpio-stmpe - improve error reporting in gpio-pca953x - add support for reading the direction of pins for some models to gpio-vf610 DT bindings: - convert the bindings for nxp,lpc3220 to YAML - add gpio-reserved-ranges to gpio-davinci - simplify the GPIO hog schema - fix a GPIO hog issue in bindings for fcs,fxl6408 Other: - fix format specifiers in user-space tools - remove leftover files on make clean in tools/gpio/ ---------------------------------------------------------------- Andy Shevchenko (22): gpiolib: Introduce for_each_gpio_property_name() helper gpiolib: swnode: Unify return code variable name gpiolib: swnode: Introduce swnode_gpio_get_reference() helper gpiolib: swnode: Make use of for_each_gpio_property_name() gpiolib: Replace gpio_suffix_count with NULL-terminated array gpio: virtuser: Use GPIO_LOOKUP_IDX() macro gpiolib: legacy: Kill GPIOF_INIT_* definitions gpiolib: legacy: Kill GPIOF_DIR_* definitions gpio: tegra: Replace of_node_to_fwnode() with more suitable API gpio: msc313: Replace of_node_to_fwnode() with more suitable API gpio: uniphier: Replace of_node_to_fwnode() with more suitable API gpio: tegra186: Replace of_node_to_fwnode() with more suitable API gpio: thunderx: Replace of_node_to_fwnode() with more suitable API gpio: visconti: Replace of_node_to_fwnode() with more suitable API gpio: ixp4xx: Replace of_node_to_fwnode() with more suitable API gpiolib: Update the kernel documentation - add Return sections gpiolib: legacy: Consolidate devm_gpio_*() with other legacy APIs gpio: stmpe: Fix IRQ related error messages gpio: stmpe: Remove unused 'dev' member of struct stmpe_gpio gpio: stmpe: Utilise temporary variable for struct device gpio: stmpe: Make use of device properties gpio: stmpe: Sort headers Animesh Agarwal (1): dt-bindings: gpio: nxp,lpc3220-gpio: Convert to dtschema Bartosz Golaszewski (9): Merge tag 'ib-mfd-gpio-pwm-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next gpio: ath79: order headers alphabetically gpio: ath79: add missing header gpio: ath79: use generic device property getters gpio: ath79: remove support for platform data gpio: davinci: drop platform data support gpio: davinci: use devm_clk_get_enabled() gpio: mpc8xxx: order headers alphabetically gpio: mpc8xxx: switch to using DEFINE_RUNTIME_DEV_PM_OPS() Chen Ni (1): gpio: sama5d2-piobu: convert comma to semicolon Clark Wang (1): pwm: adp5585: Add Analog Devices ADP5585 support Dhruva Gole (1): gpio: syscon: fix excess struct member build warning Fabio Estevam (1): gpio: pca953x: Print the error code on read/write failures Haibo Chen (4): mfd: adp5585: Add Analog Devices ADP5585 core support gpio: adp5585: Add Analog Devices ADP5585 support gpio: gpio-vf610: use u32 mask to handle 32 number gpios gpio: vf610: add get_direction() support Hongbo Li (1): gpio: Use IS_ERR_OR_NULL() helper function Jared McArthur (1): dt-bindings: gpio: gpio-davinci: Add the gpio-reserved-ranges property Krzysztof Kozlowski (4): gpio: of: simplify with scoped for each OF child loop dt-bindings: gpio: fcs,fxl6408: add missing type to GPIO hogs dt-bindings: gpio: simplify GPIO hog nodes schema gpio: pch: kerneldoc fixes for excess members Laurent Pinchart (1): dt-bindings: mfd: Add Analog Devices ADP5585 Martyn Welch (1): gpio: mpc8xxx: Add wake on GPIO support Rob Herring (Arm) (1): gpio: Use of_property_present() Rong Qianfeng (2): gpio: stp-xway: Simplify using devm_clk_get_enabled() gpio: zynq: Simplify using devm_clk_get_enabled() Shen Lichuan (1): gpio: stmpe: Simplify with dev_err_probe() Uwe Kleine-König (1): gpio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Zhang Zekun (4): gpio: cadence: Use helper function devm_clk_get_enabled() gpio: lpc18xx: Use helper function devm_clk_get_enabled() gpio: mb86s7x: Use helper function devm_clk_get_optional_enabled() gpio: xilinx: Use helper function devm_clk_get_optional_enabled() Zhu Jun (1): tools: gpio: Fix the wrong format specifier zhangjiao (1): tools: gpio: rm .*.cmd on make clean .../bindings/gpio/fairchild,74hc595.yaml | 11 - .../devicetree/bindings/gpio/fcs,fxl6408.yaml | 1 + .../devicetree/bindings/gpio/fsl-imx-gpio.yaml | 11 - .../devicetree/bindings/gpio/gpio-davinci.yaml | 2 + .../devicetree/bindings/gpio/gpio-pca95xx.yaml | 11 - .../devicetree/bindings/gpio/gpio_lpc32xx.txt | 43 ---- .../bindings/gpio/microchip,mpfs-gpio.yaml | 12 -- .../devicetree/bindings/gpio/nxp,lpc3220-gpio.yaml | 50 +++++ .../bindings/gpio/socionext,uniphier-gpio.yaml | 11 - .../devicetree/bindings/mfd/adi,adp5585.yaml | 92 +++++++++ .../devicetree/bindings/trivial-devices.yaml | 4 - MAINTAINERS | 11 + arch/arm/mach-ep93xx/vision_ep9307.c | 6 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-adp5585.c | 229 +++++++++++++++++++++ drivers/gpio/gpio-ath79.c | 31 +-- drivers/gpio/gpio-cadence.c | 23 +-- drivers/gpio/gpio-davinci.c | 102 +++------ drivers/gpio/gpio-fxl6408.c | 2 +- drivers/gpio/gpio-ixp4xx.c | 10 +- drivers/gpio/gpio-lpc18xx.c | 23 +-- drivers/gpio/gpio-max7300.c | 2 +- drivers/gpio/gpio-mb86s7x.c | 21 +- drivers/gpio/gpio-mpc8xxx.c | 50 ++++- drivers/gpio/gpio-msc313.c | 5 +- drivers/gpio/gpio-pca953x.c | 4 +- drivers/gpio/gpio-pch.c | 1 - drivers/gpio/gpio-sama5d2-piobu.c | 18 +- drivers/gpio/gpio-stmpe.c | 55 ++--- drivers/gpio/gpio-stp-xway.c | 10 +- drivers/gpio/gpio-syscon.c | 1 - drivers/gpio/gpio-tegra.c | 5 +- drivers/gpio/gpio-tegra186.c | 3 +- drivers/gpio/gpio-thunderx.c | 5 +- drivers/gpio/gpio-uniphier.c | 5 +- drivers/gpio/gpio-vf610.c | 31 ++- drivers/gpio/gpio-virtuser.c | 13 +- drivers/gpio/gpio-visconti.c | 5 +- drivers/gpio/gpio-xilinx.c | 11 +- drivers/gpio/gpio-zynq.c | 10 +- drivers/gpio/gpiolib-acpi.c | 43 ++-- drivers/gpio/gpiolib-cdev.c | 8 +- drivers/gpio/gpiolib-devres.c | 120 ++++------- drivers/gpio/gpiolib-legacy.c | 94 ++++++++- drivers/gpio/gpiolib-of.c | 92 ++++----- drivers/gpio/gpiolib-swnode.c | 62 +++--- drivers/gpio/gpiolib-sysfs.c | 6 +- drivers/gpio/gpiolib.c | 164 +++++++++++---- drivers/gpio/gpiolib.h | 16 +- drivers/mfd/Kconfig | 12 ++ drivers/mfd/Makefile | 1 + drivers/mfd/adp5585.c | 205 ++++++++++++++++++ drivers/pwm/Kconfig | 7 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-adp5585.c | 184 +++++++++++++++++ include/linux/gpio.h | 12 +- include/linux/mfd/adp5585.h | 126 ++++++++++++ include/linux/platform_data/gpio-ath79.h | 16 -- include/linux/platform_data/gpio-davinci.h | 21 -- tools/gpio/Makefile | 2 +- tools/gpio/gpio-hammer.c | 4 +- 63 files changed, 1503 insertions(+), 643 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt create mode 100644 Documentation/devicetree/bindings/gpio/nxp,lpc3220-gpio.yaml create mode 100644 Documentation/devicetree/bindings/mfd/adi,adp5585.yaml create mode 100644 drivers/gpio/gpio-adp5585.c create mode 100644 drivers/mfd/adp5585.c create mode 100644 drivers/pwm/pwm-adp5585.c create mode 100644 include/linux/mfd/adp5585.h delete mode 100644 include/linux/platform_data/gpio-ath79.h delete mode 100644 include/linux/platform_data/gpio-davinci.h . Date: Tue, 17 Sep 2024 11:45:57 +0200 From: Bartosz Golaszewski To: Linus Torvalds Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [GIT PULL] power sequencing updates for v6.12-rc1 From: Bartosz Golaszewski Linus, Please pull the following updates for the power sequencing subsystem. There's one change adding support for a new PMU model and another adding documentation for the subsystem which probably should have been part of the initial commit but better late than never. Details are in the signed tag. Thanks, Bartosz Golaszewski The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/pwrseq-updates-for-v6.12-rc1 for you to fetch changes up to 8b7e0a6c443e855374a426dcdfd0a19912d70df3: Documentation: add a driver API doc for the power sequencing subsystem (2024-08-22 15:29:29 +0200) ---------------------------------------------------------------- power sequencing updates for v6.12-rc1 - add support for the new PMU variant inside the WCN6855 chipset - add documentation for the subsystem ---------------------------------------------------------------- Bartosz Golaszewski (1): Documentation: add a driver API doc for the power sequencing subsystem Konrad Dybcio (1): power: sequencing: qcom-wcn: add support for the WCN6855 PMU Documentation/driver-api/index.rst | 1 + Documentation/driver-api/pwrseq.rst | 95 ++++++++++++++++++++++++++++++ MAINTAINERS | 1 + drivers/power/sequencing/pwrseq-qcom-wcn.c | 11 ++++ 4 files changed, 108 insertions(+) create mode 100644 Documentation/driver-api/pwrseq.rst . Date: Tue, 17 Sep 2024 06:49:05 -0700 From: "Paul E. McKenney" To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, lkmm@lists.linux.dev, parri.andrea@gmail.com, akiyks@gmail.com, boqun.feng@gmail.com Subject: [GIT PULL] LKMM changes for v6.12 Hello, Linus, Please pull this LKMM update from: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/lkmm.2024.09.14b # HEAD: a49f48cc7d26270bee727d30ce830d4129b33d4a: MAINTAINERS: Add the dedicated maillist info for LKMM (2024-09-13 23:56:44 -0700) ---------------------------------------------------------------- lkmm: Add documentation and mailing list This pull request contains documentation updates from Andrea Parri and Akira Yokosawa. Also, there is now an lkmm@lists.linux.dev, and Boqun Feng's update adds this to the LKMM MAINTAINERS entry. Not included in this pull request are a couple of more commits from Puranjay Mohan adding more atomic operations to LKMM, but these await a herdtools7 release that includes tool-side support for this functionality. With luck, I will send a separate pull request for these later in the merge window. ---------------------------------------------------------------- Akira Yokosawa (3): tools/memory-model: Add locking.txt and glossary.txt to README tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY" Andrea Parri (1): tools/memory-model: Document herd7 (abstract) representation Boqun Feng (1): MAINTAINERS: Add the dedicated maillist info for LKMM Documentation/memory-barriers.txt | 3 - MAINTAINERS | 1 + tools/memory-model/Documentation/README | 24 ++++- .../Documentation/herd-representation.txt | 110 +++++++++++++++++++++ tools/memory-model/Documentation/simple.txt | 2 +- 5 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 tools/memory-model/Documentation/herd-representation.txt . Date: Tue, 17 Sep 2024 17:45:40 +0200 From: Helge Deller To: Linus Torvalds , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [GIT PULL] fbdev fixes and cleanups for v6.12-rc1 Hi Linus, please pull some updates and cleanups for the fbdev drivers for kernel 6.12-rc1. This patchset includes a crashfix for xen and a possible use-after-free fix in pxafb. Thanks! Helge ---------------------------------------------------------------- The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-6.12-rc1 for you to fetch changes up to de5e89b6654ea0b021a5737e0f55fc6bed625550: fbdev: omapfb: Fix typo in comment (2024-09-11 20:53:04 +0200) ---------------------------------------------------------------- fbdev fixes and updates for 6.12-rc1: - video: Reduce code when CONFIG_HAS_IOPORT=n - xenfb: Fix crash by assigning fb_info->device - pxafb: Fix possible use after free in pxafb_task() - efifb: Introduce and use new devm_register_framebuffer() function - mmpfb: Utilize devm_clk_get_enabled() helpers - various typo fixes and code cleanups ---------------------------------------------------------------- Andrew Kreimer (1): fbdev: omapfb: Fix typo in comment Chen Ni (3): fbdev: pxa3xx-gcu: Convert comma to semicolon fbdev: imsttfb: convert comma to semicolon fbdev: hyperv_fb: Convert comma to semicolon Christophe JAILLET (3): fbdev: hpfb: Fix an error handling path in hpfb_dio_probe() fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes() fbdev: omapfb: Use sysfs_emit_at() to simplify code Jason Andryuk (1): fbdev: xen-fbfront: Assign fb_info->device Kaixin Wang (1): fbdev: pxafb: Fix possible use after free in pxafb_task() Niklas Schnelle (1): video: Handle HAS_IOPORT dependencies Thomas Weißschuh (4): fbdev: Introduce devm_register_framebuffer() fbdev: efifb: Register sysfs groups through driver core fbdev: efifb: Use devm_register_framebuffer() fbdev: efifb: Use driver-private screen_info for sysfs ying zuxin (1): fbdev: mmp: Use devm_clk_get_enabled() helpers drivers/video/fbdev/core/fbmem.c | 30 +++++++++++ drivers/video/fbdev/efifb.c | 27 +++------- drivers/video/fbdev/hpfb.c | 1 + drivers/video/fbdev/hyperv_fb.c | 2 +- drivers/video/fbdev/imsttfb.c | 4 +- drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 6 +-- drivers/video/fbdev/omap/omapfb_main.c | 36 ++++++-------- .../omap2/omapfb/displays/panel-sony-acx565akm.c | 15 +++--- drivers/video/fbdev/omap2/omapfb/dss/hdmi.h | 2 +- drivers/video/fbdev/pxa3xx-gcu.c | 4 +- drivers/video/fbdev/pxafb.c | 1 + drivers/video/fbdev/xen-fbfront.c | 1 + include/linux/fb.h | 1 + include/video/vga.h | 58 ++++++++++++++++------ 14 files changed, 111 insertions(+), 77 deletions(-) . Date: Tue, 17 Sep 2024 19:15:28 +0300 From: "Jarkko Sakkinen" To: "Linus Torvalds" Cc: "Peter Huewe" , "Jason Gunthorpe" , "David Howells" , , , Subject: [GIT PULL] TPM DEVICE DRIVER: tpmdd-next-6.12-rc1 The following changes since commit 2f27fce67173bbb05d5a0ee03dae5c021202c912= : Merge tag 'sound-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/g= it/tiwai/sound (2024-09-17 17:03:43 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tags= /tpmdd-next-6.12-rc1 for you to fetch changes up to f168c000d27f8134160d4a52dfc474a948a3d7e9: tpm: export tpm2_sessions_init() to fix ibmvtpm building (2024-09-17 18:5= 6:37 +0300) ---------------------------------------------------------------- Hi, Just updates and fixes, no major changes. I might send a PR during the release cycle addressing a performance issue i= n the bus encryption: 1. https://bugzilla.kernel.org/show_bug.cgi?id=3D219229 2. https://lore.kernel.org/linux-integrity/20240917154444.702370-1-jarkko@k= ernel.org/ The first version of the patch set cut out already five seconds and I expect similar figures from the current version but I really need some more feedback. However, this week is not exactly optimal for getting it, given the Vienna conference. BR, Jarkko ---------------------------------------------------------------- Jonathan McDowell (1): tpm: Clean up TPM space after command failure Kexy Biscuit (1): tpm: export tpm2_sessions_init() to fix ibmvtpm building Michal Suchanek (2): MAINTAINERS: Add selftest files to TPM section selftests: tpm2: test_smoke: Run only when TPM2 is avaialable. Uwe Kleine-K=C3=B6nig (1): tpm: Drop explicit initialization of struct i2c_device_id::driver_dat= a to 0 MAINTAINERS | 1 + drivers/char/tpm/st33zp24/i2c.c | 2 +- drivers/char/tpm/tpm-dev-common.c | 2 ++ drivers/char/tpm/tpm2-sessions.c | 1 + drivers/char/tpm/tpm2-space.c | 3 +++ drivers/char/tpm/tpm_i2c_atmel.c | 2 +- drivers/char/tpm/tpm_tis_i2c.c | 2 +- tools/testing/selftests/tpm2/test_smoke.sh | 2 ++ 8 files changed, 12 insertions(+), 3 deletions(-) . Date: Tue, 17 Sep 2024 18:31:19 +0200 From: Helge Deller To: Linus Torvalds , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [GIT PULL] parisc architecture fixes and updates for v6.12-rc1 Hi Linus, Please pull the parisc architecture fixes and updates for 6.12-rc1, which includes: - On parisc we now use the generic clockevent framework for timekeeping. - Although there is no 64-bit glibc/userspace for parisc yet, for testing purposes one can run statically linked 64-bit binaries. This patchset contains two patches which fix 64-bit userspace which has been broken since kernel 4.19. - Fix the userspace stack position and size when the ADDR_NO_RANDOMIZE personality is enabled. - On other architectures mmap(MAP_GROWSDOWN | MAP_STACK) creates a downward-growing stack. On parisc mmap(MAP_STACK) is now sufficient to create an upward-growing stack. Thanks! Helge ---------------------------------------------------------------- The following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63: Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git tags/parisc-for-6.12-rc1 for you to fetch changes up to 5d698966fa7b452035c44c937d704910bf3440dd: parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards (2024-09-16 23:01:43 +0200) ---------------------------------------------------------------- parisc architecture fixes and updates for kernel v6.12-rc1: - Convert parisc to the generic clockevents framework - Fix syscall and mm for 64-bit userspace - Fix stack start when ADDR_NO_RANDOMIZE personality is set - Fix mmap(MAP_STACK) to map upward growing expandable memory on parisc ---------------------------------------------------------------- Helge Deller (6): parisc: Convert to generic clockevents parisc: Fix stack start for ADDR_NO_RANDOMIZE personality parisc: Fix 64-bit userspace syscall path parisc: Fix itlb miss handler for 64-bit programs parisc: Use PRIV_USER instead of hardcoded value parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards Hongbo Li (1): parisc: pdc_stable: Constify struct kobj_type arch/parisc/Kconfig | 2 +- arch/parisc/include/asm/mman.h | 14 ++ arch/parisc/include/asm/processor.h | 2 +- arch/parisc/kernel/entry.S | 6 +- arch/parisc/kernel/smp.c | 2 +- arch/parisc/kernel/syscall.S | 14 +- arch/parisc/kernel/time.c | 261 +++++++++++++++--------------------- arch/parisc/kernel/traps.c | 2 +- drivers/parisc/pdc_stable.c | 2 +- fs/exec.c | 3 +- 10 files changed, 136 insertions(+), 172 deletions(-) . Date: Tue, 17 Sep 2024 12:05:50 -0500 From: David Teigland To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, gfs2@lists.linux.dev Subject: [GIT PULL] dlm updates for 6.12 Hi Linus, Please pull dlm updates from tag: git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git dlm-6.12 Summary: - Remove some unnecesary hold/unhold rsb refcounting in cases where an existing refcount is known to exist. - Remove some unnecessary checking for zero nodeids, which should never exist, and add some warning if they do. - Make the slow freeing of structs in release_lockspace() async, run from a workqueue. - Prior rcu freeing allows some further struct lookups to run without a lock. - Use blocking kernel_connect on sockets to avoid EINPROGRESS. Thanks, Dave Alexander Aring (11): dlm: cleanup memory allocation helpers dlm: remove unnecessary refcounts dlm: never return invalid nodeid by dlm_our_nodeid() dlm: warn about invalid nodeid comparsions dlm: drop kobject release callback handling dlm: async freeing of lockspace resources dlm: use RSB_HASHED to avoid lookup twice dlm: move dlm_search_rsb_tree() out of lock dlm: move lkb xarray lookup out of lock dlm: do synchronized socket connect call dlm: add missing -ENOMEM if alloc_workqueue() fails fs/dlm/config.c | 2 +- fs/dlm/dlm_internal.h | 5 ++ fs/dlm/lock.c | 134 +++++++++++++++++++++++++++----------------------- fs/dlm/lock.h | 2 + fs/dlm/lockspace.c | 97 ++++++++++++++++++------------------ fs/dlm/lowcomms.c | 36 +------------- fs/dlm/main.c | 12 +++++ fs/dlm/member.c | 2 + fs/dlm/memory.c | 28 +++++------ fs/dlm/memory.h | 4 +- fs/dlm/recover.c | 9 ++-- 11 files changed, 164 insertions(+), 167 deletions(-) . Date: Wed, 18 Sep 2024 13:35:29 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Mark Rutland , Namhyung Kim , linux-perf-users@vger.kernel.org Subject: [GIT PULL] Performance events fixes left over from v6.11 Linus, Please pull the latest perf/urgent Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2024-09-18 # HEAD: ef493f4b122d6b14a6de111d1acac1eab1d673b0 perf/x86/intel: Allow to setup LBR for counting event for BPF Perf events fixes left over from the v6.11 cycle: - Fix energy-pkg event enumeration on certain AMD CPUs - Set up the LBR branch stack for BPF counting events too Thanks, Ingo ------------------> Dhananjay Ugwekar (1): perf/x86/rapl: Fix the energy-pkg event for AMD CPUs Kan Liang (1): perf/x86/intel: Allow to setup LBR for counting event for BPF arch/x86/events/intel/core.c | 8 ++++++-- arch/x86/events/rapl.c | 47 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 7 deletions(-) . Date: Wed, 18 Sep 2024 14:45:39 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Mark Rutland , Namhyung Kim , linux-perf-users@vger.kernel.org Subject: [GIT PULL] Performance events changes for v6.12 Linus, Please pull the latest perf/core Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-core-2024-09-18 # HEAD: 5e645f31139183ac9a282238da18ca6bbc1c6f4a Merge branch 'perf/urgent' into perf/core, to pick up fixes [ Merge note: this pull request depends on you having pulled perf-urgent-2024-09-18 already. ] Performance events changes for v6.12: - Implement per-PMU context rescheduling to significantly improve single-PMU performance, and related cleanups/fixes. (by Peter Zijlstra and Namhyung Kim) - Fix ancient bug resulting in a lot of events being dropped erroneously at higher sampling frequencies. (by Luo Gengkun) - uprobes enhancements: - Implement RCU-protected hot path optimizations for better performance: "For baseline vs SRCU, peak througput increased from 3.7 M/s (million uprobe triggerings per second) up to about 8 M/s. For uretprobes it's a bit more modest with bump from 2.4 M/s to 5 M/s. For SRCU vs RCU Tasks Trace, peak throughput for uprobes increases further from 8 M/s to 10.3 M/s (+28%!), and for uretprobes from 5.3 M/s to 5.8 M/s (+11%), as we have more work to do on uretprobes side. Even single-thread (no contention) performance is slightly better: 3.276 M/s to 3.396 M/s (+3.5%) for uprobes, and 2.055 M/s to 2.174 M/s (+5.8%) for uretprobes." (by Andrii Nakryiko et al) - Document mmap_lock, don't abuse get_user_pages_remote(). (by Oleg Nesterov) - Cleanups & fixes to prepare for future work: - Remove uprobe_register_refctr() - Simplify error handling for alloc_uprobe() - Make uprobe_register() return struct uprobe * - Fold __uprobe_unregister() into uprobe_unregister() - Shift put_uprobe() from delete_uprobe() to uprobe_unregister() - BPF: Fix use-after-free in bpf_uprobe_multi_link_attach() (by Oleg Nesterov) - New feature & ABI extension: allow events to use PERF_SAMPLE READ with inheritance, enabling sample based profiling of a group of counters over a hierarchy of processes or threads. (by Ben Gainey) - Intel uncore & power events updates: - Add Arrow Lake and Lunar Lake support - Add PERF_EV_CAP_READ_SCOPE - Clean up and enhance cpumask and hotplug support (by Kan Liang) - Add LNL uncore iMC freerunning support - Use D0:F0 as a default device (by Zhenyu Wang) - Intel PT: fix AUX snapshot handling race. (by Adrian Hunter) - Misc fixes and cleanups. (by James Clark, Jiri Olsa, Oleg Nesterov and Peter Zijlstra) Thanks, Ingo ------------------> Adrian Hunter (1): perf/x86/intel/pt: Fix sampling synchronization Andrii Nakryiko (7): perf,x86: avoid missing caller address in stack traces captured in uprobe uprobes: simplify error handling for alloc_uprobe() uprobes: revamp uprobe refcounting and lifetime management uprobes: protected uprobe lifetime with SRCU uprobes: get rid of enum uprobe_filter_ctx in uprobe filter callbacks uprobes: travers uprobe's consumer list locklessly under SRCU protection uprobes: perform lockless SRCU-protected uprobes_tree lookup Ben Gainey (2): perf: Rename perf_event_context.nr_pending to nr_no_switch_fast. perf: Support PERF_SAMPLE_READ with inherit Ingo Molnar (2): Merge branch 'perf/urgent' into perf/core, to pick up fixes Merge branch 'perf/urgent' into perf/core, to pick up fixes James Clark (1): perf/x86/intel/bts: Fix comment about default perf_event_paranoid setting Jiri Olsa (1): selftests/bpf: fix uprobe.path leak in bpf_testmod Kan Liang (8): perf/x86/intel/uncore: Add Arrow Lake support perf/x86/intel/uncore: Factor out common MMIO init and ops functions perf/x86/intel/uncore: Add Lunar Lake support perf: Generic hotplug support for a PMU with a scope perf: Add PERF_EV_CAP_READ_SCOPE perf/x86/intel/cstate: Clean up cpumask and hotplug iommu/vt-d: Clean up cpumask and hotplug for perfmon dmaengine: idxd: Clean up cpumask and hotplug for perfmon Luo Gengkun (1): perf/core: Fix small negative period being ignored Namhyung Kim (1): perf: Really fix event_function_call() locking Oleg Nesterov (8): uprobes: document the usage of mm->mmap_lock uprobes: is_trap_at_addr: don't use get_user_pages_remote() uprobes: kill uprobe_register_refctr() uprobes: make uprobe_register() return struct uprobe * uprobes: change uprobe_register() to use uprobe_unregister() instead of __uprobe_unregister() uprobes: fold __uprobe_unregister() into uprobe_unregister() uprobes: shift put_uprobe() from delete_uprobe() to uprobe_unregister() bpf: Fix use-after-free in bpf_uprobe_multi_link_attach() Peter Zijlstra (8): perf/x86: Add hw_perf_event::aux_config perf: Optimize context reschedule for single PMU cases perf: Extract a few helpers perf: Fix event_function_call() locking perf: Add context time freeze perf: Optimize __pmu_ctx_sched_out() perf/uprobe: split uprobe_unregister() rbtree: provide rb_find_rcu() / rb_find_add_rcu() Zhenyu Wang (2): perf/x86/intel/uncore: Add LNL uncore iMC freerunning support perf/x86/intel/uncore: Use D0:F0 as a default device arch/x86/events/core.c | 63 +++++++++++++++++++ arch/x86/events/intel/bts.c | 3 - arch/x86/events/intel/cstate.c | 142 ++----------------------------------------- arch/x86/events/intel/pt.c | 29 +++++---- arch/x86/events/intel/uncore.c | 9 +++ arch/x86/events/intel/uncore.h | 2 + arch/x86/events/intel/uncore_snb.c | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++------ drivers/dma/idxd/idxd.h | 7 --- drivers/dma/idxd/init.c | 3 - drivers/dma/idxd/perfmon.c | 98 +----------------------------- drivers/iommu/intel/iommu.h | 2 - drivers/iommu/intel/perfmon.c | 111 +--------------------------------- include/linux/cpuhotplug.h | 2 - include/linux/perf_event.h | 32 +++++++++- include/linux/rbtree.h | 67 +++++++++++++++++++++ include/linux/uprobes.h | 48 ++++++++------- kernel/events/core.c | 586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------- kernel/events/uprobes.c | 505 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------- kernel/trace/bpf_trace.c | 38 ++++++------ kernel/trace/trace_uprobe.c | 44 +++++++------- tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | 27 +++++---- 21 files changed, 1146 insertions(+), 857 deletions(-) . Date: Wed, 18 Sep 2024 15:04:51 +0200 (CEST) From: Jiri Kosina To: Linus Torvalds Subject: [GIT PULL] HID for 6.12 Linus, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-li= nus-2024091602 to receive HID subsystem queue for 6.12 merge window, namely: =3D=3D=3D=3D=3D - New HID over SPI driver for Goodix devices that don't follow Microsoft's= =20 HID-over-SPI specification, so a separate driver is needed. Currently=20 supported device is GT7986U touchscreen (Charles Wang) - support for new hardware features in Wacom driver (high-res wheel=20 scrolling, touchstrings with relative motions, support for two=20 touchrings) (Jason Gerecke) - support for customized vendor firmware loading in intel-ish driver=20 (Zhang Lixu) - fix for theoretical race condition in i2c-hid (Dmitry Torokhov) - support for HIDIOCREVOKE -- evdev's EVIOCREVOKE equivalent in hidraw=20 (Peter Hutterer) - initial hidraw selftest implementation (Benjamin Tissoires) - constification of device-specific report descriptors (Thomas Wei=DFschuh) - other small assorted fixes and device ID / quirk additions =3D=3D=3D=3D=3D Thanks. ---------------------------------------------------------------- Benjamin Tissoires (4): HID: samples: fix the 2 struct_ops definitions selftests/hid: extract the utility part of hid_bpf.c into its own hea= der selftests/hid: Add initial hidraw tests skeleton selftests/hid: Add HIDIOCREVOKE tests Charles Wang (2): HID: hid-goodix: Add Goodix HID-over-SPI driver dt-bindings: input: Goodix SPI HID Touchscreen Chen Ni (2): HID: amd_sfh: Convert comma to semicolon HID: hid-sensor-custom: Convert comma to semicolon Dan Carpenter (1): HID: hid-goodix: Fix type promotion bug in goodix_hid_get_raw_report(= ) Dmitry Torokhov (1): HID: i2c-hid: ensure various commands do not interfere with each othe= r Hans de Goede (1): HID: Ignore battery for all ELAN I2C-HID devices He Lugang (1): HID: multitouch: Add support for lenovo Y9000P Touchpad Jason Gerecke (6): HID: wacom: Improve warning for tablets falling back to default resol= ution HID: wacom: Support touchrings with relative motion HID: wacom: Add preliminary support for high-resolution wheel scrolli= ng HID: wacom: Support devices with two touchrings HID: wacom: Support sequence numbers smaller than 16-bit HID: wacom: Do not warn about dropped packets for first packet Jinjie Ruan (1): hid: cp2112: Use irq_get_trigger_type() helper Kerem Karabay (1): HID: core: add helper for finding a field with a certain usage Max Staudt (1): HID: hid-playstation: DS4: Update rumble and lightbar together Peter Hutterer (1): HID: hidraw: add HIDIOCREVOKE ioctl Thomas Wei=DFschuh (22): HID: bpf: constify parameter rdesc of call_hid_bpf_rdesc_fixup() HID: constify parameter rdesc of hid_parse_report() HID: constify hid_device::rdesc HID: constify params and return value of fetch_item() HID: constify hid_device::dev_rdesc HID: change return type of report_fixup() to const HID: cmedia: constify fixed up report descriptor HID: winwing: constify read-only structs HID: bigbenff: constify fixed up report descriptor HID: dr: constify fixed up report descriptor HID: holtek-kbd: constify fixed up report descriptor HID: keytouch: constify fixed up report descriptor HID: maltron: constify fixed up report descriptor HID: xiaomi: constify fixed up report descriptor HID: vrc2: constify fixed up report descriptor HID: viewsonic: constify fixed up report descriptor HID: steelseries: constify fixed up report descriptor HID: pxrc: constify fixed up report descriptor HID: sony: constify fixed up report descriptor HID: waltop: constify fixed up report descriptor HID: uclogic: constify fixed up report descriptor HID: lg: constify fixed up report descriptor Thomas Zimmermann (1): HID: picoLCD: Use backlight power constants Vishnu Sankar (1): HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio Yue Haibing (2): HID: intel-ish-hid: Remove unused declarations HID: amd_sfh: Remove unused declarations Zhang Lixu (3): Documentation: hid: intel-ish-hid: Add vendor custom firmware loading HID: intel-ish-hid: Use CPU generation string in driver_data hid: intel-ish-hid: Add support for vendor customized firmware loadin= g Zhaoxiong Lv (2): dt-bindings: HID: i2c-hid: elan: Introduce Elan ekth6a12nay HID: i2c-hid: elan: Add elan-ekth6a12nay timing tammy tseng (1): HID: add patch for sis multitouch format .../devicetree/bindings/input/elan,ekth6915.yaml | 4 +- .../devicetree/bindings/input/goodix,gt7986u.yaml | 71 ++ Documentation/hid/intel-ish-hid.rst | 29 + drivers/hid/Kconfig | 6 + drivers/hid/Makefile | 1 + drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 - drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 4 +- drivers/hid/bpf/hid_bpf_dispatch.c | 6 +- drivers/hid/hid-apple.c | 2 +- drivers/hid/hid-asus.c | 2 +- drivers/hid/hid-aureal.c | 2 +- drivers/hid/hid-bigbenff.c | 6 +- drivers/hid/hid-cherry.c | 2 +- drivers/hid/hid-chicony.c | 4 +- drivers/hid/hid-cmedia.c | 6 +- drivers/hid/hid-core.c | 39 +- drivers/hid/hid-corsair.c | 4 +- drivers/hid/hid-cougar.c | 4 +- drivers/hid/hid-cp2112.c | 7 +- drivers/hid/hid-cypress.c | 2 +- drivers/hid/hid-dr.c | 8 +- drivers/hid/hid-elecom.c | 2 +- drivers/hid/hid-gembird.c | 2 +- drivers/hid/hid-glorious.c | 2 +- drivers/hid/hid-goodix-spi.c | 818 +++++++++++++++++= ++++ drivers/hid/hid-google-hammer.c | 27 +- drivers/hid/hid-holtek-kbd.c | 6 +- drivers/hid/hid-holtek-mouse.c | 4 +- drivers/hid/hid-ids.h | 18 +- drivers/hid/hid-input.c | 37 +- drivers/hid/hid-ite.c | 2 +- drivers/hid/hid-keytouch.c | 8 +- drivers/hid/hid-kye.c | 2 +- drivers/hid/hid-lenovo.c | 2 +- drivers/hid/hid-lg.c | 30 +- drivers/hid/hid-logitech-hidpp.c | 4 +- drivers/hid/hid-macally.c | 4 +- drivers/hid/hid-magicmouse.c | 4 +- drivers/hid/hid-maltron.c | 8 +- drivers/hid/hid-microsoft.c | 2 +- drivers/hid/hid-monterey.c | 2 +- drivers/hid/hid-multitouch.c | 30 +- drivers/hid/hid-nti.c | 2 +- drivers/hid/hid-ortek.c | 2 +- drivers/hid/hid-petalynx.c | 2 +- drivers/hid/hid-picolcd_backlight.c | 5 +- drivers/hid/hid-playstation.c | 20 + drivers/hid/hid-prodikeys.c | 2 +- drivers/hid/hid-pxrc.c | 6 +- drivers/hid/hid-redragon.c | 2 +- drivers/hid/hid-saitek.c | 2 +- drivers/hid/hid-samsung.c | 2 +- drivers/hid/hid-semitek.c | 4 +- drivers/hid/hid-sensor-custom.c | 2 +- drivers/hid/hid-sensor-hub.c | 2 +- drivers/hid/hid-sigmamicro.c | 4 +- drivers/hid/hid-sony.c | 14 +- drivers/hid/hid-steelseries.c | 8 +- drivers/hid/hid-sunplus.c | 2 +- drivers/hid/hid-topre.c | 4 +- drivers/hid/hid-uclogic-core.c | 4 +- drivers/hid/hid-uclogic-params.c | 4 +- drivers/hid/hid-uclogic-params.h | 10 +- drivers/hid/hid-uclogic-rdesc.c | 20 +- drivers/hid/hid-uclogic-rdesc.h | 20 +- drivers/hid/hid-viewsonic.c | 8 +- drivers/hid/hid-vrc2.c | 6 +- drivers/hid/hid-waltop.c | 30 +- drivers/hid/hid-winwing.c | 8 +- drivers/hid/hid-xiaomi.c | 8 +- drivers/hid/hid-zydacron.c | 2 +- drivers/hid/hidraw.c | 39 +- drivers/hid/i2c-hid/i2c-hid-core.c | 42 +- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 10 +- drivers/hid/intel-ish-hid/ishtp/bus.h | 1 - drivers/hid/intel-ish-hid/ishtp/client.h | 1 - drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 8 +- drivers/hid/intel-ish-hid/ishtp/loader.c | 121 ++- drivers/hid/wacom_wac.c | 87 ++- drivers/hid/wacom_wac.h | 6 +- include/linux/hid.h | 12 +- include/linux/hid_bpf.h | 2 +- include/linux/hidraw.h | 1 + include/uapi/linux/hidraw.h | 1 + tools/testing/selftests/hid/.gitignore | 1 + tools/testing/selftests/hid/Makefile | 2 +- tools/testing/selftests/hid/hid_bpf.c | 437 +---------- tools/testing/selftests/hid/hid_common.h | 436 +++++++++++ tools/testing/selftests/hid/hidraw.c | 237 ++++++ 90 files changed, 2150 insertions(+), 732 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7986u.= yaml create mode 100644 drivers/hid/hid-goodix-spi.c create mode 100644 tools/testing/selftests/hid/hid_common.h create mode 100644 tools/testing/selftests/hid/hidraw.c --=20 Jiri Kosina SUSE Labs . Date: Wed, 18 Sep 2024 16:19:22 +0200 From: Hans de Goede To: Linus Torvalds Cc: Andy Shevchenko , LKML , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Subject: [GIT PULL] platform-drivers-x86 for 6.12-1 Hi Linus, Here is the main PDx86 PR for 6.12. Highlights: - asus-wmi: Add support for vivobook fan profiles - dell-laptop: Add knobs to change battery charge settings - lg-laptop: Add operation region support - intel-uncore-freq: Add support for efficiency latency control - intel/ifs: Add SBAF test support - intel/pmc: Ignore all LTRs during suspend - platform/surface: Support for arm64 based Surface devices - wmi: Pass event data directly to legacy notify handlers - x86/platform/geode: switch GPIO buttons and LEDs to software properties - bunch of small cleanups, fixes, hw-id additions, etc. Regards, Hans The following changes since commit a54da9df75cd1b4b5028f6c60f9a211532680585: hwmon: (hp-wmi-sensors) Check if WMI event data exists (2024-09-02 07:23:35 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git tags/platform-drivers-x86-v6.12-1 for you to fetch changes up to 837acb691c844d0525f4ac86f2a2ce55a9706908: MAINTAINERS: adjust file entry in INTEL MID PLATFORM (2024-09-17 12:41:34 +0200) ---------------------------------------------------------------- platform-drivers-x86 for v6.12-1 Highlights: - asus-wmi: Add support for vivobook fan profiles - dell-laptop: Add knobs to change battery charge settings - lg-laptop: Add operation region support - intel-uncore-freq: Add support for efficiency latency control - intel/ifs: Add SBAF test support - intel/pmc: Ignore all LTRs during suspend - platform/surface: Support for arm64 based Surface devices - wmi: Pass event data directly to legacy notify handlers - x86/platform/geode: switch GPIO buttons and LEDs to software properties - bunch of small cleanups, fixes, hw-id additions, etc. The following is an automated git shortlog grouped by driver: Documentation: - admin-guide: pm: Add efficiency vs. latency tradeoff to uncore documentation ISST: - Simplify isst_misc_reg() and isst_misc_unreg() MAINTAINERS: - adjust file entry in INTEL MID PLATFORM - Add Intel MID section Merge tag 'hwmon-for-v6.11-rc7' into review-hans: - Merge tag 'hwmon-for-v6.11-rc7' into review-hans Merge tag 'platform-drivers-x86-v6.11-3' into review-hans: - Merge tag 'platform-drivers-x86-v6.11-3' into review-hans acer-wmi: - Use backlight power constants asus-laptop: - Use backlight power constants asus-nb-wmi: - Use backlight power constants asus-wmi: - don't fail if platform_profile already registered - add debug print in more key places - Use backlight power constants - add support for vivobook fan profiles dell-laptop: - remove duplicate code w/ battery function - Add knobs to change battery charge settings dt-bindings: - platform: Add Surface System Aggregator Module - serial: Allow embedded-controller as child node eeepc-laptop: - Use backlight power constants eeepc-wmi: - Use backlight power constants fujitsu-laptop: - Use backlight power constants hid-asus: - use hid for brightness control on keyboard ideapad-laptop: - Make the scope_guard() clear of its scope - move ACPI helpers from header to source file - Use backlight power constants int3472: - Use str_high_low() - Use GPIO_LOOKUP() macro - make common part a separate module intel-hid: - Use string_choices API instead of ternary operator intel/pmc: - Ignore all LTRs during suspend - Remove unused param idx from pmc_for_each_mode() intel_scu_ipc: - Move intel_scu_ipc.h out of arch/x86/include/asm intel_scu_wdt: - Move intel_scu_wdt.h to x86 subfolder lenovo-ymc: - Ignore the 0x0 state lg-laptop: - Add operation region support oaktrail: - Use backlight power constants panasonic-laptop: - Add support for programmable buttons platform/mellanox: - mlxbf-pmc: fix lockdep warning platform/olpc: - Remove redundant null pointer checks in olpc_ec_setup_debugfs() platform/surface: - Add OF support platform/x86/amd: - pmf: Add quirk for TUF Gaming A14 platform/x86/amd/pmf: - Update SMU metrics table for 1AH family series - Relocate CPU ID macros to the PMF header - Add support for notifying Smart PC Solution updates platform/x86/intel-uncore-freq: - Add efficiency latency control to sysfs interface - Add support for efficiency latency control - Do not present separate package-die domain platform/x86/intel/ifs: - Fix SBAF title underline length - Add SBAF test support - Add SBAF test image loading support - Refactor MSR usage in IFS test code platform/x86/intel/pmc: - Show live substate requirements platform/x86/intel/pmt: - Use PMT callbacks platform/x86/intel/vsec: - Add PMT read callbacks platform/x86/intel/vsec.h: - Move to include/linux samsung-laptop: - Use backlight power constants serial-multi-instantiate: - Don't require both I2C and SPI thinkpad_acpi: - Fix uninitialized symbol 's' warning - Add Thinkpad Edge E531 fan support touchscreen_dmi: - add nanote-next quirk trace: - platform/x86/intel/ifs: Add SBAF trace support wmi: - Call both legacy and WMI driver notify handlers - Merge get_event_data() with wmi_get_notify_data() - Remove wmi_get_event_data() - Pass event data directly to legacy notify handlers x86-android-tablets: - Adjust Xiaomi Pad 2 bottom bezel touch buttons LED - Fix spelling in the comments x86/platform/geode: - switch GPIO buttons and LEDs to software properties ---------------------------------------------------------------- Andres Salomon (2): platform/x86:dell-laptop: Add knobs to change battery charge settings platform/x86:dell-laptop: remove duplicate code w/ battery function Andy Shevchenko (7): platform/x86: intel-hid: Use string_choices API instead of ternary operator platform/x86: int3472: Use GPIO_LOOKUP() macro platform/x86: int3472: Use str_high_low() platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope platform/x86: x86-android-tablets: Fix spelling in the comments MAINTAINERS: Add Intel MID section platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder Armin Wolf (5): platform/x86: lg-laptop: Add operation region support platform/x86: wmi: Pass event data directly to legacy notify handlers platform/x86: wmi: Remove wmi_get_event_data() platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data() platform/x86: wmi: Call both legacy and WMI driver notify handlers Arnd Bergmann (1): platform/x86: int3472: make common part a separate module Ckath (1): platform/x86: touchscreen_dmi: add nanote-next quirk David E. Box (3): platform/x86/intel/vsec.h: Move to include/linux platform/x86/intel/vsec: Add PMT read callbacks platform/x86/intel/pmt: Use PMT callbacks Dmitry Torokhov (1): x86/platform/geode: switch GPIO buttons and LEDs to software properties Gergo Koteles (2): platform/x86: ideapad-laptop: move ACPI helpers from header to source file platform/x86: lenovo-ymc: Ignore the 0x0 state Hans de Goede (3): Merge tag 'platform-drivers-x86-v6.11-3' into review-hans Merge tag 'hwmon-for-v6.11-rc7' into review-hans platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED Ilpo Järvinen (1): platform/x86: intel/pmc: Remove unused param idx from pmc_for_each_mode() James Harmison (1): platform/x86: panasonic-laptop: Add support for programmable buttons Jithu Joseph (3): platform/x86/intel/ifs: Add SBAF test image loading support platform/x86/intel/ifs: Add SBAF test support trace: platform/x86/intel/ifs: Add SBAF trace support Kane Chen (1): platform/x86/intel/pmc: Show live substate requirements Konrad Dybcio (3): dt-bindings: serial: Allow embedded-controller as child node dt-bindings: platform: Add Surface System Aggregator Module platform/surface: Add OF support Kuppuswamy Sathyanarayanan (2): platform/x86/intel/ifs: Refactor MSR usage in IFS test code platform/x86/intel/ifs: Fix SBAF title underline length Li Zetao (1): platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs() Luiz Capitulino (1): platform/mellanox: mlxbf-pmc: fix lockdep warning Lukas Bulwahn (1): MAINTAINERS: adjust file entry in INTEL MID PLATFORM Luke D. Jones (3): hid-asus: use hid for brightness control on keyboard platform/x86: asus-wmi: add debug print in more key places platform/x86: asus-wmi: don't fail if platform_profile already registered Matthias Fetzer (2): platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning Mika Westerberg (1): platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm Mohamed Ghanmi (1): platform/x86: asus-wmi: add support for vivobook fan profiles Richard Fitzgerald (1): platform/x86: serial-multi-instantiate: Don't require both I2C and SPI Shyam Sundar S K (3): platform/x86/amd/pmf: Add support for notifying Smart PC Solution updates platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header platform/x86/amd/pmf: Update SMU metrics table for 1AH family series Srinivas Pandruvada (2): platform/x86: ISST: Simplify isst_misc_reg() and isst_misc_unreg() platform/x86/intel-uncore-freq: Do not present separate package-die domain Tero Kristo (3): Documentation: admin-guide: pm: Add efficiency vs. latency tradeoff to uncore documentation platform/x86/intel-uncore-freq: Add support for efficiency latency control platform/x86/intel-uncore-freq: Add efficiency latency control to sysfs interface Thomas Zimmermann (10): platform/x86: acer-wmi: Use backlight power constants platform/x86: asus-laptop: Use backlight power constants platform/x86: asus-nb-wmi: Use backlight power constants platform/x86: asus-wmi: Use backlight power constants platform/x86: eeepc-laptop: Use backlight power constants platform/x86: eeepc-wmi: Use backlight power constants platform/x86: fujitsu-laptop: Use backlight power constants platform/x86: ideapad-laptop: Use backlight power constants platform/x86: oaktrail: Use backlight power constants platform/x86: samsung-laptop: Use backlight power constants Xi Pardee (1): platform/x86: intel/pmc: Ignore all LTRs during suspend aln8 (1): platform/x86/amd: pmf: Add quirk for TUF Gaming A14 .../pm/intel_uncore_frequency_scaling.rst | 59 +++ .../bindings/platform/microsoft,surface-sam.yaml | 47 +++ .../devicetree/bindings/serial/serial.yaml | 2 +- MAINTAINERS | 23 +- arch/x86/Kconfig | 6 + arch/x86/include/asm/intel_telemetry.h | 2 +- arch/x86/include/asm/msr-index.h | 2 + arch/x86/platform/geode/Makefile | 1 + arch/x86/platform/geode/alix.c | 82 +--- arch/x86/platform/geode/geode-common.c | 178 +++++++++ arch/x86/platform/geode/geode-common.h | 21 ++ arch/x86/platform/geode/geos.c | 80 +--- arch/x86/platform/geode/net5501.c | 69 +--- arch/x86/platform/intel-mid/intel-mid.c | 3 +- drivers/hid/hid-asus.c | 7 + drivers/hwmon/hp-wmi-sensors.c | 22 +- drivers/mfd/intel_pmc_bxt.c | 3 +- drivers/mfd/intel_soc_pmic_bxtwc.c | 3 +- drivers/mfd/intel_soc_pmic_mrfld.c | 3 +- drivers/platform/mellanox/mlxbf-pmc.c | 5 + drivers/platform/olpc/olpc-ec.c | 3 - drivers/platform/surface/aggregator/bus.c | 2 + drivers/platform/surface/aggregator/controller.c | 67 +++- drivers/platform/surface/aggregator/core.c | 82 +++- .../platform/surface/surface_aggregator_registry.c | 45 ++- drivers/platform/x86/Kconfig | 3 +- drivers/platform/x86/acer-wmi.c | 19 +- drivers/platform/x86/amd/pmf/acpi.c | 31 ++ drivers/platform/x86/amd/pmf/core.c | 20 +- drivers/platform/x86/amd/pmf/pmf-quirks.c | 8 + drivers/platform/x86/amd/pmf/pmf.h | 73 ++++ drivers/platform/x86/amd/pmf/spc.c | 51 ++- drivers/platform/x86/amd/pmf/tee-if.c | 40 ++ drivers/platform/x86/asus-laptop.c | 3 +- drivers/platform/x86/asus-nb-wmi.c | 4 +- drivers/platform/x86/asus-wmi.c | 224 ++++++----- drivers/platform/x86/dell/Kconfig | 1 + drivers/platform/x86/dell/dell-laptop.c | 419 +++++++++++++++++---- drivers/platform/x86/dell/dell-smbios.h | 7 + drivers/platform/x86/dell/dell-wmi-aio.c | 13 +- drivers/platform/x86/eeepc-laptop.c | 3 +- drivers/platform/x86/eeepc-wmi.c | 4 +- drivers/platform/x86/fujitsu-laptop.c | 9 +- drivers/platform/x86/hp/hp-wmi.c | 16 +- drivers/platform/x86/huawei-wmi.c | 14 +- drivers/platform/x86/ideapad-laptop.c | 191 ++++++++-- drivers/platform/x86/ideapad-laptop.h | 139 ------- drivers/platform/x86/intel/hid.c | 7 +- drivers/platform/x86/intel/ifs/core.c | 33 ++ drivers/platform/x86/intel/ifs/ifs.h | 92 ++++- drivers/platform/x86/intel/ifs/load.c | 40 +- drivers/platform/x86/intel/ifs/runtest.c | 233 ++++++++++++ drivers/platform/x86/intel/int3472/Makefile | 9 +- drivers/platform/x86/intel/int3472/common.c | 7 + drivers/platform/x86/intel/int3472/discrete.c | 9 +- drivers/platform/x86/intel/oaktrail.c | 3 +- drivers/platform/x86/intel/pmc/core.c | 83 +++- drivers/platform/x86/intel/pmc/core.h | 12 +- drivers/platform/x86/intel/pmc/core_ssram.c | 6 +- drivers/platform/x86/intel/pmt/class.c | 28 +- drivers/platform/x86/intel/pmt/class.h | 10 +- drivers/platform/x86/intel/pmt/crashlog.c | 2 +- drivers/platform/x86/intel/pmt/telemetry.c | 12 +- drivers/platform/x86/intel/sdsi.c | 3 +- .../x86/intel/speed_select_if/isst_if_common.c | 40 +- drivers/platform/x86/intel/tpmi.c | 3 +- .../uncore-frequency/uncore-frequency-common.c | 42 ++- .../uncore-frequency/uncore-frequency-common.h | 17 +- .../intel/uncore-frequency/uncore-frequency-tpmi.c | 165 +++++++- drivers/platform/x86/intel/vsec.c | 8 +- drivers/platform/x86/intel_scu_ipc.c | 2 +- drivers/platform/x86/intel_scu_ipcutil.c | 2 +- drivers/platform/x86/intel_scu_pcidrv.c | 2 +- drivers/platform/x86/intel_scu_pltdrv.c | 2 +- drivers/platform/x86/intel_scu_wdt.c | 3 +- drivers/platform/x86/lenovo-ymc.c | 2 + drivers/platform/x86/lg-laptop.c | 149 +++++++- drivers/platform/x86/msi-wmi.c | 20 +- drivers/platform/x86/panasonic-laptop.c | 16 +- drivers/platform/x86/samsung-laptop.c | 5 +- drivers/platform/x86/serial-multi-instantiate.c | 32 +- drivers/platform/x86/thinkpad_acpi.c | 145 ++++++- drivers/platform/x86/toshiba-wmi.c | 15 +- drivers/platform/x86/touchscreen_dmi.c | 26 ++ drivers/platform/x86/wmi.c | 143 ++----- drivers/platform/x86/x86-android-tablets/Kconfig | 2 +- drivers/platform/x86/x86-android-tablets/asus.c | 8 +- drivers/platform/x86/x86-android-tablets/core.c | 20 +- drivers/platform/x86/x86-android-tablets/dmi.c | 16 +- drivers/platform/x86/x86-android-tablets/lenovo.c | 22 +- drivers/platform/x86/x86-android-tablets/other.c | 40 +- .../x86/x86-android-tablets/shared-psy-info.c | 4 +- .../x86/x86-android-tablets/x86-android-tablets.h | 2 +- drivers/usb/typec/mux/intel_pmc_mux.c | 3 +- drivers/watchdog/intel-mid_wdt.c | 5 +- include/linux/acpi.h | 3 +- .../x86/intel/vsec.h => include/linux/intel_vsec.h | 47 ++- include/linux/platform_data/x86/asus-wmi.h | 37 ++ .../linux/platform_data/{ => x86}/intel-mid_wdt.h | 6 +- .../linux/platform_data/x86}/intel_scu_ipc.h | 4 +- include/trace/events/intel_ifs.h | 27 ++ 101 files changed, 2723 insertions(+), 1060 deletions(-) create mode 100644 Documentation/devicetree/bindings/platform/microsoft,surface-sam.yaml create mode 100644 arch/x86/platform/geode/geode-common.c create mode 100644 arch/x86/platform/geode/geode-common.h rename drivers/platform/x86/intel/vsec.h => include/linux/intel_vsec.h (62%) rename include/linux/platform_data/{ => x86}/intel-mid_wdt.h (74%) rename {arch/x86/include/asm => include/linux/platform_data/x86}/intel_scu_ipc.h (96%) . Date: Thu, 19 Sep 2024 00:19:38 +1000 From: Michael Ellerman To: Linus Torvalds Cc: adubey@linux.ibm.com, alexs@kernel.org, arnd@arndb.de, bgray@linux.ibm.com, christophe.leroy@csgroup.eu, cuigaosheng1@huawei.com, gautam@linux.ibm.com, haren@linux.ibm.com, huangxiaojia2@huawei.com, jk@ozlabs.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com, naveen@kernel.org, nnmlinux@linux.ibm.com, robh@kernel.org, ruanjinjie@huawei.com, tzimmermann@suse.de, u.kleine-koenig@baylibre.com, zhangzekun11@huawei.com Subject: [GIT PULL] Please pull powerpc/linux.git powerpc-6.12-1 tag -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Linus, Please pull powerpc updates for 6.12. No conflicts that I'm aware of. The V= DSO changes have already been merged via the random tree. cheers The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/po= werpc-6.12-1 for you to fetch changes up to 39190ac7cff1fd15135fa8e658030d9646fdb5f2: powerpc/atomic: Use YZ constraints for DS-form instructions (2024-09-17 2= 2:17:57 +1000) - ------------------------------------------------------------------ powerpc updates for 6.12 - Reduce alignment constraints on STRICT_KERNEL_RWX and speed-up TLB misse= s on 8xx and 603. - Replace kretprobe code with rethook and enable fprobe. - Remove the "fast endian switch" syscall. - Handle DLPAR device tree updates in kernel, allowing the deprecation of = the binary /proc/powerpc/ofdt interface. Thanks to: Abhishek Dubey, Alex Shi, Benjamin Gray, Christophe Leroy, Gaosh= eng Cui, Gautam Menghani, Geert Uytterhoeven, Haren Myneni, Hari Bathini, Huang Xiaojia, Jinjie Ruan, Madhavan Srinivasan, Miguel Ojeda, Mina Almasry, Nara= yana Murty N, Naveen Rao, Rob Herring (Arm), Scott Cheloha, Segher Boessenkool, Stephen Rothwell, Thomas Zimmermann, Uwe Kleine-K=C3=B6nig, Vaibhav Jain, Z= hang Zekun. - ------------------------------------------------------------------ Abhishek Dubey (1): powerpc: Replace kretprobe code with rethook on powerpc Alex Shi (1): KVM: PPC: Book3S HV: remove unused varible Benjamin Gray (5): powerpc/code-patching: Add generic memory patching powerpc/code-patching: Add data patch alignment check powerpc/64: Convert patch_instruction() to patch_u32() powerpc/32: Convert patch_instruction() to patch_uint() powerpc/code-patching: Add boot selftest for data patching Christophe Leroy (17): powerpc: Remove unused LHZX_BE macro powerpc/8xx: Fix initial memory mapping powerpc/8xx: Fix kernel vs user address comparison powerpc/8xx: Copy kernel PGD entries into all PGDIRs Revert "powerpc/8xx: Always pin kernel text TLB" powerpc/8xx: Allow setting DATA alignment even with STRICT_KERNEL_RWX powerpc/8xx: Reduce default size of module/execmem area powerpc/8xx: Preallocate execmem page tables powerpc/8xx: Inconditionally use task PGDIR in ITLB misses powerpc/8xx: Inconditionally use task PGDIR in DTLB misses powerpc/32s: Reduce default size of module/execmem area powerpc/603: Copy kernel PGD entries into all PGDIRs and preallocate = execmem page tables powerpc/603: Switch r0 and r3 in TLB miss handlers powerpc/603: Inconditionally use task PGDIR in ITLB misses powerpc/603: Inconditionally use task PGDIR in DTLB misses powerpc/32: Implement validation of emergency stack powerpc/vdso: Inconditionally use CFUNC macro Gaosheng Cui (5): powerpc: Remove obsoleted declaration for _get_SP powerpc/maple: Remove obsoleted declaration for maple_calibrate_decr() powerpc/pasemi: Remove obsoleted declaration for pas_pci_irq_fixup() powerpc: Remove obsoleted declarations for use_cop and drop_cop powerpc/powernv/pci: Remove obsoleted declaration for pnv_pci_init_io= da_hub Gautam Menghani (1): KVM: PPC: Book3S HV: Refactor HFSCR emulation for KVM guests Haren Myneni (3): powerpc/pseries: Use correct data types from pseries_hp_errorlog stru= ct powerpc/pseries/dlpar: Remove device tree node for DLPAR IO remove powerpc/pseries/dlpar: Add device tree nodes for DLPAR IO add Huang Xiaojia (3): powerpc: Constify struct kobj_type powerpc: powernv: Constify struct kobj_type powerpc: pseries: Constify struct kobj_type Jinjie Ruan (1): powerpc: Remove useless config comment in asm/percpu.h Madhavan Srinivasan (2): powerpc/xmon: Fix tmpstr length check in scanhex selftests/powerpc: Allow building without static libc Michael Ellerman (13): MAINTAINERS: Mark powerpc Cell as orphaned MAINTAINERS: Mark powerpc spufs as orphaned powerpc/configs/64s: Enable DEFERRED_STRUCT_PAGE_INIT powerpc/64s/mm: Move __real_pte stubs into hash-4k.h powerpc/64s: Make mmu_hash_ops __ro_after_init powerpc/mm/64s: Move THP reqs into a separate symbol powerpc/mm/64s: Restrict THP to Radix or HPT w/64K pages powerpc/64s: Remove the "fast endian switch" syscall powerpc: Stop using no_llseek macintosh/via-pmu: register_pmu_pm_ops() can be __init Merge branch 'topic/ppc-kvm' into next MAINTAINERS: powerpc: Add Maddy powerpc/atomic: Use YZ constraints for DS-form instructions Narayana Murty N (1): powerpc/pseries/eeh: Fix pseries_eeh_err_inject Rob Herring (Arm) (1): powerpc: Use of_property_present() Thomas Zimmermann (2): powerpc/traps: Use backlight power constants macintosh/via-pmu-backlight: Use backlight power constants Uwe Kleine-K=C3=B6nig (2): powerpc/476: Drop explicit initialization of struct i2c_device_id::dr= iver_data to 0 powerpc: Switch back to struct platform_driver::remove() Zhang Zekun (2): powerpc/powermac/pfunc_base: Use helper function for_each_child_of_no= de() powerpc/pseries/dlpar: Use helper function for_each_child_of_node() CREDITS | 6 + MAINTAINERS | 9 +- arch/powerpc/Kconfig | 32 ++- arch/powerpc/Kconfig.debug | 6 - arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/include/asm/asm-compat.h | 8 +- arch/powerpc/include/asm/atomic.h | 5 +- arch/powerpc/include/asm/book3s/32/pgtable.h | 3 +- arch/powerpc/include/asm/book3s/64/hash-4k.h | 20 ++ arch/powerpc/include/asm/book3s/64/pgtable.h | 26 --- arch/powerpc/include/asm/code-patching.h | 37 ++++ arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/include/asm/mmu_context.h | 3 - arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 3 +- arch/powerpc/include/asm/nohash/pgalloc.h | 8 +- arch/powerpc/include/asm/percpu.h | 2 +- arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/include/asm/thread_info.h | 4 + arch/powerpc/include/asm/uaccess.h | 7 +- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/cacheinfo.c | 2 +- arch/powerpc/kernel/eeh.c | 13 +- arch/powerpc/kernel/exceptions-64s.S | 17 -- arch/powerpc/kernel/head_8xx.S | 78 ++++--- arch/powerpc/kernel/head_book3s_32.S | 144 ++++++------ arch/powerpc/kernel/kprobes.c | 65 +----- arch/powerpc/kernel/module_64.c | 5 +- arch/powerpc/kernel/optprobes.c | 2 +- arch/powerpc/kernel/process.c | 22 +- arch/powerpc/kernel/rethook.c | 73 ++++++ arch/powerpc/kernel/secvar-sysfs.c | 2 +- arch/powerpc/kernel/stacktrace.c | 6 +- arch/powerpc/kernel/static_call.c | 2 +- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/vdso/gettimeofday.S | 4 - arch/powerpc/kvm/book3s_hv.c | 18 +- arch/powerpc/lib/code-patching.c | 70 ++++-- arch/powerpc/lib/test-code-patching.c | 41 ++++ arch/powerpc/mm/book3s32/mmu.c | 2 + arch/powerpc/mm/book3s64/hash_utils.c | 2 +- arch/powerpc/mm/mem.c | 14 ++ arch/powerpc/mm/nohash/8xx.c | 9 +- arch/powerpc/platforms/44x/ppc476.c | 2 +- arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 1 - arch/powerpc/platforms/85xx/sgy_cts1000.c | 2 +- arch/powerpc/platforms/8xx/Kconfig | 7 + arch/powerpc/platforms/Kconfig.cputype | 11 +- arch/powerpc/platforms/cell/spufs/file.c | 17 -- arch/powerpc/platforms/maple/maple.h | 1 - arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/platforms/pasemi/pasemi.h | 1 - arch/powerpc/platforms/powermac/pfunc_base.c | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 3 +- arch/powerpc/platforms/powernv/opal-dump.c | 2 +- arch/powerpc/platforms/powernv/opal-elog.c | 2 +- arch/powerpc/platforms/powernv/opal-lpc.c | 2 +- arch/powerpc/platforms/powernv/opal-prd.c | 2 +- arch/powerpc/platforms/powernv/pci.h | 1 - arch/powerpc/platforms/pseries/dlpar.c | 234 +++++++++++= +++++++-- arch/powerpc/platforms/pseries/dtl.c | 1 - arch/powerpc/platforms/pseries/eeh_pseries.c | 39 +++- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- arch/powerpc/platforms/pseries/hotplug-memory.c | 16 +- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- arch/powerpc/platforms/pseries/pmem.c | 2 +- arch/powerpc/platforms/pseries/vas-sysfs.c | 4 +- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- arch/powerpc/xmon/xmon.c | 2 +- drivers/macintosh/via-pmu-backlight.c | 2 +- drivers/macintosh/via-pmu.c | 2 +- tools/testing/selftests/powerpc/benchmarks/Makefile | 2 +- tools/testing/selftests/powerpc/benchmarks/exec_target.c | 16 +- 75 files changed, 781 insertions(+), 385 deletions(-) create mode 100644 arch/powerpc/kernel/rethook.c -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRjvi15rv0TSTaE+SIF0oADX8seIQUCZurhKAAKCRAF0oADX8se IZ13AQCm39s+vzO2omeS0Gmy3OGZJclzH1vdPVQgi+NVtWeJXAD+M5Vd6zbpUpw3 5yLOLy25C919Aujgo1bsk1ALg9g/Ugs=3D =3D0TcI -----END PGP SIGNATURE----- . Date: Wed, 18 Sep 2024 16:40:17 -0500 From: Corey Minyard To: Linus Torvalds Cc: linux-kernel , openipmi-developer@lists.sourceforge.net Subject: [GIT PULL] IPMI bug fixes for 6.12 The following changes since commit 0108b7be2a18d85face1e10c68ecc0138f1bed58: Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd (2024-08-20 16:06:39 -0700) are available in the Git repository at: https://github.com/cminyard/linux-ipmi.git tags/for-linus-6.12-1 for you to fetch changes up to 64dce81f8c373c681e62d5ffe0397c45a35d48a2: ipmi: docs: don't advertise deprecated sysfs entries (2024-09-01 14:35:35 -0500) ---------------------------------------------------------------- Some minor fixes and cleanups for IPMI. Nothing big. Handle a bogus BMC a little better, fix autoload on some systems, remove some deprecated interfaces from the docs. ---------------------------------------------------------------- Corey Minyard (1): ipmi:ssif: Improve detecting during probing Wolfram Sang (1): ipmi: docs: don't advertise deprecated sysfs entries Yuntao Liu (1): ipmi: ipmi_ssif: fix module autoloading Documentation/driver-api/ipmi.rst | 2 +- drivers/char/ipmi/ipmi_ssif.c | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) . Date: Wed, 18 Sep 2024 16:57:35 -0500 From: Rob Herring To: Linus Torvalds Cc: Saravana Kannan , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [GIT PULL] Devicetree updates for v6.12 Linus, Please pull DT updates for 6.12. There's one trivial context conflict in wakeup-source.txt with the input tree. Rob The following changes since commit b739dffa5d570b411d4bdf4bb9b8dfd6b7d72305: of/irq: Prevent device address out-of-bounds read in interrupt map walk (2024-08-13 15:17:24 -0600) are available in the Git repository at: ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/robh/linux.git tags/devicetree-for-6.12 for you to fetch changes up to 0c36680c0e2d959cc264a1e65628c825f7f87add: dt-bindings: watchdog: Add rockchip,rk3576-wdt compatible (2024-09-18 15:38:24 -0500) ---------------------------------------------------------------- Devicetree updates for v6.12: DT Bindings: - Drop duplicate devices in trivial-devices.yaml - Add a common serial peripheral device schema and reference it in serial device schemas. - Convert nxp,lpc1850-wdt, zii,rave-wdt, ti,davinci-wdt, snps,archs-pct, fsl,bcsr, fsl,fpga-qixis-i2c, fsl,fpga-qixis, fsl,cpm-enet, fsl,cpm-mdio, fsl,ucc-hdlc, maxim,ds26522, aspeed,ast2400-cvic, aspeed,ast2400-vic, fsl,ftm-timer, ti,davinci-timer, fsl,rcpm, and qcom,ebi2 to DT schema - Add support for rockchip,rk3576-wdt, qcom,apss-wdt-sa8255p, fsl,imx8qm-irqsteer, qcom,pm6150-vib, qcom,sa8255p-pdc, isil,isl69260, ti,tps546d24, and lpc32xx DMA mux - Drop duplicate nvidia,tegra186-ccplex-cluster.yaml and mediatek,mt6795-sys-clock.yaml - Add arm,gic ESPI and EPPI interrupt type specifiers - Add another batch of legacy compatible strings which we have no intention of documenting - Add dmas/dma-names properties to FSL lcdif - Fix wakeup-source reference to m8921-keypad.yaml - Treewide fixes of typos in bindings DT Core: - Update dtc/libfdt to upstream version v1.7.0-95-gbcd02b523429 - More conversions to scoped iterators and __free() initializer - Handle overflows in address resources on 32-bit systems - Extend extracting compatible strings in sources from function parameters - Use of_property_present() in DT unittest - Clean-up of_irq_to_resource() to use helpers - Support #msi-cells=<0> in of_msi_get_domain() - Improve the kerneldoc for of_property_match_string() - kselftest: Ignore nodes that have ancestors disabled ---------------------------------------------------------------- Andrew Jeffery (2): dt-bindings: interrupt-controller: aspeed,ast2400-vic: Convert to DT schema dt-bindings: misc: aspeed,ast2400-cvic: Convert to DT schema Andrew Jones (1): of/irq: Support #msi-cells=<0> in of_msi_get_domain Animesh Agarwal (3): dt-bindings: timer: fsl,ftm-timer: Convert to dtschema dt-bindings: timer: nxp,lpc3220-timer: Convert to dtschema dt-bindings: watchdog: nxp,lpc1850-wdt: Convert bindings to dtschema Aryabhatta Dey (1): dt-bindings: arc: convert archs-pct.txt to yaml Detlev Casanova (1): dt-bindings: watchdog: Add rockchip,rk3576-wdt compatible Fabio Estevam (2): dt-bindings: lcdif: Document the dmas/dma-names properties dt-bindings: interrupt-controller: fsl,irqsteer: Document fsl,imx8qm-irqsteer Frank Li (7): dt-bindings: soc: fsl: Convert rcpm to yaml format dt-bindings: soc: fsl: add missed compatible string fsl,ls*-isc dt-bindings: net: convert maxim,ds26522.txt to yaml format dt-bindings: soc: fsl: cpm_qe: convert network.txt to yaml dt-bindings: board: convert fsl-board.txt to yaml dt-bindings: display: panel-simple-lvds-dual-ports: use unevaluatedProperties dt-bindings: watchdog: convert ziirave-wdt.txt to yaml Geert Uytterhoeven (2): of/irq: Refer to actual buffer size in of_irq_parse_one() dt-bindings: clk: vc5: Make SD/OE pin configuration properties not required Hugues KAMBA MPIANA (1): dt-bindings: arm: Update Corstone-1000 maintainers Jens Reidel (1): dt-bindings: input: qcom,pm8xxx-vib: Document PM6150 compatible Jinjie Ruan (3): of: overlay: Simplify with scoped for each OF child loop of/platform: Simplify with scoped for each OF child of: resolver: Simplify with scoped for each OF child loop Kousik Sanagavarapu (2): dt-bindings: timer: ti,davinci-timer: convert to dtschema dt-bindings: watchdog: ti,davinci-wdt: convert to dtschema Krzysztof Kozlowski (7): dt-bindings: fsl: fsl,rcpm: fix unevaluated fsl,rcpm-wakeup property dt-bindings: serial: add missing "additionalProperties" on child nodes dt-bindings: serial: add common properties schema for UART children dt-bindings: bluetooth: move Bluetooth bindings to dedicated directory dt-bindings: gnss: reference serial-peripheral-props.yaml dt-bindings: bluetooth: reference serial-peripheral-props.yaml ASoC: dt-bindings: serial-midi: reference serial-peripheral-props.yaml Marek Vasut (1): dt-bindings: hwmon: Document TI TPS546D24 Miquel Sabaté Solà (1): drivers/of: Improve documentation for match_string Nikunj Kela (3): dt-bindings: interrupt-controller: qcom-pdc: document support for SA8255p dt-bindings: interrupt-controller: arm,gic: add ESPI and EPPI specifiers dt-bindings: watchdog: qcom-wdt: document support on SA8255p Nícolas F. R. A. Prado (1): kselftest: dt: Ignore nodes that have ancestors disabled Peter Yin (1): dt-bindings: trivial-devices: add isil,isl69260 Piotr Wojtaszczyk (1): dt-bindings: dma: Add lpc32xx DMA mux binding Rayyan Ansari (1): dt-bindings: bus: qcom,ebi2: convert to dtschema Rob Herring (Arm) (11): of: unittest: Use of_property_present() scripts/dtc: Update to upstream version v1.7.0-95-gbcd02b523429 Merge branch 'dt/linus' into dt/next dt: dt-extract-compatibles: Extract compatibles from function parameters dt-bindings: incomplete-devices: And another batch of compatibles dt-bindings: trivial-devices: Drop incorrect and duplicate at24 compatibles dt-bindings: trivial-devices: Deprecate "ad,ad7414" dt-bindings: trivial-devices: Drop duplicate LM75 compatible devices dt-bindings: trivial-devices: Drop duplicate "maxim,max1237" dt-bindings: clock: mediatek: Drop duplicate mediatek,mt6795-sys-clock.yaml dt-bindings: cpu: Drop duplicate nvidia,tegra186-ccplex-cluster.yaml Simon Horman (1): dt-bindings: wakeup-source: update reference to m8921-keypad.yaml Thomas Weißschuh (2): of: address: Report error on resource bounds overflow of: address: Unify resource bounds overflow checking Vasileios Amoiridis (2): of/irq: Make use of irq_get_trigger_type() of/irq: Use helper to define resources Yu-Chun Lin (1): dt-bindings: Fix various typos Zhang Zekun (1): of: property: Do some clean up with use of __free() .../devicetree/bindings/arc/archs-pct.txt | 17 -- .../devicetree/bindings/arc/snps,archs-pct.yaml | 33 +++ .../bindings/arm/arm,coresight-dummy-source.yaml | 2 +- .../devicetree/bindings/arm/arm,corstone1000.yaml | 4 +- .../devicetree/bindings/board/fsl,bcsr.yaml | 32 +++ .../bindings/board/fsl,fpga-qixis-i2c.yaml | 70 ++++++ .../devicetree/bindings/board/fsl,fpga-qixis.yaml | 81 +++++++ .../devicetree/bindings/board/fsl-board.txt | 81 ------- .../devicetree/bindings/bus/qcom,ebi2.txt | 138 ------------ .../devicetree/bindings/bus/qcom,ebi2.yaml | 239 +++++++++++++++++++++ .../devicetree/bindings/clock/idt,versaclock5.yaml | 2 - .../bindings/clock/mediatek,mt6795-sys-clock.yaml | 54 ----- .../devicetree/bindings/cpu/idle-states.yaml | 2 +- .../cpu/nvidia,tegra186-ccplex-cluster.yaml | 37 ---- .../devicetree/bindings/display/fsl,lcdif.yaml | 20 ++ .../devicetree/bindings/display/lvds.yaml | 2 +- .../panel/panel-simple-lvds-dual-ports.yaml | 6 +- .../bindings/dma/nxp,lpc3220-dmamux.yaml | 49 +++++ .../devicetree/bindings/dma/ti-dma-crossbar.txt | 2 +- .../devicetree/bindings/gnss/brcm,bcm4751.yaml | 1 + .../devicetree/bindings/gnss/gnss-common.yaml | 5 - .../devicetree/bindings/gnss/mediatek.yaml | 1 + .../devicetree/bindings/gnss/sirfstar.yaml | 1 + .../devicetree/bindings/gnss/u-blox,neo-6m.yaml | 1 + .../devicetree/bindings/iio/accel/lis302.txt | 2 +- .../devicetree/bindings/incomplete-devices.yaml | 148 +++++++++++++ .../devicetree/bindings/input/qcom,pm8xxx-vib.yaml | 1 + .../bindings/interrupt-controller/arm,gic-v3.yaml | 2 +- .../interrupt-controller/aspeed,ast2400-vic.txt | 23 -- .../interrupt-controller/aspeed,ast2400-vic.yaml | 62 ++++++ .../interrupt-controller/fsl,irqsteer.yaml | 2 + .../bindings/interrupt-controller/qcom,pdc.yaml | 1 + .../devicetree/bindings/leds/awinic,aw200xx.yaml | 2 +- .../bindings/mailbox/brcm,iproc-flexrm-mbox.txt | 2 +- .../bindings/media/i2c/thine,thp7312.yaml | 2 +- .../bindings/media/samsung,exynos4210-fimc.yaml | 2 +- .../devicetree/bindings/mfd/rohm,bd96801-pmic.yaml | 2 +- .../devicetree/bindings/mfd/samsung,s2mps11.yaml | 2 +- Documentation/devicetree/bindings/mfd/twl6040.txt | 2 +- .../bindings/misc/aspeed,ast2400-cvic.yaml | 60 ++++++ .../devicetree/bindings/misc/aspeed,cvic.txt | 35 --- .../brcm,bluetooth.yaml} | 35 ++- .../marvell,88w8897.yaml} | 6 +- .../mediatek,bluetooth.txt} | 0 .../nokia,h4p-bluetooth.txt} | 0 .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 6 +- .../realtek,bluetooth.yaml} | 5 +- .../bindings/net/{ => bluetooth}/ti,bluetooth.yaml | 5 +- .../devicetree/bindings/net/fsl,cpm-enet.yaml | 59 +++++ .../devicetree/bindings/net/fsl,cpm-mdio.yaml | 55 +++++ .../devicetree/bindings/net/maxim,ds26522.txt | 13 -- .../devicetree/bindings/net/maxim,ds26522.yaml | 40 ++++ .../devicetree/bindings/phy/apm-xgene-phy.txt | 2 +- .../bindings/phy/mediatek,mt7988-xfi-tphy.yaml | 2 +- .../devicetree/bindings/phy/mediatek,tphy.yaml | 2 +- .../bindings/phy/qcom,snps-eusb2-repeater.yaml | 2 +- .../bindings/pinctrl/st,stm32-pinctrl.yaml | 4 +- .../devicetree/bindings/power/wakeup-source.txt | 2 +- .../devicetree/bindings/remoteproc/mtk,scp.yaml | 2 +- .../devicetree/bindings/rtc/fsl,ls-ftm-alarm.yaml | 2 +- .../bindings/serial/nvidia,tegra20-hsuart.yaml | 2 +- .../bindings/serial/serial-peripheral-props.yaml | 41 ++++ .../devicetree/bindings/serial/serial.yaml | 24 +-- .../bindings/soc/fsl/cpm_qe/fsl,ucc-hdlc.yaml | 140 ++++++++++++ .../devicetree/bindings/soc/fsl/cpm_qe/network.txt | 130 ----------- .../bindings/soc/fsl/fsl,layerscape-scfg.yaml | 3 + .../devicetree/bindings/soc/fsl/fsl,rcpm.yaml | 87 ++++++++ Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 69 ------ .../devicetree/bindings/sound/everest,es8326.yaml | 2 +- .../devicetree/bindings/sound/serial-midi.yaml | 3 + .../devicetree/bindings/sound/st,sta350.txt | 2 +- .../devicetree/bindings/thermal/qcom-tsens.yaml | 2 +- .../devicetree/bindings/timer/fsl,ftm-timer.txt | 31 --- .../devicetree/bindings/timer/fsl,ftm-timer.yaml | 59 +++++ .../bindings/timer/nxp,lpc3220-timer.txt | 26 --- .../bindings/timer/nxp,lpc3220-timer.yaml | 55 +++++ .../devicetree/bindings/timer/ti,da830-timer.yaml | 68 ++++++ .../devicetree/bindings/timer/ti,davinci-timer.txt | 37 ---- .../devicetree/bindings/trivial-devices.yaml | 20 +- .../devicetree/bindings/watchdog/davinci-wdt.txt | 24 --- .../devicetree/bindings/watchdog/lpc18xx-wdt.txt | 19 -- .../bindings/watchdog/nxp,lpc1850-wwdt.yaml | 52 +++++ .../devicetree/bindings/watchdog/qcom-wdt.yaml | 1 + .../devicetree/bindings/watchdog/snps,dw-wdt.yaml | 1 + .../bindings/watchdog/ti,davinci-wdt.yaml | 55 +++++ .../devicetree/bindings/watchdog/zii,rave-wdt.yaml | 49 +++++ .../devicetree/bindings/watchdog/ziirave-wdt.txt | 19 -- MAINTAINERS | 11 +- drivers/of/address.c | 40 ++-- drivers/of/irq.c | 43 +--- drivers/of/overlay.c | 12 +- drivers/of/platform.c | 14 +- drivers/of/property.c | 41 ++-- drivers/of/resolver.c | 12 +- drivers/of/unittest.c | 4 +- include/dt-bindings/interrupt-controller/arm-gic.h | 2 + scripts/dtc/checks.c | 16 +- scripts/dtc/dt-extract-compatibles | 13 ++ scripts/dtc/fdtoverlay.c | 2 +- scripts/dtc/version_gen.h | 2 +- .../testing/selftests/dt/test_unprobed_devices.sh | 15 +- 101 files changed, 1756 insertions(+), 964 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arc/archs-pct.txt create mode 100644 Documentation/devicetree/bindings/arc/snps,archs-pct.yaml create mode 100644 Documentation/devicetree/bindings/board/fsl,bcsr.yaml create mode 100644 Documentation/devicetree/bindings/board/fsl,fpga-qixis-i2c.yaml create mode 100644 Documentation/devicetree/bindings/board/fsl,fpga-qixis.yaml delete mode 100644 Documentation/devicetree/bindings/board/fsl-board.txt delete mode 100644 Documentation/devicetree/bindings/bus/qcom,ebi2.txt create mode 100644 Documentation/devicetree/bindings/bus/qcom,ebi2.yaml delete mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt6795-sys-clock.yaml delete mode 100644 Documentation/devicetree/bindings/cpu/nvidia,tegra186-ccplex-cluster.yaml create mode 100644 Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.yaml create mode 100644 Documentation/devicetree/bindings/misc/aspeed,ast2400-cvic.yaml delete mode 100644 Documentation/devicetree/bindings/misc/aspeed,cvic.txt rename Documentation/devicetree/bindings/net/{broadcom-bluetooth.yaml => bluetooth/brcm,bluetooth.yaml} (90%) rename Documentation/devicetree/bindings/net/{marvell-bluetooth.yaml => bluetooth/marvell,88w8897.yaml} (83%) rename Documentation/devicetree/bindings/net/{mediatek-bluetooth.txt => bluetooth/mediatek,bluetooth.txt} (100%) rename Documentation/devicetree/bindings/net/{nokia-bluetooth.txt => bluetooth/nokia,h4p-bluetooth.txt} (100%) rename Documentation/devicetree/bindings/net/{realtek-bluetooth.yaml => bluetooth/realtek,bluetooth.yaml} (92%) rename Documentation/devicetree/bindings/net/{ => bluetooth}/ti,bluetooth.yaml (94%) create mode 100644 Documentation/devicetree/bindings/net/fsl,cpm-enet.yaml create mode 100644 Documentation/devicetree/bindings/net/fsl,cpm-mdio.yaml delete mode 100644 Documentation/devicetree/bindings/net/maxim,ds26522.txt create mode 100644 Documentation/devicetree/bindings/net/maxim,ds26522.yaml create mode 100644 Documentation/devicetree/bindings/serial/serial-peripheral-props.yaml create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,ucc-hdlc.yaml delete mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt create mode 100644 Documentation/devicetree/bindings/soc/fsl/fsl,rcpm.yaml delete mode 100644 Documentation/devicetree/bindings/soc/fsl/rcpm.txt delete mode 100644 Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt create mode 100644 Documentation/devicetree/bindings/timer/fsl,ftm-timer.yaml delete mode 100644 Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.txt create mode 100644 Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.yaml create mode 100644 Documentation/devicetree/bindings/timer/ti,da830-timer.yaml delete mode 100644 Documentation/devicetree/bindings/timer/ti,davinci-timer.txt delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt delete mode 100644 Documentation/devicetree/bindings/watchdog/lpc18xx-wdt.txt create mode 100644 Documentation/devicetree/bindings/watchdog/nxp,lpc1850-wwdt.yaml create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt . Date: Thu, 19 Sep 2024 08:06:41 +0200 From: Juergen Gross To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, sstabellini@kernel.org Subject: [GIT PULL] xen: branch for v6.12-rc1 Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-6.12-rc1-tag xen: branch for v6.12-rc1 It contains the following patches: - A 7 patch series fixing a boot problem as a Xen dom0 on some AMD systems - A 3 patch series fixing Xen PVH boot problems with KASAN enabled - A fix for a build warning - 2 fixes in swiotlb-xen Thanks. Juergen arch/x86/include/asm/acpi.h | 8 ++ arch/x86/include/asm/cpuid.h | 7 +- arch/x86/kernel/acpi/boot.c | 11 ++ arch/x86/kernel/jailhouse.c | 1 + arch/x86/kernel/mmconf-fam10h_64.c | 1 + arch/x86/kernel/smpboot.c | 1 + arch/x86/kernel/x86_init.c | 1 + arch/x86/platform/pvh/Makefile | 1 + arch/x86/platform/pvh/enlighten.c | 6 +- arch/x86/xen/mmu_pv.c | 5 +- arch/x86/xen/p2m.c | 98 ++++++++++++++++++ arch/x86/xen/setup.c | 202 ++++++++++++++++++++++++++++--------- arch/x86/xen/xen-ops.h | 6 +- drivers/xen/pci.c | 14 +-- drivers/xen/swiotlb-xen.c | 10 +- drivers/xen/xenbus/xenbus_xs.c | 6 +- 16 files changed, 312 insertions(+), 66 deletions(-) Alexey Dobriyan (3): xen, pvh: fix unbootable VMs (PVH + KASAN - AMD_MEM_ENCRYPT) x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base() xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh() Gustavo A. R. Silva (1): xen/pci: Avoid -Wflex-array-member-not-at-end warning Juergen Gross (9): xen: use correct end address of kernel for conflict checking xen: introduce generic helper checking for memory map conflicts xen: move checks for e820 conflicts further up xen: move max_pfn in xen_memory_setup() out of function scope xen: add capability to remap non-RAM pages to different PFNs xen: allow mapping ACPI data using a different physical address xen: tolerate ACPI NVS memory overlapping with Xen allocated memory xen/swiotlb: add alignment check for dma buffers xen/swiotlb: fix allocated size Shen Lichuan (1): xen/xenbus: Convert to use ERR_CAST() . Date: Thu, 19 Sep 2024 00:35:57 -0700 From: Andrew Morton To: Linus Torvalds Cc: linux-mm@kvack.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] hotfixes for 6.12-rc1 Linus, please merge this batch of hotfixes, thanks. The following changes since commit 052a45c1cb1b32f05dd63a295d65496d8b403283: alloc_tag: fix allocation tag reporting when CONFIG_MODULES=n (2024-09-01 17:59:03 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm tags/mm-hotfixes-stable-2024-09-19-00-31 for you to fetch changes up to 22af8caff7d1ca22a1ff1a554180e53f7a6555af: mm/madvise: process_madvise() drop capability check if same mm (2024-09-17 00:58:05 -0700) ---------------------------------------------------------------- 12 hotfixes, 11 of which are cc:stable. Four fixes for longstanding ocfs2 issues and the remainder address random MM things. ---------------------------------------------------------------- Chris Li (1): mm: vmscan.c: fix OOM on swap stress test Huang Ying (1): resource: fix region_intersects() vs add_memory_driver_managed() Joseph Qi (1): ocfs2: cancel dqi_sync_work before freeing oinfo Julian Sun (1): ocfs2: fix null-ptr-deref when journal load failed. Liam R. Howlett (1): mm/damon/vaddr: protect vma traversal in __damon_va_thre_regions() with rcu read lock Lizhi Xu (2): ocfs2: remove unreasonable unlock in ocfs2_read_blocks ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate Lorenzo Stoakes (1): mm/madvise: process_madvise() drop capability check if same mm Miaohe Lin (1): mm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set Sergey Senozhatsky (1): zsmalloc: use unique zsmalloc caches names Vishal Moola (Oracle) (2): mm: change vmf_anon_prepare() to __vmf_anon_prepare() mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway fs/ocfs2/buffer_head_io.c | 4 ++-- fs/ocfs2/journal.c | 7 +++--- fs/ocfs2/quota_local.c | 8 +++++-- kernel/resource.c | 58 ++++++++++++++++++++++++++++++++++++++++------- mm/damon/vaddr.c | 2 ++ mm/huge_memory.c | 2 ++ mm/hugetlb.c | 20 ++++++++++++++-- mm/internal.h | 11 ++++++++- mm/madvise.c | 2 +- mm/memory.c | 8 +++---- mm/vmscan.c | 2 +- mm/zsmalloc.c | 23 ++++++++++++++----- 12 files changed, 116 insertions(+), 31 deletions(-) . Date: Thu, 19 Sep 2024 17:48:14 +1000 From: Dave Airlie To: Linus Torvalds , Sima Vetter Cc: dri-devel , LKML Subject: [git pull] drm for 6.12-rc1 Hi Linus, This is the main drm pull request for 6.12-rc1. There are some minor conflicts with your tree but none seemed too difficult to solve, let me know if there is any problems on your end. This adds a couple of patches outside the drm core, all should be acked appropriately, the string and pstore ones are the main ones that come to mind. Otherwise it's the usual drivers, xe is getting enabled by default on some new hardware, we've changed the device number handling to allow more devices, and we added some optional rust code to create QR codes in the panic handler, an idea first suggested I think 10 years ago :-) Fuller summary below, Thanks, Dave. drm-next-2024-09-19: drm next for 6.12-rc1 string: - add mem_is_zero() core: - support more device numbers - use XArray for minor ids - add backlight constants - Split dma fence array creation into alloc and arm fbdev: - remove usage of old fbdev hooks kms: - Add might_fault() to drm_modeset_lock priming - Add dynamic per-crtc vblank configuration support dma-buf: - docs cleanup buddy: - Add start address support for trim function printk: - pass description to kmsg_dump scheduler; - Remove full_recover from drm_sched_start ttm: - Make LRU walk restartable after dropping locks - Allow direct reclaim to allocate local memory panic: - add display QR code (in rust) displayport: - mst: GUID improvements bridge: - Silence error message on -EPROBE_DEFER - analogix: Clean aup - bridge-connector: Fix double free - lt6505: Disable interrupt when powered off - tc358767: Make default DP port preemphasis configurable - lt9611uxc: require DRM_BRIDGE_ATTACH_NO_CONNECTOR - anx7625: simplify OF array handling - dw-hdmi: simplify clock handling - lontium-lt8912b: fix mode validation - nwl-dsi: fix mode vsync/hsync polarity xe: - Enable LunarLake and Battlemage support - Introducing Xe2 ccs modifiers for integrated and discrete graphics - rename xe perf to xe observation - use wb caching on DGFX for system memory - add fence timeouts - Lunar Lake graphics/media/display workarounds - Battlemage workarounds - Battlemage GSC support - GSC and HuC fw updates for LL/BM - use dma_fence_chain_free - refactor hw engine lookup and mmio access - enable priority mem read for Xe2 - Add first GuC BMG fw - fix dma-resv lock - Fix DGFX display suspend/resume - Use xe_managed for kernel BOs - Use reserved copy engine for user binds on faulting devices - Allow mixing dma-fence jobs and long-running faulting jobs - fix media TLB invalidation - fix rpm in TTM swapout path - track resources and VF state by PF i915: - Type-C programming fix for MTL+ - FBC cleanup - Calc vblank delay more accurately - On DP MST, Enable LT fallback for UHBR<->non-UHBR rates - Fix DP LTTPR detection - limit relocations to INT_MAX - fix long hangs in buddy allocator on DG2/A380 amdgpu: - Per-queue reset support - SDMA devcoredump support - DCN 4.0.1 updates - GFX12/VCN4/JPEG4 updates - Convert vbios embedded EDID to drm_edid - GFX9.3/9.4 devcoredump support - process isolation framework for GFX 9.4.3/4 - take IOMMU mappings into account for P2P DMA amdkfd: - CRIU fixes - HMM fix - Enable process isolation support for GFX 9.4.3/4 - Allow users to target recommended SDMA engines - KFD support for targetting queues on recommended SDMA engines radeon: - remove .load and drm_dev_alloc - Fix vbios embedded EDID size handling - Convert vbios embedded EDID to drm_edid - Use GEM references instead of TTM - r100 cp init cleanup - Fix potential overflows in evergreen CS offset tracking msm: - DPU: - implement DP/PHY mapping on SC8180X - Enable writeback on SM8150, SC8180X, SM6125, SM6350 - DP: - Enable widebus on all relevant chipsets - MSM8998 HDMI support - GPU: - A642L speedbin support - A615/A306/A621 support - A7xx devcoredump support ast: - astdp: Support AST2600 with VGA - Clean up HPD - Fix timeout loop for DP link training - reorganize output code by type (VGA, DP, etc) - convert to struct drm_edid - fix BMC handling for all outputs exynos: - drop stale MAINTAINERS pattern - constify struct loongson: - use GEM refcount over TTM mgag200: - Improve BMC handling - Support VBLANK intterupts - transparently support BMC outputs nouveau: - Refactor and clean up internals - Use GEM refcount over TTM's gm12u320: - convert to struct drm_edid gma500: - update i2c terms lcdif: - pixel clock fix host1x: - fix syncpoint IRQ during resume - use iommu_paging_domain_alloc() imx: - ipuv3: convert to struct drm_edid omapdrm: - improve error handling - use common helper for_each_endpoint_of_node() panel: - add support for BOE TV101WUM-LL2 plus DT bindings - novatek-nt35950: improve error handling - nv3051d: improve error handling - panel-edp: add support for BOE NE140WUM-N6G; revert support for SDC ATNA45AF01 - visionox-vtdr6130: improve error handling; use devm_regulator_bulk_get_const() - boe-th101mb31ig002: Support for starry-er88577 MIPI-DSI panel plus DT; Fix porch parameter - edp: Support AOU B116XTN02.3, AUO B116XAN06.1, AOU B116XAT04.1, BOE NV140WUM-N41, BOE NV133WUM-N63, BOE NV116WHM-A4D, CMN N116BCA-EA2, CMN N116BCP-EA2, CSW MNB601LS1-4 - himax-hx8394: Support Microchip AC40T08A MIPI Display panel plus DT - ilitek-ili9806e: Support Densitron DMT028VGHMCMI-1D TFT plus DT - jd9365da: Support Melfas lmfbx101117480 MIPI-DSI panel plus DT; Refactor for code sharing - panel-edp: fix name for HKC MB116AN01 - jd9365da: fix "exit sleep" commands - jdi-fhd-r63452: simplify error handling with DSI multi-style helpers - mantix-mlaf057we51: simplify error handling with DSI multi-style helpers - simple: support Innolux G070ACE-LH3 plus DT bindings support On Tat Industrial Company KD50G21-40NT-A1 plus DT bindings - st7701: decouple DSI and DRM code add SPI support support Anbernic RG28XX plus DT bindings mediatek: - support alpha blending - remove cl in struct cmdq_pkt - ovl adaptor fix - add power domain binding for mediatek DPI controller renesas: - rz-du: add support for RZ/G2UL plus DT bindings rockchip: - Improve DP sink-capability reporting - dw_hdmi: Support 4k@60Hz - vop: Support RGB display on Rockchip RK3066; Support 4096px width sti: - convert to struct drm_edid stm: - Avoid UAF wih managed plane and CRTC helpers - Fix module owner - Fix error handling in probe - Depend on COMMON_CLK - ltdc: Fix transparency after disabling plane; Remove unused interrupt tegra: - gr3d: improve PM domain handling - convert to struct drm_edid - Call drm_atomic_helper_shutdown() vc4: - fix PM during detect - replace DRM_ERROR() with drm_error() - v3d: simplify clock retrieval v3d: - Clean up perfmon virtio: - add DRM capset The following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63= : Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/drm/kernel.git tags/drm-next-2024-09-19 for you to fetch changes up to ae2c6d8b3b88c176dff92028941a4023f1b4cb91: Merge tag 'drm-xe-next-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next (2024-09-17 14:53:34 +1000) ---------------------------------------------------------------- drm next for 6.12-rc1 string: - add mem_is_zero() core: - support more device numbers - use XArray for minor ids - add backlight constants - Split dma fence array creation into alloc and arm fbdev: - remove usage of old fbdev hooks kms: - Add might_fault() to drm_modeset_lock priming - Add dynamic per-crtc vblank configuration support dma-buf: - docs cleanup buddy: - Add start address support for trim function printk: - pass description to kmsg_dump scheduler; - Remove full_recover from drm_sched_start ttm: - Make LRU walk restartable after dropping locks - Allow direct reclaim to allocate local memory panic: - add display QR code (in rust) displayport: - mst: GUID improvements bridge: - Silence error message on -EPROBE_DEFER - analogix: Clean aup - bridge-connector: Fix double free - lt6505: Disable interrupt when powered off - tc358767: Make default DP port preemphasis configurable - lt9611uxc: require DRM_BRIDGE_ATTACH_NO_CONNECTOR - anx7625: simplify OF array handling - dw-hdmi: simplify clock handling - lontium-lt8912b: fix mode validation - nwl-dsi: fix mode vsync/hsync polarity xe: - Enable LunarLake and Battlemage support - Introducing Xe2 ccs modifiers for integrated and discrete graphics - rename xe perf to xe observation - use wb caching on DGFX for system memory - add fence timeouts - Lunar Lake graphics/media/display workarounds - Battlemage workarounds - Battlemage GSC support - GSC and HuC fw updates for LL/BM - use dma_fence_chain_free - refactor hw engine lookup and mmio access - enable priority mem read for Xe2 - Add first GuC BMG fw - fix dma-resv lock - Fix DGFX display suspend/resume - Use xe_managed for kernel BOs - Use reserved copy engine for user binds on faulting devices - Allow mixing dma-fence jobs and long-running faulting jobs - fix media TLB invalidation - fix rpm in TTM swapout path - track resources and VF state by PF i915: - Type-C programming fix for MTL+ - FBC cleanup - Calc vblank delay more accurately - On DP MST, Enable LT fallback for UHBR<->non-UHBR rates - Fix DP LTTPR detection - limit relocations to INT_MAX - fix long hangs in buddy allocator on DG2/A380 amdgpu: - Per-queue reset support - SDMA devcoredump support - DCN 4.0.1 updates - GFX12/VCN4/JPEG4 updates - Convert vbios embedded EDID to drm_edid - GFX9.3/9.4 devcoredump support - process isolation framework for GFX 9.4.3/4 - take IOMMU mappings into account for P2P DMA amdkfd: - CRIU fixes - HMM fix - Enable process isolation support for GFX 9.4.3/4 - Allow users to target recommended SDMA engines - KFD support for targetting queues on recommended SDMA engines radeon: - remove .load and drm_dev_alloc - Fix vbios embedded EDID size handling - Convert vbios embedded EDID to drm_edid - Use GEM references instead of TTM - r100 cp init cleanup - Fix potential overflows in evergreen CS offset tracking msm: - DPU: - implement DP/PHY mapping on SC8180X - Enable writeback on SM8150, SC8180X, SM6125, SM6350 - DP: - Enable widebus on all relevant chipsets - MSM8998 HDMI support - GPU: - A642L speedbin support - A615/A306/A621 support - A7xx devcoredump support ast: - astdp: Support AST2600 with VGA - Clean up HPD - Fix timeout loop for DP link training - reorganize output code by type (VGA, DP, etc) - convert to struct drm_edid - fix BMC handling for all outputs exynos: - drop stale MAINTAINERS pattern - constify struct loongson: - use GEM refcount over TTM mgag200: - Improve BMC handling - Support VBLANK intterupts - transparently support BMC outputs nouveau: - Refactor and clean up internals - Use GEM refcount over TTM's gm12u320: - convert to struct drm_edid gma500: - update i2c terms lcdif: - pixel clock fix host1x: - fix syncpoint IRQ during resume - use iommu_paging_domain_alloc() imx: - ipuv3: convert to struct drm_edid omapdrm: - improve error handling - use common helper for_each_endpoint_of_node() panel: - add support for BOE TV101WUM-LL2 plus DT bindings - novatek-nt35950: improve error handling - nv3051d: improve error handling - panel-edp: add support for BOE NE140WUM-N6G; revert support for SDC ATNA45AF01 - visionox-vtdr6130: improve error handling; use devm_regulator_bulk_get_const() - boe-th101mb31ig002: Support for starry-er88577 MIPI-DSI panel plus DT; Fix porch parameter - edp: Support AOU B116XTN02.3, AUO B116XAN06.1, AOU B116XAT04.1, BOE NV140WUM-N41, BOE NV133WUM-N63, BOE NV116WHM-A4D, CMN N116BCA-EA2, CMN N116BCP-EA2, CSW MNB601LS1-4 - himax-hx8394: Support Microchip AC40T08A MIPI Display panel plus DT - ilitek-ili9806e: Support Densitron DMT028VGHMCMI-1D TFT plus DT - jd9365da: Support Melfas lmfbx101117480 MIPI-DSI panel plus DT; Refactor for code sharing - panel-edp: fix name for HKC MB116AN01 - jd9365da: fix "exit sleep" commands - jdi-fhd-r63452: simplify error handling with DSI multi-style helpers - mantix-mlaf057we51: simplify error handling with DSI multi-style helpers - simple: support Innolux G070ACE-LH3 plus DT bindings support On Tat Industrial Company KD50G21-40NT-A1 plus DT bindings - st7701: decouple DSI and DRM code add SPI support support Anbernic RG28XX plus DT bindings mediatek: - support alpha blending - remove cl in struct cmdq_pkt - ovl adaptor fix - add power domain binding for mediatek DPI controller renesas: - rz-du: add support for RZ/G2UL plus DT bindings rockchip: - Improve DP sink-capability reporting - dw_hdmi: Support 4k@60Hz - vop: Support RGB display on Rockchip RK3066; Support 4096px width sti: - convert to struct drm_edid stm: - Avoid UAF wih managed plane and CRTC helpers - Fix module owner - Fix error handling in probe - Depend on COMMON_CLK - ltdc: Fix transparency after disabling plane; Remove unused interrupt tegra: - gr3d: improve PM domain handling - convert to struct drm_edid - Call drm_atomic_helper_shutdown() vc4: - fix PM during detect - replace DRM_ERROR() with drm_error() - v3d: simplify clock retrieval v3d: - Clean up perfmon virtio: - add DRM capset ---------------------------------------------------------------- Abel Vesa (1): drm/panel-edp: add BOE NE140WUM-N6G panel entry Abhinav Kumar (1): drm/msm/dp: enable widebus on all relevant chipsets Abhishek Tamboli (2): drm/panel: ili9341: Add comments for registers in ili9341_config() drm/panel: nv3051d: Transition to mipi_dsi_dcs_write_seq_multi Ahmed, Muhammad (1): drm/amd/display: guard write a 0 post_divider value to HW Akshata Jahagirdar (8): drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/migrate: Add helper function to program identity map drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drm/xe/xe2: Introduce performance changes Al Viro (4): drm: new helper: drm_gem_prime_handle_to_dmabuf() drm/amdgpu: fix a race in kfd_mem_export_dmabuf() drm/amdkfd: CRIU fixes drm/amdgpu: get rid of bogus includes of fdtable.h Aleksandr Mishin (1): drm/msm: Fix incorrect file name output in adreno_request_fw() Alex Bee (1): drm/rockchip: vop: Allow 4096px width scaling Alex Deucher (73): drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell drm/amdgpu/gfx7: enable wave kill for compute queues drm/amdgpu/gfx8: enable wave kill for compute queues drm/amdgpu/gfx9: enable wave kill for compute queues drm/amdgpu/gfx9.4.3: implement wave kill for compute queues drm/amdgpu/gfx10: enable wave kill for compute queues drm/amdgpu/gfx11: enable wave kill for compute queues drm/amdgpu/gfx12: enable wave kill for compute queues drm/amdgpu/gfx10: properly handle error ints on all pipes drm/amdgpu/gfx11: properly handle error ints on all pipes drm/amdgpu/gfx12: properly handle error ints on all pipes drm/amdgpu/gfx9: properly handle error ints on all pipes drm/amdgpu/gfx: add bad opcode interrupt drm/amdgpu/gfx9: Enable bad opcode interrupt drm/amdgpu/gfx9.4.3: Enable bad opcode interrupt drm/amdgpu: properly handle vbios fake edid sizing drm/radeon: properly handle vbios fake edid sizing drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware() drm/amdgpu/jpeg2: properly set atomics vmid field drm/amdgpu/jpeg4: properly set atomics vmid field drm/amdgpu/mes: add API for legacy queue reset drm/amdgpu/mes11: add API for legacy queue reset drm/amdgpu/mes12: add API for legacy queue reset drm/amdgpu: add new ring reset callback drm/amdgpu: add per ring reset support (v5) drm/amdgpu/gfx9: add ring reset callback drm/amdgpu/gfx9.4.3: add ring reset callback drm/amdgpu/gfx9: per queue reset only on bare metal drm/amdgpu/gfx9: add ring reset callback for gfx drm/amdgpu/gfx9: use proper rlc safe mode helpers drm/amdgpu/gfx9.4.3: use proper rlc safe mode helpers drm/amdgpu/gfx9.4.3: use rlc safe mode for soft recovery drm/amdgpu/gfx9: use rlc safe mode for soft recovery drm/amdgpu/gfx8: add ring reset callback for gfx drm/amdgpu/gfx7: add ring reset callback for gfx drm/amdgpu/gfx11: enter safe mode before touching CP_INT_CNTL drm/amdgpu/gfx11: add a mutex for the gfx semaphore drm/amdgpu/gfx11: export gfx_v11_0_request_gfx_index_mutex() drm/amdgpu/mes: add API for user queue reset drm/amdgpu/mes11: add API for user queue reset drm/amdgpu/mes12: add API for user queue reset drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1 drm/amdgpu: handle enforce isolation on non-0 gfxhub drm/amdgpu: Emit cleaner shader at end of IB submission drm/amdgpu: fix eGPU hotplug regression drm/amd/gfx11: move the gfx mutex into the caller drm/amdgpu/gfx12: set UNORD_DISPATCH in compute MQDs drm/amdgpu: align pp_power_profile_mode with kernel docs drm/amdgpu/swsmu: fix ordering for setting workload_mask drm/amdgpu/smu13.0.7: print index for profiles drm/amdgpu/swsmu: always force a state reprogram on init drm/amdgpu: add experimental resets debug flag drm/amdgpu/gfx9: put queue resets behind a debug option drm/amdgpu/gfx11: return early in preempt_ib() drm/amdgpu/gfx12: return early in preempt_ib() drm/amdgpu: always allocate cleared VRAM for GEM allocations drm/amdgpu/gfx11: add ring reset callbacks drm/amdgpu/gfx11: rename gfx_v11_0_gfx_init_queue() drm/amdgpu/gfx10: add ring reset callbacks drm/amdgpu/gfx10: rework reset sequence drm/amdgpu/gfx12: add ring reset callbacks drm/amdgpu/gfx12: fallback to driver reset compute queue directly drm/amdgpu/gfx10: per queue reset only on bare metal drm/amdgpu/gfx11: per queue reset only on bare metal drm/amdgpu/gfx12: per queue reset only on bare metal drm/amdgpu/gfx10: use proper rlc safe mode helpers drm/amdgpu/gfx11: use proper rlc safe mode helpers drm/amdgpu/gfx12: use proper rlc safe mode helpers drm/amdgpu/gfx12: use rlc safe mode for soft recovery drm/amdgpu/gfx11: use rlc safe mode for soft recovery drm/amdgpu/gfx10: use rlc safe mode for soft recovery Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs" drm/amdgpu/atomfirmware: Silence UBSAN warning Alex Hung (21): drm/amd/display: Revert "Check HDCP returned status" drm/amd/display: Initialize denominators' default to 1 drm/amd/display: Check null-initialized variables drm/amd/display: Check phantom_stream before it is used drm/amd/display: Pass non-null to dcn20_validate_apply_pipe_split_fla= gs drm/amd/display: Check null pointers before using them drm/amd/display: Check stream before comparing them drm/amd/display: Check link_res->hpo_dp_link_enc before using it drm/amd/display: Check null pointers before used drm/amd/display: Check null pointers before multiple uses drm/amd/display: Increase array size of dummy_boolean drm/amd/display: Add MST debug message when link detection fails drm/amd/display: Check link_res->hpo_dp_link_enc before using it drm/amd/display: Fix possible overflow in integer multiplication drm/amd/display: Check null pointers before using them drm/amd/display: Check stream_status before it is used drm/amd/display: Avoid overflow assignment in link_dp_cts drm/amd/display: Check null values from functions drm/amd/display: Initialize get_bytes_per_element's default to 1 drm/amd/display: Check UnboundedRequestEnabled's value drm/amd/display: Check null pointers before using dc->clk_mgr Alexander F. Lent (1): accel/ivpu: Add missing MODULE_FIRMWARE metadata Alexander Stein (1): drm/bridge: Silence error messages upon probe deferral Alexander Usyskin (1): drm/xe/gsc: add Battlemage support Alvin Lee (9): drm/amd/display: Disable HBR audio for DP2 for certain ASICs drm/amd/display: Don't consider cursor for no plane case in DML1 drm/amd/display: When resync fifo ensure to use correct pipe ctx drm/amd/display: Disable subvp based on HW cursor requirement drm/amd/display: Calculate ODM width using odm slice rect, not recout drm/amd/display: Add option to disable unbounded req in DML21 drm/amd/display: For FAMS2 don't program P-State force from driver drm/amd/display: Don't skip clock updates in overclocking drm/amd/display: Wait for all pending cleared before full update Amber Lin (2): drm/amdkfd: APIs to stop/start KFD scheduling drm/amdkfd: Enable processes isolation on gfx9 Andi Shyti (8): drm/i915/gem: Adjust vma offset for framebuffer mmap offset drm/i915/gem: Fix Virtual Memory mapping boundaries calculation drm/i915/gem: Improve pfn calculation readability in vm_fault_gtt() drm/i915: Replace double blank with single blank after comma in gem/ and gt/ drm/i915: Replace double blank with single blank after comma drm/i915/gem: Do not look for the exact address in node drm/i915/gem: Calculate object page offset for partial memory mapping drm/i915/gt: Continue creating engine sysfs files even after a failur= e Andy Shevchenko (3): drm: fixed: Don't use "proxy" headers drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused drm/i915/fence: Mark debug_fence_free() with __maybe_unused AngeloGioacchino Del Regno (1): drm/mediatek: Declare Z Position for all planes Apoorva Singh (1): drm/xe: Remove NULL check of lrc->bo in xe_lrc_snapshot_capture() Aric Cyr (6): drm/amd/display: 3.2.292 drm/amd/display: 3.2.293 drm/amd/display: 3.2.294 drm/amd/display: 3.2.295 drm/amd/display: 3.2.298 drm/amd/display: 3.2.299 Arnaud Vrac (1): drm/msm: add msm8998 hdmi phy/pll support Arnd Bergmann (3): drm/stm: add COMMON_CLK dependency drm/amd: Use a constant format string for amdgpu_ucode_request drm/xe: fix build warning with CONFIG_PM=3Dn Arunpravin Paneer Selvam (3): drm/buddy: Add start address support to trim function drm/amdgpu: Add address alignment support to DCC buffers drm/amdgpu: Add DCC GFX12 flag to enable address alignment Ashutosh Dixit (3): drm/xe/uapi: Rename xe perf layer as xe observation layer drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup drm/xe/observation: Drop empty sysctl table entry Aurabindo Pillai (8): drm/amd/display: free bo used for dmub bounding box drm/amd/display: rename dcn3/dcn4 to more sound terms drm/amd/display: rename dcn401_soc to dcn4_variant_a_soc drm/amd/display: remove unused folder drm/amd/display: fix a UBSAN warning in DML2.1 drm/amd/display: Add more logging for MALL static screen drm/amd/display: remove an extraneous call for checking dchub clock drm/amd/display: do not set traslate_by_source for DCN401 cursor Austin Zheng (4): drm/amd/display: Check if Mode is Supported Before Returning Result drm/amd/display: Disable SubVP if Hardware Rotation is Used drm/amd/display: Unlock Pipes Based On DET Allocation drm/amd/display: DML2.1 Reintegration for Various Fixes Balasubramani Vivekanandan (1): drm/xe/bmg: Drop force_probe requirement Bas Nieuwenhuizen (1): drm/amdgpu: Actually check flags for all context ops. Ben Skeggs (37): drm/nouveau: move nouveau_drm_device_fini() above init() drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common c= ode drm/nouveau: replace drm_device* with nouveau_drm* as dev drvdata drm/nouveau: create pci device once drm/nouveau: store nvkm_device pointer in nouveau_drm drm/nouveau: move allocation of root client out of nouveau_cli_init() drm/nouveau: add nouveau_cli to nouveau_abi16 drm/nouveau: handle limited nvif ioctl in abi16 drm/nouveau: remove abi16->device drm/nouveau: remove abi16->handles drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args drm/nouveau/nvkm: remove perfmon drm/nouveau/nvkm: remove nvkm_client_search() drm/nouveau/nvif: remove support for userspace backends drm/nouveau/nvif: remove route/token drm/nouveau/nvif: remove nvxx_object() drm/nouveau/nvif: remove nvxx_client() drm/nouveau/nvif: remove driver keep/fini drm/nouveau/nvif: remove client device arg drm/nouveau/nvif: remove client version drm/nouveau/nvif: remove client devlist drm/nouveau/nvif: remove client fini drm/nouveau/nvif: remove device args drm/nouveau: always map device drm/nouveau/nvif: remove device rd/wr drm/nouveau/nvif: remove disp chan rd/wr drm/nouveau: move nvxx_* definitions to nouveau_drv.h drm/nouveau: add nvif_mmu to nouveau_drm drm/nouveau: pass drm to nouveau_mem_new(), instead of cli drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp drm/nouveau: pass cli to nouveau_channel_new() instead of drm+device drm/nouveau: remove nouveau_chan.device drm/nouveau: remove chan->drm drm/nouveau: remove master drm/nouveau: remove push pointer from nouveau_channel drm/nouveau/kms: remove a few unused struct members and fn decls drm/nouveau/kms: remove push pointer from nv50_dmac Bhuvanachandra Pinninti (1): drm/amd/display: Refactor for dio Biju Das (2): dt-bindings: display: renesas,rzg2l-du: Document RZ/G2UL DU bindings drm: renesas: rz-du: Add RZ/G2UL DU Support Bommu Krishnaiah (1): drm/xe/xe2lpg: Extend workaround 14021402888 Candice Li (2): drm/amdgpu: Validate TA binary size drm/amd/pm: Drop unsupported features on smu v14_0_2 Chaitanya Dhere (1): drm/amd/display: DML2.1 resynchronization Charlene Liu (3): drm/amd/display: restore immediate_disable_crtc for w/a drm/amd/display: sync dmub output event type. drm/amd/display: remove redundant msg to pmfw at boot/resume Chris Park (3): drm/amd/display: Deallocate DML memory if allocation fails drm/amd/display: Add two dmmuy I2C entry for GPIO port mapping issue drm/amd/display: Address coverity change Chris Wilson (1): drm/i915/gt: Mark the GT as dead when mmio is unreliable Christian K=C3=B6nig (6): drm/scheduler: remove full_recover from drm_sched_start drm/amdgpu: fix contiguous handling for IB parsing v2 drm/loongson: use GEM references instead of TTMs drm/radeon: use GEM references instead of TTMs drm/amdgpu: re-work VM syncing drm/amdgpu: revert "use CPU for page table update if SDMA is unavaila= ble" Christoph Fritz (1): drm/bridge: synopsys: dw-mipi-dsi: enable EoTp by default Christophe JAILLET (3): drm/stm: Fix an error handling path in stm_drm_platform_probe() drm/rockchip: Constify struct drm_encoder_helper_funcs drm/exynos: Constify struct exynos_drm_ipp_funcs Chun-Kuang Hu (2): drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize() drm/mediatek: Use cmdq_pkt_create() and cmdq_pkt_destroy() ChunTao Tso (1): drm/amd/display: Retry Replay residency Claudiu Beznea (1): drm/stm: ltdc: check memory returned by devm_kzalloc() Clayton Craft (1): drm/panel-edp: Add entry for BOE NV133WUM-N63 panel Colin Ian King (4): drm/i915/dp: Make read-only array bw_gbps static const drm/amd/display: Fix spelling mistake "tolarance" -> "tolerance" drm/amd/display: remove extraneous ; after statements drm/amd/display: Fix spelling mistake "recompte" -> "recompute" Cong Yang (6): dt-bindings: display: panel: Add compatible for melfas lmfbx101117480 drm/panel: jd9365da: Support for Melfas lmfbx101117480 MIPI-DSI panel drm/panel: jd9365da: Break some CMDS into helper functions drm/panel: boe-tv101wum-nl6: Break some CMDS into helper functions drm/panel: nt35521: Break some CMDS into helper functions drm/panel: nt36672e: Break some CMDS into helper functions Connor Abbott (7): drm/msm: Use a7xx family directly in gpu_state drm/msm: Dump correct dbgahb clusters on a750 drm/msm: Fix CP_BV_DRAW_STATE_ADDR name drm/msm: Update a6xx register XML drm/msm: Expand UBWC config setting drm/msm: Expose expanded UBWC config uapi drm/msm: Fix UBWC macrotile_mode for a680 Cristian Ciocaltea (7): drm/bridge-connector: Fix double free in error handling paths drm/rockchip: Explicitly include bits header drm/rockchip: dw_hdmi: Use modern drm_device based logging drm/rockchip: dw_hdmi: Simplify clock handling drm/rockchip: dw_hdmi: Use devm_regulator_get_enable() drm/rockchip: dw_hdmi: Drop superfluous assignments of mpll_cfg, cur_ctr and phy_config drm/bridge: dw-hdmi: Simplify clock handling Cruise (2): drm/amd/display: Add logs for debugging outbox drm/amd/display: Get link index for AUX reply notification Dafna Hirschfeld (1): drm/xe: fix missing 'xe_vm_put' Dan Carpenter (2): drm/ast: astdp: fix loop timeout check drm/amdgpu/mes11: Indent an if statment Dang Huynh (1): drm: panel: boe-bf060y8m-aj0: Enable prepare_prev_first Daniel Sa (4): drm/amd/display: Set Cursor Matrix to bypass instead of Input Plane drm/amd/display: Underflow Seen on DCN401 eGPU drm/amd/display: Resolve Coverity Issues drm/amd/display: only trigger BIOS related assert for older ASICs Daniel Yang (1): drm/connector: kerneldoc: Fix two missing newlines in drm_connector.c Daniele Ceraolo Spurio (14): drm/xe/huc: Define HuC binary for LNL drm/xe/gsc: Define GSC binary for LNL drm/xe/huc: Define HuC binary for BMG drm/xe: fix WA 14018094691 drm/xe: Make exec_queue_kill safe to call twice drm/xe: use devm instead of drmm for managed bo drm/xe/uc: Use managed bo for HuC and GSC objects drm/xe/uc: Use devm to register cleanup that includes exec_queues drm/i915: Do not attempt to load the GSC multiple times drm/xe/gsc: Do not attempt to load the GSC multiple times drm/xe/gsc: Fix FW status if the firmware is already loaded drm/xe/gsc: Track the platform in the compatibility version drm/xe/gsc: Add debugfs to print GSC info drm/xe/gsc: Wedge the device if the GSCCS reset fails Danilo Krummrich (3): drm/nouveau: prime: fix refcount underflow drm/nouveau: bo: remove unused functions drm/nouveau: use GEM references instead of TTMs Dave Airlie (16): Merge tag 'drm-xe-next-2024-07-30' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Merge tag 'drm-intel-next-2024-08-13' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge tag 'drm-misc-next-2024-08-29' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-xe-next-2024-08-28' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Merge tag 'drm-intel-next-2024-08-29' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge tag 'drm-intel-next-2024-09-03' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge tag 'mediatek-drm-next-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Merge tag 'drm-msm-next-2024-09-02' of https://gitlab.freedesktop.org/drm/msm into drm-next Merge tag 'drm-xe-next-2024-09-05' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Merge tag 'drm-intel-gt-next-2024-09-06' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge tag 'amd-drm-next-6.12-2024-09-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-next Merge tag 'exynos-drm-next-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Merge tag 'drm-misc-next-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-intel-next-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge tag 'amd-drm-next-6.12-2024-09-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-next Merge tag 'drm-xe-next-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next David (Ming Qiang) Wu (4): drm/amd/amdgpu: command submission parser for JPEG drm/amd/amdgpu: cleanup parse_cs callbacks drm/amd/amdgpu: apply command submission parser for JPEG v2+ drm/amd/amdgpu: apply command submission parser for JPEG v1 David Belanger (2): drm/amdgpu: Fix atomics on GFX12 drm/amdkfd: Add cache line size info David Gow (2): drm/i915: Allow evicting to use the requested placement drm/i915: Attempt to get pages without eviction first Deborah Brouwer (1): drm/ci: update link to Gitlab server Dennis Chan (1): drm/amd/display: Add Replay Low Refresh Rate parameters in dc type. Dillon Varone (14): drm/amd/display: Add blanked streams override to DML2.1 drm/amd/display: Add P-State Keepout to dcn401 Global Sync drm/amd/display: Export additional FAMS2 global configuration options from DML drm/amd/display: Remove hardmax usage for dcn401 drm/amd/display: Various DML2 fixes for FAMS2 drm/amd/display: Force enable 3DLUT DMA check for dcn401 in DML drm/amd/display: Add DML2.1 option to disable DRR clamped P-State Strategies drm/amd/display: Reduce redundant minimal transitions due to SubVP drm/amd/display: Disable DCN401 UCLK P-State support on full updates drm/amd/display: Perform outstanding programming on full updates drm/amd/display: Set max VTotal cap for dcn401 drm/amd/display: Fix MS/MP mismatches in dml21 for dcn401 Revert "drm/amd/display: Wait for all pending cleared before full upd= ate" drm/amd/display: Block timing sync for different signals in PMO Dmitry Baryshkov (8): drm/bridge: lt9611uxc: properly attach to a next bridge drm/bridge: lt9611uxc: drop support for !DRM_BRIDGE_ATTACH_NO_CONNECT= OR drm/msm/dpu: Configure DP INTF/PHY selector drm/msm/dsi: correct programming sequence for SM8350 / SM8450 drm/msm/dpu: enable writeback on SM8150 drm/msm/dpu: enable writeback on SC8108X drm/msm/dpu: enable writeback on SM6125 drm/msm/dpu: enable writeback on SM6350 Dmitry Osipenko (1): drm/virtio: Add DRM capset definition Dnyaneshwar Bhadane (3): drm/i915/display: correct dual pps handling for MTL_PCH+ drm/i915/gt: Whitelist COMMON_SLICE_CHICKEN1 for UMD access. drm/i915/bios: Update new entries in VBT BDB block definitions Dominik Grzegorzek (2): drm/xe: Move and export xe_hw_engine lookup. drm/xe: Export xe_hw_engine's mmio accessors Douglas Anderson (2): drm/tegra: Call drm_atomic_helper_shutdown() at shutdown time drm/panel: Avoid warnings w/ panel-simple/panel-edp at shutdown Dr. David Alan Gilbert (1): drm/bridge: analogix: remove unused struct 'bridge_init' Dragan Simic (1): drm/rockchip: cdn-dp: Clean up a few logged messages Duncan Ma (1): drm/amd/display: Add visual confirm for Idle State Easwar Hariharan (2): drm/i915: Make I2C terminology more inclusive drm/gma500: Make I2C terminology more inclusive Esben Haabendal (1): drm/bridge: nwl-dsi: Use vsync/hsync polarity from display mode Eugene Lepshy (1): drm/msm/a6xx: Add A642L speedbin (0x81) Fangzhi Zuo (6): drm/amd/display: Print Pcon FRL Link BW in Debug Message drm/amd/display: Skip Recompute DSC Params if no Stream on Link drm/amd/display: Fix MST BW calculation Regression drm/amd/display: Fix Synaptics Cascaded Panamera DSC Determination drm/amd/display: Add DSC Debug Log drm/amdgpu/display: Fix a mistake in revert commit Fei Shao (1): drm/mediatek: Use spin_lock_irqsave() for CRTC event lock Francois Dugast (11): drm/xe/hw_engine_group: Introduce xe_hw_engine_group drm/xe/guc_submit: Make suspend_wait interruptible 'drm/xe/hw_engine_group: Register hw engine group's exec queues drm/xe/hw_engine_group: Add helper to suspend faulting LR jobs drm/xe/exec_queue: Remove duplicated code drm/xe/exec_queue: Prepare last fence for hw engine group resume cont= ext drm/xe/hw_engine_group: Add helper to wait for dma fence jobs drm/xe/hw_engine_group: Ensure safe transition between execution mode= s drm/xe/exec: Switch hw engine group execution mode upon job submissio= n drm/xe/vm: Remove restriction that all VMs must be faulting if one is drm/xe/device: Remove unused xe_device::usm::num_vm_in_* Frank Min (2): drm/amdgpu: change non-dcc buffer copy configuration drm/amdgpu: correct sdma7 max dw Fudong Wang (1): drm/amd/display: skip crtc power down when ips switch Fudongwang (1): drm/amd/display: add dmcub support check Gabe Teeger (4): drm/amd/display: Fix DP-DVI dongle hotplug drm/amd/display: Fix Potential Null Dereference drm/amd/display: Revert Avoid overflow assignment drm/amd/display: fix graphics hang in multi-display mst case Geert Uytterhoeven (2): drm/xe/oa/uapi: Make bit masks unsigned drm/radeon/r100: Handle unknown family in r100_cp_init_microcode() Gustavo Sousa (3): drm/i915: Skip programming FIA link enable bits for MTL+ drm/xe: Remove stale declaration of xe_mmio_probe_vram() drm/xe/mmio: Use single logic for waiting functions Haikun Zhou (1): drm/panel-edp: Add CSW MNB601LS1-4 Hamza Mahfooz (8): MAINTAINERS: add an entry for AMD DC DML drm/vblank: add dynamic per-crtc vblank configuration support Revert "drm: Introduce 'power saving policy' drm property" Revert "drm/amd: Add power_saving_policy drm property to eDP connecto= rs" drm/amd/display: fix s2idle entry for DCN3.5+ drm/amd/display: use new vblank enable policy for DCN35+ drm/amd/display: use a more lax vblank enable policy for DCN35+ drm/amd/display: use a more lax vblank enable policy for older ASICs Hans de Goede (1): drm/i915/dsi: Make Lenovo Yoga Tab 3 X90F DMI match less strict Hansen Dsouza (11): drm/amd/display: Add private data type for RCG drm/amd/display: Add RCG helper functions drm/amd/display: Add source select helper functions drm/amd/display: Add new enable and disable functions drm/amd/display: Add new enable and disable functions for DCN35 drm/amd/display: Add stream and char control callback drm/amd/display: Add clock control callbacks drm/amd/display: Add clock control callbacks drm/amd/display: Update to using new dccg callbacks Revert "drm/amd/display: Update to using new dccg callbacks" drm/amd/display: Fix flickering caused by dccg Hawking Zhang (5): drm/amdgpu: Add more types for boot time error reporting drm/amdkfd: Check int source id for utcl2 poison event drm/amdkfd: Drop poison hanlding from gfx v10 drm/amdgpu: Retire query_utcl2_poison_status callback drm/amdkfd: Select reset method for poison handling Himal Prasad Ghimiray (6): drm/xe: Delete unused register from xe_regs.h drm/xe: Remove unused xe parameter drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup drm/xe: Remove unrequired NULL check in xe_sched_job_free_fences drm/xe: Fix NPD in ggtt_node_remove() Hironori KIKUCHI (5): drm/panel: st7701: Rename macros drm/panel: st7701: Decouple DSI and DRM parts dt-bindings: display: st7701: Add Anbernic RG28XX panel drm/panel: st7701: Add support for SPI for configuration drm/panel: st7701: Add Anbernic RG28XX panel support Hongbo Li (1): drm/i915: Remove extra unlikely helper Hsiao Chien Sung (5): drm/mediatek: Support "None" blending in OVL drm/mediatek: Support "None" blending in Mixer drm/mediatek: Support "Pre-multiplied" blending in OVL drm/mediatek: Support "Pre-multiplied" blending in Mixer drm/mediatek: Support alpha blending in display driver Hsin-Yi Wang (1): drm/panel-edp: Add BOE NV140WUM-N41 Ilia Levi (1): drm/xe: move the kernel lrc from hwe to execlist port Ilya Bakoulin (3): drm/amd/display: Add helper function to check for non-address fast up= dates drm/amd/display: Use correct cm_helper function drm/amd/display: Fix construct_phy with MXM connector Imre Deak (32): drm/dp: Add helper to dump an LTTPR PHY descriptor drm/i915/dp: Reset intel_dp->link_trained before retraining the link drm/i915/dp: Don't switch the LTTPR mode on an active link drm/i915/dp: Reset cached LTTPR count if number of LTTPRs is unsuppor= ted drm/i915/dp: Keep cached LTTPR mode up-to-date drm/i915/dp: Retrain SST links via a modeset commit drm/i915/dp: Require a valid atomic state for SST link training drm/i915/dp: Don't WARN on failed link-retrain modeset drm/dp_mst: Factor out function to queue a topology probe work drm/dp_mst: Add a helper to queue a topology probe drm/dp_mst: Simplify the condition when to enumerate path resources drm/i915/ddi: For an active output call the DP encoder sync_state() only for DP drm/i915/dp: Initialize the link parameters during HW readout drm/i915/dp: Send only a single modeset-retry uevent for a commit drm/i915/dp: Add a separate function to reduce the link parameters drm/i915/dp: Add helpers to set link training mode, BW parameters drm/i915/dp_mst: Reduce the link parameters in BW order after LT fail= ures drm/i915/dp_mst: Configure MST after the link parameters are reset drm/i915/dp_mst: Queue modeset-retry after a failed payload BW alloca= tion drm/i915/dp_mst: Reprobe the MST topology after a link parameter chan= ge drm/i915/dp_mst: Ensure link parameters are up-to-date for a disabled= link drm/i915/dp_mst: Enable LT fallback between UHBR/non-UHBR link rates drm/i915: Replace to_bpp_x16() with fxp_q4_from_int() drm/i915: Replace to_bpp_int() with fxp_q4_to_int() drm/i915: Replace to_bpp_int_roundup() with fxp_q4_to_int_roundup() drm/i915: Replace to_bpp_frac() with fxp_q4_to_frac() drm/i915: Replace BPP_X16_FMT()/ARGS() with FXP_Q4_FMT()/ARGS() drm/i915: Dump DSC state to dmesg and debugfs/i915_display_info drm/i915: Remove DSC register dump drm/xe: Suspend/resume user access only during system s/r drm/xe: Handle polling only for system s/r in xe_display_pm_suspend/resume() drm/i915/dp_mst: Fix MST state after a sink reset Jack Xiao (10): drm/amdgpu/mes: fix mes ring buffer overflow drm/amdgpu/mes12: update mes_v12_api_def.h drm/amdgpu/mes: add multiple mes ring instances support drm/amdgpu/mes12: load unified mes fw on pipe0 and pipe1 drm/amdgpu/mes12: add mes pipe switch support drm/amdgpu/mes12: adjust mes12 sw/hw init for multiple pipes drm/amdgpu/mes12: configure two pipes hardware resources drm/amdgpu/mes12: sw/hw fini for unified mes drm/amdgpu/mes12: fix suspend issue drm/amdgpu/mes: add mes mapping legacy queue switch Jane Jian (1): drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF Jani Nikula (82): drm/nouveau: remove unused variable ret drm/i915/bios: remove stale and useless comments drm/i915: remove unused HAS_BROKEN_CS_TLB() Merge drm/drm-next into drm-intel-next drm/i915: remove a few __i915_printk() uses drm/i915: remove i915_report_error() drm/i915: remove __i915_printk() drm/i915/acpi: convert to struct intel_display drm/i915/opregion: unify intel_encoder/intel_connector naming drm/i915/opregion: convert to struct intel_display drm/i915/bios: convert to struct intel_display drm/i915: use pdev_to_i915() instead of pci_get_drvdata() directly drm/xe/tests: remove unused leftover xe_call_for_each_device() drm/xe: use pdev_to_xe_device() instead of pci_get_drvdata() directly drm/xe: add kdev_to_xe_device() helper and use it drm/edid: reduce DisplayID log spamming drm/rockchip: cdn-dp: get rid of drm_edid_raw() drm/i915/gvt: stop using drm_edid_block_valid() drm/edid: make drm_edid_block_valid() static drm/i915: make __intel_display_power_is_enabled() static drm/i915/display: support struct intel_atomic_state in to_intel_displ= ay() drm/i915/display: convert intel_link_bw.c to struct intel_display drm/i915/display: convert intel_load_detect.c to struct intel_display drm/i915/alpm: convert to struct intel_display drm/i915/lspcon: convert to struct intel_display drm/i915/display: convert dp aux backlight to struct intel_display drm/i915/hti: convert to struct intel_display drm/i915: make intel_display_power_domain_str() static string: add mem_is_zero() helper to check if memory area is all zeros drm: use mem_is_zero() instead of !memchr_inv(s, 0, n) drm/i915: move rawclk from runtime to display runtime info drm/xe/display: drop unused rawclk_freq and RUNTIME_INFO() drm/xe/display: fix compat IS_DISPLAY_STEP() range end drm/xe/display: remove intel_display_step_name() to simplify drm/xe/display: remove the unused compat HAS_GMD_ID() drm/xe/step: define more steppings E-J drm/i915/display: rename IS_DISPLAY_IP_RANGE() to IS_DISPLAY_VER_FULL= () drm/i915/display: rename IS_DISPLAY_IP_STEP() to IS_DISPLAY_VER_STEP(= ) drm/i915/display: identify display steppings in display probe drm/i915/display: switch to display detected steppings drm/i915: remove display stepping handling drm/xe: remove display stepping handling drm/i915/vblank: use drm_crtc_vblank_crtc() instead of open-coding drm/i915/vblank: fix context imbalance warnings drm/i915/vblank: convert to struct intel_display drm/i915/vrr: convert to struct intel_display drm/i915/tv: convert to struct intel_display drm/i915/sprite: convert to struct intel_display drm/i915/display: convert params to struct intel_display drm/i915: remove unnecessary display includes drm/i915: remove unused leftover basedie step code drm/ttm: fix kernel-doc typo for @trylock_only drm/xe: replace #include with drm/mst: switch to guid_t type for GUID drm/mst: switch to guid_gen() to generate valid GUIDs drm/amd/display: switch to guid_gen() to generate valid GUIDs drm/sti/sti_hdmi: convert to struct drm_edid drm/tegra: convert to struct drm_edid drm/ipuv3/parallel: convert to struct drm_edid drm/tiny/gm12u320: convert to struct drm_edid drm/i915: fail module probe on nomodeset and i915.modeset=3D0 drm/i915: deprecate the i915.modeset module parameter drm/i915 & drm/xe: save struct drm_device to drvdata drm/i915: support struct device and pci_dev in to_intel_display() drm/i915/audio: migrate away from kdev_to_i915() drm/i915/hdcp: migrate away from kdev_to_i915() in bind/unbind drm/i915/hdcp: migrate away from kdev_to_i915() in GSC messaging drm/xe/display: remove unused compat kdev_to_i915() and pdev_to_i915(= ) drm/xe/display: use xe && 0 to avoid warnings about unused variables drm/i915/hdmi: convert to struct intel_display drm/i915/dp: convert g4x_dp.[ch] to struct intel_display drm/i915/dp: convert intel_dp_tunnel.[ch] to struct intel_display drm/i915/dp: convert intel_dp_aux.[ch] to struct intel_display drm/i915/dp: convert intel_dp_link_training.[ch] to struct intel_disp= lay drm/i915/pps: pass intel_dp to pps_name() drm/i915/pps: convert intel_pps.[ch] to struct intel_display drm/i915/psr: convert intel_psr.[ch] to struct intel_display drm/i915/ddi: stop using dp_to_i915() drm/i915/dp: hide dp_to_i915() inside intel_dp.c drm/tegra: fix potential uninitialized variable use drm/amdgpu: drop redundant W=3D1 warnings from Makefile drm/i915/bios: fix printk format width Jason-JH.Lin (1): drm/mediatek: Fix missing configuration flags in mtk_crtc_ddp_config(= ) Javier Carrasco (3): drm/mediatek: ovl_adaptor: Drop unused mtk_crtc.h header drm/mediatek: ovl_adaptor: Add missing of_node_put() drm/mediatek: ovl_adaptor: Use scoped variant of for_each_child_of_no= de() Jeffrey Hugo (1): MAINTAINERS: qaic: Drop Pranjal as reviewer Jesse Zhang (5): drm/amdgpu/gfx11: Enable bad opcode interrupt drm/amdgpu/gfx10: Enable bad opcode interrupt drm/amdgpu/gfx12: Enable bad opcode interrupt drm/amdgpu: fix queue reset issue by mmio drm/amdkfd: Fix resource leak in criu restore queue Jesus Narvaez (1): drm/i915/guc: Change GEM_WARN_ON to guc_err to prevent taints in CI Jiadong Zhu (13): drm/amdgpu/gfx9: remap queue after reset successfully drm/amdgpu/gfx9: wait for reset done before remap drm/amdgpu/gfx9.4.3: remap queue after reset successfully drm/amdgpu/gfx_9.4.3: wait for reset done before remap drm/amdgpu/gfx: add a new kiq_pm4_funcs callback for reset_hw_queue drm/amdgpu/gfx9: implement reset_hw_queue for gfx9 drm/amdgpu/gfx9.4.3: implement reset_hw_queue for gfx9.4.3 drm/amdgpu/gfx11: wait for reset done before remap drm/amdgpu/gfx10: remap queue after reset successfully drm/amdgpu/gfx10: wait for reset done before remap drm/amdgpu/mes: modify mes api for mmio queue reset drm/amdgpu/mes: implement amdgpu_mes_reset_hw_queue_mmio drm/amdgpu/mes11: implement mmio queue reset for gfx11 Jiapeng Chong (4): drm/stm: Remove unnecessary .owner for lvds_platform_driver drm/stm: ltdc: Remove unused function plane_to_ltdc drm/amd/display: use swap() in sort() drm/amd/display: remove unneeded semicolon Jingwen Zhu (1): drm/amd/display: avoid disable otg when dig was disabled Jinjie Ruan (4): drm/amd/display: Make core_dcn4_g6_temp_read_blackout_table static drm/amd/display: Make core_dcn4_ip_caps_base static drm/amd/display: Make dcn35_hubp_funcs static drm/amd/display: Make dcn401_dsc_funcs static Jocelyn Falempe (17): printk: Add a short description string to kmsg_dump() drm/panic: Add drm_panic_is_enabled() fbcon: Add an option to disable fbcon in panic drm/fb-helper: Set skip_panic if the drm driver supports drm panic drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE drm/panic: Add missing static inline to drm_panic_is_enabled() fbcon: Use oops_in_progress instead of panic_cpu mtd: mtdoops: Fix kmsgdump parameter renaming. drm/panic: Remove space before "!" in panic message drm/panic: Remove useless export symbols drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h drm/panic: Move copyright notice to the top drm/panic: Add panic description drm/panic: Add integer scaling to blit() drm/rect: Add drm_rect_overlap() drm/panic: Simplify logo handling drm/panic: Add a QR code panic screen John Harrison (4): drm/i915/arl: Enable Wa_14019159160 for ARL drm/i915/guc: Extend w/a 14019159160 drm/i915: ARL requires a newer GSC firmware drm/i915/guc: Fix missing enable of Wa_14019159160 on ARL Jonas Karlman (3): drm/rockchip: dw_hdmi: Fix reading EDID when using a forced mode drm/rockchip: dw_hdmi: Allow High TMDS Bit Rates drm/rockchip: dw_hdmi: Add max_tmds_clock validation Jonathan Cavitt (1): drm/i915: Allow NULL memory region Jonathan Kim (6): drm/amdkfd: allow users to target recommended SDMA engines drm/amdkfd: support per-queue reset on gfx9 drm/amdkfd: fix debug watchpoints for logical devices drm/amdkfd: fix partition query when setting up recommended sdma engi= nes drm/amdkfd: fallback to pipe reset on queue reset fail for gfx9 drm/amdkfd: fix missed queue reset on queue destroy Joshua Aberback (3): drm/amd/display: Remove unnecessary DSC power gating for DCN401 drm/amd/display: Remove duplicate HWSS interfaces drm/amd/display: Assume 32 bpp cursor in DML21 Joshua Ashton (1): drm/amdgpu: Forward soft recovery errors to userspace Jos=C3=A9 Exp=C3=B3sito (2): drm/connector: Document destroy hook in drmm init functions drm/vkms: Fix cpu_to_le16()/le16_to_cpu() warnings Jos=C3=A9 Roberto de Souza (1): drm/xe: Add process name and PID to job timedout message Jouni H=C3=B6gander (3): drm/i915/psr: Prevent Panel Replay if CRC calculation is enabled drm/i915/display: Add mechanism to use sink model when applying quirk drm/i915/display: Increase Fast Wake Sync length as a quirk Juha-Pekka Heikkila (4): drm/i915/display: Don't enable decompression on Xe2 with Tile4 drm/fourcc: define Intel Xe2 related tile4 ccs modifiers drm/i915/display: allow creation of Xe2 ccs framebuffers drm/i915/display: Fix BMG CCS modifiers Julia Filipchuk (3): drm/xe/guc: Bump minimum required GuC version to v70.29.2 drm/xe/guc: Define GuC version v70.29.2 for BMG drm/xe/guc: Enable w/a 14022293748 and 22019794406 Karthik Poosa (2): drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 Katya Orlova (1): drm/stm: Avoid use-after-free issues with crtc and plane Kenneth Feng (7): drm/amdgpu/pm: support gpu_metrics sysfs interface for smu v14.0.2/3 drm/amd/pm: update powerplay structure on smu v14.0.2/3 drm/amd/pm: add overdrive support on smu v14.0.2/3 drm/amd/amdgpu: add HDP_SD support on gc 12.0.0/1 drm/amd/pm: update message interface for smu v14.0.2/3 drm/amd/pm: update the features set on smu v14.0.2/3 drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3 Konrad Dybcio (7): drm/msm/adreno: Assign msm_gpu->pdev earlier to avoid nullptrs drm/msm/a6xx: Evaluate adreno_is_a650_family in pdc_in_aop check drm/msm/a6xx: Store primFifoThreshold in struct a6xx_info drm/msm/a6xx: Store correct gmu_cgc_mode in struct a6xx_info drm/msm/a6xx: Use the per-GPU value for gmu_cgc_mode drm/msm/a6xx: Set GMU CGC properties on a6xx too drm/msm/a6xx: Add A621 support Krzysztof Kozlowski (7): drm/sti: dvo: drop driver owner assignment drm/sti: hda: drop driver owner assignment drm/sti: tvout: drop driver owner assignment drm/sti: vtg: drop driver owner assignment drm/sti: hdmi: drop driver owner assignment drm/sti: hqvdp: drop driver owner assignment dt-bindings: MAINTAINERS: drop stale exynos file pattern Krzysztof Niemiec (1): drm/i915/gt: Empty uabi engines list during intel_engines_release() Kuninori Morimoto (1): gpu: drm: use for_each_endpoint_of_node() Kwanghoon Son (1): drm/exynos: Remove unnecessary code Lad Prabhakar (1): drm: renesas: Move RZ/G2L MIPI DSI driver to rz-du Lang Yu (1): drm/amdgpu: fix invalid fence handling in amdgpu_vm_tlb_flush Laurent Pinchart (1): drm/msm: Remove prototypes for non-existing functions Leo Li (7): drm/amd/display: Let drm_crtc_vblank_on/off manage interrupts drm/amd/display: Run idle optimizations at end of vblank handler drm/amd: Introduce additional IPS debug flags drm/amd/display: Determine IPS mode by ASIC and PMFW versions drm/amd/display: Lock DC and exit IPS when changing backlight drm/amd/display: Do not reset planes based on crtc zpos_changed drm/amd/display: Add all planes on CRTC to state for overlay cursor Li Zetao (3): drm/msm/adreno: Use kvmemdup to simplify the code drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div() drm/amdgpu: use clamp() in amdgpu_vm_adjust_size() Lijo Lazar (6): drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3 drm/amdgpu: Add empty HDP flush function to VCN v4.0.3 drm/amdkfd: Add node_id to location_id generically drm/amdgpu: Reorder to read EFI exported ROM first drm/amd/pm: Add support for new P2S table revision drm/amdgpu: Normalize reg offsets on JPEG v4.0.3 Likun Gao (3): drm/amdgpu: force to use legacy inv in mmhub drm/amdgpu: add golden setting for gc v12 drm/amdgpu: support for gc_info table v1.3 Liu Ying (3): drm/bridge: lontium-lt8912b: Validate mode in drm_bridge_funcs::mode_valid() dt-bindings: display: panel-simple: Add On Tat Industrial Company KD50G21-40NT-A1 drm/panel: simple: Add ON Tat Industrial Company KD50G21-40NT-A1 pane= l Loan Chen (1): drm/amd/display: Enable otg synchronization logic for DCN321 Louis Chauvet (1): drm/vkms: Formatting and typo fix Lu Baolu (1): gpu: host1x: Use iommu_paging_domain_alloc() Luca Coelho (1): drm/i915/gt: remove stray declaration of intel_gt_release_all() Lucas De Marchi (20): drm/xe/gt: Remove double include drm/xe: Generate oob before compiling anything drm/xe/uapi: Expose SIMD16 EU mask in topology query drm/xe: Fix warning on unreachable statement drm/xe: Refactor mmio setup for multi-tile drm/xe: Add assert for XE_WA() usage drm/xe/rtp: Fix off-by-one when processing rules drm/xe: Fix opregion leak drm/xe/kunit: Test WAs for BMG drm/xe/kunit: Rename count to count_sr_entries drm/xe/kunit: Test active rtp entries drm/xe/kunit: Rename rtp test cases drm/xe/kunit: Test rtp with no actions drm/xe/rtp: Simplify marking active workarounds drm/xe/rtp: Expand max rules/actions per entry again drm/xe: Migrate OOB WAs to OR rules drm/xe: Allow to compile out debugfs drm/xe: Rename enable_display module param Merge drm/drm-next into drm-xe-next drm/xe/lnl: Drop force_probe requirement Lyude Paul (1): drm/vkms: Remove event from vkms_output Ma Ke (5): drm/radeon: fix null pointer dereference in radeon_add_common_modes drm/amdgpu: fix a possible null pointer dereference drm/amd/amdgpu: Fix uninitialized variable warnings drm/amd/display: avoid using null object of framebuffer drm: omapdrm: Add missing check for alloc_ordered_workqueue Maarten Lankhorst (6): drm/xe/display: Match i915 driver suspend/resume sequences better drm/xe/display: Make display suspend/resume work on discrete drm/i915/display: Plane capability for 64k phys alignment drm/xe: Align all VRAM scanout buffers to 64k physical pages when nee= ded. drm/xe: Fix merge fails related to display runtime PM drm/xe: Fix missing conversion to xe_display_pm_runtime_resume Manikandan Muralidharan (3): dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel Marc Gonzalez (3): dt-bindings: phy: add qcom,hdmi-phy-8998 dt-bindings: display/msm: hdmi: add qcom,hdmi-tx-8998 drm/msm/hdmi: add "qcom,hdmi-tx-8998" compatible Marco Pagani (1): drm/test: use kunit action wrapper macro in the gem shmem test suite Marek Vasut (5): drm: lcdif: Use adjusted_mode .clock instead of .crtc_clock dt-bindings: display: bridge: tc358867: Document default DP preemphas= is drm/bridge: tc358767: Add configurable default preemphasis dt-bindings: display: panel: Document Densitron DMT028VGHMCMI-1D TFT on ILI9806E DSI TCON drm/panel/panel-ilitek-ili9806e: Add Densitron DMT028VGHMCMI-1D TFT to ILI9806E DSI TCON driver Mario Limonciello (2): drm: Introduce 'power saving policy' drm property drm/amd: Add power_saving_policy drm property to eDP connectors Markus Elfring (1): drm/dp_mst: Simplify character output in drm_dp_mst_dump_topology() Martin Leung (2): drm/amd/display: Promote DAL to 3.2.296 drm/amd/display: Promote DC to 3.2.297 Matt Roper (7): drm/xe/migrate: Future-proof compressed PAT check drm/xe: Name and document Wa_14019789679 drm/xe: Add debugfs to dump GuC's hwconfig drm/xe/mcr: Try to derive dss_per_grp from hwconfig attributes drm/xe/display: Drop unnecessary xe_gt.h includes drm/xe/pcode: Treat pcode as per-tile rather than per-GT drm/xe/hwmon: Treat hwmon as a per-device concept Matthew Auld (6): drm/xe/bmg: implement Wa_16023588340 drm/i915: disable fbc due to Wa_16023588340 drm/xe: fix engine_class bounds check again drm/xe: prevent UAF around preempt fence drm/xe: fixup xe_alloc_pf_queue drm/xe: prevent potential UAF in pf_provision_vf_ggtt() Matthew Brost (49): drm/xe: Add timeout to preempt fences drm/xe: s/xe_tile_migrate_engine/xe_tile_migrate_exec_queue drm/xe: Add xe_vm_pgtable_update_op to xe_vma_ops drm/xe: Add xe_exec_queue_last_fence_test_dep drm/xe: Convert multiple bind ops into single job drm/xe: Update VM trace events drm/xe: Update PT layer with better error handling drm/xe: Add VM bind IOCTL error injection drm/xe: Drop trace_xe_hw_fence_free drm/xe: Wedge the entire device drm/xe: Don't suspend device upon wedge drm/xe: Validate user fence during creation drm/xe: Remove unused xe_sync_entry_wait drm/xe: Add xe_gt_tlb_invalidation_fence_init helper drm/xe: Drop xe_gt_tlb_invalidation_wait drm/xe: Hold a PM ref when GT TLB invalidations are inflight drm/xe: Build PM into GuC CT layer drm/xe: Fix xe_pt_abort_unbind drm/xe: Return -ENOBUFS if a kmalloc fails which is tied to an array of binds drm/xe: Store process name and pid in xe file drm/xe: Remove fence check from send_tlb_invalidation drm/xe: Fix possible UAF in guc_exec_queue_process_msg drm/xe: Assert G2H outstanding when releasing G2H drm/xe: Use dma_fence_chain_free in chain fence unused as a sync drm/xe: Take ref to VM in delayed snapshot drm/printer: Allow NULL data in devcoredump printer drm/xe: Faster devcoredump drm/xe: Only check last fence on user binds drm/xe: Move VM dma-resv lock from xe_exec_queue_create to __xe_exec_queue_init drm/xe: Add xe_sched_msg_lock/unlock helper drm/xe: Reinit msg link when processing a message drm/xe: Add xe_sched_add_msg_locked helper drm/xe: Only enable scheduling upon resume if needed drm/xe: Allow suspend / resume to be safely called multiple times drm/xe: Fix tile fini sequence drm/xe: Use for_each_remote_tile rather than manual check drm/xe: Use reserved copy engine for user binds on faulting devices drm/xe: Drop HW fence pointer to HW fence ctx drm/xe: Free job before xe_exec_queue_put drm/xe: Invalidate media_gt TLBs drm/xe: Invalidate media_gt TLBs in PT code Revert "drm/xe: Invalidate media_gt TLBs in PT code" drm/xe: Move ggtt_fini to devm managed drm/xe: Set firmware state to loadable before registering guc_fini_hw drm/xe: Drop warn on xe_guc_pc_gucrc_disable in guc pc fini drm/xe: Move hw_engine_fini to devm managed drm/xe: Update xe_sa to use xe_managed_bo_create_pin_map dma-buf: Split out dma fence array create into alloc and arm function= s drm/xe: Invalidate media_gt TLBs in PT code Ma=C3=ADra Canal (1): drm/v3d: Expose memory stats through fdinfo Meenakshikumar Somasundaram (2): drm/amd/display: Enable aux transfer path via dmub for dp tunneling drm/amd/display: Add dpia debug option to control power management Melissa Wen (2): drm/amd/display: fix cursor offset on rotation 180 MAINTAINERS: remove myself as a VKMS maintainer Michael Chen (1): drm/amdgpu: increase mes log buffer size for gfx12 Michael Strauss (3): drm/amd/display: Fix overlay with pre-blend color processing drm/amd/display: Update HPO I/O When Handling Link Retrain Automation Request drm/amd/display: Allow UHBR Interop With eDP Supported Link Rates Tab= le Michal Wajdeczko (31): drm/xe/guc: Demote GuC IDs usage message to debug drm/xe: Fix register definition order in xe_regs.h drm/xe: Kill regs/xe_sriov_regs.h drm/xe: Use VF_CAP_REG for device wmb drm/xe/kunit: Kill xe_cur_kunit() drm/xe/kunit: Drop XE_TEST_EXPORT drm/xe/kunit: Simplify xe_bo live tests code layout drm/xe/kunit: Simplify xe_dma_buf live tests code layout drm/xe/kunit: Simplify xe_migrate live tests code layout drm/xe/kunit: Simplify xe_mocs live tests code layout drm/xe/pf: Limit fair VF LMEM provisioning drm/xe/vf: Track writes to inaccessible registers from VF drm/xe/vf: Fix register value lookup drm/xe: Introduce const cast helper drm/xe/tests: Add helpers for use in live tests drm/xe/tests: Convert xe_bo live tests drm/xe/tests: Convert xe_dma_buf live tests drm/xe/tests: Convert xe_migrate live tests drm/xe/tests: Convert xe_mocs live tests drm/xe/tests: Skip xe_mocs live tests on VF device drm/xe: Normalize NEEDS_64K BO flag drm/xe: Add NEEDS_2M BO flag drm/xe/pf: Fix VF config validation on multi-GT platforms drm/xe/pf: Add function to sanitize VF resources drm/xe/pf: Fix documentation formatting drm/xe/pf: Drop GuC notifications for non-existing VF drm/xe/pf: Improve VF control drm/xe/pf: Add thresholds to the VF KLV config drm/xe/pf: Reset thresholds when releasing a VF config drm/xe: Remove redundant [drm] tag from xe_assert() message drm/xe: Don't keep stale pointer to bo->ggtt_node Micha=C5=82 Winiarski (3): drm: Use XArray instead of IDR for minors accel: Use XArray instead of IDR for minors drm: Expand max DRM device number to full MINORBITS Mika Kuoppala (1): drm/xe: Add kernel doc for xe_hw_engine_lookup Mikko Perttunen (1): gpu: host1x: Request syncpoint IRQs only during probe Mitul Golani (5): drm/i915/display: Cache adpative sync caps to use it later drm/i915/display: WA for Re-initialize dispcnlunitt1 xosc clock drm/i915/display/dp: Compute AS SDP when vrr is also enabled drm/dp: Describe target_rr_divider in struct drm_dp_as_sdp drm/i915/bmg: Read display register timeout Mohammed Anees (1): drm: Add missing documentation for struct drm_plane_size_hint Mounika Adhuri (1): drm/amd/display: Refactoring MPC Mudimela (1): drm/amd/display: Refactoring DWB related files from dcn30 Files Muhammad Ahmed (1): drm/amd/display: guard otg disable w/a for test Mukul Joshi (3): drm/amdgpu: Implement MES Suspend and Resume APIs for GFX11 drm/amdkfd: Update queue unmap after VM fault with MES drm/amdkfd: Update BadOpcode Interrupt handling with MES Nathan Chancellor (2): drm/amd/display: Reapply 2fde4fdddc1f drm/xe: Fix total initialization in xe_ggtt_print_holes() Neil Armstrong (4): dt-bindings: display: panel: document BOE TV101WUM-LL2 DSI Display Pa= nel drm/panel: add BOE tv101wum-ll2 panel driver drm/panel: visionox-vtdr6130: switch to mipi_dsi wrapped functions drm/panel: visionox-vtdr6130: switch to devm_regulator_bulk_get_const Nevenko Stupar (2): drm/amd/display: Issue with 3 or more mcaches per surface drm/amd/display: Hardware cursor changes color when switched to software cursor Ngai-Mint Kwan (1): drm/xe/xe2lpm: Extend Wa_16021639441 Nicholas Kazlauskas (5): drm/amd/display: Request 0MHz dispclk for zero display case drm/amd/display: Add seamless boot support for more DIG operation mod= es drm/amd/display: Use gpuvm_min_page_size_kbytes for DML2 surfaces drm/amd/display: Allocate DCN35 clock table transfer buffers in GART drm/amd/display: Notify DMCUB of D0/D3 state Nicholas Susanto (4): drm/amd/display: Remove redundant check in DCN35 hwseq drm/amd/display: DCN35 set min dispclk to 50Mhz drm/amd/display: Fix DCN35 set min dispclk logic drm/amd/display: Refactor dccg35_get_other_enabled_symclk_fe Nikita Zhandarovich (2): drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll() drm/radeon/evergreen_cs: fix int overflow errors in cs track offsets Nirmoy Das (12): drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal drm/xe/pm: Add trace for pm functions drm/xe: Fix access_ok check in user_fence_create drm/xe/gt: Add APIs for printing stats over debugfs drm/xe: Add stats for tlb invalidation count drm/xe/migrate: Parameterize ccs and bo data clear in xe_migrate_clea= r() drm/xe: Remove redundant param from xe_bo_create_user drm/ttm: Add a flag to allow drivers to skip clear-on-free drm/xe/lnl: Offload system clear page activity to GPU Revert "drm/xe/lnl: Offload system clear page activity to GPU" Revert "drm/ttm: Add a flag to allow drivers to skip clear-on-free" drm/xe: Fix memory leak on xe_alloc_pf_queue failure Nitin Gote (2): drm/i915/gt: Do not consider preemption during execlists_dequeue for = gen8 drm/i915/gt: Add Wa_14019789679 Ohad Sharabi (1): drm/xe/oa: Don't use hardcoded values Otto Pfl=C3=BCger (1): drm/msm/adreno: Add A306A support Pallavi Mishra (1): drm/xe/xe2: Enable Priority Mem Read Peng Liu (2): drm/amdgpu: add raven1 gfxoff quirk drm/amdgpu: enable gfxoff quirk on HP 705G4 Philip Yang (12): drm/amdkfd: kfd_bo_mapped_dev support partition drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer drm/amdkfd: Refactor queue wptr_bo GART mapping drm/amdkfd: Validate user queue buffers drm/amdkfd: Ensure user queue buffers residency drm/amdkfd: Validate user queue svm memory residency drm/amdkfd: Validate user queue update drm/amdkfd: Store queue cwsr area size to node properties drm/amdkfd: Validate queue cwsr area and eop buffer size drm/amdkfd: Fix compile error if HMM support not enabled drm/amdkfd: Handle queue destroy buffer access race drm/amdkfd: Document and define SVM events message macro Philipp Stanner (1): drm/nouveau: Improve variable name in nouveau_sched_init() Pierre-Eric Pelloux-Prayer (1): drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit Pin-yen Lin (1): drm/bridge: it6505: Disable IRQ when powered off Prike Liang (3): drm/amdgpu: increase the reset counter for the queue reset drm/amdgpu/gfx9.4.3: Implement compute pipe reset drm/amdgpu/gfx11: fallback to driver reset compute queue directly (v2= ) Qili Lu (1): drm/amd/display: fix dccg root clock optimization related hang Raag Jadav (1): drm/i915/hwmon: expose fan speed Rahul Jain (1): drm/amdgpu: Take IOMMU remapping into account for p2p checks Rajneesh Bhardwaj (1): drm/ttm: Allow direct reclaim to allocate local memory v2 Ramesh Errabolu (1): drm/amdgpu: Surface svm_default_granularity, a RW module parameter Relja Vojvodic (3): drm/amd/display: Implement bias and scale pre scl drm/amd/display: 3DLUT non-DMA refactor drm/amd/display: Add sharpness control interface Remington Brasga (1): drm/amdgpu/uvd4: fix mask and shift definitions Revalla Hari Krishna (3): drm/amd/display: Refactoring OPP drm/amd/display: Refactoring MMHUBBUB drm/amd/display: Refactoring HPO Richard Acayan (1): drm/msm/adreno: add a615 support Rob Clark (1): drm/msm: Remove unused pm_state Rob Herring (Arm) (2): drm: bridge: anx7625: Use of_property_read_variable_u8_array() drm/mediatek: Drop unnecessary check for property presence Robin Chen (1): drm/amd/display: Optimize vstartup position for AS-SDP Rodrigo Siqueira (23): drm/amd/display: Remove unused dml2_core_ip_params struct drm/amd/display: Remove ASSERT if significance is zero in math_ceil2 drm/amd/display: Remove old comments drm/amd/display: Re-order enum in a header file drm/amd/display: Setup two pixel per container drm/amd/display: Replace dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd drm/amd/display: Add missing DET segments programming drm/amd/display: Remove duplicated code drm/amd/display: Add missing mcache registers drm/amd/display: Add dcc propagation value drm/amd/display: Add missing registers for dcn32 drm/amd/display: Remove unused code drm/amd/display: Add missing DCN314 to the DML Makefile drm/amd/display: Cleanup dml2 and dc/resource Makefile drm/amd/display: Remove useless defines drm/amd/display: Remove unused fields from dmub_cmd_update_dirty_rect= _data drm/amd/display: Remove unused fields from dc_caps drm/amd/display: Add missing program DET segment call to pipe init drm/amd/display: Check null pointer before try to access it drm/amd/display: Remove unused field drm/amd/display: Improve FAM control for DCN401 drm/amd/display: Adjust cursor position drm/amd/display: Remove unnecessary call to REG_SEQ_SUBMIT|WAIT_DONE Rodrigo Vivi (17): drm/xe: Removed unused xe_ggtt_printk drm/xe: Introduce GGTT documentation drm/xe: Remove unnecessary drm_mm.h includes drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node drm/xe: Rename xe_ggtt_node related functions drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node drm/xe: Introduce xe_ggtt_largest_hole drm/xe: Introduce xe_ggtt_print_holes drm/xe: Refactor xe_ggtt balloon functions to make the node clear drm/xe: Make xe_ggtt_node struct independent drm/xe: Fix missing runtime outer protection for ggtt_remove_node Merge drm/drm-next into drm-intel-next Merge drm/drm-next into drm-intel-next drm/xe: Add missing runtime reference to wedged upon gt_reset drm/xe/display: Avoid encoder_suspend at runtime suspend drm/xe: Suppress missing outer rpm protection warning Rohit Agarwal (1): dt-bindings: display: mediatek: dpi: Add power domains Roman Li (2): drm/amd/display: Replace assert with error message in dp_retrieve_lttpr_cap() drm/amd/display: Fix print format specifiers in DC_LOG_IPS Ryan Seto (2): drm/amd/display: Added logging for automated DPM testing drm/amd/display: Fix visual confirm bug for SubVP Sai Teja Pottumuttu (1): drm/xe/xe2hpg: Introduce performance tuning changes for Xe2_HPG Samson Tam (9): drm/amd/display: quality improvements for EASF and ISHARP drm/amd/display: remove dc dependencies from SPL library drm/amd/display: ensure EASF and ISHARP coefficients are programmed together drm/amd/display: roll back quality EASF and ISHARP and dc dependency changes drm/amd/display: add back quality EASF and ISHARP and dc dependency changes drm/amd/display: add improvements for text display and HDR DWM and MP= O drm/amd/display: add sharpness support for windowed YUV420 video drm/amd/display: re-enable Dynamic ODM policy drm/amd/display: disable sharpness if HDR Multiplier is too large Sebastian Wick (1): drm/drm_connector: Document Colorspace property variants Shekhar Chauhan (1): drm/xe/xe2: Add performance turning changes Sherry Yang (1): drm/msm: fix %s null argument error Shixiong Ou (1): drm: Add the missing symbol '.' Shuijing Li (1): drm/mediatek: dsi: Add dsi per-frame lp code for mt8188 Simona Vetter (10): drm: Add might_fault to drm_modeset_lock priming Merge tag 'drm-misc-next-2024-08-01' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-misc-next-2024-08-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-misc-next-2024-08-16' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-misc-next-2024-08-22' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Merge tag 'drm-intel-gt-next-2024-08-23' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Merge v6.11-rc5 into drm-next Merge tag 'amd-drm-next-6.12-2024-08-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-next MAINATINERS: update drm maintainer contacts Merge v6.11-rc7 into drm-next Soham Dandapat (1): drm/amdgpu: Return earlier in amdgpu_sw_ring_ib_end if mcbp is off Sridevi Arvindekar (1): drm/amd/display: Add option to allow transition when odm is forced Srinivasan Shanmugam (41): drm/amd/display: Add 'pstate_keepout' kdoc entry in 'optc1_program_ti= ming' drm/amd/display: Add kdoc entry for 'bs_coeffs_updated' in dpp401_dscl_program_isharp drm/amd/display: Fix index out of bounds in DCN30 degamma hardware format translation drm/amd/display: Fix index out of bounds in degamma hardware format translation drm/amd/display: Implement bounds check for stream encoder creation in DCN401 drm/amd/display: Fix index out of bounds in DCN30 color transformatio= n drm/amd/display: Add null check for head_pipe in dcn201_acquire_free_pipe_for_layer drm/amd/display: Add null check for head_pipe in dcn32_acquire_idle_pipe_for_head_pipe_in_layer drm/amd/display: Add NULL check for clk_mgr and clk_mgr->funcs in dcn30_init_hw drm/amd/display: Add NULL check for clk_mgr and clk_mgr->funcs in dcn401_init_hw drm/amd/display: Add NULL check for clk_mgr in dcn32_init_hw drm/amd/display: Add null check for set_output_gamma in dcn30_set_output_transfer_func drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream drm/amdkfd: Fix missing error code in kfd_queue_acquire_buffers drm/amd/display: Handle null 'stream_status' in 'planes_changed_for_existing_stream' drm/amd/display: Align 'dpp401_dscl_program_isharp' with actual function parameters drm/amd/display: Add NULL check for function pointer in dcn20_set_output_transfer_func drm/amd/display: Add NULL check for function pointer in dcn401_set_output_transfer_func drm/amd/display: Add NULL check for function pointer in dcn32_set_output_transfer_func drm/amd/display: Add null check for 'afb' in amdgpu_dm_update_cursor = (v2) drm/amd/display: Add null check for 'afb' in amdgpu_dm_plane_handle_cursor_update (v2) drm/amd/display: Align hwss_wait_for_all_blank_complete descriptor with implementation drm/amdgpu: Add infrastructure for Cleaner Shader feature drm/amdgpu: Make enforce_isolation setting per GPU drm/amdgpu: Enforce isolation as part of the job drm/amdgpu: Add enforce_isolation sysfs attribute drm/amdgpu: Add sysfs interface for running cleaner shader drm/amdgpu: Add PACKET3_RUN_CLEANER_SHADER for cleaner shader executi= on drm/amdgpu/gfx9: Implement cleaner shader support for GFX9 hardware drm/amdgpu/gfx9: Implement cleaner shader support for GFX9.4.3 hardwa= re drm/amdgpu/gfx9: Add cleaner shader for GFX9.4.3 drm/amdgpu/gfx9: Add cleaner shader support for GFX9.4.4 hardware drm/amdgpu: Implement Enforce Isolation Handler for KGD/KFD serializa= tion drm/amdgpu/gfx9: Apply Isolation Enforcement to GFX & Compute rings drm/amdgpu/gfx_v9_4_3: Apply Isolation Enforcement to GFX & Compute r= ings drm/amd/display: Add missing kdoc entry for 'bs_coeffs_updated' in dpp401_dscl_program_isharp drm/amdgpu/: Add missing kdoc entry in amdgpu_vm_handle_fault functio= n drm/amdgpu: Replace 'amdgpu_job_submit_direct' with 'drm_sched_entity' in cleaner shader drm/amd/display: Add kdoc entry for 'program_isharp_1dlut' in 'dpp401_dscl_program_isharp' drm/amdgpu: Fix kdoc entry in 'amdgpu_vm_cpu_prepare' Stanley.Yang (1): drm/amdgpu: Fix eeprom max record count Stefan Wahren (3): drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get drm/vc4: Get the rid of DRM_ERROR() drm/vc4: v3d: simplify clock retrieval Steffen Trumtrar (2): dt-bindings: display: simple: Document support for Innolux G070ACE-LH= 3 drm/panel: simple: add Innolux G070ACE-LH3 LVDS display support Stephan Gerhold (1): Revert "drm/panel-edp: Add SDC ATNA45AF01" Stuart Summers (3): drm/xe: Fix missing workqueue destroy in xe_gt_pagefault drm/xe: Use topology to determine page fault queue size drm/xe/guc: Bump the G2H queue size to account for page faults Sung Joon Kim (5): drm/amd/display: Do 1-to-1 mapping between OPP and DSC in DML2 drm/amd/display: Check stream pointer is initialized before accessing drm/amd/display: Check for NULL pointer drm/amd/display: Check top sink only when multiple streams for DP2 drm/amd/display: Support UHBR10 link rate on eDP Sung Lee (1): drm/amd/display: Fix Cursor Offset in Scaled Scenarios Sunil Khatri (61): drm/amdgpu: Add sdma_v5_2 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_5_2 ip_dump drm/amdgpu: fix the extra space between two functions drm/amdgpu: fix the print message in devcoredump drm/amdgpu: Add sdma_v6_0 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_6_0 ip_dump drm/amdgpu: Add sdma_v5_0 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_5_0 ip_dump drm/amdgpu: Add sdma_v7_0 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_7_0 ip_dump drm/amdgpu: Add sdma_v4_0 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_4_0 ip_dump drm/amdgpu: Add sdma_v4_4_2 ip dump for devcoredump drm/amdgpu: add print support for sdma_v_4_4_2 ip_dump drm/amdgpu: add vcn ip dump ptr in vcn global struct drm/amdgpu: add macro to calculate offset with instance drm/amdgpu: add vcn_v3_0 ip dump support drm/amdgpu: add print support for vcn_v3_0 ip dump drm/amdgpu: print VCN instance dump for valid instance drm/amdgpu: trigger ip dump before suspend of IP's drm/amdgpu: Remove debugfs amdgpu_reset_dump_register_list drm/amdgpu: Clean up the register dump via debugfs list drm/amdgpu: optimize the padding for gfx10 drm/amdgpu: do not call insert_nop fn for zero count drm/amdgpu: optimize the padding for gfx11 drm/amdgpu: optimize the padding for gfx12 drm/amdgpu: optimize the padding for gfx9 drm/amdgpu: optimize the padding for gfx_v9_4_3 drm/amdgpu: add vcn_v5_0 ip dump support Revert "drm/amdgpu: add vcn_v5_0 ip dump support" Revert "drm/amdgpu: add print support for vcn_v3_0 ip dump" Revert "drm/amdgpu: add vcn_v3_0 ip dump support" Revert "drm/amdgpu: add vcn ip dump ptr in vcn global struct" drm/amdgpu: fix ptr check warning in gfx9 ip_dump drm/amdgpu: fix ptr check warning in gfx10 ip_dump drm/amdgpu: fix ptr check warning in gfx11 ip_dump drm/amdgpu: fix ptr check warning in gfx12 ip_dump drm/amdgpu: add gfx9_4_3 register support in ipdump drm/amdgpu: add print support for gfx9_4_3 ipdump drm/amdgpu: add cp queue registers for gfx9_4_3 ipdump drm/amdgpu: add cp queue registers print for gfx9_4_3 drm/amdgpu: remove ME0 registers from mi300 dump drm/amdgpu: add vcn ip dump ptr in vcn global struct drm/amdgpu: add vcn_v3_0 ip dump support drm/amdgpu: add print support for vcn_v3_0 ip dump drm/amdgpu: add vcn_v5_0 ip dump support drm/amdgpu: add print support for vcn_v5_0 ip dump drm/amdgpu: add vcn_v4_0_3 ip dump support drm/amdgpu: add vcn_v4_0 ip dump support drm/amdgpu: add vcn_v4_0_5 ip dump support drm/amdgpu: add print support for vcn_v4_0_3 ip dump drm/amdgpu: add print support for vcn_v4_0 ip dump drm/amdgpu: add print support for vcn_v4_0_5 ip dump drm/amdgpu: add vcn_v1_0 ip dump support drm/amdgpu: add print support for vcn_v1_0 ip dump drm/amdgpu: add vcn_v2_0 ip dump support drm/amdgpu: add print support for vcn_v2_0 ip dump drm/amdgpu: add vcn_v2_5 ip dump support drm/amdgpu: add print support for vcn_v2_5 ip dump drm/amdgpu: add vcn ip dump support for vcn_v2_6 drm/amdgpu: Move the dumping log out of for loop Suraj Kandpal (8): drm/i915/hdcp: Add encoder check in intel_hdcp_get_capability drm/i915/hdcp: Add encoder check in hdcp2_get_capability drm/xe/hdcp: Check GSC structure validity drm/i915/dp: Clear VSC SDP during post ddi disable routine drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro drm/i915/dpkgc: Add VRR condition for DPKGC Enablement drm/i915/hdcp: Use correct cp_irq_count drm/i915/pps: Disable DPLS_GATING around pps sequence T.J. Mercier (1): dma-buf: heaps: Deduplicate docs and adopt common format Tao Zhou (3): drm/amdgpu: create function to check RAS RMA status drm/amdgpu: update bad state check in GPU recovery drm/amdgpu: report bad status in GPU recovery Tejas Upadhyay (7): drm/xe/xe2: Make subsequent L2 flush sequential drm/xe/xe2: Add Wa_15015404425 drm/xe/xe2hpg: Add Wa_14021821874 drm/xe: Move enable host l2 VRAM post MCR init drm/xe: Write all slices if its mcr register drm/xe: Define STATELESS_COMPRESSION_CTRL as mcr register drm/xe/xe2hpg: Add Wa_15016589081 Tejas Vipin (7): drm/mipi-dsi: add more multi functions for better error handling drm/panel: startek-kd070fhfid015: transition to mipi_dsi wrapped func= tions drm/panel: mantix-mlaf057we51: transition to mipi_dsi wrapped functio= ns drm/panel: mantix-mlaf057we51: write hex in lowercase drm/mipi-dsi: Add mipi_dsi_dcs_set_tear_scanline_multi drm/panel: jdi-fhd-r63452: transition to mipi_dsi wrapped functions drm/panel: novatek-nt35950: transition to mipi_dsi wrapped functions Terry Hsiao (2): drm/panel-edp: Add 6 panels used by MT8186 Chromebooks drm/panel-edp: Fix HKC MB116AN01 name Thomas Hellstr=C3=B6m (10): drm/xe: Use write-back caching mode for system memory on DGFX drm/ttm: Allow TTM LRU list nodes of different types drm/ttm: Slightly clean up LRU list iteration drm/ttm: Use LRU hitches drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves drm/ttm: Provide a generic LRU walker helper drm/ttm: Use the LRU walker helper for swapping drm/ttm: Use the LRU walker for eviction drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices drm/xe: Use xe_pm_runtime_get in xe_bo_move() if reclaim-safe. Thomas Wei=C3=9Fschuh (2): drm/amdgpu: convert bios_hardcoded_edid to drm_edid drm/radeon: convert bios_hardcoded_edid to drm_edid Thomas Zimmermann (52): drm/mgag200: Only set VIDRST bits in CRTC modesetting drm/mgag200: Remove vidrst callbacks from struct mgag200_device_funcs drm/mgag200: Rename BMC vidrst names drm/mgag200: Use hexadecimal register indeces drm/mgag200: Align register field names with documentation drm/mgag200: Use adjusted mode values for CRTCs drm/mgag200: Add dedicated variables for blanking fields drm/mgag200: Add dedicted variable for field drm/mgag200: Add vblank support drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp Merge drm/drm-next into drm-misc-next drm/ast: astdp: Test firmware status once during probing drm/ast: astdp: Only test HDP state in ast_astdp_is_connected() drm/ast: astdp: Perform link training during atomic_enable drm/ast: astdp: Clean up EDID reading drm/mgag200: Fix VBLANK interrupt handling drm/i915: Use backlight power constants drm/mgag200: Add VGA-BMC output drm/mgag200: vga-bmc: Transparently handle BMC drm/mgag200: vga-bmc: Control CRTC VIDRST flag from encoder drm/mgag200: vga-bmc: Control BMC scanout from encoder drm/mgag200: Remove BMC output Merge drm/drm-next into drm-misc-next drm: Do delayed switcheroo in drm_lastclose() drm/amdgpu: Do not set struct drm_driver.lastclose drm/nouveau: Do not set struct drm_driver.lastclose drm/nouveau: Do not set struct drm_mode_config_funcs.output_poll_chan= ged drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug= () drm/fbdev-helper: Update documentation on obsolete callbacks drm/fbdev-helper: Remove drm_fb_helper_output_poll_changed() drm: Remove struct drm_driver.lastclose drm: Remove struct drm_mode_config_funcs.output_poll_changed drm/amdgpu: Use backlight power constants drm/panel: panel-novatak-nt35510: Use backlight power constants drm/panel: panel-orisetech-otm8009a: Use backlight power constants drm/panel: panel-samsung-s6e63j0x03: Use backlight power constants drm/panel: panel-samsung-s6e3ha2: Use backlight power constants drm/panel: panel-sony-acx565akm: Use backlight power constants drm/radeon: Use backlight power constants drm/tilcdc: Use backlight power constants drm/ast: Move code for physical outputs into separate files drm/ast: Add struct ast_connector drm/ast: astdp: Move locking into EDID helper drm/ast: astdp: Use struct drm_edid and helpers drm/ast: astdp: Simplify power management when detecting display drm/ast: astdp: Transparently handle BMC support drm/ast: dp501: Use struct drm_edid and helpers drm/ast: dp501: Transparently handle BMC support drm/ast: sil164: Transparently handle BMC support drm/ast: vga: Transparently handle BMC support drm/ast: Remove BMC output drm/xe: Support 'nomodeset' kernel command-line option Thorsten Blum (2): drm/xe/oa: Use vma_pages() helper function in xe_oa_mmap() drm/tegra: hub: Use fn parameter directly to fix Coccinelle warning Tim Huang (6): drm/amdgpu: add missed harvest check for VCN IP v4/v5 drm/amd/pm: fix unchecked return value warning for vega10_hwmgr drm/amdgpu: fix unchecked return value warning for amdgpu_gfx drm/amdgpu: fix unchecked return value warning for amdgpu_atombios drm/amd/display: fix double free issue during amdgpu module unload drm/amd/pm: ensure the fw_info is not null before using it Tobias Jakobi (5): drm/amd: Make amd_ip_funcs static for SDMA v5.0 drm/amd: Make amd_ip_funcs static for SDMA v5.2 drm/amdgpu/swsmu: fix SMU11 typos (memlk -> memclk) drm/amd/display: Avoid race between dcn10_set_drr() and dc_state_destruct() drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct() Tom Chung (5): drm/amd/display: Disable replay if VRR capability is false drm/amd/display: Fix VRR cannot enable drm/amd/display: Add a missing PSR state drm/amd/display: Reset VRR config during resume drm/amd/display: Re-enable panel replay feature Trigger Huang (2): drm/amdgpu: skip printing vram_lost if needed drm/amdgpu: Do core dump immediately when job tmo Tvrtko Ursulin (13): drm/v3d: Prevent out of bounds access in performance query extensions drm/v3d: Fix potential memory leak in the timestamp extension drm/v3d: Fix potential memory leak in the performance extension drm/v3d: Validate passed in drm syncobj handles in the timestamp exte= nsion drm/v3d: Validate passed in drm syncobj handles in the performance extension drm/v3d: Move part of copying of reset/copy performance extension to a helper drm/v3d: Size the kperfmon_ids array at runtime drm/v3d: Do not use intermediate storage when copying performance query results drm/v3d: Move perfmon init completely into own unit drm/v3d: Prefer get_user for scalar types drm/v3d: Add some local variables in queries/extensions drm/amdpgu: Micro-optimise amdgpu_ring_commit drm/i915: 2 GiB of relocations ought to be enough for anybody* Ulf Hansson (1): drm/tegra: gr3d: Convert into dev_pm_domain_attach|detach_list() Uma Shankar (1): drm/xe/fbdev: Limit the usage of stolen for LNL+ Umesh Nerlige Ramappa (5): i915/perf: Remove code to update PWR_CLK_STATE for gen12 drm/xe: Move part of xe_file cleanup to a helper drm/xe: Add ref counting for xe_file drm/xe: Take a ref to xe file when user creates a VM drm/xe: Fix use after free when client stats are captured Val Packett (2): drm/rockchip: vop: clear DMA stop bit on RK3066 drm/rockchip: vop: enable VOP_FEATURE_INTERNAL_RGB on RK3066 Venkata Narendra Kumar Gutta (1): drm/amdgpu: Add MFD support for ISP I2C bus Victor Skvortsov (4): Revert "drm/amdgpu: Extend KIQ reg polling wait for VF" drm/amdgpu: Disable dpm_enabled flag while VF is in reset drm/amdgpu: Block MMR_READ IOCTL in reset drm/amdgpu: abort KIQ waits when there is a pending reset Victor Zhao (3): drm/amd/sriov: extend NV_MAILBOX_POLL_MSG_TIMEDOUT drm/amd/amdgpu: allow use kiq to do hdp flush under sriov drm/amd/amdgpu: move drain_workqueue before shutdown is set Vignesh Raman (9): drm/ci: uprev IGT drm/ci: arm64.config: Enable CONFIG_DRM_ANALOGIX_ANX7625 drm/ci: skip tools_test on non-intel platforms drm/ci: mediatek: add tests for mediatek display driver drm/ci: mediatek: add tests for powervr gpu driver drm/ci: meson: add tests for meson display driver drm/ci: rockchip: add tests for rockchip display driver drm/ci: uprev mesa drm/ci: increase timeout for all jobs Ville Syrj=C3=A4l=C3=A4 (28): drm/i915: Calculate vblank delay more accurately drm/i915: Make vrr_{enabling,disabling}() usable outside intel_displa= y.c drm/i915/fbc: Extract intel_fbc_has_fences() drm/i915/fbc: Convert to intel_display, mostly drm/i915/fbc: s/_intel_fbc_cfb_stride()/intel_fbc_plane_cfb_stride()/ drm/i915/fbc: Extract intel_fbc_max_plane_size() drm/i915/fbc: Extract intel_fbc_max_surface_size() drm/i915/fbc: s/intel_fbc_hw_tracking_covers_screen()/intel_fbc_surface_size_ok()/ drm/i915/fbc: Adjust g4x+ platform checks drm/i915/fbc: Extract _intel_fbc_cfb_stride() drm/i915/fbc: s/lines/height/ drm/i915/fbc: Reoder CFB max height platform checks drm/i915/fbc: Extract intel_fbc_max_cfb_height() drm/i915/fbc: Extract _intel_fbc_cfb_size() drm/i915/fbc: Extract intel_fbc_cfb_cpp() drm/i915: Fix readout degamma_lut mismatch on ilk/snb drm/i915/dsb: Hook up DSB error interrupts drm/i915/dsb: Convert dewake_scanline to a hw scanline number earlier drm/i915/dsb: Shuffle code around drm/i915/dsb: Fix dewake scanline drm/i915/dsb: Account for VRR properly in DSB scanline stuff drm/i915/dsb: Precompute DSB_CHICKEN drm/i915/dsb: Introduce intel_dsb_wait_scanline_{in,out}() drm/i915/dsb: Introduce intel_dsb_chain() drm/i915/dsb: Allow intel_dsb_chain() to use DSB_WAIT_FOR_VBLANK drm/i915/dsb: Clear DSB_ENABLE_DEWAKE once the DSB is done drm/i915/dsb: s/dsb/dsb_color_vblank/ drm/i915/dsb: Use chained DSBs for LUT programming Vinod Govindapillai (1): drm/xe/display: handle HPD polling in display runtime suspend/resume Vladimir Lypak (4): drm/msm/a5xx: disable preemption in submits by default drm/msm/a5xx: properly clear preemption records on resume drm/msm/a5xx: fix races in preemption evaluation stage drm/msm/a5xx: workaround early ring-buffer emptiness check WangYuli (2): drm/amd/amdgpu: Properly tune the size of struct drm/ci: Upgrade setuptools requirement to 70.0.0 Wayne Lin (1): drm/amd/display: Check null pointer before try to access it Wenjing Liu (4): drm/amd/display: fix dscclk programming sequence on DCN401 drm/amd/display: apply vmin optimization even if it doesn't reach vmin level drm/amd/display: fix minor coding errors where dml21 phase 5 uses wrong variables drm/amd/display: apply vmin optimization even if it doesn't reach vmin level Wu Hoi Pok (6): drm/radeon: change variable name "dev" to "ddev" for consistency drm/radeon: remove load callback from kms_driver drm/radeon: use variable flags as parameter drm/radeon: add helper rdev_to_drm(rdev) drm/radeon: change rdev->ddev to rdev_to_drm(rdev) drm/radeon: change drm_dev_alloc to devm_drm_dev_alloc Xiaogang Chen (1): drm/amdkfd: Change kfd/svm page fault drain handling Yang Wang (3): drm/amdgpu: remove RAS unused paramter 'err_addr' drm/amdgpu: fixing rlc firmware loading failure issue drm/amdgpu: add list empty check to avoid null pointer issue Yannick Fertre (3): drm/stm: ltdc: reset plane transparency after plane disable drm/stm: ltdc: add mask for lxcr register drm/stm: ltdc: remove reload interrupt YiPeng Chai (4): drm/amdgpu: optimize umc v12 address conversion function drm/amdgpu: optimize logging deferred error info drm/amdgpu: Remove unused code drm/amdgpu: fix ras UE error injection failure issue Yifan Zhang (3): drm/amdgpu: skip kfd init if GFX is not ready. drm/amdgpu: use CPU for page table update if SDMA is unavailable drm/amdkfd: Don't drain ih1 for APU Yinjie Yao (1): drm/amdgpu: Update kmd_fw_shared for VCN5 Yu Jiaoliang (1): drm/i915/gt: Use kmemdup_array instead of kmemdup for multiple alloca= tion Yuesong Li (1): drivers:drm:exynos_drm_gsc:Fix wrong assignment in gsc_bind() Zaeem Mohamed (2): drm/amdgpu/display: SPDX copyright for spl_os_types.h drm/amdgpu/display: remove unnecessary TODO spl_os_types.h Zenghui Yu (2): accel/qaic: Remove the description of DRM_IOCTL_QAIC_PART_DEV MAINTAINERS: Add selftests to DMA-BUF HEAPS FRAMEWORK entry Zhang Zekun (2): drm/hisilicon: Remove unused delarations drm/amd: Remove unused declarations Zhaoxiong Lv (9): drm/panel: boe-th101mb31ig002 : Make it compatible with other panel. drm/panel: boe-th101mb31ig002: switch to devm_gpiod_get_optional() for reset_gpio drm/panel: boe-th101mb31ig002: use wrapped MIPI DCS functions dt-bindings: display: panel: Add compatible for starry-er88577 drm/panel: boe-th101mb31ig002: Support for starry-er88577 MIPI-DSI pa= nel drm/panel: boe-th101mb31ig002 : Fix the way to get porch parameters drm/panel: boe-th101mb31ig002 : using drm_connector_helper_get_modes_fixed() drm/panel: jd9365da: Move "exit sleep mode" and "set display on" cmds drm/panel: jd9365da: Modify the init code of Melfas ZhenGuo Yin (1): drm/amdgpu: reset vm state machine after gpu reset(vram lost) renjun wang (2): drm/atomic: fix kerneldoc for fake_commit field drm: Fix kerneldoc for "Returns" section .mailmap | 4 + .../ABI/testing/sysfs-driver-intel-i915-hwmon | 8 + Documentation/accel/qaic/qaic.rst | 6 - .../bindings/display/bridge/toshiba,tc358767.yaml | 21 +- .../bindings/display/mediatek/mediatek,dpi.yaml | 17 + .../devicetree/bindings/display/msm/hdmi.yaml | 28 +- .../display/panel/boe,th101mb31ig002-28a.yaml | 21 +- .../bindings/display/panel/boe,tv101wum-ll2.yaml | 63 + .../bindings/display/panel/himax,hx8394.yaml | 17 +- .../bindings/display/panel/ilitek,ili9806e.yaml | 1 + .../bindings/display/panel/jadard,jd9365da-h3.yaml | 1 + .../bindings/display/panel/panel-simple.yaml | 4 + .../bindings/display/panel/sitronix,st7701.yaml | 69 +- .../bindings/display/renesas,rzg2l-du.yaml | 32 +- .../devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml | 1 + Documentation/gpu/amdgpu/driver-core.rst | 2 +- Documentation/gpu/introduction.rst | 10 +- Documentation/gpu/todo.rst | 65 +- Documentation/gpu/xe/xe_mm.rst | 15 + MAINTAINERS | 20 +- arch/powerpc/kernel/nvram_64.c | 8 +- arch/powerpc/platforms/powernv/opal-kmsg.c | 4 +- arch/um/kernel/kmsg_dump.c | 2 +- drivers/accel/drm_accel.c | 110 +- drivers/accel/ivpu/ivpu_fw.c | 4 + drivers/dma-buf/dma-fence-array.c | 78 +- drivers/dma-buf/dma-heap.c | 33 +- drivers/gpu/drm/Kconfig | 33 +- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/Makefile | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 35 +- drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 48 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 22 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 2 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 7 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 16 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h | 9 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 105 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 36 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 35 +- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 96 -- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 32 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 144 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 25 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 458 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 38 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfxhub.h | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 17 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 87 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 62 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 162 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 39 + drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 73 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 33 +- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 102 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 109 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 4 +- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 4 + drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 38 +- drivers/gpu/drm/amd/amdgpu/cikd.h | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 397 ++++- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 369 ++++- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.h | 3 + drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 345 +++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 77 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 76 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 375 ++++- .../gpu/drm/amd/amdgpu/gfx_v9_0_cleaner_shader.h | 26 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 694 +++++++- .../drm/amd/amdgpu/gfx_v9_4_3_cleaner_shader.asm | 153 ++ .../gpu/drm/amd/amdgpu/gfx_v9_4_3_cleaner_shader.h | 64 + drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 18 - drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 17 - drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c | 57 +- drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.h | 11 + drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c | 57 +- drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.h | 11 + drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 76 +- drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.h | 11 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 63 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.h | 6 + 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.h | 1 - drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 93 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.h | 7 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 166 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 66 + drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 21 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 102 ++ drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 104 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 106 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h | 1 - drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 106 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.h | 1 - drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 112 ++ drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 113 ++ drivers/gpu/drm/amd/amdgpu/soc15.h | 4 + drivers/gpu/drm/amd/amdgpu/soc15d.h | 4 + drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 177 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 5 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 112 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 113 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 118 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 113 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 114 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 115 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 113 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 110 +- drivers/gpu/drm/amd/amdgpu/vid.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 142 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 8 +- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 20 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 48 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 431 ++++- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 21 + drivers/gpu/drm/amd/amdkfd/kfd_events.c | 22 + drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c | 71 - drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 9 +- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 58 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 14 +- drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h | 5 +- .../gpu/drm/amd/amdkfd/kfd_pm4_headers_aldebaran.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 47 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 4 +- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 85 +- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 373 +++++ drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 45 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 132 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 5 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 55 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 + drivers/gpu/drm/amd/amdkfd/soc15_int.h | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 180 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 60 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 30 +- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 143 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 8 +- drivers/gpu/drm/amd/display/dc/Makefile | 1 - drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 27 + .../gpu/drm/amd/display/dc/bios/command_table2.c | 2 +- .../amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 2 +- .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 34 +- .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 303 +++- drivers/gpu/drm/amd/display/dc/core/dc.c | 211 +-- .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 225 ++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 56 +- drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_state.c | 14 +- drivers/gpu/drm/amd/display/dc/dc.h | 27 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 95 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 24 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 7 - drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 102 +- drivers/gpu/drm/amd/display/dc/dc_spl_translate.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 12 + drivers/gpu/drm/amd/display/dc/dc_types.h | 20 + .../gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h | 17 +- .../gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c | 1469 ++++++++++++++++= - .../gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.h | 1 + .../drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c | 32 +- .../drm/amd/display/dc/dccg/dcn401/dcn401_dccg.h | 4 - drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 6 + drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 10 +- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 + drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 20 +- .../display/dc/dce110/dce110_timing_generator.c | 1 + .../display/dc/dce110/dce110_timing_generator.h | 1 + .../display/dc/dce110/dce110_timing_generator_v.c | 1 + .../display/dc/dce120/dce120_timing_generator.c | 1 + .../amd/display/dc/dce60/dce60_timing_generator.c | 3 +- .../amd/display/dc/dce80/dce80_timing_generator.c | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 - .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 2 + drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 6 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c | 6 +- drivers/gpu/drm/amd/display/dc/dcn301/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn303/Makefile | 13 - drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn314/Makefile | 10 - drivers/gpu/drm/amd/display/dc/dcn401/Makefile | 10 - drivers/gpu/drm/amd/display/dc/dio/Makefile | 18 + .../dc/{ =3D> dio}/dcn301/dcn301_dio_link_encoder.c | 0 .../dc/{ =3D> dio}/dcn301/dcn301_dio_link_encoder.h | 0 .../{ =3D> dio}/dcn314/dcn314_dio_stream_encoder.c | 0 .../{ =3D> dio}/dcn314/dcn314_dio_stream_encoder.h | 0 .../dc/dio/dcn321/dcn321_dio_link_encoder.c | 1 - .../dc/dio/dcn35/dcn35_dio_stream_encoder.c | 29 +- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 3 + .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 5 +- .../display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 2 +- .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 2 +- .../display/dc/dml/dcn21/display_rq_dlg_calc_21.c | 2 +- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 11 +- .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 4 +- .../drm/amd/display/dc/dml/display_mode_structs.h | 1 + .../amd/display/dc/dml/dml1_display_rq_dlg_calc.c | 2 +- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 8 - .../dc/dml2/dml21/dml21_translation_helper.c | 114 +- .../dc/dml2/dml21/dml21_translation_helper.h | 1 + .../drm/amd/display/dc/dml2/dml21/dml21_utils.c | 169 +- .../drm/amd/display/dc/dml2/dml21/dml21_wrapper.c | 4 +- .../dc/dml2/dml21/inc/bounding_boxes/dcn3_soc_bb.h | 8 +- .../dc/dml2/dml21/inc/bounding_boxes/dcn4_soc_bb.h | 25 +- .../drm/amd/display/dc/dml2/dml21/inc/dml_top.h | 1 - .../dc/dml2/dml21/inc/dml_top_dchub_registers.h | 1 - .../dc/dml2/dml21/inc/dml_top_display_cfg_types.h | 3 +- .../dc/dml2/dml21/inc/dml_top_policy_types.h | 1 - .../dml2/dml21/inc/dml_top_soc_parameter_types.h | 17 +- .../amd/display/dc/dml2/dml21/inc/dml_top_types.h | 14 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 127 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.h | 1 - .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 985 ++++++----- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.h | 2 +- .../dml2/dml21/src/dml2_core/dml2_core_factory.c | 3 +- .../dml2/dml21/src/dml2_core/dml2_core_factory.h | 1 - .../dc/dml2/dml21/src/dml2_core/dml2_core_shared.c | 222 +-- .../dc/dml2/dml21/src/dml2_core/dml2_core_shared.h | 38 - .../dml21/src/dml2_core/dml2_core_shared_types.h | 35 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_utils.c | 631 +++++++ .../dc/dml2/dml21/src/dml2_core/dml2_core_utils.h | 39 + .../dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 171 +- .../dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h | 1 - .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 3 +- .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.h | 1 - .../dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.c | 1 - .../dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 1 - .../dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 - .../dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.h | 1 - .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c | 12 +- .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.h | 1 - .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c | 1250 -------------- .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.h | 25 - .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 568 ++++--- .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h | 1 - .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c | 8 +- .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.h | 1 - .../src/dml2_standalone_libraries/lib_float_math.c | 1 - .../src/dml2_standalone_libraries/lib_float_math.h | 1 - .../dml21/src/dml2_top/dml2_top_optimization.c | 2 - .../dml21/src/dml2_top/dml2_top_optimization.h | 1 - .../display/dc/dml2/dml21/src/dml2_top/dml_top.c | 23 +- .../dc/dml2/dml21/src/dml2_top/dml_top_mcache.c | 23 +- .../dc/dml2/dml21/src/dml2_top/dml_top_mcache.h | 1 - .../amd/display/dc/dml2/dml21/src/inc/dml2_debug.c | 1 - .../amd/display/dc/dml2/dml21/src/inc/dml2_debug.h | 1 - .../dml21/src/inc/dml2_internal_shared_types.h | 27 +- .../drm/amd/display/dc/dml2/dml2_internal_types.h | 1 + .../amd/display/dc/dml2/dml2_translation_helper.c | 56 +- drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c | 10 +- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 2 +- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h | 1 + .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 3 - .../gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c | 27 +- .../gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.h | 3 + .../gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c | 3 +- .../drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 19 +- .../amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 668 ++++---- .../gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dwb/Makefile | 9 + .../display/dc/{ =3D> dwb}/dcn30/dcn30_cm_common.h | 0 .../drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb.c | 0 .../drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb.h | 0 .../amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb_cm.c | 0 .../gpu/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.c | 1 - .../amd/display/dc/gpio/dcn401/hw_factory_dcn401.c | 16 +- drivers/gpu/drm/amd/display/dc/hpo/Makefile | 15 + .../dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_link_encoder.c | 0 .../dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_link_encoder.h | 0 .../{ =3D> hpo}/dcn31/dcn31_hpo_dp_stream_encoder.c | 0 .../{ =3D> hpo}/dcn31/dcn31_hpo_dp_stream_encoder.h | 0 .../amd/display/dc/hubbub/dcn401/dcn401_hubbub.c | 387 ++--- .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 3 +- .../gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 3 +- .../gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 2 +- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 5 +- .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 65 +- .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 45 +- .../gpu/drm/amd/display/dc/hwss/dcn10/dcn10_init.c | 2 - .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 54 +- .../gpu/drm/amd/display/dc/hwss/dcn20/dcn20_init.c | 1 - .../drm/amd/display/dc/hwss/dcn201/dcn201_init.c | 1 - .../gpu/drm/amd/display/dc/hwss/dcn21/dcn21_init.c | 2 - .../drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 21 +- .../gpu/drm/amd/display/dc/hwss/dcn30/dcn30_init.c | 1 - .../drm/amd/display/dc/hwss/dcn301/dcn301_init.c | 1 - .../drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 4 +- .../gpu/drm/amd/display/dc/hwss/dcn31/dcn31_init.c | 3 +- .../drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 13 +- .../drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.h | 2 +- .../drm/amd/display/dc/hwss/dcn314/dcn314_init.c | 3 +- .../drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 108 +- .../drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.h | 6 +- .../gpu/drm/amd/display/dc/hwss/dcn32/dcn32_init.c | 3 +- .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 93 +- .../gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 3 +- .../drm/amd/display/dc/hwss/dcn351/dcn351_init.c | 4 +- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 235 ++- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 3 + .../drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 10 +- drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 19 +- .../drm/amd/display/dc/hwss/hw_sequencer_private.h | 5 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/audio.h | 2 + drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 4 +- .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 6 +- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 13 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/optc.h | 5 +- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 10 - drivers/gpu/drm/amd/display/dc/inc/resource.h | 7 + .../amd/display/dc/link/accessories/link_dp_cts.c | 13 +- .../drm/amd/display/dc/link/hwss/link_hwss_dio.c | 5 +- .../amd/display/dc/link/hwss/link_hwss_hpo_dp.c | 12 + .../gpu/drm/amd/display/dc/link/link_detection.c | 8 +- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 45 +- drivers/gpu/drm/amd/display/dc/link/link_factory.c | 3 +- .../display/dc/link/protocols/link_dp_capability.c | 69 +- .../dc/link/protocols/link_edp_panel_control.c | 14 +- .../dc/link/protocols/link_edp_panel_control.h | 2 +- drivers/gpu/drm/amd/display/dc/mmhubbub/Makefile | 9 + .../dc/{ =3D> mmhubbub}/dcn20/dcn20_mmhubbub.c | 0 .../dc/{ =3D> mmhubbub}/dcn20/dcn20_mmhubbub.h | 0 drivers/gpu/drm/amd/display/dc/mpc/Makefile | 27 + .../drm/amd/display/dc/{ =3D> mpc}/dcn10/dcn10_mpc.c | 0 .../drm/amd/display/dc/{ =3D> mpc}/dcn10/dcn10_mpc.h | 0 .../drm/amd/display/dc/{ =3D> mpc}/dcn20/dcn20_mpc.c | 0 .../drm/amd/display/dc/{ =3D> mpc}/dcn20/dcn20_mpc.h | 0 .../drm/amd/display/dc/{ =3D> mpc}/dcn30/dcn30_mpc.c | 2 +- .../drm/amd/display/dc/{ =3D> mpc}/dcn30/dcn30_mpc.h | 0 drivers/gpu/drm/amd/display/dc/opp/Makefile | 16 + .../drm/amd/display/dc/{ =3D> opp}/dcn10/dcn10_opp.c | 0 .../drm/amd/display/dc/{ =3D> opp}/dcn10/dcn10_opp.h | 0 .../drm/amd/display/dc/{ =3D> opp}/dcn20/dcn20_opp.c | 0 .../drm/amd/display/dc/{ =3D> opp}/dcn20/dcn20_opp.h | 0 .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c | 10 +- .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h | 7 +- .../gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c | 8 +- .../drm/amd/display/dc/optc/dcn401/dcn401_optc.c | 36 +- .../drm/amd/display/dc/optc/dcn401/dcn401_optc.h | 6 +- drivers/gpu/drm/amd/display/dc/resource/Makefile | 2 - .../display/dc/resource/dce110/dce110_resource.c | 1 + .../display/dc/resource/dce112/dce112_resource.c | 5 +- .../amd/display/dc/resource/dcn20/dcn20_resource.c | 3 +- .../display/dc/resource/dcn201/dcn201_resource.c | 4 +- .../amd/display/dc/resource/dcn21/dcn21_resource.c | 3 +- .../amd/display/dc/resource/dcn31/dcn31_resource.c | 1 + .../amd/display/dc/resource/dcn32/dcn32_resource.c | 11 +- .../amd/display/dc/resource/dcn32/dcn32_resource.h | 5 + .../dc/resource/dcn32/dcn32_resource_helpers.c | 14 +- .../display/dc/resource/dcn321/dcn321_resource.c | 1 + .../amd/display/dc/resource/dcn35/dcn35_resource.c | 2 + .../display/dc/resource/dcn401/dcn401_resource.c | 11 +- .../display/dc/resource/dcn401/dcn401_resource.h | 3 +- drivers/gpu/drm/amd/display/dc/spl/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 1355 +++++++++------ drivers/gpu/drm/amd/display/dc/spl/dc_spl.h | 8 - .../gpu/drm/amd/display/dc/spl/dc_spl_filters.c | 15 + .../gpu/drm/amd/display/dc/spl/dc_spl_filters.h | 15 + .../drm/amd/display/dc/spl/dc_spl_isharp_filters.c | 352 +++- .../drm/amd/display/dc/spl/dc_spl_isharp_filters.h | 35 +- .../amd/display/dc/spl/dc_spl_scl_easf_filters.c | 1726 ++++++++++++++++= ++++ .../amd/display/dc/spl/dc_spl_scl_easf_filters.h | 38 + .../drm/amd/display/dc/spl/dc_spl_scl_filters.c | 92 +- .../drm/amd/display/dc/spl/dc_spl_scl_filters.h | 55 +- drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h | 108 +- .../gpu/drm/amd/display/dc/spl/spl_custom_float.c | 151 ++ .../gpu/drm/amd/display/dc/spl/spl_custom_float.h | 29 + drivers/gpu/drm/amd/display/dc/spl/spl_debug.h | 25 + .../gpu/drm/amd/display/dc/spl/spl_fixpt31_32.c | 497 ++++++ .../gpu/drm/amd/display/dc/spl/spl_fixpt31_32.h | 525 ++++++ drivers/gpu/drm/amd/display/dc/spl/spl_os_types.h | 55 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 3 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 52 +- drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 4 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 4 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 4 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c | 4 + drivers/gpu/drm/amd/display/include/fixed31_32.h | 6 + drivers/gpu/drm/amd/display/include/logger_types.h | 1 + .../drm/amd/display/modules/hdcp/hdcp1_execution.c | 18 +- drivers/gpu/drm/amd/include/amd_shared.h | 75 +- .../drm/amd/include/asic_reg/uvd/uvd_4_0_sh_mask.h | 2 - drivers/gpu/drm/amd/include/atomfirmware.h | 4 +- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 6 + drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 6 +- .../drm/amd/pm/powerplay/hwmgr/processpptables.c | 2 + .../gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 11 +- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 4 +- .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 11 +- .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 898 +++++++++- drivers/gpu/drm/ast/Makefile | 4 +- drivers/gpu/drm/ast/ast_dp.c | 404 +++-- drivers/gpu/drm/ast/ast_dp501.c | 184 ++- drivers/gpu/drm/ast/ast_drv.h | 43 +- drivers/gpu/drm/ast/ast_main.c | 6 +- drivers/gpu/drm/ast/ast_mode.c | 576 ------- drivers/gpu/drm/ast/ast_post.c | 2 +- drivers/gpu/drm/ast/ast_reg.h | 22 +- drivers/gpu/drm/ast/ast_sil164.c | 127 ++ drivers/gpu/drm/ast/ast_vga.c | 127 ++ drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 - drivers/gpu/drm/bridge/analogix/anx7625.c | 22 +- drivers/gpu/drm/bridge/ite-it6505.c | 17 +- drivers/gpu/drm/bridge/lontium-lt8912b.c | 35 +- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 103 +- drivers/gpu/drm/bridge/nwl-dsi.c | 8 +- drivers/gpu/drm/bridge/nwl-dsi.h | 4 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 66 +- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +- drivers/gpu/drm/bridge/tc358767.c | 45 +- drivers/gpu/drm/ci/arm64.config | 1 + drivers/gpu/drm/ci/container.yml | 8 + drivers/gpu/drm/ci/gitlab-ci.yml | 39 +- drivers/gpu/drm/ci/igt_runner.sh | 11 +- drivers/gpu/drm/ci/image-tags.yml | 8 +- drivers/gpu/drm/ci/lava-submit.sh | 1 + drivers/gpu/drm/ci/test.yml | 142 +- drivers/gpu/drm/ci/xfails/amdgpu-stoney-fails.txt | 2 +- drivers/gpu/drm/ci/xfails/amdgpu-stoney-flakes.txt | 14 +- drivers/gpu/drm/ci/xfails/amdgpu-stoney-skips.txt | 5 +- drivers/gpu/drm/ci/xfails/i915-amly-fails.txt | 12 +- drivers/gpu/drm/ci/xfails/i915-amly-flakes.txt | 41 +- drivers/gpu/drm/ci/xfails/i915-amly-skips.txt | 5 +- drivers/gpu/drm/ci/xfails/i915-apl-flakes.txt | 2 +- drivers/gpu/drm/ci/xfails/i915-apl-skips.txt | 4 +- drivers/gpu/drm/ci/xfails/i915-cml-fails.txt | 14 +- drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt | 9 +- drivers/gpu/drm/ci/xfails/i915-cml-skips.txt | 5 +- drivers/gpu/drm/ci/xfails/i915-glk-fails.txt | 24 +- drivers/gpu/drm/ci/xfails/i915-glk-flakes.txt | 8 +- drivers/gpu/drm/ci/xfails/i915-glk-skips.txt | 4 +- drivers/gpu/drm/ci/xfails/i915-kbl-fails.txt | 2 + drivers/gpu/drm/ci/xfails/i915-kbl-flakes.txt | 2 +- drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt | 4 +- drivers/gpu/drm/ci/xfails/i915-tgl-fails.txt | 25 +- drivers/gpu/drm/ci/xfails/i915-tgl-skips.txt | 4 +- drivers/gpu/drm/ci/xfails/i915-whl-fails.txt | 17 +- drivers/gpu/drm/ci/xfails/i915-whl-flakes.txt | 2 +- drivers/gpu/drm/ci/xfails/i915-whl-skips.txt | 5 +- .../gpu/drm/ci/xfails/mediatek-mt8173-fails.txt | 10 +- .../gpu/drm/ci/xfails/mediatek-mt8173-flakes.txt | 32 +- .../gpu/drm/ci/xfails/mediatek-mt8173-skips.txt | 5 +- .../gpu/drm/ci/xfails/mediatek-mt8183-fails.txt | 28 +- .../gpu/drm/ci/xfails/mediatek-mt8183-flakes.txt | 20 + .../gpu/drm/ci/xfails/mediatek-mt8183-skips.txt | 7 +- drivers/gpu/drm/ci/xfails/meson-g12b-fails.txt | 19 +- drivers/gpu/drm/ci/xfails/meson-g12b-skips.txt | 7 +- drivers/gpu/drm/ci/xfails/msm-apq8016-fails.txt | 6 +- drivers/gpu/drm/ci/xfails/msm-apq8016-skips.txt | 3 +- drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt | 1 - drivers/gpu/drm/ci/xfails/msm-apq8096-flakes.txt | 2 +- drivers/gpu/drm/ci/xfails/msm-apq8096-skips.txt | 5 +- .../xfails/msm-sc7180-trogdor-kingoftown-fails.txt | 146 -- .../msm-sc7180-trogdor-kingoftown-flakes.txt | 18 +- .../xfails/msm-sc7180-trogdor-kingoftown-skips.txt | 6 +- .../msm-sc7180-trogdor-lazor-limozeen-fails.txt | 146 -- .../msm-sc7180-trogdor-lazor-limozeen-flakes.txt | 11 +- .../msm-sc7180-trogdor-lazor-limozeen-skips.txt | 3 +- drivers/gpu/drm/ci/xfails/msm-sdm845-fails.txt | 1 - drivers/gpu/drm/ci/xfails/msm-sdm845-flakes.txt | 105 +- drivers/gpu/drm/ci/xfails/msm-sdm845-skips.txt | 5 +- drivers/gpu/drm/ci/xfails/panfrost-g12b-fails.txt | 1 + drivers/gpu/drm/ci/xfails/panfrost-g12b-skips.txt | 23 + .../gpu/drm/ci/xfails/panfrost-mt8183-fails.txt | 1 + .../gpu/drm/ci/xfails/panfrost-mt8183-skips.txt | 23 + .../gpu/drm/ci/xfails/panfrost-rk3288-fails.txt | 1 + .../gpu/drm/ci/xfails/panfrost-rk3288-skips.txt | 26 + .../gpu/drm/ci/xfails/panfrost-rk3399-fails.txt | 1 + .../gpu/drm/ci/xfails/panfrost-rk3399-flakes.txt | 6 + .../gpu/drm/ci/xfails/panfrost-rk3399-skips.txt | 26 + drivers/gpu/drm/ci/xfails/requirements.txt | 2 +- .../gpu/drm/ci/xfails/rockchip-rk3288-fails.txt | 22 +- .../gpu/drm/ci/xfails/rockchip-rk3288-flakes.txt | 6 + .../gpu/drm/ci/xfails/rockchip-rk3288-skips.txt | 57 +- .../gpu/drm/ci/xfails/rockchip-rk3399-fails.txt | 90 +- .../gpu/drm/ci/xfails/rockchip-rk3399-flakes.txt | 50 +- .../gpu/drm/ci/xfails/rockchip-rk3399-skips.txt | 10 +- .../gpu/drm/ci/xfails/virtio_gpu-none-fails.txt | 65 +- .../gpu/drm/ci/xfails/virtio_gpu-none-skips.txt | 5 +- drivers/gpu/drm/ci/xfails/vkms-none-fails.txt | 5 - drivers/gpu/drm/ci/xfails/vkms-none-flakes.txt | 21 + drivers/gpu/drm/ci/xfails/vkms-none-skips.txt | 106 +- drivers/gpu/drm/display/drm_dp_helper.c | 66 +- drivers/gpu/drm/display/drm_dp_mst_topology.c | 128 +- drivers/gpu/drm/drm_atomic.c | 6 - drivers/gpu/drm/drm_atomic_helper.c | 2 - drivers/gpu/drm/drm_bridge.c | 9 +- drivers/gpu/drm/drm_connector.c | 83 +- drivers/gpu/drm/drm_crtc_internal.h | 15 + drivers/gpu/drm/drm_displayid.c | 3 - drivers/gpu/drm/drm_drv.c | 100 +- drivers/gpu/drm/drm_edid.c | 24 +- drivers/gpu/drm/drm_fb_helper.c | 39 +- drivers/gpu/drm/drm_file.c | 41 +- drivers/gpu/drm/drm_gem.c | 7 +- drivers/gpu/drm/drm_internal.h | 5 - drivers/gpu/drm/drm_mipi_dsi.c | 225 +++ drivers/gpu/drm/drm_mode_config.c | 2 + drivers/gpu/drm/drm_modes.c | 1 - drivers/gpu/drm/drm_panel.c | 18 + drivers/gpu/drm/drm_panic.c | 406 ++++- drivers/gpu/drm/drm_panic_qr.rs | 1003 ++++++++++++ drivers/gpu/drm/drm_prime.c | 84 +- drivers/gpu/drm/drm_print.c | 13 +- drivers/gpu/drm/drm_probe_helper.c | 12 +- drivers/gpu/drm/drm_rect.c | 1 - drivers/gpu/drm/drm_vblank.c | 83 +- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 - drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 +- drivers/gpu/drm/gma500/intel_bios.c | 22 +- drivers/gpu/drm/gma500/intel_bios.h | 4 +- drivers/gpu/drm/gma500/intel_gmbus.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 26 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - drivers/gpu/drm/i915/display/dvo_ch7017.c | 14 +- drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 18 +- drivers/gpu/drm/i915/display/dvo_ivch.c | 16 +- drivers/gpu/drm/i915/display/dvo_ns2501.c | 18 +- drivers/gpu/drm/i915/display/dvo_sil164.c | 18 +- drivers/gpu/drm/i915/display/dvo_tfp410.c | 18 +- drivers/gpu/drm/i915/display/g4x_dp.c | 155 +- drivers/gpu/drm/i915/display/g4x_hdmi.c | 3 +- drivers/gpu/drm/i915/display/i9xx_wm.c | 2 +- drivers/gpu/drm/i915/display/icl_dsi.c | 12 +- drivers/gpu/drm/i915/display/intel_acpi.c | 17 +- drivers/gpu/drm/i915/display/intel_acpi.h | 18 +- drivers/gpu/drm/i915/display/intel_alpm.c | 56 +- drivers/gpu/drm/i915/display/intel_atomic.c | 6 +- drivers/gpu/drm/i915/display/intel_audio.c | 39 +- drivers/gpu/drm/i915/display/intel_backlight.c | 22 +- drivers/gpu/drm/i915/display/intel_bios.c | 883 +++++----- drivers/gpu/drm/i915/display/intel_bios.h | 28 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 5 +- drivers/gpu/drm/i915/display/intel_color.c | 56 +- drivers/gpu/drm/i915/display/intel_combo_phy.c | 8 +- .../gpu/drm/i915/display/intel_crtc_state_dump.c | 3 + drivers/gpu/drm/i915/display/intel_ddi.c | 24 +- drivers/gpu/drm/i915/display/intel_ddi.h | 3 +- drivers/gpu/drm/i915/display/intel_display.c | 53 +- drivers/gpu/drm/i915/display/intel_display.h | 3 + drivers/gpu/drm/i915/display/intel_display_core.h | 2 +- .../gpu/drm/i915/display/intel_display_debugfs.c | 19 +- .../i915/display/intel_display_debugfs_params.c | 8 +- .../i915/display/intel_display_debugfs_params.h | 4 +- .../gpu/drm/i915/display/intel_display_device.c | 242 ++- .../gpu/drm/i915/display/intel_display_device.h | 21 +- .../gpu/drm/i915/display/intel_display_driver.c | 36 +- drivers/gpu/drm/i915/display/intel_display_irq.c | 66 +- .../gpu/drm/i915/display/intel_display_params.c | 6 +- .../gpu/drm/i915/display/intel_display_params.h | 4 +- drivers/gpu/drm/i915/display/intel_display_power.c | 28 +- drivers/gpu/drm/i915/display/intel_display_power.h | 5 - .../drm/i915/display/intel_display_power_well.c | 19 +- drivers/gpu/drm/i915/display/intel_display_reset.c | 7 +- drivers/gpu/drm/i915/display/intel_display_types.h | 62 +- drivers/gpu/drm/i915/display/intel_display_wa.h | 8 + drivers/gpu/drm/i915/display/intel_dmc.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 290 ++-- drivers/gpu/drm/i915/display/intel_dp.h | 3 +- drivers/gpu/drm/i915/display/intel_dp_aux.c | 114 +- drivers/gpu/drm/i915/display/intel_dp_aux.h | 4 +- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 70 +- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 13 +- .../gpu/drm/i915/display/intel_dp_link_training.c | 237 ++- .../gpu/drm/i915/display/intel_dp_link_training.h | 6 + drivers/gpu/drm/i915/display/intel_dp_mst.c | 100 +- drivers/gpu/drm/i915/display/intel_dp_mst.h | 1 + drivers/gpu/drm/i915/display/intel_dp_tunnel.c | 77 +- drivers/gpu/drm/i915/display/intel_dp_tunnel.h | 11 +- drivers/gpu/drm/i915/display/intel_dpll.c | 9 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 3 +- drivers/gpu/drm/i915/display/intel_dpt.c | 4 + drivers/gpu/drm/i915/display/intel_dpt.h | 3 + drivers/gpu/drm/i915/display/intel_dsb.c | 325 +++- drivers/gpu/drm/i915/display/intel_dsb.h | 16 + drivers/gpu/drm/i915/display/intel_dsi.h | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 20 +- drivers/gpu/drm/i915/display/intel_dvo.c | 14 +- drivers/gpu/drm/i915/display/intel_dvo_dev.h | 2 +- drivers/gpu/drm/i915/display/intel_fb.c | 36 + drivers/gpu/drm/i915/display/intel_fb.h | 2 + drivers/gpu/drm/i915/display/intel_fbc.c | 555 ++++--- drivers/gpu/drm/i915/display/intel_fbc.h | 13 +- drivers/gpu/drm/i915/display/intel_fdi.c | 6 +- drivers/gpu/drm/i915/display/intel_fifo_underrun.c | 2 +- drivers/gpu/drm/i915/display/intel_frontbuffer.c | 7 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 4 +- drivers/gpu/drm/i915/display/intel_hdcp.c | 23 +- .../gpu/drm/i915/display/intel_hdcp_gsc_message.c | 67 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 500 +++--- drivers/gpu/drm/i915/display/intel_hdmi.h | 1 - drivers/gpu/drm/i915/display/intel_hotplug_irq.c | 6 +- drivers/gpu/drm/i915/display/intel_hti.c | 20 +- drivers/gpu/drm/i915/display/intel_hti.h | 8 +- drivers/gpu/drm/i915/display/intel_link_bw.c | 29 +- drivers/gpu/drm/i915/display/intel_link_bw.h | 2 - drivers/gpu/drm/i915/display/intel_load_detect.c | 27 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 115 +- drivers/gpu/drm/i915/display/intel_lvds.c | 5 +- drivers/gpu/drm/i915/display/intel_modeset_setup.c | 2 +- drivers/gpu/drm/i915/display/intel_opregion.c | 322 ++-- drivers/gpu/drm/i915/display/intel_opregion.h | 62 +- drivers/gpu/drm/i915/display/intel_pch_display.c | 3 +- drivers/gpu/drm/i915/display/intel_pmdemand.c | 2 +- drivers/gpu/drm/i915/display/intel_pps.c | 567 ++++--- drivers/gpu/drm/i915/display/intel_pps.h | 10 +- drivers/gpu/drm/i915/display/intel_psr.c | 852 +++++----- drivers/gpu/drm/i915/display/intel_psr.h | 8 +- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 33 +- drivers/gpu/drm/i915/display/intel_sprite.c | 209 +-- drivers/gpu/drm/i915/display/intel_tc.c | 3 + drivers/gpu/drm/i915/display/intel_tv.c | 204 +-- drivers/gpu/drm/i915/display/intel_tv.h | 6 +- drivers/gpu/drm/i915/display/intel_vblank.c | 125 +- drivers/gpu/drm/i915/display/intel_vblank.h | 2 +- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 41 +- drivers/gpu/drm/i915/display/intel_vdsc.c | 51 +- drivers/gpu/drm/i915/display/intel_vdsc.h | 4 + drivers/gpu/drm/i915/display/intel_vrr.c | 130 +- drivers/gpu/drm/i915/display/skl_universal_plane.c | 16 +- drivers/gpu/drm/i915/display/skl_watermark.c | 24 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 5 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 30 +- drivers/gpu/drm/i915/gem/i915_gem_object.h | 1 - drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 +- .../gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + drivers/gpu/drm/i915/gt/intel_ggtt.c | 1 - drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 1 - drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/gt/intel_gt.h | 7 +- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 2 + drivers/gpu/drm/i915/gt/intel_gt_types.h | 2 + drivers/gpu/drm/i915/gt/intel_reset.c | 12 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 25 +- drivers/gpu/drm/i915/gt/selftest_migrate.c | 2 +- drivers/gpu/drm/i915/gt/sysfs_engines.c | 5 +- drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 18 +- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- drivers/gpu/drm/i915/gvt/edid.c | 28 +- drivers/gpu/drm/i915/gvt/edid.h | 4 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 18 +- drivers/gpu/drm/i915/gvt/opregion.c | 2 +- drivers/gpu/drm/i915/gvt/trace.h | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 3 +- drivers/gpu/drm/i915/i915_driver.c | 44 +- drivers/gpu/drm/i915/i915_drv.h | 21 +- drivers/gpu/drm/i915/i915_gem.c | 2 - drivers/gpu/drm/i915/i915_gem_gtt.c | 1 - drivers/gpu/drm/i915/i915_gpu_error.c | 3 +- drivers/gpu/drm/i915/i915_hwmon.c | 88 + drivers/gpu/drm/i915/i915_irq.c | 1 - drivers/gpu/drm/i915/i915_mm.c | 12 +- drivers/gpu/drm/i915/i915_mm.h | 3 +- drivers/gpu/drm/i915/i915_module.c | 9 +- drivers/gpu/drm/i915/i915_params.c | 3 +- drivers/gpu/drm/i915/i915_pci.c | 7 +- drivers/gpu/drm/i915/i915_reg.h | 6 + drivers/gpu/drm/i915/i915_sysfs.c | 4 +- drivers/gpu/drm/i915/i915_utils.c | 51 +- drivers/gpu/drm/i915/i915_utils.h | 16 +- drivers/gpu/drm/i915/i915_vma.h | 1 - drivers/gpu/drm/i915/intel_device_info.c | 7 - drivers/gpu/drm/i915/intel_device_info.h | 2 - drivers/gpu/drm/i915/intel_step.c | 84 +- drivers/gpu/drm/i915/intel_step.h | 3 - drivers/gpu/drm/i915/intel_uncore.c | 7 +- .../gpu/drm/i915/selftests/intel_memory_region.c | 2 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- drivers/gpu/drm/imagination/pvr_device.h | 2 +- drivers/gpu/drm/imagination/pvr_queue.c | 4 +- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 14 +- drivers/gpu/drm/lima/lima_sched.c | 2 +- drivers/gpu/drm/loongson/lsdc_ttm.c | 8 +- drivers/gpu/drm/mediatek/mtk_crtc.c | 82 +- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 36 +- drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 5 +- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 13 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 106 +- drivers/gpu/drm/mediatek/mtk_ethdr.c | 13 +- drivers/gpu/drm/mediatek/mtk_plane.c | 29 +- drivers/gpu/drm/mediatek/mtk_plane.h | 3 +- drivers/gpu/drm/mgag200/Makefile | 1 + drivers/gpu/drm/mgag200/mgag200_bmc.c | 111 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 40 + drivers/gpu/drm/mgag200/mgag200_drv.h | 58 +- drivers/gpu/drm/mgag200/mgag200_g200.c | 5 + drivers/gpu/drm/mgag200/mgag200_g200eh.c | 11 +- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 11 +- drivers/gpu/drm/mgag200/mgag200_g200er.c | 22 +- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 22 +- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 13 +- drivers/gpu/drm/mgag200/mgag200_g200se.c | 22 +- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 13 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 183 ++- drivers/gpu/drm/mgag200/mgag200_reg.h | 7 + drivers/gpu/drm/mgag200/mgag200_vga_bmc.c | 156 ++ drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/adreno/a3xx_catalog.c | 11 + drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 14 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 16 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 + drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 30 +- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 141 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 21 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 87 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 2 + drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 46 +- .../gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h | 2 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 15 +- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 51 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 18 + .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 18 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 18 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 18 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 41 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h | 18 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h | 7 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 12 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/gpu/drm/msm/dp/dp_display.c | 10 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 12 +- drivers/gpu/drm/msm/hdmi/hdmi.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi.h | 8 + drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 5 + drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 779 +++++++++ drivers/gpu/drm/msm/msm_drv.h | 4 - drivers/gpu/drm/msm/msm_gpu.c | 1 - drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 1118 ++++++++++++- drivers/gpu/drm/msm/registers/display/hdmi.xml | 89 + drivers/gpu/drm/mxsfb/lcdif_kms.c | 5 +- drivers/gpu/drm/nouveau/Kbuild | 1 - drivers/gpu/drm/nouveau/dispnv04/crtc.c | 57 +- drivers/gpu/drm/nouveau/dispnv04/dac.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 7 +- drivers/gpu/drm/nouveau/dispnv04/disp.h | 2 +- drivers/gpu/drm/nouveau/dispnv04/hw.c | 9 +- drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 4 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 21 +- drivers/gpu/drm/nouveau/dispnv50/base827c.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/base907c.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/core507d.c | 8 +- drivers/gpu/drm/nouveau/dispnv50/corec37d.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/corec57d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/crc907d.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/crcc37d.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/crcc57d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/dac507d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/dac907d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 79 +- drivers/gpu/drm/nouveau/dispnv50/disp.h | 14 +- drivers/gpu/drm/nouveau/dispnv50/head507d.c | 24 +- drivers/gpu/drm/nouveau/dispnv50/head827d.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/head907d.c | 26 +- drivers/gpu/drm/nouveau/dispnv50/head917d.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 18 +- drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 12 +- drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/ovly827e.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/ovly907e.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/pior507d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/sor507d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/sor907d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/sorc37d.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 7 +- drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 24 +- drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/wndwc67e.c | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl0080.h | 7 - drivers/gpu/drm/nouveau/include/nvif/class.h | 3 - drivers/gpu/drm/nouveau/include/nvif/client.h | 11 +- drivers/gpu/drm/nouveau/include/nvif/device.h | 37 +- drivers/gpu/drm/nouveau/include/nvif/driver.h | 5 - drivers/gpu/drm/nouveau/include/nvif/if0000.h | 10 - drivers/gpu/drm/nouveau/include/nvif/if0002.h | 39 - drivers/gpu/drm/nouveau/include/nvif/if0003.h | 34 - drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 27 - drivers/gpu/drm/nouveau/include/nvif/object.h | 24 +- drivers/gpu/drm/nouveau/include/nvif/os.h | 19 + drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/core/layout.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 14 - drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h | 2 - drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 19 - drivers/gpu/drm/nouveau/include/nvkm/core/pci.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h | 29 - drivers/gpu/drm/nouveau/nouveau_abi16.c | 330 +++- drivers/gpu/drm/nouveau/nouveau_abi16.h | 6 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 4 +- drivers/gpu/drm/nouveau/nouveau_bios.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.c | 10 +- drivers/gpu/drm/nouveau/nouveau_bo.h | 50 +- drivers/gpu/drm/nouveau/nouveau_bo0039.c | 6 +- drivers/gpu/drm/nouveau/nouveau_bo5039.c | 6 +- drivers/gpu/drm/nouveau/nouveau_bo74c1.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo85b5.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo9039.c | 4 +- drivers/gpu/drm/nouveau/nouveau_bo90b5.c | 2 +- drivers/gpu/drm/nouveau/nouveau_boa0b5.c | 4 +- drivers/gpu/drm/nouveau/nouveau_chan.c | 98 +- drivers/gpu/drm/nouveau/nouveau_chan.h | 8 +- drivers/gpu/drm/nouveau/nouveau_display.c | 5 +- drivers/gpu/drm/nouveau/nouveau_display.h | 2 +- drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dmem.c | 8 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 402 ++--- drivers/gpu/drm/nouveau/nouveau_drv.h | 61 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 17 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 21 +- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 46 +- drivers/gpu/drm/nouveau/nouveau_led.c | 2 +- drivers/gpu/drm/nouveau/nouveau_mem.c | 38 +- drivers/gpu/drm/nouveau/nouveau_mem.h | 4 +- drivers/gpu/drm/nouveau/nouveau_nvif.c | 2 - drivers/gpu/drm/nouveau/nouveau_platform.c | 12 +- drivers/gpu/drm/nouveau/nouveau_sched.c | 6 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 12 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 194 --- drivers/gpu/drm/nouveau/nouveau_usif.h | 10 - drivers/gpu/drm/nouveau/nouveau_vga.c | 22 +- drivers/gpu/drm/nouveau/nouveau_vga.h | 1 - drivers/gpu/drm/nouveau/nv04_fence.c | 2 +- drivers/gpu/drm/nouveau/nv10_fence.c | 4 +- drivers/gpu/drm/nouveau/nv17_fence.c | 12 +- drivers/gpu/drm/nouveau/nv50_fence.c | 4 +- drivers/gpu/drm/nouveau/nv84_fence.c | 16 +- drivers/gpu/drm/nouveau/nvc0_fence.c | 4 +- drivers/gpu/drm/nouveau/nvif/client.c | 32 +- drivers/gpu/drm/nouveau/nvif/device.c | 15 +- drivers/gpu/drm/nouveau/nvif/driver.c | 32 +- drivers/gpu/drm/nouveau/nvif/object.c | 40 - drivers/gpu/drm/nouveau/nvkm/core/client.c | 64 +- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 91 +- drivers/gpu/drm/nouveau/nvkm/core/object.c | 50 - drivers/gpu/drm/nouveau/nvkm/core/oproxy.c | 42 - drivers/gpu/drm/nouveau/nvkm/core/uevent.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 1 - drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 481 +++--- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 93 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c | 24 - drivers/gpu/drm/nouveau/nvkm/engine/pm/Kbuild | 11 - drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 867 ---------- drivers/gpu/drm/nouveau/nvkm/engine/pm/g84.c | 165 -- drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c | 243 --- drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h | 20 - drivers/gpu/drm/nouveau/nvkm/engine/pm/gf108.c | 66 - drivers/gpu/drm/nouveau/nvkm/engine/pm/gf117.c | 80 - drivers/gpu/drm/nouveau/nvkm/engine/pm/gk104.c | 184 --- drivers/gpu/drm/nouveau/nvkm/engine/pm/gt200.c | 157 -- drivers/gpu/drm/nouveau/nvkm/engine/pm/gt215.c | 138 -- drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c | 123 -- drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h | 15 - drivers/gpu/drm/nouveau/nvkm/engine/pm/nv50.c | 175 -- drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 105 -- drivers/gpu/drm/omapdrm/dss/base.c | 3 +- drivers/gpu/drm/omapdrm/omap_drv.c | 5 + drivers/gpu/drm/panel/Kconfig | 12 +- drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 2 + .../gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 317 ++-- drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 241 +++ drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 190 +-- drivers/gpu/drm/panel/panel-edp.c | 40 +- drivers/gpu/drm/panel/panel-himax-hx8394.c | 153 +- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 14 +- drivers/gpu/drm/panel/panel-ilitek-ili9806e.c | 165 ++ drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c | 372 ++++- drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 147 +- drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c | 79 +- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 367 ++--- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 2 +- drivers/gpu/drm/panel/panel-novatek-nt35950.c | 211 +-- drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 69 +- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 4 +- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 10 +- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 10 +- drivers/gpu/drm/panel/panel-simple.c | 97 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 1074 +++++++----- drivers/gpu/drm/panel/panel-sony-acx565akm.c | 2 +- .../gpu/drm/panel/panel-sony-tulip-truly-nt35521.c | 29 +- .../gpu/drm/panel/panel-startek-kd070fhfid015.c | 115 +- drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 204 ++- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/panthor/panthor_mmu.c | 2 +- drivers/gpu/drm/panthor/panthor_sched.c | 2 +- drivers/gpu/drm/radeon/atombios_encoders.c | 4 +- drivers/gpu/drm/radeon/cik.c | 14 +- drivers/gpu/drm/radeon/dce6_afmt.c | 2 +- drivers/gpu/drm/radeon/evergreen.c | 12 +- drivers/gpu/drm/radeon/evergreen_cs.c | 62 +- drivers/gpu/drm/radeon/ni.c | 2 +- drivers/gpu/drm/radeon/r100.c | 94 +- drivers/gpu/drm/radeon/r300.c | 6 +- drivers/gpu/drm/radeon/r420.c | 6 +- drivers/gpu/drm/radeon/r520.c | 2 +- drivers/gpu/drm/radeon/r600.c | 12 +- drivers/gpu/drm/radeon/r600_cs.c | 2 +- drivers/gpu/drm/radeon/r600_dpm.c | 4 +- drivers/gpu/drm/radeon/r600_hdmi.c | 2 +- drivers/gpu/drm/radeon/radeon.h | 7 +- drivers/gpu/drm/radeon/radeon_acpi.c | 10 +- drivers/gpu/drm/radeon/radeon_agp.c | 2 +- drivers/gpu/drm/radeon/radeon_atombios.c | 38 +- drivers/gpu/drm/radeon/radeon_audio.c | 4 +- drivers/gpu/drm/radeon/radeon_combios.c | 38 +- drivers/gpu/drm/radeon/radeon_connectors.c | 7 +- drivers/gpu/drm/radeon/radeon_device.c | 13 +- drivers/gpu/drm/radeon/radeon_display.c | 76 +- drivers/gpu/drm/radeon/radeon_drv.c | 27 +- drivers/gpu/drm/radeon/radeon_fbdev.c | 26 +- drivers/gpu/drm/radeon/radeon_fence.c | 8 +- drivers/gpu/drm/radeon/radeon_gem.c | 4 +- drivers/gpu/drm/radeon/radeon_i2c.c | 2 +- drivers/gpu/drm/radeon/radeon_ib.c | 2 +- drivers/gpu/drm/radeon/radeon_irq_kms.c | 12 +- drivers/gpu/drm/radeon/radeon_kms.c | 8 +- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 2 +- drivers/gpu/drm/radeon/radeon_mode.h | 4 +- drivers/gpu/drm/radeon/radeon_object.c | 9 +- drivers/gpu/drm/radeon/radeon_pm.c | 20 +- drivers/gpu/drm/radeon/radeon_ring.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 6 +- drivers/gpu/drm/radeon/rs400.c | 6 +- drivers/gpu/drm/radeon/rs600.c | 14 +- drivers/gpu/drm/radeon/rs690.c | 2 +- drivers/gpu/drm/radeon/rv515.c | 4 +- drivers/gpu/drm/radeon/rv770.c | 2 +- drivers/gpu/drm/radeon/si.c | 4 +- drivers/gpu/drm/renesas/rcar-du/Kconfig | 8 - drivers/gpu/drm/renesas/rcar-du/Makefile | 2 - drivers/gpu/drm/renesas/rz-du/Kconfig | 8 + drivers/gpu/drm/renesas/rz-du/Makefile | 2 + drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c | 8 +- drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c | 11 + drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c | 3 +- .../renesas/{rcar-du =3D> rz-du}/rzg2l_mipi_dsi.c | 0 .../{rcar-du =3D> rz-du}/rzg2l_mipi_dsi_regs.h | 0 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 32 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 107 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 3 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 1 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 + drivers/gpu/drm/scheduler/sched_main.c | 27 +- drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 25 +- drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/sti/sti_tvout.c | 1 - drivers/gpu/drm/sti/sti_vtg.c | 1 - drivers/gpu/drm/stm/Kconfig | 1 + drivers/gpu/drm/stm/drv.c | 7 +- drivers/gpu/drm/stm/ltdc.c | 107 +- drivers/gpu/drm/stm/lvds.c | 1 - drivers/gpu/drm/tegra/drm.c | 6 + drivers/gpu/drm/tegra/drm.h | 2 +- drivers/gpu/drm/tegra/gr3d.c | 46 +- drivers/gpu/drm/tegra/hub.c | 7 +- drivers/gpu/drm/tegra/output.c | 29 +- drivers/gpu/drm/tests/drm_gem_shmem_test.c | 27 +- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- drivers/gpu/drm/tiny/gm12u320.c | 13 +- drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 6 +- drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 462 +++--- drivers/gpu/drm/ttm/ttm_bo_util.c | 151 ++ drivers/gpu/drm/ttm/ttm_device.c | 29 +- drivers/gpu/drm/ttm/ttm_pool.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 255 ++- drivers/gpu/drm/udl/udl_edid.c | 2 +- drivers/gpu/drm/v3d/v3d_bo.c | 12 + drivers/gpu/drm/v3d/v3d_drv.c | 11 +- drivers/gpu/drm/v3d/v3d_drv.h | 12 +- drivers/gpu/drm/v3d/v3d_perfmon.c | 40 +- drivers/gpu/drm/v3d/v3d_performance_counters.h | 16 +- drivers/gpu/drm/v3d/v3d_sched.c | 79 +- drivers/gpu/drm/v3d/v3d_submit.c | 263 ++- drivers/gpu/drm/vc4/vc4_bo.c | 14 +- drivers/gpu/drm/vc4/vc4_dpi.c | 14 +- drivers/gpu/drm/vc4/vc4_dsi.c | 32 +- drivers/gpu/drm/vc4/vc4_gem.c | 11 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 44 +- drivers/gpu/drm/vc4/vc4_hvs.c | 4 +- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 24 +- drivers/gpu/drm/vc4/vc4_validate.c | 8 +- drivers/gpu/drm/vc4/vc4_vec.c | 10 +- drivers/gpu/drm/vkms/vkms_drv.c | 6 +- drivers/gpu/drm/vkms/vkms_drv.h | 1 - drivers/gpu/drm/vkms/vkms_formats.c | 14 +- drivers/gpu/drm/xe/Makefile | 44 +- drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 + drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 19 +- drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h | 7 +- .../gpu/drm/xe/compat-i915-headers/intel_step.h | 10 +- drivers/gpu/drm/xe/display/intel_fb_bo.c | 9 + drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 7 +- drivers/gpu/drm/xe/display/xe_display.c | 108 +- drivers/gpu/drm/xe/display/xe_display.h | 4 + drivers/gpu/drm/xe/display/xe_display_wa.c | 16 + drivers/gpu/drm/xe/display/xe_dsb_buffer.c | 1 - drivers/gpu/drm/xe/display/xe_fb_pin.c | 51 +- drivers/gpu/drm/xe/display/xe_hdcp_gsc.c | 9 +- drivers/gpu/drm/xe/display/xe_plane_initial.c | 6 + drivers/gpu/drm/xe/regs/xe_engine_regs.h | 1 + drivers/gpu/drm/xe/regs/xe_gsc_regs.h | 4 + drivers/gpu/drm/xe/regs/xe_gt_regs.h | 17 +- drivers/gpu/drm/xe/regs/xe_regs.h | 12 +- drivers/gpu/drm/xe/regs/xe_sriov_regs.h | 23 - drivers/gpu/drm/xe/tests/Makefile | 6 +- drivers/gpu/drm/xe/tests/xe_bo.c | 53 +- drivers/gpu/drm/xe/tests/xe_bo_test.c | 21 - drivers/gpu/drm/xe/tests/xe_bo_test.h | 14 - drivers/gpu/drm/xe/tests/xe_dma_buf.c | 30 +- drivers/gpu/drm/xe/tests/xe_dma_buf_test.c | 20 - drivers/gpu/drm/xe/tests/xe_dma_buf_test.h | 13 - drivers/gpu/drm/xe/tests/xe_kunit_helpers.c | 39 + drivers/gpu/drm/xe/tests/xe_kunit_helpers.h | 2 + drivers/gpu/drm/xe/tests/xe_live_test_mod.c | 11 + drivers/gpu/drm/xe/tests/xe_migrate.c | 436 ++++- drivers/gpu/drm/xe/tests/xe_migrate_test.c | 20 - drivers/gpu/drm/xe/tests/xe_migrate_test.h | 13 - drivers/gpu/drm/xe/tests/xe_mocs.c | 44 +- drivers/gpu/drm/xe/tests/xe_mocs_test.c | 21 - drivers/gpu/drm/xe/tests/xe_mocs_test.h | 14 - drivers/gpu/drm/xe/tests/xe_pci.c | 82 +- drivers/gpu/drm/xe/tests/xe_pci_test.c | 4 +- drivers/gpu/drm/xe/tests/xe_pci_test.h | 3 +- drivers/gpu/drm/xe/tests/xe_rtp_test.c | 219 ++- drivers/gpu/drm/xe/tests/xe_test.h | 10 +- drivers/gpu/drm/xe/tests/xe_wa_test.c | 1 + drivers/gpu/drm/xe/xe_assert.h | 2 +- drivers/gpu/drm/xe/xe_bo.c | 53 +- drivers/gpu/drm/xe/xe_bo.h | 15 +- drivers/gpu/drm/xe/xe_bo_types.h | 7 +- drivers/gpu/drm/xe/xe_debugfs.c | 3 +- drivers/gpu/drm/xe/xe_debugfs.h | 4 + drivers/gpu/drm/xe/xe_devcoredump.c | 121 +- drivers/gpu/drm/xe/xe_devcoredump_types.h | 8 + drivers/gpu/drm/xe/xe_device.c | 27 +- drivers/gpu/drm/xe/xe_device.h | 26 +- drivers/gpu/drm/xe/xe_device_types.h | 50 +- drivers/gpu/drm/xe/xe_drm_client.c | 2 +- drivers/gpu/drm/xe/xe_exec.c | 22 +- drivers/gpu/drm/xe/xe_exec_queue.c | 240 +-- drivers/gpu/drm/xe/xe_exec_queue.h | 10 +- drivers/gpu/drm/xe/xe_exec_queue_types.h | 8 +- drivers/gpu/drm/xe/xe_execlist.c | 26 +- drivers/gpu/drm/xe/xe_execlist_types.h | 2 + drivers/gpu/drm/xe/xe_gen_wa_oob.c | 16 +- drivers/gpu/drm/xe/xe_ggtt.c | 494 ++++-- drivers/gpu/drm/xe/xe_ggtt.h | 24 +- drivers/gpu/drm/xe/xe_ggtt_types.h | 54 +- drivers/gpu/drm/xe/xe_gpu_scheduler.c | 23 +- drivers/gpu/drm/xe/xe_gpu_scheduler.h | 12 + drivers/gpu/drm/xe/xe_gsc.c | 61 +- drivers/gpu/drm/xe/xe_gsc.h | 3 + drivers/gpu/drm/xe/xe_gsc_debugfs.c | 71 + drivers/gpu/drm/xe/xe_gsc_debugfs.h | 14 + drivers/gpu/drm/xe/xe_gsc_proxy.c | 45 +- drivers/gpu/drm/xe/xe_gt.c | 13 +- drivers/gpu/drm/xe/xe_gt_debugfs.c | 13 + drivers/gpu/drm/xe/xe_gt_mcr.c | 40 +- drivers/gpu/drm/xe/xe_gt_pagefault.c | 55 +- drivers/gpu/drm/xe/xe_gt_sriov_pf.c | 8 +- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 216 ++- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 1 + drivers/gpu/drm/xe/xe_gt_sriov_pf_config_types.h | 5 +- drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c | 1258 +++++++++++++- drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h | 3 + drivers/gpu/drm/xe/xe_gt_sriov_pf_control_types.h | 107 ++ drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h | 6 + drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 70 +- drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 1 + drivers/gpu/drm/xe/xe_gt_stats.c | 49 + drivers/gpu/drm/xe/xe_gt_stats.h | 29 + drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 6 +- drivers/gpu/drm/xe/xe_gt_topology.c | 27 +- drivers/gpu/drm/xe/xe_gt_types.h | 43 +- drivers/gpu/drm/xe/xe_guc.c | 4 +- drivers/gpu/drm/xe/xe_guc.h | 10 + drivers/gpu/drm/xe/xe_guc_ads.c | 6 + drivers/gpu/drm/xe/xe_guc_ct.c | 13 +- drivers/gpu/drm/xe/xe_guc_hwconfig.c | 97 ++ drivers/gpu/drm/xe/xe_guc_hwconfig.h | 3 + drivers/gpu/drm/xe/xe_guc_id_mgr.c | 4 +- drivers/gpu/drm/xe/xe_guc_pc.c | 2 +- drivers/gpu/drm/xe/xe_guc_submit.c | 100 +- drivers/gpu/drm/xe/xe_heci_gsc.c | 28 +- drivers/gpu/drm/xe/xe_heci_gsc.h | 10 +- drivers/gpu/drm/xe/xe_huc.c | 19 +- drivers/gpu/drm/xe/xe_hw_engine.c | 164 +- drivers/gpu/drm/xe/xe_hw_engine.h | 10 + drivers/gpu/drm/xe/xe_hw_engine_group.c | 372 +++++ drivers/gpu/drm/xe/xe_hw_engine_group.h | 29 + drivers/gpu/drm/xe/xe_hw_engine_group_types.h | 51 + drivers/gpu/drm/xe/xe_hw_engine_types.h | 4 +- drivers/gpu/drm/xe/xe_hwmon.c | 95 +- drivers/gpu/drm/xe/xe_irq.c | 2 + drivers/gpu/drm/xe/xe_lmtt.c | 4 +- drivers/gpu/drm/xe/xe_lrc.c | 37 +- drivers/gpu/drm/xe/xe_migrate.c | 553 ++++--- drivers/gpu/drm/xe/xe_migrate.h | 43 +- drivers/gpu/drm/xe/xe_mmio.c | 253 +-- drivers/gpu/drm/xe/xe_mmio.h | 1 - drivers/gpu/drm/xe/xe_module.c | 54 +- drivers/gpu/drm/xe/xe_module.h | 2 +- drivers/gpu/drm/xe/xe_oa.c | 7 +- drivers/gpu/drm/xe/xe_oa_types.h | 2 +- drivers/gpu/drm/xe/xe_observation.c | 2 +- drivers/gpu/drm/xe/xe_pat.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 24 +- drivers/gpu/drm/xe/xe_pm.c | 130 +- drivers/gpu/drm/xe/xe_pm.h | 2 + drivers/gpu/drm/xe/xe_preempt_fence.c | 12 +- drivers/gpu/drm/xe/xe_pt.c | 1391 +++++++++++----- drivers/gpu/drm/xe/xe_pt.h | 14 +- drivers/gpu/drm/xe/xe_pt_types.h | 48 + drivers/gpu/drm/xe/xe_query.c | 6 +- drivers/gpu/drm/xe/xe_res_cursor.h | 1 - drivers/gpu/drm/xe/xe_rtp.c | 44 +- drivers/gpu/drm/xe/xe_rtp.h | 4 +- drivers/gpu/drm/xe/xe_rtp_helpers.h | 6 + drivers/gpu/drm/xe/xe_sa.c | 20 +- drivers/gpu/drm/xe/xe_sa_types.h | 1 + drivers/gpu/drm/xe/xe_sched_job.c | 5 +- drivers/gpu/drm/xe/xe_sriov.c | 2 +- drivers/gpu/drm/xe/xe_step.c | 57 +- drivers/gpu/drm/xe/xe_step_types.h | 30 +- drivers/gpu/drm/xe/xe_sync.c | 31 +- drivers/gpu/drm/xe/xe_sync.h | 1 - drivers/gpu/drm/xe/xe_trace.h | 52 + drivers/gpu/drm/xe/xe_trace_bo.h | 10 +- drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 1 - drivers/gpu/drm/xe/xe_tuning.c | 21 +- drivers/gpu/drm/xe/xe_uc_debugfs.c | 2 + drivers/gpu/drm/xe/xe_uc_fw.c | 42 +- drivers/gpu/drm/xe/xe_vm.c | 732 ++++----- drivers/gpu/drm/xe/xe_vm.h | 2 + drivers/gpu/drm/xe/xe_vm_types.h | 55 +- drivers/gpu/drm/xe/xe_wa.c | 5 + drivers/gpu/drm/xe/xe_wa.h | 7 +- drivers/gpu/drm/xe/xe_wa_oob.rules | 7 + drivers/gpu/drm/xe/xe_wait_user_fence.c | 2 +- drivers/gpu/host1x/dev.c | 7 +- drivers/gpu/host1x/dev.h | 2 + drivers/gpu/host1x/hw/intr_hw.c | 37 +- drivers/gpu/host1x/intr.c | 21 +- drivers/gpu/host1x/intr.h | 5 + drivers/gpu/vga/vga_switcheroo.c | 3 +- drivers/hv/hv_common.c | 4 +- drivers/mtd/mtdoops.c | 6 +- drivers/video/fbdev/core/fbcon.c | 16 +- fs/pstore/platform.c | 10 +- include/drm/display/drm_dp.h | 4 + include/drm/display/drm_dp_helper.h | 3 + include/drm/display/drm_dp_mst_helper.h | 14 +- include/drm/drm_accel.h | 18 +- include/drm/drm_atomic.h | 2 +- include/drm/drm_connector.h | 8 - include/drm/drm_device.h | 5 +- include/drm/drm_drv.h | 28 - include/drm/drm_edid.h | 2 - include/drm/drm_fb_helper.h | 6 - include/drm/drm_file.h | 5 + include/drm/drm_fixed.h | 3 +- include/drm/drm_mipi_dsi.h | 12 + include/drm/drm_mode_config.h | 16 - include/drm/drm_panic.h | 21 +- include/drm/drm_prime.h | 3 + include/drm/drm_print.h | 54 +- include/drm/drm_rect.h | 15 + include/drm/drm_vblank.h | 37 +- include/drm/gpu_scheduler.h | 2 +- include/drm/ttm/ttm_bo.h | 48 +- include/drm/ttm/ttm_resource.h | 97 +- include/linux/dma-fence-array.h | 6 + include/linux/dma-heap.h | 21 +- include/linux/fb.h | 1 + include/linux/kmsg_dump.h | 22 +- include/linux/string.h | 12 + include/uapi/drm/drm_fourcc.h | 25 + include/uapi/drm/drm_mode.h | 2 + include/uapi/drm/msm_drm.h | 2 + include/uapi/drm/xe_drm.h | 10 +- include/uapi/linux/kfd_ioctl.h | 106 +- include/uapi/linux/virtio_gpu.h | 1 + kernel/panic.c | 2 +- kernel/printk/printk.c | 11 +- 1282 files changed, 43812 insertions(+), 21840 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/boe,tv101wum-ll2.yaml create mode 100644 drivers/gpu/drm/amd/amdgpu/gfx_v9_0_cleaner_shader.h create mode 100644 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3_cleaner_shader.as= m create mode 100644 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3_cleaner_shader.h delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn303/Makefile delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn314/Makefile delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn401/Makefile rename drivers/gpu/drm/amd/display/dc/{ =3D> dio}/dcn301/dcn301_dio_link_encoder.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dio}/dcn301/dcn301_dio_link_encoder.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dio}/dcn314/dcn314_dio_stream_encoder.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dio}/dcn314/dcn314_dio_stream_encoder.h (100%) delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.h delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.h rename drivers/gpu/drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_cm_common.h = (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> dwb}/dcn30/dcn30_dwb_cm.c (10= 0%) rename drivers/gpu/drm/amd/display/dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_link_encoder.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_link_encoder.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_stream_encoder.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> hpo}/dcn31/dcn31_hpo_dp_stream_encoder.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mmhubbub}/dcn20/dcn20_mmhubbub.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mmhubbub}/dcn20/dcn20_mmhubbub.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn10/dcn10_mpc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn10/dcn10_mpc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn20/dcn20_mpc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn20/dcn20_mpc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn30/dcn30_mpc.c (99%) rename drivers/gpu/drm/amd/display/dc/{ =3D> mpc}/dcn30/dcn30_mpc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> opp}/dcn10/dcn10_opp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> opp}/dcn10/dcn10_opp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> opp}/dcn20/dcn20_opp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ =3D> opp}/dcn20/dcn20_opp.h (100%) create mode 100644 drivers/gpu/drm/amd/display/dc/spl/dc_spl_filters.c create mode 100644 drivers/gpu/drm/amd/display/dc/spl/dc_spl_filters.h create mode 100644 drivers/gpu/drm/amd/display/dc/spl/dc_spl_scl_easf_filt= ers.c create mode 100644 drivers/gpu/drm/amd/display/dc/spl/dc_spl_scl_easf_filt= ers.h create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_custom_float.c create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_custom_float.h create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_debug.h create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_fixpt31_32.c create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_fixpt31_32.h create mode 100644 drivers/gpu/drm/amd/display/dc/spl/spl_os_types.h create mode 100644 drivers/gpu/drm/ast/ast_sil164.c create mode 100644 drivers/gpu/drm/ast/ast_vga.c create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8183-flakes.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-g12b-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-g12b-skips.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-mt8183-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-mt8183-skips.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-rk3288-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-rk3288-skips.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-rk3399-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-rk3399-flakes.txt create mode 100644 drivers/gpu/drm/ci/xfails/panfrost-rk3399-skips.txt create mode 100644 drivers/gpu/drm/ci/xfails/rockchip-rk3288-flakes.txt create mode 100644 drivers/gpu/drm/drm_panic_qr.rs create mode 100644 drivers/gpu/drm/mgag200/mgag200_vga_bmc.c create mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c delete mode 100644 drivers/gpu/drm/nouveau/include/nvif/if0002.h delete mode 100644 drivers/gpu/drm/nouveau/include/nvif/if0003.h delete mode 100644 drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h delete mode 100644 drivers/gpu/drm/nouveau/nouveau_usif.c delete mode 100644 drivers/gpu/drm/nouveau/nouveau_usif.h delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/Kbuild delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/g84.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf108.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf117.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gk104.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gt200.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gt215.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv50.c delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h create mode 100644 drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c rename drivers/gpu/drm/renesas/{rcar-du =3D> rz-du}/rzg2l_mipi_dsi.c (100%= ) rename drivers/gpu/drm/renesas/{rcar-du =3D> rz-du}/rzg2l_mipi_dsi_regs.h = (100%) create mode 100644 drivers/gpu/drm/xe/display/xe_display_wa.c delete mode 100644 drivers/gpu/drm/xe/regs/xe_sriov_regs.h delete mode 100644 drivers/gpu/drm/xe/tests/xe_bo_test.c delete mode 100644 drivers/gpu/drm/xe/tests/xe_bo_test.h delete mode 100644 drivers/gpu/drm/xe/tests/xe_dma_buf_test.c delete mode 100644 drivers/gpu/drm/xe/tests/xe_dma_buf_test.h delete mode 100644 drivers/gpu/drm/xe/tests/xe_migrate_test.c delete mode 100644 drivers/gpu/drm/xe/tests/xe_migrate_test.h delete mode 100644 drivers/gpu/drm/xe/tests/xe_mocs_test.c delete mode 100644 drivers/gpu/drm/xe/tests/xe_mocs_test.h create mode 100644 drivers/gpu/drm/xe/xe_gsc_debugfs.c create mode 100644 drivers/gpu/drm/xe/xe_gsc_debugfs.h create mode 100644 drivers/gpu/drm/xe/xe_gt_sriov_pf_control_types.h create mode 100644 drivers/gpu/drm/xe/xe_gt_stats.c create mode 100644 drivers/gpu/drm/xe/xe_gt_stats.h create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_group.c create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_group.h create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_group_types.h . Date: Thu, 19 Sep 2024 09:54:05 +0200 From: Christoph Hellwig To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, iommu@lists.linux.dev Subject: [GIT PULL] dma-mapping updates for Linux 6.12 The following changes since commit 47ac09b91befbb6a235ab620c32af719f8208399: Linux 6.11-rc4 (2024-08-18 13:17:27 -0700) are available in the Git repository at: git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-6.12-2024-09-19 for you to fetch changes up to a5fb217f13f74b2af2ab366ffad522bae717f93c: dma-mapping: reflow dma_supported (2024-09-12 16:28:00 +0200) ---------------------------------------------------------------- dma-mapping updates for linux 6.12 - support DMA zones for arm64 systems where memory starts at > 4GB (Baruch Siach, Catalin Marinas) - support direct calls into dma-iommu and thus obsolete dma_map_ops for many common configurations (Leon Romanovsky) - add DMA-API tracing (Sean Anderson) - remove the not very useful return value from various dma_set_* APIs (Christoph Hellwig) - misc cleanups and minor optimizations (Chen Y, Yosry Ahmed, Christoph Hellwig) ---------------------------------------------------------------- Baruch Siach (2): arm64: mm: fix DMA zone when dma-ranges is missing arm64: mm: keep low RAM dma zone Catalin Marinas (2): dma-mapping: replace zone_dma_bits by zone_dma_limit arm64: support DMA zone above 4GB Chen Yu (1): dma-direct: optimize page freeing when it is not addressable Christoph Hellwig (7): scsi: check that busses support the DMA API before setting dma parameters dma-mapping: don't return errors from dma_set_min_align_mask dma-mapping: don't return errors from dma_set_seg_boundary dma-mapping: don't return errors from dma_set_max_seg_size vdpa_sim: don't select DMA_OPS dma-mapping: clearly mark DMA ops as an architecture feature dma-mapping: reflow dma_supported Leon Romanovsky (4): dma-mapping: call ->unmap_page and ->unmap_sg unconditionally dma-mapping: direct calls for dma-iommu dma-mapping: use IOMMU DMA calls for common alloc/free page calls dma-mapping: reliably inform about DMA support for IOMMU Sean Anderson (1): dma-mapping: add tracing for dma-mapping API calls Yosry Ahmed (1): dma-mapping: use bit masking to check VM_DMA_COHERENT MAINTAINERS | 1 + arch/Kconfig | 9 + arch/alpha/Kconfig | 2 +- arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 1 + arch/arm64/mm/init.c | 39 ++- arch/mips/Kconfig | 2 +- arch/parisc/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/mm/mem.c | 5 +- arch/s390/Kconfig | 2 +- arch/s390/mm/init.c | 2 +- arch/sparc/Kconfig | 2 +- arch/x86/Kconfig | 2 +- drivers/accel/qaic/qaic_drv.c | 4 +- drivers/dma/idma64.c | 4 +- drivers/dma/pl330.c | 5 +- drivers/dma/qcom/bam_dma.c | 6 +- drivers/dma/sh/rcar-dmac.c | 4 +- drivers/dma/ste_dma40.c | 6 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 +- drivers/iommu/Kconfig | 2 +- drivers/iommu/dma-iommu.c | 104 +++---- drivers/iommu/intel/Kconfig | 1 - drivers/macintosh/macio_asic.c | 4 +- .../media/common/videobuf2/videobuf2-dma-contig.c | 3 +- drivers/media/pci/intel/ipu6/Kconfig | 7 +- drivers/media/pci/intel/ipu6/ipu6.c | 4 +- drivers/mmc/host/mmci_stm32_sdmmc.c | 3 +- drivers/net/ethernet/microsoft/mana/gdma_main.c | 6 +- drivers/scsi/lpfc/lpfc_init.c | 7 +- drivers/scsi/scsi_lib.c | 11 +- drivers/vdpa/Kconfig | 10 +- drivers/xen/Kconfig | 4 +- include/linux/device.h | 7 +- include/linux/dma-direct.h | 2 +- include/linux/dma-map-ops.h | 19 +- include/linux/dma-mapping.h | 25 +- include/linux/iommu-dma.h | 155 ++++++++++ include/trace/events/dma.h | 341 +++++++++++++++++++++ kernel/dma/Kconfig | 7 +- kernel/dma/Makefile | 4 +- kernel/dma/direct.c | 8 +- kernel/dma/dummy.c | 21 ++ kernel/dma/mapping.c | 115 ++++++- kernel/dma/ops_helpers.c | 14 +- kernel/dma/pool.c | 4 +- kernel/dma/remap.c | 6 +- kernel/dma/swiotlb.c | 6 +- 49 files changed, 782 insertions(+), 226 deletions(-) create mode 100644 include/linux/iommu-dma.h create mode 100644 include/trace/events/dma.h . Date: Thu, 19 Sep 2024 10:18:28 +0200 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Subject: [GIT PULL] SCSI updates for the 6.11+ merge window Updates to the usual drivers (ufs, smartpqi, NCR5380, mac_scsi, lpfc, mpi3mr). There are no user visible core changes and a whole series of minor updates and fixes. The largest core change is probably the simplification of the workqueue allocation path. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc The short changelog is: Avri Altman (3): scsi: ufs: Move UFS trace events to private header scsi: ufs: Add HCI capabilities sysfs group scsi: ufs: Prepare to add HCI capabilities sysfs Bao D. Nguyen (2): scsi: ufs: core: Remove ufshcd_urgent_bkops() scsi: ufs: core: Support Updating UIC Command Timeout Bart Van Assche (18): scsi: core: Simplify an alloc_workqueue() invocation scsi: ufs: Simplify alloc*_workqueue() invocation scsi: stex: Simplify an alloc_ordered_workqueue() invocation scsi: scsi_transport_fc: Simplify alloc_workqueue() invocations scsi: snic: Simplify alloc_workqueue() invocations scsi: qedi: Simplify an alloc_workqueue() invocation scsi: qedf: Simplify alloc_workqueue() invocations scsi: myrs: Simplify an alloc_ordered_workqueue() invocation scsi: myrb: Simplify an alloc_ordered_workqueue() invocation scsi: mpt3sas: Simplify an alloc_ordered_workqueue() invocation scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation scsi: fcoe: Simplify alloc_ordered_workqueue() invocations scsi: esas2r: Simplify an alloc_ordered_workqueue() invocation scsi: bfa: Simplify an alloc_ordered_workqueue() invocation scsi: be2iscsi: Simplify an alloc_workqueue() invocation scsi: mptfusion: Simplify the alloc*_workqueue() invocations scsi: Expand all create*_workqueue() invocations Christophe JAILLET (2): scsi: bnx2fc: Remove some unused fields in struct bnx2fc_rport scsi: qla2xxx: Remove the unused 'del_list_entry' field in struct fc_port Dan Carpenter (2): scsi: elx: libefc: Fix potential use after free in efc_nport_vport_del() scsi: ufs: ufshcd-pltfrm: Signedness bug in ufshcd_parse_clock_info() David Strahan (2): scsi: smartpqi: add new controller PCI IDs scsi: smartpqi: Add new controller PCI IDs Don Brace (3): scsi: smartpqi: update driver version to 2.1.30-031 scsi: smartpqi: fix volume size updates scsi: smartpqi: Update driver version to 2.1.28-025 Finn Thain (11): scsi: NCR5380: Clean up indentation scsi: NCR5380: Remove obsolete comment scsi: NCR5380: Remove redundant result calculation from NCR5380_transfer_pio() scsi: NCR5380: Drop redundant member from struct NCR5380_cmd scsi: NCR5380: Handle BSY signal loss during information transfer phases scsi: NCR5380: Initialize buffer for MSG IN and STATUS transfers scsi: mac_scsi: Enable scatter/gather by default scsi: NCR5380: Check for phase match during PDMA fixup scsi: mac_scsi: Disallow bus errors during PDMA send scsi: mac_scsi: Refactor polling loop scsi: mac_scsi: Revise printk(KERN_DEBUG ...) messages Gaosheng Cui (1): scsi: core: Remove obsoleted declaration for scsi_driverbyte_string() Gilbert Wu (1): scsi: smartpqi: revert propagate-the-multipath-failure-to-SML-quickly John Garry (2): scsi: block: Don't check REQ_ATOMIC for reads scsi: sd: Don't check if a write for REQ_ATOMIC Justin Tee (8): scsi: lpfc: Copyright updates for 14.4.0.4 patches scsi: lpfc: Update lpfc version to 14.4.0.4 scsi: lpfc: Update PRLO handling in direct attached topology scsi: lpfc: Fix unsolicited FLOGI kref imbalance when in direct attached topology scsi: lpfc: Fix unintentional double clearing of vmid_flag scsi: lpfc: Validate hdwq pointers before dereferencing in reset/errata paths scsi: lpfc: Remove redundant vport assignment when building an abort request scsi: lpfc: Change diagnostic log flag during receipt of unknown ELS cmds Kees Cook (17): scsi: aacraid: struct {user,}sgmap{,64,raw}: Replace 1-element arrays with flexible arrays scsi: aacraid: Rearrange order of struct aac_srb_unit scsi: message: fusion: struct _CONFIG_PAGE_IOC_4: Replace 1-element array with flexible array scsi: message: fusion: struct _CONFIG_PAGE_IOC_3: Replace 1-element array with flexible array scsi: message: fusion: struct _CONFIG_PAGE_IOC_2: Replace 1-element array with flexible array scsi: message: fusion: struct _CONFIG_PAGE_RAID_PHYS_DISK_1: Replace 1-element array with flexible array scsi: message: fusion: struct _CONFIG_PAGE_SAS_IO_UNIT_0: Replace 1-element array with flexible array scsi: message: fusion: struct _RAID_VOL0_SETTINGS: Replace 1-element array with flexible array scsi: ipr: Replace 1-element arrays with flexible arrays scsi: aacraid: struct aac_ciss_phys_luns_resp: Replace 1-element array with flexible array scsi: aacraid: union aac_init: Replace 1-element array with flexible array scsi: megaraid_sas: struct MR_HOST_DEVICE_LIST: Replace 1-element array with flexible array scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays scsi: mpi3mr: struct mpi3_sas_io_unit_page1: Replace 1-element array with flexible array scsi: mpi3mr: struct mpi3_sas_io_unit_page0: Replace 1-element array with flexible array scsi: mpi3mr: struct mpi3_event_data_pcie_topology_change_list: Replace 1-element array with flexible array scsi: mpi3mr: struct mpi3_event_data_sas_topology_change_list: Replace 1-element array with flexible array Kevin Barnett (2): scsi: smartpqi: Improve handling of multipath failover scsi: smartpqi: Improve accuracy/performance of raid-bypass-counter Mahesh Rajashekhara (2): scsi: smartpqi: add counter for parity write stream requests scsi: smartpqi: correct stream detection Murthy Bhat (2): scsi: smartpqi: fix rare system hang during LUN reset scsi: smartpqi: Add fw log to kdump Pedro Falcato (1): scsi: snic: Avoid creating two slab caches with the same name Ranjan Kumar (3): scsi: mpi3mr: Driver version update to 8.10.0.5.50 scsi: mpi3mr: Update consumer index of reply queues after every 100 replies scsi: mpi3mr: Return complete ioc_status for ioctl commands Rob Herring (Arm) (2): scsi: ufs: ufshcd-pltfrm: Use of_property_count_u32_elems() to get property length scsi: ufs: ufshcd-pltfrm: Use of_property_present() Yue Haibing (2): scsi: bnx2i: Remove unused declarations scsi: target: Remove unused declarations And the diffstat: Documentation/ABI/testing/sysfs-driver-ufs | 27 ++ block/blk-core.c | 1 + drivers/message/fusion/lsi/mpi_cnfg.h | 60 +-- drivers/message/fusion/mptbase.c | 10 +- drivers/message/fusion/mptbase.h | 3 - drivers/message/fusion/mptfc.c | 7 +- drivers/scsi/NCR5380.c | 233 +++++----- drivers/scsi/NCR5380.h | 20 +- drivers/scsi/aacraid/aachba.c | 28 +- drivers/scsi/aacraid/aacraid.h | 21 +- drivers/scsi/aacraid/commctrl.c | 4 +- drivers/scsi/aacraid/comminit.c | 3 +- drivers/scsi/aacraid/commsup.c | 5 +- drivers/scsi/aacraid/src.c | 2 +- drivers/scsi/be2iscsi/be_main.c | 6 +- drivers/scsi/bfa/bfad_im.c | 5 +- drivers/scsi/bfa/bfad_im.h | 1 - drivers/scsi/bnx2fc/bnx2fc.h | 6 - drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 +- drivers/scsi/bnx2i/bnx2i.h | 11 - drivers/scsi/device_handler/scsi_dh_rdac.c | 3 +- drivers/scsi/elx/efct/efct_lio.c | 3 +- drivers/scsi/elx/libefc/efc_nport.c | 2 +- drivers/scsi/esas2r/esas2r.h | 1 - drivers/scsi/esas2r/esas2r_init.c | 5 +- drivers/scsi/fcoe/fcoe_sysfs.c | 18 +- drivers/scsi/fnic/fnic_main.c | 6 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +- drivers/scsi/hosts.c | 9 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 5 +- drivers/scsi/ipr.h | 4 +- drivers/scsi/libfc/fc_exch.c | 3 +- drivers/scsi/libfc/fc_rport.c | 3 +- drivers/scsi/libsas/sas_init.c | 4 +- drivers/scsi/lpfc/lpfc.h | 12 +- drivers/scsi/lpfc/lpfc_els.c | 79 ++-- drivers/scsi/lpfc/lpfc_hbadisc.c | 14 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 22 +- drivers/scsi/lpfc/lpfc_scsi.c | 13 +- drivers/scsi/lpfc/lpfc_sli.c | 13 +- drivers/scsi/lpfc/lpfc_version.h | 2 +- drivers/scsi/lpfc/lpfc_vmid.c | 3 +- drivers/scsi/mac_scsi.c | 170 +++---- drivers/scsi/megaraid/megaraid_sas.h | 6 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +- drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 10 +- drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 10 +- drivers/scsi/mpi3mr/mpi3mr.h | 7 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 36 +- drivers/scsi/mpi3mr/mpi3mr_os.c | 4 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 +- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +- drivers/scsi/myrb.c | 5 +- drivers/scsi/myrb.h | 1 - drivers/scsi/myrs.c | 5 +- drivers/scsi/myrs.h | 1 - drivers/scsi/qedf/qedf_main.c | 20 +- drivers/scsi/qedi/qedi_main.c | 8 +- drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_os.c | 6 +- drivers/scsi/qla4xxx/ql4_os.c | 2 +- drivers/scsi/scsi_transport_fc.c | 11 +- drivers/scsi/sd.c | 2 +- drivers/scsi/smartpqi/smartpqi.h | 39 +- drivers/scsi/smartpqi/smartpqi_init.c | 496 +++++++++++++++------ drivers/scsi/smartpqi/smartpqi_sis.c | 60 +++ drivers/scsi/smartpqi/smartpqi_sis.h | 3 + drivers/scsi/snic/snic_main.c | 10 +- drivers/scsi/stex.c | 6 +- drivers/scsi/sun3_scsi.c | 2 +- drivers/scsi/vmw_pvscsi.c | 3 +- drivers/target/iscsi/iscsi_target.h | 2 - drivers/target/iscsi/iscsi_target_login.h | 1 - drivers/target/iscsi/iscsi_target_nego.h | 2 - drivers/target/iscsi/iscsi_target_tpg.h | 5 - drivers/target/iscsi/iscsi_target_util.h | 5 - drivers/ufs/core/ufs-sysfs.c | 91 +++- .../events/ufs.h => drivers/ufs/core/ufs_trace.h | 6 + drivers/ufs/core/ufshcd.c | 85 ++-- drivers/ufs/host/ufshcd-pltfrm.c | 14 +- include/scsi/fcoe_sysfs.h | 2 - include/scsi/scsi_dbg.h | 7 - include/scsi/scsi_host.h | 1 - include/scsi/scsi_transport_fc.h | 6 - include/ufs/ufs.h | 4 +- include/ufs/ufshci.h | 5 +- 87 files changed, 1098 insertions(+), 762 deletions(-) rename include/trace/events/ufs.h => drivers/ufs/core/ufs_trace.h (98%) Regards, James . Date: Thu, 19 Sep 2024 11:31:35 +0200 From: Wolfram Sang To: Linus Torvalds Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Rosin , Bartosz Golaszewski , Andi Shyti Subject: [PULL REQUEST] i2c-for-6.11-final-but-missed-it --1hPKzSjkPqTv1RD6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The following changes since commit da3ea35007d0af457a0afc87e84fddaebc4e0b63: Linux 6.11-rc7 (2024-09-08 14:50:28 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git tags/i2c-for-6.11-final-but-missed-it for you to fetch changes up to e03ad65cea610b24c6991aebf432d5c6824cd002: Merge tag 'i2c-host-fixes-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current (2024-09-16 14:06:04 +0200) ---------------------------------------------------------------- i2c-for-6.11-final-but-missed-it These are only fixes originally meant for 6.11 final. Because of serious travel problems, I could not send them in time and so this is my first PR for 6.12. The Aspeed driver tracks the controller's state (stop, pending, start, etc.). Previously, when the stop command was sent, the state was not updated. The fix in this pull request ensures the driver's state is aligned with the device status. The Intel SCH driver receives a new look, and among the cleanups, there is a fix where, due to an oversight, an if/else statement was missing the else, causing it to move forward instead of exiting the function in case of an error. The Qualcomm GENI I2C driver adds the IRQF_NO_AUTOEN flag to the IRQ setup to prevent unwanted interrupts during probe. The Xilinx XPS controller fixes TX FIFO handling to avoid missed NAKs. Another fix ensures the controller is reinitialized when the bus appears busy. ---------------------------------------------------------------- Andy Shevchenko (1): i2c: isch: Add missed 'else' Jinjie Ruan (1): i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq() Robert Hancock (2): i2c: xiic: Wait for TX empty to avoid missed TX NAKs i2c: xiic: Try re-initialization on bus busy timeout Tommy Huang (1): i2c: aspeed: Update the stop sw state when the bus recovery occurs Wolfram Sang (1): Merge tag 'i2c-host-fixes-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current with much appreciated quality assurance from ---------------------------------------------------------------- Manikanta Guntupalli (2): (Rev.) i2c: xiic: Try re-initialization on bus busy timeout (Rev.) i2c: xiic: Wait for TX empty to avoid missed TX NAKs Vladimir Zapolskiy (1): (Rev.) i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq() drivers/i2c/busses/i2c-aspeed.c | 16 +++++----- drivers/i2c/busses/i2c-isch.c | 3 +- drivers/i2c/busses/i2c-qcom-geni.c | 4 +-- drivers/i2c/busses/i2c-xiic.c | 60 ++++++++++++++++++++++---------------- 4 files changed, 45 insertions(+), 38 deletions(-) --1hPKzSjkPqTv1RD6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmbr73cACgkQFA3kzBSg KbZeCw/+MxNvxS23CC3geCrlDklBymA1G+kvwpBtqwMumCjvTQQsGxNjUcKVYKPR LgyVdubPsT1gtlX8vL28AyyDeK147tTj5K4Q2WP47TdJnOitAuQUO9gronzJ3q5M 2J38ueOyFpcsEFOKBWeo+CWu6VWX3vivWuBtpKLwT+ajM5uU+H9Mb/MWmPAK9zdw lBJI+81/us2qZ0CYJTrr5VJ4uXaC7KetTWPFGbN9XQ1rG84FgKqyr/11SaI/Hg/V 7cjkJcNtJ+ELzaLd+cNtc4pgXSPwwMq9Ffgq6jr3IDih/4BiDvZhzHaASigyP/u2 nKt04o99wxmIHYtjUeIBs8NBROPdvm70shsHbJS2Ft0ZIW6FH5Ezi9/Wu4IfMfRr xqseLN1o5j2Si5h4Tr6Wr69somKqUXmg+Qb/gofVtnQ6G+2+vSkqRWp9joHGA3E3 AbWf5UK/jRhhzE8NyiG4TbRg1DAN+kQiffjJPzxK3PEdEd6kbwTQsIxDJwdMf09d 5G03QdMhwUlFMoE1N1Eh5B0eafGrJtPtcvJffstbiDRmjLfBJ1+mP4DHbMcauAUA Sw10VarZylqT32j1yLQWJq1DPb2G8bSqxu5A+D3oyo+1gd78BWicMOMAj8QdAD/M vit3YH1bLiI2up6UNfetrEWmABJaFbYKgZawzKoH0WxXtb97LTU= =8hRB -----END PGP SIGNATURE----- --1hPKzSjkPqTv1RD6-- . Date: Thu, 19 Sep 2024 12:00:29 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider Subject: [GIT PULL] Scheduler changes for v6.12 Linus, Please pull the latest sched/core Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-core-2024-09-19 # HEAD: bc9057da1a220ff2cb6c8885fd5352558aceba2c sched/cpufreq: Use NSEC_PER_MSEC for deadline task Merge conflict notes: # # The freshly merged timer tree changes cause direct conflicts in two files # and semantic conflicts in three files due to API changes: # # Conflicts: # fs/select.c # kernel/time/hrtimer.c # # Semantic conflicts: # fs/proc/base.c # kernel/sched/syscalls.c # kernel/sys.c # # To double check, see my tentative merge resolution in adf04642e625: # # git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/merge # In the v6.12 scheduler development cycle we had 63 commits from 18 contributors: - Implement the SCHED_DEADLINE server infrastructure - Daniel Bristot de Oliveira's last major contribution to the kernel: "SCHED_DEADLINE servers can help fixing starvation issues of low priority tasks (e.g., SCHED_OTHER) when higher priority tasks monopolize CPU cycles. Today we have RT Throttling; DEADLINE servers should be able to replace and improve that." (Daniel Bristot de Oliveira, Peter Zijlstra, Joel Fernandes, Youssef Esmat, Huang Shijie) - Preparatory changes for sched_ext integration: - Use set_next_task(.first) where required - Fix up set_next_task() implementations - Clean up DL server vs. core sched - Split up put_prev_task_balance() - Rework pick_next_task() - Combine the last put_prev_task() and the first set_next_task() - Rework dl_server - Add put_prev_task(.next) (Peter Zijlstra, with a fix by Tejun Heo) - Complete the EEVDF transition and refine EEVDF scheduling: - Implement delayed dequeue - Allow shorter slices to wakeup-preempt - Use sched_attr::sched_runtime to set request/slice suggestion - Document the new feature flags - Remove unused and duplicate-functionality fields - Simplify & unify pick_next_task_fair() - Misc debuggability enhancements (Peter Zijlstra, with fixes/cleanups by Dietmar Eggemann, Valentin Schneider and Chuyi Zhou) - Initialize the vruntime of a new task when it is first enqueued, resulting in significant decrease in latency of newly woken tasks. (Zhang Qiao) - Introduce SM_IDLE and an idle re-entry fast-path in __schedule() (K Prateek Nayak, Peter Zijlstra) - Clean up and clarify the usage of Clean up usage of rt_task() (Qais Yousef) - Preempt SCHED_IDLE entities in strict cgroup hierarchies (Tianchen Ding) - Clarify the documentation of time units for deadline scheduler parameters. (Christian Loehle) - Remove the HZ_BW chicken-bit feature flag introduced a year ago, the original change seems to be working fine. (Phil Auld) - Misc fixes and cleanups (Chen Yu, Dan Carpenter, Huang Shijie, Peilin He, Qais Yousefm and Vincent Guittot) Thanks, Ingo ------------------> Chen Yu (2): sched/pelt: Use rq_clock_task() for hw_pressure kthread: Fix task state in kthread worker if being frozen Christian Loehle (4): sched/deadline: Convert schedtool example to chrt sched/deadline: Clarify nanoseconds in uapi cpufreq/cppc: Use NSEC_PER_MSEC for deadline task sched/cpufreq: Use NSEC_PER_MSEC for deadline task Chuyi Zhou (1): sched/fair: Remove cfs_rq::nr_spread_over and cfs_rq::exec_clock Dan Carpenter (1): sched/debug: Fix fair_server_period_max value Daniel Bristot de Oliveira (3): sched/deadline: Comment sched_dl_entity::dl_server variable sched/deadline: Deferrable dl server sched/fair: Fair server interface Dietmar Eggemann (1): kernel/sched: Fix util_est accounting for DELAY_DEQUEUE Huang Shijie (2): sched/deadline: Fix schedstats vs deadline servers sched/debug: Fix the runnable tasks output Joel Fernandes (Google) (3): sched/core: Add clearing of ->dl_server in put_prev_task_balance() sched/core: Fix priority checking for DL server picks sched/core: Fix picking of tasks for core scheduling with DL server Peilin He (1): sched/core: Add WARN_ON_ONCE() to check overflow for migrate_disable() Peter Zijlstra (36): sched/fair: Add trivial fair server sched/rt: Remove default bandwidth control sched/fair: Cleanup fair_server sched/eevdf: Add feature comments sched/eevdf: Remove min_vruntime_copy sched/fair: Cleanup pick_task_fair() vs throttle sched/fair: Cleanup pick_task_fair()'s curr sched/fair: Unify pick_{,next_}_task_fair() sched: Allow sched_class::dequeue_task() to fail sched/fair: Re-organize dequeue_task_fair() sched: Split DEQUEUE_SLEEP from deactivate_task() sched: Prepare generic code for delayed dequeue sched/uclamg: Handle delayed dequeue sched/fair: Assert {set_next,put_prev}_entity() are properly balanced sched/fair: Prepare exit/cleanup paths for delayed_dequeue sched/fair: Prepare pick_next_task() for delayed dequeue sched/fair: Implement ENQUEUE_DELAYED sched,freezer: Mark TASK_FROZEN special sched: Teach dequeue_task() about special task states sched/fair: Implement delayed dequeue sched/fair: Implement DELAY_ZERO sched/eevdf: Fixup PELT vs DELAYED_DEQUEUE sched/fair: Avoid re-setting virtual deadline on 'migrations' sched/eevdf: Allow shorter slices to wakeup-preempt sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion sched/eevdf: Propagate min_slice up the cgroup hierarchy sched: Use set_next_task(.first) where required sched: Fixup set_next_task() implementations sched: Clean up DL server vs core sched sched: Split up put_prev_task_balance() sched: Rework pick_next_task() sched: Combine the last put_prev_task() and the first set_next_task() sched: Rework dl_server sched: Add put_prev_task(.next) sched/core: Introduce SM_IDLE and an idle re-entry fast-path in __schedule() sched: Fix sched_delayed vs sched_core Phil Auld (1): sched: remove HZ_BW feature hedge Qais Yousef (3): sched/rt: Clean up usage of rt_task() sched/rt, dl: Convert functions to return bool sched/rt: Rename realtime_{prio, task}() to rt_or_dl_{prio, task}() Tejun Heo (1): sched/fair: Make balance_fair() test sched_fair_runnable() instead of rq->nr_running Tianchen Ding (1): sched/fair: Make SCHED_IDLE entity be preempted in strict hierarchy Valentin Schneider (1): sched/fair: Properly deactivate sched_delayed task upon class change Vincent Guittot (1): sched/fair: Move effective_cpu_util() and effective_cpu_util() in fair.c Youssef Esmat (1): sched/core: Clear prev->dl_server in CFS pick fast path Zhang Qiao (1): sched: Initialize the vruntime of a new task when it is first enqueued Documentation/scheduler/sched-deadline.rst | 14 +- drivers/cpufreq/cppc_cpufreq.c | 6 +- fs/bcachefs/six.c | 2 +- fs/select.c | 2 +- include/linux/ioprio.h | 2 +- include/linux/sched.h | 28 +- include/linux/sched/deadline.h | 14 +- include/linux/sched/prio.h | 1 + include/linux/sched/rt.h | 33 +- include/uapi/linux/sched/types.h | 6 +- kernel/freezer.c | 2 +- kernel/kthread.c | 10 +- kernel/locking/rtmutex.c | 4 +- kernel/locking/rwsem.c | 4 +- kernel/locking/ww_mutex.h | 2 +- kernel/sched/core.c | 248 +++++++--- kernel/sched/cpufreq_schedutil.c | 6 +- kernel/sched/deadline.c | 503 +++++++++++++++---- kernel/sched/debug.c | 198 +++++++- kernel/sched/fair.c | 770 ++++++++++++++++++++++------- kernel/sched/features.h | 30 +- kernel/sched/idle.c | 23 +- kernel/sched/rt.c | 261 +++++----- kernel/sched/sched.h | 101 +++- kernel/sched/stop_task.c | 18 +- kernel/sched/syscalls.c | 132 +---- kernel/sched/topology.c | 8 + kernel/time/hrtimer.c | 6 +- kernel/trace/trace_sched_wakeup.c | 2 +- mm/page-writeback.c | 4 +- mm/page_alloc.c | 2 +- 31 files changed, 1695 insertions(+), 747 deletions(-) . Date: Thu, 19 Sep 2024 08:38:48 -0400 From: "Theodore Ts'o" To: Linus Torvalds Cc: Linux Kernel Developers List , Ext4 Developers List Subject: [GIT PULL] ext4 updates for 6.12-rc1 The following changes since commit 47ac09b91befbb6a235ab620c32af719f8208399: Linux 6.11-rc4 (2024-08-18 13:17:27 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus-6.12-rc1 for you to fetch changes up to ff2beee206d23f49d022650122f81285849033e4: ext4: convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C (2024-09-03 22:14:17 -0400) NOTE: git will report a merge conflict involving write_begin calls, but just taking the version from the ext4 branch should just work. See the test branch on the ext4.git branch for the test merge that I did my last round of regression tests before sending this pull request. ---------------------------------------------------------------- Lots of cleanups and bug fixes this cycle, primarily in the block allocation, extent management, fast commit, and journalling. ---------------------------------------------------------------- Artem Sadovnikov (1): ext4: fix i_data_sem unlock order in ext4_ind_migrate() Baokun Li (26): jbd2: stop waiting for space when jbd2_cleanup_journal_tail() returns error ext4: refactor ext4_ext_rm_idx() to index 'path' ext4: prevent partial update of the extents path ext4: fix slab-use-after-free in ext4_split_extent_at() ext4: avoid use-after-free in ext4_ext_show_leaf() ext4: update orig_path in ext4_find_extent() ext4: aovid use-after-free in ext4_ext_insert_extent() ext4: drop ppath from ext4_ext_replay_update_ex() to avoid double-free ext4: fix double brelse() the buffer of the extents path ext4: add new ext4_ext_path_brelse() helper ext4: propagate errors from ext4_find_extent() in ext4_insert_range() ext4: get rid of ppath in ext4_find_extent() ext4: get rid of ppath in get_ext_path() ext4: get rid of ppath in ext4_ext_create_new_leaf() ext4: get rid of ppath in ext4_ext_insert_extent() ext4: get rid of ppath in ext4_split_extent_at() ext4: get rid of ppath in ext4_force_split_extent_at() ext4: get rid of ppath in ext4_split_extent() ext4: get rid of ppath in ext4_split_convert_extents() ext4: get rid of ppath in ext4_convert_unwritten_extents_endio() ext4: get rid of ppath in ext4_ext_convert_to_initialized() ext4: get rid of ppath in ext4_ext_handle_unwritten_extents() ext4: get rid of ppath in convert_initialized_extent() ext4: refactor ext4_swap_extents() to reuse extents path ext4: make some fast commit functions reuse extents path ext4: save unnecessary indentation in ext4_ext_create_new_leaf() Edward Adam Davis (1): ext4: no need to continue when the number of entries is 1 Gabriel Krisman Bertazi (1): ext4: fix error message when rejecting the default hash Jan Kara (1): ext4: don't set SB_RDONLY after filesystem errors Junchao Sun (1): ext4: adjust the layout of the ext4_inode_info structure to save memory Kemeng Shi (18): ext4: correct comment of ext4_xattr_cmp ext4: correct comment of ext4_xattr_block_cache_insert ext4: correct comment of h_checksum jbd2: correctly compare tids with tid_geq function in jbd2_fc_begin_commit jbd2: remove dead check in journal_alloc_journal_head jbd2: remove unused return value of jbd2_fc_release_bufs jbd2: remove unneeded kmap for jh_in->b_frozen_data in jbd2_journal_write_metadata_buffer jbd2: remove unneeded done_copy_out variable in jbd2_journal_write_metadata_buffer jbd2: move escape handle to futher improve jbd2_journal_write_metadata_buffer jbd2: correct comment jbd2_mark_journal_empty jbd2: remove unneeded check of ret in jbd2_fc_get_buf ext4: avoid buffer_head leak in ext4_mark_inode_used() ext4: avoid potential buffer_head leak in __ext4_new_inode() ext4: avoid negative min_clusters in find_group_orlov() ext4: remove dead check in __ext4_new_inode() ext4: move checksum length calculation of inode bitmap into ext4_inode_bitmap_csum_[verify/set]() functions ext4: remove unneeded NULL check of buffer_head in ext4_mark_inode_used() ext4: check buffer_verified in advance to avoid unneeded ext4_get_group_info() Lizhi Xu (1): ext4: filesystems without casefold feature cannot be mounted with siphash Luis Henriques (SUSE) (6): ext4: fix fast commit inode enqueueing during a full journal commit ext4: fix access to uninitialised lock in fc replay path ext4: fix incorrect tid assumption in ext4_wait_for_tail_page_commit() ext4: fix incorrect tid assumption in __jbd2_log_wait_for_space() ext4: fix incorrect tid assumption in jbd2_journal_shrink_checkpoint_list() ext4: fix incorrect tid assumption in ext4_fc_mark_ineligible() Markus Elfring (1): ext4: use seq_putc() in two functions Matthew Wilcox (Oracle) (4): ext4: reduce stack usage in ext4_mpage_readpages() ext4: pipeline buffer reads in mext_page_mkuptodate() ext4: remove array of buffer_heads from mext_page_mkuptodate() ext4: tidy the BH loop in mext_page_mkuptodate() Ojaswin Mujoo (2): ext4: check stripe size compatibility on remount as well ext4: convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C Randy Dunlap (1): jbd2: fix kernel-doc for j_transaction_overhead_buffers Shida Zhang (4): ext4: persist the new uptodate buffers in ext4_journalled_zero_new_buffers ext4: hoist ext4_block_write_begin and replace the __block_write_begin ext4: fix a potential assertion failure due to improperly dirtied buffer ext4: remove the special buffer dirty handling in do_journal_get_write_access Stefan Tauner (1): Documentation: ext4.rst: remove obsolete descriptions of noacl/nouser_xattr options Thadeu Lima de Souza Cascardo (4): ext4: ext4_search_dir should return a proper error ext4: return error on ext4_find_inline_entry ext4: explicitly exit when ext4_find_inline_entry returns an error ext4: avoid OOB when system.data xattr changes underneath the filesystem Thorsten Blum (1): ext4: annotate struct ext4_xattr_inode_array with __counted_by() Wojciech Gładysz (1): ext4: nested locking for xattr inode Xiaxi Shen (1): ext4: fix timer use-after-free on failed mount Zhang Yi (12): ext4: factor out ext4_map_create_blocks() to allocate new blocks ext4: optimize the EXT4_GET_BLOCKS_DELALLOC_RESERVE flag set ext4: don't set EXTENT_STATUS_DELAYED on allocated blocks ext4: let __revise_pending() return newly inserted pendings ext4: passing block allocation information to ext4_es_insert_extent() ext4: update delalloc data reserve spcae in ext4_es_insert_extent() ext4: drop ext4_es_delayed_clu() ext4: use ext4_map_query_blocks() in ext4_map_blocks() ext4: drop unused ext4_es_store_status() ext4: make extent status types exclusive ext4: drop ext4_es_is_delonly() ext4: drop all delonly descriptions Zhihao Cheng (1): ext4: dax: fix overflowing extents beyond inode size when partially writing carrion bent (1): ext4: fix macro definition error of EXT4_DIRENT_HASH and EXT4_DIRENT_MINOR_HASH yangerkun (2): ext4: clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT even mount with discard ext4: dax: keep orphan list before truncate overflow allocated blocks yao.ly (1): ext4: correct encrypted dentry name hash when not casefolded Documentation/admin-guide/ext4.rst | 10 - fs/ext4/bitmap.c | 8 +- fs/ext4/dir.c | 14 +- fs/ext4/ext4.h | 31 +- fs/ext4/extents.c | 823 ++++++++++++++++++----------------- fs/ext4/extents_status.c | 240 ++++------ fs/ext4/extents_status.h | 28 +- fs/ext4/fast_commit.c | 47 +- fs/ext4/file.c | 20 +- fs/ext4/ialloc.c | 35 +- fs/ext4/indirect.c | 7 - fs/ext4/inline.c | 46 +- fs/ext4/inode.c | 292 ++++++------- fs/ext4/mballoc.c | 25 +- fs/ext4/migrate.c | 7 +- fs/ext4/move_extent.c | 90 ++-- fs/ext4/namei.c | 16 +- fs/ext4/readpage.c | 16 +- fs/ext4/resize.c | 3 +- fs/ext4/super.c | 65 ++- fs/ext4/xattr.c | 31 +- fs/ext4/xattr.h | 7 +- fs/jbd2/checkpoint.c | 21 +- fs/jbd2/journal.c | 97 ++--- include/linux/jbd2.h | 4 +- 25 files changed, 989 insertions(+), 994 deletions(-) . Date: Thu, 19 Sep 2024 15:49:53 +0200 From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] vfs blocksize Hey Linus, Now that the large folio/xarry bug is sorted this one seems ready. /* Summary */ This contains the vfs infrastructure as well as the xfs bits to enable support for block sizes (bs) larger than page sizes (ps) plus a few fixes to related infrastructure. There has been efforts over the last 16 years to enable enable Large Block Sizes (LBS), that is block sizes in filesystems where bs > page size. Through these efforts we have learned that one of the main blockers to supporting bs > ps in filesystems has been a way to allocate pages that are at least the filesystem block size on the page cache where bs > ps. Thanks to various previous efforts it is possible to support bs > ps in XFS with only a few changes in XFS itself. Most changes are to the page cache to support minimum order folio support for the target block size on the filesystem. A motivation for Large Block Sizes today is to support high-capacity (large amount of Terabytes) QLC SSDs where the internal Indirection Unit (IU) are typically greater than 4k to help reduce DRAM and so in turn cost and space. In practice this then allows different architectures to use a base page size of 4k while still enabling support for block sizes aligned to the larger IUs by relying on high order folios on the page cache when needed. It also allows to take advantage of the drive's support for atomics larger than 4k with buffered IO support in Linux. As described this year at LSFMM, supporting large atomics greater than 4k enables databases to remove the need to rely on their own journaling, so they can disable double buffered writes, which is a feature different cloud providers are already enabling through custom storage solutions. /* Testing */ gcc version 14.2.0 (Debian 14.2.0-3) Debian clang version 16.0.6 (27+b1) All patches are based on v6.11-rc1 and have been sitting in linux-next. No build failures or warnings were observed. A lot of emphasis has been put on testing using kdevops, starting with an XFS baseline [1]. The testing has been split into regression and progression. The whole test suite was run to check for regressions on existing profiles due to the page cache changes. The split_huge_page_test selftest on XFS filesystem was also run to check for huge page splits in min order chunks is done correctly. No regressions were found with these patches added on top. 8k, 16k, 32k and 64k block sizes were used during feature testing. To compare it with existing support, an ARM VM with 64k base page system without the patches was used as a reference to check for actual failures due to LBS support in a 4k base page size system. No new failures were found with the LBS support. Some preliminary performance tests with fio on XFS on 4k block size against pmem and NVMe with buffered IO and Direct IO on vanilla vs these patches applied was done. There were no regressions detected. sysbench on postgres and mysql for several hours was run on LBS XFS without any issues. There's also an eBPF tool called blkalgn [2] to see if IO sent to the device is aligned and at least filesystem block size in length. [1] https://github.com/linux-kdevops/kdevops/blob/master/docs/xfs-bugs.md [2] https://github.com/iovisor/bcc/pull/4813 /* Conflicts */ Merge conflicts with mainline ============================= No known conflicts. Merge conflicts with other trees ================================ No known conflicts. The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.12.blocksize for you to fetch changes up to 71fdfcdd0dc8344ce6a7887b4675c7700efeffa6: Documentation: iomap: fix a typo (2024-09-12 14:07:17 +0200) Please consider pulling these changes from the signed vfs-6.12.blocksize tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.12.blocksize ---------------------------------------------------------------- Brian Foster (2): iomap: fix handling of dirty folios over unwritten extents iomap: make zero range flush conditional on unwritten mappings Christian Brauner (2): Merge patch series "enable bs > ps in XFS" Merge patch series "iomap: flush dirty cache over unwritten mappings on zero range" Christoph Hellwig (5): iomap: handle a post-direct I/O invalidate race in iomap_write_delalloc_release iomap: improve shared block detection in iomap_unshare_iter iomap: pass flags to iomap_file_buffered_write_punch_delalloc iomap: pass the iomap to the punch callback iomap: remove the iomap_file_buffered_write_punch_delalloc return value Dave Chinner (1): xfs: use kvmalloc for xattr buffers Dennis Lam (1): docs:filesystems: fix spelling and grammar mistakes in iomap design page Josef Bacik (1): iomap: add a private argument for iomap_file_buffered_write Luis Chamberlain (2): mm: split a folio in minimum folio order chunks iomap: remove set_memor_ro() on zero page Matthew Wilcox (Oracle) (1): fs: Allow fine-grained control of folio sizes Pankaj Raghav (9): filemap: allocate mapping_min_order folios in the page cache readahead: allocate folios with mapping_min_order in readahead filemap: cap PTE range to be created to allowed zero fill in folio_map_range() iomap: fix iomap_dio_zero() for fs bs > system page size xfs: expose block size in stat xfs: make the calculation generic in xfs_sb_validate_fsb_count() xfs: enable block size larger than page size support filemap: fix htmldoc warning for mapping_align_index() Documentation: iomap: fix a typo Documentation/filesystems/iomap/design.rst | 8 +- block/fops.c | 2 +- fs/gfs2/file.c | 2 +- fs/iomap/buffered-io.c | 199 ++++++++++++++++++----------- fs/iomap/direct-io.c | 42 +++++- fs/xfs/libxfs/xfs_attr_leaf.c | 15 +-- fs/xfs/libxfs/xfs_ialloc.c | 5 + fs/xfs/libxfs/xfs_shared.h | 3 + fs/xfs/xfs_file.c | 2 +- fs/xfs/xfs_icache.c | 6 +- fs/xfs/xfs_iomap.c | 19 +-- fs/xfs/xfs_iops.c | 12 +- fs/xfs/xfs_mount.c | 8 +- fs/xfs/xfs_super.c | 28 ++-- fs/zonefs/file.c | 2 +- include/linux/huge_mm.h | 28 +++- include/linux/iomap.h | 13 +- include/linux/pagemap.h | 124 ++++++++++++++++-- mm/filemap.c | 36 ++++-- mm/huge_memory.c | 65 +++++++++- mm/readahead.c | 83 +++++++++--- 21 files changed, 506 insertions(+), 196 deletions(-) . Date: Thu, 19 Sep 2024 16:33:29 +0200 From: Arnaldo Carvalho de Melo To: Linus Torvalds Cc: Ingo Molnar , Thomas Gleixner , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kan Liang , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Andi Kleen , Athira Rajeev , Brian Norris , Charlie Jenkins , Chen Ni , Dan Carpenter , Disha Goel , "Dr . David Alan Gilbert" , Howard Chu , James Clark , Kajol Jain , Leo Yan , Martin Liska , Song Liu , Tiezhu Yang , Veronika Molnarova , Weilin Wang , Zixian Cai , Arnaldo Carvalho de Melo Subject: [GIT PULL] perf tools changes for v6.12 Hi Linus, Please consider pulling, Best regards, - Arnaldo The following changes since commit b831f83e40a24f07c8dcba5be408d93beedc820f: Merge tag 'bpf-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (2024-09-05 20:10:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git tags/perf-tools-for-v6.12-1-2024-09-19 for you to fetch changes up to 1de5b5dcb8353f36581c963df2d359a5f151a0be: perf trace: Mark the 'head' arg in the set_robust_list syscall as coming from user space (2024-09-11 17:25:45 -0300) ---------------------------------------------------------------- perf tools improvements and fixes for v6.12: - Use BPF + BTF to collect and pretty print syscall and tracepoint arguments in 'perf trace', done as an GSoC activity. - Data-type profiling improvements: - Cache debuginfo to speed up data type resolution. - Add the 'typecln' sort order, to show which cacheline in a target is hot or cold. The following shows members in the cfs_rq's first cache line: $ perf report -s type,typecln,typeoff -H ... - 2.67% struct cfs_rq + 1.23% struct cfs_rq: cache-line 2 + 0.57% struct cfs_rq: cache-line 4 + 0.46% struct cfs_rq: cache-line 6 - 0.41% struct cfs_rq: cache-line 0 0.39% struct cfs_rq +0x14 (h_nr_running) 0.02% struct cfs_rq +0x38 (tasks_timeline.rb_leftmost) - When a typedef resolves to a unnamed struct, use the typedef name. - When a struct has just one basic type field (int, etc), resolve the type sort order to the name of the struct, not the type of the field. - Support type folding/unfolding in the data-type annotation TUI. - Fix bitfields offsets and sizes. - Initial support for PowerPC, using libcapstone and the usual objdump disassembly parsing routines. - Add support for disassembling and addr2line using the LLVM libraries, speeding up those operations. - Support --addr2line option in 'perf script' as with other tools. - Intel branch counters (LBR event logging) support, only available in recent Intel processors, for instance, the new "brcntr" field can be asked from 'perf script' to print the information collected from this feature: $ perf script -F +brstackinsn,+brcntr # Branch counter abbr list: # branch-instructions:ppp = A # branch-misses = B # '-' No event occurs # '+' Event occurrences may be lost due to branch counter saturated tchain_edit 332203 3366329.405674: 53030 branch-instructions:ppp: 401781 f3+0x2c (home/sdp/test/tchain_edit) f3+31: 0000000000401774 insn: eb 04 br_cntr: AA # PRED 5 cycles [5] 000000000040177a insn: 81 7d fc 0f 27 00 00 0000000000401781 insn: 7e e3 br_cntr: A # PRED 1 cycles [6] 2.00 IPC 0000000000401766 insn: 8b 45 fc 0000000000401769 insn: 83 e0 01 000000000040176c insn: 85 c0 000000000040176e insn: 74 06 br_cntr: A # PRED 1 cycles [7] 4.00 IPC 0000000000401776 insn: 83 45 fc 01 000000000040177a insn: 81 7d fc 0f 27 00 00 0000000000401781 insn: 7e e3 br_cntr: A # PRED 7 cycles [14] 0.43 IPC - Support Timed PEBS (Precise Event-Based Sampling), a recent hardware feature in Intel processors. - Add 'perf ftrace profile' subcommand, using ftrace's function-graph tracer so that users can see the total, average, max execution time as well as the number of invocations easily, for instance: $ sudo perf ftrace profile -G __x64_sys_perf_event_open -- \ perf stat -e cycles -C1 true 2> /dev/null | head # Total (us) Avg (us) Max (us) Count Function 65.611 65.611 65.611 1 __x64_sys_perf_event_open 30.527 30.527 30.527 1 anon_inode_getfile 30.260 30.260 30.260 1 __anon_inode_getfile 29.700 29.700 29.700 1 alloc_file_pseudo 17.578 17.578 17.578 1 d_alloc_pseudo 17.382 17.382 17.382 1 __d_alloc 16.738 16.738 16.738 1 kmem_cache_alloc_lru 15.686 15.686 15.686 1 perf_event_alloc 14.012 7.006 11.264 2 obj_cgroup_charge # - 'perf sched timehist' improvements, including the addition of priority showing/filtering command line options. - Varios improvements to the 'perf probe', including 'perf test' regression testings. - Introduce the 'perf check', initially to check if some feature is in place, using it in 'perf test'. - Various fixes for 32-bit systems. - Address more leak sanitizer failures. - Fix memory leaks (LBR, disasm lock ops, etc). - More reference counting fixes (branch_info, etc). - Constify 'struct perf_tool' parameters to improve code generation and reduce the chances of having its internals changed, which isn't expected. - More constifications in various other places. - Add more build tests, including for JEVENTS. - Add more 'perf test' entries ('perf record LBR', pipe/inject, --setup-filter, 'perf ftrace', 'cgroup sampling', etc). - Inject build ids for all entries in a call chain in 'perf inject', not just for the main sample. - Improve the BPF based sample filter, allowing root to setup filters in bpffs that then can be used by non-root users. - Allow filtering by cgroups with the BPF based sample filter. - Allow a more compact way for 'perf mem report' using the -T/--type-profile and also provide a --sort option similar to the one in 'perf report', 'perf top', to setup the sort order manually. - Fix --group behavior in 'perf annotate' when leader has no samples, where it was not showing anything even when other events in the group had samples. - Fix spinlock and rwlock accounting in 'perf lock contention' - Fix libsubcmd fixdep Makefile dependencies. - Improve 'perf ftrace' error message when ftrace isn't available. - Update various Intel JSON vendor event files. - ARM64 CoreSight hardware tracing infrastructure improvements, mostly not visible to users. - Update power10 JSON events. Signed-off-by: Arnaldo Carvalho de Melo ---------------------------------------------------------------- Aditya Gupta (5): libsubcmd: Don't free the usage string perf check: Introduce 'check' subcommand perf version: Update --build-options to use 'supported_features' array perf tools test_task_analyzer.sh: Update to use 'perf check feature' perf check: Fix inconsistencies in feature names Adrian Hunter (2): perf tools: Enable evsel__is_aux_event() to work for ARM/ARM64 perf tools: Enable evsel__is_aux_event() to work for S390_CPUMSF Alexander Gordeev (1): tools build: Provide consistent build options for fixdep Andi Kleen (4): perf tools: Create source symlink in perf object dir perf test: Support external tests for separate objdir perf script: Minimize "not reaching sample" for '-F +brstackinsn' perf script python: Avoid buffer overflow in python PEBS register interface Andrew Kreimer (1): perf help: Fix a typo ("bellow") Arnaldo Carvalho de Melo (33): perf trace: Introduce trace__btf_scnprintf() perf trace: Remove arg_fmt->is_enum, we can get that from the BTF type perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers Merge remote-tracking branch 'torvalds/master' into perf-tools-next perf tests ftrace: Add pattern check for time, count perf test shell lbr: Support hybrid x86 systems too perf debuginfo: Fix the build with !HAVE_DWARF_SUPPORT perf tests pmu: Initialize all fields of test_pmu variable perf build: Fix up broken capstone feature detection fast path Merge remote-tracking branch 'torvalds/master' into perf-tools-next perf daemon: Fix the build on more 32-bit architectures perf python: Allow checking for the existence of warning options in clang perf python: Disable -Wno-cast-function-type-mismatch if present on clang perf test vfs_getname: Look for alternative line where to collect the pathname perf trace: Pass the richer 'struct syscall_arg' pointer to trace__btf_scnprintf() tools build: Remove leftover libcap tests that prevents fast path feature detection from working Revert "tools build: Remove leftover libcap tests that prevents fast path feature detection from working" perf tools: Build x86 32-bit syscall table from arch/x86/entry/syscalls/syscall_32.tbl Merge remote-tracking branch 'torvalds/master' into perf-tools-next perf trace augmented_syscalls.bpf: Move the renameat aumenter to renameat2, temporarily perf trace: Use a common encoding for augmented arguments, with size + error + payload perf trace: Mark which syscall arguments go from user space to kernel space perf trace: Introduce SCA_PERF_ATTR_FROM_USER() to set .from_user = true perf trace: Introduce SCA_SOCKADDR_FROM_USER() to set .from_user = true perf trace: Introduce SCA_TIMESPEC_FROM_USER() to set .from_user = true perf trace: Mark bpf's attr as from_user perf trace: Support collecting 'union's with the BPF augmenter perf trace: Mark the rlim arg in the prlimit64 and setrlimit syscalls as coming from user space perf trace: If a syscall arg is marked as 'const', assume it is coming _from_ userspace perf build: Require at least clang 16.0.6 to build BPF skeletons perf test shell probe_vfs_getname: Remove extraneous '=' from probe line number regex perf trace: Mark the 'rseq' arg in the rseq syscall as coming from user space perf trace: Mark the 'head' arg in the set_robust_list syscall as coming from user space Athira Rajeev (16): perf annotate: Move the data structures related to register type to header file perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking perf annotate: Update TYPE_STATE_MAX_REGS to include max of regs in powerpc perf annotate: Add disasm_line__parse() to parse raw instruction for powerpc perf annotate: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility perf annotate: Update parameters for reg extract functions to use raw instruction on powerpc perf annotate: Add parse function for memory instructions in powerpc perf annotate: Add support to identify memory instructions of opcode 31 in powerpc perf annotate: Add some of the arithmetic instructions to support instruction tracking in powerpc perf annotate: Add more instructions for instruction tracking perf annotate: Update instruction tracking for powerpc perf annotate: Make capstone_init non-static so that it can be used during symbol disassemble perf annotate: Use capstone_init and remove open_capstone_handle from disasm.c perf annotate: Add support to use libcapstone in powerpc perf annotate: Set instruction name to be used with insn-stat when using raw instruction perf tests probe_vfs_getname.sh: Update to use 'perf check feature' Brian Norris (3): tools build: Correct libsubcmd fixdep dependencies tools build: Avoid circular .fixdep-in.o.cmd issues tools build: Correct bpf fixdep dependencies Changbin Du (1): perf ftrace: Detect whether ftrace is enabled on system Charlie Jenkins (1): libperf: Add gitignore Chen Ni (3): perf annotate: Convert comma to semicolon perf daemon: Convert comma to semicolon perf inject: Convert comma to semicolon Dr. David Alan Gilbert (1): perf test pmu: Remove unused test_pmus Howard Chu (12): perf trace: BTF-based enum pretty printing for syscall args perf trace: Augment non-syscall tracepoints with enum arguments with BTF perf trace: Filter enum arguments with enum names perf test: Add landlock workload perf test trace_btf_enum: Add regression test for the BTF augmentation of enums in 'perf trace' perf evlist: Introduce method to find if there is a bpf-output event perf trace: Fix perf trace -p perf trace: Add trace__bpf_sys_enter_beauty_map() to prepare for fetching data in BPF perf trace: Pretty print struct data perf trace: Pretty print buffer data perf trace: Collect augmented data using BPF perf trace: Add --force-btf for debugging Ian Rogers (81): perf test: Avoid python leak sanitizer test failures perf jevents: Use name for special find value (PMU_EVENTS__NOT_FOUND) perf jevents: Autogenerate empty-pmu-events.c perf python: Remove PYTHON_PERF ifdefs perf test: Add build test for JEVENTS_ARCH=all perf pmu-events: Change dependencies for empty-pmu-events.c test perf pmu-events: Remove duplicated ampereone event perf jevents.py: Ensure event names aren't duplicated perf hist: Fix reference counting of branch_info perf callchain: Fix stitch LBR memory leaks perf test: Add set of perf record LBR tests perf vendor events: SKX, CLX, SNR uncore cache event fixes perf inject: Fix leader sampling inserting additional samples perf auxtrace: Remove dummy tools perf s390-cpumsf: Remove unused struct perf tool: Constify tool pointers perf tool: Move fill defaults into tool.c perf tool: Add perf_tool__init() perf kmem: Use perf_tool__init perf buildid-list: Use perf_tool__init perf kvm: Use perf_tool__init() perf lock: Use perf_tool__init() perf evlist: Use perf_tool__init() perf record: Use perf_tool__init() perf c2c: Use perf_tool__init() perf script: Use perf_tool__init() perf inject: Use perf_tool__init() perf report: Use perf_tool__init() perf stat: Use perf_tool__init() perf annotate: Use perf_tool__init() perf sched: Use perf_tool__init() perf mem: Use perf_tool__init() perf timechart: Use perf_tool__init() perf diff: Use perf_tool__init() perf data convert json: Use perf_tool__init() perf data convert ctf: Use perf_tool__init() perf test event_update: Ensure tools is initialized perf kwork: Use perf_tool__init() perf tool: Remove perf_tool__fill_defaults() perf session: Constify tool perf parse-events: Add a retirement latency modifier perf callchain: Add a for_each callback style API perf inject: Inject build ids for entire call chain perf disasm: Fix memory leak for locked operations perf test annotate: Dump trapping test in trap handler perf synthetic-events: Avoid unnecessary memset perf map: API clean up perf jit: Constify filename argument perf dso: Constify dso_id perf evsel: Constify evsel__id_hdr_size() argument perf test: Expand pipe/inject test perf inject: Combine build_ids and build_id_all into enum perf inject: Combine different mmap and mmap2 functions perf inject: Combine mmap and mmap2 handling perf cap: Tidy up and improve capability testing perf report: Name events in stats for pipe mode perf session: Document 'struct perf_session' and constify its 'auxtrace' member perf header: Add kerneldoc to 'struct perf_file_header' perf header: Fail read if header sections overlap perf header: Allow attributes to be written after data perf inject: Overhaul handling of pipe files perf header: Remove repipe option perf test: Additional pipe tests with pipe output written to a file perf pmus: Fix name comparisons on 32-bit systems perf time-utils: Fix 32-bit nsec parsing perf test: Skip uprobe test if probe command isn't present perf test: Make watchpoint data 32-bits on i386 perf pmu: Merge boolean sysfs event option parsing perf parse-events: Pass cpu_list as a perf_cpu_map in __add_event() perf parse-events: Add default_breakpoint_len helper perf parse-events: Vary default_breakpoint_len on i386 and arm64 perf jevents: Add cpuid to model lookup command perf jevents: Ignore sys when determining a model directory perf inject: Fix build ID injection perf inject: Add new mmap2-buildid-all option perf inject: Lazy build-id mmap2 event insertion perf callchain: Allow symbols to be optional when resolving a callchain perf list: Avoid potential out of bounds memory read perf pmus: Fake PMU clean up perf evsel: Add accessor for tool_event perf pmu: To info add event_type_desc James Clark (12): perf cs-etm: Output 0 instead of 0xdeadbeef when exception packets are flushed perf scripts python cs-etm: Restore first sample log in verbose mode perf test trace_btf_enum: Fix shellcheck warning perf cs-etm: Create decoders after both AUX and HW_ID search passes perf: cs-etm: Allocate queues for all CPUs perf: cs-etm: Move traceid_list to each queue perf: cs-etm: Create decoders based on the trace ID mappings perf: cs-etm: Only save valid trace IDs into files perf: cs-etm: Support version 0.1 of HW_ID packets perf: cs-etm: Print queue number in raw trace dump perf build: Autodetect minimum required llvm-dev version perf build: Remove unused feature test target Kajol Jain (4): perf vendor events power10: Update JSON/events perf vendor events power10: Update JSON/events perf vendor events power10: Move the JSON/events perf vendor events: Move PM_BR_MPRED_CMPL event for power10 platform Kan Liang (15): perf report: Fix --total-cycles --stdio output error perf report: Remove the first overflow check for branch counters perf evlist: Save branch counters information perf annotate: Save branch counters for each block perf evsel: Assign abbr name for the branch counter events perf report: Display the branch counter histogram perf annotate: Display the branch counter histogram perf script: Add branch counters perf test: Add new test cases for the branch counter feature perf hist: Don't set hpp_fmt_value for members in --no-group perf mem: Check mem_events for all eligible PMUs perf mem: Fix missed p-core mem events on ADL and RPL perf mem: Fix the wrong reference in parse_record_events() perf evlist: Print hint for group perf env: Find correct branch counter info on hybrid Leo Yan (5): perf arm-spe: Extract evsel setting up perf arm-spe: Support multiple Arm SPE events perf docs: Refine the description for the buffer size perf auxtrace: Use evsel__is_aux_event() for checking AUX event perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record Lucas Stach (1): perf vendor events arm64: Move Yitian 710 DDR PMU into T-Head directory Martin Liška (1): perf script: add --addr2line option Matt Fleming (1): perf hist: Update hist symbol when updating maps Michael Petlan (2): perf tests shell: Skip base_* dirs in test script search perf testsuite: Install perf-report tests in the 'make install-tests -C tools/perf' target Namhyung Kim (73): perf ftrace: Add 'tail' option to --graph-opts perf ftrace: Factor out check_ftrace_capable() perf ftrace: Add 'profile' command perf ftrace profile: Add -s/--sort option perf bpf-filter: Make filters map a single entry hashmap perf bpf-filter: Pass 'target' to perf_bpf_filter__prepare() perf bpf-filter: Split per-task filter use case perf bpf-filter: Support pin/unpin BPF object perf bpf-filter: Support separate lost counts for each filter perf record: Fix a potential error handling issue perf record: Add --setup-filter option perf test: Update sample filtering test perf hist: Correct hist_entry->mem_info refcounts perf mem: Free the allocated sort string, fixing a leak perf mem: Rework command option handling perf tools: Add mode argument to sort_help() perf mem: Add -s/--sort option perf mem: Add -T/--data-type option to report subcommand perf mem: Update documentation for new options perf annotate: Use al->data_nr if possible perf annotate: Set notes->src->nr_events early perf annotate: Use annotation__pcnt_width() consistently perf annotate: Set al->data_nr using the notes->src->nr_events perf annotate: Add --skip-empty option perf annotate: Cache debuginfo for data type profiling perf annotate-data: Show typedef names properly perf test: Add a new shell test for perf ftrace perf annotate: Fix --group behavior when leader has no samples perf annotate-data: Support --skip-empty option perf annotate-data: Fix a buffer overflow in TUI browser perf lock contention: Change stack_id type to s32 perf annotate-data: Support folding in TUI browser perf annotate-data: Implement folding in TUI browser perf annotate-data: Show first-level children by default in TUI perf dwarf-aux: Check allowed location expressions when collecting variables perf annotate-data: Fix off-by-one in location range check perf annotate-data: Add 'enum type_match_result' perf annotate-data: Add variable_state_str() perf annotate-data: Change return type of find_data_type_block() perf annotate-data: Add is_pointer_type() helper perf annotate-data: Add is_better_type() helper perf annotate-data: Check variables in every scope perf annotate-data: Update type stat at the end of find_data_type_die() perf record: Fix sample cgroup & namespace tracking perf test: Add cgroup sampling test perf annotate-data: Set bitfield member offset and size properly perf annotate-data: Fix missing constant copy perf annotate-data: Prefer struct/union over base type perf annotate-data: Fix percpu pointer check perf annotate-data: Show offset and size in hex perf annotate-data: Add 'typecln' sort key perf dwarf-aux: Handle bitfield members from pointer access perf annotate-data: Update debug messages perf annotate-data: Update stack slot for the store perf annotate-data: Copy back variable types after move perf bpf-filter: Support multiple events properly perf tools: Print lost samples due to BPF filter perf test: Update sample filtering tests with multiple events perf report: Fix segfault when 'sym' sort key is not used perf bpf-filter: Add build dependency to header files perf bpf-filter: Support filtering on cgroups perf test: Add 'perf record cgroup' filtering test perf lock contention: Handle error in a single place perf lock contention: Simplify spinlock check perf lock contention: Do not fail EEXIST for update perf lock contention: Fix spinlock and rwlock accounting perf stat: Constify control data for BPF perf ftrace latency: Constify control data for BPF perf kwork: Constify control data for BPF perf lock contention: Constify control data for BPF perf record offcpu: Constify control data for BPF perf annotate: Treat 'call' instruction as stack operation perf annotate-data: Add pr_debug_scope() Sam James (1): tools: Drop nonsensical -O6 Steinar H. Gunderson (3): perf report: Support LLVM for addr2line() perf annotate: Split out read_symbol() perf annotate: LLVM-based disassembler Tiezhu Yang (2): perf tools: Fix wrong message when running "make JOBS=1" perf list: Give clues if failed to open tracing events directory Veronika Molnarova (11): perf test pmu: Set uninitialized PMU alias to null perf test record.sh: Raise limit of open file descriptors perf testsuite: Merge settings files for shell tests perf testsuite: Fix shellcheck warnings perf testsuite probe: Add test for blacklisted kprobes handling perf testsuite probe: Add test for basic perf-probe options perf testsuite probe: Add test for invalid options perf testsuite probe: Add test for line semantics perf testsuite: Add common output checking helper perf testsuite report: Add test for perf-report basic functionality perf testsuite report: Add test case for perf report Weilin Wang (7): perf test: make metric validation test return early when there is no metric supported on the test system perf data: Allow to use given fd in data->file.fd perf stat: Fork and launch 'perf record' when 'perf stat' needs to get retire latency value for a metric. perf vendor events intel: Add MTL metric JSON files perf stat: Add command line option for enabling TPEBS recording perf Document: Add TPEBS (Timed PEBS(Precise Event-Based Sampling)) to Documents perf test: Add test for Intel TPEBS counting mode Xu Yang (1): perf python: Fix the build on 32-bit arm by including missing "util/sample.h" Yang Jihong (6): perf sched timehist: Fix missing free of session in perf_sched__timehist() perf sched timehist: Fixed timestamp error when unable to confirm event sched_in time perf sched timehist: Skip print non-idle task samples when only show idle events perf sched timehist: Remove redundant BUG_ON in timehist_sched_change_event() perf sched timehist: Add --show-prio option perf sched timehist: Add --prio option Yang Li (1): perf parse-events: Remove duplicated include in parse-events.c Yang Ruibin (1): perf bpf: Remove redundant check that map is NULL Yicong Yang (1): perf stat: Display iostat headers correctly Zixian Cai (1): perf script python: Add the 'ins_lat' field to event handler tools/build/Build | 3 - tools/build/Makefile | 11 +- tools/build/Makefile.feature | 2 +- tools/build/Makefile.include | 12 +- tools/build/feature/Makefile | 11 +- tools/build/feature/test-all.c | 4 - tools/build/feature/test-llvm-perf.cpp | 14 + tools/include/linux/coresight-pmu.h | 17 +- tools/include/linux/string.h | 2 + tools/lib/api/Makefile | 4 - tools/lib/api/fs/tracing_path.c | 2 +- tools/lib/bpf/.gitignore | 1 + tools/lib/bpf/Makefile | 13 +- tools/lib/perf/.gitignore | 5 + tools/lib/string.c | 13 + tools/lib/subcmd/Makefile | 6 +- tools/lib/subcmd/parse-options.c | 8 +- tools/lib/symbol/Makefile | 4 - tools/perf/Build | 1 + tools/perf/Documentation/perf-annotate.txt | 3 + tools/perf/Documentation/perf-check.txt | 82 + tools/perf/Documentation/perf-ftrace.txt | 48 +- tools/perf/Documentation/perf-kvm.txt | 6 +- tools/perf/Documentation/perf-list.txt | 1 + tools/perf/Documentation/perf-mem.txt | 94 +- tools/perf/Documentation/perf-record.txt | 14 +- tools/perf/Documentation/perf-report.txt | 1 + tools/perf/Documentation/perf-sched.txt | 9 + tools/perf/Documentation/perf-script.txt | 5 +- tools/perf/Documentation/perf-stat.txt | 8 + tools/perf/Documentation/perf-top.txt | 4 +- tools/perf/Documentation/perf-trace.txt | 4 +- tools/perf/Documentation/topdown.txt | 30 + tools/perf/Makefile | 8 +- tools/perf/Makefile.config | 51 +- tools/perf/Makefile.perf | 6 + tools/perf/arch/arm/util/cs-etm.c | 12 +- tools/perf/arch/arm/util/pmu.c | 3 + tools/perf/arch/arm64/annotate/instructions.c | 3 +- tools/perf/arch/arm64/util/arm-spe.c | 108 +- tools/perf/arch/arm64/util/hisi-ptt.c | 1 - tools/perf/arch/loongarch/annotate/instructions.c | 6 +- tools/perf/arch/powerpc/annotate/instructions.c | 254 ++ tools/perf/arch/powerpc/util/dwarf-regs.c | 53 + tools/perf/arch/s390/annotate/instructions.c | 5 +- tools/perf/arch/x86/Makefile | 6 +- tools/perf/arch/x86/annotate/instructions.c | 389 +++ tools/perf/arch/x86/entry/syscalls/syscall_32.tbl | 470 ++++ tools/perf/arch/x86/util/event.c | 4 +- tools/perf/arch/x86/util/evlist.c | 6 + tools/perf/arch/x86/util/intel-bts.c | 1 - tools/perf/arch/x86/util/intel-pt.c | 1 - tools/perf/bench/synthesize.c | 2 +- tools/perf/builtin-annotate.c | 77 +- tools/perf/builtin-buildid-list.c | 10 + tools/perf/builtin-c2c.c | 47 +- tools/perf/builtin-check.c | 180 ++ tools/perf/builtin-daemon.c | 2 +- tools/perf/builtin-diff.c | 38 +- tools/perf/builtin-evlist.c | 18 +- tools/perf/builtin-ftrace.c | 462 +++- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-inject.c | 739 +++--- tools/perf/builtin-kmem.c | 22 +- tools/perf/builtin-kvm.c | 22 +- tools/perf/builtin-kwork.c | 36 +- tools/perf/builtin-list.c | 2 +- tools/perf/builtin-lock.c | 44 +- tools/perf/builtin-mem.c | 161 +- tools/perf/builtin-record.c | 79 +- tools/perf/builtin-report.c | 106 +- tools/perf/builtin-sched.c | 232 +- tools/perf/builtin-script.c | 184 +- tools/perf/builtin-stat.c | 42 +- tools/perf/builtin-timechart.c | 25 +- tools/perf/builtin-top.c | 10 +- tools/perf/builtin-trace.c | 497 +++- tools/perf/builtin-version.c | 43 +- tools/perf/builtin.h | 17 + tools/perf/check-headers.sh | 1 + tools/perf/perf.c | 1 + tools/perf/pmu-events/Build | 12 +- .../arch/arm64/ampere/ampereone/instruction.json | 3 - .../yitian710/sys/ali_drw.json | 0 .../yitian710/sys/metrics.json | 0 .../pmu-events/arch/powerpc/power10/cache.json | 20 +- .../arch/powerpc/power10/datasource.json | 40 + .../pmu-events/arch/powerpc/power10/frontend.json | 30 + .../pmu-events/arch/powerpc/power10/locks.json | 10 + .../pmu-events/arch/powerpc/power10/memory.json | 30 + .../pmu-events/arch/powerpc/power10/others.json | 106 +- .../pmu-events/arch/powerpc/power10/pipeline.json | 45 + .../perf/pmu-events/arch/powerpc/power10/pmc.json | 10 + .../arch/x86/cascadelakex/uncore-cache.json | 60 +- .../arch/x86/meteorlake/metricgroups.json | 142 ++ .../arch/x86/meteorlake/mtl-metrics.json | 2535 ++++++++++++++++++++ .../pmu-events/arch/x86/skylakex/uncore-cache.json | 60 +- .../arch/x86/snowridgex/uncore-cache.json | 57 - tools/perf/pmu-events/empty-pmu-events.c | 894 ++++--- tools/perf/pmu-events/jevents.py | 27 +- tools/perf/pmu-events/models.py | 73 + tools/perf/pmu-events/pmu-events.h | 9 + tools/perf/scripts/python/arm-cs-trace-disasm.py | 9 +- tools/perf/tests/bp_account.c | 4 +- tools/perf/tests/bp_signal.c | 3 +- tools/perf/tests/bp_signal_overflow.c | 3 +- tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/cpumap.c | 6 +- tools/perf/tests/dlfilter-test.c | 2 +- tools/perf/tests/dwarf-unwind.c | 2 +- tools/perf/tests/event_update.c | 9 +- tools/perf/tests/make | 4 + tools/perf/tests/parse-events.c | 6 +- tools/perf/tests/pmu-events.c | 12 +- tools/perf/tests/pmu.c | 9 +- tools/perf/tests/shell/annotate.sh | 3 +- tools/perf/tests/shell/base_probe/settings.sh | 48 - .../shell/base_probe/test_adding_blacklisted.sh | 67 + .../tests/shell/base_probe/test_adding_kernel.sh | 3 - tools/perf/tests/shell/base_probe/test_basic.sh | 80 + .../tests/shell/base_probe/test_invalid_options.sh | 79 + .../tests/shell/base_probe/test_line_semantics.sh | 55 + tools/perf/tests/shell/base_report/setup.sh | 32 + .../tests/shell/base_report/stderr-whitelist.txt | 5 + tools/perf/tests/shell/base_report/test_basic.sh | 190 ++ .../tests/shell/common/check_errors_whitelisted.pl | 51 + tools/perf/tests/shell/common/init.sh | 31 +- tools/perf/tests/shell/common/settings.sh | 28 +- tools/perf/tests/shell/ftrace.sh | 89 + .../perf/tests/shell/lib/perf_metric_validation.py | 10 +- tools/perf/tests/shell/lib/probe_vfs_getname.sh | 11 +- .../perf/tests/shell/perftool-testsuite_report.sh | 23 + tools/perf/tests/shell/pipe_test.sh | 129 +- .../tests/shell/record+probe_libc_inet_pton.sh | 5 +- .../tests/shell/record+script_probe_vfs_getname.sh | 5 +- tools/perf/tests/shell/record.sh | 59 +- tools/perf/tests/shell/record_bpf_filter.sh | 86 +- tools/perf/tests/shell/record_lbr.sh | 161 ++ tools/perf/tests/shell/script.sh | 3 + tools/perf/tests/shell/test_stat_intel_tpebs.sh | 19 + tools/perf/tests/shell/test_task_analyzer.sh | 7 +- .../tests/shell/test_uprobe_from_different_cu.sh | 7 + tools/perf/tests/shell/trace_btf_enum.sh | 62 + tools/perf/tests/stat.c | 6 +- tools/perf/tests/tests-scripts.c | 37 +- tools/perf/tests/tests.h | 1 + tools/perf/tests/thread-map.c | 2 +- tools/perf/tests/vmlinux-kallsyms.c | 4 +- tools/perf/tests/workloads/Build | 1 + tools/perf/tests/workloads/landlock.c | 66 + tools/perf/tests/wp.c | 5 + tools/perf/trace/beauty/beauty.h | 11 + tools/perf/trace/beauty/perf_event_open.c | 6 +- tools/perf/trace/beauty/sockaddr.c | 2 +- tools/perf/trace/beauty/timespec.c | 2 +- tools/perf/ui/browsers/annotate-data.c | 376 ++- tools/perf/ui/browsers/annotate.c | 20 +- tools/perf/ui/browsers/hists.c | 18 +- tools/perf/ui/hist.c | 10 +- tools/perf/ui/stdio/hist.c | 4 +- tools/perf/util/Build | 10 +- tools/perf/util/annotate-data.c | 1164 ++++----- tools/perf/util/annotate-data.h | 86 +- tools/perf/util/annotate.c | 360 ++- tools/perf/util/annotate.h | 33 +- tools/perf/util/arm-spe.c | 55 +- tools/perf/util/auxtrace.c | 16 +- tools/perf/util/auxtrace.h | 21 +- tools/perf/util/block-info.c | 66 +- tools/perf/util/block-info.h | 8 +- tools/perf/util/bpf-event.c | 4 +- tools/perf/util/bpf-filter.c | 631 ++++- tools/perf/util/bpf-filter.h | 19 +- tools/perf/util/bpf-filter.l | 28 +- tools/perf/util/bpf-filter.y | 28 +- tools/perf/util/bpf_counter_cgroup.c | 6 +- tools/perf/util/bpf_ftrace.c | 8 +- tools/perf/util/bpf_kwork.c | 9 +- tools/perf/util/bpf_kwork_top.c | 7 +- tools/perf/util/bpf_lock_contention.c | 45 +- tools/perf/util/bpf_map.c | 3 - tools/perf/util/bpf_off_cpu.c | 16 +- .../util/bpf_skel/augmented_raw_syscalls.bpf.c | 222 +- tools/perf/util/bpf_skel/bperf_cgroup.bpf.c | 2 +- tools/perf/util/bpf_skel/func_latency.bpf.c | 7 +- tools/perf/util/bpf_skel/kwork_top.bpf.c | 2 +- tools/perf/util/bpf_skel/kwork_trace.bpf.c | 5 +- tools/perf/util/bpf_skel/lock_contention.bpf.c | 53 +- tools/perf/util/bpf_skel/lock_data.h | 4 +- tools/perf/util/bpf_skel/off_cpu.bpf.c | 9 +- tools/perf/util/bpf_skel/sample-filter.h | 13 +- tools/perf/util/bpf_skel/sample_filter.bpf.c | 105 +- tools/perf/util/bpf_skel/vmlinux/vmlinux.h | 7 + tools/perf/util/branch.h | 1 + tools/perf/util/build-id.c | 40 +- tools/perf/util/build-id.h | 8 +- tools/perf/util/callchain.c | 35 + tools/perf/util/callchain.h | 6 + tools/perf/util/cap.c | 63 +- tools/perf/util/cap.h | 23 +- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 36 +- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 2 +- tools/perf/util/cs-etm.c | 675 +++--- tools/perf/util/cs-etm.h | 12 +- tools/perf/util/data-convert-bt.c | 34 +- tools/perf/util/data-convert-json.c | 47 +- tools/perf/util/data.c | 7 +- tools/perf/util/debuginfo.h | 2 + tools/perf/util/disasm.c | 852 +++++-- tools/perf/util/disasm.h | 19 +- tools/perf/util/disasm_bpf.c | 195 ++ tools/perf/util/disasm_bpf.h | 12 + tools/perf/util/dso.c | 4 +- tools/perf/util/dso.h | 4 +- tools/perf/util/dsos.c | 12 +- tools/perf/util/dsos.h | 2 +- tools/perf/util/dump-insn.c | 2 +- tools/perf/util/dump-insn.h | 2 +- tools/perf/util/dwarf-aux.c | 18 +- tools/perf/util/dwarf-aux.h | 2 + tools/perf/util/env.c | 15 + tools/perf/util/env.h | 3 + tools/perf/util/event.c | 54 +- tools/perf/util/event.h | 38 +- tools/perf/util/events_stats.h | 15 +- tools/perf/util/evlist.c | 89 +- tools/perf/util/evlist.h | 7 +- tools/perf/util/evsel.c | 122 +- tools/perf/util/evsel.h | 27 +- tools/perf/util/evsel_fprintf.c | 2 - tools/perf/util/ftrace.h | 3 + tools/perf/util/header.c | 157 +- tools/perf/util/header.h | 25 +- tools/perf/util/hisi-ptt.c | 6 +- tools/perf/util/hist.c | 63 +- tools/perf/util/hist.h | 4 +- tools/perf/util/include/dwarf-regs.h | 11 + tools/perf/util/intel-bts.c | 37 +- .../util/intel-pt-decoder/intel-pt-insn-decoder.c | 5 +- tools/perf/util/intel-pt.c | 30 +- tools/perf/util/intel-tpebs.c | 432 ++++ tools/perf/util/intel-tpebs.h | 35 + tools/perf/util/jit.h | 3 +- tools/perf/util/jitdump.c | 10 +- tools/perf/util/llvm-c-helpers.cpp | 197 ++ tools/perf/util/llvm-c-helpers.h | 60 + tools/perf/util/machine.c | 120 +- tools/perf/util/machine.h | 36 +- tools/perf/util/map.c | 25 +- tools/perf/util/map.h | 22 +- tools/perf/util/map_symbol.c | 18 + tools/perf/util/map_symbol.h | 3 + tools/perf/util/mem-events.c | 20 +- tools/perf/util/mem-events.h | 4 +- tools/perf/util/mem-info.c | 13 + tools/perf/util/mem-info.h | 1 + tools/perf/util/metricgroup.c | 10 +- tools/perf/util/mmap.c | 4 - tools/perf/util/parse-events.c | 69 +- tools/perf/util/parse-events.h | 11 +- tools/perf/util/parse-events.l | 3 +- tools/perf/util/pmu.c | 75 +- tools/perf/util/pmu.h | 8 +- tools/perf/util/pmus.c | 22 +- tools/perf/util/pmus.h | 1 + tools/perf/util/print-events.c | 3 +- tools/perf/util/print_insn.c | 14 +- tools/perf/util/s390-cpumsf.c | 11 +- .../util/scripting-engines/trace-event-python.c | 16 +- tools/perf/util/session.c | 394 +-- tools/perf/util/session.h | 61 +- tools/perf/util/setup.py | 4 +- tools/perf/util/sort.c | 66 +- tools/perf/util/sort.h | 3 +- tools/perf/util/srcline.c | 59 +- tools/perf/util/stat-display.c | 3 +- tools/perf/util/stat-shadow.c | 2 +- tools/perf/util/symbol.c | 8 +- tools/perf/util/symbol_conf.h | 2 +- tools/perf/util/synthetic-events.c | 181 +- tools/perf/util/synthetic-events.h | 89 +- tools/perf/util/syscalltbl.c | 4 + tools/perf/util/thread.c | 4 + tools/perf/util/thread.h | 1 + tools/perf/util/time-utils.c | 4 +- tools/perf/util/tool.c | 294 +++ tools/perf/util/tool.h | 19 +- tools/perf/util/trace_augment.h | 6 + tools/perf/util/tsc.c | 2 +- tools/perf/util/util.c | 12 +- 290 files changed, 15177 insertions(+), 4249 deletions(-) delete mode 100644 tools/build/Build create mode 100644 tools/build/feature/test-llvm-perf.cpp create mode 100644 tools/lib/perf/.gitignore create mode 100644 tools/perf/Documentation/perf-check.txt create mode 100644 tools/perf/arch/x86/entry/syscalls/syscall_32.tbl create mode 100644 tools/perf/builtin-check.c rename tools/perf/pmu-events/arch/arm64/{freescale => thead}/yitian710/sys/ali_drw.json (100%) rename tools/perf/pmu-events/arch/arm64/{freescale => thead}/yitian710/sys/metrics.json (100%) create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/metricgroups.json create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/mtl-metrics.json create mode 100755 tools/perf/pmu-events/models.py delete mode 100644 tools/perf/tests/shell/base_probe/settings.sh create mode 100755 tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh create mode 100755 tools/perf/tests/shell/base_probe/test_basic.sh create mode 100755 tools/perf/tests/shell/base_probe/test_invalid_options.sh create mode 100755 tools/perf/tests/shell/base_probe/test_line_semantics.sh create mode 100755 tools/perf/tests/shell/base_report/setup.sh create mode 100644 tools/perf/tests/shell/base_report/stderr-whitelist.txt create mode 100755 tools/perf/tests/shell/base_report/test_basic.sh create mode 100755 tools/perf/tests/shell/common/check_errors_whitelisted.pl create mode 100755 tools/perf/tests/shell/ftrace.sh create mode 100755 tools/perf/tests/shell/perftool-testsuite_report.sh create mode 100755 tools/perf/tests/shell/record_lbr.sh create mode 100755 tools/perf/tests/shell/test_stat_intel_tpebs.sh create mode 100755 tools/perf/tests/shell/trace_btf_enum.sh create mode 100644 tools/perf/tests/workloads/landlock.c create mode 100644 tools/perf/util/disasm_bpf.c create mode 100644 tools/perf/util/disasm_bpf.h create mode 100644 tools/perf/util/intel-tpebs.c create mode 100644 tools/perf/util/intel-tpebs.h create mode 100644 tools/perf/util/llvm-c-helpers.cpp create mode 100644 tools/perf/util/llvm-c-helpers.h create mode 100644 tools/perf/util/tool.c create mode 100644 tools/perf/util/trace_augment.h . Date: Thu, 19 Sep 2024 21:03:36 +0200 From: Vasily Gorbik To: Linus Torvalds Cc: Heiko Carstens , Alexander Gordeev , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [GIT PULL] s390 patches for the 6.12 merge window Hello Linus, Please pull s390 changes for 6.12. There are 2 conflicts: 1. Conflict in arch/s390/include/asm/facility.h: The random number generator tree (already pulled) contains the s390 vDSO getrandom implementation, which is based on and includes the same commit, 26d4959681e3 ("s390/facility: Disable compile-time optimization for decompressor code"), as was previously included in the s390 tree, hence the conflict. For details, please see: https://lore.kernel.org/all/20240913130544.2398678-1-hca@linux.ibm.com/ The s390 tree doesn't have any other changes to arch/s390/include/asm/facility.h, so please just stick to what's already in your branch. 2. The mm tree (not yet pulled as of now) contains commit 590b9d576cae ("mm: kvmalloc: align kvrealloc() with krealloc()"), which, when pulled, would result in s390 build failure. Please apply the following fix-up, if possible, to avoid build breakage. Reported by linux-next maintainer: https://lore.kernel.org/all/20240808135836.740effac@canb.auug.org.au/ --- diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index 9e2dc42143b3..fa54f3bc0c8d 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -256,7 +256,7 @@ static int add_marker(unsigned long start, unsigned long end, const char *name) if (!oldsize) markers = kvmalloc(newsize, GFP_KERNEL); else - markers = kvrealloc(markers, oldsize, newsize, GFP_KERNEL); + markers = kvrealloc(markers, newsize, GFP_KERNEL); if (!markers) goto error; markers[markers_cnt].is_start = 1; -- Thank you, Vasily The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-6.12-1 for you to fetch changes up to 9fed8d7c46f37151037334ef5e8b30b945baaceb: s390/crypto: Display Query and Query Authentication Information in sysfs (2024-09-12 14:13:27 +0200) ---------------------------------------------------------------- s390 updates for 6.12 merge window - Optimize ftrace and kprobes code patching and avoid stop machine for kprobes if sequential instruction fetching facility is available - Add hiperdispatch feature to dynamically adjust CPU capacity in vertical polarization to improve scheduling efficiency and overall performance. Also add infrastructure for handling warning track interrupts (WTI), allowing for graceful CPU preemption - Rework crypto code pkey module and split it into separate, independent modules for sysfs, PCKMO, CCA, and EP11, allowing modules to load only when the relevant hardware is available - Add hardware acceleration for HMAC modes and the full AES-XTS cipher, utilizing message-security assist extensions (MSA) 10 and 11. It introduces new shash implementations for HMAC-SHA224/256/384/512 and registers the hardware-accelerated AES-XTS cipher as the preferred option. Also add clear key token support - Add MSA 10 and 11 processor activity instrumentation counters to perf and update PAI Extension 1 NNPA counters - Cleanup cpu sampling facility code and rework debug/WARN_ON_ONCE statements - Add support for SHA3 performance enhancements introduced with MSA 12 - Add support for the query authentication information feature of MSA 13 and introduce the KDSA CPACF instruction. Provide query and query authentication information in sysfs, enabling tools like cpacfinfo to present this data in a human-readable form - Update kernel disassembler instructions - Always enable EXPOLINE_EXTERN if supported by the compiler to ensure kpatch compatibility - Add missing warning handling and relocated lowcore support to the early program check handler - Optimize ftrace_return_address() and avoid calling unwinder - Make modules use kernel ftrace trampolines - Strip relocs from the final vmlinux ELF file to make it roughly 2 times smaller - Dump register contents and call trace for early crashes to the console - Generate ptdump address marker array dynamically - Fix rcu_sched stalls that might occur when adding or removing large amounts of pages at once to or from the CMM balloon - Fix deadlock caused by recursive lock of the AP bus scan mutex - Unify sync and async register save areas in entry code - Cleanup debug prints in crypto code - Various cleanup and sanitizing patches for the decompressor - Various small ftrace cleanups ---------------------------------------------------------------- Finn Callies (4): s390/crypto: Add KDSA CPACF Instruction s390/crypto: Rework RRE and RRF CPACF inline functions s390/crypto: Add Support for Query Authentication Information s390/crypto: Display Query and Query Authentication Information in sysfs Gaosheng Cui (1): s390/hypfs: Remove obsoleted declaration for hypfs_dbfs_exit Gerald Schaefer (1): s390/mm: Add cond_resched() to cmm_alloc/free_pages() Harald Freudenberger (9): s390/pkey: Split pkey_unlocked_ioctl function s390/pkey: Rework and split PKEY kernel module code s390/pkey: Unify pkey cca, ep11 and pckmo functions signatures s390/pkey: Introduce pkey base with handler registry and handler modules s390/pkey: Add slowpath function to CCA and EP11 handler s390/pkey: Add function to enforce pkey handler modules load s390/ap: Fix deadlock caused by recursive lock of the AP bus scan mutex s390/cpacf: Add MSA 10 and 11 new PCKMO functions s390/pkey: Add AES xts and HMAC clear key token support Heiko Carstens (16): s390/mm/ptdump: Generate address marker array dynamically s390/entry: Move early program check handler to entry.S s390/entry: Make early program check handler relocated lowcore aware s390/traps: Handle early warnings gracefully s390/entry: Move early_pgm_check_handler() to init text section s390/early: Add __init to __do_early_pgm_check() s390/early: Dump register contents and call trace for early crashes s390/als: Remove obsolete comment s390/boot: Increase minimum architecture to z10 s390/facility: Disable compile time optimization for decompressor code s390: Provide MARCH_HAS_*_FEATURES defines s390: Use MARCH_HAS_*_FEATURES defines s390/boot: Compile all files with the same march flag s390/boot: Rename decompressor_printk() to boot_printk() s390/boot: Use boot_printk() instead of sclp_early_printk() s390/boot: Move boot_printk() code to own file Holger Dengler (7): s390/ap_bus: Cleanup debug code s390/ap_queue: Cleanup debug code s390/zcrypt_api: Cleanup debug code s390/zcrypt_msgtype50: Cleanup debug code s390/zcrypt_msgtype6: Cleanup debug code s390/crypto: Add hardware acceleration for full AES-XTS mode s390/crypto: Add hardware acceleration for HMAC modes Ingo Franzki (1): s390/sha3: Fix SHA3 selftests failures Jens Remus (4): s390/build: Avoid relocation information in final vmlinux s390/disassembler: Use proper format specifiers for operand values s390/disassembler: Update instruction mnemonics to latest spec s390/disassembler: Remove duplicate instruction format RSY_RDRU Joerg Schmidbauer (1): s390/sha3: Support sha3 performance enhancements Mete Durlu (8): s390/hypfs_diag: Remove unused dentry variable s390/smp: Add cpu capacities s390/hiperdispatch: Introduce hiperdispatch s390/hiperdispatch: Add steal time averaging s390/hiperdispatch: Add trace events s390/hiperdispatch: Add hiperdispatch sysctl interface s390/hiperdispatch: Add hiperdispatch debug attributes s390/hiperdispatch: Add hiperdispatch debug counters Sven Schnelle (1): s390/entry: Unify save_area_sync and save_area_async Thomas Richter (15): s390/cpum_sf: Use refcount_t instead of atomic_t s390/cpum_sf: Remove unused define PERF_CPUM_SF_MODE_MASK s390/cpum_sf: Remove unused defines REG_NONE and REG_OVERFLOW s390/cpum_sf: Rename macro to consistent prefix s390/cpum_sf: Move defines from header file to source file s390/cpum_cf: Move defines from header file to source file s390/cpum_sf: Use hwc as variable consistently s390/cpum_sf: Define and initialize variable s390/cpum_sf: Use variable name cpuhw consistently s390/cpum_sf: Ignore lsctl() return code in sf_disable() s390/cpum_sf: Ignore qsi() return code s390/cpum_sf: Rework debug_sprintf_event() messages s390/cpum_sf: Remove WARN_ON_ONCE statements s390/pai_crypto: Add support for MSA 10 and 11 pai counters s390/pai_ext: Update PAI extension 1 counters Tobias Huschle (6): s390/wti: Introduce infrastructure for warning track interrupt s390/wti: Prepare graceful CPU pre-emption on wti reception s390/wti: Add wti accounting for missed grace periods s390/wti: Add debugfs file to display missed grace periods per cpu s390/topology: Add sysctl handler for polarization s390/topology: Add config option to switch to vertical during boot Vasily Gorbik (10): s390/ftrace: Remove unused ftrace_plt_template* s390/ftrace: Use kernel ftrace trampoline for modules s390/ftrace: Avoid calling unwinder in ftrace_return_address() s390: Always enable EXPOLINE_EXTERN if supported s390/disassembler: Add instructions s390/setup: Recognize sequential instruction fetching facility s390/kprobes: Avoid stop machine if possible s390/ftrace: Avoid trampolines if possible s390/ftrace: Use get/copy_from_kernel_nofault consistently s390/ftrace: Avoid extra serialization for graph caller patching arch/s390/Kconfig | 36 +- arch/s390/Makefile.postlink | 38 + arch/s390/boot/Makefile | 34 +- arch/s390/boot/als.c | 49 +- arch/s390/boot/boot.h | 2 +- arch/s390/boot/head.S | 4 +- arch/s390/boot/ipl_parm.c | 2 +- arch/s390/boot/kaslr.c | 2 +- arch/s390/boot/pgm_check_info.c | 160 +- arch/s390/boot/physmem_info.c | 26 +- arch/s390/boot/printk.c | 124 ++ arch/s390/boot/startup.c | 7 +- arch/s390/configs/debug_defconfig | 4 + arch/s390/configs/defconfig | 4 + arch/s390/crypto/Kconfig | 10 + arch/s390/crypto/Makefile | 1 + arch/s390/crypto/aes_s390.c | 120 +- arch/s390/crypto/hmac_s390.c | 359 ++++ arch/s390/crypto/paes_s390.c | 4 +- arch/s390/crypto/sha.h | 1 + arch/s390/crypto/sha3_256_s390.c | 11 +- arch/s390/crypto/sha3_512_s390.c | 11 +- arch/s390/crypto/sha_common.c | 20 +- arch/s390/hypfs/hypfs.h | 1 - arch/s390/hypfs/hypfs_diag.c | 7 +- arch/s390/include/asm/arch_hweight.h | 15 +- arch/s390/include/asm/atomic_ops.h | 7 +- arch/s390/include/asm/barrier.h | 4 +- arch/s390/include/asm/cpacf.h | 281 ++- arch/s390/include/asm/ctlreg.h | 5 +- arch/s390/include/asm/diag.h | 9 + arch/s390/include/asm/facility.h | 6 +- arch/s390/include/asm/ftrace.h | 17 +- arch/s390/include/asm/hiperdispatch.h | 14 + arch/s390/include/asm/irq.h | 2 + arch/s390/include/asm/lowcore.h | 4 +- arch/s390/include/asm/march.h | 38 + arch/s390/include/asm/percpu.h | 7 +- arch/s390/include/asm/perf_event.h | 24 - arch/s390/include/asm/pkey.h | 4 +- arch/s390/include/asm/preempt.h | 7 +- arch/s390/include/asm/processor.h | 1 + arch/s390/include/asm/sclp.h | 1 + arch/s390/include/asm/setup.h | 4 + arch/s390/include/asm/smp.h | 4 + arch/s390/include/asm/topology.h | 3 + arch/s390/include/asm/trace/hiperdispatch.h | 58 + arch/s390/include/uapi/asm/pkey.h | 5 + arch/s390/kernel/Makefile | 7 +- arch/s390/kernel/asm-offsets.c | 3 +- arch/s390/kernel/cpacf.c | 119 ++ arch/s390/kernel/diag.c | 17 + arch/s390/kernel/dis.c | 20 +- arch/s390/kernel/early.c | 38 +- arch/s390/kernel/early_printk.c | 16 +- arch/s390/kernel/earlypgm.S | 23 - arch/s390/kernel/entry.S | 36 +- arch/s390/kernel/ftrace.c | 106 +- arch/s390/kernel/ftrace.h | 2 - arch/s390/kernel/hiperdispatch.c | 430 ++++ arch/s390/kernel/irq.c | 1 + arch/s390/kernel/kprobes.c | 15 +- arch/s390/kernel/mcount.S | 5 +- arch/s390/kernel/perf_cpum_cf.c | 4 + arch/s390/kernel/perf_cpum_sf.c | 309 +-- arch/s390/kernel/perf_pai_crypto.c | 16 + arch/s390/kernel/perf_pai_ext.c | 9 + arch/s390/kernel/smp.c | 21 + arch/s390/kernel/stacktrace.c | 19 - arch/s390/kernel/topology.c | 76 +- arch/s390/kernel/wti.c | 215 ++ arch/s390/mm/cmm.c | 18 +- arch/s390/mm/dump_pagetables.c | 191 +- arch/s390/tools/opcodes.txt | 52 +- drivers/crypto/Kconfig | 77 +- drivers/s390/char/sclp_early.c | 1 + drivers/s390/crypto/Makefile | 16 +- drivers/s390/crypto/ap_bus.c | 59 +- drivers/s390/crypto/ap_queue.c | 20 +- drivers/s390/crypto/pkey_api.c | 2907 +++++++-------------------- drivers/s390/crypto/pkey_base.c | 362 ++++ drivers/s390/crypto/pkey_base.h | 195 ++ drivers/s390/crypto/pkey_cca.c | 629 ++++++ drivers/s390/crypto/pkey_ep11.c | 578 ++++++ drivers/s390/crypto/pkey_pckmo.c | 557 +++++ drivers/s390/crypto/pkey_sysfs.c | 648 ++++++ drivers/s390/crypto/zcrypt_api.c | 29 +- drivers/s390/crypto/zcrypt_ccamisc.c | 8 +- drivers/s390/crypto/zcrypt_ccamisc.h | 6 +- drivers/s390/crypto/zcrypt_ep11misc.c | 28 +- drivers/s390/crypto/zcrypt_ep11misc.h | 14 +- drivers/s390/crypto/zcrypt_msgtype50.c | 10 +- drivers/s390/crypto/zcrypt_msgtype6.c | 37 +- 93 files changed, 6273 insertions(+), 3233 deletions(-) create mode 100644 arch/s390/Makefile.postlink create mode 100644 arch/s390/boot/printk.c create mode 100644 arch/s390/crypto/hmac_s390.c create mode 100644 arch/s390/include/asm/hiperdispatch.h create mode 100644 arch/s390/include/asm/march.h create mode 100644 arch/s390/include/asm/trace/hiperdispatch.h create mode 100644 arch/s390/kernel/cpacf.c delete mode 100644 arch/s390/kernel/earlypgm.S create mode 100644 arch/s390/kernel/hiperdispatch.c create mode 100644 arch/s390/kernel/wti.c create mode 100644 drivers/s390/crypto/pkey_base.c create mode 100644 drivers/s390/crypto/pkey_base.h create mode 100644 drivers/s390/crypto/pkey_cca.c create mode 100644 drivers/s390/crypto/pkey_ep11.c create mode 100644 drivers/s390/crypto/pkey_pckmo.c create mode 100644 drivers/s390/crypto/pkey_sysfs.c . Date: Thu, 19 Sep 2024 14:45:14 -0500 From: Bjorn Helgaas To: Linus Torvalds Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Lorenzo Pieralisi , Manivannan Sadhasivam , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Subject: [GIT PULL] PCI changes for v6.12 The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git tags/pci-v6.12-changes for you to fetch changes up to 81e53c0da8f8b153e049036e5ca5ca20e811c0c8: Merge branch 'pci/tools' (2024-09-19 14:25:34 -0500) Rebased today to fix comment typos and drop a duplicate patch; no code changes. ---------------------------------------------------------------- Enumeration: - Wait for device readiness after reset by polling Vendor ID and looking for Configuration RRS instead of polling the Command register and looking for non-error completions, to avoid hardware retries done for RRS on non-Vendor ID reads (Bjorn Helgaas) - Rename CRS Completion Status to RRS ('Request Retry Status') to match PCIe r6.0 spec usage (Bjorn Helgaas) - Clear LBMS bit after a manual link retrain so we don't try to retrain a link when there's no downstream device anymore (Maciej W. Rozycki) - Revert to the original link speed after retraining fails instead of leaving it restricted to 2.5GT/s, so a future device has a chance to use higher speeds (Maciej W. Rozycki) - Wait for each level of downstream bus, not just the first, to become accessible before restoring devices on that bus (Ilpo Järvinen) - Add ARCH_PCI_DEV_GROUPS so s390 can add its own attribute_groups without having to stomp on the core's pdev->dev.groups (Lukas Wunner) Driver binding: - Export pcim_request_region(), a managed counterpart of pci_request_region(), for use by drivers (Philipp Stanner) - Export pcim_iomap_region() and deprecate pcim_iomap_regions() (Philipp Stanner) - Request the PCI BAR used by xboxvideo (Philipp Stanner) - Request and map drm/ast BARs with pcim_iomap_region() (Philipp Stanner) MSI: - Add MSI_FLAG_NO_AFFINITY flag for devices that mux MSIs onto a single IRQ line and cannot set the affinity of each MSI to a specific CPU core (Marek Vasut) - Use MSI_FLAG_NO_AFFINITY and remove unnecessary .irq_set_affinity() implementations in aardvark, altera, brcmstb, dwc, mediatek-gen3, mediatek, mobiveil, plda, rcar, tegra, vmd, xilinx-nwl, xilinx-xdma, and xilinx drivers to avoid 'IRQ: set affinity failed' warnings (Marek Vasut) Power management: - Add pwrctl support for ATH11K inside the WCN6855 package (Konrad Dybcio) PCI device hotplug: - Remove unnecessary hpc_ops struct from shpchp (ngn) - Check for PCI_POSSIBLE_ERROR(), not 0xffffffff, in cpqphp (weiyufeng) Virtualization: - Mark Creative Labs EMU20k2 INTx masking as broken (Alex Williamson) - Add an ACS quirk for Qualcomm SA8775P, which doesn't advertise ACS but does provide ACS-like features (Subramanian Ananthanarayanan) IOMMU: - Add function 0 DMA alias quirk for Glenfly Arise audio function, which uses the function 0 Requester ID (WangYuli) NPEM: - Add Native PCIe Enclosure Management (NPEM) support for sysfs control of NVMe RAID storage indicators (ok/fail/locate/rebuild/etc) (Mariusz Tkaczyk) - Add support for the ACPI _DSM PCIe SSD status LED management, which is functionally similar to NPEM but mediated by platform firmware (Mariusz Tkaczyk) Device trees: - Drop minItems and maxItems from ranges in PCI generic host binding since host bridges may have several MMIO and I/O port apertures (Frank Li) - Add kirin, rcar-gen2, uniphier DT binding top-level constraints for clocks (Krzysztof Kozlowski) Altera PCIe controller driver: - Convert altera DT bindings from text to YAML (Matthew Gerlach) - Replace TLP_REQ_ID() with macro PCI_DEVID(), which does the same thing and is what other drivers use (Jinjie Ruan) Broadcom STB PCIe controller driver: - Add DT binding maxItems for reset controllers (Jim Quinlan) - Use the 'bridge' reset method if described in the DT (Jim Quinlan) - Use the 'swinit' reset method if described in the DT (Jim Quinlan) - Add 'has_phy' so the existence of a 'rescal' reset controller doesn't imply software control of it (Jim Quinlan) - Add support for many inbound DMA windows (Jim Quinlan) - Rename SoC 'type' to 'soc_base' express the fact that SoCs come in families of multiple similar devices (Jim Quinlan) - Add Broadcom 7712 DT description and driver support (Jim Quinlan) - Sort enums, pcie_offsets[], pcie_cfg_data, .compatible strings for maintainability (Bjorn Helgaas) Freescale i.MX6 PCIe controller driver: - Add imx6q-pcie 'dbi2' and 'atu' reg-names for i.MX8M Endpoints (Richard Zhu) - Fix a code restructuring error that caused i.MX8MM and i.MX8MP Endpoints to fail to establish link (Richard Zhu) - Fix i.MX8MP Endpoint occasional failure to trigger MSI by enforcing outbound alignment requirement (Richard Zhu) - Call phy_power_off() in the .probe() error path (Frank Li) - Rename internal names from imx6_* to imx_* since i.MX7/8/9 are also supported (Frank Li) - Manage Refclk by using SoC-specific callbacks instead of switch statements (Frank Li) - Manage core reset by using SoC-specific callbacks instead of switch statements (Frank Li) - Expand comments for erratum ERR010728 workaround (Frank Li) - Use generic PHY APIs to configure mode, speed, and submode, which is harmless for devices that implement their own internal PHY management and don't set the generic imx_pcie->phy (Frank Li) - Add i.MX8Q (i.MX8QM, i.MX8QXP, and i.MX8DXL) DT binding and driver Root Complex support (Richard Zhu) Freescale Layerscape PCIe controller driver: - Replace layerscape-pcie DT binding compatible fsl,lx2160a-pcie with fsl,lx2160ar2-pcie (Frank Li) - Add layerscape-pcie DT binding deprecated 'num-viewport' property to address a DT checker warning (Frank Li) - Change layerscape-pcie DT binding 'fsl,pcie-scfg' to phandle-array (Frank Li) Loongson PCIe controller driver: - Increase max PCI hosts to 8 for Loongson-3C6000 and newer chipsets (Huacai Chen) Marvell Aardvark PCIe controller driver: - Fix issue with emulating Configuration RRS for two-byte reads of Vendor ID; previously it only worked for four-byte reads (Bjorn Helgaas) MediaTek PCIe Gen3 controller driver: - Add per-SoC struct mtk_gen3_pcie_pdata to support multiple SoC types (Lorenzo Bianconi) - Use reset_bulk APIs to manage PHY reset lines (Lorenzo Bianconi) - Add DT and driver support for Airoha EN7581 PCIe controller (Lorenzo Bianconi) Qualcomm PCIe controller driver: - Update qcom,pcie-sc7280 DT binding with eight interrupts (Rayyan Ansari) - Add back DT 'vddpe-3v3-supply', which was incorrectly removed earlier (Johan Hovold) - Drop endpoint redundant masking of global IRQ events (Manivannan Sadhasivam) - Clarify unknown global IRQ message and only log it once to avoid a flood (Manivannan Sadhasivam) - Add 'linux,pci-domain' property to endpoint DT binding (Manivannan Sadhasivam) - Assign PCI domain number for endpoint controllers (Manivannan Sadhasivam) - Add 'qcom_pcie_ep' and the PCI domain number to IRQ names for endpoint controller (Manivannan Sadhasivam) - Add global SPI interrupt for PCIe link events to DT binding (Manivannan Sadhasivam) - Add global RC interrupt handler to handle 'Link up' events and automatically enumerate hot-added devices (Manivannan Sadhasivam) - Avoid mirroring of DBI and iATU register space so it doesn't overlap BAR MMIO space (Prudhvi Yarlagadda) - Enable controller resources like PHY only after PERST# is deasserted to partially avoid the problem that the endpoint SoC crashes when accessing things when Refclk is absent (Manivannan Sadhasivam) - Add 16.0 GT/s equalization and RX lane margining settings (Shashank Babu Chinta Venkata) - Pass domain number to pci_bus_release_domain_nr() explicitly to avoid a NULL pointer dereference (Manivannan Sadhasivam) Renesas R-Car PCIe controller driver: - Make the read-only const array 'check_addr' static (Colin Ian King) - Add R-Car V4M (R8A779H0) PCIe host and endpoint to DT binding (Yoshihiro Shimoda) TI DRA7xx PCIe controller driver: - Request IRQF_ONESHOT for 'dra7xx-pcie-main' IRQ since the primary handler is NULL (Siddharth Vadapalli) - Handle IRQ request errors during root port and endpoint probe (Siddharth Vadapalli) TI J721E PCIe driver: - Add DT 'ti,syscon-acspcie-proxy-ctrl' and driver support to enable the ACSPCIE module to drive Refclk for the Endpoint (Siddharth Vadapalli) - Extract the cadence link setup from cdns_pcie_host_setup() so link setup can be done separately during resume (Thomas Richard) - Add T_PERST_CLK_US definition for the mandatory delay between Refclk becoming stable and PERST# being deasserted (Thomas Richard) - Add j721e suspend and resume support (Théo Lebrun) TI Keystone PCIe controller driver: - Fix NULL pointer checking when applying MRRS limitation quirk for AM65x SR 1.0 Errata #i2037 (Dan Carpenter) Xilinx NWL PCIe controller driver: - Fix off-by-one error in INTx IRQ handler that caused INTx interrupts to be lost or delivered as the wrong interrupt (Sean Anderson) - Rate-limit misc interrupt messages (Sean Anderson) - Turn off the clock on probe failure and device removal (Sean Anderson) - Add DT binding and driver support for enabling/disabling PHYs (Sean Anderson) - Add PCIe phy bindings for the ZCU102 (Sean Anderson) Xilinx XDMA PCIe controller driver: - Add support for Xilinx QDMA Soft IP PCIe Root Port Bridge to DT binding and xilinx-dma-pl driver (Thippeswamy Havalige) Miscellaneous: - Fix buffer overflow in kirin_pcie_parse_port() (Alexandra Diupina) - Fix minor kerneldoc issues and typos (Bjorn Helgaas) - Use PCI_DEVID() macro in aer_inject() instead of open-coding it (Jinjie Ruan) - Check pcie_find_root_port() return in x86 fixups to avoid NULL pointer dereferences (Samasth Norway Ananda) - Make pci_bus_type constant (Kunwu Chan) - Remove unused declarations of __pci_pme_wakeup() and pci_vpd_release() (Yue Haibing) - Remove any leftover .*.cmd files with make clean (zhang jiao) - Remove unused BILLION macro (zhang jiao) ---------------------------------------------------------------- Alex Williamson (1): PCI: Mark Creative Labs EMU20k2 INTx masking as broken Alexandra Diupina (1): PCI: kirin: Fix buffer overflow in kirin_pcie_parse_port() Bjorn Helgaas (39): PCI: endpoint: Fix enum pci_epc_bar_type kerneldoc PCI: mediatek: Drop excess mtk_pcie.mem kerneldoc description PCI: cadence: Drop excess cdns_pcie_rc.dev kerneldoc description PCI: brcmstb: Sort enums, pcie_offsets[], pcie_cfg_data, .compatible strings PCI: Wait for device readiness with Configuration RRS PCI: aardvark: Correct Configuration RRS checking PCI: Rename CRS Completion Status to RRS PCI: Fix typos Merge branch 'pci/aer' Merge branch 'pci/crs' Merge branch 'pci/devres' Merge branch 'pci/enumeration' Merge branch 'pci/hotplug' Merge branch 'pci/iommu' Merge branch 'pci/npem' Merge branch 'pci/pwrctl' Merge branch 'pci/reset' Merge branch 'pci/sysfs' Merge branch 'pci/dt-bindings' Merge branch 'pci/controller/endpoint' Merge branch 'pci/controller/affinity' Merge branch 'pci/controller/altera' Merge branch 'pci/controller/brcmstb' Merge branch 'pci/controller/cadence' Merge branch 'pci/controller/dra7xx' Merge branch 'pci/controller/imx6' Merge branch 'pci/controller/j721e' Merge branch 'pci/controller/keystone' Merge branch 'pci/controller/kirin' Merge branch 'pci/controller/loongson' Merge branch 'pci/controller/mediatek' Merge branch 'pci/controller/mediatek-gen3' Merge branch 'pci/controller/qcom' Merge branch 'pci/controller/rcar-gen4' Merge branch 'pci/controller/vmd' Merge branch 'pci/controller/xilinx' Merge branch 'pci/quirks' Merge branch 'pci/misc' Merge branch 'pci/tools' Colin Ian King (1): PCI: rcar-gen4: Make read-only const array check_addr static Dan Carpenter (1): PCI: keystone: Fix if-statement expression in ks_pcie_quirk() Frank Li (11): dt-bindings: PCI: host-generic-pci: Drop minItems and maxItems of ranges dt-bindings: PCI: layerscape-pci: Replace fsl,lx2160a-pcie with fsl,lx2160ar2-pcie dt-bindings: PCI: layerscape-pci: Add deprecated property 'num-viewport' dt-bindings: PCI: layerscape-pci: Change property 'fsl,pcie-scfg' type PCI: imx6: Fix missing call to phy_power_off() in error handling PCI: imx6: Rename imx6_* with imx_* PCI: imx6: Introduce SoC specific callbacks for controlling REFCLK PCI: imx6: Simplify switch-case logic by involve core_reset callback PCI: imx6: Improve comment for workaround ERR010728 PCI: imx6: Consolidate redundant if-checks PCI: imx6: Call common PHY API to set mode, speed, and submode Huacai Chen (1): PCI/ACPI: Increase Loongson max PCI hosts to 8 Ilpo Järvinen (1): PCI: Wait for Link before restoring Downstream Buses Jim Quinlan (13): dt-bindings: PCI: brcm,stb-pcie: Change brcmstb maintainer and cleanup dt-bindings: PCI: brcm,stb-pcie: Use maxItems for reset controllers dt-bindings: PCI: brcm,stb-pcie: Add 7712 SoC description PCI: brcmstb: Use common error handling code in brcm_pcie_probe() PCI: brcmstb: Use bridge reset if available PCI: brcmstb: Use swinit reset if available PCI: brcmstb: PCI: brcmstb: Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific PCI: brcmstb: Remove two unused constants from driver PCI: brcmstb: Don't conflate the reset rescal with PHY ctrl PCI: brcmstb: Refactor for chips with many regular inbound windows PCI: brcmstb: Check return value of all reset_control_* calls PCI: brcmstb: Change field name from 'type' to 'soc_base' PCI: brcmstb: Enable 7712 SoCs Jinjie Ruan (2): PCI/AER: Use PCI_DEVID() macro in aer_inject() PCI: altera: Replace TLP_REQ_ID() with macro PCI_DEVID() Johan Hovold (1): dt-bindings: PCI: qcom: Allow 'vddpe-3v3-supply' again Konrad Dybcio (1): PCI/pwrctl: Add WCN6855 support Krzysztof Kozlowski (3): dt-bindings: PCI: hisilicon,kirin-pcie: Add top-level constraints dt-bindings: PCI: renesas,pci-rcar-gen2: Add top-level constraints dt-bindings: PCI: socionext,uniphier-pcie-ep: Add top-level constraints Kunwu Chan (1): PCI: Make pci_bus_type constant Lorenzo Bianconi (4): dt-bindings: PCI: mediatek-gen3: Add support for Airoha EN7581 PCI: mediatek-gen3: Add mtk_gen3_pcie_pdata data structure PCI: mediatek-gen3: Rely on reset_bulk APIs for PHY reset lines PCI: mediatek-gen3: Add Airoha EN7581 support Lukas Wunner (1): s390/pci: Stop usurping pdev->dev.groups Maciej W. Rozycki (4): PCI: Clear the LBMS bit after a link retrain PCI: Revert to the original speed after PCIe failed link retraining PCI: Correct error reporting with PCIe failed link retraining PCI: Use an error code with PCIe failed link retraining Manivannan Sadhasivam (12): PCI: qcom-ep: Drop the redundant masking of global IRQ events PCI: qcom-ep: Reword the error message for receiving unknown global IRQ event dt-bindings: PCI: pci-ep: Update Maintainers dt-bindings: PCI: pci-ep: Document 'linux,pci-domain' property PCI: endpoint: Assign PCI domain number for endpoint controllers PCI: qcom-ep: Modify 'global_irq' and 'perst_irq' IRQ device names dt-bindings: PCI: qcom,pcie-sm8450: Add 'global' interrupt PCI: qcom: Enumerate endpoints based on Link up event in 'global_irq' interrupt PCI: qcom-ep: Enable controller resources like PHY only after refclk is available PCI: dwc: Rename 'dw_pcie::link_gen' to 'dw_pcie::max_link_speed' PCI: dwc: Always cache the maximum link speed value in dw_pcie::max_link_speed PCI: Pass domain number to pci_bus_release_domain_nr() explicitly Marek Vasut (15): genirq/msi: Silence 'set affinity failed' warning PCI: aardvark: Silence 'set affinity failed' warning PCI: altera-msi: Silence 'set affinity failed' warning PCI: brcmstb: Silence 'set affinity failed' warning PCI: dwc: Silence 'set affinity failed' warning PCI: mediatek-gen3: Silence 'set affinity failed' warning PCI: mediatek: Silence 'set affinity failed' warning PCI: mobiveil: Silence 'set affinity failed' warning PCI: plda: Silence 'set affinity failed' warning PCI: rcar-host: Silence 'set affinity failed' warning PCI: tegra: Silence 'set affinity failed' warning PCI: vmd: Silence 'set affinity failed' warning PCI: xilinx-nwl: Silence 'set affinity failed' warning PCI: xilinx-xdma: Silence 'set affinity failed' warning PCI: xilinx: Silence 'set affinity failed' warning Mariusz Tkaczyk (3): leds: Init leds class earlier PCI/NPEM: Add Native PCIe Enclosure Management support PCI/NPEM: Add _DSM PCIe SSD status LED management Matthew Gerlach (2): dt-bindings: PCI: altera: Convert to YAML dt-bindings: PCI: altera: msi: Convert to YAML Philipp Stanner (4): PCI: Make pcim_request_region() a public function drm/vboxvideo: Add PCI region request PCI: Deprecate pcim_iomap_regions() in favor of pcim_iomap_region() drm/ast: Request PCI BAR with devres Prudhvi Yarlagadda (1): PCI: qcom: Disable mirroring of DBI and iATU register space in BAR region Rayyan Ansari (1): dt-bindings: PCI: qcom,pcie-sc7280: Update bindings adding eight interrupts Richard Zhu (5): PCI: imx6: Fix establish link failure in EP mode for i.MX8MM and i.MX8MP PCI: imx6: Fix i.MX8MP PCIe EP's occasional failure to trigger MSI dt-bindings: PCI: imx6q-pcie: Add i.MX8Q PCIe compatible string PCI: imx6: Add i.MX8Q PCIe Root Complex (RC) support dt-bindings: PCI: imx6q-pcie: Add reg-name "dbi2" and "atu" for i.MX8M PCIe Endpoint Riyan Dhiman (1): PCI: vmd: Fix indentation issue in vmd_shutdown() Samasth Norway Ananda (1): x86/PCI: Check pcie_find_root_port() return for NULL Sean Anderson (7): PCI: xilinx-nwl: Fix off-by-one in INTx IRQ handler PCI: xilinx-nwl: Fix register misspelling PCI: xilinx-nwl: Rate-limit misc interrupt messages PCI: xilinx-nwl: Clean up clock on probe failure/removal dt-bindings: pci: xilinx-nwl: Add phys property PCI: xilinx-nwl: Add PHY support arm64: zynqmp: Add PCIe phys property for ZCU102 Shashank Babu Chinta Venkata (2): PCI: qcom: Add equalization settings for 16.0 GT/s PCI: qcom: Add RX lane margining settings for 16.0 GT/s Siddharth Vadapalli (4): dt-bindings: PCI: ti,j721e-pci-host: Add ACSPCIE proxy control property PCI: j721e: Enable ACSPCIE Refclk if "ti,syscon-acspcie-proxy-ctrl" exists PCI: dra7xx: Fix threaded IRQ request for "dra7xx-pcie-main" IRQ PCI: dra7xx: Fix error handling when IRQ request fails in probe Subramanian Ananthanarayanan (1): PCI: Add ACS quirk for Qualcomm SA8775P Thippeswamy Havalige (2): dt-bindings: PCI: xilinx-xdma: Add schemas for Xilinx QDMA PCIe Root Port Bridge PCI: xilinx-xdma: Add Xilinx QDMA Root Port driver Thomas Richard (5): PCI: cadence: Extract link setup sequence from cdns_pcie_host_setup() PCI: cadence: Set cdns_pcie_host_init() global PCI: j721e: Use dev_err_probe() in the probe() function PCI: Add T_PERST_CLK_US macro PCI: j721e: Use T_PERST_CLK_US macro Théo Lebrun (2): PCI: j721e: Add reset GPIO to struct j721e_pcie PCI: j721e: Add suspend and resume support WangYuli (1): PCI: Add function 0 DMA alias quirk for Glenfly Arise chip Yoshihiro Shimoda (2): dt-bindings: PCI: rcar-gen4-pci-host: Add R-Car V4M compatible dt-bindings: PCI: rcar-gen4-pci-ep: Add R-Car V4M compatible Yue Haibing (2): PCI/PM: Remove __pci_pme_wakeup() unused declarations PCI/VPD: Remove pci_vpd_release() unused declarations ngn (1): PCI: shpchp: Remove hpc_ops weiyufeng (1): PCI: cpqphp: Use PCI_POSSIBLE_ERROR() to check config reads zhang jiao (2): tools: PCI: Remove .*.cmd files with make clean tools: PCI: Remove unused BILLION macro Documentation/ABI/testing/sysfs-bus-pci | 72 ++ .../devicetree/bindings/pci/altera-pcie-msi.txt | 27 - .../devicetree/bindings/pci/altera-pcie.txt | 50 - .../bindings/pci/altr,msi-controller.yaml | 65 ++ .../bindings/pci/altr,pcie-root-port.yaml | 114 +++ .../devicetree/bindings/pci/brcm,stb-pcie.yaml | 42 +- .../devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 13 +- .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 16 + .../bindings/pci/fsl,layerscape-pcie.yaml | 41 +- .../bindings/pci/hisilicon,kirin-pcie.yaml | 3 +- .../devicetree/bindings/pci/host-generic-pci.yaml | 2 - .../bindings/pci/mediatek-pcie-gen3.yaml | 68 +- Documentation/devicetree/bindings/pci/pci-ep.yaml | 14 +- .../devicetree/bindings/pci/qcom,pcie-common.yaml | 7 +- .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 1 + .../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 27 +- .../bindings/pci/qcom,pcie-sc8280xp.yaml | 3 - .../devicetree/bindings/pci/qcom,pcie-sm8450.yaml | 10 +- .../devicetree/bindings/pci/qcom,pcie.yaml | 3 + .../devicetree/bindings/pci/rcar-gen4-pci-ep.yaml | 1 + .../bindings/pci/rcar-gen4-pci-host.yaml | 1 + .../bindings/pci/renesas,pci-rcar-gen2.yaml | 8 +- .../bindings/pci/socionext,uniphier-pcie-ep.yaml | 8 +- .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 10 + .../devicetree/bindings/pci/xlnx,nwl-pcie.yaml | 7 + .../devicetree/bindings/pci/xlnx,xdma-host.yaml | 36 +- MAINTAINERS | 8 +- arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts | 1 + arch/s390/include/asm/pci.h | 9 +- arch/s390/pci/Makefile | 3 +- arch/s390/pci/pci.c | 1 - arch/s390/pci/pci_sysfs.c | 14 +- arch/x86/pci/fixup.c | 4 +- drivers/Makefile | 4 +- drivers/acpi/pci_mcfg.c | 12 + drivers/bcma/driver_pci_host.c | 10 +- drivers/gpu/drm/ast/ast_drv.c | 12 +- drivers/gpu/drm/vboxvideo/vbox_main.c | 4 + drivers/pci/Kconfig | 9 + drivers/pci/Makefile | 1 + drivers/pci/ats.c | 4 +- drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/cadence/Kconfig | 2 +- drivers/pci/controller/cadence/pci-j721e.c | 160 +++- drivers/pci/controller/cadence/pcie-cadence-host.c | 44 +- drivers/pci/controller/cadence/pcie-cadence.h | 13 +- drivers/pci/controller/dwc/Kconfig | 5 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pci-dra7xx.c | 11 +- drivers/pci/controller/dwc/pci-imx6.c | 1000 +++++++++++--------- drivers/pci/controller/dwc/pci-keystone.c | 9 +- drivers/pci/controller/dwc/pcie-designware-host.c | 12 +- drivers/pci/controller/dwc/pcie-designware.c | 24 +- drivers/pci/controller/dwc/pcie-designware.h | 35 +- drivers/pci/controller/dwc/pcie-intel-gw.c | 4 +- drivers/pci/controller/dwc/pcie-kirin.c | 4 +- drivers/pci/controller/dwc/pcie-qcom-common.c | 78 ++ drivers/pci/controller/dwc/pcie-qcom-common.h | 14 + drivers/pci/controller/dwc/pcie-qcom-ep.c | 41 +- drivers/pci/controller/dwc/pcie-qcom.c | 133 ++- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 13 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 2 +- drivers/pci/controller/dwc/pcie-tegra194.c | 37 +- .../pci/controller/mobiveil/pcie-mobiveil-host.c | 11 +- drivers/pci/controller/pci-aardvark.c | 74 +- drivers/pci/controller/pci-tegra.c | 10 +- drivers/pci/controller/pci-xgene.c | 6 +- drivers/pci/controller/pcie-altera-msi.c | 11 +- drivers/pci/controller/pcie-altera.c | 3 +- drivers/pci/controller/pcie-brcmstb.c | 602 ++++++++---- drivers/pci/controller/pcie-iproc.c | 18 +- drivers/pci/controller/pcie-mediatek-gen3.c | 193 +++- drivers/pci/controller/pcie-mediatek.c | 12 +- drivers/pci/controller/pcie-rcar-host.c | 10 +- drivers/pci/controller/pcie-xilinx-dma-pl.c | 64 +- drivers/pci/controller/pcie-xilinx-nwl.c | 150 ++- drivers/pci/controller/pcie-xilinx.c | 9 +- drivers/pci/controller/plda/pcie-plda-host.c | 11 +- drivers/pci/controller/vmd.c | 17 +- drivers/pci/devres.c | 9 +- drivers/pci/endpoint/pci-epc-core.c | 14 + drivers/pci/hotplug/TODO | 5 - drivers/pci/hotplug/cpqphp_core.c | 2 +- drivers/pci/hotplug/cpqphp_pci.c | 4 +- drivers/pci/hotplug/s390_pci_hpc.c | 2 +- drivers/pci/hotplug/shpchp.h | 38 +- drivers/pci/hotplug/shpchp_core.c | 15 +- drivers/pci/hotplug/shpchp_ctrl.c | 79 +- drivers/pci/hotplug/shpchp_hpc.c | 63 +- drivers/pci/iomap.c | 2 +- drivers/pci/npem.c | 595 ++++++++++++ drivers/pci/pci-bridge-emul.c | 4 +- drivers/pci/pci-driver.c | 2 +- drivers/pci/pci-sysfs.c | 5 + drivers/pci/pci.c | 75 +- drivers/pci/pci.h | 46 +- drivers/pci/pcie/aer_inject.c | 4 +- drivers/pci/probe.c | 37 +- drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 5 + drivers/pci/quirks.c | 39 +- drivers/pci/remove.c | 4 +- include/linux/bcma/bcma_driver_pci.h | 2 +- include/linux/msi.h | 2 + include/linux/pci-epc.h | 3 + include/linux/pci.h | 11 +- include/linux/pci_ids.h | 2 + include/uapi/linux/pci_regs.h | 41 +- kernel/irq/msi.c | 2 +- sound/pci/hda/hda_intel.c | 2 +- tools/pci/Makefile | 2 +- tools/pci/pcitest.c | 2 - 111 files changed, 3369 insertions(+), 1339 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pci/altera-pcie-msi.txt delete mode 100644 Documentation/devicetree/bindings/pci/altera-pcie.txt create mode 100644 Documentation/devicetree/bindings/pci/altr,msi-controller.yaml create mode 100644 Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.c create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.h create mode 100644 drivers/pci/npem.c . Date: Fri, 20 Sep 2024 02:39:14 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Sebastian Andrzej Siewior Subject: [GIT pull] sched/rt for v6.12-rc1 Linus, please pull the latest sched/rt branch from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-rt-2024-09= -17 up to: 2638e4e6b182: riscv: Allow to enable PREEMPT_RT. Enable PREEMPT_RT on supported architectures: After twenty years of development we finally reached the point to enable PREEMPT_RT support in the mainline kernel. All prerequisites are merged, so enable it on the supported architectures ARM64, RISCV and X86(32/64-bit). Thanks, tglx ------------------> Sebastian Andrzej Siewior (3): x86: Allow to enable PREEMPT_RT. arm64: Allow to enable PREEMPT_RT. riscv: Allow to enable PREEMPT_RT. arch/arm64/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/x86/Kconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index ed15b876fa74..7da710b21f76 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -100,6 +100,7 @@ config ARM64 select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_SUPPORTS_PER_VMA_LOCK + select ARCH_SUPPORTS_RT select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 86d1f1cea571..82724bc95b74 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -65,6 +65,7 @@ config RISCV select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >=3D 140000 select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_SUPPORTS_PER_VMA_LOCK if MMU + select ARCH_SUPPORTS_RT select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK select ARCH_USE_CMPXCHG_LOCKREF if 64BIT select ARCH_USE_MEMTEST diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6f1c31f4b9ab..865573bef975 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -122,6 +122,7 @@ config X86 select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG select ARCH_SUPPORTS_LTO_CLANG select ARCH_SUPPORTS_LTO_CLANG_THIN + select ARCH_SUPPORTS_RT select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF if X86_CMPXCHG64 select ARCH_USE_MEMTEST . Date: Fri, 20 Sep 2024 05:11:53 -0400 From: Paul Moore To: Linus Torvalds Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] lsm/lsm-pr-20240920 Linus, Two important LSM fixes for v6.12-rcX: - Add a missing security_mmap_file() check to the remap_file_pages() syscall. - Properly reference the SELinux and Smack LSM blobs in the security_watch_key() LSM hook. -Paul -- The following changes since commit 19c9d55d72a9040cf9dc8de62633e6217381106b: security: Update file_set_fowner documentation (2024-09-09 12:30:51 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git tags/lsm-pr-20240920 for you to fetch changes up to 8a23c9e1ba4642b60420e8caa75859883a509c24: selinux,smack: properly reference the LSM blob in security_watch_key() (2024-09-19 16:37:01 -0400) ---------------------------------------------------------------- lsm/stable-6.12 PR 20240920 ---------------------------------------------------------------- Paul Moore (1): selinux,smack: properly reference the LSM blob in security_watch_key() Shu Han (1): mm: call the security_mmap_file() LSM hook in remap_file_pages() mm/mmap.c | 4 ++++ security/selinux/hooks.c | 2 +- security/smack/smack_lsm.c | 13 +++---------- 3 files changed, 8 insertions(+), 11 deletions(-) -- paul-moore.com . Date: Fri, 20 Sep 2024 02:33:17 -0700 From: Andrew Morton To: Linus Torvalds Cc: linux-mm@kvack.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] MM updates for 6.12-rc1 Linus, please merge this cycle's batch of MM updates, thanks. Conflicts which I'm seeing, along with their linux-next resolutions are as follows: arch/arm64/Kconfig, vs tip tree: https://lkml.kernel.org/r/20240911151642.7f9d9e02@canb.auug.org.au include/linux/mm.h, vs execve tree: https://lkml.kernel.org/r/20240909171843.78c294da@canb.auug.org.au kernel/events/uprobes.c, vs tip tree: https://lkml.kernel.org/r/20240905153557.3b0f8db5@canb.auug.org.au kernel/events/uprobes.c, vs e240b0fde52f ("uprobes: Use kzalloc to allocate xol area"): https://lkml.kernel.org/r/20240917092739.46dcf943@canb.auug.org.au kernel/resource.c, vs ea72ce5da228 ("x86/kaslr: Expose and use the end of the physical memory address space"): https://lkml.kernel.org/r/20240909100043.60668995@canb.auug.org.au Forthcoming conflicts along with their linux-next resolutions include: tools/testing/shared/linux/init.h, vs memblock tree: https://lkml.kernel.org/r/20240801141047.07940cd3@canb.auug.org.au include/linux/rcutree.h, vs slab tree: https://lkml.kernel.org/r/54d62d5a-16e3-4ea9-83c6-8801ee99855e@suse.cz drivers/iommu/iommufd/selftest.c, vs iommufd tree: https://lkml.kernel.org/r/20240816125429.7a55b08c@canb.auug.org.au https://lkml.kernel.org/r/20240816125429.7a55b08c@canb.auug.org.au include/linux/huge_mm.h, vs vfs-brauner tree: https://lkml.kernel.org/r/20240902112101.2728f045@canb.auug.org.au mm/filemap.c, vs ext3 tree: https://lkml.kernel.org/r/20240906111900.5fcf345e@canb.auug.org.au include/linux/lsm_hooks.h security/security.c, vs security tree: Forthcoming build issues along with their linux-next resolutions include: include/linux/slab.h, vs s390 tree: https://lkml.kernel.org/r/20240808135836.740effac@canb.auug.org.au A build fix for m68k is needed, vs ea72ce5da228 ("x86/kaslr: Expose and use the end of the physical memory address space"). See https://lkml.kernel.org/r/87ttenvw0i.fsf@yhuang6-desk2.ccr.corp.intel.com The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm tags/mm-stable-2024= -09-20-02-31 for you to fetch changes up to 684826f8271ad97580b138b9ffd462005e470b99: zram: free secondary algorithms names (2024-09-17 01:07:01 -0700) ---------------------------------------------------------------- ALong with the usual shower of singleton patches, notable patch series in this pull request are: "Align kvrealloc() with krealloc()" from Danilo Krummrich. Adds consistency to the APIs and behaviour of these two core allocation functions. This also simplifies/enables Rustification. "Some cleanups for shmem" from Baolin Wang. No functional changes - mode code reuse, better function naming, logic simplifications. "mm: some small page fault cleanups" from Josef Bacik. No functional changes - code cleanups only. "Various memory tiering fixes" from Zi Yan. A small fix and a little cleanup. "mm/swap: remove boilerplate" from Yu Zhao. Code cleanups and simplifications and .text shrinkage. "Kernel stack usage histogram" from Pasha Tatashin and Shakeel Butt. This is a feature, it adds new feilds to /proc/vmstat such as $ grep kstack /proc/vmstat kstack_1k 3 kstack_2k 188 kstack_4k 11391 kstack_8k 243 kstack_16k 0 which tells us that 11391 processes used 4k of stack while none at all used 16k. Useful for some system tuning things, but partivularly useful for "the dynamic kernel stack project". "kmemleak: support for percpu memory leak detect" from Pavel Tikhomirov. Teaches kmemleak to detect leaksage of percpu memory. "mm: memcg: page counters optimizations" from Roman Gushchin. "3 independent small optimizations of page counters". "mm: split PTE/PMD PT table Kconfig cleanups+clarifications" from David Hildenbrand. Improves PTE/PMD splitlock detection, makes powerpc/8xx work correctly by design rather than by accident. "mm: remove arch_make_page_accessible()" from David Hildenbrand. Some folio conversions which make arch_make_page_accessible() unneeded. "mm, memcg: cg2 memory{.swap,}.peak write handlers" fro David Finkel. Cleans up and fixes our handling of the resetting of the cgroup/process peak-memory-use detector. "Make core VMA operations internal and testable" from Lorenzo Stoakes. Rationalizaion and encapsulation of the VMA manipulation APIs. With a view to better enable testing of the VMA functions, even from a userspace-only harness. "mm: zswap: fixes for global shrinker" from Takero Funaki. Fix issues in the zswap global shrinker, resulting in improved performance. "mm: print the promo watermark in zoneinfo" from Kaiyang Zhao. Fill in some missing info in /proc/zoneinfo. "mm: replace follow_page() by folio_walk" from David Hildenbrand. Code cleanups and rationalizations (conversion to folio_walk()) resulting in the removal of follow_page(). "improving dynamic zswap shrinker protection scheme" from Nhat Pham. Some tuning to improve zswap's dynamic shrinker. Significant reductions in swapin and improvements in performance are shown. "mm: Fix several issues with unaccepted memory" from Kirill Shutemov. Improvements to the new unaccepted memory feature, "mm/mprotect: Fix dax puds" from Peter Xu. Implements mprotect on DAX PUDs. This was missing, although nobody seems to have notied yet. "Introduce a store type enum for the Maple tree" from Sidhartha Kumar. Cleanups and modest performance improvements for the maple tree library code. "memcg: further decouple v1 code from v2" from Shakeel Butt. Move more cgroup v1 remnants away from the v2 memcg code. "memcg: initiate deprecation of v1 features" from Shakeel Butt. Adds various warnings telling users that memcg v1 features are deprecated. "mm: swap: mTHP swap allocator base on swap cluster order" from Chris Li. Greatly improves the success rate of the mTHP swap allocation. "mm: introduce numa_memblks" from Mike Rapoport. Moves various disparate per-arch implementations of numa_memblk code into generic code. "mm: batch free swaps for zap_pte_range()" from Barry Song. Greatly improves the performance of munmap() of swap-filled ptes. "support large folio swap-out and swap-in for shmem" from Baolin Wang. With this series we no longer split shmem large folios into simgle-page folios when swapping out shmem. "mm/hugetlb: alloc/free gigantic folios" from Yu Zhao. Nice performance improvements and code reductions for gigantic folios. "support shmem mTHP collapse" from Baolin Wang. Adds support for khugepaged's collapsing of shmem mTHP folios. "mm: Optimize mseal checks" from Pedro Falcato. Fixes an mprotect() performance regression due to the addition of mseal(). "Increase the number of bits available in page_type" from Matthew Wilcox. Increases the number of bits available in page_type! "Simplify the page flags a little" from Matthew Wilcox. Many legacy page flags are now folio flags, so the page-based flags and their accessors/mutators can be removed. "mm: store zero pages to be swapped out in a bitmap" from Usama Arif. An optimization which permits us to avoid writing/reading zero-filled zswap pages to backing store. "Avoid MAP_FIXED gap exposure" from Liam Howlett. Fixes a race window which occurs when a MAP_FIXED operqtion is occurring during an unrelated vma tree walk. "mm: remove vma_merge()" from Lorenzo Stoakes. Major rotorooting of the vma_merge() functionality, making ot cleaner, more testable and better tested. "misc fixups for DAMON {self,kunit} tests" from SeongJae Park. Minor fixups of DAMON selftests and kunit tests. "mm: memory_hotplug: improve do_migrate_range()" from Kefeng Wang. Code cleanups and folio conversions. "Shmem mTHP controls and stats improvements" from Ryan Roberts. Cleanups for shmem controls and stats. "mm: count the number of anonymous THPs per size" from Barry Song. Expose additional anon THP stats to userspace for improved tuning. "mm: finish isolate/putback_lru_page()" from Kefeng Wang: more folio conversions and removal of now-unused page-based APIs. "replace per-quota region priorities histogram buffer with per-context one" from SeongJae Park. DAMON histogram rationalization. "Docs/damon: update GitHub repo URLs and maintainer-profile" from SeongJae Park. DAMON documentation updates. "mm/vdpa: correct misuse of non-direct-reclaim __GFP_NOFAIL and improve related doc and warn" from Jason Wang: fixes usage of page allocator __GFP_NOFAIL and GFP_ATOMIC flags. "mm: split underused THPs" from Yu Zhao. Improve THP=3Dalways policy - this was overprovisioning THPs in sparsely accessed memory areas. "zram: introduce custom comp backends API" frm Sergey Senozhatsky. Add support for zram run-time compression algorithm tuning. "mm: Care about shadow stack guard gap when getting an unmapped area" from Mark Brown. Fix up the various arch_get_unmapped_area() implementations to better respect guard areas. "Improve mem_cgroup_iter()" from Kinsey Ho. Improve the reliability of mem_cgroup_iter() and various code cleanups. "mm: Support huge pfnmaps" from Peter Xu. Extends the usage of huge pfnmap support. "resource: Fix region_intersects() vs add_memory_driver_managed()" from Huang Ying. Fix a bug in region_intersects() for systems with CXL memory. "mm: hwpoison: two more poison recovery" from Kefeng Wang. Teaches a couple more code paths to correctly recover from the encountering of poisoned memry. "mm: enable large folios swap-in support" from Barry Song. Support the swapin of mTHP memory into appropriately-sized folios, rather than into single-page folios. ---------------------------------------------------------------- Alex Williamson (1): vfio/pci: implement huge_fault support Alexander Zhu (1): mm: selftest to verify zero-filled pages are mapped to zeropage Andrew Morton (2): include/linux/mmzone.h: clean up watermark accessors mm/page_alloc: fix build with CONFIG_UNACCEPTED_MEMORY=3Dn Andrey Konovalov (1): kasan: simplify and clarify Makefile Anshuman Khandual (1): mm/debug_vm_pgtable: Use pxdp_get() for accessing page table entries Baolin Wang (16): mm: shmem: simplify the suitable huge orders validation for tmpfs mm: shmem: rename shmem_is_huge() to shmem_huge_global_enabled() mm: shmem: move shmem_huge_global_enabled() into shmem_allowable_huge= _orders() mm: swap: extend swap_shmem_alloc() to support batch SWAP_MAP_SHMEM f= lag setting mm: shmem: extend shmem_partial_swap_usage() to support large folio s= wap mm: filemap: use xa_get_order() to get the swap entry order mm: shmem: use swap_free_nr() to free shmem swap entries mm: shmem: support large folio allocation for shmem_replace_folio() mm: shmem: drop folio reference count using 'nr_pages' in shmem_delet= e_from_page_cache() mm: shmem: split large entry if the swapin folio is not large mm: shmem: support large folio swap out mm: khugepaged: expand the is_refcount_suitable() to support file fol= ios mm: khugepaged: use the number of pages in the folio to check the ref= erence count mm: khugepaged: support shmem mTHP copy mm: khugepaged: support shmem mTHP collapse selftests: mm: support shmem mTHP collapse testing Barry Song (10): mm: extend 'usage' parameter so that cluster_swap_free_nr() can be re= used mm: swap: add nr argument in swapcache_prepare and swapcache_clear to= support large folios mm: rename instances of swap_info_struct to meaningful 'si' mm: attempt to batch free swap entries for zap_pte_range() mm: count the number of anonymous THPs per size mm: count the number of partially mapped anonymous THPs per size mm: document __GFP_NOFAIL must be blockable mm: warn about illegal __GFP_NOFAIL usage in a more appropriate locat= ion and manner mm: fix swap_read_folio_zeromap() for large folios with partial zerom= ap mm: add nr argument in mem_cgroup_swapin_uncharge_swap() helper to su= pport large folios Carlos Maiolino (1): shmem_quota: build the object file conditionally to the config option Chris Li (3): mm: swap: swap cluster switch to double link list mm: swap: mTHP allocate swap entries from nonfull list mm: swap: separate SSD allocation from scan_swap_map_slots() Christophe Leroy (1): set_memory: add __must_check to generic stubs Chuanhua Han (1): mm: support large folios swap-in for sync io devices Daniel Gomez (1): mm: shmem: return number of pages beeing freed in shmem_free_swap Danilo Krummrich (4): mm: vmalloc: implement vrealloc() mm: kvmalloc: align kvrealloc() with krealloc() mm: krealloc: consider spare memory for __GFP_ZERO mm: krealloc: clarify valid usage of __GFP_ZERO David Finkel (2): mm, memcg: cg2 memory{.swap,}.peak write handlers mm, memcg: cg2 memory{.swap,}.peak write tests David Gow (1): mm: only enforce minimum stack gap size if it's sensible David Hildenbrand (24): mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig o= ptions mm/hugetlb: enforce that PMD PT sharing has split PMD PT locks powerpc/8xx: document and enforce that split PT locks are not used mm: simplify arch_make_folio_accessible() mm/gup: convert to arch_make_folio_accessible() s390/uv: drop arch_make_page_accessible() mm/hugetlb: remove hugetlb_follow_page_mask() leftover mm/rmap: cleanup partially-mapped handling in __folio_remove_rmap() mm: clarify folio_likely_mapped_shared() documentation for KSM folios mm: provide vm_normal_(page|folio)_pmd() with CONFIG_PGTABLE_HAS_HUGE= _LEAVES mm/pagewalk: introduce folio_walk_start() + folio_walk_end() mm/migrate: convert do_pages_stat_array() from follow_page() to folio= _walk mm/migrate: convert add_page_for_migration() from follow_page() to fo= lio_walk mm/ksm: convert get_mergeable_page() from follow_page() to folio_walk mm/ksm: convert scan_get_next_rmap_item() from follow_page() to folio= _walk mm/huge_memory: convert split_huge_pages_pid() from follow_page() to = folio_walk s390/uv: convert gmap_destroy_page() from follow_page() to folio_walk s390/mm/fault: convert do_secure_storage_access() from follow_page() = to folio_walk mm: remove follow_page() mm/ksm: convert break_ksm() from walk_page_range_vma() to folio_walk mm/rmap: minimize folio->_nr_pages_mapped updates when batching PTE (= un)mapping mm/rmap: use folio->_mapcount for small folios mm: always inline _compound_head() with CONFIG_HUGETLB_PAGE_OPTIMIZE_= VMEMMAP=3Dy selftests/mm: fix charge_reserved_hugetlb.sh test Dev Jain (1): selftests/mm: relax test to fail after 100 migration failures Hao Ge (1): mm/cma: change the addition of totalcma_pages in the cma_init_reserve= d_mem Hongbo Li (1): mm/vmalloc.c: make use of the helper macro LIST_HEAD() Huan Yang (1): mm: page_alloc: simpify page del and expand Huang Ying (2): resource: make alloc_free_mem_region() works for iomem_resource resource, kunit: add test case for region_intersects() Hugh Dickins (2): mm: shmem: fix minor off-by-one in shrinkable calculation mm: shmem: extend shmem_unused_huge_shrink() to all sizes Jann Horn (1): mm: fix (harmless) type confusion in lock_vma_under_rcu() Jason Wang (1): vduse: avoid using __GFP_NOFAIL Jeff Xu (1): selftest mm/mseal: fix test_seal_mremap_move_dontunmap_anyaddr Jianhui Zhou (1): percpu: remove pcpu_alloc_size() Jinjiang Tu (1): selftests/mm: remove unnecessary ia64 code and comment Johannes Weiner (1): mm: swapfile: fix SSD detection with swapfile on btrfs Josef Bacik (2): mm: cleanup flags usage in faultin_page mm: remove foll_flags in __get_user_pages Kairui Song (6): mm: swap: clean up initialization helper mm: swap: skip slot cache on freeing for mTHP mm: swap: allow cache reclaim to skip slot cache mm: swap: add a fragment cluster list mm: swap: relaim the cached parts that got scanned mm: swap: add a adaptive full cluster cache reclaim Kaiyang Zhao (4): mm: consider CMA pages in watermark check for NUMA balancing target n= ode mm: create promo_wmark_pages and clean up open-coded sites mm: print the promo watermark in zoneinfo mm,memcg: provide per-cgroup counters for NUMA balancing operations Kefeng Wang (16): mm: hugetlb: remove left over comment about follow_huge_foo() mm: remove migration for HugePage in isolate_single_pageblock() mm: memory_hotplug: remove head variable in do_migrate_range() mm: memory-failure: add unmap_poisoned_folio() mm: memory_hotplug: check hwpoisoned page firstly in do_migrate_range= () mm: migrate: add isolate_folio_to_list() mm: memory_hotplug: unify Huge/LRU/non-LRU movable folio isolation mm: migrate_device: convert to migrate_device_coherent_folio() mm: migrate_device: use a folio in migrate_device_range() mm: migrate_device: use more folio in migrate_device_unmap() mm: migrate_device: use more folio in migrate_device_finalize() mm: remove isolate_lru_page() mm: remove putback_lru_page() mm: migrate: remove unused includes mm: support poison recovery from do_cow_fault() mm: support poison recovery from copy_present_page() Kent Overstreet (2): mm: fix folio_alloc_noprof() mm/show_mem.c: report alloc tags in human readable units Kinsey Ho (5): cgroup: clarify css sibling linkage is protected by cgroup_mutex or R= CU mm: don't hold css->refcnt during traversal mm: increment gen # before restarting traversal mm: restart if multiple traversals raced mm: clean up mem_cgroup_iter() Kirill A. Shutemov (7): mm: reduce deferred struct page init ifdeffery mm: accept memory in __alloc_pages_bulk() mm: introduce PageUnaccepted() page type mm: rework accept memory helpers mm: add a helper to accept page mm: page_isolation: handle unaccepted memory isolation mm: accept to promo watermark Liam R. Howlett (22): mm/vma: correctly position vma_iterator in __split_vma() mm/vma: introduce abort_munmap_vmas() mm/vma: introduce vmi_complete_munmap_vmas() mm/vma: extract the gathering of vmas from do_vmi_align_munmap() mm/vma: introduce vma_munmap_struct for use in munmap operations mm/vma: change munmap to use vma_munmap_struct() for accounting and s= urrounding vmas mm/vma: extract validate_mm() from vma_complete() mm/vma: inline munmap operation in mmap_region() mm/vma: expand mmap_region() munmap call mm/vma: support vma =3D=3D NULL in init_vma_munmap() mm/mmap: reposition vma iterator in mmap_region() mm/vma: track start and end for munmap in vma_munmap_struct mm: clean up unmap_region() argument list mm/mmap: avoid zeroing vma tree in mmap_region() mm: change failure of MAP_FIXED to restoring the gap on failure mm/mmap: use PHYS_PFN in mmap_region() mm/mmap: use vms accounted pages in mmap_region() ipc/shm, mm: drop do_vma_munmap() mm: move may_expand_vm() check in mmap_region() mm/vma: drop incorrect comment from vms_gather_munmap_vmas() mm/vma.h: optimise vma_munmap_struct maple_tree: mark three functions as __maybe_unused Linus Torvalds (1): mm: remove legacy install_special_mapping() code Lorenzo Stoakes (17): userfaultfd: move core VMA manipulation logic to mm/userfaultfd.c mm: move vma_modify() and helpers to internal header mm: move vma_shrink(), vma_expand() to internal header mm: move internal core VMA manipulation functions to own file MAINTAINERS: add entry for new VMA files tools: separate out shared radix-tree components tools: add skeleton code for userland testing of VMA logic tools: improve vma test Makefile tools: add VMA merge tests mm: introduce vma_merge_struct and abstract vma_merge(),vma_modify() mm: remove duplicated open-coded VMA policy check mm: abstract vma_expand() to use vma_merge_struct mm: avoid using vma_merge() for new VMAs mm: make vma_prepare() and friends static and internal to vma.c mm: introduce commit_merge(), abstracting final commit of merge mm: refactor vma_merge() into modify-only vma_merge_existing_range() mm: rework vm_ops->close() handling on VMA merge Marco Elver (1): kfence: introduce burst mode Mark Brown (3): mm: make arch_get_unmapped_area() take vm_flags by default mm: pass vm_flags to generic_get_unmapped_area() mm: care about shadow stack guard gap when getting an unmapped area Mateusz Guzik (1): mm/hugetlb: sort out global lock annotations Matthew Cassell (1): mm: add node_reclaim successes to VM event counters Matthew Wilcox (Oracle) (18): fs: remove calls to set and clear the folio error flag mm: remove PG_error mm: return the folio from swapin_readahead printf: remove %pGt support mm: introduce page_mapcount_is_type() mm: support only one page_type per page zsmalloc: use all available 24 bits of page_type mm: remove PageActive mm: remove PageSwapBacked mm: remove PageReadahead mm: remove PageSwapCache mm: remove PageUnevictable mm: remove PageMlocked mm: remove PageOwnerPriv1 mm: remove page_has_private() mm: rename PG_mappedtodisk to PG_owner_2 x86: remove PG_uncached swap: convert swapon() to use a folio Miao Wang (1): mm: vmalloc: add optimization hint on page existence check Michael Ellerman (4): mm: add optional close() to struct vm_special_mapping powerpc/mm: handle VDSO unmapping via close() rather than arch_unmap() mm: remove arch_unmap() powerpc/vdso: refactor error handling Michal Koutn=FD (1): memcg: cleanup with !CONFIG_MEMCG_V1 Mike Rapoport (Microsoft) (26): mm: move kernel/numa.c to mm/ MIPS: sgi-ip27: make NODE_DATA() the same as on all other architectur= es MIPS: sgi-ip27: ensure node_possible_map only contains valid nodes MIPS: sgi-ip27: drop HAVE_ARCH_NODEDATA_EXTENSION MIPS: loongson64: rename __node_data to node_data MIPS: loongson64: drop HAVE_ARCH_NODEDATA_EXTENSION arch, mm: move definition of node_data to generic code mm: drop CONFIG_HAVE_ARCH_NODEDATA_EXTENSION arch, mm: pull out allocation of NODE_DATA to generic code x86/numa: simplify numa_distance allocation x86/numa: use get_pfn_range_for_nid to verify that node spans memory x86/numa: move FAKE_NODE_* defines to numa_emu x86/numa_emu: simplify allocation of phys_dist x86/numa_emu: split __apicid_to_node update to a helper function x86/numa_emu: use a helper function to get MAX_DMA32_PFN x86/numa: numa_{add,remove}_cpu: make cpu parameter unsigned mm: introduce numa_memblks mm: move numa_distance and related code from x86 to numa_memblks mm: introduce numa_emulation mm: numa_memblks: introduce numa_memblks_init mm: numa_memblks: make several functions and variables static mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizing = meminfo of, numa: return -EINVAL when no numa-node-id is found arch_numa: switch over to numa_memblks mm: make range-to-target_node lookup facility a part of numa_memblks docs: move numa=3Dfake description to kernel-parameters.txt Mike Yuan (2): selftests: test_zswap: add test for hierarchical zswap.writeback Documentation/cgroup-v2: clarify that zswap.writeback is ignored if z= swap is disabled Muchun Song (2): mm: kmem: remove mem_cgroup_from_obj() mm: kmem: add lockdep assertion to obj_cgroup_memcg Nanyong Sun (2): mm: migrate: simplify find_mm_struct() mm: thp: simplify split_huge_pages_pid() Nhat Pham (2): zswap: implement a second chance algorithm for dynamic zswap shrinker zswap: track swapins from disk more accurately Oleg Nesterov (3): Revert "uprobes: use vm_special_mapping close() functionality" uprobes: introduce the global struct vm_special_mapping xol_mapping uprobes: turn xol_area->pages[2] into xol_area->page Pasha Tatashin (2): vmstat: kernel stack usage histogram task_stack: uninline stack_not_used Pavel Tikhomirov (2): kmemleak: enable tracking for percpu pointers kmemleak-test: add percpu leak Pedro Falcato (8): selftests/mm: add mseal test for no-discard madvise mm: move can_modify_vma to mm/vma.h mm/munmap: replace can_modify_mm with can_modify_vma mm/mprotect: replace can_modify_mm with can_modify_vma mm/mremap: replace can_modify_mm with can_modify_vma mseal: replace can_modify_mm_madv with a vma variant mm: remove can_modify_mm() selftests/mm: add more mseal traversal tests Peng Hao (1): mm/damon/lru_sort: adjust local variable to dynamic allocation Peter Xu (25): mm/dax: dump start address in fault handler mm/mprotect: push mmu notifier to PUDs mm/powerpc: add missing pud helpers mm/x86: make pud_leaf() only care about PSE bit mm/x86: implement arch_check_zapped_pud() mm/x86: add missing pud helpers mm/mprotect: fix dax pud handlings mm: introduce ARCH_SUPPORTS_HUGE_PFNMAP and special bits to pmd/pud mm: drop is_huge_zero_pud() mm: mark special bits for huge pfn mappings when inject mm: allow THP orders for PFNMAPs mm/gup: detect huge pfnmap entries in gup-fast mm/pagewalk: check pfnmap for folio_walk_start() mm/fork: accept huge pfnmap entries mm: always define pxx_pgprot() mm: new follow_pfnmap API KVM: use follow_pfnmap API s390/pci_mmio: use follow_pfnmap API mm/x86/pat: use the new follow_pfnmap API vfio: use the new follow_pfnmap API acrn: use the new follow_pfnmap API mm/access_process_vm: use the new follow_pfnmap API mm: remove follow_pte() mm/x86: support large pfn mappings mm/arm64: support large pfn mappings Rik van Riel (1): mm,tmpfs: consider end of file write in shmem_is_huge Roman Gushchin (3): mm: memcg: don't call propagate_protected_usage() needlessly mm: page_counters: put page_counter_calculate_protection() under CONF= IG_MEMCG mm: page_counters: initialize usage using ATOMIC_LONG_INIT() macro Ryan Roberts (3): mm: override mTHP "enabled" defaults at kernel cmdline mm: cleanup count_mthp_stat() definition mm: tidy up shmem mTHP controls and stats SeongJae Park (18): selftests/damon: add access_memory_even to .gitignore selftests/damon: cleanup __pycache__/ with 'make clean' selftests/damon: add execute permissions to test scripts mm/damon/core-test: test only vaddr case on ops registration test mm/damon/core-test: fix damon_test_ops_registration() for DAMON_VADDR= unset case mm/damon/dbgfs-test: skip dbgfs_set_targets() test if PADDR is not re= gistered mm/damon/dbgfs-test: skip dbgfs_set_init_regions() test if PADDR is n= ot registered mm/damon: move kunit tests to tests/ subdirectory with _kunit suffix mm/damon/tests: add .kunitconfig file for DAMON kunit tests mm/damon/core: introduce per-context region priorities histogram buff= er mm/damon/core: replace per-quota regions priority histogram buffer us= age with per-context one mm/damon/core: remove per-scheme region priority histogram buffer Revert "mm/damon/lru_sort: adjust local variable to dynamic allocatio= n" Docs/damon: use damonitor GitHub organization instead of awslabs Docs/damon/maintainer-profile: add links in place Docs/damon/maintainer-profile: document Google calendar for bi-weekly= meetups mm/damon/tests/vaddr-kunit: init maple tree without MT_FLAGS_LOCK_EXT= ERN mm/damon/tests/core-kunit: skip damon_test_nr_accesses_to_accesses_bp= () if aggr_interval is zero Sergey Senozhatsky (26): lib: zstd: export API needed for dictionary support lib: lz4hc: export LZ4_resetStreamHC symbol lib: zstd: fix null-deref in ZSTD_createCDict_advanced2() zram: introduce custom comp backends API zram: add lzo and lzorle compression backends support zram: add lz4 compression backend support zram: add lz4hc compression backend support zram: add zstd compression backend support zram: pass estimated src size hint to zstd zram: add zlib compression backend support zram: add 842 compression backend support zram: check that backends array has at least one backend zram: introduce zcomp_params structure zram: recalculate zstd compression params once zram: introduce algorithm_params device attribute zram: add support for dict comp config zram: introduce zcomp_req structure zram: introduce zcomp_ctx structure zram: move immutable comp params away from per-CPU context zram: add dictionary support to lz4 zram: add dictionary support to lz4hc zram: add dictionary support to zstd backend Documentation/zram: add documentation for algorithm parameters zram: support priority parameter in recompression mm: Kconfig: fixup zsmalloc configuration zram: free secondary algorithms names Shakeel Butt (15): memcg: increase the valid index range for memcg stats memcg: replace memcg ID idr with xarray memcg: use ratelimited stats flush in the reclaim memcg: move v1 only percpu stats in separate struct memcg: move mem_cgroup_event_ratelimit to v1 code memcg: move mem_cgroup_charge_statistics to v1 code memcg: move v1 events and statistics code to v1 file memcg: make v1 only functions static memcg: allocate v1 event percpu only on v1 deployment memcg: make PGPGIN and PGPGOUT v1 only memcg: initiate deprecation of v1 tcp accounting memcg: initiate deprecation of v1 soft limit memcg: initiate deprecation of oom_control memcg: initiate deprecation of pressure_level mm: replace xa_get_order with xas_get_order where appropriate Sidhartha Kumar (19): maple_tree: reset mas->index and mas->last on write retries maple_tree: add test to replicate low memory race conditions maple_tree: introduce store_type enum maple_tree: introduce mas_wr_prealloc_setup() maple_tree: move up mas_wr_store_setup() and mas_wr_prealloc_setup() maple_tree: introduce mas_wr_store_type() maple_tree: remove mas_destroy() from mas_nomem() maple_tree: preallocate nodes in mas_erase() maple_tree: use mas_store_gfp() in mtree_store_range() maple_tree: print store type in mas_dump() maple_tree: use store type in mas_wr_store_entry() maple_tree: convert mas_insert() to preallocate nodes maple_tree: simplify mas_commit_b_node() maple_tree: remove mas_wr_modify() maple_tree: have mas_store() allocate nodes if needed maple_tree: remove node allocations from various write helper functio= ns maple_tree: remove repeated sanity checks from write helper functions maple_tree: remove unneeded mas_wr_walk() in mas_store_prealloc() maple_tree: make write helper functions void Sven Schnelle (1): uprobes: use vm_special_mapping close() functionality Takaya Saeki (2): filemap: add trace events for get_pages, map_pages, and fault filemap: fix the last_index of mm_filemap_get_pages Takero Funaki (2): mm: zswap: fix global shrinker memcg iteration mm: zswap: fix global shrinker error handling logic Thorsten Blum (2): lib: test_hmm: use min() to improve dmirror_exclusive() mm: shrinker: use min() to improve shrinker_debugfs_scan_write() Tianchen Ding (1): kfence: save freeing stack trace at calling time instead of freeing t= ime Uladzislau Rezki (Sony) (2): mm: vmalloc: refactor vm_area_alloc_pages() function mm/vmalloc.c: use "high-order" in description non 0-order pages Uros Bizjak (3): mm/z3fold: add __percpu annotation to *unbuddied pointer in struct z3= fold_pool err.h: add ERR_PTR_PCPU(), PTR_ERR_PCPU() and IS_ERR_PCPU() macros mm/kmemleak: use IS_ERR_PCPU() for pointer in the percpu address space Usama Arif (5): mm: store zero pages to be swapped out in a bitmap mm: remove code to handle same filled pages mm: introduce a pageflag for partially mapped folios mm: split underused THPs mm: add sysfs entry to disable splitting underused THPs Valdis Kletnieks (1): mm: fix typo in Kconfig Wei Yang (8): mm: improve code consistency with zonelist_* helper functions mm/memory_hotplug: get rid of __ref maple_tree: fix comment typo of ma_root maple_tree: fix comment typo with corresponding maple_status maple_tree: arange64 node is not a leaf node maple_tree: dump error message based on format maple_tree: cleanup function descriptions maple_tree: fix comment typo on ma_flag of allocation tree Xiao Yang (1): mm/vma: return the exact errno in vms_gather_munmap_vmas() Yafang Shao (1): mm: allow read-ahead with IOCB_NOWAIT set Yanfei Xu (1): memory tier: fix deadlock warning while onlining pages Yang Li (1): mm: remove duplicated include in vma_internal.h Yosry Ahmed (2): mm: page_alloc: fix missed updates of PGFREE in free_unref_{page/foli= os} mm: z3fold: deprecate CONFIG_Z3FOLD Yu Zhao (14): mm/hugetlb_vmemmap: don't synchronize_rcu() without HVO mm/swap: reduce indentation level mm/swap: rename cpu_fbatches->activate mm/swap: fold lru_rotate into cpu_fbatches mm/swap: remove remaining _fn suffix mm/swap: remove boilerplate mm/hugetlb_vmemmap: batch HVO work when demoting mm/contig_alloc: support __GFP_COMP mm/cma: add cma_{alloc,free}_folio() mm/hugetlb: use __GFP_COMP for gigantic folios mm: remap unused subpages to shared zeropage when splitting isolated = thp mm/codetag: fix a typo mm/codetag: fix pgalloc_tag_split() mm/codetag: add pgalloc_tag_copy() Yuanchu Xie (1): mm: multi-gen LRU: ignore non-leaf pmd_young for force_scan=3Dtrue Yuesong Li (1): mm:page-writeback: use folio_next_index() helper in writeback_iter() Yujie Liu (1): sched/numa: Fix the vma scan starving issue ZhangPeng (1): mm/vmalloc.c: use helper function va_size() Zhaoyu Liu (1): mm: swap: allocate folio only first time in __read_swap_cache_async() Zhiguo Jiang (1): mm: shrink skip folio mapped by an exiting process Zhongkun He (1): mm:page_alloc: fix the NULL ac->nodemask in __alloc_pages_slowpath() Zi Yan (4): memory tiering: read last_cpupid correctly in do_huge_pmd_numa_page() memory tiering: introduce folio_use_access_time() check memory tiering: count PGPROMOTE_SUCCESS when mem tiering is enabled. mm/migrate: move common code to numa_migrate_check (was numa_migrate_= prep) qiwu.chen (1): mm: kfence: print the elapsed time for allocated/freed track yangge (1): mm/swap: take folio refcount after testing the LRU flag Documentation/ABI/testing/sysfs-block-zram | 7 + Documentation/admin-guide/blockdev/zram.rst | 66 +- Documentation/admin-guide/cgroup-v1/memory.rst | 32 +- Documentation/admin-guide/cgroup-v2.rst | 43 +- Documentation/admin-guide/kernel-parameters.txt | 24 + Documentation/admin-guide/mm/damon/start.rst | 4 +- Documentation/admin-guide/mm/damon/usage.rst | 8 +- Documentation/admin-guide/mm/transhuge.rst | 64 +- Documentation/arch/x86/x86_64/boot-options.rst | 12 - Documentation/core-api/printk-formats.rst | 4 +- Documentation/dev-tools/kfence.rst | 7 + .../features/vm/PG_uncached/arch-support.txt | 30 - Documentation/filesystems/vfs.rst | 3 +- Documentation/mm/damon/design.rst | 2 +- Documentation/mm/damon/maintainer-profile.rst | 86 +- Documentation/mm/page_migration.rst | 22 +- Documentation/mm/transhuge.rst | 6 +- Documentation/mm/unevictable-lru.rst | 8 +- .../zh_CN/admin-guide/mm/damon/start.rst | 4 +- .../zh_CN/admin-guide/mm/damon/usage.rst | 8 +- .../translations/zh_CN/mm/page_migration.rst | 6 +- .../zh_TW/admin-guide/mm/damon/start.rst | 4 +- .../zh_TW/admin-guide/mm/damon/usage.rst | 8 +- MAINTAINERS | 14 + arch/alpha/kernel/osf_sys.c | 2 +- arch/arc/mm/mmap.c | 3 +- arch/arm/mm/fault-armv.c | 6 +- arch/arm/mm/mmap.c | 7 +- arch/arm64/Kconfig | 4 +- arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/mmzone.h | 13 - arch/arm64/include/asm/pgtable.h | 30 + arch/arm64/include/asm/topology.h | 1 + arch/arm64/kvm/nested.c | 1 - arch/csky/abiv1/mmap.c | 3 +- arch/csky/kernel/vdso.c | 28 +- arch/hexagon/kernel/vdso.c | 14 +- arch/loongarch/configs/loongson3_defconfig | 1 - arch/loongarch/include/asm/Kbuild | 1 + arch/loongarch/include/asm/mmzone.h | 16 - arch/loongarch/include/asm/topology.h | 1 + arch/loongarch/kernel/numa.c | 21 - arch/loongarch/mm/mmap.c | 5 +- arch/mips/Kconfig | 5 - arch/mips/include/asm/mach-ip27/mmzone.h | 1 - arch/mips/include/asm/mach-loongson64/mmzone.h | 4 - arch/mips/loongson64/numa.c | 28 +- arch/mips/mm/mmap.c | 5 +- arch/mips/sgi-ip27/ip27-memory.c | 12 +- arch/mips/sgi-ip27/ip27-smp.c | 2 + arch/nios2/mm/init.c | 12 +- arch/parisc/kernel/sys_parisc.c | 5 +- arch/parisc/mm/hugetlbpage.c | 2 +- arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/include/asm/book3s/64/pgtable.h | 3 + arch/powerpc/include/asm/mmu_context.h | 9 - arch/powerpc/include/asm/mmzone.h | 6 - arch/powerpc/include/asm/pgtable.h | 1 + arch/powerpc/kernel/vdso.c | 35 +- arch/powerpc/mm/book3s64/pgtable.c | 20 + arch/powerpc/mm/book3s64/slice.c | 10 +- arch/powerpc/mm/numa.c | 26 +- arch/powerpc/mm/pgtable-frag.c | 6 +- arch/powerpc/mm/pgtable.c | 6 + arch/powerpc/platforms/pseries/papr-vpd.c | 5 +- arch/riscv/include/asm/Kbuild | 1 + arch/riscv/include/asm/mmzone.h | 13 - arch/riscv/include/asm/topology.h | 4 + arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/mmzone.h | 17 - arch/s390/include/asm/page.h | 2 - arch/s390/include/asm/pgtable.h | 1 + arch/s390/kernel/numa.c | 3 - arch/s390/kernel/uv.c | 23 +- arch/s390/mm/fault.c | 16 +- arch/s390/mm/mmap.c | 4 +- arch/s390/pci/pci_mmio.c | 22 +- arch/sh/include/asm/mmzone.h | 3 - arch/sh/kernel/vsyscall/vsyscall.c | 14 +- arch/sh/mm/init.c | 7 +- arch/sh/mm/mmap.c | 5 +- arch/sh/mm/numa.c | 3 - arch/sparc/include/asm/mmzone.h | 4 - arch/sparc/include/asm/pgtable_64.h | 1 + arch/sparc/kernel/sys_sparc_32.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 4 +- arch/sparc/mm/init_64.c | 11 +- arch/x86/Kconfig | 15 +- arch/x86/boot/compressed/misc.c | 2 +- arch/x86/boot/compressed/misc.h | 2 +- arch/x86/include/asm/Kbuild | 1 + arch/x86/include/asm/mmu_context.h | 5 - arch/x86/include/asm/mmzone.h | 6 - arch/x86/include/asm/mmzone_32.h | 17 - arch/x86/include/asm/mmzone_64.h | 18 - arch/x86/include/asm/numa.h | 26 +- arch/x86/include/asm/pgtable.h | 150 +- arch/x86/include/asm/pgtable_64.h | 1 - arch/x86/include/asm/sparsemem.h | 9 - arch/x86/kernel/sys_x86_64.c | 21 +- arch/x86/mm/Makefile | 1 - arch/x86/mm/amdtopology.c | 1 + arch/x86/mm/numa.c | 622 +----- arch/x86/mm/numa_internal.h | 24 - arch/x86/mm/pat/memtype.c | 25 +- arch/x86/mm/pgtable.c | 18 + arch/x86/um/vdso/vma.c | 12 +- arch/x86/xen/mmu_pv.c | 7 +- arch/xtensa/kernel/syscall.c | 3 +- drivers/acpi/numa/srat.c | 1 + drivers/base/Kconfig | 1 + drivers/base/arch_numa.c | 224 +- drivers/block/zram/Kconfig | 77 +- drivers/block/zram/Makefile | 8 + drivers/block/zram/backend_842.c | 61 + drivers/block/zram/backend_842.h | 10 + drivers/block/zram/backend_deflate.c | 146 ++ drivers/block/zram/backend_deflate.h | 10 + drivers/block/zram/backend_lz4.c | 127 ++ drivers/block/zram/backend_lz4.h | 10 + drivers/block/zram/backend_lz4hc.c | 128 ++ drivers/block/zram/backend_lz4hc.h | 10 + drivers/block/zram/backend_lzo.c | 59 + drivers/block/zram/backend_lzo.h | 10 + drivers/block/zram/backend_lzorle.c | 59 + drivers/block/zram/backend_lzorle.h | 10 + drivers/block/zram/backend_zstd.c | 226 ++ drivers/block/zram/backend_zstd.h | 10 + drivers/block/zram/zcomp.c | 194 +- drivers/block/zram/zcomp.h | 71 +- drivers/block/zram/zram_drv.c | 141 +- drivers/block/zram/zram_drv.h | 1 + drivers/cxl/Kconfig | 2 +- drivers/dax/Kconfig | 2 +- drivers/dax/device.c | 6 +- drivers/firmware/efi/libstub/efistub.h | 2 +- drivers/firmware/efi/libstub/unaccepted_memory.c | 3 +- drivers/firmware/efi/unaccepted_memory.c | 18 +- drivers/gpu/drm/drm_exec.c | 3 +- drivers/of/of_numa.c | 5 +- drivers/vdpa/vdpa_user/iova_domain.c | 19 +- drivers/vdpa/vdpa_user/iova_domain.h | 1 + drivers/vfio/pci/vfio_pci_core.c | 60 +- drivers/vfio/vfio_iommu_type1.c | 16 +- drivers/virt/acrn/mm.c | 16 +- fs/Kconfig | 4 + fs/exec.c | 81 +- fs/proc/internal.h | 3 +- fs/proc/page.c | 11 +- fs/userfaultfd.c | 171 +- fs/xfs/scrub/xfile.c | 6 +- fs/xfs/xfs_buf_mem.c | 2 +- fs/xfs/xfs_log_recover.c | 2 +- include/asm-generic/mm_hooks.h | 11 +- include/asm-generic/mmzone.h | 5 + include/asm-generic/numa.h | 8 +- include/linux/alloc_tag.h | 26 +- include/linux/cgroup-defs.h | 11 +- include/linux/cgroup.h | 3 + include/linux/cma.h | 16 + include/linux/damon.h | 3 +- include/linux/err.h | 9 + include/linux/fs.h | 1 - include/linux/gfp.h | 25 +- include/linux/gfp_types.h | 8 +- include/linux/huge_mm.h | 130 +- include/linux/hugetlb.h | 17 +- include/linux/kernel-page-flags.h | 3 +- include/linux/kfence.h | 2 +- include/linux/khugepaged.h | 1 + include/linux/maple_tree.h | 20 +- include/linux/memcontrol.h | 67 +- include/linux/memory_hotplug.h | 48 - include/linux/migrate.h | 3 + include/linux/mm.h | 300 ++- include/linux/mm_types.h | 22 +- include/linux/mm_types_task.h | 3 - include/linux/mmzone.h | 35 +- include/linux/numa.h | 8 + include/linux/numa_memblks.h | 58 + include/linux/page-flags.h | 202 +- include/linux/page_counter.h | 27 +- include/linux/pagewalk.h | 58 + include/linux/percpu.h | 1 - include/linux/pgalloc_tag.h | 31 - include/linux/pgtable.h | 18 + include/linux/rmap.h | 11 +- include/linux/sched/mm.h | 27 +- include/linux/sched/task_stack.h | 18 +- include/linux/set_memory.h | 8 +- include/linux/shmem_fs.h | 15 +- include/linux/slab.h | 14 +- include/linux/swap.h | 44 +- include/linux/userfaultfd_k.h | 19 + include/linux/vm_event_item.h | 26 + include/linux/vmalloc.h | 4 + include/linux/vmstat.h | 1 + include/linux/writeback.h | 3 + include/linux/zstd.h | 167 ++ include/linux/zswap.h | 16 +- include/trace/events/filemap.h | 84 + include/trace/events/mmflags.h | 36 +- include/trace/events/oom.h | 4 +- include/uapi/linux/kernel-page-flags.h | 2 +- init/Kconfig | 2 +- ipc/shm.c | 8 +- kernel/Makefile | 1 - kernel/cgroup/cgroup-internal.h | 2 + kernel/cgroup/cgroup.c | 23 +- kernel/events/uprobes.c | 36 +- kernel/exit.c | 57 + kernel/fork.c | 4 +- kernel/numa.c | 26 - kernel/resource.c | 25 +- kernel/resource_kunit.c | 143 ++ kernel/sched/core.c | 4 +- kernel/sched/fair.c | 14 +- kernel/vmcore_info.c | 8 +- lib/Kconfig.debug | 1 + lib/fortify_kunit.c | 3 +- lib/lz4/lz4hc_compress.c | 1 + lib/maple_tree.c | 805 +++---- lib/test_hmm.c | 5 +- lib/test_printf.c | 26 - lib/vsprintf.c | 21 - lib/zstd/compress/zstd_compress.c | 2 + lib/zstd/zstd_compress_module.c | 49 + lib/zstd/zstd_decompress_module.c | 36 + mm/Kconfig | 86 +- mm/Makefile | 8 +- mm/cma.c | 57 +- mm/compaction.c | 47 +- mm/damon/core.c | 24 +- mm/damon/dbgfs.c | 2 +- mm/damon/sysfs.c | 2 +- mm/damon/tests/.kunitconfig | 22 + mm/damon/{core-test.h =3D> tests/core-kunit.h} | 35 +- mm/damon/{dbgfs-test.h =3D> tests/dbgfs-kunit.h} | 10 + mm/damon/{sysfs-test.h =3D> tests/sysfs-kunit.h} | 0 mm/damon/{vaddr-test.h =3D> tests/vaddr-kunit.h} | 2 +- mm/damon/vaddr.c | 2 +- mm/debug.c | 31 +- mm/debug_vm_pgtable.c | 50 +- mm/filemap.c | 67 +- mm/folio-compat.c | 12 - mm/gup.c | 68 +- mm/huge_memory.c | 589 ++++- mm/hugetlb.c | 442 ++-- mm/hugetlb_cgroup.c | 4 +- mm/hugetlb_vmemmap.c | 40 +- mm/internal.h | 216 +- mm/kfence/core.c | 53 +- mm/kfence/kfence.h | 1 + mm/kfence/report.c | 15 +- mm/khugepaged.c | 75 +- mm/kmemleak.c | 159 +- mm/ksm.c | 146 +- mm/madvise.c | 13 +- mm/memblock.c | 2 +- mm/memcontrol-v1.c | 126 +- mm/memcontrol-v1.h | 26 +- mm/memcontrol.c | 490 +++-- mm/memory-failure.c | 92 +- mm/memory-tiers.c | 22 +- mm/memory.c | 562 +++-- mm/memory_hotplug.c | 85 +- mm/mempolicy.c | 8 +- mm/migrate.c | 270 ++- mm/migrate_device.c | 108 +- mm/mm_init.c | 12 +- mm/mmap.c | 2250 +++-------------= ---- mm/mmu_notifier.c | 2 + mm/mmzone.c | 2 +- mm/mprotect.c | 86 +- mm/mremap.c | 32 +- mm/mseal.c | 55 +- mm/nommu.c | 11 +- mm/numa.c | 69 + {arch/x86/mm =3D> mm}/numa_emulation.c | 42 +- mm/numa_memblks.c | 571 +++++ mm/page-writeback.c | 2 +- mm/page_alloc.c | 349 +-- mm/page_counter.c | 48 +- mm/page_io.c | 113 +- mm/page_isolation.c | 36 +- mm/pagewalk.c | 202 ++ mm/percpu.c | 31 - mm/rmap.c | 71 +- mm/shmem.c | 450 ++-- mm/shmem_quota.c | 3 - mm/show_mem.c | 11 +- mm/shrinker_debug.c | 2 +- mm/slab_common.c | 27 +- mm/swap.c | 298 ++- mm/swap.h | 44 +- mm/swap_cgroup.c | 2 + mm/swap_state.c | 78 +- mm/swapfile.c | 1482 +++++++------ mm/userfaultfd.c | 170 +- mm/util.c | 102 +- mm/vma.c | 2068 ++++++++++++++++= ++ mm/vma.h | 558 +++++ mm/vma_internal.h | 49 + mm/vmalloc.c | 139 +- mm/vmscan.c | 67 +- mm/vmstat.c | 28 + mm/z3fold.c | 2 +- mm/zsmalloc.c | 15 +- mm/zswap.c | 307 ++- samples/kmemleak/kmemleak-test.c | 2 + scripts/Makefile.kasan | 45 +- tools/mm/page-types.c | 13 +- tools/testing/memblock/internal.h | 2 +- tools/testing/radix-tree/.gitignore | 1 + tools/testing/radix-tree/Makefile | 72 +- tools/testing/radix-tree/maple.c | 109 +- tools/testing/radix-tree/xarray.c | 10 +- tools/testing/selftests/cgroup/cgroup_util.c | 22 + tools/testing/selftests/cgroup/cgroup_util.h | 2 + tools/testing/selftests/cgroup/test_memcontrol.c | 264 ++- tools/testing/selftests/cgroup/test_zswap.c | 75 +- tools/testing/selftests/damon/.gitignore | 1 + tools/testing/selftests/damon/Makefile | 2 + tools/testing/selftests/damon/damon_nr_regions.py | 0 .../selftests/damon/damos_apply_interval.py | 0 tools/testing/selftests/damon/damos_quota.py | 0 tools/testing/selftests/damon/damos_quota_goal.py | 0 .../testing/selftests/damon/damos_tried_regions.py | 0 .../selftests/damon/debugfs_target_ids_pid_leak.sh | 0 ...ebugfs_target_ids_read_before_terminate_race.sh | 0 .../sysfs_update_schemes_tried_regions_hang.py | 0 ..._update_schemes_tried_regions_wss_estimation.py | 0 tools/testing/selftests/mm/Makefile | 2 +- .../selftests/mm/charge_reserved_hugetlb.sh | 2 +- tools/testing/selftests/mm/hugepage-mmap.c | 18 +- tools/testing/selftests/mm/hugepage-shm.c | 18 +- tools/testing/selftests/mm/hugepage-vmemmap.c | 17 +- tools/testing/selftests/mm/khugepaged.c | 4 +- tools/testing/selftests/mm/map_hugetlb.c | 18 +- tools/testing/selftests/mm/migration.c | 17 +- tools/testing/selftests/mm/mseal_test.c | 197 +- tools/testing/selftests/mm/run_vmtests.sh | 2 +- tools/testing/selftests/mm/split_huge_page_test.c | 71 + tools/testing/selftests/mm/thp_settings.c | 46 +- tools/testing/selftests/mm/thp_settings.h | 9 +- tools/testing/selftests/mm/vm_util.c | 22 + tools/testing/selftests/mm/vm_util.h | 1 + tools/testing/selftests/mm/write_to_hugetlbfs.c | 21 +- .../{radix-tree/generated =3D> shared}/autoconf.h | 0 tools/testing/{radix-tree =3D> shared}/linux.c | 26 +- tools/testing/{radix-tree =3D> shared}/linux/bug.h | 0 tools/testing/{radix-tree =3D> shared}/linux/cpu.h | 0 tools/testing/{radix-tree =3D> shared}/linux/idr.h | 0 tools/testing/{radix-tree =3D> shared}/linux/init.h | 0 .../testing/{radix-tree =3D> shared}/linux/kconfig.h | 0 .../testing/{radix-tree =3D> shared}/linux/kernel.h | 0 .../{radix-tree =3D> shared}/linux/kmemleak.h | 0 .../{radix-tree =3D> shared}/linux/local_lock.h | 0 .../testing/{radix-tree =3D> shared}/linux/lockdep.h | 0 .../{radix-tree =3D> shared}/linux/maple_tree.h | 0 .../testing/{radix-tree =3D> shared}/linux/percpu.h | 0 .../testing/{radix-tree =3D> shared}/linux/preempt.h | 0 .../{radix-tree =3D> shared}/linux/radix-tree.h | 0 .../{radix-tree =3D> shared}/linux/rcupdate.h | 0 .../testing/{radix-tree =3D> shared}/linux/xarray.h | 0 tools/testing/shared/maple-shared.h | 9 + tools/testing/shared/maple-shim.c | 7 + tools/testing/shared/shared.h | 33 + tools/testing/shared/shared.mk | 72 + .../trace/events/maple_tree.h | 0 tools/testing/shared/xarray-shared.c | 5 + tools/testing/shared/xarray-shared.h | 4 + tools/testing/vma/.gitignore | 7 + tools/testing/vma/Makefile | 18 + tools/testing/vma/linux/atomic.h | 12 + tools/testing/vma/linux/mmzone.h | 38 + tools/testing/vma/vma.c | 1563 ++++++++++++++ tools/testing/vma/vma_internal.h | 923 ++++++++ virt/kvm/kvm_main.c | 19 +- 379 files changed, 16272 insertions(+), 8493 deletions(-) delete mode 100644 Documentation/features/vm/PG_uncached/arch-support.txt delete mode 100644 arch/arm64/include/asm/mmzone.h delete mode 100644 arch/loongarch/include/asm/mmzone.h delete mode 100644 arch/riscv/include/asm/mmzone.h delete mode 100644 arch/s390/include/asm/mmzone.h delete mode 100644 arch/x86/include/asm/mmzone.h delete mode 100644 arch/x86/include/asm/mmzone_32.h delete mode 100644 arch/x86/include/asm/mmzone_64.h create mode 100644 drivers/block/zram/backend_842.c create mode 100644 drivers/block/zram/backend_842.h create mode 100644 drivers/block/zram/backend_deflate.c create mode 100644 drivers/block/zram/backend_deflate.h create mode 100644 drivers/block/zram/backend_lz4.c create mode 100644 drivers/block/zram/backend_lz4.h create mode 100644 drivers/block/zram/backend_lz4hc.c create mode 100644 drivers/block/zram/backend_lz4hc.h create mode 100644 drivers/block/zram/backend_lzo.c create mode 100644 drivers/block/zram/backend_lzo.h create mode 100644 drivers/block/zram/backend_lzorle.c create mode 100644 drivers/block/zram/backend_lzorle.h create mode 100644 drivers/block/zram/backend_zstd.c create mode 100644 drivers/block/zram/backend_zstd.h create mode 100644 include/asm-generic/mmzone.h create mode 100644 include/linux/numa_memblks.h delete mode 100644 kernel/numa.c create mode 100644 mm/damon/tests/.kunitconfig rename mm/damon/{core-test.h =3D> tests/core-kunit.h} (93%) rename mm/damon/{dbgfs-test.h =3D> tests/dbgfs-kunit.h} (94%) rename mm/damon/{sysfs-test.h =3D> tests/sysfs-kunit.h} (100%) rename mm/damon/{vaddr-test.h =3D> tests/vaddr-kunit.h} (99%) create mode 100644 mm/numa.c rename {arch/x86/mm =3D> mm}/numa_emulation.c (94%) create mode 100644 mm/numa_memblks.c create mode 100644 mm/vma.c create mode 100644 mm/vma.h create mode 100644 mm/vma_internal.h mode change 100644 =3D> 100755 tools/testing/selftests/damon/damon_nr_regi= ons.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/damos_apply_i= nterval.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/damos_quota.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/damos_quota_g= oal.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/damos_tried_r= egions.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/debugfs_targe= t_ids_pid_leak.sh mode change 100644 =3D> 100755 tools/testing/selftests/damon/debugfs_targe= t_ids_read_before_terminate_race.sh mode change 100644 =3D> 100755 tools/testing/selftests/damon/sysfs_update_= schemes_tried_regions_hang.py mode change 100644 =3D> 100755 tools/testing/selftests/damon/sysfs_update_= schemes_tried_regions_wss_estimation.py rename tools/testing/{radix-tree/generated =3D> shared}/autoconf.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux.c (91%) rename tools/testing/{radix-tree =3D> shared}/linux/bug.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/cpu.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/idr.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/init.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/kconfig.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/kernel.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/kmemleak.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/local_lock.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/lockdep.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/maple_tree.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/percpu.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/preempt.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/radix-tree.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/rcupdate.h (100%) rename tools/testing/{radix-tree =3D> shared}/linux/xarray.h (100%) create mode 100644 tools/testing/shared/maple-shared.h create mode 100644 tools/testing/shared/maple-shim.c create mode 100644 tools/testing/shared/shared.h create mode 100644 tools/testing/shared/shared.mk rename tools/testing/{radix-tree =3D> shared}/trace/events/maple_tree.h (1= 00%) create mode 100644 tools/testing/shared/xarray-shared.c create mode 100644 tools/testing/shared/xarray-shared.h create mode 100644 tools/testing/vma/.gitignore create mode 100644 tools/testing/vma/Makefile create mode 100644 tools/testing/vma/linux/atomic.h create mode 100644 tools/testing/vma/linux/mmzone.h create mode 100644 tools/testing/vma/vma.c create mode 100644 tools/testing/vma/vma_internal.h . Date: Sat, 21 Sep 2024 12:14:21 +0900 From: Takashi Sakamoto To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net, tiwai@suse.de Subject: [GIT PULL] firewire updates for v6.12 Hi Linus, Please pull FireWire subsystem updates for v6.11. This updates includes a significant change to the processing context for isochronous packets. Hopefully, many developers will test it before the official release. I hope you have a pleasant trip ;) The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git tags/firewire-updates-6.12 for you to fetch changes up to f1cba5212e252243a539e079813bc96fbf53e241: firewire: core: rename cause flag of tracepoints event (2024-09-12 22:30:38 +0900) ---------------------------------------------------------------- firewire updates for v6.12 The batch of changes includes the followwing: - Replacing tasklet with usual workqueue for isochronous context - Replacing IDR with XArray - Utilizing guard macro where possible - Printing deprecation warning when enabling debug parameter of firewire-ohci module Additionally, it includes a single patch for sound subsystem which the subsystem maintainer acked: - Switching to nonatomic PCM operation In FireWire subsystem, tasklet has been used as the bottom half of 1394 OHCi hardIRQ so long. In the recent kernel updates, BH workqueue has been available, and some developers have proposed replacing tasklet with BH workqueue. While it is fortunate that developers are still considering the legacy subsystem, a simple replacement is not necessarily suitable. As a first step towards dropping tasklet, I've investigated the feasibility for 1394 OHCI isochronous context, and concluded that usual workqueue is available. In the context, the batch of packets is processed in the specific queue, thus the timing jitter caused by task scheduling is not so critical. Additionally, DMA transmission can be scheduled per-packet basis, therefore the context can be sleep between the operation of transmissions. Furthermore, in-kernel protocol implementation involves some CPU-bound tasks, which can sometimes consumes CPU time so long. These characteristics suggest that usual workqueue is suitable, through BH workqueues are not. The replacement with usual workqueue allows unit drivers to process the content of packets in non-atomic context. It brings some reliefs to some drivers in sound subsystem that spin-lock is not mandatory anymore during isochronous packet processing. ---------------------------------------------------------------- Takashi Sakamoto (55): firewire: ohci: use TCODE_LINK_INTERNAL consistently firewire: ohci: minor code refactoring to localize text table firewire: core: use common helper function to serialize phy configuration packet firewire: core: utilize kref to maintain fw_node with reference counting firewire: ohci: add static inline functions to serialize/deserialize data of AT DMA firewire: ohci: use static inline functions to serialize data of AT DMA firewire: ohci: add static inline functions to serialize/deserialize data of IT DMA firewire: ohci: use static inline functions to serialize data of IT DMA firewire: core: use guard macro to maintain static packet data for phy configuration firewire: core: use guard macro to maintain the list of card firewire: core: use guard macro to maintain the list of cdev clients firewire: ohci: use guard macro to serialize accesses to phy registers firewire: core: use guard macro to maintain RCU scope for transaction address handler firewire: core: use guard macro to access to IDR for fw_device firewire: core: use guard macro to maintain the list of address handler for transaction firewire: core: use guard macro to disable local IRQ firewire: core: use guard macro to maintain list of events for userspace clients firewire: core: use guard macro to maintain IDR of isochronous resources for userspace clients firewire: core: use guard macro to maintain isochronous context for userspace client firewire: core: use guard macro to maintain list of receivers for phy configuration packets firewire: core: use guard macro to maintain list of asynchronous transaction firewire: core: use guard macro to maintain properties of fw_card firewire: ohci: use guard macro to maintain bus time firewire: ohci: use guard macro to maintain image of configuration ROM firewire: ohci: use guard macro to serialize operations for isochronous contexts firewire: core: correct range of block for case of switch statement firewire: core: replace IDR with XArray to maintain fw_device firewire: core: use lock in Xarray instead of local R/W semaphore firewire: core: minor code refactoring to release client resource firewire: core: add helper functions to convert to parent resource structure firewire: core: add helper function to detect data of iso resource structure firewire: core: code refactoring to use idr_for_each_entry() macro instead of idr_for_each() function firewire: core: use xarray instead of idr to maintain client resource firewire: ohci: use helper macro for compiler aligned attribute firewire: ohci: remove unused wrapper macro for dev_info() firewire: core/ohci: minor refactoring for computation of configuration ROM size firewire: ohci: fix error path to detect initiated reset in TI TSB41BA3D phy firewire: core: update fw_device outside of device_find_child() firewire: ohci: deprecate debug parameter firewire: ohci: obsolete direct usage of printk_ratelimit() firewire: core: allocate workqueue to handle isochronous contexts in card firewire: core: add local API to queue work item to workqueue specific to isochronous contexts firewire: ohci: operate IT/IR events in sleepable work process instead of tasklet softIRQ firewire: core: non-atomic memory allocation for isochronous event to user client ALSA: firewire: use nonatomic PCM operation firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps firewire: core: expose kernel API to schedule work item to process isochronous context firewire: core: fulfill documentation of fw_iso_context_flush_completions() firewire: core: move workqueue handler from 1394 OHCI driver to core function firewire: core: use mutex to coordinate concurrent calls to flush completions Revert "firewire: core: use mutex to coordinate concurrent calls to flush completions" Revert "firewire: core: move workqueue handler from 1394 OHCI driver to core function" firewire: core: add helper function to retire descriptors firewire: core: update documentation of kernel APIs for flushing completions firewire: core: rename cause flag of tracepoints event Documentation/driver-api/firewire.rst | 2 + drivers/firewire/core-card.c | 91 ++++++++++++++++++------------- drivers/firewire/core-cdev.c | 400 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------- drivers/firewire/core-device.c | 202 +++++++++++++++++++++++++++++++------------------------------------- drivers/firewire/core-iso.c | 49 +++++++++++++++-- drivers/firewire/core-topology.c | 7 +-- drivers/firewire/core-transaction.c | 151 +++++++++++++++++++++------------------------------ drivers/firewire/core.h | 28 +++++++--- drivers/firewire/ohci-serdes-test.c | 66 +++++++++++++++++++++++ drivers/firewire/ohci.c | 574 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------- drivers/firewire/ohci.h | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/firewire.h | 22 ++++++++ include/trace/events/firewire.h | 4 +- sound/firewire/amdtp-stream.c | 34 +++++++++--- sound/firewire/bebob/bebob_pcm.c | 1 + sound/firewire/dice/dice-pcm.c | 1 + sound/firewire/digi00x/digi00x-pcm.c | 1 + sound/firewire/fireface/ff-pcm.c | 1 + sound/firewire/fireworks/fireworks_pcm.c | 1 + sound/firewire/isight.c | 1 + sound/firewire/motu/motu-pcm.c | 1 + sound/firewire/oxfw/oxfw-pcm.c | 1 + sound/firewire/tascam/tascam-pcm.c | 1 + 23 files changed, 1065 insertions(+), 774 deletions(-) Regards Takashi Sakamoto . Date: Sat, 21 Sep 2024 07:56:55 -0700 From: Andrew Morton To: Linus Torvalds Cc: linux-mm@kvack.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] non-MM updates for 6.12-rc1 Linus, please pull mm,git's non-MM updates for this development cycle, thanks. Known upcoming merge/build issues and their linux-ext resolutions include: fs/bcachefs/clock.c, vs bcachefs tree: https://lkml.kernel.org/r/20240712105711.6dc900a2@canb.auug.org.au include/linux/string_choices.h, vs kspp tree: https://lkml.kernel.org/r/20240829153145.7f768337@canb.auug.org.au A build issue vs 6ff4cd1160af ("lib/string_choices: Add str_true_false()/str_false_true() helper"): https://lkml.kernel.org/r/20240919091446.37087f60@canb.auug.org.au And a build issue, vs kspp tree: https://lkml.kernel.org/r/20240906171238.07709365@canb.auug.org.au The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm tags/mm-nonmm-stabl= e-2024-09-21-07-52 for you to fetch changes up to 5e06e08939df1cafef97a8e04f4b88c2806b538a: list: test: increase coverage of list_test_list_replace*() (2024-09-17 01= :11:20 -0700) ---------------------------------------------------------------- Many singleton patches - please see the various changelogs for details. Quite a lot of nilfs2 work this time around. Notable patch series in this pull request are: "mul_u64_u64_div_u64: new implementation" by Nicolas Pitre, with assistance from Uwe Kleine-K=F6nig. Reimplement mul_u64_u64_div_u64() to provide (much) more accurate results. The current implementation was causing Uwe some issues in the PWM drivers. "xz: Updates to license, filters, and compression options" from Lasse Collin. Miscellaneous maintenance and kinor feature work to the xz decompressor. "Fix some GDB command error and add some GDB commands" from Kuan-Ying Lee. Fixes and enhancements to the gdb scripts. "treewide: add missing MODULE_DESCRIPTION() macros" from Jeff Johnson. Adds lots of MODULE_DESCRIPTIONs, thus fixing lots of warnings about this. "nilfs2: add support for some common ioctls" from Ryusuke Konishi. Adds various commonly-available ioctls to nilfs2. "This series fixes a number of formatting issues in kernel doc comments" from Ryusuke Konishi does that. "nilfs2: prevent unexpected ENOENT propagation" from Ryusuke Konishi. Fix issues where -ENOENT was being unintentionally and inappropriately returned to userspace. "nilfs2: assorted cleanups" from Huang Xiaojia. "nilfs2: fix potential issues with empty b-tree nodes" from Ryusuke Konishi fixes some issues which can occur on corrupted nilfs2 filesystems. "scripts/decode_stacktrace.sh: improve error reporting and usability" from Luca Ceresoli does those things. ---------------------------------------------------------------- Alexey Dobriyan (1): proc: use __auto_type more Alok Swaminathan (1): lib: glob.c: added null check for character class Andrey Konovalov (1): kcov: don't instrument lib/find_bit.c Andrii Nakryiko (1): fs/procfs: remove build ID-related code duplication in PROCMAP_QUERY Andy Shevchenko (1): dimlib: use *-y instead of *-objs in Makefile Breno Leitao (3): failcmd: add script file in MAINTAINERS fault-injection: enhance failcmd to exit on non-hex address input failcmd: make failcmd.sh executable Chen Yu (1): kthread: fix task state in kthread worker if being frozen Chi Zhiling (1): ocfs2: fix unexpected zeroing of virtual disk Davidlohr Bueso (1): lib/rhashtable: cleanup fallback check in bucket_table_alloc() Deshan Zhang (1): lib/lru_cache: fix spelling mistake "colision"->"collision" Heming Zhao (1): ocfs2: fix the la space leak when unmounting an ocfs2 volume Hongbo Li (3): lib/string_choices: add str_true_false()/str_false_true() helper mm: make use of str_true_false helper nfs make use of str_false_true helper Huang Xiaojia (1): nilfs2: use common implementation of file type I Hsin Cheng (2): list: test: fix tests for list_cut_position() list: test: increase coverage of list_test_list_replace*() J. R. Okajima (1): lockdep: upper limit LOCKDEP_CHAINS_BITS Jani Nikula (3): fault-inject: improve build for CONFIG_FAULT_INJECTION=3Dn drm/msm: clean up fault injection usage drm/xe: clean up fault injection usage Jeff Johnson (4): lib: test_objpool: add missing MODULE_DESCRIPTION() macro crypto: arm/xor - add missing MODULE_DESCRIPTION() macro x86/mm: add testmmiotrace MODULE_DESCRIPTION() locking/ww_mutex/test: add MODULE_DESCRIPTION() Jinjie Ruan (2): crash: fix crash memory reserve exceed system memory bug user_namespace: use kmemdup_array() instead of kmemdup() for multiple= allocation Joseph Qi (1): ocfs2: cleanup return value and mlog in ocfs2_global_read_info() Julian Sun (1): scripts: add macro_checker script to check unused parameters in macros Kent Overstreet (1): scripts/decode_stacktrace.sh: nix-ify Kuan-Wei Chiu (2): lib/bcd: optimize _bin2bcd() for improved performance ocfs2: remove custom swap functions in favor of built-in sort swap Kuan-Ying Lee (5): scripts/gdb: fix timerlist parsing issue scripts/gdb: add iteration function for rbtree scripts/gdb: fix lx-mounts command error scripts/gdb: add 'lx-stack_depot_lookup' command. scripts/gdb: add 'lx-kasan_mem_to_shadow' command Kunwu Chan (1): nilfs2: remove duplicate 'unlikely()' usage Lasse Collin (16): MAINTAINERS: add XZ Embedded maintainer LICENSES: add 0BSD license text xz: switch from public domain to BSD Zero Clause License (0BSD) xz: fix comments and coding style xz: fix kernel-doc formatting errors in xz.h xz: improve the MicroLZMA kernel-doc in xz.h xz: Documentation/staging/xz.rst: Revise thoroughly xz: cleanup CRC32 edits from 2018 xz: optimize for-loop conditions in the BCJ decoders xz: Add ARM64 BCJ filter xz: add RISC-V BCJ filter xz: use 128 MiB dictionary and force single-threaded mode xz: adjust arch-specific options for better kernel compression arm64: boot: add Image.xz support riscv: boot: add Image.xz support xz: remove XZ_EXTERN and extern from functions Luca Ceresoli (3): scripts/decode_stacktrace.sh: remove find_module recursion and improv= e error reporting scripts/decode_stacktrace.sh: clarify command line scripts/decode_stacktrace.sh: add '-h' flag Markus Elfring (2): dyndbg: use seq_putc() in ddebug_proc_show() closures: use seq_putc() in debug_show() Mateusz Guzik (1): ratelimit: convert flags to int to save 8 bytes in size Nicolas Pitre (2): mul_u64_u64_div_u64: make it precise always mul_u64_u64_div_u64: basic sanity test Ryusuke Konishi (28): nilfs2: add support for FS_IOC_GETUUID nilfs2: add support for FS_IOC_GETFSSYSFSPATH nilfs2: add support for FS_IOC_GETFSLABEL nilfs2: add support for FS_IOC_SETFSLABEL nilfs2: do not output warnings when clearing dirty buffers nilfs2: add missing argument description for __nilfs_error() nilfs2: add missing argument descriptions for ioctl-related helpers nilfs2: improve kernel-doc comments for b-tree node helpers nilfs2: fix incorrect kernel-doc declaration of nilfs_palloc_req stru= cture nilfs2: add missing description of nilfs_btree_path structure nilfs2: describe the members of nilfs_bmap_operations structure nilfs2: fix inconsistencies in kernel-doc comments in segment.h nilfs2: fix missing initial short descriptions of kernel-doc comments nilfs2: treat missing sufile header block as metadata corruption nilfs2: treat missing cpfile header block as metadata corruption nilfs2: do not propagate ENOENT error from sufile during recovery nilfs2: do not propagate ENOENT error from sufile during GC nilfs2: do not propagate ENOENT error from nilfs_sufile_mark_dirty() nilfs2: use the BITS_PER_LONG macro nilfs2: separate inode type information from i_state field nilfs2: eliminate the shared counter and spinlock for i_generation nilfs2: do not repair reserved inode bitmap in nilfs_new_inode() nilfs2: remove sc_timer_task nilfs2: use kthread_create and kthread_stop for the log writer thread nilfs2: refactor nilfs_segctor_thread() nilfs2: fix potential null-ptr-deref in nilfs_btree_insert() nilfs2: determine empty node blocks as corrupted nilfs2: fix potential oob read in nilfs_btree_check_delete() Sourabh Jain (1): Document/kexec: generalize crash hotplug description Thorsten Blum (2): lib: checksum: use ARRAY_SIZE() to improve assert_setup_correct() ocfs2: use max() to improve ocfs2_dlm_seq_show() Uros Bizjak (3): kexec: use atomic_try_cmpxchg_acquire() in kexec_trylock() lib/percpu_counter: add missing __percpu qualifier to a cast squashfs: fix percpu address space issues in decompressor_multi_percp= u.c Waiman Long (1): watchdog: handle the ENODEV failure case of lockup_detector_delay_ini= t() separately WangYuli (1): treewide: correct the typo 'retun' Yang Ruibin (1): lib: fix the NULL vs IS_ERR() bug for debugfs_create_dir() qasdev (1): ocfs2: fix shift-out-of-bounds UBSAN bug in ocfs2_verify_volume() zhangjiao (1): tools/mm: rm thp_swap_allocator_test when make clean Documentation/ABI/testing/sysfs-devices-memory | 6 +- Documentation/ABI/testing/sysfs-devices-system-cpu | 6 +- Documentation/admin-guide/mm/memory-hotplug.rst | 5 +- Documentation/core-api/cpu_hotplug.rst | 10 +- Documentation/staging/xz.rst | 157 ++++++-------- LICENSES/deprecated/0BSD | 23 ++ MAINTAINERS | 14 ++ arch/arm/lib/xor-neon.c | 1 + arch/arm/mach-omap2/omap-mpuss-lowpower.c | 2 +- arch/arm64/boot/Makefile | 5 +- arch/powerpc/boot/xz_config.h | 3 - arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 6 +- arch/riscv/boot/Makefile | 3 + arch/x86/mm/testmmiotrace.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 2 +- drivers/gpu/drm/msm/msm_debugfs.c | 2 - drivers/gpu/drm/msm/msm_drv.c | 3 +- drivers/gpu/drm/msm/msm_drv.h | 4 - drivers/gpu/drm/xe/xe_debugfs.c | 7 +- drivers/gpu/drm/xe/xe_gt.h | 10 +- drivers/infiniband/core/sa_query.c | 2 +- drivers/input/misc/wistron_btns.c | 2 +- drivers/iommu/iommufd/selftest.c | 1 + drivers/misc/xilinx_tmr_inject.c | 1 + drivers/mtd/nand/raw/nandsim.c | 2 +- drivers/nvme/host/fault_inject.c | 1 + drivers/scsi/bfa/bfa_fcs.c | 2 +- drivers/scsi/pmcraid.c | 2 +- drivers/ufs/core/ufs-fault-injection.c | 1 + fs/nfs/nfs4xdr.c | 11 +- fs/nilfs2/alloc.h | 2 +- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/bmap.h | 20 +- fs/nilfs2/btnode.c | 63 +++++- fs/nilfs2/btree.c | 12 +- fs/nilfs2/btree.h | 1 + fs/nilfs2/cpfile.c | 54 ++--- fs/nilfs2/dat.c | 17 +- fs/nilfs2/dir.c | 44 +--- fs/nilfs2/inode.c | 79 ++----- fs/nilfs2/ioctl.c | 109 +++++++++- fs/nilfs2/mdt.c | 6 +- fs/nilfs2/nilfs.h | 27 ++- fs/nilfs2/page.c | 21 +- fs/nilfs2/page.h | 4 +- fs/nilfs2/recovery.c | 11 +- fs/nilfs2/segment.c | 234 +++++++++++------= ---- fs/nilfs2/segment.h | 10 +- fs/nilfs2/sufile.c | 52 +++-- fs/nilfs2/super.c | 9 + fs/nilfs2/the_nilfs.c | 5 - fs/nilfs2/the_nilfs.h | 6 - fs/ocfs2/aops.c | 2 +- fs/ocfs2/dir.c | 12 +- fs/ocfs2/dlmglue.c | 7 +- fs/ocfs2/localalloc.c | 19 ++ fs/ocfs2/quota_global.c | 15 +- fs/ocfs2/refcounttree.c | 13 +- fs/ocfs2/super.c | 4 +- fs/ocfs2/xattr.c | 15 +- fs/proc/inode.c | 31 +-- fs/proc/task_mmu.c | 15 -- fs/squashfs/decompressor_multi_percpu.c | 6 +- include/linux/decompress/unxz.h | 5 +- include/linux/fault-inject.h | 36 +++- include/linux/lru_cache.h | 4 +- include/linux/mmc/host.h | 1 + include/linux/ratelimit_types.h | 2 +- include/linux/string_choices.h | 6 + include/linux/xz.h | 81 +++---- include/ufs/ufshcd.h | 1 + init/Kconfig | 5 +- kernel/crash_core.c | 33 +-- kernel/crash_reserve.c | 3 + kernel/futex/core.c | 1 + kernel/kexec_internal.h | 3 +- kernel/kthread.c | 10 +- kernel/locking/test-ww_mutex.c | 1 + kernel/user_namespace.c | 5 +- kernel/watchdog.c | 5 +- lib/Kconfig.debug | 12 +- lib/Makefile | 1 + lib/bcd.c | 4 +- lib/checksum_kunit.c | 9 +- lib/closure.c | 2 +- lib/decompress_unxz.c | 40 ++-- lib/dim/Makefile | 2 +- lib/dynamic_debug.c | 4 +- lib/fault-inject.c | 1 + lib/glob.c | 2 + lib/list-test.c | 10 + lib/lru_cache.c | 10 +- lib/math/Makefile | 1 + lib/math/div64.c | 115 ++++++---- lib/math/test_mul_u64_u64_div_u64.c | 99 +++++++++ lib/percpu_counter.c | 2 +- lib/rhashtable.c | 2 +- lib/test_fpu_glue.c | 2 +- lib/test_objpool.c | 3 +- lib/xz/Kconfig | 13 +- lib/xz/xz_crc32.c | 11 +- lib/xz/xz_dec_bcj.c | 191 +++++++++++++++-- lib/xz/xz_dec_lzma2.c | 15 +- lib/xz/xz_dec_stream.c | 13 +- lib/xz/xz_dec_syms.c | 14 +- lib/xz/xz_dec_test.c | 12 +- lib/xz/xz_lzma2.h | 5 +- lib/xz/xz_private.h | 40 ++-- lib/xz/xz_stream.h | 5 +- mm/fail_page_alloc.c | 1 + mm/failslab.c | 1 + mm/memory-tiers.c | 3 +- scripts/Makefile.lib | 13 +- scripts/decode_stacktrace.sh | 51 +++-- scripts/gdb/linux/kasan.py | 44 ++++ scripts/gdb/linux/proc.py | 4 +- scripts/gdb/linux/rbtree.py | 12 ++ scripts/gdb/linux/stackdepot.py | 27 +++ scripts/gdb/linux/timerlist.py | 31 +-- scripts/gdb/vmlinux-gdb.py | 1 + scripts/macro_checker.py | 131 ++++++++++++ scripts/xz_wrap.sh | 158 +++++++++++++- tools/mm/Makefile | 2 +- tools/testing/fault-injection/failcmd.sh | 12 ++ 125 files changed, 1697 insertions(+), 859 deletions(-) create mode 100644 LICENSES/deprecated/0BSD create mode 100644 lib/math/test_mul_u64_u64_div_u64.c create mode 100644 scripts/gdb/linux/kasan.py create mode 100755 scripts/macro_checker.py mode change 100644 =3D> 100755 tools/testing/fault-injection/failcmd.sh . Date: Sat, 21 Sep 2024 15:27:58 -0400 From: Kent Overstreet To: Linus Torvalds Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] bcachefs changes for 6.12-rc1 Relatively quiet cycle here - which is good, because 6.11 was huge. I think we'll be able to take off EXPERIMENTAL in inside of a year, see below for more. Cheers, Kent The following changes since commit 16005147cca41a0f67b5def2a4656286f8c0db4a: bcachefs: Don't delete open files in online fsck (2024-09-09 09:41:47 -0400) are available in the Git repository at: git://evilpiepirate.org/bcachefs.git tags/bcachefs-2024-09-21 for you to fetch changes up to 025c55a4c7f11ea38521c6e797f3192ad8768c93: bcachefs: return err ptr instead of null in read sb clean (2024-09-21 11:39:49 -0400) ---------------------------------------------------------------- bcachefs changes for 6.12-rc1 rcu_pending, btree key cache rework: this solves lock contenting in the key cache, eliminating the biggest source of the srcu lock hold time warnings, and drastically improving performance on some metadata heavy workloads - on multithreaded creates we're now 3-4x faster than xfs. We're now using an rhashtable instead of the system inode hash table; this is another significant performance improvement on multithreaded metadata workloads, eliminating more lock contention. for_each_btree_key_in_subvolume_upto(): new helper for iterating over keys within a specific subvolume, eliminating a lot of open coded "subvolume_get_snapshot()" and also fixing another source of srcu lock time warnings, by running each loop iteration in its own transaction (as the existing for_each_btree_key() does). More work on btree_trans locking asserts; we now assert that we don't hold btree node locks when trans->locked is false, which is important because we don't use lockdep for tracking individual btree node locks. Some cleanups and improvements in the bset.c btree node lookup code, from Alan. Rework of btree node pinning, which we use in backpointers fsck. The old hacky implementation, where the shrinker just skipped over nodes in the pinned range, was causing OOMs; instead we now use another shrinker with a much higher seeks number for pinned nodes. Rebalance now uses BCH_WRITE_ONLY_SPECIFIED_DEVS; this fixes an issue where rebalance would sometimes fall back to allocating from the full filesystem, which is not what we want when it's trying to move data to a specific target. Use __GFP_ACCOUNT, GFP_RECLAIMABLE for btree node, key cache allocations. Idmap mounts are now supported - Hongbo. Rename whiteouts are now supported - Hongbo. Erasure coding can now handle devices being marked as failed, or forcibly removed. We still need the evacuate path for erasure coding, but it's getting very close to ready for people to start using. Status, and when will we be taking off experimental: ---------------------------------------------------- Going by critical, user facing bugs getting found and fixed, we're nearly there. There are a couple key items that need to be finished before we can take off the experimental label: - The end-user experience is still pretty painful when the root filesystem needs a fsck; we need some form of limited self healing so that necessary repair gets run automatically. Errors (by type) are recorded in the superblock, so what we need to do next is convert remaining inconsistent() errors to fsck() errors (so that all runtime inconsistencies are logged in the superblock), and we need to go through the list of fsck errors and classify them by which fsck passes are needed to repair them. - We need comprehensive torture testing for all our repair paths, to shake out remaining bugs there. Thomas has been working on the tooling for this, so this is coming soonish. Slightly less critical items: - We need to improve the end-user experience for degraded mounts: right now, a degraded root filesystem means dropping to an initramfs shell or somehow inputting mount options manually (we don't want to allow degraded mounts without some form of user input, except on unattended servers) - we need the mount helper to prompt the user to allow mounting degraded, and make sure this works with systemd. - Scalabiity: we have users running 100TB+ filesystems, and that's effectively the limit right now due to fsck times. We have some reworks in the pipeline to address this, we're aiming to make petabyte sized filesystems practical. ---------------------------------------------------------------- Alan Huang (8): bcachefs: Remove unused parameter of bkey_mantissa bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped bcachefs: Remove dead code in __build_ro_aux_tree bcachefs: Convert open-coded extra computation to helper bcachefs: Minimize the search range used to calculate the mantissa bcachefs: Remove the prev array stuff bcachefs: Remove unused parameter bcachefs: Refactor bch2_bset_fix_lookup_table Alyssa Ross (1): bcachefs: Fix negative timespecs Chen Yufan (1): bcachefs: Convert to use jiffies macros Diogo Jahchan Koike (1): bcachefs: return err ptr instead of null in read sb clean Feiko Nanninga (1): bcachefs: Fix sysfs rebalance duration waited formatting Hongbo Li (2): bcachefs: support idmap mounts bcachefs: Fix compilation error for bch2_sb_member_alloc Julian Sun (4): bcachefs: remove the unused macro definition bcachefs: fix macro definition allocate_dropping_locks_errcode bcachefs: fix macro definition allocate_dropping_locks bcachefs: remove the unused parameter in macro bkey_crc_next Kent Overstreet (68): inode: make __iget() a static inline bcachefs: switch to rhashtable for vfs inodes hash bcachefs: Fix deadlock in __wait_on_freeing_inode() lib/generic-radix-tree.c: genradix_ptr_inlined() lib/generic-radix-tree.c: add preallocation bcachefs: rcu_pending bcachefs: rcu_pending now works in userspace bcachefs: Rip out freelists from btree key cache bcachefs: key cache can now allocate from pending bcachefs: data_allowed is now an opts.h option bcachefs: bch2_opt_set_sb() can now set (some) device options bcachefs: Opt_durability can now be set via bch2_opt_set_sb() bcachefs: Add check for btree_path ref overflow bcachefs: Btree path tracepoints bcachefs: kill bch2_btree_iter_peek_and_restart() bcachefs: bchfs_read(): call trans_begin() on every loop iter bcachefs: bch2_fiemap(): call trans_begin() on every loop iter bcachefs: for_each_btree_key_in_subvolume_upto() bcachefs: bch2_readdir() -> for_each_btree_key_in_subvolume_upto bcachefs: bch2_xattr_list() -> for_each_btree_key_in_subvolume_upto bcachefs: bch2_seek_data() -> for_each_btree_key_in_subvolume_upto bcachefs: bch2_seek_hole() -> for_each_btree_key_in_subvolume_upto bcachefs: range_has_data() -> for_each_btree_key_in_subvolume_upto bcachefs: bch2_folio_set() -> for_each_btree_key_in_subvolume_upto bcachefs: quota_reserve_range() -> for_each_btree_key_in_subvolume_upto bcachefs: Move rebalance_status out of sysfs/internal bcachefs: promote_whole_extents is now a normal option bcachefs: trivial open_bucket_add_buckets() cleanup bcachefs: bch2_sb_nr_devices() bcachefs: Drop memalloc_nofs_save() in bch2_btree_node_mem_alloc() bcachefs: bch2_time_stats_reset() bcachefs: Assert that we don't lock nodes when !trans->locked bcachefs: darray: convert to alloc_hooks() bcachefs: Switch gc bucket array to a genradix bcachefs: Add pinned to btree cache not freed counters bcachefs: do_encrypt() now handles allocation failures bcachefs: convert __bch2_encrypt_bio() to darray bcachefs: kill redundant is_vmalloc_addr() bcachefs: fix prototype to bch2_alloc_sectors_start_trans() bcachefs: BCH_WRITE_ALLOC_NOWAIT no longer applies to open bucket allocation bcachefs: rebalance writes use BCH_WRITE_ONLY_SPECIFIED_DEVS bcachefs: Use __GFP_ACCOUNT for reclaimable memory bcachefs: Use mm_account_reclaimed_pages() when freeing btree nodes bcachefs: Options for recovery_passes, recovery_passes_exclude bcachefs: Move tabstop setup to bch2_dev_usage_to_text() bcachefs: bch2_dev_remove_alloc() -> alloc_background.c bcachefs: bch2_sb_member_alloc() bcachefs: improve "no device to read from" message bcachefs: bch2_opts_to_text() bcachefs: Progress indicator for extents_to_backpointers bcachefs: bch2_dev_rcu_noerror() bcachefs: Failed devices no longer require mounting in degraded mode bcachefs: Don't count "skipped access bit" as touched in btree cache scan bcachefs: btree cache counters should be size_t bcachefs: split up btree cache counters for live, freeable bcachefs: Rework btree node pinning bcachefs: EIO errcode cleanup bcachefs: stripe_to_mem() bcachefs: bch_stripe.disk_label bcachefs: ec_stripe_head.nr_created bcachefs: improve bch2_new_stripe_to_text() bcachefs: improve error message on too few devices for ec bcachefs: improve error messages in bch2_ec_read_extent() bcachefs: bch2_trigger_ptr() calculates sectors even when no device bcachefs: bch2_dev_remove_stripes() bcachefs: bch_fs.rw_devs_change_count bcachefs: bch2_ec_stripe_head_get() now checks for change in rw devices bcachefs: Don't drop devices with stripe pointers Matthew Wilcox (Oracle) (1): bcachefs: Do not check folio_has_private() Nathan Chancellor (1): bcachefs: Fix format specifier in bch2_btree_key_cache_to_text() Reed Riley (1): bcachefs: Replace div_u64 with div64_u64 where second param is u64 Sasha Finkelstein (1): bcachefs: Hook up RENAME_WHITEOUT in rename. Thorsten Blum (3): bcachefs: Annotate struct bucket_array with __counted_by() bcachefs: Annotate struct bch_xattr with __counted_by() bcachefs: Annotate bch_replicas_entry_{v0,v1} with __counted_by() Xiaxi Shen (1): bcachefs: Fix a spelling error in docs Yang Li (1): bcachefs: Remove duplicated include in backpointers.c Youling Tang (4): bcachefs: allocate inode by using alloc_inode_sb() bcachefs: Mark bch_inode_info as SLAB_ACCOUNT bcachefs: drop unused posix acl handlers bcachefs: Simplify bch2_xattr_emit() implementation Documentation/filesystems/bcachefs/CodingStyle.rst | 2 +- fs/bcachefs/Kconfig | 7 + fs/bcachefs/Makefile | 1 + fs/bcachefs/acl.c | 2 +- fs/bcachefs/alloc_background.c | 45 +- fs/bcachefs/alloc_background.h | 3 +- fs/bcachefs/alloc_foreground.c | 59 +- fs/bcachefs/alloc_foreground.h | 5 +- fs/bcachefs/backpointers.c | 106 +++- fs/bcachefs/backpointers.h | 23 +- fs/bcachefs/bcachefs.h | 14 +- fs/bcachefs/bcachefs_format.h | 2 + fs/bcachefs/bset.c | 182 +++--- fs/bcachefs/bset.h | 4 +- fs/bcachefs/btree_cache.c | 273 ++++++--- fs/bcachefs/btree_cache.h | 3 + fs/bcachefs/btree_gc.c | 21 +- fs/bcachefs/btree_io.c | 8 +- fs/bcachefs/btree_io.h | 4 +- fs/bcachefs/btree_iter.c | 63 +- fs/bcachefs/btree_iter.h | 52 +- fs/bcachefs/btree_key_cache.c | 405 +++---------- fs/bcachefs/btree_key_cache_types.h | 18 +- fs/bcachefs/btree_locking.h | 13 +- fs/bcachefs/btree_trans_commit.c | 2 +- fs/bcachefs/btree_types.h | 60 +- fs/bcachefs/btree_update.c | 12 +- fs/bcachefs/btree_update_interior.c | 37 +- fs/bcachefs/btree_update_interior.h | 2 + fs/bcachefs/buckets.c | 35 +- fs/bcachefs/buckets.h | 15 +- fs/bcachefs/buckets_types.h | 8 - fs/bcachefs/checksum.c | 101 ++-- fs/bcachefs/clock.h | 9 - fs/bcachefs/darray.c | 4 +- fs/bcachefs/darray.h | 26 +- fs/bcachefs/data_update.c | 2 +- fs/bcachefs/dirent.c | 66 +-- fs/bcachefs/ec.c | 303 +++++++--- fs/bcachefs/ec.h | 11 +- fs/bcachefs/ec_format.h | 9 +- fs/bcachefs/ec_types.h | 1 + fs/bcachefs/errcode.h | 14 +- fs/bcachefs/extents.c | 33 +- fs/bcachefs/extents.h | 24 +- fs/bcachefs/fs-common.c | 5 +- fs/bcachefs/fs-io-buffered.c | 41 +- fs/bcachefs/fs-io-direct.c | 2 +- fs/bcachefs/fs-io-pagecache.c | 90 ++- fs/bcachefs/fs-io-pagecache.h | 4 +- fs/bcachefs/fs-io.c | 178 ++---- fs/bcachefs/fs-ioctl.c | 4 +- fs/bcachefs/fs.c | 427 +++++++++----- fs/bcachefs/fs.h | 18 +- fs/bcachefs/inode.c | 2 +- fs/bcachefs/io_read.c | 18 +- fs/bcachefs/io_write.c | 7 +- fs/bcachefs/journal_io.c | 6 +- fs/bcachefs/journal_reclaim.c | 7 +- fs/bcachefs/opts.c | 85 ++- fs/bcachefs/opts.h | 61 +- fs/bcachefs/rcu_pending.c | 650 +++++++++++++++++++++ fs/bcachefs/rcu_pending.h | 27 + fs/bcachefs/rebalance.c | 3 + fs/bcachefs/recovery.c | 22 +- fs/bcachefs/recovery_passes.c | 10 +- fs/bcachefs/replicas.c | 10 +- fs/bcachefs/replicas_format.h | 9 +- fs/bcachefs/sb-clean.c | 2 +- fs/bcachefs/sb-members.c | 57 ++ fs/bcachefs/sb-members.h | 22 +- fs/bcachefs/str_hash.h | 2 +- fs/bcachefs/subvolume.h | 45 ++ fs/bcachefs/subvolume_types.h | 3 +- fs/bcachefs/super-io.c | 12 +- fs/bcachefs/super.c | 85 +-- fs/bcachefs/sysfs.c | 55 +- fs/bcachefs/thread_with_file.c | 2 +- fs/bcachefs/time_stats.c | 14 + fs/bcachefs/time_stats.h | 3 +- fs/bcachefs/trace.h | 465 ++++++++++++++- fs/bcachefs/util.c | 16 +- fs/bcachefs/util.h | 2 +- fs/bcachefs/xattr.c | 81 +-- fs/bcachefs/xattr_format.h | 2 +- fs/inode.c | 8 - include/linux/fs.h | 9 +- include/linux/generic-radix-tree.h | 105 +++- lib/generic-radix-tree.c | 80 +-- 89 files changed, 3155 insertions(+), 1690 deletions(-) create mode 100644 fs/bcachefs/rcu_pending.c create mode 100644 fs/bcachefs/rcu_pending.h .