[PW_SID:1150555] RISC-V IOMMU HPM support - #2517
Conversation
Add a new driver to support the RISC-V IOMMU PMU. This is an auxiliary device driver created by the parent RISC-V IOMMU driver. The performance monitor provides counters with filtering support to collect events for specific device ID/process ID, or GSCID/PSCID. The RISC-V IOMMU PMU separates the cycle counter from the event counters. The cycle counter is not associated with iohpmevt0, so a software-defined cycle event is required for the perf subsystem. The number and width of the counters are hardware-implemented and must be detected at runtime. Leave out all the dead cleanup code (i.e. .remove() operation) if the PMU driver is tied to the IOMMU driver and can never realistically be removed. PMU-related definitions are moved into the perf driver, where they are used exclusively. According to RISC-V IOMMU specification Chapter 6: Whether an 8 byte access to an IOMMU register is single-copy atomic is UNSPECIFIED. Use two separate 4 byte accesses for hardware compatibility. Tested-by: Chen Pei <cp0613@linux.alibaba.com> Tested-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Reviewed-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org> Suggested-by: David Laight <david.laight.linux@gmail.com> Suggested-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/linux-riscv/20260618143634.7f3dd6c5@pumpkin/ Signed-off-by: Zong Li <zong.li@sifive.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Create an auxiliary device for HPM when the IOMMU supports a hardware performance monitor. Tested-by: Chen Pei <cp0613@linux.alibaba.com> Tested-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Reviewed-by: Guo Ren <guoren@kernel.org> Suggested-by: Samuel Holland <samuel.holland@sifive.com> Signed-off-by: Zong Li <zong.li@sifive.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 1: "[v6,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
|
Patch 2: "[v6,2/2] iommu/riscv: create a auxiliary device for HPM" |
PR for series 1150555 applied to workflow__riscv__fixes
Name: RISC-V IOMMU HPM support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1150555
Version: 6