Skip to content

[PW_SID:1127240] RISC-V IOMMU HPM support#2280

Open
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1127240
Open

[PW_SID:1127240] RISC-V IOMMU HPM support#2280
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1127240

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1127240 applied to workflow__riscv__fixes

Name: RISC-V IOMMU HPM support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1127240
Version: 4

Linux RISC-V bot and others added 3 commits July 13, 2026 20:05
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 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.

The performance monitor provides counters with filtering support to
collect events for specific device ID/process ID, or GSCID/PSCID.

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.

PMU-related definitions are moved into the perf driver, where they are
used exclusively.

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.

Use the physical address of the device directory table as the
unique ID for auxiliary device in each IOMMU instance

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>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 142.47 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1421.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1692.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.14 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.80 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#148: 
new file mode 100644

CHECK: Please use a blank line after function/struct/union/enum declarations
#487: FILE: drivers/perf/riscv_iommu_pmu.c:335:
+}
+static void riscv_iommu_pmu_start_all(struct riscv_iommu_pmu *pmu)

total: 0 errors, 1 warnings, 1 checks, 814 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 9452440c1e70 ("drivers/perf: riscv-iommu: add risc-v iommu pmu driver") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 1 checks, 814 lines checked
CHECK: Please use a blank line after function/struct/union/enum declarations
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/2] drivers/perf: riscv-iommu: add risc-v iommu pmu driver"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 142.01 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1435.45 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1689.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 29.58 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.10 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.11 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
kdoc
Desc: Detects for kdoc errors
Duration: 1.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/2] iommu/riscv: create a auxiliary device for HPM"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 3 times, most recently from 56b6f30 to 8ca72ef Compare July 15, 2026 17:25
@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch from 8ca72ef to 60e0882 Compare July 19, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants